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