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