tx · 4p27Ei2LgoqxkPStNyzyNjY31RfgTN88R341B365bt4U 3N8n6BtTBKRZBoPuMzaPBH9FyJhfv9xDFJH: -0.01400000 Waves 2022.07.26 15:53 [2156788] smart account 3N8n6BtTBKRZBoPuMzaPBH9FyJhfv9xDFJH > SELF 0.00000000 Waves
{ "type": 13, "id": "4p27Ei2LgoqxkPStNyzyNjY31RfgTN88R341B365bt4U", "fee": 1400000, "feeAssetId": null, "timestamp": 1658840047020, "version": 2, "chainId": 84, "sender": "3N8n6BtTBKRZBoPuMzaPBH9FyJhfv9xDFJH", "senderPublicKey": "4hcnYaYoB2XaCzyJ7wfePpG7EfTd6st6aCAhkskJ9cQ5", "proofs": [ "5zFeFBtGSEDEURtSteBzuByjwPrjoE7icTJBXtn4Kycwxwq3pCjRaBcCHGGu2BPniLiqeYHXNdxyRHpy28JrPGoV" ], "script": "base64:BgIeCAISABIAEgASABIAEgASABIAEgASABIAEgASABIAHQAKdXNkdFVzZG5MUAEg202DNWRHG5bvnwwvoM991XmdkujhmzUPwT/MewJwKQsADXVzZHRVc2RuTFBUQ0kBIAqBzantQGEdmEq4Oth6BGhTCCbAyZjxYcEpfvod3iryAAh3eFVzZG5MUAEgG7mhj3vOTKXN+s5HyQsWjk32W97C65PB1sWo0bGqCxwAC3d4VXNkbkxQVENJASC37N3mGwJ72rYTh/1V0NY8tseiNz1LiL3Be29IRACYLwAKdXNkY1VzZG5MUAEgA2kB/BsKmAqIzY/+EVmFhSaRMrNakvwm6Uhd05/eXHYADXVzZGNVc2RuTFBUQ0kBIPYCN93Tn++GRS9cI0cPlV/ROm2hK8KntJtUQQdS9W7GAAp1c2RjVXNkdExQASDG+KR0G1ZIVhCfkH7CM/Qxa4sESiwr/ZlLh/WFm3zkjAANdXNkY1VzZHRMUFRDSQEgAsaFfARLM8fi74dnh1L7VYL9s9+EI7agWsU13c9XSv4ADHB1enpsZVVzZG5MUAEgwzPGdM4jqqQi30kk5cSZa3gEsHdWgnT/uNEdSo0c0Z4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2V5d3hVc2RuQ29tcG91bmQAAAkAzAgCBQN1cGQJAMwIAgUEdXBkSwUDbmlsCQACAQIkU3RyaWN0IHZhbHVlIGlzIG5vdCBlcXVhbCB0byBpdHNlbGYuAQJ0eAEGdmVyaWZ5AAkA9AMDCAUCdHgJYm9keUJ5dGVzCQCRAwIIBQJ0eAZwcm9vZnMAAAgFAnR4D3NlbmRlclB1YmxpY0tledUz9hc=", "height": 2156788, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 8ALAcrMXj7qSSTopDNd3iJunXv7TVx9FRQ732fU8T6Sy Next: 8jKD68yjCcXXkBQjusT8gMB6KnkQ6rJKhpUGzSTeziA6 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], nil) | |
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], nil) | |
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/026f985 79.68 ms ◑