tx · 82FDeRevXxKDHHaBfixvgMcjX2TtM2tTWZ7LKfU2Pndw 3N3DnVffnUyZtz2MRbk5U7giN112WempMNd: -0.02900000 Waves 2023.03.21 11:29 [2499542] smart account 3N3DnVffnUyZtz2MRbk5U7giN112WempMNd > SELF 0.00000000 Waves
{ "type": 13, "id": "82FDeRevXxKDHHaBfixvgMcjX2TtM2tTWZ7LKfU2Pndw", "fee": 2900000, "feeAssetId": null, "timestamp": 1679387371522, "version": 2, "chainId": 84, "sender": "3N3DnVffnUyZtz2MRbk5U7giN112WempMNd", "senderPublicKey": "3c1wAgvTRCNXCGMidVnB1j4gTYUqtwHR9tNNu2v4ZUNk", "proofs": [ "4La4BmyLsPSV9fEf3oVy2vhGSRkssEhFa7adxvoYZ3mLckgDPaRdNznGm1e7t4tbskf5Nfs3YsvzsVMddTDXuLfy" ], "script": "base64:BgKCAQgCEgASBAoCCAESBAoCCAESABIDCgEIEgQKAggBEgQKAggBEgQKAggBEgASBgoECAgICBIECgIICBIECgIICBIDCgEEEgMKAQgSAwoBBBIICgYECAEICAgSBQoDBAgIEgYKBAQIBAgSAwoBBBIECgIIBBIECgIIBBIDCgEEEgMKAQQeABJyZXNlcnZlRnVuZEFkZHJlc3MJAQdBZGRyZXNzAQEaAVR5kbUvJUKjlFFOUXUmV1bpUpTF5flA7NkAC3Jlc2VydmVGdW5kABQAEWFnZ3JlZ2F0b3JBZGRyZXNzCQEHQWRkcmVzcwEBGgFUeZG1LyVCo5RRTlF1JldW6VKUxeX5QOzZAAlvcmFjbGVTdHICIzNONEtiTW5KSDhGYU05NGpxeE5GZTJveVo4R0I3Wjh5VkJQABFzaHV0ZG93bldoaXRlbGlzdAkAzAgCARoBV9fhI1GOfKuIWtXXKJd12Ih104+uIwWm4QkAzAgCARoBV2MNA4Gmf1tU0hy55Cgq86eANPDYtY3VZQkAzAgCARoBV7PVklRJCZoqEPvG+J8QdqvvPw9ypYkVjAkAzAgCARoBV/j6+gImwFGL7Go7RjNJ0hxxsH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keUJ5dGVzCQCRAwIIBQJ0eAZwcm9vZnMAAAgFAnR4D3NlbmRlclB1YmxpY0tleesHjrc=", "height": 2499542, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 8NcsJ8Pf63RnE8RTxhmSRM6s5MMrtPuX4mAHzUWejj8K Next: FpUqhCxdVrAckQS3XYrssKBtFUMMbERUEh11x89LsiYz Diff:
Old | New | Differences | |
---|---|---|---|
7 | 7 | ||
8 | 8 | let aggregatorAddress = Address(base58'3Mzzt65puEs2W9M1m9iFBvMEdfM5bASE1hJ') | |
9 | 9 | ||
10 | - | let oracleStr = " | |
10 | + | let oracleStr = "3N4KbMnJH8FaM94jqxNFe2oyZ8GB7Z8yVBP" | |
11 | 11 | ||
12 | 12 | let shutdownWhitelist = [base58'3PMcMiMEs6w56NRGacksXtFG5zS7doE9fpL', base58'3PAxdDSmN758L5SHSGRC5apEtQE2aApZotG', base58'3PJKmXoHJvVeQXjSJdhtkUcFDtdiQqMbUTD', base58'3PQdNxynJy5mche2kxMVc5shXWzK8Gstq3o', base58'3PHbdpaKzz8EiAngGHaFu2hVuNCdsC67qh3', base58'3P6Ksahs71SiKQgQ4qaZuFAVhqncdi2nvJQ'] | |
13 | 13 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let reserveFundAddress = Address(base58'3Mzzt65puEs2W9M1m9iFBvMEdfM5bASE1hJ') | |
5 | 5 | ||
6 | 6 | let reserveFund = 20 | |
7 | 7 | ||
8 | 8 | let aggregatorAddress = Address(base58'3Mzzt65puEs2W9M1m9iFBvMEdfM5bASE1hJ') | |
9 | 9 | ||
10 | - | let oracleStr = " | |
10 | + | let oracleStr = "3N4KbMnJH8FaM94jqxNFe2oyZ8GB7Z8yVBP" | |
11 | 11 | ||
12 | 12 | let shutdownWhitelist = [base58'3PMcMiMEs6w56NRGacksXtFG5zS7doE9fpL', base58'3PAxdDSmN758L5SHSGRC5apEtQE2aApZotG', base58'3PJKmXoHJvVeQXjSJdhtkUcFDtdiQqMbUTD', base58'3PQdNxynJy5mche2kxMVc5shXWzK8Gstq3o', base58'3PHbdpaKzz8EiAngGHaFu2hVuNCdsC67qh3', base58'3P6Ksahs71SiKQgQ4qaZuFAVhqncdi2nvJQ'] | |
13 | 13 | ||
14 | 14 | func verifyLiquidatorRights (address) = !((address != Address(base58'3Mzzt65puEs2W9M1m9iFBvMEdfM5bASE1hJ'))) | |
15 | 15 | ||
16 | 16 | ||
17 | 17 | func getRateCurve (assetIdStr) = match assetIdStr { | |
18 | 18 | case _ => | |
19 | 19 | if (("FLdC14nUVRyiSYjVrMo3X4g8rXQjLbNRaGAyQAm8V68V" == $match0)) | |
20 | 20 | then $Tuple4(2000000, 25000000, 80000000, 100000000) | |
21 | 21 | else if (("25FEqEjRkqK6yCkiT7Lz6SAYz7gUFCtxfCChnrVFD5AT" == $match0)) | |
22 | 22 | then $Tuple4(2000000, 25000000, 80000000, 100000000) | |
23 | 23 | else if (("WAVES" == $match0)) | |
24 | 24 | then $Tuple4(2000000, 30000000, 80000000, 50000000) | |
25 | 25 | else $Tuple4(0, 20000000, 80000000, 80000000) | |
26 | 26 | } | |
27 | 27 | ||
28 | 28 | ||
29 | 29 | let Scale8 = 100000000 | |
30 | 30 | ||
31 | 31 | let Scale10 = 10000000000 | |
32 | 32 | ||
33 | 33 | let Scale16 = (Scale8 * Scale8) | |
34 | 34 | ||
35 | 35 | let dayBlocks = 1440 | |
36 | 36 | ||
37 | 37 | func liIntToStr (li) = { | |
38 | 38 | func f (accum,next) = ((accum + toString(next)) + ",") | |
39 | 39 | ||
40 | 40 | let $l = li | |
41 | 41 | let $s = size($l) | |
42 | 42 | let $acc0 = "" | |
43 | 43 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
44 | 44 | then $a | |
45 | 45 | else f($a, $l[$i]) | |
46 | 46 | ||
47 | 47 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
48 | 48 | then $a | |
49 | 49 | else throw("List size exceeds 6") | |
50 | 50 | ||
51 | 51 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6) | |
52 | 52 | } | |
53 | 53 | ||
54 | 54 | ||
55 | 55 | func tryGetInteger (key) = match getInteger(this, key) { | |
56 | 56 | case b: Int => | |
57 | 57 | b | |
58 | 58 | case _ => | |
59 | 59 | 0 | |
60 | 60 | } | |
61 | 61 | ||
62 | 62 | ||
63 | 63 | func tryGetBoolean (key) = match getBoolean(this, key) { | |
64 | 64 | case b: Boolean => | |
65 | 65 | b | |
66 | 66 | case _ => | |
67 | 67 | false | |
68 | 68 | } | |
69 | 69 | ||
70 | 70 | ||
71 | 71 | func tryGetString (key) = match getString(this, key) { | |
72 | 72 | case b: String => | |
73 | 73 | b | |
74 | 74 | case _ => | |
75 | 75 | "" | |
76 | 76 | } | |
77 | 77 | ||
78 | 78 | ||
79 | 79 | func tryGetBinary (key) = match getBinary(this, key) { | |
80 | 80 | case b: ByteVector => | |
81 | 81 | b | |
82 | 82 | case _ => | |
83 | 83 | base58'' | |
84 | 84 | } | |
85 | 85 | ||
86 | 86 | ||
87 | 87 | func getAssetString (assetId) = match assetId { | |
88 | 88 | case b: ByteVector => | |
89 | 89 | toBase58String(b) | |
90 | 90 | case _ => | |
91 | 91 | "WAVES" | |
92 | 92 | } | |
93 | 93 | ||
94 | 94 | ||
95 | 95 | func getAssetBytes (assetIdStr) = if ((assetIdStr == "WAVES")) | |
96 | 96 | then unit | |
97 | 97 | else fromBase58String(assetIdStr) | |
98 | 98 | ||
99 | 99 | ||
100 | 100 | func getBalance (assetIdStr) = if ((assetIdStr == "WAVES")) | |
101 | 101 | then wavesBalance(this).available | |
102 | 102 | else assetBalance(this, fromBase58String(assetIdStr)) | |
103 | 103 | ||
104 | 104 | ||
105 | 105 | func getMarketAssets () = split(tryGetString("setup_tokens"), ",") | |
106 | 106 | ||
107 | 107 | ||
108 | 108 | func getAssetsMaxSupply () = { | |
109 | 109 | let s = tryGetString("setup_maxsupply") | |
110 | 110 | if ((s == "")) | |
111 | 111 | then [-1, -1, -1, -1, -1, -1, -1] | |
112 | 112 | else split(s, ",") | |
113 | 113 | } | |
114 | 114 | ||
115 | 115 | ||
116 | 116 | func getOutdatedUr (assetIdStr) = { | |
117 | 117 | let down = fraction(tryGetInteger(("total_supplied_" + assetIdStr)), tryGetInteger((assetIdStr + "_sRate")), Scale16) | |
118 | 118 | if ((down == 0)) | |
119 | 119 | then 0 | |
120 | 120 | else fraction(Scale8, fraction(tryGetInteger(("total_borrowed_" + assetIdStr)), tryGetInteger((assetIdStr + "_bRate")), Scale16), down) | |
121 | 121 | } | |
122 | 122 | ||
123 | 123 | ||
124 | 124 | func getInterest (assetIdStr) = { | |
125 | 125 | let ur = getOutdatedUr(assetIdStr) | |
126 | 126 | let curve = getRateCurve(assetIdStr) | |
127 | 127 | let rate = (curve._1 + (if ((curve._3 >= ur)) | |
128 | 128 | then fraction(ur, curve._2, curve._3) | |
129 | 129 | else (curve._2 + fraction((ur - curve._3), curve._4, (100000000 - curve._3))))) | |
130 | 130 | max([fraction(rate, Scale8, (dayBlocks * 365)), 1]) | |
131 | 131 | } | |
132 | 132 | ||
133 | 133 | ||
134 | 134 | func tokenRatesRecalc (assetIdStr) = { | |
135 | 135 | let interest = getInterest(assetIdStr) | |
136 | 136 | let ur = getOutdatedUr(assetIdStr) | |
137 | 137 | let lastRecalcHeight = tryGetInteger("lastRateHeight") | |
138 | 138 | let lastBRate = max([tryGetInteger((assetIdStr + "_bRate")), Scale16]) | |
139 | 139 | let newBRate = (lastBRate + ((height - lastRecalcHeight) * interest)) | |
140 | 140 | let lastSRate = max([tryGetInteger((assetIdStr + "_sRate")), Scale16]) | |
141 | 141 | let newSRate = (lastSRate + ((((height - lastRecalcHeight) * fraction(interest, ur, Scale8)) * (100 - reserveFund)) / 100)) | |
142 | 142 | [IntegerEntry((assetIdStr + "_sRate"), newSRate), IntegerEntry((assetIdStr + "_bRate"), newBRate), IntegerEntry("lastRateHeight", height)] | |
143 | 143 | } | |
144 | 144 | ||
145 | 145 | ||
146 | 146 | func getActualRate (assetIdStr,rateType) = { | |
147 | 147 | func f (accum,token) = { | |
148 | 148 | let recalc = tokenRatesRecalc(token) | |
149 | 149 | $Tuple2(if ((token != assetIdStr)) | |
150 | 150 | then accum._1 | |
151 | 151 | else if ((rateType == "sRate")) | |
152 | 152 | then recalc[0].value | |
153 | 153 | else recalc[1].value, (accum._2 ++ recalc)) | |
154 | 154 | } | |
155 | 155 | ||
156 | 156 | let $l = getMarketAssets() | |
157 | 157 | let $s = size($l) | |
158 | 158 | let $acc0 = $Tuple2(0, nil) | |
159 | 159 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
160 | 160 | then $a | |
161 | 161 | else f($a, $l[$i]) | |
162 | 162 | ||
163 | 163 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
164 | 164 | then $a | |
165 | 165 | else throw("List size exceeds 6") | |
166 | 166 | ||
167 | 167 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6) | |
168 | 168 | } | |
169 | 169 | ||
170 | 170 | ||
171 | 171 | func getUr (assetIdStr) = { | |
172 | 172 | let rates = tokenRatesRecalc(assetIdStr) | |
173 | 173 | let down = fraction(tryGetInteger(("total_supplied_" + assetIdStr)), rates[0].value, Scale16) | |
174 | 174 | fraction(Scale8, fraction(tryGetInteger(("total_borrowed_" + assetIdStr)), rates[1].value, Scale16), down) | |
175 | 175 | } | |
176 | 176 | ||
177 | 177 | ||
178 | 178 | func ratesRecalc () = { | |
179 | 179 | func f (accum,token) = (accum ++ tokenRatesRecalc(token)) | |
180 | 180 | ||
181 | 181 | let $l = getMarketAssets() | |
182 | 182 | let $s = size($l) | |
183 | 183 | let $acc0 = nil | |
184 | 184 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
185 | 185 | then $a | |
186 | 186 | else f($a, $l[$i]) | |
187 | 187 | ||
188 | 188 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
189 | 189 | then $a | |
190 | 190 | else throw("List size exceeds 6") | |
191 | 191 | ||
192 | 192 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6) | |
193 | 193 | } | |
194 | 194 | ||
195 | 195 | ||
196 | 196 | func getTokenPrice (assetIdStr) = { | |
197 | 197 | let inv3 = invoke(addressFromStringValue(oracleStr), "getTWAP60", [assetIdStr, false], nil) | |
198 | 198 | if ((inv3 == inv3)) | |
199 | 199 | then { | |
200 | 200 | let data3 = match inv3 { | |
201 | 201 | case x: (Int, Int) => | |
202 | 202 | x | |
203 | 203 | case _ => | |
204 | 204 | throw("error of price oracle") | |
205 | 205 | } | |
206 | 206 | if ((data3 == data3)) | |
207 | 207 | then data3 | |
208 | 208 | else throw("Strict value is not equal to itself.") | |
209 | 209 | } | |
210 | 210 | else throw("Strict value is not equal to itself.") | |
211 | 211 | } | |
212 | 212 | ||
213 | 213 | ||
214 | 214 | func calcAssetScale (assetIdStr) = { | |
215 | 215 | let decimals = if ((assetIdStr == "WAVES")) | |
216 | 216 | then 8 | |
217 | 217 | else value(assetInfo(fromBase58String(assetIdStr))).decimals | |
218 | 218 | pow(10, 0, decimals, 0, 0, DOWN) | |
219 | 219 | } | |
220 | 220 | ||
221 | 221 | ||
222 | 222 | func calcUserCollateral (address) = { | |
223 | 223 | let userCollateralInvoke = invoke(this, "getUserCollateral", [false, address, true, ""], nil) | |
224 | 224 | if ((userCollateralInvoke == userCollateralInvoke)) | |
225 | 225 | then { | |
226 | 226 | let userCollateralValue = match userCollateralInvoke { | |
227 | 227 | case x: Int => | |
228 | 228 | x | |
229 | 229 | case _ => | |
230 | 230 | throw("issue while doing in-dapp invocation") | |
231 | 231 | } | |
232 | 232 | if ((userCollateralValue == userCollateralValue)) | |
233 | 233 | then userCollateralValue | |
234 | 234 | else throw("Strict value is not equal to itself.") | |
235 | 235 | } | |
236 | 236 | else throw("Strict value is not equal to itself.") | |
237 | 237 | } | |
238 | 238 | ||
239 | 239 | ||
240 | 240 | @Callable(i) | |
241 | 241 | func supply () = if (!(tryGetBoolean("setup_active"))) | |
242 | 242 | then throw("market is stopped") | |
243 | 243 | else if (if ((size(i.payments) != 1)) | |
244 | 244 | then true | |
245 | 245 | else (i.payments[0].amount == 0)) | |
246 | 246 | then throw("1 payment has to be attached") | |
247 | 247 | else { | |
248 | 248 | let assetIdStr = getAssetString(i.payments[0].assetId) | |
249 | 249 | let assetAmount = i.payments[0].amount | |
250 | 250 | let $t067486815 = getActualRate(assetIdStr, "sRate") | |
251 | 251 | let sRate = $t067486815._1 | |
252 | 252 | let ratesRecalcResult = $t067486815._2 | |
253 | 253 | let amount = fraction(assetAmount, Scale16, sRate, DOWN) | |
254 | 254 | let address = toString(i.caller) | |
255 | 255 | let maxSupply = match getString(("setup_maxSupply_" + assetIdStr)) { | |
256 | 256 | case x: String => | |
257 | 257 | parseIntValue(x) | |
258 | 258 | case _ => | |
259 | 259 | 0 | |
260 | 260 | } | |
261 | 261 | let assetPrice = getTokenPrice(assetIdStr) | |
262 | 262 | let newTotalSupplied = (tryGetInteger(((address + "_supplied_") + assetIdStr)) + amount) | |
263 | 263 | let rate = getActualRate(assetIdStr, "sRate")._1 | |
264 | 264 | let assetScale = calcAssetScale(assetIdStr) | |
265 | 265 | let newTotalSuppliedUsd = fraction(fraction(newTotalSupplied, rate, Scale16), assetPrice._1, assetScale) | |
266 | 266 | if ((indexOf(tryGetString("setup_tokens"), assetIdStr) == unit)) | |
267 | 267 | then throw("this asset is not supported by the market") | |
268 | 268 | else if (if ((maxSupply != 0)) | |
269 | 269 | then (newTotalSuppliedUsd > maxSupply) | |
270 | 270 | else false) | |
271 | 271 | then throw("max total supply for this token reached in the pool") | |
272 | 272 | else ([IntegerEntry(((address + "_supplied_") + assetIdStr), newTotalSupplied), IntegerEntry(("total_supplied_" + assetIdStr), (tryGetInteger(("total_supplied_" + assetIdStr)) + amount))] ++ ratesRecalcResult) | |
273 | 273 | } | |
274 | 274 | ||
275 | 275 | ||
276 | 276 | ||
277 | 277 | @Callable(i) | |
278 | 278 | func withdraw (assetIdStr,assetAmount) = { | |
279 | 279 | let $t080758142 = getActualRate(assetIdStr, "sRate") | |
280 | 280 | let sRate = $t080758142._1 | |
281 | 281 | let ratesRecalcResult = $t080758142._2 | |
282 | 282 | let amount = fraction(assetAmount, Scale16, sRate, CEILING) | |
283 | 283 | let address = toString(i.caller) | |
284 | 284 | let assetSupplied = tryGetInteger(("total_supplied_" + assetIdStr)) | |
285 | 285 | let assetBorrowed = tryGetInteger(("total_borrowed_" + assetIdStr)) | |
286 | 286 | let userAssetSupplied = tryGetInteger(((address + "_supplied_") + assetIdStr)) | |
287 | 287 | let userAssetBorrowed = tryGetInteger(((address + "_borrowed_") + assetIdStr)) | |
288 | 288 | let collateralValueInv = invoke(this, "getUserCollateral", [false, address, true, ((assetIdStr + ",supplied,") + toString(-(amount)))], nil) | |
289 | 289 | if ((collateralValueInv == collateralValueInv)) | |
290 | 290 | then { | |
291 | 291 | let collateralValue = match collateralValueInv { | |
292 | 292 | case x: Int => | |
293 | 293 | x | |
294 | 294 | case _ => | |
295 | 295 | throw("can't get user collateral value") | |
296 | 296 | } | |
297 | 297 | if (!(tryGetBoolean("setup_active"))) | |
298 | 298 | then throw("market is stopped") | |
299 | 299 | else if ((0 > collateralValue)) | |
300 | 300 | then throw("you dont have enough collateral for this operation") | |
301 | 301 | else if ((amount > (assetSupplied - assetBorrowed))) | |
302 | 302 | then throw("this amount is not available on the market") | |
303 | 303 | else if ((amount > (userAssetSupplied - userAssetBorrowed))) | |
304 | 304 | then throw("this amount is not available for this user") | |
305 | 305 | else ([IntegerEntry(((address + "_supplied_") + assetIdStr), (tryGetInteger(((address + "_supplied_") + assetIdStr)) - amount)), IntegerEntry(("total_supplied_" + assetIdStr), (tryGetInteger(("total_supplied_" + assetIdStr)) - amount)), ScriptTransfer(i.caller, assetAmount, getAssetBytes(assetIdStr))] ++ ratesRecalcResult) | |
306 | 306 | } | |
307 | 307 | else throw("Strict value is not equal to itself.") | |
308 | 308 | } | |
309 | 309 | ||
310 | 310 | ||
311 | 311 | ||
312 | 312 | @Callable(i) | |
313 | 313 | func borrow (assetIdStr,assetAmount) = { | |
314 | 314 | let address = toString(i.caller) | |
315 | 315 | let $t097149781 = getActualRate(assetIdStr, "bRate") | |
316 | 316 | let bRate = $t097149781._1 | |
317 | 317 | let ratesRecalcResult = $t097149781._2 | |
318 | 318 | let amount = fraction(assetAmount, Scale16, bRate, CEILING) | |
319 | 319 | let collateralValueInv = invoke(this, "getUserCollateral", [false, address, true, ((assetIdStr + ",borrowed,") + toString(amount))], nil) | |
320 | 320 | if ((collateralValueInv == collateralValueInv)) | |
321 | 321 | then { | |
322 | 322 | let collateralValue = match collateralValueInv { | |
323 | 323 | case x: Int => | |
324 | 324 | x | |
325 | 325 | case _ => | |
326 | 326 | throw("can't get user collateral value") | |
327 | 327 | } | |
328 | 328 | if (!(tryGetBoolean("setup_active"))) | |
329 | 329 | then throw("market is stopped") | |
330 | 330 | else if ((0 > collateralValue)) | |
331 | 331 | then throw("you have to supply more to borrow") | |
332 | 332 | else { | |
333 | 333 | let assetSupplied = tryGetInteger(("total_supplied_" + assetIdStr)) | |
334 | 334 | let assetBorrowed = tryGetInteger(("total_borrowed_" + assetIdStr)) | |
335 | 335 | let userAssetBorrowed = tryGetInteger(((address + "_borrowed_") + assetIdStr)) | |
336 | 336 | if ((amount > (assetSupplied - assetBorrowed))) | |
337 | 337 | then throw("this amount is not available") | |
338 | 338 | else ([IntegerEntry(((address + "_borrowed_") + assetIdStr), (userAssetBorrowed + amount)), IntegerEntry(("total_borrowed_" + assetIdStr), (assetBorrowed + amount)), ScriptTransfer(i.caller, assetAmount, getAssetBytes(assetIdStr))] ++ ratesRecalcResult) | |
339 | 339 | } | |
340 | 340 | } | |
341 | 341 | else throw("Strict value is not equal to itself.") | |
342 | 342 | } | |
343 | 343 | ||
344 | 344 | ||
345 | 345 | ||
346 | 346 | @Callable(i) | |
347 | 347 | func repay () = if (!(tryGetBoolean("setup_active"))) | |
348 | 348 | then throw("market is stopped") | |
349 | 349 | else if (if ((size(i.payments) != 1)) | |
350 | 350 | then true | |
351 | 351 | else (i.payments[0].amount == 0)) | |
352 | 352 | then throw("1 payment has to be attached") | |
353 | 353 | else { | |
354 | 354 | let assetIdStr = getAssetString(i.payments[0].assetId) | |
355 | 355 | let assetAmount = i.payments[0].amount | |
356 | 356 | let $t01128611353 = getActualRate(assetIdStr, "bRate") | |
357 | 357 | let bRate = $t01128611353._1 | |
358 | 358 | let ratesRecalcResult = $t01128611353._2 | |
359 | 359 | let amount = fraction(assetAmount, Scale16, bRate, CEILING) | |
360 | 360 | let address = toString(i.caller) | |
361 | 361 | let assetSupplied = tryGetInteger(("total_supplied_" + assetIdStr)) | |
362 | 362 | let assetBorrowed = tryGetInteger(("total_borrowed_" + assetIdStr)) | |
363 | 363 | let userAssetBorrowed = tryGetInteger(((address + "_borrowed_") + assetIdStr)) | |
364 | 364 | let amountLeft = (userAssetBorrowed - amount) | |
365 | 365 | let repayAmount = if ((amountLeft >= 0)) | |
366 | 366 | then amount | |
367 | 367 | else userAssetBorrowed | |
368 | 368 | if ((indexOf(tryGetString("setup_tokens"), assetIdStr) == unit)) | |
369 | 369 | then throw("this asset is not supported by the market") | |
370 | 370 | else (([IntegerEntry(((address + "_borrowed_") + assetIdStr), (userAssetBorrowed - repayAmount)), IntegerEntry(("total_borrowed_" + assetIdStr), (assetBorrowed - repayAmount))] ++ ratesRecalcResult) ++ (if ((amountLeft >= 0)) | |
371 | 371 | then nil | |
372 | 372 | else [ScriptTransfer(i.caller, -(amountLeft), i.payments[0].assetId)])) | |
373 | 373 | } | |
374 | 374 | ||
375 | 375 | ||
376 | 376 | ||
377 | 377 | @Callable(i) | |
378 | 378 | func stakeTokenAll (assetIdStr) = if ((i.caller != this)) | |
379 | 379 | then throw("only for internal smart contract invocations") | |
380 | 380 | else { | |
381 | 381 | let amount = getBalance(assetIdStr) | |
382 | 382 | let inv = invoke(this, "stakeToken", [assetIdStr, amount], nil) | |
383 | 383 | if ((inv == inv)) | |
384 | 384 | then nil | |
385 | 385 | else throw("Strict value is not equal to itself.") | |
386 | 386 | } | |
387 | 387 | ||
388 | 388 | ||
389 | 389 | ||
390 | 390 | @Callable(i) | |
391 | 391 | func stakeToken (assetIdStr,amount) = if ((i.caller != this)) | |
392 | 392 | then throw("only for internal smart contract invocations") | |
393 | 393 | else if ((assetIdStr == "DG2xFkPdDwKUoBkzGAhQtLpSGzfXLiCYPEzeKH2Ad24p")) | |
394 | 394 | then { | |
395 | 395 | let amountStaked = tryGetInteger("autostake_amount_DG2xFkPdDwKUoBkzGAhQtLpSGzfXLiCYPEzeKH2Ad24p") | |
396 | 396 | let inv = invoke(Address(base58'3PNikM6yp4NqcSU8guxQtmR5onr2D4e8yTJ'), "stake", nil, [AttachedPayment(base58'DG2xFkPdDwKUoBkzGAhQtLpSGzfXLiCYPEzeKH2Ad24p', amount)]) | |
397 | 397 | if ((inv == inv)) | |
398 | 398 | then [IntegerEntry("autostake_amount_DG2xFkPdDwKUoBkzGAhQtLpSGzfXLiCYPEzeKH2Ad24p", (amountStaked + amount))] | |
399 | 399 | else throw("Strict value is not equal to itself.") | |
400 | 400 | } | |
401 | 401 | else if ((assetIdStr == "8t4DPWTwPzpatHA9AkTxWAB47THnYzBsDnoY7fQqbG91")) | |
402 | 402 | then { | |
403 | 403 | let amountStaked = tryGetInteger("autostake_amount_8t4DPWTwPzpatHA9AkTxWAB47THnYzBsDnoY7fQqbG91") | |
404 | 404 | let inv = invoke(Address(base58'3PQTM38wDmAY9vWonK6ha7QL3PAycLz5oPP'), "stake", nil, [AttachedPayment(base58'8t4DPWTwPzpatHA9AkTxWAB47THnYzBsDnoY7fQqbG91', amount)]) | |
405 | 405 | if ((inv == inv)) | |
406 | 406 | then [IntegerEntry("autostake_amount_8t4DPWTwPzpatHA9AkTxWAB47THnYzBsDnoY7fQqbG91", (amountStaked + amount))] | |
407 | 407 | else throw("Strict value is not equal to itself.") | |
408 | 408 | } | |
409 | 409 | else if ((assetIdStr == "At8D6NFFpheCbvKVnjVoeLL84Eo8NZn6ovManxfLaFWL")) | |
410 | 410 | then { | |
411 | 411 | let amountStaked = tryGetInteger("autostake_amount_At8D6NFFpheCbvKVnjVoeLL84Eo8NZn6ovManxfLaFWL") | |
412 | 412 | let inv = invoke(Address(base58'3PBiotFpqjRMkkeFBccnQNUXUopy7KFez5C'), "stake", nil, [AttachedPayment(base58'At8D6NFFpheCbvKVnjVoeLL84Eo8NZn6ovManxfLaFWL', amount)]) | |
413 | 413 | if ((inv == inv)) | |
414 | 414 | then [IntegerEntry("autostake_amount_At8D6NFFpheCbvKVnjVoeLL84Eo8NZn6ovManxfLaFWL", (amountStaked + amount))] | |
415 | 415 | else throw("Strict value is not equal to itself.") | |
416 | 416 | } | |
417 | 417 | else nil | |
418 | 418 | ||
419 | 419 | ||
420 | 420 | ||
421 | 421 | @Callable(i) | |
422 | 422 | func unstakeToken (assetIdStr,amount) = if ((i.caller != this)) | |
423 | 423 | then throw("only for internal smart contract invocations") | |
424 | 424 | else if ((assetIdStr == "8t4DPWTwPzpatHA9AkTxWAB47THnYzBsDnoY7fQqbG91")) | |
425 | 425 | then { | |
426 | 426 | let amountStaked = tryGetInteger("autostake_amount_8t4DPWTwPzpatHA9AkTxWAB47THnYzBsDnoY7fQqbG91") | |
427 | 427 | let inv = invoke(Address(base58'3PQTM38wDmAY9vWonK6ha7QL3PAycLz5oPP'), "unStake", [amount], nil) | |
428 | 428 | if ((inv == inv)) | |
429 | 429 | then [IntegerEntry("autostake_amount_8t4DPWTwPzpatHA9AkTxWAB47THnYzBsDnoY7fQqbG91", (amountStaked - amount))] | |
430 | 430 | else throw("Strict value is not equal to itself.") | |
431 | 431 | } | |
432 | 432 | else if ((assetIdStr == "At8D6NFFpheCbvKVnjVoeLL84Eo8NZn6ovManxfLaFWL")) | |
433 | 433 | then { | |
434 | 434 | let amountStaked = tryGetInteger("autostake_amount_At8D6NFFpheCbvKVnjVoeLL84Eo8NZn6ovManxfLaFWL") | |
435 | 435 | let inv = invoke(Address(base58'3PBiotFpqjRMkkeFBccnQNUXUopy7KFez5C'), "unstake", [amount], nil) | |
436 | 436 | if ((inv == inv)) | |
437 | 437 | then { | |
438 | 438 | let bal0 = getBalance("At8D6NFFpheCbvKVnjVoeLL84Eo8NZn6ovManxfLaFWL") | |
439 | 439 | if ((bal0 == bal0)) | |
440 | 440 | then { | |
441 | 441 | let inv2 = invoke(Address(base58'3PQrVbTVpqXHqpVKftkNdjy3zZAh4dsRzN6'), "gnsbtRewardsSYSREADONLY", [toString(this)], nil) | |
442 | 442 | if ((inv2 == inv2)) | |
443 | 443 | then { | |
444 | 444 | let topupRewards = match inv2 { | |
445 | 445 | case x: List[Any] => | |
446 | 446 | let secondEl = x[1] | |
447 | 447 | match secondEl { | |
448 | 448 | case secondEl: String => | |
449 | 449 | let usdnValue = parseIntValue(split(split(secondEl, "_")[1], ":")[1]) | |
450 | 450 | let wavesValue = parseIntValue(split(split(secondEl, "_")[0], ":")[1]) | |
451 | 451 | if (if ((usdnValue != 0)) | |
452 | 452 | then true | |
453 | 453 | else (wavesValue != 0)) | |
454 | 454 | then { | |
455 | 455 | let usdnBal0 = getBalance("DG2xFkPdDwKUoBkzGAhQtLpSGzfXLiCYPEzeKH2Ad24p") | |
456 | 456 | if ((usdnBal0 == usdnBal0)) | |
457 | 457 | then { | |
458 | 458 | let wavesBal0 = getBalance("WAVES") | |
459 | 459 | if ((wavesBal0 == wavesBal0)) | |
460 | 460 | then { | |
461 | 461 | let inv3 = invoke(Address(base58'3PBiotFpqjRMkkeFBccnQNUXUopy7KFez5C'), "claimRewards", nil, nil) | |
462 | 462 | if ((inv3 == inv3)) | |
463 | 463 | then { | |
464 | 464 | let wavesBal1 = getBalance("WAVES") | |
465 | 465 | if ((wavesBal1 == wavesBal1)) | |
466 | 466 | then { | |
467 | 467 | let inv4 = invoke(Address(base58'3PLiXyywNThdvf3vVEUxwc7TJTucjZvuegh'), "swap", ["DG2xFkPdDwKUoBkzGAhQtLpSGzfXLiCYPEzeKH2Ad24p", 0], [AttachedPayment(unit, (wavesBal1 - wavesBal0))]) | |
468 | 468 | if ((inv4 == inv4)) | |
469 | 469 | then { | |
470 | 470 | let usdnBal1 = getBalance("DG2xFkPdDwKUoBkzGAhQtLpSGzfXLiCYPEzeKH2Ad24p") | |
471 | 471 | if ((usdnBal1 == usdnBal1)) | |
472 | 472 | then { | |
473 | 473 | let inv5 = invoke(Address(base58'3P7r93vXHuusageNJVGwzqaz3WMotAu49Yz'), "swap", ["At8D6NFFpheCbvKVnjVoeLL84Eo8NZn6ovManxfLaFWL", 0], [AttachedPayment(base58'DG2xFkPdDwKUoBkzGAhQtLpSGzfXLiCYPEzeKH2Ad24p', (usdnBal1 - usdnBal0))]) | |
474 | 474 | if ((inv5 == inv5)) | |
475 | 475 | then { | |
476 | 476 | let inv6 = invoke(this, "addInterest", ["At8D6NFFpheCbvKVnjVoeLL84Eo8NZn6ovManxfLaFWL", (getBalance("At8D6NFFpheCbvKVnjVoeLL84Eo8NZn6ovManxfLaFWL") - bal0)], nil) | |
477 | 477 | if ((inv6 == inv6)) | |
478 | 478 | then 2 | |
479 | 479 | else throw("Strict value is not equal to itself.") | |
480 | 480 | } | |
481 | 481 | else throw("Strict value is not equal to itself.") | |
482 | 482 | } | |
483 | 483 | else throw("Strict value is not equal to itself.") | |
484 | 484 | } | |
485 | 485 | else throw("Strict value is not equal to itself.") | |
486 | 486 | } | |
487 | 487 | else throw("Strict value is not equal to itself.") | |
488 | 488 | } | |
489 | 489 | else throw("Strict value is not equal to itself.") | |
490 | 490 | } | |
491 | 491 | else throw("Strict value is not equal to itself.") | |
492 | 492 | } | |
493 | 493 | else throw("Strict value is not equal to itself.") | |
494 | 494 | } | |
495 | 495 | else 1 | |
496 | 496 | case _ => | |
497 | 497 | 1 | |
498 | 498 | } | |
499 | 499 | case _ => | |
500 | 500 | 0 | |
501 | 501 | } | |
502 | 502 | if ((topupRewards == topupRewards)) | |
503 | 503 | then [IntegerEntry("autostake_amount_At8D6NFFpheCbvKVnjVoeLL84Eo8NZn6ovManxfLaFWL", (amountStaked - amount))] | |
504 | 504 | else throw("Strict value is not equal to itself.") | |
505 | 505 | } | |
506 | 506 | else throw("Strict value is not equal to itself.") | |
507 | 507 | } | |
508 | 508 | else throw("Strict value is not equal to itself.") | |
509 | 509 | } | |
510 | 510 | else throw("Strict value is not equal to itself.") | |
511 | 511 | } | |
512 | 512 | else nil | |
513 | 513 | ||
514 | 514 | ||
515 | 515 | ||
516 | 516 | @Callable(i) | |
517 | 517 | func addInterest (assetIdStr,amount) = if ((i.caller != this)) | |
518 | 518 | then throw("only for self invocation") | |
519 | 519 | else { | |
520 | 520 | let earned = tryGetInteger(("autostake_lastEarned_" + assetIdStr)) | |
521 | 521 | let lastHeight = tryGetInteger(("autostake_lastBlock_" + assetIdStr)) | |
522 | 522 | let cleanAmount = fraction(amount, 80, 100) | |
523 | 523 | let stateChanges = if (if ((lastHeight == height)) | |
524 | 524 | then true | |
525 | 525 | else (amount == 0)) | |
526 | 526 | then nil | |
527 | 527 | else [IntegerEntry(("autostake_preLastEarned_" + assetIdStr), earned), IntegerEntry(("autostake_preLastBlock_" + assetIdStr), lastHeight), IntegerEntry(("autostake_lastEarned_" + assetIdStr), (earned + cleanAmount)), IntegerEntry(("autostake_lastBlock_" + assetIdStr), height)] | |
528 | 528 | (stateChanges ++ [IntegerEntry((assetIdStr + "_sRate"), (tryGetInteger((assetIdStr + "_sRate")) + fraction(Scale16, cleanAmount, tryGetInteger(("total_supplied_" + assetIdStr)))))]) | |
529 | 529 | } | |
530 | 530 | ||
531 | 531 | ||
532 | 532 | ||
533 | 533 | @Callable(i) | |
534 | 534 | func addInterestEXTERNAL () = { | |
535 | 535 | let amount = fraction(i.payments[0].amount, 80, 100) | |
536 | 536 | let assetId = i.payments[0].assetId | |
537 | 537 | let assetIdStr = getAssetString(assetId) | |
538 | 538 | let earned = tryGetInteger(("autostake_lastEarned_" + assetIdStr)) | |
539 | 539 | let lastHeight = tryGetInteger(("autostake_lastBlock_" + assetIdStr)) | |
540 | 540 | let stateChanges = if (if ((lastHeight == height)) | |
541 | 541 | then true | |
542 | 542 | else (amount == 0)) | |
543 | 543 | then nil | |
544 | 544 | else [IntegerEntry(("autostake_preLastEarned_" + assetIdStr), earned), IntegerEntry(("autostake_preLastBlock_" + assetIdStr), lastHeight), IntegerEntry(("autostake_lastEarned_" + assetIdStr), (earned + amount)), IntegerEntry(("autostake_lastBlock_" + assetIdStr), height)] | |
545 | 545 | (stateChanges ++ [IntegerEntry((assetIdStr + "_sRate"), (tryGetInteger((assetIdStr + "_sRate")) + fraction(Scale16, amount, tryGetInteger(("total_supplied_" + assetIdStr)))))]) | |
546 | 546 | } | |
547 | 547 | ||
548 | 548 | ||
549 | 549 | ||
550 | 550 | @Callable(i) | |
551 | 551 | func preInit (tokens,ltvs,lts,penalties) = { | |
552 | 552 | func f (accum,token) = (accum ++ [IntegerEntry((token + "_bRate"), Scale16), IntegerEntry((token + "_sRate"), Scale16)]) | |
553 | 553 | ||
554 | 554 | if ((i.caller != this)) | |
555 | 555 | then throw("admin only") | |
556 | 556 | else { | |
557 | 557 | let rates = { | |
558 | 558 | let $l = split(tokens, ",") | |
559 | 559 | let $s = size($l) | |
560 | 560 | let $acc0 = nil | |
561 | 561 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
562 | 562 | then $a | |
563 | 563 | else f($a, $l[$i]) | |
564 | 564 | ||
565 | 565 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
566 | 566 | then $a | |
567 | 567 | else throw("List size exceeds 6") | |
568 | 568 | ||
569 | 569 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6) | |
570 | 570 | } | |
571 | 571 | ([StringEntry("setup_tokens", tokens), StringEntry("setup_ltvs", ltvs), StringEntry("setup_lts", lts), StringEntry("setup_penalties", penalties), BooleanEntry("setup_active", true)] ++ rates) | |
572 | 572 | } | |
573 | 573 | } | |
574 | 574 | ||
575 | 575 | ||
576 | 576 | ||
577 | 577 | @Callable(i) | |
578 | 578 | func updateParameter (key,val) = if (if ((i.caller != this)) | |
579 | 579 | then (i.caller != Address(base58'3P3o9cLTV2u9N4nYNKRYL6gy6cUEU9DwXW8')) | |
580 | 580 | else false) | |
581 | 581 | then throw("admin only") | |
582 | 582 | else [IntegerEntry(key, parseIntValue(val))] | |
583 | 583 | ||
584 | 584 | ||
585 | 585 | ||
586 | 586 | @Callable(i) | |
587 | 587 | func updateString (key,val) = if (if ((i.caller != this)) | |
588 | 588 | then (i.caller != Address(base58'3P3o9cLTV2u9N4nYNKRYL6gy6cUEU9DwXW8')) | |
589 | 589 | else false) | |
590 | 590 | then throw("admin only") | |
591 | 591 | else [StringEntry(key, val)] | |
592 | 592 | ||
593 | 593 | ||
594 | 594 | ||
595 | 595 | @Callable(i) | |
596 | 596 | func claimToReserveFund (debug) = { | |
597 | 597 | let assets = getMarketAssets() | |
598 | 598 | let rates = getActualRate(assets[0], "sRate")._2 | |
599 | 599 | let li = [0, 1, 2, 3, 4, 5] | |
600 | 600 | func f (accum,n) = if ((n >= size(assets))) | |
601 | 601 | then accum | |
602 | 602 | else { | |
603 | 603 | let assetIdStr = assets[n] | |
604 | 604 | let autostakeAmount = tryGetString(("autostake_amount_" + assetIdStr)) | |
605 | 605 | let amount = ((((getBalance(assetIdStr) + tryGetInteger(("autostake_amount_" + assetIdStr))) + (if ((autostakeAmount != "")) | |
606 | 606 | then parseIntValue(autostakeAmount) | |
607 | 607 | else 0)) + fraction(tryGetInteger(("total_borrowed_" + assetIdStr)), rates[((n * 3) + 1)].value, Scale16)) - fraction(tryGetInteger(("total_supplied_" + assetIdStr)), rates[(n * 3)].value, Scale16)) | |
608 | 608 | let inv = if ((tryGetInteger(("autostake_amount_" + assetIdStr)) > 0)) | |
609 | 609 | then invoke(this, "unstakeToken", [assetIdStr, max([amount, 0])], nil) | |
610 | 610 | else 0 | |
611 | 611 | if ((inv == inv)) | |
612 | 612 | then (accum ++ [amount]) | |
613 | 613 | else throw("Strict value is not equal to itself.") | |
614 | 614 | } | |
615 | 615 | ||
616 | 616 | let parameter = { | |
617 | 617 | let $l = li | |
618 | 618 | let $s = size($l) | |
619 | 619 | let $acc0 = nil | |
620 | 620 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
621 | 621 | then $a | |
622 | 622 | else f($a, $l[$i]) | |
623 | 623 | ||
624 | 624 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
625 | 625 | then $a | |
626 | 626 | else throw("List size exceeds 6") | |
627 | 627 | ||
628 | 628 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6) | |
629 | 629 | } | |
630 | 630 | func f2 (accum,n) = if ((n >= size(assets))) | |
631 | 631 | then accum | |
632 | 632 | else { | |
633 | 633 | let assetIdStr = assets[n] | |
634 | 634 | (accum ++ [ScriptTransfer(reserveFundAddress, max([parameter[n], 0]), getAssetBytes(assetIdStr))]) | |
635 | 635 | } | |
636 | 636 | ||
637 | 637 | if (debug) | |
638 | 638 | then throw(liIntToStr(parameter)) | |
639 | 639 | else $Tuple2({ | |
640 | 640 | let $l = li | |
641 | 641 | let $s = size($l) | |
642 | 642 | let $acc0 = nil | |
643 | 643 | func $f1_1 ($a,$i) = if (($i >= $s)) | |
644 | 644 | then $a | |
645 | 645 | else f2($a, $l[$i]) | |
646 | 646 | ||
647 | 647 | func $f1_2 ($a,$i) = if (($i >= $s)) | |
648 | 648 | then $a | |
649 | 649 | else throw("List size exceeds 6") | |
650 | 650 | ||
651 | 651 | $f1_2($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($acc0, 0), 1), 2), 3), 4), 5), 6) | |
652 | 652 | }, parameter) | |
653 | 653 | } | |
654 | 654 | ||
655 | 655 | ||
656 | 656 | ||
657 | 657 | @Callable(i) | |
658 | 658 | func reSetup (assetIdStr) = { | |
659 | 659 | let lastResetup = tryGetInteger("resetup_lastUpdate") | |
660 | 660 | if ((dayBlocks > (height - lastResetup))) | |
661 | 661 | then throw("can be updated only once per day") | |
662 | 662 | else { | |
663 | 663 | let lts = split(tryGetString("setup_lts"), ",") | |
664 | 664 | let assets = getMarketAssets() | |
665 | 665 | let ur = getUr(assetIdStr) | |
666 | 666 | let tempLT = tryGetInteger((("setup_" + assetIdStr) + "_tempLT")) | |
667 | 667 | let lt = parseIntValue(assets[value(indexOf(assets, assetIdStr))]) | |
668 | 668 | if ((ur > 90000000)) | |
669 | 669 | then [IntegerEntry((("setup_" + assetIdStr) + "_tempLT"), fraction(tempLT, 9975, 10000))] | |
670 | 670 | else if (if ((lt > tempLT)) | |
671 | 671 | then (90000000 > ur) | |
672 | 672 | else false) | |
673 | 673 | then [IntegerEntry((("setup_" + assetIdStr) + "_tempLT"), fraction(tempLT, 10025, 10000))] | |
674 | 674 | else nil | |
675 | 675 | } | |
676 | 676 | } | |
677 | 677 | ||
678 | 678 | ||
679 | 679 | ||
680 | 680 | @Callable(i) | |
681 | 681 | func shutdown (shutdown) = if ((indexOf(shutdownWhitelist, i.caller.bytes) == unit)) | |
682 | 682 | then throw("user not in a whitelist") | |
683 | 683 | else [BooleanEntry("setup_active", !(shutdown))] | |
684 | 684 | ||
685 | 685 | ||
686 | 686 | ||
687 | 687 | @Callable(i) | |
688 | 688 | func liquidate (debug,address,assetAmount,sAssetIdStr,bAssetIdStr,routeStr) = if (!(verifyLiquidatorRights(i.caller))) | |
689 | 689 | then throw("temporarily available for whitelist only") | |
690 | 690 | else if (!(tryGetBoolean("setup_active"))) | |
691 | 691 | then throw("market is stopped") | |
692 | 692 | else { | |
693 | 693 | let userCollateral = calcUserCollateral(address) | |
694 | 694 | if ((userCollateral == userCollateral)) | |
695 | 695 | then { | |
696 | 696 | let $t02427324335 = getActualRate(sAssetIdStr, "sRate") | |
697 | 697 | let sRate = $t02427324335._1 | |
698 | 698 | let ratesResult = $t02427324335._2 | |
699 | 699 | let $t02434024409 = getActualRate(bAssetIdStr, "bRate") | |
700 | 700 | let bRate = $t02434024409._1 | |
701 | 701 | let ratesRecalcResult2 = $t02434024409._2 | |
702 | 702 | let sAssetAmount = fraction(assetAmount, Scale16, sRate) | |
703 | 703 | let currentSPosition = tryGetInteger(((address + "_supplied_") + sAssetIdStr)) | |
704 | 704 | let currentBPositionVal = tryGetInteger(((address + "_borrowed_") + bAssetIdStr)) | |
705 | 705 | let currentBPosition = if ((currentBPositionVal > 0)) | |
706 | 706 | then currentBPositionVal | |
707 | 707 | else throw("user has no borrow in this token") | |
708 | 708 | if ((userCollateral > 0)) | |
709 | 709 | then throw("user can't be liquidated") | |
710 | 710 | else if ((sAssetAmount > currentSPosition)) | |
711 | 711 | then throw("position to liquidate is bigger than user's supply") | |
712 | 712 | else { | |
713 | 713 | let balance0Before = getBalance(sAssetIdStr) | |
714 | 714 | if ((balance0Before == balance0Before)) | |
715 | 715 | then { | |
716 | 716 | let balance1Before = getBalance(bAssetIdStr) | |
717 | 717 | if ((balance1Before == balance1Before)) | |
718 | 718 | then { | |
719 | 719 | let exchangeInvoke = invoke(aggregatorAddress, "swap", [routeStr, 0], [AttachedPayment(getAssetBytes(sAssetIdStr), assetAmount)]) | |
720 | 720 | if ((exchangeInvoke == exchangeInvoke)) | |
721 | 721 | then { | |
722 | 722 | let asset0Sold = (balance0Before - getBalance(sAssetIdStr)) | |
723 | 723 | if ((asset0Sold == asset0Sold)) | |
724 | 724 | then { | |
725 | 725 | let asset1Bought = (getBalance(bAssetIdStr) - balance1Before) | |
726 | 726 | if ((asset1Bought == asset1Bought)) | |
727 | 727 | then { | |
728 | 728 | let asset0Price = getTokenPrice(sAssetIdStr)._1 | |
729 | 729 | let asset0Scale = calcAssetScale(sAssetIdStr) | |
730 | 730 | let asset0Usd = fraction(asset0Sold, asset0Price, asset0Scale) | |
731 | 731 | let asset1Price = getTokenPrice(bAssetIdStr)._2 | |
732 | 732 | let asset1Scale = calcAssetScale(bAssetIdStr) | |
733 | 733 | let asset1Usd = fraction(asset1Bought, asset1Price, asset1Scale) | |
734 | 734 | let penalty = parseIntValue(split(tryGetString("setup_penalties"), ",")[value(indexOf(getMarketAssets(), bAssetIdStr))]) | |
735 | 735 | let liquidationProfit = (asset1Usd - fraction(asset0Usd, (Scale8 - penalty), Scale8)) | |
736 | 736 | let sAssetChange = fraction(asset0Sold, Scale16, sRate) | |
737 | 737 | let bAssetChange = fraction(fraction(asset1Bought, Scale16, bRate), (Scale8 - fraction(liquidationProfit, Scale8, asset1Usd)), Scale8) | |
738 | 738 | if ((asset0Sold > assetAmount)) | |
739 | 739 | then throw("more assets exchanged than expected") | |
740 | 740 | else if ((0 > liquidationProfit)) | |
741 | 741 | then throw("price impact is bigger than liquidation penalty") | |
742 | 742 | else [IntegerEntry(((address + "_supplied_") + sAssetIdStr), (currentSPosition - sAssetChange)), IntegerEntry(((address + "_borrowed_") + bAssetIdStr), (currentBPosition - bAssetChange)), IntegerEntry(("total_supplied_" + sAssetIdStr), (tryGetInteger(("total_supplied_" + sAssetIdStr)) - sAssetChange)), IntegerEntry(("total_borrowed_" + bAssetIdStr), (tryGetInteger(("total_borrowed_" + bAssetIdStr)) - bAssetChange))] | |
743 | 743 | } | |
744 | 744 | else throw("Strict value is not equal to itself.") | |
745 | 745 | } | |
746 | 746 | else throw("Strict value is not equal to itself.") | |
747 | 747 | } | |
748 | 748 | else throw("Strict value is not equal to itself.") | |
749 | 749 | } | |
750 | 750 | else throw("Strict value is not equal to itself.") | |
751 | 751 | } | |
752 | 752 | else throw("Strict value is not equal to itself.") | |
753 | 753 | } | |
754 | 754 | } | |
755 | 755 | else throw("Strict value is not equal to itself.") | |
756 | 756 | } | |
757 | 757 | ||
758 | 758 | ||
759 | 759 | ||
760 | 760 | @Callable(i) | |
761 | 761 | func liquidateV2 (debug,address,sAssetIdStr) = if (!(verifyLiquidatorRights(i.caller))) | |
762 | 762 | then throw("temporarily available for whitelist only") | |
763 | 763 | else if (!(tryGetBoolean("setup_active"))) | |
764 | 764 | then throw("market is stopped") | |
765 | 765 | else { | |
766 | 766 | let bAssetId = i.payments[0].assetId | |
767 | 767 | let bAssetIdStr = getAssetString(bAssetId) | |
768 | 768 | let bAssetAmount = i.payments[0].amount | |
769 | 769 | let userCollateral = calcUserCollateral(address) | |
770 | 770 | if ((userCollateral == userCollateral)) | |
771 | 771 | then if ((userCollateral > 0)) | |
772 | 772 | then throw("user can't be liquidated") | |
773 | 773 | else { | |
774 | 774 | let marketAssets = getMarketAssets() | |
775 | 775 | let asset1Num = value(indexOf(marketAssets, bAssetIdStr)) | |
776 | 776 | let asset0Num = value(indexOf(marketAssets, sAssetIdStr)) | |
777 | 777 | let $t02756427626 = getActualRate(bAssetIdStr, "bRate") | |
778 | 778 | let bRate = $t02756427626._1 | |
779 | 779 | let ratesResult = $t02756427626._2 | |
780 | 780 | let asset1Price = getTokenPrice(bAssetIdStr)._2 | |
781 | 781 | let asset1Scale = calcAssetScale(bAssetIdStr) | |
782 | 782 | let bAmountUsd = fraction(bAssetAmount, asset1Price, asset1Scale) | |
783 | 783 | let penalty = parseIntValue(value(split(tryGetString("setup_penalties"), ",")[asset1Num])) | |
784 | 784 | let asset0Price = getTokenPrice(sAssetIdStr)._1 | |
785 | 785 | let asset0Scale = calcAssetScale(sAssetIdStr) | |
786 | 786 | let sAmountUsd = fraction(bAmountUsd, (Scale8 + penalty), Scale8) | |
787 | 787 | let sAssetAmount = fraction(sAmountUsd, asset0Scale, asset0Price) | |
788 | 788 | let bAmount = fraction(bAssetAmount, Scale16, bRate) | |
789 | 789 | let sAmount = fraction(sAssetAmount, Scale16, ratesResult[((asset0Num * 3) + 1)].value) | |
790 | 790 | let currentSPosition = tryGetInteger(((address + "_supplied_") + sAssetIdStr)) | |
791 | 791 | let currentBPositionVal = tryGetInteger(((address + "_borrowed_") + bAssetIdStr)) | |
792 | 792 | let currentBPosition = if ((currentBPositionVal > 0)) | |
793 | 793 | then currentBPositionVal | |
794 | 794 | else throw("user has no borrow in this token") | |
795 | 795 | if ((sAmount > currentSPosition)) | |
796 | 796 | then throw("position to liquidate is bigger than user's supply") | |
797 | 797 | else if (debug) | |
798 | 798 | then throw("liquidation will pass") | |
799 | 799 | else ([ScriptTransfer(i.caller, sAssetAmount, getAssetBytes(sAssetIdStr)), IntegerEntry(((address + "_supplied_") + sAssetIdStr), (currentSPosition - sAmount)), IntegerEntry(((address + "_borrowed_") + bAssetIdStr), (currentBPosition - bAmount)), IntegerEntry(("total_supplied_" + sAssetIdStr), (tryGetInteger(("total_supplied_" + sAssetIdStr)) - sAmount)), IntegerEntry(("total_borrowed_" + bAssetIdStr), (tryGetInteger(("total_borrowed_" + bAssetIdStr)) - bAmount))] ++ ratesResult) | |
800 | 800 | } | |
801 | 801 | else throw("Strict value is not equal to itself.") | |
802 | 802 | } | |
803 | 803 | ||
804 | 804 | ||
805 | 805 | ||
806 | 806 | @Callable(i) | |
807 | 807 | func getUserCollateral (debug,address,minusBorrowed,afterChange) = { | |
808 | 808 | let assets = getMarketAssets() | |
809 | 809 | let ltvs = split(tryGetString("setup_ltvs"), ",") | |
810 | 810 | let lts = split(tryGetString("setup_lts"), ",") | |
811 | 811 | let rates = getActualRate(assets[0], "sRate")._2 | |
812 | 812 | let changeHandler = split(afterChange, ",") | |
813 | 813 | func f (accum,next) = if ((next >= size(assets))) | |
814 | 814 | then accum | |
815 | 815 | else { | |
816 | 816 | let userSupplied = tryGetInteger(((address + "_supplied_") + assets[next])) | |
817 | 817 | let userBorrowed = tryGetInteger(((address + "_borrowed_") + assets[next])) | |
818 | 818 | let needTokenAccounting = if ((afterChange == "")) | |
819 | 819 | then if (if ((userBorrowed != 0)) | |
820 | 820 | then true | |
821 | 821 | else (userSupplied != 0)) | |
822 | 822 | then true | |
823 | 823 | else false | |
824 | 824 | else true | |
825 | 825 | if (needTokenAccounting) | |
826 | 826 | then { | |
827 | 827 | let assetScale = calcAssetScale(assets[next]) | |
828 | 828 | let assetPrice = getTokenPrice(assets[next]) | |
829 | 829 | ((accum + fraction(fraction(fraction((userSupplied + (if (if (if ((afterChange != "")) | |
830 | 830 | then (changeHandler[0] == assets[next]) | |
831 | 831 | else false) | |
832 | 832 | then (changeHandler[1] == "supplied") | |
833 | 833 | else false) | |
834 | 834 | then parseIntValue(changeHandler[2]) | |
835 | 835 | else 0)), rates[(next * 3)].value, Scale16), parseIntValue(ltvs[next]), Scale8), assetPrice._1, assetScale)) - (if (minusBorrowed) | |
836 | 836 | then fraction(fraction(fraction((userBorrowed + (if (if (if ((afterChange != "")) | |
837 | 837 | then (changeHandler[0] == assets[next]) | |
838 | 838 | else false) | |
839 | 839 | then (changeHandler[1] == "borrowed") | |
840 | 840 | else false) | |
841 | 841 | then parseIntValue(changeHandler[2]) | |
842 | 842 | else 0)), rates[((next * 3) + 1)].value, Scale16), Scale8, parseIntValue(lts[next])), assetPrice._2, assetScale) | |
843 | 843 | else 0)) | |
844 | 844 | } | |
845 | 845 | else accum | |
846 | 846 | } | |
847 | 847 | ||
848 | 848 | let result = { | |
849 | 849 | let $l = [0, 1, 2, 3, 4, 5] | |
850 | 850 | let $s = size($l) | |
851 | 851 | let $acc0 = 0 | |
852 | 852 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
853 | 853 | then $a | |
854 | 854 | else f($a, $l[$i]) | |
855 | 855 | ||
856 | 856 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
857 | 857 | then $a | |
858 | 858 | else throw("List size exceeds 6") | |
859 | 859 | ||
860 | 860 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6) | |
861 | 861 | } | |
862 | 862 | if (debug) | |
863 | 863 | then throw(toString(result)) | |
864 | 864 | else $Tuple2(rates, result) | |
865 | 865 | } | |
866 | 866 | ||
867 | 867 | ||
868 | 868 | ||
869 | 869 | @Callable(i) | |
870 | 870 | func getPrices (debug) = { | |
871 | 871 | let assets = getMarketAssets() | |
872 | 872 | func f (accum,next) = if ((next >= size(assets))) | |
873 | 873 | then accum | |
874 | 874 | else { | |
875 | 875 | let assetPrice = getTokenPrice(assets[next]) | |
876 | 876 | ((((accum + toString(assetPrice._1)) + ",") + toString(assetPrice._2)) + "|") | |
877 | 877 | } | |
878 | 878 | ||
879 | 879 | let result = { | |
880 | 880 | let $l = [0, 1, 2, 3, 4, 5] | |
881 | 881 | let $s = size($l) | |
882 | 882 | let $acc0 = "" | |
883 | 883 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
884 | 884 | then $a | |
885 | 885 | else f($a, $l[$i]) | |
886 | 886 | ||
887 | 887 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
888 | 888 | then $a | |
889 | 889 | else throw("List size exceeds 6") | |
890 | 890 | ||
891 | 891 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6) | |
892 | 892 | } | |
893 | 893 | if (debug) | |
894 | 894 | then throw(result) | |
895 | 895 | else $Tuple2(nil, result) | |
896 | 896 | } | |
897 | 897 | ||
898 | 898 | ||
899 | 899 | ||
900 | 900 | @Callable(i) | |
901 | 901 | func calculateUtilizationRatio (assetIdStr,debug) = if (debug) | |
902 | 902 | then throw(toString(getUr(assetIdStr))) | |
903 | 903 | else $Tuple2(nil, getUr(assetIdStr)) | |
904 | 904 | ||
905 | 905 | ||
906 | 906 | ||
907 | 907 | @Callable(i) | |
908 | 908 | func calculateOutdatedUR (assetIdStr,debug) = if (debug) | |
909 | 909 | then throw(toString(getOutdatedUr(assetIdStr))) | |
910 | 910 | else $Tuple2(nil, getOutdatedUr(assetIdStr)) | |
911 | 911 | ||
912 | 912 | ||
913 | 913 | ||
914 | 914 | @Callable(i) | |
915 | 915 | func calculateTokenRates (debug) = { | |
916 | 916 | func f (accum,assetIdStr) = { | |
917 | 917 | let rates = tokenRatesRecalc(assetIdStr) | |
918 | 918 | $Tuple2(((((accum._1 + toString(rates[1].value)) + "|") + toString(rates[0].value)) + ","), (accum._2 ++ rates)) | |
919 | 919 | } | |
920 | 920 | ||
921 | 921 | let parameter = { | |
922 | 922 | let $l = getMarketAssets() | |
923 | 923 | let $s = size($l) | |
924 | 924 | let $acc0 = $Tuple2("", nil) | |
925 | 925 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
926 | 926 | then $a | |
927 | 927 | else f($a, $l[$i]) | |
928 | 928 | ||
929 | 929 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
930 | 930 | then $a | |
931 | 931 | else throw("List size exceeds 6") | |
932 | 932 | ||
933 | 933 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6) | |
934 | 934 | } | |
935 | 935 | if (debug) | |
936 | 936 | then throw(parameter._1) | |
937 | 937 | else $Tuple2(parameter._2, parameter._1) | |
938 | 938 | } | |
939 | 939 | ||
940 | 940 | ||
941 | 941 | ||
942 | 942 | @Callable(i) | |
943 | 943 | func calculateTokensInterest (debug) = { | |
944 | 944 | func f (accum,assetIdStr) = { | |
945 | 945 | let rate = fraction(getInterest(assetIdStr), dayBlocks, Scale8) | |
946 | 946 | ((accum + toString(rate)) + ",") | |
947 | 947 | } | |
948 | 948 | ||
949 | 949 | let parameter = { | |
950 | 950 | let $l = getMarketAssets() | |
951 | 951 | let $s = size($l) | |
952 | 952 | let $acc0 = "" | |
953 | 953 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
954 | 954 | then $a | |
955 | 955 | else f($a, $l[$i]) | |
956 | 956 | ||
957 | 957 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
958 | 958 | then $a | |
959 | 959 | else throw("List size exceeds 6") | |
960 | 960 | ||
961 | 961 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6) | |
962 | 962 | } | |
963 | 963 | if (debug) | |
964 | 964 | then throw(parameter) | |
965 | 965 | else $Tuple2(nil, parameter) | |
966 | 966 | } | |
967 | 967 | ||
968 | 968 | ||
969 | 969 | @Verifier(tx) | |
970 | 970 | func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
971 | 971 |
github/deemru/w8io/169f3d6 107.53 ms ◑