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