tx · 75G5dLJ2XDaeJs1wA7jUbntu4rqKrpf1yiQRFoq2KCJc

3N8n6BtTBKRZBoPuMzaPBH9FyJhfv9xDFJH:  -0.01700000 Waves

2022.07.12 10:40 [2136231] smart account 3N8n6BtTBKRZBoPuMzaPBH9FyJhfv9xDFJH > SELF 0.00000000 Waves

{ "type": 13, "id": "75G5dLJ2XDaeJs1wA7jUbntu4rqKrpf1yiQRFoq2KCJc", "fee": 1700000, "feeAssetId": null, "timestamp": 1657611616024, "version": 2, "chainId": 84, "sender": "3N8n6BtTBKRZBoPuMzaPBH9FyJhfv9xDFJH", "senderPublicKey": "4hcnYaYoB2XaCzyJ7wfePpG7EfTd6st6aCAhkskJ9cQ5", "proofs": [ "4fztteTFicPyy7sDaS9np5daFWznSeM253DH8nckEXV5CqDcoGZKfy7jTErbictTrkdqpqMMVDNi3W9VafcSsWSD" ], "script": "base64:AAIFAAAAAAAAAB4IAhIAEgASABIAEgASABIAEgASABIAEgASABIAEgAAAAAVAAAAAAh1c2RuVXNkdAEAAAAg202DNWRHG5bvnwwvoM991XmdkujhmzUPwT/MewJwKQsAAAAADXVzZG5Vc2R0TFBUQ0kBAAAAIAqBzantQGEdmEq4Oth6BGhTCCbAyZjxYcEpfvod3iryAAAAAAh3eFVzZG5MUAEAAAAgG7mhj3vOTKXN+s5HyQsWjk32W97C65PB1sWo0bGqCxwAAAAAC3d4VXNkbkxQVENJAQAAACC37N3mGwJ72rYTh/1V0NY8tseiNz1LiL3Be29IRACYLwAAAAALd2F2ZXNVc2RuTHABAAAAINUKknePcghEmMkNN/IegHNiilmrJ+abeEGdbsH03iJ2AAAAAA53YXZlc1VzZG5MUFRDSQEAAAAgxRp2zzmtZIv1fW7qZyCOpdLB08oGyQGtTSaCWHrWElkAAAAACWV0aFVzZG5MUAEAAAAgf0Ew/c/5+Zy9fq7UHSNMMuNJS4SB4kp3y/IQBPX7+eEAAAAADGV0aFVzZG5MUFRDSQEAAAAg4e0WyvKtIAu2EMEK2Ns8J2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AAxidGNVc2RuTFBUQ0kFAAAAAmFtBgQAAAACdHIJAQAAAA5TY3JpcHRUcmFuc2ZlcgAAAAMIBQAAAAFpAAAABmNhbGxlcgUAAAACYW0FAAAADGJ0Y1VzZG5MUFRDSQkABEwAAAACBQAAAAN1cGQJAARMAAAAAgUAAAAEdXBkSwkABEwAAAACBQAAAAdMUElzc3VlCQAETAAAAAIFAAAAAnRyBQAAAANuaWwJAAACAAAAAQIAAAAkU3RyaWN0IHZhbHVlIGlzIG5vdCBlcXVhbCB0byBpdHNlbGYuAAAAAQAAAAJ0eAEAAAAGdmVyaWZ5AAAAAAkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAAIBQAAAAJ0eAAAAA9zZW5kZXJQdWJsaWNLZXnA33N+", "height": 2136231, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: F8v7q2QdSSXmBiUzBLmApArQq7Va3PoAmCoJ6Mo25snM Next: 5HhAwVotTmKjHeffwqu8ffJKxcq4ZggZgAKmZUgoVmzq Diff:
OldNewDifferences
122122 throw("Can't find asset")
123123 }
124124 let one = fraction(totalIssued, 100000000, tkStaked)
125- let toIssue = fraction(totalIssued, tkStaked, 100000000)
125+ let toIssue = fraction(pmtAmount, one, 100000000)
126126 let updateState = IntegerEntry(keyWXUSDN, (tkStaked + pmtAmount))
127127 let LPstake = invoke(Address(base58'3Mx3zmXrMcLFCafMuPtXAzR4ZPVeZYb6qLz'), "stake", nil, [pmt])
128128 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 }
124124 let one = fraction(totalIssued, 100000000, tkStaked)
125- let toIssue = fraction(totalIssued, tkStaked, 100000000)
125+ let toIssue = fraction(pmtAmount, one, 100000000)
126126 let updateState = IntegerEntry(keyWXUSDN, (tkStaked + pmtAmount))
127127 let LPstake = invoke(Address(base58'3Mx3zmXrMcLFCafMuPtXAzR4ZPVeZYb6qLz'), "stake", nil, [pmt])
128128 if ((LPstake == LPstake))
129129 then {
130130 let LPIssue = Reissue(wxUsdnLPTCI, toIssue, true)
131131 let transfer = ScriptTransfer(i.caller, toIssue, wxUsdnLPTCI)
132132 [LPIssue, transfer, updateState]
133133 }
134134 else throw("Strict value is not equal to itself.")
135135 }
136136 }
137137
138138
139139
140140 @Callable(i)
141141 func depositUsdtUsdnLP () = {
142142 let pmt = value(i.payments[0])
143143 let pmtAmount = pmt.amount
144144 if ((pmt.assetId != usdnUsdt))
145145 then throw("attach USDTUSDNLP tokens only")
146146 else if (isStopped)
147147 then throw("smart contract is on lock")
148148 else {
149149 let tkStaked = valueOrElse(getInteger(this, keyUsdtUsdn), 0)
150150 let totalIssued = match assetInfo(usdnUsdtLPTCI) {
151151 case asset: Asset =>
152152 asset.quantity
153153 case _ =>
154154 throw("Can't find asset")
155155 }
156156 let toIssue = (pmtAmount * (totalIssued / tkStaked))
157157 let updateState = IntegerEntry(keyUsdtUsdn, (tkStaked + pmtAmount))
158158 let LPstake = invoke(Address(base58'3Mx3zmXrMcLFCafMuPtXAzR4ZPVeZYb6qLz'), "stake", nil, [pmt])
159159 if ((LPstake == LPstake))
160160 then {
161161 let LPIssue = Reissue(usdnUsdtLPTCI, toIssue, true)
162162 let transfer = ScriptTransfer(i.caller, toIssue, usdnUsdtLPTCI)
163163 [LPIssue, transfer, updateState]
164164 }
165165 else throw("Strict value is not equal to itself.")
166166 }
167167 }
168168
169169
170170
171171 @Callable(i)
172172 func depositEthUsdnLP () = {
173173 let pmt = value(i.payments[0])
174174 let pmtAmount = pmt.amount
175175 if ((pmt.assetId != ethUsdnLP))
176176 then throw("attach ETHUSDNLP tokens only")
177177 else if (isStopped)
178178 then throw("smart contract is on lock")
179179 else {
180180 let tkStaked = valueOrElse(getInteger(this, keyEthUsdn), 0)
181181 let totalIssued = match assetInfo(ethUsdnLPTCI) {
182182 case asset: Asset =>
183183 asset.quantity
184184 case _ =>
185185 throw("Can't find asset")
186186 }
187187 let toIssue = (pmtAmount * ((totalIssued - assetBalance(this, ethUsdnLPTCI)) / tkStaked))
188188 let updateState = IntegerEntry(keyEthUsdn, (tkStaked + pmtAmount))
189189 let LPstake = invoke(Address(base58'3Mx3zmXrMcLFCafMuPtXAzR4ZPVeZYb6qLz'), "stake", nil, [pmt])
190190 if ((LPstake == LPstake))
191191 then {
192192 let LPIssue = Reissue(ethUsdnLPTCI, toIssue, true)
193193 let transfer = ScriptTransfer(i.caller, toIssue, ethUsdnLPTCI)
194194 [LPIssue, transfer, updateState]
195195 }
196196 else throw("Strict value is not equal to itself.")
197197 }
198198 }
199199
200200
201201
202202 @Callable(i)
203203 func compoundBTCUSDNLP () = {
204204 let compound = value(i.payments[0])
205205 let ca = compound.amount
206206 if ((compound.assetId != btcUsdnLP))
207207 then throw("attach BTCUSDNLP tokens only")
208208 else {
209209 let fromCompound = valueOrElse(getInteger(this, keyBtcUsdnCompound), 0)
210210 let totalStaked = valueOrElse(getInteger(this, keyBtcUsdn), 0)
211211 let stakeC = invoke(Address(base58'3Mx3zmXrMcLFCafMuPtXAzR4ZPVeZYb6qLz'), "stake", nil, [compound])
212212 if ((stakeC == stakeC))
213213 then {
214214 let updateState = IntegerEntry(keyBtcUsdn, (totalStaked + ca))
215215 let tc = IntegerEntry(keyBtcUsdnCompound, (fromCompound + ca))
216216 [updateState, tc]
217217 }
218218 else throw("Strict value is not equal to itself.")
219219 }
220220 }
221221
222222
223223
224224 @Callable(i)
225225 func compoundETHUSDNLP () = {
226226 let compound = value(i.payments[0])
227227 let ca = compound.amount
228228 if ((compound.assetId != ethUsdnLP))
229229 then throw("attach ETHUSDNLP tokens only")
230230 else {
231231 let fromCompound = valueOrElse(getInteger(this, keyEthUsdnCompound), 0)
232232 let totalStaked = valueOrElse(getInteger(this, keyEthUsdn), 0)
233233 let stakeC = invoke(Address(base58'3Mx3zmXrMcLFCafMuPtXAzR4ZPVeZYb6qLz'), "stake", nil, [compound])
234234 if ((stakeC == stakeC))
235235 then {
236236 let updateState = IntegerEntry(keyEthUsdn, (totalStaked + ca))
237237 let tc = IntegerEntry(keyEthUsdnCompound, (fromCompound + ca))
238238 [updateState, tc]
239239 }
240240 else throw("Strict value is not equal to itself.")
241241 }
242242 }
243243
244244
245245
246246 @Callable(i)
247247 func compoundWXUSDNLP () = {
248248 let compound = value(i.payments[0])
249249 let ca = compound.amount
250250 if ((compound.assetId != wxUsdnLP))
251251 then throw("attach WXUSDNLP tokens only")
252252 else {
253253 let fromCompound = valueOrElse(getInteger(this, keywxUsdnCompound), 0)
254254 let totalStaked = valueOrElse(getInteger(this, keyWXUSDN), 0)
255255 let stakeC = invoke(Address(base58'3Mx3zmXrMcLFCafMuPtXAzR4ZPVeZYb6qLz'), "stake", nil, [compound])
256256 if ((stakeC == stakeC))
257257 then {
258258 let updateState = IntegerEntry(keyWXUSDN, (totalStaked + ca))
259259 let tc = IntegerEntry(keywxUsdnCompound, (fromCompound + ca))
260260 [updateState, tc]
261261 }
262262 else throw("Strict value is not equal to itself.")
263263 }
264264 }
265265
266266
267267
268268 @Callable(i)
269269 func compoundUSDTUSDNLP () = {
270270 let compound = value(i.payments[0])
271271 let ca = compound.amount
272272 if ((compound.assetId != usdnUsdt))
273273 then throw("attach USDTUSDNLP tokens only")
274274 else {
275275 let fromCompound = valueOrElse(getInteger(this, keyUsdtUsdnCompound), 0)
276276 let totalStaked = valueOrElse(getInteger(this, keyUsdtUsdn), 0)
277277 let stakeC = invoke(Address(base58'3Mx3zmXrMcLFCafMuPtXAzR4ZPVeZYb6qLz'), "stake", nil, [compound])
278278 if ((stakeC == stakeC))
279279 then {
280280 let updateState = IntegerEntry(keyUsdtUsdn, (totalStaked + ca))
281281 let tc = IntegerEntry(keyUsdtUsdnCompound, (fromCompound + ca))
282282 [updateState, tc]
283283 }
284284 else throw("Strict value is not equal to itself.")
285285 }
286286 }
287287
288288
289289
290290 @Callable(i)
291291 func compoundWAVESUSDNLP () = {
292292 let compound = value(i.payments[0])
293293 let ca = compound.amount
294294 if ((compound.assetId != wavesUsdnLp))
295295 then throw("attach WAVESUSDNLP tokens only")
296296 else {
297297 let fromCompound = valueOrElse(getInteger(this, keyWavesCompound), 0)
298298 let totalStaked = valueOrElse(getInteger(this, keyWAVESUSDN), 0)
299299 let stakeC = invoke(Address(base58'3Mx3zmXrMcLFCafMuPtXAzR4ZPVeZYb6qLz'), "stake", nil, [compound])
300300 if ((stakeC == stakeC))
301301 then {
302302 let updateState = IntegerEntry(keyWAVESUSDN, (totalStaked + ca))
303303 let tc = IntegerEntry(keyWavesCompound, (fromCompound + ca))
304304 [updateState, tc]
305305 }
306306 else throw("Strict value is not equal to itself.")
307307 }
308308 }
309309
310310
311311
312312 @Callable(i)
313313 func initWX () = {
314314 let pm = value(i.payments[0])
315315 let am = pm.amount
316316 if ((pm.assetId != wxUsdnLP))
317317 then throw("Unexpected token")
318318 else {
319319 let s = invoke(Address(base58'3Mx3zmXrMcLFCafMuPtXAzR4ZPVeZYb6qLz'), "stake", nil, [pm])
320320 if ((s == s))
321321 then {
322322 let upd = IntegerEntry(keyWXUSDN, am)
323323 let updK = IntegerEntry(keywxUsdnCompound, 0)
324324 [upd, updK]
325325 }
326326 else throw("Strict value is not equal to itself.")
327327 }
328328 }
329329
330330
331331
332332 @Callable(i)
333333 func initWAVES () = {
334334 let pm = value(i.payments[0])
335335 let am = pm.amount
336336 if ((pm.assetId != wavesUsdnLp))
337337 then throw("Unexpected token")
338338 else {
339339 let s = invoke(Address(base58'3Mx3zmXrMcLFCafMuPtXAzR4ZPVeZYb6qLz'), "stake", nil, [pm])
340340 if ((s == s))
341341 then {
342342 let upd = IntegerEntry(keyWAVESUSDN, am)
343343 let updK = IntegerEntry(keyWavesCompound, 0)
344344 [upd, updK]
345345 }
346346 else throw("Strict value is not equal to itself.")
347347 }
348348 }
349349
350350
351351
352352 @Callable(i)
353353 func initETH () = {
354354 let pm = value(i.payments[0])
355355 let am = pm.amount
356356 if ((pm.assetId != ethUsdnLP))
357357 then throw("Unexpected token")
358358 else {
359359 let s = invoke(Address(base58'3Mx3zmXrMcLFCafMuPtXAzR4ZPVeZYb6qLz'), "stake", nil, [pm])
360360 if ((s == s))
361361 then {
362362 let upd = IntegerEntry(keyEthUsdn, am)
363363 let updK = IntegerEntry(keyEthUsdnCompound, 0)
364364 let issue = Reissue(ethUsdnLPTCI, am, true)
365365 let send = ScriptTransfer(i.caller, am, ethUsdnLPTCI)
366366 [upd, updK, issue, send]
367367 }
368368 else throw("Strict value is not equal to itself.")
369369 }
370370 }
371371
372372
373373
374374 @Callable(i)
375375 func initBTC () = {
376376 let pm = value(i.payments[0])
377377 let am = pm.amount
378378 if ((pm.assetId != btcUsdnLP))
379379 then throw("Unexpected token")
380380 else {
381381 let s = invoke(Address(base58'3Mx3zmXrMcLFCafMuPtXAzR4ZPVeZYb6qLz'), "stake", nil, [pm])
382382 if ((s == s))
383383 then {
384384 let upd = IntegerEntry(keyBtcUsdn, am)
385385 let updK = IntegerEntry(keyBtcUsdnCompound, 0)
386386 let LPIssue = Reissue(btcUsdnLPTCI, am, true)
387387 let tr = ScriptTransfer(i.caller, am, btcUsdnLPTCI)
388388 [upd, updK, LPIssue, tr]
389389 }
390390 else throw("Strict value is not equal to itself.")
391391 }
392392 }
393393
394394
395395 @Verifier(tx)
396396 func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
397397

github/deemru/w8io/026f985 
46.01 ms