tx · GApHSFqRwAUqRnBgS8FouyWUXnn543cH6i3sSRPtGdfW 3N8n6BtTBKRZBoPuMzaPBH9FyJhfv9xDFJH: -0.01400000 Waves 2022.07.26 14:26 [2156704] smart account 3N8n6BtTBKRZBoPuMzaPBH9FyJhfv9xDFJH > SELF 0.00000000 Waves
{ "type": 13, "id": "GApHSFqRwAUqRnBgS8FouyWUXnn543cH6i3sSRPtGdfW", "fee": 1400000, "feeAssetId": null, "timestamp": 1658834839219, "version": 2, "chainId": 84, "sender": "3N8n6BtTBKRZBoPuMzaPBH9FyJhfv9xDFJH", "senderPublicKey": "4hcnYaYoB2XaCzyJ7wfePpG7EfTd6st6aCAhkskJ9cQ5", "proofs": [ "2RQE4uTEJdn1tPo1kAMNokKqEqmjgw3nSFmkEboXc3MWRmpCAB2my4N6No2yNLJrD9m9YLTg4TdhVcwYUohcNvhJ" ], "script": "base64:BgIcCAISABIAEgASABIAEgASABIAEgASABIAEgASAB0ACnVzZHRVc2RuTFABINtNgzVkRxuW758ML6DPfdV5nZLo4Zs1D8E/zHsCcCkLAA11c2R0VXNkbkxQVENJASAKgc2p7UBhHZhKuDrYegRoUwgmwMmY8WHBKX76Hd4q8gAId3hVc2RuTFABIBu5oY97zkylzfrOR8kLFo5N9lvewuuTwdbFqNGxqgscAAt3eFVzZG5MUFRDSQEgt+zd5hsCe9q2E4f9VdDWPLbHojc9S4i9wXtvSEQAmC8ACnVzZGNVc2RuTFABIANpAfwbCpgKiM2P/hFZhYUmkTKzWpL8JulIXdOf3lx2AA11c2RjVXNkbkxQVENJASD2Ajfd05/vhkUvXCNHD5Vf0TptoSvCp7SbVEEHUvVuxgAKdXNkY1VzZHRMUAEgxvikdBtWSFYQn5B+wjP0MWuLBEosK/2ZS4f1hZt85IwADXVzZGNVc2R0TFBUQ0kBIALGhXwESzPH4u+HZ4dS+1WC/bPfhCO2oFrFNd3PV0r+AAxwdXp6bGVVc2RuTFABIMMzxnTOI6qkIt9JJOXEmWt4BLB3VoJ0/7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cnNoaXAAAAQEbG9jawkA/AcECQEHQWRkcmVzcwEBGgFXs+bmVRgRabDkMw+IUUOknK7W1UsDSxFYAgxpbmNyZWFzZUxvY2sJAMwIAgUKbG9ja1BlcmlvZAUDbmlsCQDMCAIFAnBtBQNuaWwDCQAAAgUEbG9jawUEbG9jawQBcwkBDEludGVnZXJFbnRyeQIFDmtleVNwb25zb3JzaGlwCQBkAggFAnBtBmFtb3VudAUJc3BvbnNvcmVkCQDMCAIFAXMFA25pbAkAAgECJFN0cmljdCB2YWx1ZSBpcyBub3QgZXF1YWwgdG8gaXRzZWxmLgFpAQZpbml0V1gABAJwbQkBBXZhbHVlAQkAkQMCCAUBaQhwYXltZW50cwAABAJhbQgFAnBtBmFtb3VudAMJAQIhPQIIBQJwbQdhc3NldElkBQh3eFVzZG5MUAkAAgECEFVuZXhwZWN0ZWQgdG9rZW4EAXMJAPwHBAkBB0FkZHJlc3MBARoBVFlAJ5NrSynuvrGhDubcQLjPpI16DOu1DwIFc3Rha2UFA25pbAkAzAgCBQJwbQUDbmlsAwkAAAIFAXMFAXMEA3VwZAkBDEludGVnZXJFbnRyeQIFCWtleVdYVVNETgUCYW0EBHVwZEsJAQxJbnRlZ2VyRW50cnkCBRFrZXl3eFVzZG5Db21wb3VuZAAACQDMCAIFA3VwZAkAzAgCBQR1cGRLBQNuaWwJAAIBAiRTdHJpY3QgdmFsdWUgaXMgbm90IGVxdWFsIHRvIGl0c2VsZi4BAnR4AQZ2ZXJpZnkACQD0AwMIBQJ0eAlib2R5Qnl0ZXMJAJEDAggFAnR4BnByb29mcwAACAUCdHgPc2VuZGVyUHVibGljS2V50OfAnA==", "height": 2156704, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: FsThGC5KPxRtesFJ4p32LVaDMmkY1zhKiE7KNvvezCRz Next: A7tQLacqwaE1AfSaWS1jYGfPjX6RrQHunWAxXh9avLb5 Diff:
Old | New | Differences | |
---|---|---|---|
201 | 201 | let one = fraction(totalIssued, 100000000, tkStaked) | |
202 | 202 | let toIssue = fraction(pmtAmount, one, 100000000) | |
203 | 203 | let updateState = IntegerEntry(keyWXUSDN, (tkStaked + pmtAmount)) | |
204 | - | let LPstake = invoke(Address(base58' | |
204 | + | let LPstake = invoke(Address(base58'3Mx3zmXrMcLFCafMuPtXAzR4ZPVeZYb6qLz'), "stake", nil, [pmt]) | |
205 | 205 | if ((LPstake == LPstake)) | |
206 | 206 | then { | |
207 | 207 | let LPIssue = Reissue(wxUsdnLPTCI, toIssue, true) |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let usdtUsdnLP = base58'Fm4qczu6Pepz8KUhh3Heb6LeTVfpSMX5vvNgw3x764CS' | |
5 | 5 | ||
6 | 6 | let usdtUsdnLPTCI = base58'i1snzKxSEZVokh9TWj8hTJQEDBsocnL2hRWsSbsMPK7' | |
7 | 7 | ||
8 | 8 | let wxUsdnLP = base58'2sEBVcyDFK2LupCf7MeA4vzHhGK4DC1WjbKGQCLYDqib' | |
9 | 9 | ||
10 | 10 | let wxUsdnLPTCI = base58'DNy6WBfhPE4y82RonGdHhZEunNotEDzmNfrBomWnsyGi' | |
11 | 11 | ||
12 | 12 | let usdcUsdnLP = base58'EK6N7S38xbtBT3SxAqoGdDLCiX6rojX6G169CnSyuE5' | |
13 | 13 | ||
14 | 14 | let usdcUsdnLPTCI = base58'HZKFpNfyPG5gt4D6Nfy1zQSg2Ptmqv932GjNTCyBEeKP' | |
15 | 15 | ||
16 | 16 | let usdcUsdtLP = base58'EPhdEfmQaNcHyvDmRGhnLhgcJtKZ2a4k3ZBmKWtAEWyH' | |
17 | 17 | ||
18 | 18 | let usdcUsdtLPTCI = base58'BqPYkaiz7Le6fFu1rjZ54anrpT57EpvyugZCUqrsjXj' | |
19 | 19 | ||
20 | 20 | let puzzleUsdnLP = base58'E8zHu33GfcNyGLypX77gZiUXfvuZQeaYmiEfsy7VYNwP' | |
21 | 21 | ||
22 | 22 | let puzzleUsdnLPTCI = base58'Dh9QXSSABE5V6aRfu3mCbDAUokbpE7ER7pbZV6cvyg1A' | |
23 | 23 | ||
24 | 24 | let wxId = base58'Atqv59EYzjFGuitKVnMRk6H8FukjoV3ktPorbEys25on' | |
25 | 25 | ||
26 | 26 | let keySponsorship = "Sponsorship_in_lock" | |
27 | 27 | ||
28 | 28 | let isStopped = false | |
29 | 29 | ||
30 | 30 | let keyStaked = "STAKED_LP" | |
31 | 31 | ||
32 | 32 | let keyCompound = "From_Compound" | |
33 | 33 | ||
34 | 34 | let keywxUsdnCompound = "WX_USDN_compound" | |
35 | 35 | ||
36 | 36 | let keyWXUSDN = "WX_USDN" | |
37 | 37 | ||
38 | 38 | let keyUsdcUsdnCompound = "USDC_USDN_compound" | |
39 | 39 | ||
40 | 40 | let keyUSDCUSDN = "USDC_USDN" | |
41 | 41 | ||
42 | 42 | let keyUsdcUsdtCompound = "USDC_USDT_compound" | |
43 | 43 | ||
44 | 44 | let keyUSDCUSDT = "USDC_USDT" | |
45 | 45 | ||
46 | 46 | let keyPuzzleUsdnCompound = "PUZZLE_USDN_compound" | |
47 | 47 | ||
48 | 48 | let keyPUZZLEUSDN = "PUZZLE_USDN" | |
49 | 49 | ||
50 | 50 | let def = 100000000 | |
51 | 51 | ||
52 | 52 | let feePerc = 10000000000 | |
53 | 53 | ||
54 | 54 | let tw = base58'3Mv7nXq2V2Dnn9oSkB5feRt6RxtqnPiAXNH' | |
55 | 55 | ||
56 | 56 | let oracle = base58'3P6phwFZFQtZFuc9dvdXsgvtg8JEFVgECPA' | |
57 | 57 | ||
58 | 58 | let stakePool = "3Mx3zmXrMcLFCafMuPtXAzR4ZPVeZYb6qLz" | |
59 | 59 | ||
60 | 60 | func checkAddress (caller) = if ((caller != oracle)) | |
61 | 61 | then false | |
62 | 62 | else true | |
63 | 63 | ||
64 | 64 | ||
65 | 65 | @Callable(i) | |
66 | 66 | func withdraw () = { | |
67 | 67 | let payment = value(i.payments[0]) | |
68 | 68 | let am = payment.amount | |
69 | 69 | let id = payment.assetId | |
70 | 70 | if ((id == usdtUsdnLP)) | |
71 | 71 | then { | |
72 | 72 | let TCIAmount = match assetInfo(usdtUsdnLPTCI) { | |
73 | 73 | case q: Asset => | |
74 | 74 | q.quantity | |
75 | 75 | case _ => | |
76 | 76 | 0 | |
77 | 77 | } | |
78 | 78 | let usdnUsdtStaked = valueOrElse(getInteger(this, keyStaked), 0) | |
79 | 79 | let forSingleTCI = fraction(usdnUsdtStaked, def, TCIAmount) | |
80 | 80 | let usdnLpToWithdraw = fraction(forSingleTCI, am, def) | |
81 | 81 | let fee = fraction(usdnLpToWithdraw, def, feePerc) | |
82 | 82 | let unstake = invoke(Address(base58'3Mx3zmXrMcLFCafMuPtXAzR4ZPVeZYb6qLz'), "unstake", ["Fm4qczu6Pepz8KUhh3Heb6LeTVfpSMX5vvNgw3x764CS", am], [payment]) | |
83 | 83 | if ((unstake == unstake)) | |
84 | 84 | then { | |
85 | 85 | let usdnLpfeeTransfer = ScriptTransfer(Address(tw), fee, usdtUsdnLP) | |
86 | 86 | let transfer = ScriptTransfer(i.caller, (usdnLpToWithdraw - fee), usdtUsdnLP) | |
87 | 87 | let updateUsdnLpStaked = IntegerEntry(keyStaked, (usdnUsdtStaked - usdnLpToWithdraw)) | |
88 | 88 | let brn = Burn(usdtUsdnLPTCI, am) | |
89 | 89 | if ((brn == brn)) | |
90 | 90 | then [usdnLpfeeTransfer, transfer, updateUsdnLpStaked] | |
91 | 91 | else throw("Strict value is not equal to itself.") | |
92 | 92 | } | |
93 | 93 | else throw("Strict value is not equal to itself.") | |
94 | 94 | } | |
95 | 95 | else if ((id == wxUsdnLPTCI)) | |
96 | 96 | then { | |
97 | 97 | let wxTciAm = match assetInfo(wxUsdnLPTCI) { | |
98 | 98 | case q: Asset => | |
99 | 99 | q.quantity | |
100 | 100 | case _ => | |
101 | 101 | 0 | |
102 | 102 | } | |
103 | 103 | let wxUsdnStaked = valueOrElse(getInteger(this, keyWXUSDN), 0) | |
104 | 104 | let singleWXLP = fraction(wxUsdnStaked, def, wxTciAm) | |
105 | 105 | let wxLpToWithdraw = fraction(singleWXLP, am, def) | |
106 | 106 | let fee = fraction(wxLpToWithdraw, def, feePerc) | |
107 | 107 | let unstake = invoke(Address(base58'3Mx3zmXrMcLFCafMuPtXAzR4ZPVeZYb6qLz'), "unstake", ["2sEBVcyDFK2LupCf7MeA4vzHhGK4DC1WjbKGQCLYDqib", am], [payment]) | |
108 | 108 | if ((unstake == unstake)) | |
109 | 109 | then { | |
110 | 110 | let wxLpFeeTransfer = ScriptTransfer(Address(tw), fee, wxUsdnLP) | |
111 | 111 | let wxLpTransfer = ScriptTransfer(i.caller, (am - fee), wxUsdnLP) | |
112 | 112 | let updateWxLpStaked = IntegerEntry(keyWXUSDN, (wxUsdnStaked - wxLpToWithdraw)) | |
113 | 113 | let burnWxLpTci = Burn(wxUsdnLP, am) | |
114 | 114 | if ((burnWxLpTci == burnWxLpTci)) | |
115 | 115 | then [wxLpFeeTransfer, wxLpTransfer, updateWxLpStaked] | |
116 | 116 | else throw("Strict value is not equal to itself.") | |
117 | 117 | } | |
118 | 118 | else throw("Strict value is not equal to itself.") | |
119 | 119 | } | |
120 | 120 | else if ((id == usdcUsdnLPTCI)) | |
121 | 121 | then { | |
122 | 122 | let usdcUsdnTCI = match assetInfo(usdcUsdnLPTCI) { | |
123 | 123 | case q: Asset => | |
124 | 124 | q.quantity | |
125 | 125 | case _ => | |
126 | 126 | 0 | |
127 | 127 | } | |
128 | 128 | let usdcUsdnStaked = valueOrElse(getInteger(this, keyUSDCUSDN), 0) | |
129 | 129 | let singleUsdcLP = fraction(usdcUsdnTCI, def, usdcUsdnStaked) | |
130 | 130 | let usdcLpToWithdraw = fraction(singleUsdcLP, am, def) | |
131 | 131 | let fee = fraction(usdcLpToWithdraw, def, feePerc) | |
132 | 132 | let usdcUsdnLPFee = ScriptTransfer(Address(tw), fee, usdcUsdnLP) | |
133 | 133 | let usdcUsdnTransfer = ScriptTransfer(i.caller, (am - fee), usdcUsdnLP) | |
134 | 134 | let updateUsdcUsdnLpStaked = IntegerEntry(keyUSDCUSDN, (usdcUsdnStaked - usdcLpToWithdraw)) | |
135 | 135 | let burnUsdcUsdnLpTci = Burn(usdcUsdnLPTCI, am) | |
136 | 136 | if ((burnUsdcUsdnLpTci == burnUsdcUsdnLpTci)) | |
137 | 137 | then [usdcUsdnLPFee, usdcUsdnTransfer, updateUsdcUsdnLpStaked] | |
138 | 138 | else throw("Strict value is not equal to itself.") | |
139 | 139 | } | |
140 | 140 | else if ((id == usdcUsdtLPTCI)) | |
141 | 141 | then { | |
142 | 142 | let usdcUsdtTci = match assetInfo(usdcUsdnLPTCI) { | |
143 | 143 | case q: Asset => | |
144 | 144 | q.quantity | |
145 | 145 | case _ => | |
146 | 146 | 0 | |
147 | 147 | } | |
148 | 148 | let usdcUsdtStaked = valueOrElse(getInteger(this, keyUSDCUSDT), 0) | |
149 | 149 | let singleUsdcUsdt = fraction(usdcUsdtTci, def, usdcUsdtStaked) | |
150 | 150 | let usdcUsdtLpToWithdraw = fraction(singleUsdcUsdt, am, def) | |
151 | 151 | let fee = fraction(usdcUsdtLpToWithdraw, def, feePerc) | |
152 | 152 | let usdcUsdtLPFee = ScriptTransfer(Address(tw), fee, usdcUsdtLP) | |
153 | 153 | let usdcUsdtTransfer = ScriptTransfer(i.caller, (am - fee), usdcUsdtLP) | |
154 | 154 | let updateUsdcUsdtLpStaked = IntegerEntry(keyUSDCUSDT, (usdcUsdtStaked - usdcUsdtLpToWithdraw)) | |
155 | 155 | let burnWxLpTci = Burn(usdcUsdnLPTCI, am) | |
156 | 156 | if ((burnWxLpTci == burnWxLpTci)) | |
157 | 157 | then [usdcUsdtLPFee, usdcUsdtTransfer, updateUsdcUsdtLpStaked] | |
158 | 158 | else throw("Strict value is not equal to itself.") | |
159 | 159 | } | |
160 | 160 | else if ((id == puzzleUsdnLPTCI)) | |
161 | 161 | then { | |
162 | 162 | let puzzleUsdnTci = match assetInfo(puzzleUsdnLPTCI) { | |
163 | 163 | case q: Asset => | |
164 | 164 | q.quantity | |
165 | 165 | case _ => | |
166 | 166 | 0 | |
167 | 167 | } | |
168 | 168 | let puzzleLPStaked = valueOrElse(getInteger(this, keyPUZZLEUSDN), 0) | |
169 | 169 | let singlePuzzleUsdn = fraction(puzzleUsdnTci, def, puzzleLPStaked) | |
170 | 170 | let puzzleUsdnWithdraw = fraction(singlePuzzleUsdn, am, def) | |
171 | 171 | let fee = fraction(puzzleUsdnWithdraw, def, feePerc) | |
172 | 172 | let puzzleUsdnLPFee = ScriptTransfer(Address(tw), fee, puzzleUsdnLP) | |
173 | 173 | let puzzleUsdnTransfer = ScriptTransfer(i.caller, (am - fee), puzzleUsdnLP) | |
174 | 174 | let updatePuzzleUsdnLpStaked = IntegerEntry(keyPUZZLEUSDN, (puzzleLPStaked - puzzleUsdnWithdraw)) | |
175 | 175 | let burnPuzzleTCI = Burn(puzzleUsdnLPTCI, am) | |
176 | 176 | if ((burnPuzzleTCI == burnPuzzleTCI)) | |
177 | 177 | then [puzzleUsdnLPFee, puzzleUsdnTransfer, updatePuzzleUsdnLpStaked] | |
178 | 178 | else throw("Strict value is not equal to itself.") | |
179 | 179 | } | |
180 | 180 | else throw("Invalid asset") | |
181 | 181 | } | |
182 | 182 | ||
183 | 183 | ||
184 | 184 | ||
185 | 185 | @Callable(i) | |
186 | 186 | func depositWxUsdnLP () = { | |
187 | 187 | let pmt = value(i.payments[0]) | |
188 | 188 | let pmtAmount = pmt.amount | |
189 | 189 | if ((pmt.assetId != wxUsdnLP)) | |
190 | 190 | then throw("attach WXUSDNLP tokens only") | |
191 | 191 | else if (isStopped) | |
192 | 192 | then throw("smart contract is on lock") | |
193 | 193 | else { | |
194 | 194 | let tkStaked = valueOrElse(getInteger(this, keyWXUSDN), 0) | |
195 | 195 | let totalIssued = match assetInfo(wxUsdnLPTCI) { | |
196 | 196 | case asset: Asset => | |
197 | 197 | asset.quantity | |
198 | 198 | case _ => | |
199 | 199 | throw("Can't find asset") | |
200 | 200 | } | |
201 | 201 | let one = fraction(totalIssued, 100000000, tkStaked) | |
202 | 202 | let toIssue = fraction(pmtAmount, one, 100000000) | |
203 | 203 | let updateState = IntegerEntry(keyWXUSDN, (tkStaked + pmtAmount)) | |
204 | - | let LPstake = invoke(Address(base58' | |
204 | + | let LPstake = invoke(Address(base58'3Mx3zmXrMcLFCafMuPtXAzR4ZPVeZYb6qLz'), "stake", nil, [pmt]) | |
205 | 205 | if ((LPstake == LPstake)) | |
206 | 206 | then { | |
207 | 207 | let LPIssue = Reissue(wxUsdnLPTCI, toIssue, true) | |
208 | 208 | let transfer = ScriptTransfer(i.caller, toIssue, wxUsdnLPTCI) | |
209 | 209 | [LPIssue, transfer, updateState] | |
210 | 210 | } | |
211 | 211 | else throw("Strict value is not equal to itself.") | |
212 | 212 | } | |
213 | 213 | } | |
214 | 214 | ||
215 | 215 | ||
216 | 216 | ||
217 | 217 | @Callable(i) | |
218 | 218 | func depositUsdtUsdnLP () = { | |
219 | 219 | let pmt = value(i.payments[0]) | |
220 | 220 | let pmtAmount = pmt.amount | |
221 | 221 | if ((pmt.assetId != usdtUsdnLP)) | |
222 | 222 | then throw("attach USDTUSDNLP tokens only") | |
223 | 223 | else if (isStopped) | |
224 | 224 | then throw("smart contract is on lock") | |
225 | 225 | else { | |
226 | 226 | let tkStaked = valueOrElse(getInteger(this, keyStaked), 0) | |
227 | 227 | let totalIssued = match assetInfo(usdtUsdnLPTCI) { | |
228 | 228 | case asset: Asset => | |
229 | 229 | asset.quantity | |
230 | 230 | case _ => | |
231 | 231 | throw("Can't find asset") | |
232 | 232 | } | |
233 | 233 | let fromCompound = valueOrElse(getInteger(this, keyCompound), 0) | |
234 | 234 | let forOne = fraction(totalIssued, 100000000, tkStaked) | |
235 | 235 | let toIssue = fraction(pmtAmount, forOne, 100000000) | |
236 | 236 | let updateState = IntegerEntry(keyStaked, (tkStaked + pmtAmount)) | |
237 | 237 | let LPstake = invoke(Address(base58'3PPNhHYkkEy13gRWDCaruQyhNbX2GrjYSyV'), "stake", nil, [pmt]) | |
238 | 238 | if ((LPstake == LPstake)) | |
239 | 239 | then { | |
240 | 240 | let LPIssue = Reissue(usdtUsdnLPTCI, toIssue, true) | |
241 | 241 | let transfer = ScriptTransfer(i.caller, toIssue, usdtUsdnLPTCI) | |
242 | 242 | [LPIssue, transfer, updateState] | |
243 | 243 | } | |
244 | 244 | else throw("Strict value is not equal to itself.") | |
245 | 245 | } | |
246 | 246 | } | |
247 | 247 | ||
248 | 248 | ||
249 | 249 | ||
250 | 250 | @Callable(i) | |
251 | 251 | func depositUsdcUsdnLP () = { | |
252 | 252 | let pmt = value(i.payments[0]) | |
253 | 253 | let pmtAmount = pmt.amount | |
254 | 254 | if ((pmt.assetId != usdcUsdnLP)) | |
255 | 255 | then throw("attach USDCUSDNLP tokens only") | |
256 | 256 | else if (isStopped) | |
257 | 257 | then throw("smart contract is on lock") | |
258 | 258 | else { | |
259 | 259 | let tkStaked = valueOrElse(getInteger(this, keyUSDCUSDN), 0) | |
260 | 260 | let totalIssued = match assetInfo(usdcUsdnLPTCI) { | |
261 | 261 | case asset: Asset => | |
262 | 262 | asset.quantity | |
263 | 263 | case _ => | |
264 | 264 | throw("Can't find asset") | |
265 | 265 | } | |
266 | 266 | let fromCompound = valueOrElse(getInteger(this, keyUsdcUsdnCompound), 0) | |
267 | 267 | let forOne = fraction(totalIssued, 100000000, tkStaked) | |
268 | 268 | let toIssue = fraction(pmtAmount, forOne, 100000000) | |
269 | 269 | let updateState = IntegerEntry(keyUSDCUSDN, (tkStaked + pmtAmount)) | |
270 | 270 | let LPstake = invoke(Address(base58'3PPNhHYkkEy13gRWDCaruQyhNbX2GrjYSyV'), "stake", nil, [pmt]) | |
271 | 271 | if ((LPstake == LPstake)) | |
272 | 272 | then { | |
273 | 273 | let LPIssue = Reissue(usdcUsdnLPTCI, toIssue, true) | |
274 | 274 | let transfer = ScriptTransfer(i.caller, toIssue, usdcUsdnLPTCI) | |
275 | 275 | [LPIssue, transfer, updateState] | |
276 | 276 | } | |
277 | 277 | else throw("Strict value is not equal to itself.") | |
278 | 278 | } | |
279 | 279 | } | |
280 | 280 | ||
281 | 281 | ||
282 | 282 | ||
283 | 283 | @Callable(i) | |
284 | 284 | func depositUsdcUsdtLP () = { | |
285 | 285 | let pmt = value(i.payments[0]) | |
286 | 286 | let pmtAmount = pmt.amount | |
287 | 287 | if ((pmt.assetId != usdcUsdtLP)) | |
288 | 288 | then throw("attach USDCUSDTLP tokens only") | |
289 | 289 | else if (isStopped) | |
290 | 290 | then throw("smart contract is on lock") | |
291 | 291 | else { | |
292 | 292 | let tkStaked = valueOrElse(getInteger(this, keyUSDCUSDT), 0) | |
293 | 293 | let totalIssued = match assetInfo(usdcUsdtLPTCI) { | |
294 | 294 | case asset: Asset => | |
295 | 295 | asset.quantity | |
296 | 296 | case _ => | |
297 | 297 | throw("Can't find asset") | |
298 | 298 | } | |
299 | 299 | let fromCompound = valueOrElse(getInteger(this, keyUsdcUsdtCompound), 0) | |
300 | 300 | let forOne = fraction(totalIssued, 100000000, tkStaked) | |
301 | 301 | let toIssue = fraction(pmtAmount, forOne, 100000000) | |
302 | 302 | let updateState = IntegerEntry(keyUSDCUSDT, (tkStaked + pmtAmount)) | |
303 | 303 | let LPstake = invoke(Address(base58'3PPNhHYkkEy13gRWDCaruQyhNbX2GrjYSyV'), "stake", nil, [pmt]) | |
304 | 304 | if ((LPstake == LPstake)) | |
305 | 305 | then { | |
306 | 306 | let LPIssue = Reissue(usdcUsdtLPTCI, toIssue, true) | |
307 | 307 | let transfer = ScriptTransfer(i.caller, toIssue, usdcUsdtLPTCI) | |
308 | 308 | [LPIssue, transfer, updateState] | |
309 | 309 | } | |
310 | 310 | else throw("Strict value is not equal to itself.") | |
311 | 311 | } | |
312 | 312 | } | |
313 | 313 | ||
314 | 314 | ||
315 | 315 | ||
316 | 316 | @Callable(i) | |
317 | 317 | func depositPuzzleUsdnLP () = { | |
318 | 318 | let pmt = value(i.payments[0]) | |
319 | 319 | let pmtAmount = pmt.amount | |
320 | 320 | if ((pmt.assetId != puzzleUsdnLP)) | |
321 | 321 | then throw("attach PUZZLEUDSNLP tokens only") | |
322 | 322 | else if (isStopped) | |
323 | 323 | then throw("smart contract is on lock") | |
324 | 324 | else { | |
325 | 325 | let tkStaked = valueOrElse(getInteger(this, keyPUZZLEUSDN), 0) | |
326 | 326 | let totalIssued = match assetInfo(puzzleUsdnLPTCI) { | |
327 | 327 | case asset: Asset => | |
328 | 328 | asset.quantity | |
329 | 329 | case _ => | |
330 | 330 | throw("Can't find asset") | |
331 | 331 | } | |
332 | 332 | let fromCompound = valueOrElse(getInteger(this, keyPuzzleUsdnCompound), 0) | |
333 | 333 | let forOne = fraction(totalIssued, 100000000, tkStaked) | |
334 | 334 | let toIssue = fraction(pmtAmount, forOne, 100000000) | |
335 | 335 | let updateState = IntegerEntry(keyPUZZLEUSDN, (tkStaked + pmtAmount)) | |
336 | 336 | let LPstake = invoke(Address(base58'3PPNhHYkkEy13gRWDCaruQyhNbX2GrjYSyV'), "stake", nil, [pmt]) | |
337 | 337 | if ((LPstake == LPstake)) | |
338 | 338 | then { | |
339 | 339 | let LPIssue = Reissue(puzzleUsdnLPTCI, toIssue, true) | |
340 | 340 | let transfer = ScriptTransfer(i.caller, toIssue, puzzleUsdnLPTCI) | |
341 | 341 | [LPIssue, transfer, updateState] | |
342 | 342 | } | |
343 | 343 | else throw("Strict value is not equal to itself.") | |
344 | 344 | } | |
345 | 345 | } | |
346 | 346 | ||
347 | 347 | ||
348 | 348 | ||
349 | 349 | @Callable(i) | |
350 | 350 | func compoundWxUsdnLP () = { | |
351 | 351 | let compound = value(i.payments[0]) | |
352 | 352 | let ca = compound.amount | |
353 | 353 | let isOracle = checkAddress(i.caller.bytes) | |
354 | 354 | if ((compound.assetId != wxUsdnLP)) | |
355 | 355 | then throw("attach WXUSDNLP tokens only") | |
356 | 356 | else if (!(isOracle)) | |
357 | 357 | then throw("You are not authotized to call this function") | |
358 | 358 | else { | |
359 | 359 | let fromCompound = valueOrElse(getInteger(this, keywxUsdnCompound), 0) | |
360 | 360 | let totalStaked = valueOrElse(getInteger(this, keyWXUSDN), 0) | |
361 | 361 | let stakeC = invoke(Address(base58'3PPNhHYkkEy13gRWDCaruQyhNbX2GrjYSyV'), "stake", nil, [compound]) | |
362 | 362 | if ((stakeC == stakeC)) | |
363 | 363 | then { | |
364 | 364 | let updateState = IntegerEntry(keyWXUSDN, (totalStaked + ca)) | |
365 | 365 | let tc = IntegerEntry(keywxUsdnCompound, (fromCompound + ca)) | |
366 | 366 | [updateState, tc] | |
367 | 367 | } | |
368 | 368 | else throw("Strict value is not equal to itself.") | |
369 | 369 | } | |
370 | 370 | } | |
371 | 371 | ||
372 | 372 | ||
373 | 373 | ||
374 | 374 | @Callable(i) | |
375 | 375 | func compoundUsdtUsdnLP () = { | |
376 | 376 | let compound = value(i.payments[0]) | |
377 | 377 | let ca = compound.amount | |
378 | 378 | let isOracle = checkAddress(i.caller.bytes) | |
379 | 379 | if ((compound.assetId != usdtUsdnLP)) | |
380 | 380 | then throw("attach USDTUSDNLP tokens only") | |
381 | 381 | else if (!(isOracle)) | |
382 | 382 | then throw("You are not authotized to call this function") | |
383 | 383 | else { | |
384 | 384 | let fromCompound = valueOrElse(getInteger(this, keyCompound), 0) | |
385 | 385 | let totalStaked = valueOrElse(getInteger(this, keyStaked), 0) | |
386 | 386 | let stakeC = invoke(Address(base58'3PPNhHYkkEy13gRWDCaruQyhNbX2GrjYSyV'), "stake", nil, [compound]) | |
387 | 387 | if ((stakeC == stakeC)) | |
388 | 388 | then { | |
389 | 389 | let updateState = IntegerEntry(keyStaked, (totalStaked + ca)) | |
390 | 390 | let tc = IntegerEntry(keyCompound, (fromCompound + ca)) | |
391 | 391 | [updateState, tc] | |
392 | 392 | } | |
393 | 393 | else throw("Strict value is not equal to itself.") | |
394 | 394 | } | |
395 | 395 | } | |
396 | 396 | ||
397 | 397 | ||
398 | 398 | ||
399 | 399 | @Callable(i) | |
400 | 400 | func compoundUsdcUsdnLP () = { | |
401 | 401 | let compound = value(i.payments[0]) | |
402 | 402 | let ca = compound.amount | |
403 | 403 | let isOracle = checkAddress(i.caller.bytes) | |
404 | 404 | if ((compound.assetId != usdcUsdnLP)) | |
405 | 405 | then throw("attach USDCUSDNLP tokens only") | |
406 | 406 | else if (!(isOracle)) | |
407 | 407 | then throw("You are not authotized to call this function") | |
408 | 408 | else { | |
409 | 409 | let fromCompound = valueOrElse(getInteger(this, keyUsdcUsdnCompound), 0) | |
410 | 410 | let totalStaked = valueOrElse(getInteger(this, keyUSDCUSDN), 0) | |
411 | 411 | let stakeC = invoke(Address(base58'3PPNhHYkkEy13gRWDCaruQyhNbX2GrjYSyV'), "stake", nil, [compound]) | |
412 | 412 | if ((stakeC == stakeC)) | |
413 | 413 | then { | |
414 | 414 | let updateState = IntegerEntry(keyUSDCUSDN, (totalStaked + ca)) | |
415 | 415 | let tc = IntegerEntry(keyUsdcUsdnCompound, (fromCompound + ca)) | |
416 | 416 | [updateState, tc] | |
417 | 417 | } | |
418 | 418 | else throw("Strict value is not equal to itself.") | |
419 | 419 | } | |
420 | 420 | } | |
421 | 421 | ||
422 | 422 | ||
423 | 423 | ||
424 | 424 | @Callable(i) | |
425 | 425 | func compoundUsdcUsdtLP () = { | |
426 | 426 | let compound = value(i.payments[0]) | |
427 | 427 | let ca = compound.amount | |
428 | 428 | let isOracle = checkAddress(i.caller.bytes) | |
429 | 429 | if ((compound.assetId != usdcUsdtLP)) | |
430 | 430 | then throw("attach USDCUSDTLP tokens only") | |
431 | 431 | else if (!(isOracle)) | |
432 | 432 | then throw("You are not authotized to call this function") | |
433 | 433 | else { | |
434 | 434 | let fromCompound = valueOrElse(getInteger(this, keyUsdcUsdtCompound), 0) | |
435 | 435 | let totalStaked = valueOrElse(getInteger(this, keyUSDCUSDT), 0) | |
436 | 436 | let stakeC = invoke(Address(base58'3PPNhHYkkEy13gRWDCaruQyhNbX2GrjYSyV'), "stake", nil, [compound]) | |
437 | 437 | if ((stakeC == stakeC)) | |
438 | 438 | then { | |
439 | 439 | let updateState = IntegerEntry(keyUSDCUSDT, (totalStaked + ca)) | |
440 | 440 | let tc = IntegerEntry(keyUsdcUsdtCompound, (fromCompound + ca)) | |
441 | 441 | [updateState, tc] | |
442 | 442 | } | |
443 | 443 | else throw("Strict value is not equal to itself.") | |
444 | 444 | } | |
445 | 445 | } | |
446 | 446 | ||
447 | 447 | ||
448 | 448 | ||
449 | 449 | @Callable(i) | |
450 | 450 | func compoundPuzzleUsdnLP () = { | |
451 | 451 | let compound = value(i.payments[0]) | |
452 | 452 | let ca = compound.amount | |
453 | 453 | let isOracle = checkAddress(i.caller.bytes) | |
454 | 454 | if ((compound.assetId != puzzleUsdnLP)) | |
455 | 455 | then throw("attach PUZZLEUSDNLP tokens only") | |
456 | 456 | else if (!(isOracle)) | |
457 | 457 | then throw("You are not authotized to call this function") | |
458 | 458 | else { | |
459 | 459 | let fromCompound = valueOrElse(getInteger(this, keyPuzzleUsdnCompound), 0) | |
460 | 460 | let totalStaked = valueOrElse(getInteger(this, keyPUZZLEUSDN), 0) | |
461 | 461 | let stakeC = invoke(Address(base58'3PPNhHYkkEy13gRWDCaruQyhNbX2GrjYSyV'), "stake", nil, [compound]) | |
462 | 462 | if ((stakeC == stakeC)) | |
463 | 463 | then { | |
464 | 464 | let updateState = IntegerEntry(keyPUZZLEUSDN, (totalStaked + ca)) | |
465 | 465 | let tc = IntegerEntry(keyPuzzleUsdnCompound, (fromCompound + ca)) | |
466 | 466 | [updateState, tc] | |
467 | 467 | } | |
468 | 468 | else throw("Strict value is not equal to itself.") | |
469 | 469 | } | |
470 | 470 | } | |
471 | 471 | ||
472 | 472 | ||
473 | 473 | ||
474 | 474 | @Callable(i) | |
475 | 475 | func sponsorBoost () = { | |
476 | 476 | let pm = value(i.payments[0]) | |
477 | 477 | let lockPeriod = 100 | |
478 | 478 | if ((pm.assetId != wxId)) | |
479 | 479 | then throw("Error") | |
480 | 480 | else { | |
481 | 481 | let sponsored = valueOrElse(getInteger(this, keySponsorship), 0) | |
482 | 482 | let lock = invoke(Address(base58'3PJL8Hn8LACaSBWLQ3UVhctA5cTQLBFwBAP'), "increaseLock", [lockPeriod], [pm]) | |
483 | 483 | if ((lock == lock)) | |
484 | 484 | then { | |
485 | 485 | let s = IntegerEntry(keySponsorship, (pm.amount + sponsored)) | |
486 | 486 | [s] | |
487 | 487 | } | |
488 | 488 | else throw("Strict value is not equal to itself.") | |
489 | 489 | } | |
490 | 490 | } | |
491 | 491 | ||
492 | 492 | ||
493 | 493 | ||
494 | 494 | @Callable(i) | |
495 | 495 | func initWX () = { | |
496 | 496 | let pm = value(i.payments[0]) | |
497 | 497 | let am = pm.amount | |
498 | 498 | if ((pm.assetId != wxUsdnLP)) | |
499 | 499 | then throw("Unexpected token") | |
500 | 500 | else { | |
501 | 501 | let s = invoke(Address(base58'3Mx3zmXrMcLFCafMuPtXAzR4ZPVeZYb6qLz'), "stake", nil, [pm]) | |
502 | 502 | if ((s == s)) | |
503 | 503 | then { | |
504 | 504 | let upd = IntegerEntry(keyWXUSDN, am) | |
505 | 505 | let updK = IntegerEntry(keywxUsdnCompound, 0) | |
506 | 506 | [upd, updK] | |
507 | 507 | } | |
508 | 508 | else throw("Strict value is not equal to itself.") | |
509 | 509 | } | |
510 | 510 | } | |
511 | 511 | ||
512 | 512 | ||
513 | 513 | @Verifier(tx) | |
514 | 514 | func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
515 | 515 |
github/deemru/w8io/026f985 73.97 ms ◑