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