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