tx · 4dK6LQXF53babiLS5PGLb2if2X2bSHTN7kkst4rRvJF7

3N8n6BtTBKRZBoPuMzaPBH9FyJhfv9xDFJH:  -0.01500000 Waves

2022.07.27 12:57 [2158075] smart account 3N8n6BtTBKRZBoPuMzaPBH9FyJhfv9xDFJH > SELF 0.00000000 Waves

{ "type": 13, "id": "4dK6LQXF53babiLS5PGLb2if2X2bSHTN7kkst4rRvJF7", "fee": 1500000, "feeAssetId": null, "timestamp": 1658915869119, "version": 2, "chainId": 84, "sender": "3N8n6BtTBKRZBoPuMzaPBH9FyJhfv9xDFJH", "senderPublicKey": "4hcnYaYoB2XaCzyJ7wfePpG7EfTd6st6aCAhkskJ9cQ5", "proofs": [ "5CnWmhGEnCyFoyBH6eyaQoWT2hKyKu1egSrQ3pGPYqQmwF9xJ5gcYTRq8A6GWqsYacXQfZK2e9cWWdNH2Wq2BH2o" ], "script": "base64:BgIgCAISABIAEgASABIAEgASABIAEgASABIAEgASABIAEgAdAAp1c2R0VXNkbkxQASDbTYM1ZEcblu+fDC+gz33VeZ2S6OGbNQ/BP8x7AnApCwANdXNkdFVzZG5MUFRDSQEgCoHNqe1AYR2YSrg62HoEaFMIJsDJmPFhwSl++h3eKvIACHd4VXNkbkxQASAbuaGPe85Mpc36zkfJCxaOTfZb3sLrk8HWxajRsaoLHAALd3hVc2RuTFBUQ0kBILfs3eYbAnvathOH/VXQ1jy2x6I3PUuIvcF7b0hEAJgvAAp1c2RjVXNkbkxQASADaQH8GwqYCojNj/4RWYWFJpEys1qS/CbpSF3Tn95cdgANdXNkY1VzZG5MUFRDSQEg9gI33dOf74ZFL1wjRw+VX9E6baErwqe0m1RBB1L1bsYACnVzZGNVc2R0TFABIMb4pHQbVkhWEJ+QfsIz9DFriwRKLCv9mUuH9YWbfOSMAA11c2RjVXNkdExQVENJASACxoV8BEszx+Lvh2eHUvtVgv2z34QjtqBaxTXdz1dK/gAMcHV6emxlVXNkbkxQASDDM8Z0ziOqpCLfSSTlxJlreASwd1aC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gECJFN0cmljdCB2YWx1ZSBpcyBub3QgZXF1YWwgdG8gaXRzZWxmLgFpAQZpbml0V1gABAJwbQkBBXZhbHVlAQkAkQMCCAUBaQhwYXltZW50cwAABAJhbQgFAnBtBmFtb3VudAMJAQIhPQIIBQJwbQdhc3NldElkBQh3eFVzZG5MUAkAAgECEFVuZXhwZWN0ZWQgdG9rZW4EAXMJAPwHBAkBB0FkZHJlc3MBARoBVFlAJ5NrSynuvrGhDubcQLjPpI16DOu1DwIFc3Rha2UFA25pbAkAzAgCBQJwbQUDbmlsAwkAAAIFAXMFAXMEA3VwZAkBDEludGVnZXJFbnRyeQIFCWtleVdYVVNETgUCYW0EBHVwZEsJAQxJbnRlZ2VyRW50cnkCBRFrZXl3eFVzZG5Db21wb3VuZAAACQDMCAIFA3VwZAkAzAgCBQR1cGRLBQNuaWwJAAIBAiRTdHJpY3QgdmFsdWUgaXMgbm90IGVxdWFsIHRvIGl0c2VsZi4BAnR4AQZ2ZXJpZnkACQD0AwMIBQJ0eAlib2R5Qnl0ZXMJAJEDAggFAnR4BnByb29mcwAACAUCdHgPc2VuZGVyUHVibGljS2V5E9yFLA==", "height": 2158075, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 8jKD68yjCcXXkBQjusT8gMB6KnkQ6rJKhpUGzSTeziA6 Next: none Diff:
OldNewDifferences
8383
8484
8585 @Callable(i)
86+func initWxtUsdn () = {
87+ let pm = value(i.payments[0])
88+ let am = pm.amount
89+ if ((pm.assetId != wxUsdnLP))
90+ then throw("Unexpected token")
91+ else {
92+ let s = invoke(Address(base58'3Mx3zmXrMcLFCafMuPtXAzR4ZPVeZYb6qLz'), "stake", nil, [pm])
93+ if ((s == s))
94+ then {
95+ let upd = IntegerEntry(keyWXUSDN, am)
96+ let updK = IntegerEntry(keywxUsdnCompound, 0)
97+[upd, updK]
98+ }
99+ else throw("Strict value is not equal to itself.")
100+ }
101+ }
102+
103+
104+
105+@Callable(i)
86106 func withdraw () = {
87107 let payment = value(i.payments[0])
88108 let am = payment.amount
130150 if ((unstake == unstake))
131151 then {
132152 let wxLpFeeTransfer = ScriptTransfer(Address(tw), fee, wxUsdnLP)
133- let wxLpTransfer = ScriptTransfer(i.caller, (am - fee), wxUsdnLP)
153+ let wxLpTransfer = ScriptTransfer(i.caller, (wxLpToWithdraw - fee), wxUsdnLP)
134154 let updateWxLpStaked = IntegerEntry(keyWXUSDN, (wxUsdnStaked - wxLpToWithdraw))
135155 let burnWxLpTci = Burn(wxUsdnLP, am)
136156 if ((burnWxLpTci == burnWxLpTci))
151171 let singleUsdcLP = fraction(usdcUsdnTCI, def, usdcUsdnStaked)
152172 let usdcLpToWithdraw = fraction(singleUsdcLP, am, def)
153173 let fee = fraction(usdcLpToWithdraw, def, feePerc)
154- let usdcUsdnLPFee = ScriptTransfer(Address(tw), fee, usdcUsdnLP)
155- let usdcUsdnTransfer = ScriptTransfer(i.caller, (am - fee), usdcUsdnLP)
156- let updateUsdcUsdnLpStaked = IntegerEntry(keyUSDCUSDN, (usdcUsdnStaked - usdcLpToWithdraw))
157- let burnUsdcUsdnLpTci = Burn(usdcUsdnLPTCI, am)
158- if ((burnUsdcUsdnLpTci == burnUsdcUsdnLpTci))
159- then [usdcUsdnLPFee, usdcUsdnTransfer, updateUsdcUsdnLpStaked]
174+ let unstake = invoke(Address(base58'3Mx3zmXrMcLFCafMuPtXAzR4ZPVeZYb6qLz'), "unstake", ["2sEBVcyDFK2LupCf7MeA4vzHhGK4DC1WjbKGQCLYDqib", usdcLpToWithdraw], nil)
175+ if ((unstake == unstake))
176+ then {
177+ let usdcUsdnLPFee = ScriptTransfer(Address(tw), fee, usdcUsdnLP)
178+ let usdcUsdnTransfer = ScriptTransfer(i.caller, (am - fee), usdcUsdnLP)
179+ let updateUsdcUsdnLpStaked = IntegerEntry(keyUSDCUSDN, (usdcUsdnStaked - usdcLpToWithdraw))
180+ let burnUsdcUsdnLpTci = Burn(usdcUsdnLPTCI, am)
181+ if ((burnUsdcUsdnLpTci == burnUsdcUsdnLpTci))
182+ then [usdcUsdnLPFee, usdcUsdnTransfer, updateUsdcUsdnLpStaked]
183+ else throw("Strict value is not equal to itself.")
184+ }
160185 else throw("Strict value is not equal to itself.")
161186 }
162187 else if ((id == usdcUsdtLPTCI))
171196 let singleUsdcUsdt = fraction(usdcUsdtTci, def, usdcUsdtStaked)
172197 let usdcUsdtLpToWithdraw = fraction(singleUsdcUsdt, am, def)
173198 let fee = fraction(usdcUsdtLpToWithdraw, def, feePerc)
174- let usdcUsdtLPFee = ScriptTransfer(Address(tw), fee, usdcUsdtLP)
175- let usdcUsdtTransfer = ScriptTransfer(i.caller, (am - fee), usdcUsdtLP)
176- let updateUsdcUsdtLpStaked = IntegerEntry(keyUSDCUSDT, (usdcUsdtStaked - usdcUsdtLpToWithdraw))
177- let burnWxLpTci = Burn(usdcUsdnLPTCI, am)
178- if ((burnWxLpTci == burnWxLpTci))
179- then [usdcUsdtLPFee, usdcUsdtTransfer, updateUsdcUsdtLpStaked]
199+ let unstake = invoke(Address(base58'3Mx3zmXrMcLFCafMuPtXAzR4ZPVeZYb6qLz'), "unstake", ["2sEBVcyDFK2LupCf7MeA4vzHhGK4DC1WjbKGQCLYDqib", usdcUsdtLpToWithdraw], nil)
200+ if ((unstake == unstake))
201+ then {
202+ let usdcUsdtLPFee = ScriptTransfer(Address(tw), fee, usdcUsdtLP)
203+ let usdcUsdtTransfer = ScriptTransfer(i.caller, (usdcUsdtLpToWithdraw - fee), usdcUsdtLP)
204+ let updateUsdcUsdtLpStaked = IntegerEntry(keyUSDCUSDT, (usdcUsdtStaked - usdcUsdtLpToWithdraw))
205+ let burnWxLpTci = Burn(usdcUsdnLPTCI, am)
206+ if ((burnWxLpTci == burnWxLpTci))
207+ then [usdcUsdtLPFee, usdcUsdtTransfer, updateUsdcUsdtLpStaked]
208+ else throw("Strict value is not equal to itself.")
209+ }
180210 else throw("Strict value is not equal to itself.")
181211 }
182212 else if ((id == puzzleUsdnLPTCI))
191221 let singlePuzzleUsdn = fraction(puzzleUsdnTci, def, puzzleLPStaked)
192222 let puzzleUsdnWithdraw = fraction(singlePuzzleUsdn, am, def)
193223 let fee = fraction(puzzleUsdnWithdraw, def, feePerc)
194- let puzzleUsdnLPFee = ScriptTransfer(Address(tw), fee, puzzleUsdnLP)
195- let puzzleUsdnTransfer = ScriptTransfer(i.caller, (am - fee), puzzleUsdnLP)
196- let updatePuzzleUsdnLpStaked = IntegerEntry(keyPUZZLEUSDN, (puzzleLPStaked - puzzleUsdnWithdraw))
197- let burnPuzzleTCI = Burn(puzzleUsdnLPTCI, am)
198- if ((burnPuzzleTCI == burnPuzzleTCI))
199- then [puzzleUsdnLPFee, puzzleUsdnTransfer, updatePuzzleUsdnLpStaked]
224+ let unstake = invoke(Address(base58'3Mx3zmXrMcLFCafMuPtXAzR4ZPVeZYb6qLz'), "unstake", ["2sEBVcyDFK2LupCf7MeA4vzHhGK4DC1WjbKGQCLYDqib", puzzleUsdnWithdraw], nil)
225+ if ((unstake == unstake))
226+ then {
227+ let puzzleUsdnLPFee = ScriptTransfer(Address(tw), fee, puzzleUsdnLP)
228+ let puzzleUsdnTransfer = ScriptTransfer(i.caller, (puzzleUsdnWithdraw - fee), puzzleUsdnLP)
229+ let updatePuzzleUsdnLpStaked = IntegerEntry(keyPUZZLEUSDN, (puzzleLPStaked - puzzleUsdnWithdraw))
230+ let burnPuzzleTCI = Burn(puzzleUsdnLPTCI, am)
231+ if ((burnPuzzleTCI == burnPuzzleTCI))
232+ then [puzzleUsdnLPFee, puzzleUsdnTransfer, updatePuzzleUsdnLpStaked]
233+ else throw("Strict value is not equal to itself.")
234+ }
200235 else throw("Strict value is not equal to itself.")
201236 }
202237 else throw("Invalid asset")
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let usdtUsdnLP = base58'Fm4qczu6Pepz8KUhh3Heb6LeTVfpSMX5vvNgw3x764CS'
55
66 let usdtUsdnLPTCI = base58'i1snzKxSEZVokh9TWj8hTJQEDBsocnL2hRWsSbsMPK7'
77
88 let wxUsdnLP = base58'2sEBVcyDFK2LupCf7MeA4vzHhGK4DC1WjbKGQCLYDqib'
99
1010 let wxUsdnLPTCI = base58'DNy6WBfhPE4y82RonGdHhZEunNotEDzmNfrBomWnsyGi'
1111
1212 let usdcUsdnLP = base58'EK6N7S38xbtBT3SxAqoGdDLCiX6rojX6G169CnSyuE5'
1313
1414 let usdcUsdnLPTCI = base58'HZKFpNfyPG5gt4D6Nfy1zQSg2Ptmqv932GjNTCyBEeKP'
1515
1616 let usdcUsdtLP = base58'EPhdEfmQaNcHyvDmRGhnLhgcJtKZ2a4k3ZBmKWtAEWyH'
1717
1818 let usdcUsdtLPTCI = base58'BqPYkaiz7Le6fFu1rjZ54anrpT57EpvyugZCUqrsjXj'
1919
2020 let puzzleUsdnLP = base58'E8zHu33GfcNyGLypX77gZiUXfvuZQeaYmiEfsy7VYNwP'
2121
2222 let puzzleUsdnLPTCI = base58'Dh9QXSSABE5V6aRfu3mCbDAUokbpE7ER7pbZV6cvyg1A'
2323
2424 let wxId = base58'Atqv59EYzjFGuitKVnMRk6H8FukjoV3ktPorbEys25on'
2525
2626 let keySponsorship = "Sponsorship_in_lock"
2727
2828 let isStopped = false
2929
3030 let keyStaked = "STAKED_LP"
3131
3232 let keyCompound = "From_Compound"
3333
3434 let keywxUsdnCompound = "WX_USDN_compound"
3535
3636 let keyWXUSDN = "WX_USDN"
3737
3838 let keyUsdcUsdnCompound = "USDC_USDN_compound"
3939
4040 let keyUSDCUSDN = "USDC_USDN"
4141
4242 let keyUsdcUsdtCompound = "USDC_USDT_compound"
4343
4444 let keyUSDCUSDT = "USDC_USDT"
4545
4646 let keyPuzzleUsdnCompound = "PUZZLE_USDN_compound"
4747
4848 let keyPUZZLEUSDN = "PUZZLE_USDN"
4949
5050 let def = 100000000
5151
5252 let feePerc = 10000000000
5353
5454 let tw = base58'3Mv7nXq2V2Dnn9oSkB5feRt6RxtqnPiAXNH'
5555
5656 let oracle = base58'3NAVBWBnqieKa3CdN39MAhToyTHShYxX1gB'
5757
5858 let stakePool = "3Mx3zmXrMcLFCafMuPtXAzR4ZPVeZYb6qLz"
5959
6060 func checkAddress (caller) = if ((caller != oracle))
6161 then false
6262 else true
6363
6464
6565 @Callable(i)
6666 func initUsdtUsdn () = {
6767 let pm = value(i.payments[0])
6868 let am = pm.amount
6969 if ((pm.assetId != usdtUsdnLP))
7070 then throw("Unexpected token")
7171 else {
7272 let s = invoke(Address(base58'3Mx3zmXrMcLFCafMuPtXAzR4ZPVeZYb6qLz'), "stake", nil, [pm])
7373 if ((s == s))
7474 then {
7575 let upd = IntegerEntry(keyStaked, am)
7676 let updK = IntegerEntry(keyCompound, 0)
7777 [upd, updK]
7878 }
7979 else throw("Strict value is not equal to itself.")
8080 }
8181 }
8282
8383
8484
8585 @Callable(i)
86+func initWxtUsdn () = {
87+ let pm = value(i.payments[0])
88+ let am = pm.amount
89+ if ((pm.assetId != wxUsdnLP))
90+ then throw("Unexpected token")
91+ else {
92+ let s = invoke(Address(base58'3Mx3zmXrMcLFCafMuPtXAzR4ZPVeZYb6qLz'), "stake", nil, [pm])
93+ if ((s == s))
94+ then {
95+ let upd = IntegerEntry(keyWXUSDN, am)
96+ let updK = IntegerEntry(keywxUsdnCompound, 0)
97+[upd, updK]
98+ }
99+ else throw("Strict value is not equal to itself.")
100+ }
101+ }
102+
103+
104+
105+@Callable(i)
86106 func withdraw () = {
87107 let payment = value(i.payments[0])
88108 let am = payment.amount
89109 let id = payment.assetId
90110 if ((id == usdtUsdnLPTCI))
91111 then {
92112 let TCIAmount = match assetInfo(usdtUsdnLPTCI) {
93113 case q: Asset =>
94114 q.quantity
95115 case _ =>
96116 0
97117 }
98118 let usdnUsdtStaked = valueOrElse(getInteger(this, keyStaked), 0)
99119 let forSingleTCI = fraction(usdnUsdtStaked, def, TCIAmount)
100120 let usdnLpToWithdraw = fraction(forSingleTCI, am, def)
101121 let unstake = invoke(Address(base58'3Mx3zmXrMcLFCafMuPtXAzR4ZPVeZYb6qLz'), "unstake", ["Fm4qczu6Pepz8KUhh3Heb6LeTVfpSMX5vvNgw3x764CS", usdnLpToWithdraw], nil)
102122 if ((unstake == unstake))
103123 then {
104124 let fee = fraction(usdnLpToWithdraw, def, feePerc)
105125 let brn = Burn(usdtUsdnLPTCI, am)
106126 if ((brn == brn))
107127 then {
108128 let updateUsdnLpStaked = IntegerEntry(keyStaked, (usdnUsdtStaked - usdnLpToWithdraw))
109129 let usdnLpfeeTransfer = ScriptTransfer(Address(tw), fee, usdtUsdnLP)
110130 let transfer = ScriptTransfer(i.caller, (usdnLpToWithdraw - fee), usdtUsdnLP)
111131 [usdnLpfeeTransfer, transfer, updateUsdnLpStaked]
112132 }
113133 else throw("Strict value is not equal to itself.")
114134 }
115135 else throw("Strict value is not equal to itself.")
116136 }
117137 else if ((id == wxUsdnLPTCI))
118138 then {
119139 let wxTciAm = match assetInfo(wxUsdnLPTCI) {
120140 case q: Asset =>
121141 q.quantity
122142 case _ =>
123143 0
124144 }
125145 let wxUsdnStaked = valueOrElse(getInteger(this, keyWXUSDN), 0)
126146 let singleWXLP = fraction(wxUsdnStaked, def, wxTciAm)
127147 let wxLpToWithdraw = fraction(singleWXLP, am, def)
128148 let fee = fraction(wxLpToWithdraw, def, feePerc)
129149 let unstake = invoke(Address(base58'3Mx3zmXrMcLFCafMuPtXAzR4ZPVeZYb6qLz'), "unstake", ["2sEBVcyDFK2LupCf7MeA4vzHhGK4DC1WjbKGQCLYDqib", wxLpToWithdraw], nil)
130150 if ((unstake == unstake))
131151 then {
132152 let wxLpFeeTransfer = ScriptTransfer(Address(tw), fee, wxUsdnLP)
133- let wxLpTransfer = ScriptTransfer(i.caller, (am - fee), wxUsdnLP)
153+ let wxLpTransfer = ScriptTransfer(i.caller, (wxLpToWithdraw - fee), wxUsdnLP)
134154 let updateWxLpStaked = IntegerEntry(keyWXUSDN, (wxUsdnStaked - wxLpToWithdraw))
135155 let burnWxLpTci = Burn(wxUsdnLP, am)
136156 if ((burnWxLpTci == burnWxLpTci))
137157 then [wxLpFeeTransfer, wxLpTransfer, updateWxLpStaked]
138158 else throw("Strict value is not equal to itself.")
139159 }
140160 else throw("Strict value is not equal to itself.")
141161 }
142162 else if ((id == usdcUsdnLPTCI))
143163 then {
144164 let usdcUsdnTCI = match assetInfo(usdcUsdnLPTCI) {
145165 case q: Asset =>
146166 q.quantity
147167 case _ =>
148168 0
149169 }
150170 let usdcUsdnStaked = valueOrElse(getInteger(this, keyUSDCUSDN), 0)
151171 let singleUsdcLP = fraction(usdcUsdnTCI, def, usdcUsdnStaked)
152172 let usdcLpToWithdraw = fraction(singleUsdcLP, am, def)
153173 let fee = fraction(usdcLpToWithdraw, def, feePerc)
154- let usdcUsdnLPFee = ScriptTransfer(Address(tw), fee, usdcUsdnLP)
155- let usdcUsdnTransfer = ScriptTransfer(i.caller, (am - fee), usdcUsdnLP)
156- let updateUsdcUsdnLpStaked = IntegerEntry(keyUSDCUSDN, (usdcUsdnStaked - usdcLpToWithdraw))
157- let burnUsdcUsdnLpTci = Burn(usdcUsdnLPTCI, am)
158- if ((burnUsdcUsdnLpTci == burnUsdcUsdnLpTci))
159- then [usdcUsdnLPFee, usdcUsdnTransfer, updateUsdcUsdnLpStaked]
174+ let unstake = invoke(Address(base58'3Mx3zmXrMcLFCafMuPtXAzR4ZPVeZYb6qLz'), "unstake", ["2sEBVcyDFK2LupCf7MeA4vzHhGK4DC1WjbKGQCLYDqib", usdcLpToWithdraw], nil)
175+ if ((unstake == unstake))
176+ then {
177+ let usdcUsdnLPFee = ScriptTransfer(Address(tw), fee, usdcUsdnLP)
178+ let usdcUsdnTransfer = ScriptTransfer(i.caller, (am - fee), usdcUsdnLP)
179+ let updateUsdcUsdnLpStaked = IntegerEntry(keyUSDCUSDN, (usdcUsdnStaked - usdcLpToWithdraw))
180+ let burnUsdcUsdnLpTci = Burn(usdcUsdnLPTCI, am)
181+ if ((burnUsdcUsdnLpTci == burnUsdcUsdnLpTci))
182+ then [usdcUsdnLPFee, usdcUsdnTransfer, updateUsdcUsdnLpStaked]
183+ else throw("Strict value is not equal to itself.")
184+ }
160185 else throw("Strict value is not equal to itself.")
161186 }
162187 else if ((id == usdcUsdtLPTCI))
163188 then {
164189 let usdcUsdtTci = match assetInfo(usdcUsdnLPTCI) {
165190 case q: Asset =>
166191 q.quantity
167192 case _ =>
168193 0
169194 }
170195 let usdcUsdtStaked = valueOrElse(getInteger(this, keyUSDCUSDT), 0)
171196 let singleUsdcUsdt = fraction(usdcUsdtTci, def, usdcUsdtStaked)
172197 let usdcUsdtLpToWithdraw = fraction(singleUsdcUsdt, am, def)
173198 let fee = fraction(usdcUsdtLpToWithdraw, def, feePerc)
174- let usdcUsdtLPFee = ScriptTransfer(Address(tw), fee, usdcUsdtLP)
175- let usdcUsdtTransfer = ScriptTransfer(i.caller, (am - fee), usdcUsdtLP)
176- let updateUsdcUsdtLpStaked = IntegerEntry(keyUSDCUSDT, (usdcUsdtStaked - usdcUsdtLpToWithdraw))
177- let burnWxLpTci = Burn(usdcUsdnLPTCI, am)
178- if ((burnWxLpTci == burnWxLpTci))
179- then [usdcUsdtLPFee, usdcUsdtTransfer, updateUsdcUsdtLpStaked]
199+ let unstake = invoke(Address(base58'3Mx3zmXrMcLFCafMuPtXAzR4ZPVeZYb6qLz'), "unstake", ["2sEBVcyDFK2LupCf7MeA4vzHhGK4DC1WjbKGQCLYDqib", usdcUsdtLpToWithdraw], nil)
200+ if ((unstake == unstake))
201+ then {
202+ let usdcUsdtLPFee = ScriptTransfer(Address(tw), fee, usdcUsdtLP)
203+ let usdcUsdtTransfer = ScriptTransfer(i.caller, (usdcUsdtLpToWithdraw - fee), usdcUsdtLP)
204+ let updateUsdcUsdtLpStaked = IntegerEntry(keyUSDCUSDT, (usdcUsdtStaked - usdcUsdtLpToWithdraw))
205+ let burnWxLpTci = Burn(usdcUsdnLPTCI, am)
206+ if ((burnWxLpTci == burnWxLpTci))
207+ then [usdcUsdtLPFee, usdcUsdtTransfer, updateUsdcUsdtLpStaked]
208+ else throw("Strict value is not equal to itself.")
209+ }
180210 else throw("Strict value is not equal to itself.")
181211 }
182212 else if ((id == puzzleUsdnLPTCI))
183213 then {
184214 let puzzleUsdnTci = match assetInfo(puzzleUsdnLPTCI) {
185215 case q: Asset =>
186216 q.quantity
187217 case _ =>
188218 0
189219 }
190220 let puzzleLPStaked = valueOrElse(getInteger(this, keyPUZZLEUSDN), 0)
191221 let singlePuzzleUsdn = fraction(puzzleUsdnTci, def, puzzleLPStaked)
192222 let puzzleUsdnWithdraw = fraction(singlePuzzleUsdn, am, def)
193223 let fee = fraction(puzzleUsdnWithdraw, def, feePerc)
194- let puzzleUsdnLPFee = ScriptTransfer(Address(tw), fee, puzzleUsdnLP)
195- let puzzleUsdnTransfer = ScriptTransfer(i.caller, (am - fee), puzzleUsdnLP)
196- let updatePuzzleUsdnLpStaked = IntegerEntry(keyPUZZLEUSDN, (puzzleLPStaked - puzzleUsdnWithdraw))
197- let burnPuzzleTCI = Burn(puzzleUsdnLPTCI, am)
198- if ((burnPuzzleTCI == burnPuzzleTCI))
199- then [puzzleUsdnLPFee, puzzleUsdnTransfer, updatePuzzleUsdnLpStaked]
224+ let unstake = invoke(Address(base58'3Mx3zmXrMcLFCafMuPtXAzR4ZPVeZYb6qLz'), "unstake", ["2sEBVcyDFK2LupCf7MeA4vzHhGK4DC1WjbKGQCLYDqib", puzzleUsdnWithdraw], nil)
225+ if ((unstake == unstake))
226+ then {
227+ let puzzleUsdnLPFee = ScriptTransfer(Address(tw), fee, puzzleUsdnLP)
228+ let puzzleUsdnTransfer = ScriptTransfer(i.caller, (puzzleUsdnWithdraw - fee), puzzleUsdnLP)
229+ let updatePuzzleUsdnLpStaked = IntegerEntry(keyPUZZLEUSDN, (puzzleLPStaked - puzzleUsdnWithdraw))
230+ let burnPuzzleTCI = Burn(puzzleUsdnLPTCI, am)
231+ if ((burnPuzzleTCI == burnPuzzleTCI))
232+ then [puzzleUsdnLPFee, puzzleUsdnTransfer, updatePuzzleUsdnLpStaked]
233+ else throw("Strict value is not equal to itself.")
234+ }
200235 else throw("Strict value is not equal to itself.")
201236 }
202237 else throw("Invalid asset")
203238 }
204239
205240
206241
207242 @Callable(i)
208243 func depositWxUsdnLP () = {
209244 let pmt = value(i.payments[0])
210245 let pmtAmount = pmt.amount
211246 if ((pmt.assetId != wxUsdnLP))
212247 then throw("attach WXUSDNLP tokens only")
213248 else if (isStopped)
214249 then throw("smart contract is on lock")
215250 else {
216251 let tkStaked = valueOrElse(getInteger(this, keyWXUSDN), 0)
217252 let totalIssued = match assetInfo(wxUsdnLPTCI) {
218253 case asset: Asset =>
219254 asset.quantity
220255 case _ =>
221256 throw("Can't find asset")
222257 }
223258 let one = fraction(totalIssued, 100000000, tkStaked)
224259 let toIssue = fraction(pmtAmount, one, 100000000)
225260 let updateState = IntegerEntry(keyWXUSDN, (tkStaked + pmtAmount))
226261 let LPstake = invoke(Address(base58'3Mx3zmXrMcLFCafMuPtXAzR4ZPVeZYb6qLz'), "stake", nil, [pmt])
227262 if ((LPstake == LPstake))
228263 then {
229264 let LPIssue = Reissue(wxUsdnLPTCI, toIssue, true)
230265 let transfer = ScriptTransfer(i.caller, toIssue, wxUsdnLPTCI)
231266 [LPIssue, transfer, updateState]
232267 }
233268 else throw("Strict value is not equal to itself.")
234269 }
235270 }
236271
237272
238273
239274 @Callable(i)
240275 func depositUsdtUsdnLP () = {
241276 let pmt = value(i.payments[0])
242277 let pmtAmount = pmt.amount
243278 if ((pmt.assetId != usdtUsdnLP))
244279 then throw("attach USDTUSDNLP tokens only")
245280 else if (isStopped)
246281 then throw("smart contract is on lock")
247282 else {
248283 let tkStaked = valueOrElse(getInteger(this, keyStaked), 0)
249284 let totalIssued = match assetInfo(usdtUsdnLPTCI) {
250285 case asset: Asset =>
251286 asset.quantity
252287 case _ =>
253288 throw("Can't find asset")
254289 }
255290 let fromCompound = valueOrElse(getInteger(this, keyCompound), 0)
256291 let forOne = fraction(totalIssued, 100000000, tkStaked)
257292 let toIssue = fraction(pmtAmount, forOne, 100000000)
258293 let updateState = IntegerEntry(keyStaked, (tkStaked + pmtAmount))
259294 let LPstake = invoke(Address(base58'3Mx3zmXrMcLFCafMuPtXAzR4ZPVeZYb6qLz'), "stake", nil, [pmt])
260295 if ((LPstake == LPstake))
261296 then {
262297 let LPIssue = Reissue(usdtUsdnLPTCI, toIssue, true)
263298 let transfer = ScriptTransfer(i.caller, toIssue, usdtUsdnLPTCI)
264299 [LPIssue, transfer, updateState]
265300 }
266301 else throw("Strict value is not equal to itself.")
267302 }
268303 }
269304
270305
271306
272307 @Callable(i)
273308 func depositUsdcUsdnLP () = {
274309 let pmt = value(i.payments[0])
275310 let pmtAmount = pmt.amount
276311 if ((pmt.assetId != usdcUsdnLP))
277312 then throw("attach USDCUSDNLP tokens only")
278313 else if (isStopped)
279314 then throw("smart contract is on lock")
280315 else {
281316 let tkStaked = valueOrElse(getInteger(this, keyUSDCUSDN), 0)
282317 let totalIssued = match assetInfo(usdcUsdnLPTCI) {
283318 case asset: Asset =>
284319 asset.quantity
285320 case _ =>
286321 throw("Can't find asset")
287322 }
288323 let fromCompound = valueOrElse(getInteger(this, keyUsdcUsdnCompound), 0)
289324 let forOne = fraction(totalIssued, 100000000, tkStaked)
290325 let toIssue = fraction(pmtAmount, forOne, 100000000)
291326 let updateState = IntegerEntry(keyUSDCUSDN, (tkStaked + pmtAmount))
292327 let LPstake = invoke(Address(base58'3Mx3zmXrMcLFCafMuPtXAzR4ZPVeZYb6qLz'), "stake", nil, [pmt])
293328 if ((LPstake == LPstake))
294329 then {
295330 let LPIssue = Reissue(usdcUsdnLPTCI, toIssue, true)
296331 let transfer = ScriptTransfer(i.caller, toIssue, usdcUsdnLPTCI)
297332 [LPIssue, transfer, updateState]
298333 }
299334 else throw("Strict value is not equal to itself.")
300335 }
301336 }
302337
303338
304339
305340 @Callable(i)
306341 func depositUsdcUsdtLP () = {
307342 let pmt = value(i.payments[0])
308343 let pmtAmount = pmt.amount
309344 if ((pmt.assetId != usdcUsdtLP))
310345 then throw("attach USDCUSDTLP tokens only")
311346 else if (isStopped)
312347 then throw("smart contract is on lock")
313348 else {
314349 let tkStaked = valueOrElse(getInteger(this, keyUSDCUSDT), 0)
315350 let totalIssued = match assetInfo(usdcUsdtLPTCI) {
316351 case asset: Asset =>
317352 asset.quantity
318353 case _ =>
319354 throw("Can't find asset")
320355 }
321356 let fromCompound = valueOrElse(getInteger(this, keyUsdcUsdtCompound), 0)
322357 let forOne = fraction(totalIssued, 100000000, tkStaked)
323358 let toIssue = fraction(pmtAmount, forOne, 100000000)
324359 let updateState = IntegerEntry(keyUSDCUSDT, (tkStaked + pmtAmount))
325360 let LPstake = invoke(Address(base58'3Mx3zmXrMcLFCafMuPtXAzR4ZPVeZYb6qLz'), "stake", nil, [pmt])
326361 if ((LPstake == LPstake))
327362 then {
328363 let LPIssue = Reissue(usdcUsdtLPTCI, toIssue, true)
329364 let transfer = ScriptTransfer(i.caller, toIssue, usdcUsdtLPTCI)
330365 [LPIssue, transfer, updateState]
331366 }
332367 else throw("Strict value is not equal to itself.")
333368 }
334369 }
335370
336371
337372
338373 @Callable(i)
339374 func depositPuzzleUsdnLP () = {
340375 let pmt = value(i.payments[0])
341376 let pmtAmount = pmt.amount
342377 if ((pmt.assetId != puzzleUsdnLP))
343378 then throw("attach PUZZLEUDSNLP tokens only")
344379 else if (isStopped)
345380 then throw("smart contract is on lock")
346381 else {
347382 let tkStaked = valueOrElse(getInteger(this, keyPUZZLEUSDN), 0)
348383 let totalIssued = match assetInfo(puzzleUsdnLPTCI) {
349384 case asset: Asset =>
350385 asset.quantity
351386 case _ =>
352387 throw("Can't find asset")
353388 }
354389 let fromCompound = valueOrElse(getInteger(this, keyPuzzleUsdnCompound), 0)
355390 let forOne = fraction(totalIssued, 100000000, tkStaked)
356391 let toIssue = fraction(pmtAmount, forOne, 100000000)
357392 let updateState = IntegerEntry(keyPUZZLEUSDN, (tkStaked + pmtAmount))
358393 let LPstake = invoke(Address(base58'3Mx3zmXrMcLFCafMuPtXAzR4ZPVeZYb6qLz'), "stake", nil, [pmt])
359394 if ((LPstake == LPstake))
360395 then {
361396 let LPIssue = Reissue(puzzleUsdnLPTCI, toIssue, true)
362397 let transfer = ScriptTransfer(i.caller, toIssue, puzzleUsdnLPTCI)
363398 [LPIssue, transfer, updateState]
364399 }
365400 else throw("Strict value is not equal to itself.")
366401 }
367402 }
368403
369404
370405
371406 @Callable(i)
372407 func compoundWxUsdnLP () = {
373408 let compound = value(i.payments[0])
374409 let ca = compound.amount
375410 let isOracle = checkAddress(i.caller.bytes)
376411 if ((compound.assetId != wxUsdnLP))
377412 then throw("attach WXUSDNLP tokens only")
378413 else if (!(isOracle))
379414 then throw("You are not authotized to call this function")
380415 else {
381416 let fromCompound = valueOrElse(getInteger(this, keywxUsdnCompound), 0)
382417 let totalStaked = valueOrElse(getInteger(this, keyWXUSDN), 0)
383418 let stakeC = invoke(Address(base58'3Mx3zmXrMcLFCafMuPtXAzR4ZPVeZYb6qLz'), "stake", nil, [compound])
384419 if ((stakeC == stakeC))
385420 then {
386421 let updateState = IntegerEntry(keyWXUSDN, (totalStaked + ca))
387422 let tc = IntegerEntry(keywxUsdnCompound, (fromCompound + ca))
388423 [updateState, tc]
389424 }
390425 else throw("Strict value is not equal to itself.")
391426 }
392427 }
393428
394429
395430
396431 @Callable(i)
397432 func compoundUsdtUsdnLP () = {
398433 let compound = value(i.payments[0])
399434 let ca = compound.amount
400435 let isOracle = checkAddress(i.caller.bytes)
401436 if ((compound.assetId != usdtUsdnLP))
402437 then throw("attach USDTUSDNLP tokens only")
403438 else if (!(isOracle))
404439 then throw("You are not authotized to call this function")
405440 else {
406441 let fromCompound = valueOrElse(getInteger(this, keyCompound), 0)
407442 let totalStaked = valueOrElse(getInteger(this, keyStaked), 0)
408443 let stakeC = invoke(Address(base58'3Mx3zmXrMcLFCafMuPtXAzR4ZPVeZYb6qLz'), "stake", nil, [compound])
409444 if ((stakeC == stakeC))
410445 then {
411446 let updateState = IntegerEntry(keyStaked, (totalStaked + ca))
412447 let tc = IntegerEntry(keyCompound, (fromCompound + ca))
413448 [updateState, tc]
414449 }
415450 else throw("Strict value is not equal to itself.")
416451 }
417452 }
418453
419454
420455
421456 @Callable(i)
422457 func compoundUsdcUsdnLP () = {
423458 let compound = value(i.payments[0])
424459 let ca = compound.amount
425460 let isOracle = checkAddress(i.caller.bytes)
426461 if ((compound.assetId != usdcUsdnLP))
427462 then throw("attach USDCUSDNLP tokens only")
428463 else if (!(isOracle))
429464 then throw("You are not authotized to call this function")
430465 else {
431466 let fromCompound = valueOrElse(getInteger(this, keyUsdcUsdnCompound), 0)
432467 let totalStaked = valueOrElse(getInteger(this, keyUSDCUSDN), 0)
433468 let stakeC = invoke(Address(base58'3Mx3zmXrMcLFCafMuPtXAzR4ZPVeZYb6qLz'), "stake", nil, [compound])
434469 if ((stakeC == stakeC))
435470 then {
436471 let updateState = IntegerEntry(keyUSDCUSDN, (totalStaked + ca))
437472 let tc = IntegerEntry(keyUsdcUsdnCompound, (fromCompound + ca))
438473 [updateState, tc]
439474 }
440475 else throw("Strict value is not equal to itself.")
441476 }
442477 }
443478
444479
445480
446481 @Callable(i)
447482 func compoundUsdcUsdtLP () = {
448483 let compound = value(i.payments[0])
449484 let ca = compound.amount
450485 let isOracle = checkAddress(i.caller.bytes)
451486 if ((compound.assetId != usdcUsdtLP))
452487 then throw("attach USDCUSDTLP tokens only")
453488 else if (!(isOracle))
454489 then throw("You are not authotized to call this function")
455490 else {
456491 let fromCompound = valueOrElse(getInteger(this, keyUsdcUsdtCompound), 0)
457492 let totalStaked = valueOrElse(getInteger(this, keyUSDCUSDT), 0)
458493 let stakeC = invoke(Address(base58'3Mx3zmXrMcLFCafMuPtXAzR4ZPVeZYb6qLz'), "stake", nil, [compound])
459494 if ((stakeC == stakeC))
460495 then {
461496 let updateState = IntegerEntry(keyUSDCUSDT, (totalStaked + ca))
462497 let tc = IntegerEntry(keyUsdcUsdtCompound, (fromCompound + ca))
463498 [updateState, tc]
464499 }
465500 else throw("Strict value is not equal to itself.")
466501 }
467502 }
468503
469504
470505
471506 @Callable(i)
472507 func compoundPuzzleUsdnLP () = {
473508 let compound = value(i.payments[0])
474509 let ca = compound.amount
475510 let isOracle = checkAddress(i.caller.bytes)
476511 if ((compound.assetId != puzzleUsdnLP))
477512 then throw("attach PUZZLEUSDNLP tokens only")
478513 else if (!(isOracle))
479514 then throw("You are not authotized to call this function")
480515 else {
481516 let fromCompound = valueOrElse(getInteger(this, keyPuzzleUsdnCompound), 0)
482517 let totalStaked = valueOrElse(getInteger(this, keyPUZZLEUSDN), 0)
483518 let stakeC = invoke(Address(base58'3Mx3zmXrMcLFCafMuPtXAzR4ZPVeZYb6qLz'), "stake", nil, [compound])
484519 if ((stakeC == stakeC))
485520 then {
486521 let updateState = IntegerEntry(keyPUZZLEUSDN, (totalStaked + ca))
487522 let tc = IntegerEntry(keyPuzzleUsdnCompound, (fromCompound + ca))
488523 [updateState, tc]
489524 }
490525 else throw("Strict value is not equal to itself.")
491526 }
492527 }
493528
494529
495530
496531 @Callable(i)
497532 func sponsorBoost () = {
498533 let pm = value(i.payments[0])
499534 let lockPeriod = 100
500535 if ((pm.assetId != wxId))
501536 then throw("Error")
502537 else {
503538 let sponsored = valueOrElse(getInteger(this, keySponsorship), 0)
504539 let lock = invoke(Address(base58'3PJL8Hn8LACaSBWLQ3UVhctA5cTQLBFwBAP'), "increaseLock", [lockPeriod], [pm])
505540 if ((lock == lock))
506541 then {
507542 let s = IntegerEntry(keySponsorship, (pm.amount + sponsored))
508543 [s]
509544 }
510545 else throw("Strict value is not equal to itself.")
511546 }
512547 }
513548
514549
515550
516551 @Callable(i)
517552 func initWX () = {
518553 let pm = value(i.payments[0])
519554 let am = pm.amount
520555 if ((pm.assetId != wxUsdnLP))
521556 then throw("Unexpected token")
522557 else {
523558 let s = invoke(Address(base58'3Mx3zmXrMcLFCafMuPtXAzR4ZPVeZYb6qLz'), "stake", nil, [pm])
524559 if ((s == s))
525560 then {
526561 let upd = IntegerEntry(keyWXUSDN, am)
527562 let updK = IntegerEntry(keywxUsdnCompound, 0)
528563 [upd, updK]
529564 }
530565 else throw("Strict value is not equal to itself.")
531566 }
532567 }
533568
534569
535570 @Verifier(tx)
536571 func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
537572

github/deemru/w8io/026f985 
51.03 ms