tx · 5HhAwVotTmKjHeffwqu8ffJKxcq4ZggZgAKmZUgoVmzq

3N8n6BtTBKRZBoPuMzaPBH9FyJhfv9xDFJH:  -0.01700000 Waves

2022.07.12 10:59 [2136248] smart account 3N8n6BtTBKRZBoPuMzaPBH9FyJhfv9xDFJH > SELF 0.00000000 Waves

{ "type": 13, "id": "5HhAwVotTmKjHeffwqu8ffJKxcq4ZggZgAKmZUgoVmzq", "fee": 1700000, "feeAssetId": null, "timestamp": 1657612816016, "version": 2, "chainId": 84, "sender": "3N8n6BtTBKRZBoPuMzaPBH9FyJhfv9xDFJH", "senderPublicKey": "4hcnYaYoB2XaCzyJ7wfePpG7EfTd6st6aCAhkskJ9cQ5", "proofs": [ "2tbo4vMXu7QtRcMNAwZURveCTS1BM7KdBZSmhiKizDpqXtmJQgAMks4rGuww47aTicCRpu2iBMBvCqav13sECjXC" ], "script": "base64:AAIFAAAAAAAAAB4IAhIAEgASABIAEgASABIAEgASABIAEgASABIAEgAAAAAVAAAAAAh1c2RuVXNkdAEAAAAg202DNWRHG5bvnwwvoM991XmdkujhmzUPwT/MewJwKQsAAAAADXVzZG5Vc2R0TFBUQ0kBAAAAIAqBzantQGEdmEq4Oth6BGhTCCbAyZjxYcEpfvod3iryAAAAAAh3eFVzZG5MUAEAAAAgG7mhj3vOTKXN+s5HyQsWjk32W97C65PB1sWo0bGqCxwAAAAAC3d4VXNkbkxQVENJAQAAACC37N3mGwJ72rYTh/1V0NY8tseiNz1LiL3Be29IRACYLwAAAAALd2F2ZXNVc2RuTHABAAAAINUKknePcghEmMkNN/IegHNiilmrJ+abeEGdbsH03iJ2AAAAAA53YXZlc1VzZG5MUFRDSQEAAAAgxRp2zzmtZIv1fW7qZyCOpdLB08oGyQGtTSaCWHrWElkAAAAACWV0aFVzZG5MUAEAAAAgf0Ew/c/5+Zy9fq7UHSNMMuNJS4SB4kp3y/IQBPX7+eEAAAAADGV0aFVzZG5MUFRDSQEAAAAg4e0WyvKtIAu2EMEK2Ns8J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ZWdlckVudHJ5AAAAAgUAAAASa2V5QnRjVXNkbkNvbXBvdW5kAAAAAAAAAAAABAAAAAdMUElzc3VlCQEAAAAHUmVpc3N1ZQAAAAMFAAAADGJ0Y1VzZG5MUFRDSQUAAAACYW0GBAAAAAJ0cgkBAAAADlNjcmlwdFRyYW5zZmVyAAAAAwgFAAAAAWkAAAAGY2FsbGVyBQAAAAJhbQUAAAAMYnRjVXNkbkxQVENJCQAETAAAAAIFAAAAA3VwZAkABEwAAAACBQAAAAR1cGRLCQAETAAAAAIFAAAAB0xQSXNzdWUJAARMAAAAAgUAAAACdHIFAAAAA25pbAkAAAIAAAABAgAAACRTdHJpY3QgdmFsdWUgaXMgbm90IGVxdWFsIHRvIGl0c2VsZi4AAAABAAAAAnR4AQAAAAZ2ZXJpZnkAAAAACQAB9AAAAAMIBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAAgFAAAAAnR4AAAAD3NlbmRlclB1YmxpY0tleXuKHqA=", "height": 2136248, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 75G5dLJ2XDaeJs1wA7jUbntu4rqKrpf1yiQRFoq2KCJc Next: 6jmXJHpXx2K6YY2uUoaf5a5wYZ2mVbK4UdrB3MNnkZ5A Diff:
OldNewDifferences
5959 case _ =>
6060 throw("Can't find asset")
6161 }
62- let toIssue = (pmtAmount * ((totalIssued - assetBalance(this, btcUsdnLPTCI)) / tkStaked))
62+ let one = fraction((totalIssued - assetBalance(this, btcUsdnLPTCI)), 100000000, tkStaked)
63+ let toIssue = fraction(pmtAmount, one, 100000000)
6364 let updateState = IntegerEntry(keyBtcUsdn, (tkStaked + pmtAmount))
6465 let LPstake = invoke(Address(base58'3Mx3zmXrMcLFCafMuPtXAzR4ZPVeZYb6qLz'), "stake", nil, [pmt])
6566 if ((LPstake == LPstake))
9091 case _ =>
9192 throw("Can't find asset")
9293 }
93- let toIssue = (pmtAmount * (totalIssued / tkStaked))
94+ let one = fraction(totalIssued, 100000000, tkStaked)
95+ let toIssue = fraction(pmtAmount, one, 100000000)
9496 let updateState = IntegerEntry(keyWAVESUSDN, (tkStaked + pmtAmount))
9597 let LPstake = invoke(Address(base58'3Mx3zmXrMcLFCafMuPtXAzR4ZPVeZYb6qLz'), "stake", nil, [pmt])
9698 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 }
62- let toIssue = (pmtAmount * ((totalIssued - assetBalance(this, btcUsdnLPTCI)) / tkStaked))
62+ let one = fraction((totalIssued - assetBalance(this, btcUsdnLPTCI)), 100000000, tkStaked)
63+ let toIssue = fraction(pmtAmount, one, 100000000)
6364 let updateState = IntegerEntry(keyBtcUsdn, (tkStaked + pmtAmount))
6465 let LPstake = invoke(Address(base58'3Mx3zmXrMcLFCafMuPtXAzR4ZPVeZYb6qLz'), "stake", nil, [pmt])
6566 if ((LPstake == LPstake))
6667 then {
6768 let LPIssue = Reissue(btcUsdnLPTCI, toIssue, true)
6869 let transfer = ScriptTransfer(i.caller, toIssue, btcUsdnLPTCI)
6970 [LPIssue, transfer, updateState]
7071 }
7172 else throw("Strict value is not equal to itself.")
7273 }
7374 }
7475
7576
7677
7778 @Callable(i)
7879 func depositWavesUsdnLP () = {
7980 let pmt = value(i.payments[0])
8081 let pmtAmount = pmt.amount
8182 if ((pmt.assetId != wavesUsdnLp))
8283 then throw("attach WAVESUSDNLP tokens only")
8384 else if (isStopped)
8485 then throw("smart contract is on lock")
8586 else {
8687 let tkStaked = valueOrElse(getInteger(this, keyWAVESUSDN), 0)
8788 let totalIssued = match assetInfo(wavesUsdnLPTCI) {
8889 case asset: Asset =>
8990 asset.quantity
9091 case _ =>
9192 throw("Can't find asset")
9293 }
93- let toIssue = (pmtAmount * (totalIssued / tkStaked))
94+ let one = fraction(totalIssued, 100000000, tkStaked)
95+ let toIssue = fraction(pmtAmount, one, 100000000)
9496 let updateState = IntegerEntry(keyWAVESUSDN, (tkStaked + pmtAmount))
9597 let LPstake = invoke(Address(base58'3Mx3zmXrMcLFCafMuPtXAzR4ZPVeZYb6qLz'), "stake", nil, [pmt])
9698 if ((LPstake == LPstake))
9799 then {
98100 let LPIssue = Reissue(wavesUsdnLPTCI, toIssue, true)
99101 let transfer = ScriptTransfer(i.caller, toIssue, wavesUsdnLPTCI)
100102 [LPIssue, transfer, updateState]
101103 }
102104 else throw("Strict value is not equal to itself.")
103105 }
104106 }
105107
106108
107109
108110 @Callable(i)
109111 func depositWxUsdnLP () = {
110112 let pmt = value(i.payments[0])
111113 let pmtAmount = pmt.amount
112114 if ((pmt.assetId != wxUsdnLP))
113115 then throw("attach WXUSDNLP tokens only")
114116 else if (isStopped)
115117 then throw("smart contract is on lock")
116118 else {
117119 let tkStaked = valueOrElse(getInteger(this, keyWXUSDN), 0)
118120 let totalIssued = match assetInfo(wxUsdnLPTCI) {
119121 case asset: Asset =>
120122 asset.quantity
121123 case _ =>
122124 throw("Can't find asset")
123125 }
124126 let one = fraction(totalIssued, 100000000, tkStaked)
125127 let toIssue = fraction(pmtAmount, one, 100000000)
126128 let updateState = IntegerEntry(keyWXUSDN, (tkStaked + pmtAmount))
127129 let LPstake = invoke(Address(base58'3Mx3zmXrMcLFCafMuPtXAzR4ZPVeZYb6qLz'), "stake", nil, [pmt])
128130 if ((LPstake == LPstake))
129131 then {
130132 let LPIssue = Reissue(wxUsdnLPTCI, toIssue, true)
131133 let transfer = ScriptTransfer(i.caller, toIssue, wxUsdnLPTCI)
132134 [LPIssue, transfer, updateState]
133135 }
134136 else throw("Strict value is not equal to itself.")
135137 }
136138 }
137139
138140
139141
140142 @Callable(i)
141143 func depositUsdtUsdnLP () = {
142144 let pmt = value(i.payments[0])
143145 let pmtAmount = pmt.amount
144146 if ((pmt.assetId != usdnUsdt))
145147 then throw("attach USDTUSDNLP tokens only")
146148 else if (isStopped)
147149 then throw("smart contract is on lock")
148150 else {
149151 let tkStaked = valueOrElse(getInteger(this, keyUsdtUsdn), 0)
150152 let totalIssued = match assetInfo(usdnUsdtLPTCI) {
151153 case asset: Asset =>
152154 asset.quantity
153155 case _ =>
154156 throw("Can't find asset")
155157 }
156158 let toIssue = (pmtAmount * (totalIssued / tkStaked))
157159 let updateState = IntegerEntry(keyUsdtUsdn, (tkStaked + pmtAmount))
158160 let LPstake = invoke(Address(base58'3Mx3zmXrMcLFCafMuPtXAzR4ZPVeZYb6qLz'), "stake", nil, [pmt])
159161 if ((LPstake == LPstake))
160162 then {
161163 let LPIssue = Reissue(usdnUsdtLPTCI, toIssue, true)
162164 let transfer = ScriptTransfer(i.caller, toIssue, usdnUsdtLPTCI)
163165 [LPIssue, transfer, updateState]
164166 }
165167 else throw("Strict value is not equal to itself.")
166168 }
167169 }
168170
169171
170172
171173 @Callable(i)
172174 func depositEthUsdnLP () = {
173175 let pmt = value(i.payments[0])
174176 let pmtAmount = pmt.amount
175177 if ((pmt.assetId != ethUsdnLP))
176178 then throw("attach ETHUSDNLP tokens only")
177179 else if (isStopped)
178180 then throw("smart contract is on lock")
179181 else {
180182 let tkStaked = valueOrElse(getInteger(this, keyEthUsdn), 0)
181183 let totalIssued = match assetInfo(ethUsdnLPTCI) {
182184 case asset: Asset =>
183185 asset.quantity
184186 case _ =>
185187 throw("Can't find asset")
186188 }
187189 let toIssue = (pmtAmount * ((totalIssued - assetBalance(this, ethUsdnLPTCI)) / tkStaked))
188190 let updateState = IntegerEntry(keyEthUsdn, (tkStaked + pmtAmount))
189191 let LPstake = invoke(Address(base58'3Mx3zmXrMcLFCafMuPtXAzR4ZPVeZYb6qLz'), "stake", nil, [pmt])
190192 if ((LPstake == LPstake))
191193 then {
192194 let LPIssue = Reissue(ethUsdnLPTCI, toIssue, true)
193195 let transfer = ScriptTransfer(i.caller, toIssue, ethUsdnLPTCI)
194196 [LPIssue, transfer, updateState]
195197 }
196198 else throw("Strict value is not equal to itself.")
197199 }
198200 }
199201
200202
201203
202204 @Callable(i)
203205 func compoundBTCUSDNLP () = {
204206 let compound = value(i.payments[0])
205207 let ca = compound.amount
206208 if ((compound.assetId != btcUsdnLP))
207209 then throw("attach BTCUSDNLP tokens only")
208210 else {
209211 let fromCompound = valueOrElse(getInteger(this, keyBtcUsdnCompound), 0)
210212 let totalStaked = valueOrElse(getInteger(this, keyBtcUsdn), 0)
211213 let stakeC = invoke(Address(base58'3Mx3zmXrMcLFCafMuPtXAzR4ZPVeZYb6qLz'), "stake", nil, [compound])
212214 if ((stakeC == stakeC))
213215 then {
214216 let updateState = IntegerEntry(keyBtcUsdn, (totalStaked + ca))
215217 let tc = IntegerEntry(keyBtcUsdnCompound, (fromCompound + ca))
216218 [updateState, tc]
217219 }
218220 else throw("Strict value is not equal to itself.")
219221 }
220222 }
221223
222224
223225
224226 @Callable(i)
225227 func compoundETHUSDNLP () = {
226228 let compound = value(i.payments[0])
227229 let ca = compound.amount
228230 if ((compound.assetId != ethUsdnLP))
229231 then throw("attach ETHUSDNLP tokens only")
230232 else {
231233 let fromCompound = valueOrElse(getInteger(this, keyEthUsdnCompound), 0)
232234 let totalStaked = valueOrElse(getInteger(this, keyEthUsdn), 0)
233235 let stakeC = invoke(Address(base58'3Mx3zmXrMcLFCafMuPtXAzR4ZPVeZYb6qLz'), "stake", nil, [compound])
234236 if ((stakeC == stakeC))
235237 then {
236238 let updateState = IntegerEntry(keyEthUsdn, (totalStaked + ca))
237239 let tc = IntegerEntry(keyEthUsdnCompound, (fromCompound + ca))
238240 [updateState, tc]
239241 }
240242 else throw("Strict value is not equal to itself.")
241243 }
242244 }
243245
244246
245247
246248 @Callable(i)
247249 func compoundWXUSDNLP () = {
248250 let compound = value(i.payments[0])
249251 let ca = compound.amount
250252 if ((compound.assetId != wxUsdnLP))
251253 then throw("attach WXUSDNLP tokens only")
252254 else {
253255 let fromCompound = valueOrElse(getInteger(this, keywxUsdnCompound), 0)
254256 let totalStaked = valueOrElse(getInteger(this, keyWXUSDN), 0)
255257 let stakeC = invoke(Address(base58'3Mx3zmXrMcLFCafMuPtXAzR4ZPVeZYb6qLz'), "stake", nil, [compound])
256258 if ((stakeC == stakeC))
257259 then {
258260 let updateState = IntegerEntry(keyWXUSDN, (totalStaked + ca))
259261 let tc = IntegerEntry(keywxUsdnCompound, (fromCompound + ca))
260262 [updateState, tc]
261263 }
262264 else throw("Strict value is not equal to itself.")
263265 }
264266 }
265267
266268
267269
268270 @Callable(i)
269271 func compoundUSDTUSDNLP () = {
270272 let compound = value(i.payments[0])
271273 let ca = compound.amount
272274 if ((compound.assetId != usdnUsdt))
273275 then throw("attach USDTUSDNLP tokens only")
274276 else {
275277 let fromCompound = valueOrElse(getInteger(this, keyUsdtUsdnCompound), 0)
276278 let totalStaked = valueOrElse(getInteger(this, keyUsdtUsdn), 0)
277279 let stakeC = invoke(Address(base58'3Mx3zmXrMcLFCafMuPtXAzR4ZPVeZYb6qLz'), "stake", nil, [compound])
278280 if ((stakeC == stakeC))
279281 then {
280282 let updateState = IntegerEntry(keyUsdtUsdn, (totalStaked + ca))
281283 let tc = IntegerEntry(keyUsdtUsdnCompound, (fromCompound + ca))
282284 [updateState, tc]
283285 }
284286 else throw("Strict value is not equal to itself.")
285287 }
286288 }
287289
288290
289291
290292 @Callable(i)
291293 func compoundWAVESUSDNLP () = {
292294 let compound = value(i.payments[0])
293295 let ca = compound.amount
294296 if ((compound.assetId != wavesUsdnLp))
295297 then throw("attach WAVESUSDNLP tokens only")
296298 else {
297299 let fromCompound = valueOrElse(getInteger(this, keyWavesCompound), 0)
298300 let totalStaked = valueOrElse(getInteger(this, keyWAVESUSDN), 0)
299301 let stakeC = invoke(Address(base58'3Mx3zmXrMcLFCafMuPtXAzR4ZPVeZYb6qLz'), "stake", nil, [compound])
300302 if ((stakeC == stakeC))
301303 then {
302304 let updateState = IntegerEntry(keyWAVESUSDN, (totalStaked + ca))
303305 let tc = IntegerEntry(keyWavesCompound, (fromCompound + ca))
304306 [updateState, tc]
305307 }
306308 else throw("Strict value is not equal to itself.")
307309 }
308310 }
309311
310312
311313
312314 @Callable(i)
313315 func initWX () = {
314316 let pm = value(i.payments[0])
315317 let am = pm.amount
316318 if ((pm.assetId != wxUsdnLP))
317319 then throw("Unexpected token")
318320 else {
319321 let s = invoke(Address(base58'3Mx3zmXrMcLFCafMuPtXAzR4ZPVeZYb6qLz'), "stake", nil, [pm])
320322 if ((s == s))
321323 then {
322324 let upd = IntegerEntry(keyWXUSDN, am)
323325 let updK = IntegerEntry(keywxUsdnCompound, 0)
324326 [upd, updK]
325327 }
326328 else throw("Strict value is not equal to itself.")
327329 }
328330 }
329331
330332
331333
332334 @Callable(i)
333335 func initWAVES () = {
334336 let pm = value(i.payments[0])
335337 let am = pm.amount
336338 if ((pm.assetId != wavesUsdnLp))
337339 then throw("Unexpected token")
338340 else {
339341 let s = invoke(Address(base58'3Mx3zmXrMcLFCafMuPtXAzR4ZPVeZYb6qLz'), "stake", nil, [pm])
340342 if ((s == s))
341343 then {
342344 let upd = IntegerEntry(keyWAVESUSDN, am)
343345 let updK = IntegerEntry(keyWavesCompound, 0)
344346 [upd, updK]
345347 }
346348 else throw("Strict value is not equal to itself.")
347349 }
348350 }
349351
350352
351353
352354 @Callable(i)
353355 func initETH () = {
354356 let pm = value(i.payments[0])
355357 let am = pm.amount
356358 if ((pm.assetId != ethUsdnLP))
357359 then throw("Unexpected token")
358360 else {
359361 let s = invoke(Address(base58'3Mx3zmXrMcLFCafMuPtXAzR4ZPVeZYb6qLz'), "stake", nil, [pm])
360362 if ((s == s))
361363 then {
362364 let upd = IntegerEntry(keyEthUsdn, am)
363365 let updK = IntegerEntry(keyEthUsdnCompound, 0)
364366 let issue = Reissue(ethUsdnLPTCI, am, true)
365367 let send = ScriptTransfer(i.caller, am, ethUsdnLPTCI)
366368 [upd, updK, issue, send]
367369 }
368370 else throw("Strict value is not equal to itself.")
369371 }
370372 }
371373
372374
373375
374376 @Callable(i)
375377 func initBTC () = {
376378 let pm = value(i.payments[0])
377379 let am = pm.amount
378380 if ((pm.assetId != btcUsdnLP))
379381 then throw("Unexpected token")
380382 else {
381383 let s = invoke(Address(base58'3Mx3zmXrMcLFCafMuPtXAzR4ZPVeZYb6qLz'), "stake", nil, [pm])
382384 if ((s == s))
383385 then {
384386 let upd = IntegerEntry(keyBtcUsdn, am)
385387 let updK = IntegerEntry(keyBtcUsdnCompound, 0)
386388 let LPIssue = Reissue(btcUsdnLPTCI, am, true)
387389 let tr = ScriptTransfer(i.caller, am, btcUsdnLPTCI)
388390 [upd, updK, LPIssue, tr]
389391 }
390392 else throw("Strict value is not equal to itself.")
391393 }
392394 }
393395
394396
395397 @Verifier(tx)
396398 func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
397399

github/deemru/w8io/026f985 
59.97 ms