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