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+J8QdqvvPw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mAgUCJGEJAJEDAgUCJGwFAiRpCgEFJGYwXzICAiRhAiRpAwkAZwIFAiRpBQIkcwUCJGEJAAIBAhNMaXN0IHNpemUgZXhjZWVkcyA2CQEFJGYwXzICCQEFJGYwXzECCQEFJGYwXzECCQEFJGYwXzECCQEFJGYwXzECCQEFJGYwXzECCQEFJGYwXzECBQUkYWNjMAAAAAEAAgADAAQABQAGAwUFZGVidWcJAAIBBQlwYXJhbWV0ZXIJAJQKAgUDbmlsBQlwYXJhbWV0ZXIBAnR4AQZ2ZXJpZnkACQD0AwMIBQJ0eAlib2R5Qnl0ZXMJAJEDAggFAnR4BnByb29mcwAACAUCdHgPc2VuZGVyUHVibGljS2V5e4HySw==", "height": 2512039, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: FpUqhCxdVrAckQS3XYrssKBtFUMMbERUEh11x89LsiYz Next: Gd9tEpzj3GAwyDaA1Jm8RhM129BXjRaCHaDNGb2DJbv6 Diff:
OldNewDifferences
44 let reserveFundAddress = Address(base58'3Mzzt65puEs2W9M1m9iFBvMEdfM5bASE1hJ')
55
66 let reserveFund = 20
7+
8+let flashLoanFee = 1000000
79
810 let aggregatorAddress = Address(base58'3Mzzt65puEs2W9M1m9iFBvMEdfM5bASE1hJ')
911
1618
1719 func getRateCurve (assetIdStr) = match assetIdStr {
1820 case _ =>
19- if (("FLdC14nUVRyiSYjVrMo3X4g8rXQjLbNRaGAyQAm8V68V" == $match0))
21+ if (("8DtMtpVwVq62sdcVFVzh6nuprgzG7LSjpLdHnQnrAFgY" == $match0))
2022 then $Tuple4(2000000, 25000000, 80000000, 100000000)
2123 else if (("25FEqEjRkqK6yCkiT7Lz6SAYz7gUFCtxfCChnrVFD5AT" == $match0))
2224 then $Tuple4(2000000, 25000000, 80000000, 100000000)
240242 func supplyInternal (assetIdStr,assetAmount,address) = if (!(tryGetBoolean("setup_active")))
241243 then throw("market is stopped")
242244 else {
243- let $t058215888 = getActualRate(assetIdStr, "sRate")
244- let sRate = $t058215888._1
245- let ratesRecalcResult = $t058215888._2
245+ let $t058685935 = getActualRate(assetIdStr, "sRate")
246+ let sRate = $t058685935._1
247+ let ratesRecalcResult = $t058685935._2
246248 let amount = fraction(assetAmount, Scale16, sRate, DOWN)
247249 let maxSupply = match getString(("setup_maxSupply_" + assetIdStr)) {
248250 case x: String =>
266268
267269
268270 func borrowInternal (assetIdStr,assetAmount,address) = {
269- let $t071677234 = getActualRate(assetIdStr, "bRate")
270- let bRate = $t071677234._1
271- let ratesRecalcResult = $t071677234._2
271+ let $t072147281 = getActualRate(assetIdStr, "bRate")
272+ let bRate = $t072147281._1
273+ let ratesRecalcResult = $t072147281._2
272274 let amount = fraction(assetAmount, Scale16, bRate, CEILING)
273275 let collateralValueInv = invoke(this, "getUserCollateral", [false, address, true, ((assetIdStr + ",borrowed,") + toString(amount))], nil)
274276 if ((collateralValueInv == collateralValueInv))
356358
357359 @Callable(i)
358360 func withdraw (assetIdStr,assetAmount) = {
359- let $t098579924 = getActualRate(assetIdStr, "sRate")
360- let sRate = $t098579924._1
361- let ratesRecalcResult = $t098579924._2
361+ let $t01081510882 = getActualRate(assetIdStr, "sRate")
362+ let sRate = $t01081510882._1
363+ let ratesRecalcResult = $t01081510882._2
362364 let amount = fraction(assetAmount, Scale16, sRate, CEILING)
363365 let address = toString(i.caller)
364366 let assetSupplied = tryGetInteger(("total_supplied_" + assetIdStr))
409411 else {
410412 let assetIdStr = getAssetString(i.payments[0].assetId)
411413 let assetAmount = i.payments[0].amount
412- let $t01199112058 = getActualRate(assetIdStr, "bRate")
413- let bRate = $t01199112058._1
414- let ratesRecalcResult = $t01199112058._2
414+ let $t01294913016 = getActualRate(assetIdStr, "bRate")
415+ let bRate = $t01294913016._1
416+ let ratesRecalcResult = $t01294913016._2
415417 let amount = fraction(assetAmount, Scale16, bRate, CEILING)
416418 let address = toString(i.caller)
417419 let assetSupplied = tryGetInteger(("total_supplied_" + assetIdStr))
749751 let userCollateral = calcUserCollateral(address)
750752 if ((userCollateral == userCollateral))
751753 then {
752- let $t02497825040 = getActualRate(sAssetIdStr, "sRate")
753- let sRate = $t02497825040._1
754- let ratesResult = $t02497825040._2
755- let $t02504525114 = getActualRate(bAssetIdStr, "bRate")
756- let bRate = $t02504525114._1
757- let ratesRecalcResult2 = $t02504525114._2
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
758760 let sAssetAmount = fraction(assetAmount, Scale16, sRate)
759761 let currentSPosition = tryGetInteger(((address + "_supplied_") + sAssetIdStr))
760762 let currentBPositionVal = tryGetInteger(((address + "_borrowed_") + bAssetIdStr))
830832 let marketAssets = getMarketAssets()
831833 let asset1Num = value(indexOf(marketAssets, bAssetIdStr))
832834 let asset0Num = value(indexOf(marketAssets, sAssetIdStr))
833- let $t02826928331 = getActualRate(bAssetIdStr, "bRate")
834- let bRate = $t02826928331._1
835- let ratesResult = $t02826928331._2
835+ let $t02922729289 = getActualRate(bAssetIdStr, "bRate")
836+ let bRate = $t02922729289._1
837+ let ratesResult = $t02922729289._2
836838 let asset1Price = getTokenPrice(bAssetIdStr)._2
837839 let asset1Scale = calcAssetScale(bAssetIdStr)
838840 let bAmountUsd = fraction(bAssetAmount, asset1Price, asset1Scale)
918920 if (debug)
919921 then throw(toString(result))
920922 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)
921936 }
922937
923938
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let reserveFundAddress = Address(base58'3Mzzt65puEs2W9M1m9iFBvMEdfM5bASE1hJ')
55
66 let reserveFund = 20
7+
8+let flashLoanFee = 1000000
79
810 let aggregatorAddress = Address(base58'3Mzzt65puEs2W9M1m9iFBvMEdfM5bASE1hJ')
911
1012 let oracleStr = "3N4KbMnJH8FaM94jqxNFe2oyZ8GB7Z8yVBP"
1113
1214 let shutdownWhitelist = [base58'3PMcMiMEs6w56NRGacksXtFG5zS7doE9fpL', base58'3PAxdDSmN758L5SHSGRC5apEtQE2aApZotG', base58'3PJKmXoHJvVeQXjSJdhtkUcFDtdiQqMbUTD', base58'3PQdNxynJy5mche2kxMVc5shXWzK8Gstq3o', base58'3PHbdpaKzz8EiAngGHaFu2hVuNCdsC67qh3', base58'3P6Ksahs71SiKQgQ4qaZuFAVhqncdi2nvJQ']
1315
1416 func verifyLiquidatorRights (address) = !((address != Address(base58'3Mzzt65puEs2W9M1m9iFBvMEdfM5bASE1hJ')))
1517
1618
1719 func getRateCurve (assetIdStr) = match assetIdStr {
1820 case _ =>
19- if (("FLdC14nUVRyiSYjVrMo3X4g8rXQjLbNRaGAyQAm8V68V" == $match0))
21+ if (("8DtMtpVwVq62sdcVFVzh6nuprgzG7LSjpLdHnQnrAFgY" == $match0))
2022 then $Tuple4(2000000, 25000000, 80000000, 100000000)
2123 else if (("25FEqEjRkqK6yCkiT7Lz6SAYz7gUFCtxfCChnrVFD5AT" == $match0))
2224 then $Tuple4(2000000, 25000000, 80000000, 100000000)
2325 else if (("WAVES" == $match0))
2426 then $Tuple4(2000000, 30000000, 80000000, 50000000)
2527 else $Tuple4(0, 20000000, 80000000, 80000000)
2628 }
2729
2830
2931 let Scale8 = 100000000
3032
3133 let Scale10 = 10000000000
3234
3335 let Scale16 = (Scale8 * Scale8)
3436
3537 let dayBlocks = 1440
3638
3739 func liIntToStr (li) = {
3840 func f (accum,next) = ((accum + toString(next)) + ",")
3941
4042 let $l = li
4143 let $s = size($l)
4244 let $acc0 = ""
4345 func $f0_1 ($a,$i) = if (($i >= $s))
4446 then $a
4547 else f($a, $l[$i])
4648
4749 func $f0_2 ($a,$i) = if (($i >= $s))
4850 then $a
4951 else throw("List size exceeds 6")
5052
5153 $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6)
5254 }
5355
5456
5557 func tryGetInteger (key) = match getInteger(this, key) {
5658 case b: Int =>
5759 b
5860 case _ =>
5961 0
6062 }
6163
6264
6365 func tryGetBoolean (key) = match getBoolean(this, key) {
6466 case b: Boolean =>
6567 b
6668 case _ =>
6769 false
6870 }
6971
7072
7173 func tryGetString (key) = match getString(this, key) {
7274 case b: String =>
7375 b
7476 case _ =>
7577 ""
7678 }
7779
7880
7981 func tryGetBinary (key) = match getBinary(this, key) {
8082 case b: ByteVector =>
8183 b
8284 case _ =>
8385 base58''
8486 }
8587
8688
8789 func getAssetString (assetId) = match assetId {
8890 case b: ByteVector =>
8991 toBase58String(b)
9092 case _ =>
9193 "WAVES"
9294 }
9395
9496
9597 func getAssetBytes (assetIdStr) = if ((assetIdStr == "WAVES"))
9698 then unit
9799 else fromBase58String(assetIdStr)
98100
99101
100102 func getBalance (assetIdStr) = if ((assetIdStr == "WAVES"))
101103 then wavesBalance(this).available
102104 else assetBalance(this, fromBase58String(assetIdStr))
103105
104106
105107 func getMarketAssets () = split(tryGetString("setup_tokens"), ",")
106108
107109
108110 func getAssetsMaxSupply () = {
109111 let s = tryGetString("setup_maxsupply")
110112 if ((s == ""))
111113 then [-1, -1, -1, -1, -1, -1, -1]
112114 else split(s, ",")
113115 }
114116
115117
116118 func getOutdatedUr (assetIdStr) = {
117119 let down = fraction(tryGetInteger(("total_supplied_" + assetIdStr)), tryGetInteger((assetIdStr + "_sRate")), Scale16)
118120 if ((down == 0))
119121 then 0
120122 else fraction(Scale8, fraction(tryGetInteger(("total_borrowed_" + assetIdStr)), tryGetInteger((assetIdStr + "_bRate")), Scale16), down)
121123 }
122124
123125
124126 func getInterest (assetIdStr) = {
125127 let ur = getOutdatedUr(assetIdStr)
126128 let curve = getRateCurve(assetIdStr)
127129 let rate = (curve._1 + (if ((curve._3 >= ur))
128130 then fraction(ur, curve._2, curve._3)
129131 else (curve._2 + fraction((ur - curve._3), curve._4, (100000000 - curve._3)))))
130132 max([fraction(rate, Scale8, (dayBlocks * 365)), 1])
131133 }
132134
133135
134136 func tokenRatesRecalc (assetIdStr) = {
135137 let interest = getInterest(assetIdStr)
136138 let ur = getOutdatedUr(assetIdStr)
137139 let lastRecalcHeight = tryGetInteger("lastRateHeight")
138140 let lastBRate = max([tryGetInteger((assetIdStr + "_bRate")), Scale16])
139141 let newBRate = (lastBRate + ((height - lastRecalcHeight) * interest))
140142 let lastSRate = max([tryGetInteger((assetIdStr + "_sRate")), Scale16])
141143 let newSRate = (lastSRate + ((((height - lastRecalcHeight) * fraction(interest, ur, Scale8)) * (100 - reserveFund)) / 100))
142144 [IntegerEntry((assetIdStr + "_sRate"), newSRate), IntegerEntry((assetIdStr + "_bRate"), newBRate), IntegerEntry("lastRateHeight", height)]
143145 }
144146
145147
146148 func getActualRate (assetIdStr,rateType) = {
147149 func f (accum,token) = {
148150 let recalc = tokenRatesRecalc(token)
149151 $Tuple2(if ((token != assetIdStr))
150152 then accum._1
151153 else if ((rateType == "sRate"))
152154 then recalc[0].value
153155 else recalc[1].value, (accum._2 ++ recalc))
154156 }
155157
156158 let $l = getMarketAssets()
157159 let $s = size($l)
158160 let $acc0 = $Tuple2(0, nil)
159161 func $f0_1 ($a,$i) = if (($i >= $s))
160162 then $a
161163 else f($a, $l[$i])
162164
163165 func $f0_2 ($a,$i) = if (($i >= $s))
164166 then $a
165167 else throw("List size exceeds 6")
166168
167169 $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6)
168170 }
169171
170172
171173 func getUr (assetIdStr) = {
172174 let rates = tokenRatesRecalc(assetIdStr)
173175 let down = fraction(tryGetInteger(("total_supplied_" + assetIdStr)), rates[0].value, Scale16)
174176 fraction(Scale8, fraction(tryGetInteger(("total_borrowed_" + assetIdStr)), rates[1].value, Scale16), down)
175177 }
176178
177179
178180 func ratesRecalc () = {
179181 func f (accum,token) = (accum ++ tokenRatesRecalc(token))
180182
181183 let $l = getMarketAssets()
182184 let $s = size($l)
183185 let $acc0 = nil
184186 func $f0_1 ($a,$i) = if (($i >= $s))
185187 then $a
186188 else f($a, $l[$i])
187189
188190 func $f0_2 ($a,$i) = if (($i >= $s))
189191 then $a
190192 else throw("List size exceeds 6")
191193
192194 $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6)
193195 }
194196
195197
196198 func getTokenPrice (assetIdStr) = {
197199 let inv3 = invoke(addressFromStringValue(oracleStr), "getTWAP60", [assetIdStr, false], nil)
198200 if ((inv3 == inv3))
199201 then {
200202 let data3 = match inv3 {
201203 case x: (Int, Int) =>
202204 x
203205 case _ =>
204206 throw("error of price oracle")
205207 }
206208 if ((data3 == data3))
207209 then data3
208210 else throw("Strict value is not equal to itself.")
209211 }
210212 else throw("Strict value is not equal to itself.")
211213 }
212214
213215
214216 func calcAssetScale (assetIdStr) = {
215217 let decimals = if ((assetIdStr == "WAVES"))
216218 then 8
217219 else value(assetInfo(fromBase58String(assetIdStr))).decimals
218220 pow(10, 0, decimals, 0, 0, DOWN)
219221 }
220222
221223
222224 func calcUserCollateral (address) = {
223225 let userCollateralInvoke = invoke(this, "getUserCollateral", [false, address, true, ""], nil)
224226 if ((userCollateralInvoke == userCollateralInvoke))
225227 then {
226228 let userCollateralValue = match userCollateralInvoke {
227229 case x: Int =>
228230 x
229231 case _ =>
230232 throw("issue while doing in-dapp invocation")
231233 }
232234 if ((userCollateralValue == userCollateralValue))
233235 then userCollateralValue
234236 else throw("Strict value is not equal to itself.")
235237 }
236238 else throw("Strict value is not equal to itself.")
237239 }
238240
239241
240242 func supplyInternal (assetIdStr,assetAmount,address) = if (!(tryGetBoolean("setup_active")))
241243 then throw("market is stopped")
242244 else {
243- let $t058215888 = getActualRate(assetIdStr, "sRate")
244- let sRate = $t058215888._1
245- let ratesRecalcResult = $t058215888._2
245+ let $t058685935 = getActualRate(assetIdStr, "sRate")
246+ let sRate = $t058685935._1
247+ let ratesRecalcResult = $t058685935._2
246248 let amount = fraction(assetAmount, Scale16, sRate, DOWN)
247249 let maxSupply = match getString(("setup_maxSupply_" + assetIdStr)) {
248250 case x: String =>
249251 parseIntValue(x)
250252 case _ =>
251253 0
252254 }
253255 let assetPrice = getTokenPrice(assetIdStr)
254256 let newTotalSupplied = (tryGetInteger(((address + "_supplied_") + assetIdStr)) + amount)
255257 let rate = getActualRate(assetIdStr, "sRate")._1
256258 let assetScale = calcAssetScale(assetIdStr)
257259 let newTotalSuppliedUsd = fraction(fraction(newTotalSupplied, rate, Scale16), assetPrice._1, assetScale)
258260 if ((indexOf(tryGetString("setup_tokens"), assetIdStr) == unit))
259261 then throw("this asset is not supported by the market")
260262 else if (if ((maxSupply != 0))
261263 then (newTotalSuppliedUsd > maxSupply)
262264 else false)
263265 then throw("max total supply for this token reached in the pool")
264266 else $Tuple2(([IntegerEntry(((address + "_supplied_") + assetIdStr), newTotalSupplied), IntegerEntry(("total_supplied_" + assetIdStr), (tryGetInteger(("total_supplied_" + assetIdStr)) + amount))] ++ ratesRecalcResult), assetAmount)
265267 }
266268
267269
268270 func borrowInternal (assetIdStr,assetAmount,address) = {
269- let $t071677234 = getActualRate(assetIdStr, "bRate")
270- let bRate = $t071677234._1
271- let ratesRecalcResult = $t071677234._2
271+ let $t072147281 = getActualRate(assetIdStr, "bRate")
272+ let bRate = $t072147281._1
273+ let ratesRecalcResult = $t072147281._2
272274 let amount = fraction(assetAmount, Scale16, bRate, CEILING)
273275 let collateralValueInv = invoke(this, "getUserCollateral", [false, address, true, ((assetIdStr + ",borrowed,") + toString(amount))], nil)
274276 if ((collateralValueInv == collateralValueInv))
275277 then {
276278 let collateralValue = match collateralValueInv {
277279 case x: Int =>
278280 x
279281 case _ =>
280282 throw("can't get user collateral value")
281283 }
282284 if (!(tryGetBoolean("setup_active")))
283285 then throw("market is stopped")
284286 else if ((0 > collateralValue))
285287 then throw("you have to supply more to borrow")
286288 else {
287289 let assetSupplied = tryGetInteger(("total_supplied_" + assetIdStr))
288290 let assetBorrowed = tryGetInteger(("total_borrowed_" + assetIdStr))
289291 let userAssetBorrowed = tryGetInteger(((address + "_borrowed_") + assetIdStr))
290292 if ((amount > (assetSupplied - assetBorrowed)))
291293 then throw("this amount is not available")
292294 else $Tuple2(([IntegerEntry(((address + "_borrowed_") + assetIdStr), (userAssetBorrowed + amount)), IntegerEntry(("total_borrowed_" + assetIdStr), (assetBorrowed + amount))] ++ ratesRecalcResult), assetAmount)
293295 }
294296 }
295297 else throw("Strict value is not equal to itself.")
296298 }
297299
298300
299301 @Callable(i)
300302 func flashPosition (user,sAssetIdStr,bAssetIdStr,bAmount,callbackAddress,callbackFunction,callbackArgs) = {
301303 let borrowRes = borrowInternal(bAssetIdStr, bAmount, user)
302304 let bAssetId = getAssetBytes(bAssetIdStr)
303305 let callback = invoke(addressFromStringValue(callbackAddress), callbackFunction, split(callbackArgs, ","), [AttachedPayment(bAssetId, bAmount)])
304306 if ((callback == callback))
305307 then {
306308 let sAmount = {
307309 let @ = callback
308310 if ($isInstanceOf(@, "Int"))
309311 then @
310312 else throw(($getType(@) + " couldn't be cast to Int"))
311313 }
312314 if ((sAmount == sAmount))
313315 then {
314316 let supplyRes = supplyInternal(sAssetIdStr, sAmount, user)
315317 let collateralValue = {
316318 let @ = invoke(this, "getUserCollateral", [false, user, true, ((sAssetIdStr + ",supplied,") + toString(sAmount))], nil)
317319 if ($isInstanceOf(@, "Int"))
318320 then @
319321 else throw(($getType(@) + " couldn't be cast to Int"))
320322 }
321323 if ((collateralValue == collateralValue))
322324 then {
323325 let borrowValue = {
324326 let @ = invoke(this, "getUserCollateral", [false, user, true, ((bAssetIdStr + ",borrowed,") + toString(bAmount))], nil)
325327 if ($isInstanceOf(@, "Int"))
326328 then @
327329 else throw(($getType(@) + " couldn't be cast to Int"))
328330 }
329331 if ((borrowValue == borrowValue))
330332 then if ((borrowValue > collateralValue))
331333 then throw("not enough collateral provided")
332334 else (borrowRes._1 ++ supplyRes._1)
333335 else throw("Strict value is not equal to itself.")
334336 }
335337 else throw("Strict value is not equal to itself.")
336338 }
337339 else throw("Strict value is not equal to itself.")
338340 }
339341 else throw("Strict value is not equal to itself.")
340342 }
341343
342344
343345
344346 @Callable(i)
345347 func supply () = if (if ((size(i.payments) != 1))
346348 then true
347349 else (i.payments[0].amount == 0))
348350 then throw("1 payment has to be attached")
349351 else {
350352 let assetIdStr = getAssetString(i.payments[0].assetId)
351353 let assetAmount = i.payments[0].amount
352354 supplyInternal(assetIdStr, assetAmount, toString(i.caller))
353355 }
354356
355357
356358
357359 @Callable(i)
358360 func withdraw (assetIdStr,assetAmount) = {
359- let $t098579924 = getActualRate(assetIdStr, "sRate")
360- let sRate = $t098579924._1
361- let ratesRecalcResult = $t098579924._2
361+ let $t01081510882 = getActualRate(assetIdStr, "sRate")
362+ let sRate = $t01081510882._1
363+ let ratesRecalcResult = $t01081510882._2
362364 let amount = fraction(assetAmount, Scale16, sRate, CEILING)
363365 let address = toString(i.caller)
364366 let assetSupplied = tryGetInteger(("total_supplied_" + assetIdStr))
365367 let assetBorrowed = tryGetInteger(("total_borrowed_" + assetIdStr))
366368 let userAssetSupplied = tryGetInteger(((address + "_supplied_") + assetIdStr))
367369 let userAssetBorrowed = tryGetInteger(((address + "_borrowed_") + assetIdStr))
368370 let collateralValueInv = invoke(this, "getUserCollateral", [false, address, true, ((assetIdStr + ",supplied,") + toString(-(amount)))], nil)
369371 if ((collateralValueInv == collateralValueInv))
370372 then {
371373 let collateralValue = match collateralValueInv {
372374 case x: Int =>
373375 x
374376 case _ =>
375377 throw("can't get user collateral value")
376378 }
377379 if (!(tryGetBoolean("setup_active")))
378380 then throw("market is stopped")
379381 else if ((0 > collateralValue))
380382 then throw("you dont have enough collateral for this operation")
381383 else if ((amount > (assetSupplied - assetBorrowed)))
382384 then throw("this amount is not available on the market")
383385 else if ((amount > (userAssetSupplied - userAssetBorrowed)))
384386 then throw("this amount is not available for this user")
385387 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)
386388 }
387389 else throw("Strict value is not equal to itself.")
388390 }
389391
390392
391393
392394 @Callable(i)
393395 func borrow (assetIdStr,assetAmount) = {
394396 let address = toString(i.caller)
395397 let res = borrowInternal(assetIdStr, assetAmount, address)
396398 let amount = res._2
397399 (res._1 ++ [ScriptTransfer(i.caller, amount, getAssetBytes(assetIdStr))])
398400 }
399401
400402
401403
402404 @Callable(i)
403405 func repay () = if (!(tryGetBoolean("setup_active")))
404406 then throw("market is stopped")
405407 else if (if ((size(i.payments) != 1))
406408 then true
407409 else (i.payments[0].amount == 0))
408410 then throw("1 payment has to be attached")
409411 else {
410412 let assetIdStr = getAssetString(i.payments[0].assetId)
411413 let assetAmount = i.payments[0].amount
412- let $t01199112058 = getActualRate(assetIdStr, "bRate")
413- let bRate = $t01199112058._1
414- let ratesRecalcResult = $t01199112058._2
414+ let $t01294913016 = getActualRate(assetIdStr, "bRate")
415+ let bRate = $t01294913016._1
416+ let ratesRecalcResult = $t01294913016._2
415417 let amount = fraction(assetAmount, Scale16, bRate, CEILING)
416418 let address = toString(i.caller)
417419 let assetSupplied = tryGetInteger(("total_supplied_" + assetIdStr))
418420 let assetBorrowed = tryGetInteger(("total_borrowed_" + assetIdStr))
419421 let userAssetBorrowed = tryGetInteger(((address + "_borrowed_") + assetIdStr))
420422 let amountLeft = (userAssetBorrowed - amount)
421423 let repayAmount = if ((amountLeft >= 0))
422424 then amount
423425 else userAssetBorrowed
424426 if ((indexOf(tryGetString("setup_tokens"), assetIdStr) == unit))
425427 then throw("this asset is not supported by the market")
426428 else (([IntegerEntry(((address + "_borrowed_") + assetIdStr), (userAssetBorrowed - repayAmount)), IntegerEntry(("total_borrowed_" + assetIdStr), (assetBorrowed - repayAmount))] ++ ratesRecalcResult) ++ (if ((amountLeft >= 0))
427429 then nil
428430 else [ScriptTransfer(i.caller, -(amountLeft), i.payments[0].assetId)]))
429431 }
430432
431433
432434
433435 @Callable(i)
434436 func stakeTokenAll (assetIdStr) = if ((i.caller != this))
435437 then throw("only for internal smart contract invocations")
436438 else {
437439 let amount = getBalance(assetIdStr)
438440 let inv = invoke(this, "stakeToken", [assetIdStr, amount], nil)
439441 if ((inv == inv))
440442 then nil
441443 else throw("Strict value is not equal to itself.")
442444 }
443445
444446
445447
446448 @Callable(i)
447449 func stakeToken (assetIdStr,amount) = if ((i.caller != this))
448450 then throw("only for internal smart contract invocations")
449451 else if ((assetIdStr == "DG2xFkPdDwKUoBkzGAhQtLpSGzfXLiCYPEzeKH2Ad24p"))
450452 then {
451453 let amountStaked = tryGetInteger("autostake_amount_DG2xFkPdDwKUoBkzGAhQtLpSGzfXLiCYPEzeKH2Ad24p")
452454 let inv = invoke(Address(base58'3PNikM6yp4NqcSU8guxQtmR5onr2D4e8yTJ'), "stake", nil, [AttachedPayment(base58'DG2xFkPdDwKUoBkzGAhQtLpSGzfXLiCYPEzeKH2Ad24p', amount)])
453455 if ((inv == inv))
454456 then [IntegerEntry("autostake_amount_DG2xFkPdDwKUoBkzGAhQtLpSGzfXLiCYPEzeKH2Ad24p", (amountStaked + amount))]
455457 else throw("Strict value is not equal to itself.")
456458 }
457459 else if ((assetIdStr == "8t4DPWTwPzpatHA9AkTxWAB47THnYzBsDnoY7fQqbG91"))
458460 then {
459461 let amountStaked = tryGetInteger("autostake_amount_8t4DPWTwPzpatHA9AkTxWAB47THnYzBsDnoY7fQqbG91")
460462 let inv = invoke(Address(base58'3PQTM38wDmAY9vWonK6ha7QL3PAycLz5oPP'), "stake", nil, [AttachedPayment(base58'8t4DPWTwPzpatHA9AkTxWAB47THnYzBsDnoY7fQqbG91', amount)])
461463 if ((inv == inv))
462464 then [IntegerEntry("autostake_amount_8t4DPWTwPzpatHA9AkTxWAB47THnYzBsDnoY7fQqbG91", (amountStaked + amount))]
463465 else throw("Strict value is not equal to itself.")
464466 }
465467 else if ((assetIdStr == "At8D6NFFpheCbvKVnjVoeLL84Eo8NZn6ovManxfLaFWL"))
466468 then {
467469 let amountStaked = tryGetInteger("autostake_amount_At8D6NFFpheCbvKVnjVoeLL84Eo8NZn6ovManxfLaFWL")
468470 let inv = invoke(Address(base58'3PBiotFpqjRMkkeFBccnQNUXUopy7KFez5C'), "stake", nil, [AttachedPayment(base58'At8D6NFFpheCbvKVnjVoeLL84Eo8NZn6ovManxfLaFWL', amount)])
469471 if ((inv == inv))
470472 then [IntegerEntry("autostake_amount_At8D6NFFpheCbvKVnjVoeLL84Eo8NZn6ovManxfLaFWL", (amountStaked + amount))]
471473 else throw("Strict value is not equal to itself.")
472474 }
473475 else nil
474476
475477
476478
477479 @Callable(i)
478480 func unstakeToken (assetIdStr,amount) = if ((i.caller != this))
479481 then throw("only for internal smart contract invocations")
480482 else if ((assetIdStr == "8t4DPWTwPzpatHA9AkTxWAB47THnYzBsDnoY7fQqbG91"))
481483 then {
482484 let amountStaked = tryGetInteger("autostake_amount_8t4DPWTwPzpatHA9AkTxWAB47THnYzBsDnoY7fQqbG91")
483485 let inv = invoke(Address(base58'3PQTM38wDmAY9vWonK6ha7QL3PAycLz5oPP'), "unStake", [amount], nil)
484486 if ((inv == inv))
485487 then [IntegerEntry("autostake_amount_8t4DPWTwPzpatHA9AkTxWAB47THnYzBsDnoY7fQqbG91", (amountStaked - amount))]
486488 else throw("Strict value is not equal to itself.")
487489 }
488490 else if ((assetIdStr == "At8D6NFFpheCbvKVnjVoeLL84Eo8NZn6ovManxfLaFWL"))
489491 then {
490492 let amountStaked = tryGetInteger("autostake_amount_At8D6NFFpheCbvKVnjVoeLL84Eo8NZn6ovManxfLaFWL")
491493 let inv = invoke(Address(base58'3PBiotFpqjRMkkeFBccnQNUXUopy7KFez5C'), "unstake", [amount], nil)
492494 if ((inv == inv))
493495 then {
494496 let bal0 = getBalance("At8D6NFFpheCbvKVnjVoeLL84Eo8NZn6ovManxfLaFWL")
495497 if ((bal0 == bal0))
496498 then {
497499 let inv2 = invoke(Address(base58'3PQrVbTVpqXHqpVKftkNdjy3zZAh4dsRzN6'), "gnsbtRewardsSYSREADONLY", [toString(this)], nil)
498500 if ((inv2 == inv2))
499501 then {
500502 let topupRewards = match inv2 {
501503 case x: List[Any] =>
502504 let secondEl = x[1]
503505 match secondEl {
504506 case secondEl: String =>
505507 let usdnValue = parseIntValue(split(split(secondEl, "_")[1], ":")[1])
506508 let wavesValue = parseIntValue(split(split(secondEl, "_")[0], ":")[1])
507509 if (if ((usdnValue != 0))
508510 then true
509511 else (wavesValue != 0))
510512 then {
511513 let usdnBal0 = getBalance("DG2xFkPdDwKUoBkzGAhQtLpSGzfXLiCYPEzeKH2Ad24p")
512514 if ((usdnBal0 == usdnBal0))
513515 then {
514516 let wavesBal0 = getBalance("WAVES")
515517 if ((wavesBal0 == wavesBal0))
516518 then {
517519 let inv3 = invoke(Address(base58'3PBiotFpqjRMkkeFBccnQNUXUopy7KFez5C'), "claimRewards", nil, nil)
518520 if ((inv3 == inv3))
519521 then {
520522 let wavesBal1 = getBalance("WAVES")
521523 if ((wavesBal1 == wavesBal1))
522524 then {
523525 let inv4 = invoke(Address(base58'3PLiXyywNThdvf3vVEUxwc7TJTucjZvuegh'), "swap", ["DG2xFkPdDwKUoBkzGAhQtLpSGzfXLiCYPEzeKH2Ad24p", 0], [AttachedPayment(unit, (wavesBal1 - wavesBal0))])
524526 if ((inv4 == inv4))
525527 then {
526528 let usdnBal1 = getBalance("DG2xFkPdDwKUoBkzGAhQtLpSGzfXLiCYPEzeKH2Ad24p")
527529 if ((usdnBal1 == usdnBal1))
528530 then {
529531 let inv5 = invoke(Address(base58'3P7r93vXHuusageNJVGwzqaz3WMotAu49Yz'), "swap", ["At8D6NFFpheCbvKVnjVoeLL84Eo8NZn6ovManxfLaFWL", 0], [AttachedPayment(base58'DG2xFkPdDwKUoBkzGAhQtLpSGzfXLiCYPEzeKH2Ad24p', (usdnBal1 - usdnBal0))])
530532 if ((inv5 == inv5))
531533 then {
532534 let inv6 = invoke(this, "addInterest", ["At8D6NFFpheCbvKVnjVoeLL84Eo8NZn6ovManxfLaFWL", (getBalance("At8D6NFFpheCbvKVnjVoeLL84Eo8NZn6ovManxfLaFWL") - bal0)], nil)
533535 if ((inv6 == inv6))
534536 then 2
535537 else throw("Strict value is not equal to itself.")
536538 }
537539 else throw("Strict value is not equal to itself.")
538540 }
539541 else throw("Strict value is not equal to itself.")
540542 }
541543 else throw("Strict value is not equal to itself.")
542544 }
543545 else throw("Strict value is not equal to itself.")
544546 }
545547 else throw("Strict value is not equal to itself.")
546548 }
547549 else throw("Strict value is not equal to itself.")
548550 }
549551 else throw("Strict value is not equal to itself.")
550552 }
551553 else 1
552554 case _ =>
553555 1
554556 }
555557 case _ =>
556558 0
557559 }
558560 if ((topupRewards == topupRewards))
559561 then [IntegerEntry("autostake_amount_At8D6NFFpheCbvKVnjVoeLL84Eo8NZn6ovManxfLaFWL", (amountStaked - amount))]
560562 else throw("Strict value is not equal to itself.")
561563 }
562564 else throw("Strict value is not equal to itself.")
563565 }
564566 else throw("Strict value is not equal to itself.")
565567 }
566568 else throw("Strict value is not equal to itself.")
567569 }
568570 else nil
569571
570572
571573
572574 @Callable(i)
573575 func addInterest (assetIdStr,amount) = if ((i.caller != this))
574576 then throw("only for self invocation")
575577 else {
576578 let earned = tryGetInteger(("autostake_lastEarned_" + assetIdStr))
577579 let lastHeight = tryGetInteger(("autostake_lastBlock_" + assetIdStr))
578580 let cleanAmount = fraction(amount, 80, 100)
579581 let stateChanges = if (if ((lastHeight == height))
580582 then true
581583 else (amount == 0))
582584 then nil
583585 else [IntegerEntry(("autostake_preLastEarned_" + assetIdStr), earned), IntegerEntry(("autostake_preLastBlock_" + assetIdStr), lastHeight), IntegerEntry(("autostake_lastEarned_" + assetIdStr), (earned + cleanAmount)), IntegerEntry(("autostake_lastBlock_" + assetIdStr), height)]
584586 (stateChanges ++ [IntegerEntry((assetIdStr + "_sRate"), (tryGetInteger((assetIdStr + "_sRate")) + fraction(Scale16, cleanAmount, tryGetInteger(("total_supplied_" + assetIdStr)))))])
585587 }
586588
587589
588590
589591 @Callable(i)
590592 func addInterestEXTERNAL () = {
591593 let amount = fraction(i.payments[0].amount, 80, 100)
592594 let assetId = i.payments[0].assetId
593595 let assetIdStr = getAssetString(assetId)
594596 let earned = tryGetInteger(("autostake_lastEarned_" + assetIdStr))
595597 let lastHeight = tryGetInteger(("autostake_lastBlock_" + assetIdStr))
596598 let stateChanges = if (if ((lastHeight == height))
597599 then true
598600 else (amount == 0))
599601 then nil
600602 else [IntegerEntry(("autostake_preLastEarned_" + assetIdStr), earned), IntegerEntry(("autostake_preLastBlock_" + assetIdStr), lastHeight), IntegerEntry(("autostake_lastEarned_" + assetIdStr), (earned + amount)), IntegerEntry(("autostake_lastBlock_" + assetIdStr), height)]
601603 (stateChanges ++ [IntegerEntry((assetIdStr + "_sRate"), (tryGetInteger((assetIdStr + "_sRate")) + fraction(Scale16, amount, tryGetInteger(("total_supplied_" + assetIdStr)))))])
602604 }
603605
604606
605607
606608 @Callable(i)
607609 func preInit (tokens,ltvs,lts,penalties) = {
608610 func f (accum,token) = (accum ++ [IntegerEntry((token + "_bRate"), Scale16), IntegerEntry((token + "_sRate"), Scale16)])
609611
610612 if ((i.caller != this))
611613 then throw("admin only")
612614 else {
613615 let rates = {
614616 let $l = split(tokens, ",")
615617 let $s = size($l)
616618 let $acc0 = nil
617619 func $f0_1 ($a,$i) = if (($i >= $s))
618620 then $a
619621 else f($a, $l[$i])
620622
621623 func $f0_2 ($a,$i) = if (($i >= $s))
622624 then $a
623625 else throw("List size exceeds 6")
624626
625627 $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6)
626628 }
627629 ([StringEntry("setup_tokens", tokens), StringEntry("setup_ltvs", ltvs), StringEntry("setup_lts", lts), StringEntry("setup_penalties", penalties), BooleanEntry("setup_active", true)] ++ rates)
628630 }
629631 }
630632
631633
632634
633635 @Callable(i)
634636 func updateParameter (key,val) = if (if ((i.caller != this))
635637 then (i.caller != Address(base58'3P3o9cLTV2u9N4nYNKRYL6gy6cUEU9DwXW8'))
636638 else false)
637639 then throw("admin only")
638640 else [IntegerEntry(key, parseIntValue(val))]
639641
640642
641643
642644 @Callable(i)
643645 func updateString (key,val) = if (if ((i.caller != this))
644646 then (i.caller != Address(base58'3P3o9cLTV2u9N4nYNKRYL6gy6cUEU9DwXW8'))
645647 else false)
646648 then throw("admin only")
647649 else [StringEntry(key, val)]
648650
649651
650652
651653 @Callable(i)
652654 func claimToReserveFund (debug) = {
653655 let assets = getMarketAssets()
654656 let rates = getActualRate(assets[0], "sRate")._2
655657 let li = [0, 1, 2, 3, 4, 5]
656658 func f (accum,n) = if ((n >= size(assets)))
657659 then accum
658660 else {
659661 let assetIdStr = assets[n]
660662 let autostakeAmount = tryGetString(("autostake_amount_" + assetIdStr))
661663 let amount = ((((getBalance(assetIdStr) + tryGetInteger(("autostake_amount_" + assetIdStr))) + (if ((autostakeAmount != ""))
662664 then parseIntValue(autostakeAmount)
663665 else 0)) + fraction(tryGetInteger(("total_borrowed_" + assetIdStr)), rates[((n * 3) + 1)].value, Scale16)) - fraction(tryGetInteger(("total_supplied_" + assetIdStr)), rates[(n * 3)].value, Scale16))
664666 let inv = if ((tryGetInteger(("autostake_amount_" + assetIdStr)) > 0))
665667 then invoke(this, "unstakeToken", [assetIdStr, max([amount, 0])], nil)
666668 else 0
667669 if ((inv == inv))
668670 then (accum ++ [amount])
669671 else throw("Strict value is not equal to itself.")
670672 }
671673
672674 let parameter = {
673675 let $l = li
674676 let $s = size($l)
675677 let $acc0 = nil
676678 func $f0_1 ($a,$i) = if (($i >= $s))
677679 then $a
678680 else f($a, $l[$i])
679681
680682 func $f0_2 ($a,$i) = if (($i >= $s))
681683 then $a
682684 else throw("List size exceeds 6")
683685
684686 $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6)
685687 }
686688 func f2 (accum,n) = if ((n >= size(assets)))
687689 then accum
688690 else {
689691 let assetIdStr = assets[n]
690692 (accum ++ [ScriptTransfer(reserveFundAddress, max([parameter[n], 0]), getAssetBytes(assetIdStr))])
691693 }
692694
693695 if (debug)
694696 then throw(liIntToStr(parameter))
695697 else $Tuple2({
696698 let $l = li
697699 let $s = size($l)
698700 let $acc0 = nil
699701 func $f1_1 ($a,$i) = if (($i >= $s))
700702 then $a
701703 else f2($a, $l[$i])
702704
703705 func $f1_2 ($a,$i) = if (($i >= $s))
704706 then $a
705707 else throw("List size exceeds 6")
706708
707709 $f1_2($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($acc0, 0), 1), 2), 3), 4), 5), 6)
708710 }, parameter)
709711 }
710712
711713
712714
713715 @Callable(i)
714716 func reSetup (assetIdStr) = {
715717 let lastResetup = tryGetInteger("resetup_lastUpdate")
716718 if ((dayBlocks > (height - lastResetup)))
717719 then throw("can be updated only once per day")
718720 else {
719721 let lts = split(tryGetString("setup_lts"), ",")
720722 let assets = getMarketAssets()
721723 let ur = getUr(assetIdStr)
722724 let tempLT = tryGetInteger((("setup_" + assetIdStr) + "_tempLT"))
723725 let lt = parseIntValue(assets[value(indexOf(assets, assetIdStr))])
724726 if ((ur > 90000000))
725727 then [IntegerEntry((("setup_" + assetIdStr) + "_tempLT"), fraction(tempLT, 9975, 10000))]
726728 else if (if ((lt > tempLT))
727729 then (90000000 > ur)
728730 else false)
729731 then [IntegerEntry((("setup_" + assetIdStr) + "_tempLT"), fraction(tempLT, 10025, 10000))]
730732 else nil
731733 }
732734 }
733735
734736
735737
736738 @Callable(i)
737739 func shutdown (shutdown) = if ((indexOf(shutdownWhitelist, i.caller.bytes) == unit))
738740 then throw("user not in a whitelist")
739741 else [BooleanEntry("setup_active", !(shutdown))]
740742
741743
742744
743745 @Callable(i)
744746 func liquidate (debug,address,assetAmount,sAssetIdStr,bAssetIdStr,routeStr) = if (!(verifyLiquidatorRights(i.caller)))
745747 then throw("temporarily available for whitelist only")
746748 else if (!(tryGetBoolean("setup_active")))
747749 then throw("market is stopped")
748750 else {
749751 let userCollateral = calcUserCollateral(address)
750752 if ((userCollateral == userCollateral))
751753 then {
752- let $t02497825040 = getActualRate(sAssetIdStr, "sRate")
753- let sRate = $t02497825040._1
754- let ratesResult = $t02497825040._2
755- let $t02504525114 = getActualRate(bAssetIdStr, "bRate")
756- let bRate = $t02504525114._1
757- let ratesRecalcResult2 = $t02504525114._2
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
758760 let sAssetAmount = fraction(assetAmount, Scale16, sRate)
759761 let currentSPosition = tryGetInteger(((address + "_supplied_") + sAssetIdStr))
760762 let currentBPositionVal = tryGetInteger(((address + "_borrowed_") + bAssetIdStr))
761763 let currentBPosition = if ((currentBPositionVal > 0))
762764 then currentBPositionVal
763765 else throw("user has no borrow in this token")
764766 if ((userCollateral > 0))
765767 then throw("user can't be liquidated")
766768 else if ((sAssetAmount > currentSPosition))
767769 then throw("position to liquidate is bigger than user's supply")
768770 else {
769771 let balance0Before = getBalance(sAssetIdStr)
770772 if ((balance0Before == balance0Before))
771773 then {
772774 let balance1Before = getBalance(bAssetIdStr)
773775 if ((balance1Before == balance1Before))
774776 then {
775777 let exchangeInvoke = invoke(aggregatorAddress, "swap", [routeStr, 0], [AttachedPayment(getAssetBytes(sAssetIdStr), assetAmount)])
776778 if ((exchangeInvoke == exchangeInvoke))
777779 then {
778780 let asset0Sold = (balance0Before - getBalance(sAssetIdStr))
779781 if ((asset0Sold == asset0Sold))
780782 then {
781783 let asset1Bought = (getBalance(bAssetIdStr) - balance1Before)
782784 if ((asset1Bought == asset1Bought))
783785 then {
784786 let asset0Price = getTokenPrice(sAssetIdStr)._1
785787 let asset0Scale = calcAssetScale(sAssetIdStr)
786788 let asset0Usd = fraction(asset0Sold, asset0Price, asset0Scale)
787789 let asset1Price = getTokenPrice(bAssetIdStr)._2
788790 let asset1Scale = calcAssetScale(bAssetIdStr)
789791 let asset1Usd = fraction(asset1Bought, asset1Price, asset1Scale)
790792 let penalty = parseIntValue(split(tryGetString("setup_penalties"), ",")[value(indexOf(getMarketAssets(), bAssetIdStr))])
791793 let liquidationProfit = (asset1Usd - fraction(asset0Usd, (Scale8 - penalty), Scale8))
792794 let sAssetChange = fraction(asset0Sold, Scale16, sRate)
793795 let bAssetChange = fraction(fraction(asset1Bought, Scale16, bRate), (Scale8 - fraction(liquidationProfit, Scale8, asset1Usd)), Scale8)
794796 if ((asset0Sold > assetAmount))
795797 then throw("more assets exchanged than expected")
796798 else if ((0 > liquidationProfit))
797799 then throw("price impact is bigger than liquidation penalty")
798800 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))]
799801 }
800802 else throw("Strict value is not equal to itself.")
801803 }
802804 else throw("Strict value is not equal to itself.")
803805 }
804806 else throw("Strict value is not equal to itself.")
805807 }
806808 else throw("Strict value is not equal to itself.")
807809 }
808810 else throw("Strict value is not equal to itself.")
809811 }
810812 }
811813 else throw("Strict value is not equal to itself.")
812814 }
813815
814816
815817
816818 @Callable(i)
817819 func liquidateV2 (debug,address,sAssetIdStr) = if (!(verifyLiquidatorRights(i.caller)))
818820 then throw("temporarily available for whitelist only")
819821 else if (!(tryGetBoolean("setup_active")))
820822 then throw("market is stopped")
821823 else {
822824 let bAssetId = i.payments[0].assetId
823825 let bAssetIdStr = getAssetString(bAssetId)
824826 let bAssetAmount = i.payments[0].amount
825827 let userCollateral = calcUserCollateral(address)
826828 if ((userCollateral == userCollateral))
827829 then if ((userCollateral > 0))
828830 then throw("user can't be liquidated")
829831 else {
830832 let marketAssets = getMarketAssets()
831833 let asset1Num = value(indexOf(marketAssets, bAssetIdStr))
832834 let asset0Num = value(indexOf(marketAssets, sAssetIdStr))
833- let $t02826928331 = getActualRate(bAssetIdStr, "bRate")
834- let bRate = $t02826928331._1
835- let ratesResult = $t02826928331._2
835+ let $t02922729289 = getActualRate(bAssetIdStr, "bRate")
836+ let bRate = $t02922729289._1
837+ let ratesResult = $t02922729289._2
836838 let asset1Price = getTokenPrice(bAssetIdStr)._2
837839 let asset1Scale = calcAssetScale(bAssetIdStr)
838840 let bAmountUsd = fraction(bAssetAmount, asset1Price, asset1Scale)
839841 let penalty = parseIntValue(value(split(tryGetString("setup_penalties"), ",")[asset1Num]))
840842 let asset0Price = getTokenPrice(sAssetIdStr)._1
841843 let asset0Scale = calcAssetScale(sAssetIdStr)
842844 let sAmountUsd = fraction(bAmountUsd, (Scale8 + penalty), Scale8)
843845 let sAssetAmount = fraction(sAmountUsd, asset0Scale, asset0Price)
844846 let bAmount = fraction(bAssetAmount, Scale16, bRate)
845847 let sAmount = fraction(sAssetAmount, Scale16, ratesResult[((asset0Num * 3) + 1)].value)
846848 let currentSPosition = tryGetInteger(((address + "_supplied_") + sAssetIdStr))
847849 let currentBPositionVal = tryGetInteger(((address + "_borrowed_") + bAssetIdStr))
848850 let currentBPosition = if ((currentBPositionVal > 0))
849851 then currentBPositionVal
850852 else throw("user has no borrow in this token")
851853 if ((sAmount > currentSPosition))
852854 then throw("position to liquidate is bigger than user's supply")
853855 else if (debug)
854856 then throw("liquidation will pass")
855857 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)
856858 }
857859 else throw("Strict value is not equal to itself.")
858860 }
859861
860862
861863
862864 @Callable(i)
863865 func getUserCollateral (debug,address,minusBorrowed,afterChange) = {
864866 let assets = getMarketAssets()
865867 let ltvs = split(tryGetString("setup_ltvs"), ",")
866868 let lts = split(tryGetString("setup_lts"), ",")
867869 let rates = getActualRate(assets[0], "sRate")._2
868870 let changeHandler = split(afterChange, ",")
869871 func f (accum,next) = if ((next >= size(assets)))
870872 then accum
871873 else {
872874 let userSupplied = tryGetInteger(((address + "_supplied_") + assets[next]))
873875 let userBorrowed = tryGetInteger(((address + "_borrowed_") + assets[next]))
874876 let needTokenAccounting = if ((afterChange == ""))
875877 then if (if ((userBorrowed != 0))
876878 then true
877879 else (userSupplied != 0))
878880 then true
879881 else false
880882 else true
881883 if (needTokenAccounting)
882884 then {
883885 let assetScale = calcAssetScale(assets[next])
884886 let assetPrice = getTokenPrice(assets[next])
885887 ((accum + fraction(fraction(fraction((userSupplied + (if (if (if ((afterChange != ""))
886888 then (changeHandler[0] == assets[next])
887889 else false)
888890 then (changeHandler[1] == "supplied")
889891 else false)
890892 then parseIntValue(changeHandler[2])
891893 else 0)), rates[(next * 3)].value, Scale16), parseIntValue(ltvs[next]), Scale8), assetPrice._1, assetScale)) - (if (minusBorrowed)
892894 then fraction(fraction(fraction((userBorrowed + (if (if (if ((afterChange != ""))
893895 then (changeHandler[0] == assets[next])
894896 else false)
895897 then (changeHandler[1] == "borrowed")
896898 else false)
897899 then parseIntValue(changeHandler[2])
898900 else 0)), rates[((next * 3) + 1)].value, Scale16), Scale8, parseIntValue(lts[next])), assetPrice._2, assetScale)
899901 else 0))
900902 }
901903 else accum
902904 }
903905
904906 let result = {
905907 let $l = [0, 1, 2, 3, 4, 5]
906908 let $s = size($l)
907909 let $acc0 = 0
908910 func $f0_1 ($a,$i) = if (($i >= $s))
909911 then $a
910912 else f($a, $l[$i])
911913
912914 func $f0_2 ($a,$i) = if (($i >= $s))
913915 then $a
914916 else throw("List size exceeds 6")
915917
916918 $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6)
917919 }
918920 if (debug)
919921 then throw(toString(result))
920922 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)
921936 }
922937
923938
924939
925940 @Callable(i)
926941 func getPrices (debug) = {
927942 let assets = getMarketAssets()
928943 func f (accum,next) = if ((next >= size(assets)))
929944 then accum
930945 else {
931946 let assetPrice = getTokenPrice(assets[next])
932947 ((((accum + toString(assetPrice._1)) + ",") + toString(assetPrice._2)) + "|")
933948 }
934949
935950 let result = {
936951 let $l = [0, 1, 2, 3, 4, 5]
937952 let $s = size($l)
938953 let $acc0 = ""
939954 func $f0_1 ($a,$i) = if (($i >= $s))
940955 then $a
941956 else f($a, $l[$i])
942957
943958 func $f0_2 ($a,$i) = if (($i >= $s))
944959 then $a
945960 else throw("List size exceeds 6")
946961
947962 $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6)
948963 }
949964 if (debug)
950965 then throw(result)
951966 else $Tuple2(nil, result)
952967 }
953968
954969
955970
956971 @Callable(i)
957972 func calculateUtilizationRatio (assetIdStr,debug) = if (debug)
958973 then throw(toString(getUr(assetIdStr)))
959974 else $Tuple2(nil, getUr(assetIdStr))
960975
961976
962977
963978 @Callable(i)
964979 func calculateOutdatedUR (assetIdStr,debug) = if (debug)
965980 then throw(toString(getOutdatedUr(assetIdStr)))
966981 else $Tuple2(nil, getOutdatedUr(assetIdStr))
967982
968983
969984
970985 @Callable(i)
971986 func calculateTokenRates (debug) = {
972987 func f (accum,assetIdStr) = {
973988 let rates = tokenRatesRecalc(assetIdStr)
974989 $Tuple2(((((accum._1 + toString(rates[1].value)) + "|") + toString(rates[0].value)) + ","), (accum._2 ++ rates))
975990 }
976991
977992 let parameter = {
978993 let $l = getMarketAssets()
979994 let $s = size($l)
980995 let $acc0 = $Tuple2("", nil)
981996 func $f0_1 ($a,$i) = if (($i >= $s))
982997 then $a
983998 else f($a, $l[$i])
984999
9851000 func $f0_2 ($a,$i) = if (($i >= $s))
9861001 then $a
9871002 else throw("List size exceeds 6")
9881003
9891004 $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6)
9901005 }
9911006 if (debug)
9921007 then throw(parameter._1)
9931008 else $Tuple2(parameter._2, parameter._1)
9941009 }
9951010
9961011
9971012
9981013 @Callable(i)
9991014 func calculateTokensInterest (debug) = {
10001015 func f (accum,assetIdStr) = {
10011016 let rate = fraction(getInterest(assetIdStr), dayBlocks, Scale8)
10021017 ((accum + toString(rate)) + ",")
10031018 }
10041019
10051020 let parameter = {
10061021 let $l = getMarketAssets()
10071022 let $s = size($l)
10081023 let $acc0 = ""
10091024 func $f0_1 ($a,$i) = if (($i >= $s))
10101025 then $a
10111026 else f($a, $l[$i])
10121027
10131028 func $f0_2 ($a,$i) = if (($i >= $s))
10141029 then $a
10151030 else throw("List size exceeds 6")
10161031
10171032 $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6)
10181033 }
10191034 if (debug)
10201035 then throw(parameter)
10211036 else $Tuple2(nil, parameter)
10221037 }
10231038
10241039
10251040 @Verifier(tx)
10261041 func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
10271042

github/deemru/w8io/026f985 
116.34 ms