tx · Hjs5FPWkYKmUj92kLC1xb52hmVT551A8c5zmkuvGxnYG

3N8n6BtTBKRZBoPuMzaPBH9FyJhfv9xDFJH:  -0.01700000 Waves

2022.07.12 10:24 [2136212] smart account 3N8n6BtTBKRZBoPuMzaPBH9FyJhfv9xDFJH > SELF 0.00000000 Waves

{ "type": 13, "id": "Hjs5FPWkYKmUj92kLC1xb52hmVT551A8c5zmkuvGxnYG", "fee": 1700000, "feeAssetId": null, "timestamp": 1657610702124, "version": 2, "chainId": 84, "sender": "3N8n6BtTBKRZBoPuMzaPBH9FyJhfv9xDFJH", "senderPublicKey": "4hcnYaYoB2XaCzyJ7wfePpG7EfTd6st6aCAhkskJ9cQ5", "proofs": [ "2gZSPTnw8JJ2AdAoKnC9rBL34okzDF7ufX4KJFNV9y2SopwXBetLHgGK9znavd621TYPijxUsALXUNHj73dCce46" ], "script": "base64:AAIFAAAAAAAAAB4IAhIAEgASABIAEgASABIAEgASABIAEgASABIAEgAAAAAVAAAAAAh1c2RuVXNkdAEAAAAg202DNWRHG5bvnwwvoM991XmdkujhmzUPwT/MewJwKQsAAAAADXVzZG5Vc2R0TFBUQ0kBAAAAIAqBzantQGEdmEq4Oth6BGhTCCbAyZjxYcEpfvod3iryAAAAAAh3eFVzZG5MUAEAAAAgG7mhj3vOTKXN+s5HyQsWjk32W97C65PB1sWo0bGqCxwAAAAAC3d4VXNkbkxQVENJAQAAACC37N3mGwJ72rYTh/1V0NY8tseiNz1LiL3Be29IRACYLwAAAAALd2F2ZXNVc2RuTHABAAAAINUKknePcghEmMkNN/IegHNiilmrJ+abeEGdbsH03iJ2AAAAAA53YXZlc1VzZG5MUFRDSQEAAAAgxRp2zzmtZIv1fW7qZyCOpdLB08oGyQGtTSaCWHrWElkAAAAACWV0aFVzZG5MUAEAAAAgf0Ew/c/5+Zy9fq7UHSNMMuNJS4SB4kp3y/IQBPX7+eEAAAAADGV0aFVzZG5MUFRDSQEAAAAg4e0WyvKtIAu2EMEK2Ns8J2Bjlk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Q0kFAAAAAmFtBgQAAAACdHIJAQAAAA5TY3JpcHRUcmFuc2ZlcgAAAAMIBQAAAAFpAAAABmNhbGxlcgUAAAACYW0FAAAADGJ0Y1VzZG5MUFRDSQkABEwAAAACBQAAAAN1cGQJAARMAAAAAgUAAAAEdXBkSwkABEwAAAACBQAAAAdMUElzc3VlCQAETAAAAAIFAAAAAnRyBQAAAANuaWwJAAACAAAAAQIAAAAkU3RyaWN0IHZhbHVlIGlzIG5vdCBlcXVhbCB0byBpdHNlbGYuAAAAAQAAAAJ0eAEAAAAGdmVyaWZ5AAAAAAkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAAIBQAAAAJ0eAAAAA9zZW5kZXJQdWJsaWNLZXmV9BMy", "height": 2136212, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: FTtDGumEc1UADC4JpKSzqcWoe2MjnWmMKKE6LRtkjMcs Next: F8v7q2QdSSXmBiUzBLmApArQq7Va3PoAmCoJ6Mo25snM Diff:
OldNewDifferences
121121 case _ =>
122122 throw("Can't find asset")
123123 }
124- let toIssue = (pmtAmount * (totalIssued / tkStaked))
124+ let one = fraction(totalIssued, 100000000, tkStaked)
125+ let toIssue = (pmtAmount * one)
125126 let updateState = IntegerEntry(keyWXUSDN, (tkStaked + pmtAmount))
126127 let LPstake = invoke(Address(base58'3Mx3zmXrMcLFCafMuPtXAzR4ZPVeZYb6qLz'), "stake", nil, [pmt])
127128 if ((LPstake == LPstake))
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let usdnUsdt = base58'Fm4qczu6Pepz8KUhh3Heb6LeTVfpSMX5vvNgw3x764CS'
55
66 let usdnUsdtLPTCI = base58'i1snzKxSEZVokh9TWj8hTJQEDBsocnL2hRWsSbsMPK7'
77
88 let wxUsdnLP = base58'2sEBVcyDFK2LupCf7MeA4vzHhGK4DC1WjbKGQCLYDqib'
99
1010 let wxUsdnLPTCI = base58'DNy6WBfhPE4y82RonGdHhZEunNotEDzmNfrBomWnsyGi'
1111
1212 let wavesUsdnLp = base58'FLdC14nUVRyiSYjVrMo3X4g8rXQjLbNRaGAyQAm8V68V'
1313
1414 let wavesUsdnLPTCI = base58'EGQiqw8jLjg6SVLUeeqMLjk3EjhEVHtjkJ6w46HyFfep'
1515
1616 let ethUsdnLP = base58'9ZkS8GoUWn69QhgF1RsRtS9CFtc7ZbDNX5N238Jmqjdr'
1717
1818 let ethUsdnLPTCI = base58'GCvR4BmCSjncVEEwr9psvhN5mctdNTGPs8Xp4b2oQNFZ'
1919
2020 let btcUsdnLP = base58'2RmyyZ39ZoPoTWksM6urmjgx9mB8ksP8Ru6ba8u89mZm'
2121
2222 let btcUsdnLPTCI = base58'4jarprgmcev38EU5p2duJAznZSLUxZ831jCT2vf95Hey'
2323
2424 let isStopped = false
2525
2626 let keyUsdtUsdn = "STAKED_LP"
2727
2828 let keyUsdtUsdnCompound = "From_Compound"
2929
3030 let keywxUsdnCompound = "WX_USDN_compound"
3131
3232 let keyWXUSDN = "WX_USDN"
3333
3434 let keyWAVESUSDN = "WAVES_USDN"
3535
3636 let keyWavesCompound = "WAVES_USDN_COMPOUND"
3737
3838 let keyBtcUsdn = "BTC_USDN"
3939
4040 let keyBtcUsdnCompound = "BTC_USDN_COMPOUND"
4141
4242 let keyEthUsdn = "ETH_USDN"
4343
4444 let keyEthUsdnCompound = "ETH_USDN_COMPOUND"
4545
4646 @Callable(i)
4747 func depositBtcUsdnLP () = {
4848 let pmt = value(i.payments[0])
4949 let pmtAmount = pmt.amount
5050 if ((pmt.assetId != btcUsdnLP))
5151 then throw("attach BTCUSDNLP tokens only")
5252 else if (isStopped)
5353 then throw("smart contract is on lock")
5454 else {
5555 let tkStaked = valueOrElse(getInteger(this, keyBtcUsdn), 0)
5656 let totalIssued = match assetInfo(btcUsdnLPTCI) {
5757 case asset: Asset =>
5858 asset.quantity
5959 case _ =>
6060 throw("Can't find asset")
6161 }
6262 let toIssue = (pmtAmount * ((totalIssued - assetBalance(this, btcUsdnLPTCI)) / tkStaked))
6363 let updateState = IntegerEntry(keyBtcUsdn, (tkStaked + pmtAmount))
6464 let LPstake = invoke(Address(base58'3Mx3zmXrMcLFCafMuPtXAzR4ZPVeZYb6qLz'), "stake", nil, [pmt])
6565 if ((LPstake == LPstake))
6666 then {
6767 let LPIssue = Reissue(btcUsdnLPTCI, toIssue, true)
6868 let transfer = ScriptTransfer(i.caller, toIssue, btcUsdnLPTCI)
6969 [LPIssue, transfer, updateState]
7070 }
7171 else throw("Strict value is not equal to itself.")
7272 }
7373 }
7474
7575
7676
7777 @Callable(i)
7878 func depositWavesUsdnLP () = {
7979 let pmt = value(i.payments[0])
8080 let pmtAmount = pmt.amount
8181 if ((pmt.assetId != wavesUsdnLp))
8282 then throw("attach WAVESUSDNLP tokens only")
8383 else if (isStopped)
8484 then throw("smart contract is on lock")
8585 else {
8686 let tkStaked = valueOrElse(getInteger(this, keyWAVESUSDN), 0)
8787 let totalIssued = match assetInfo(wavesUsdnLPTCI) {
8888 case asset: Asset =>
8989 asset.quantity
9090 case _ =>
9191 throw("Can't find asset")
9292 }
9393 let toIssue = (pmtAmount * (totalIssued / tkStaked))
9494 let updateState = IntegerEntry(keyWAVESUSDN, (tkStaked + pmtAmount))
9595 let LPstake = invoke(Address(base58'3Mx3zmXrMcLFCafMuPtXAzR4ZPVeZYb6qLz'), "stake", nil, [pmt])
9696 if ((LPstake == LPstake))
9797 then {
9898 let LPIssue = Reissue(wavesUsdnLPTCI, toIssue, true)
9999 let transfer = ScriptTransfer(i.caller, toIssue, wavesUsdnLPTCI)
100100 [LPIssue, transfer, updateState]
101101 }
102102 else throw("Strict value is not equal to itself.")
103103 }
104104 }
105105
106106
107107
108108 @Callable(i)
109109 func depositWxUsdnLP () = {
110110 let pmt = value(i.payments[0])
111111 let pmtAmount = pmt.amount
112112 if ((pmt.assetId != wxUsdnLP))
113113 then throw("attach WXUSDNLP tokens only")
114114 else if (isStopped)
115115 then throw("smart contract is on lock")
116116 else {
117117 let tkStaked = valueOrElse(getInteger(this, keyWXUSDN), 0)
118118 let totalIssued = match assetInfo(wxUsdnLPTCI) {
119119 case asset: Asset =>
120120 asset.quantity
121121 case _ =>
122122 throw("Can't find asset")
123123 }
124- let toIssue = (pmtAmount * (totalIssued / tkStaked))
124+ let one = fraction(totalIssued, 100000000, tkStaked)
125+ let toIssue = (pmtAmount * one)
125126 let updateState = IntegerEntry(keyWXUSDN, (tkStaked + pmtAmount))
126127 let LPstake = invoke(Address(base58'3Mx3zmXrMcLFCafMuPtXAzR4ZPVeZYb6qLz'), "stake", nil, [pmt])
127128 if ((LPstake == LPstake))
128129 then {
129130 let LPIssue = Reissue(wxUsdnLPTCI, toIssue, true)
130131 let transfer = ScriptTransfer(i.caller, toIssue, wxUsdnLPTCI)
131132 [LPIssue, transfer, updateState]
132133 }
133134 else throw("Strict value is not equal to itself.")
134135 }
135136 }
136137
137138
138139
139140 @Callable(i)
140141 func depositUsdtUsdnLP () = {
141142 let pmt = value(i.payments[0])
142143 let pmtAmount = pmt.amount
143144 if ((pmt.assetId != usdnUsdt))
144145 then throw("attach USDTUSDNLP tokens only")
145146 else if (isStopped)
146147 then throw("smart contract is on lock")
147148 else {
148149 let tkStaked = valueOrElse(getInteger(this, keyUsdtUsdn), 0)
149150 let totalIssued = match assetInfo(usdnUsdtLPTCI) {
150151 case asset: Asset =>
151152 asset.quantity
152153 case _ =>
153154 throw("Can't find asset")
154155 }
155156 let toIssue = (pmtAmount * (totalIssued / tkStaked))
156157 let updateState = IntegerEntry(keyUsdtUsdn, (tkStaked + pmtAmount))
157158 let LPstake = invoke(Address(base58'3Mx3zmXrMcLFCafMuPtXAzR4ZPVeZYb6qLz'), "stake", nil, [pmt])
158159 if ((LPstake == LPstake))
159160 then {
160161 let LPIssue = Reissue(usdnUsdtLPTCI, toIssue, true)
161162 let transfer = ScriptTransfer(i.caller, toIssue, usdnUsdtLPTCI)
162163 [LPIssue, transfer, updateState]
163164 }
164165 else throw("Strict value is not equal to itself.")
165166 }
166167 }
167168
168169
169170
170171 @Callable(i)
171172 func depositEthUsdnLP () = {
172173 let pmt = value(i.payments[0])
173174 let pmtAmount = pmt.amount
174175 if ((pmt.assetId != ethUsdnLP))
175176 then throw("attach ETHUSDNLP tokens only")
176177 else if (isStopped)
177178 then throw("smart contract is on lock")
178179 else {
179180 let tkStaked = valueOrElse(getInteger(this, keyEthUsdn), 0)
180181 let totalIssued = match assetInfo(ethUsdnLPTCI) {
181182 case asset: Asset =>
182183 asset.quantity
183184 case _ =>
184185 throw("Can't find asset")
185186 }
186187 let toIssue = (pmtAmount * ((totalIssued - assetBalance(this, ethUsdnLPTCI)) / tkStaked))
187188 let updateState = IntegerEntry(keyEthUsdn, (tkStaked + pmtAmount))
188189 let LPstake = invoke(Address(base58'3Mx3zmXrMcLFCafMuPtXAzR4ZPVeZYb6qLz'), "stake", nil, [pmt])
189190 if ((LPstake == LPstake))
190191 then {
191192 let LPIssue = Reissue(ethUsdnLPTCI, toIssue, true)
192193 let transfer = ScriptTransfer(i.caller, toIssue, ethUsdnLPTCI)
193194 [LPIssue, transfer, updateState]
194195 }
195196 else throw("Strict value is not equal to itself.")
196197 }
197198 }
198199
199200
200201
201202 @Callable(i)
202203 func compoundBTCUSDNLP () = {
203204 let compound = value(i.payments[0])
204205 let ca = compound.amount
205206 if ((compound.assetId != btcUsdnLP))
206207 then throw("attach BTCUSDNLP tokens only")
207208 else {
208209 let fromCompound = valueOrElse(getInteger(this, keyBtcUsdnCompound), 0)
209210 let totalStaked = valueOrElse(getInteger(this, keyBtcUsdn), 0)
210211 let stakeC = invoke(Address(base58'3Mx3zmXrMcLFCafMuPtXAzR4ZPVeZYb6qLz'), "stake", nil, [compound])
211212 if ((stakeC == stakeC))
212213 then {
213214 let updateState = IntegerEntry(keyBtcUsdn, (totalStaked + ca))
214215 let tc = IntegerEntry(keyBtcUsdnCompound, (fromCompound + ca))
215216 [updateState, tc]
216217 }
217218 else throw("Strict value is not equal to itself.")
218219 }
219220 }
220221
221222
222223
223224 @Callable(i)
224225 func compoundETHUSDNLP () = {
225226 let compound = value(i.payments[0])
226227 let ca = compound.amount
227228 if ((compound.assetId != ethUsdnLP))
228229 then throw("attach ETHUSDNLP tokens only")
229230 else {
230231 let fromCompound = valueOrElse(getInteger(this, keyEthUsdnCompound), 0)
231232 let totalStaked = valueOrElse(getInteger(this, keyEthUsdn), 0)
232233 let stakeC = invoke(Address(base58'3Mx3zmXrMcLFCafMuPtXAzR4ZPVeZYb6qLz'), "stake", nil, [compound])
233234 if ((stakeC == stakeC))
234235 then {
235236 let updateState = IntegerEntry(keyEthUsdn, (totalStaked + ca))
236237 let tc = IntegerEntry(keyEthUsdnCompound, (fromCompound + ca))
237238 [updateState, tc]
238239 }
239240 else throw("Strict value is not equal to itself.")
240241 }
241242 }
242243
243244
244245
245246 @Callable(i)
246247 func compoundWXUSDNLP () = {
247248 let compound = value(i.payments[0])
248249 let ca = compound.amount
249250 if ((compound.assetId != wxUsdnLP))
250251 then throw("attach WXUSDNLP tokens only")
251252 else {
252253 let fromCompound = valueOrElse(getInteger(this, keywxUsdnCompound), 0)
253254 let totalStaked = valueOrElse(getInteger(this, keyWXUSDN), 0)
254255 let stakeC = invoke(Address(base58'3Mx3zmXrMcLFCafMuPtXAzR4ZPVeZYb6qLz'), "stake", nil, [compound])
255256 if ((stakeC == stakeC))
256257 then {
257258 let updateState = IntegerEntry(keyWXUSDN, (totalStaked + ca))
258259 let tc = IntegerEntry(keywxUsdnCompound, (fromCompound + ca))
259260 [updateState, tc]
260261 }
261262 else throw("Strict value is not equal to itself.")
262263 }
263264 }
264265
265266
266267
267268 @Callable(i)
268269 func compoundUSDTUSDNLP () = {
269270 let compound = value(i.payments[0])
270271 let ca = compound.amount
271272 if ((compound.assetId != usdnUsdt))
272273 then throw("attach USDTUSDNLP tokens only")
273274 else {
274275 let fromCompound = valueOrElse(getInteger(this, keyUsdtUsdnCompound), 0)
275276 let totalStaked = valueOrElse(getInteger(this, keyUsdtUsdn), 0)
276277 let stakeC = invoke(Address(base58'3Mx3zmXrMcLFCafMuPtXAzR4ZPVeZYb6qLz'), "stake", nil, [compound])
277278 if ((stakeC == stakeC))
278279 then {
279280 let updateState = IntegerEntry(keyUsdtUsdn, (totalStaked + ca))
280281 let tc = IntegerEntry(keyUsdtUsdnCompound, (fromCompound + ca))
281282 [updateState, tc]
282283 }
283284 else throw("Strict value is not equal to itself.")
284285 }
285286 }
286287
287288
288289
289290 @Callable(i)
290291 func compoundWAVESUSDNLP () = {
291292 let compound = value(i.payments[0])
292293 let ca = compound.amount
293294 if ((compound.assetId != wavesUsdnLp))
294295 then throw("attach WAVESUSDNLP tokens only")
295296 else {
296297 let fromCompound = valueOrElse(getInteger(this, keyWavesCompound), 0)
297298 let totalStaked = valueOrElse(getInteger(this, keyWAVESUSDN), 0)
298299 let stakeC = invoke(Address(base58'3Mx3zmXrMcLFCafMuPtXAzR4ZPVeZYb6qLz'), "stake", nil, [compound])
299300 if ((stakeC == stakeC))
300301 then {
301302 let updateState = IntegerEntry(keyWAVESUSDN, (totalStaked + ca))
302303 let tc = IntegerEntry(keyWavesCompound, (fromCompound + ca))
303304 [updateState, tc]
304305 }
305306 else throw("Strict value is not equal to itself.")
306307 }
307308 }
308309
309310
310311
311312 @Callable(i)
312313 func initWX () = {
313314 let pm = value(i.payments[0])
314315 let am = pm.amount
315316 if ((pm.assetId != wxUsdnLP))
316317 then throw("Unexpected token")
317318 else {
318319 let s = invoke(Address(base58'3Mx3zmXrMcLFCafMuPtXAzR4ZPVeZYb6qLz'), "stake", nil, [pm])
319320 if ((s == s))
320321 then {
321322 let upd = IntegerEntry(keyWXUSDN, am)
322323 let updK = IntegerEntry(keywxUsdnCompound, 0)
323324 [upd, updK]
324325 }
325326 else throw("Strict value is not equal to itself.")
326327 }
327328 }
328329
329330
330331
331332 @Callable(i)
332333 func initWAVES () = {
333334 let pm = value(i.payments[0])
334335 let am = pm.amount
335336 if ((pm.assetId != wavesUsdnLp))
336337 then throw("Unexpected token")
337338 else {
338339 let s = invoke(Address(base58'3Mx3zmXrMcLFCafMuPtXAzR4ZPVeZYb6qLz'), "stake", nil, [pm])
339340 if ((s == s))
340341 then {
341342 let upd = IntegerEntry(keyWAVESUSDN, am)
342343 let updK = IntegerEntry(keyWavesCompound, 0)
343344 [upd, updK]
344345 }
345346 else throw("Strict value is not equal to itself.")
346347 }
347348 }
348349
349350
350351
351352 @Callable(i)
352353 func initETH () = {
353354 let pm = value(i.payments[0])
354355 let am = pm.amount
355356 if ((pm.assetId != ethUsdnLP))
356357 then throw("Unexpected token")
357358 else {
358359 let s = invoke(Address(base58'3Mx3zmXrMcLFCafMuPtXAzR4ZPVeZYb6qLz'), "stake", nil, [pm])
359360 if ((s == s))
360361 then {
361362 let upd = IntegerEntry(keyEthUsdn, am)
362363 let updK = IntegerEntry(keyEthUsdnCompound, 0)
363364 let issue = Reissue(ethUsdnLPTCI, am, true)
364365 let send = ScriptTransfer(i.caller, am, ethUsdnLPTCI)
365366 [upd, updK, issue, send]
366367 }
367368 else throw("Strict value is not equal to itself.")
368369 }
369370 }
370371
371372
372373
373374 @Callable(i)
374375 func initBTC () = {
375376 let pm = value(i.payments[0])
376377 let am = pm.amount
377378 if ((pm.assetId != btcUsdnLP))
378379 then throw("Unexpected token")
379380 else {
380381 let s = invoke(Address(base58'3Mx3zmXrMcLFCafMuPtXAzR4ZPVeZYb6qLz'), "stake", nil, [pm])
381382 if ((s == s))
382383 then {
383384 let upd = IntegerEntry(keyBtcUsdn, am)
384385 let updK = IntegerEntry(keyBtcUsdnCompound, 0)
385386 let LPIssue = Reissue(btcUsdnLPTCI, am, true)
386387 let tr = ScriptTransfer(i.caller, am, btcUsdnLPTCI)
387388 [upd, updK, LPIssue, tr]
388389 }
389390 else throw("Strict value is not equal to itself.")
390391 }
391392 }
392393
393394
394395 @Verifier(tx)
395396 func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
396397

github/deemru/w8io/026f985 
43.14 ms