tx · 5rrx4aBRqmU2D1DuZFeo3eVmfN1sEi69KHAJcXW5CAUJ

3P4uA5etnZi4AmBabKinq2bMiWU8KcnHZdH:  -0.01800000 Waves

2022.11.01 20:17 [3363699] smart account 3P4uA5etnZi4AmBabKinq2bMiWU8KcnHZdH > SELF 0.00000000 Waves

{ "type": 13, "id": "5rrx4aBRqmU2D1DuZFeo3eVmfN1sEi69KHAJcXW5CAUJ", "fee": 1800000, "feeAssetId": null, "timestamp": 1667323079442, "version": 2, "chainId": 87, "sender": "3P4uA5etnZi4AmBabKinq2bMiWU8KcnHZdH", "senderPublicKey": "8DxbUxhy23djr6kUEE1Jzp7oVJXBsHNaATLRiABpkSde", "proofs": [ "BRsqeDwfzZUc4PvCL47aaPaMEUpAaSfWi9raC3Vpgw27GADAERyqbjsKrdW3n4Pz5eTCaMGM1W3fcx7dyTrutub" ], "script": "base64:BgJXCAISBgoECAgICBIECgIICBIAEgQKAggBEgQKAggBEgASCAoGBAgBCAgIEgYKBAQIBAgSAwoBBBIECgIIBBIECgIIBBIDCgEEEgMKAQQSAwoBCBIDCgEEFgAGU2NhbGU4AIDC1y8AB1NjYWxlMTAAgMivoCUAB1NjYWxlMTYJAGgCBQZTY2FsZTgFBlNjYWxlOAALcmVzZXJ2ZUZ1bmQAFAAJZGF5QmxvY2tzAKALAQ10cnlHZXRJbnRlZ2VyAQNrZXkEByRtYXRjaDAJAJoIAgUEdGhpcwUDa2V5AwkAAQIFByRtYXRjaDACA0ludAQBYgUHJG1hdGNoMAUBYgAAAQ10cnlHZXRCb29sZWFuAQNrZXkEByRtYXRjaDAJAJsIAgUEdGhpcwUDa2V5AwkAAQIFByRtYXRjaDACB0Jvb2xlYW4EAWIFByRtYXRjaDAFAWIHAQx0cnlHZXRTdHJpbmcBA2tleQQHJG1hdGNoMAkAnQgCBQR0aGlzBQNrZXkDCQABAgUHJG1hdGNoMAIGU3RyaW5nBAFiBQckbWF0Y2gwBQFiAgABDmdldEFzc2V0U3RyaW5nAQdh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HMJAQV2YWx1ZQEJAM8IAgUGYXNzZXRzBQphc3NldElkU3RyAwkAZgIFAnVyAICV9SoJAMwIAgkBDEludGVnZXJFbnRyeQIJAKwCAgkArAICAgZzZXR1cF8FCmFzc2V0SWRTdHICB190ZW1wTFQJAGsDBQZ0ZW1wTFQA900AkE4FA25pbAMDCQBmAgUCbHQFBnRlbXBMVAkAZgIAgJX1KgUCdXIHCQDMCAIJAQxJbnRlZ2VyRW50cnkCCQCsAgIJAKwCAgIGc2V0dXBfBQphc3NldElkU3RyAgdfdGVtcExUCQBrAwUGdGVtcExUAKlOAJBOBQNuaWwFA25pbAFpAQhzaHV0ZG93bgEIc2h1dGRvd24ECXdoaXRlbGlzdAkAzAgCARoBV9fhI1GOfKuIWtXXKJd12Ih104+uIwWm4QkAzAgCARoBV2MNA4Gmf1tU0hy55Cgq86eANPDYtY3VZQkAzAgCARoBV7PVklRJCZoqEPvG+J8QdqvvPw9ypYkVjAkAzAgCARoBV/j6+gImwFGL7Go7RjNJ0hxxsHWL+aTKmgkAzAgCARoBV6Hfrr5FnbmGEdOYYnGJhfRbeUsgh/NHawkAzAgCARoBVzA5HNGkZhg7fn/j2N6i/bhnmP9XTREmnQUDbmlsAwkAAAIJAM8IAgUJd2hpdGVsaXN0CAgFAWkGY2FsbGVyBWJ5dGVzBQR1bml0CQACAQIXdXNlciBub3QgaW4gYSB3aGl0ZWxpc3QJAMwIAgkBDEJvb2xlYW5FbnRyeQICDHNldHVwX2FjdGl2ZQkBASEBBQhzaHV0ZG93bgUDbmlsAQJ0eAEGdmVyaWZ5AAkA9AMDCAUCdHgJYm9keUJ5dGVzCQCRAwIIBQJ0eAZwcm9vZnMAAAgFAnR4D3NlbmRlclB1YmxpY0tlef0/gMk=", "height": 3363699, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: GHxftqxfNNfx395BWRsEsQRG8mFzUU8eZDX7hPC3yKUY Next: 4dKACxKswcTTi43ubzRZasaE23XVHoAeB6YkxmB39UYD Diff:
OldNewDifferences
153153
154154
155155 func getTokenPrice (assetIdStr) = {
156- let inv = invoke(addressFromStringValue("3P5BTtdj32Sd1Dyh1Mdw33xQAAckSfMfnKf"), "getTWAP60", [assetIdStr, false], nil)
157- if ((inv == inv))
158- then match inv {
159- case x: (Int, Int) =>
160- x
161- case _ =>
162- throw("error of price oracle")
163- }
156+ let inv1 = invoke(addressFromStringValue("3P5BTtdj32Sd1Dyh1Mdw33xQAAckSfMfnKf"), "getTWAP60", [assetIdStr, false], nil)
157+ if ((inv1 == inv1))
158+ then {
159+ let inv2 = invoke(addressFromStringValue("3P8pvmcBi9JeBrnPgWDTaPWrWmGzxiDkpTu"), "getTWAP60", [assetIdStr, false], nil)
160+ if ((inv2 == inv2))
161+ then {
162+ let data1 = match inv1 {
163+ case x: (Int, Int) =>
164+ x
165+ case _ =>
166+ throw("error of price oracle")
167+ }
168+ if ((data1 == data1))
169+ then {
170+ let data2 = match inv2 {
171+ case x: (Int, Int) =>
172+ x
173+ case _ =>
174+ throw("error of price oracle")
175+ }
176+ if ((data2 == data2))
177+ then $Tuple2(min([data1._1, data2._1]), max([data1._2, data2._2]))
178+ else throw("Strict value is not equal to itself.")
179+ }
180+ else throw("Strict value is not equal to itself.")
181+ }
182+ else throw("Strict value is not equal to itself.")
183+ }
164184 else throw("Strict value is not equal to itself.")
165185 }
166186
235255 else {
236256 let assetIdStr = getAssetString(i.payments[0].assetId)
237257 let assetAmount = i.payments[0].amount
238- let $t062446311 = getActualRate(assetIdStr, "sRate")
239- let sRate = $t062446311._1
240- let ratesRecalcResult = $t062446311._2
258+ let $t065496616 = getActualRate(assetIdStr, "sRate")
259+ let sRate = $t065496616._1
260+ let ratesRecalcResult = $t065496616._2
241261 let amount = fraction(assetAmount, Scale16, sRate, DOWN)
242262 let address = toString(i.caller)
243263 if ((indexOf(tryGetString("setup_tokens"), assetIdStr) == unit))
249269
250270 @Callable(i)
251271 func withdraw (assetIdStr,assetAmount) = {
252- let $t068826949 = getActualRate(assetIdStr, "sRate")
253- let sRate = $t068826949._1
254- let ratesRecalcResult = $t068826949._2
272+ let $t071877254 = getActualRate(assetIdStr, "sRate")
273+ let sRate = $t071877254._1
274+ let ratesRecalcResult = $t071877254._2
255275 let amount = fraction(assetAmount, Scale16, sRate, HALFUP)
256276 let address = toString(i.caller)
257277 let assetSupplied = tryGetInteger(("total_supplied_" + assetIdStr))
285305 @Callable(i)
286306 func borrow (assetIdStr,assetAmount) = {
287307 let address = toString(i.caller)
288- let $t084418508 = getActualRate(assetIdStr, "bRate")
289- let bRate = $t084418508._1
290- let ratesRecalcResult = $t084418508._2
308+ let $t087468813 = getActualRate(assetIdStr, "bRate")
309+ let bRate = $t087468813._1
310+ let ratesRecalcResult = $t087468813._2
291311 let amount = fraction(assetAmount, Scale16, bRate, CEILING)
292312 let collateralValueInv = invoke(this, "getUserCollateral", [false, address, true, ((assetIdStr + ",borrowed,") + toString(amount))], nil)
293313 if ((collateralValueInv == collateralValueInv))
326346 else {
327347 let assetIdStr = getAssetString(i.payments[0].assetId)
328348 let assetAmount = i.payments[0].amount
329- let $t099329999 = getActualRate(assetIdStr, "bRate")
330- let bRate = $t099329999._1
331- let ratesRecalcResult = $t099329999._2
349+ let $t01023710304 = getActualRate(assetIdStr, "bRate")
350+ let bRate = $t01023710304._1
351+ let ratesRecalcResult = $t01023710304._2
332352 let amount = fraction(assetAmount, Scale16, bRate)
333353 let address = toString(i.caller)
334354 let assetSupplied = tryGetInteger(("total_supplied_" + assetIdStr))
356376 let userCollateral = calcUserCollateral(address)
357377 if ((userCollateral == userCollateral))
358378 then {
359- let $t01136311432 = getActualRate(sAssetIdStr, "sRate")
360- let sRate = $t01136311432._1
361- let ratesRecalcResult1 = $t01136311432._2
362- let $t01143711506 = getActualRate(bAssetIdStr, "bRate")
363- let bRate = $t01143711506._1
364- let ratesRecalcResult2 = $t01143711506._2
379+ let $t01166811737 = getActualRate(sAssetIdStr, "sRate")
380+ let sRate = $t01166811737._1
381+ let ratesRecalcResult1 = $t01166811737._2
382+ let $t01174211811 = getActualRate(bAssetIdStr, "bRate")
383+ let bRate = $t01174211811._1
384+ let ratesRecalcResult2 = $t01174211811._2
365385 let sAssetAmount = fraction(assetAmount, Scale16, sRate)
366386 let currentSPosition = tryGetInteger(((address + "_supplied_") + sAssetIdStr))
367387 let currentBPosition = tryGetInteger(((address + "_borrowed_") + bAssetIdStr))
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let Scale8 = 100000000
55
66 let Scale10 = 10000000000
77
88 let Scale16 = (Scale8 * Scale8)
99
1010 let reserveFund = 20
1111
1212 let dayBlocks = 1440
1313
1414 func tryGetInteger (key) = match getInteger(this, key) {
1515 case b: Int =>
1616 b
1717 case _ =>
1818 0
1919 }
2020
2121
2222 func tryGetBoolean (key) = match getBoolean(this, key) {
2323 case b: Boolean =>
2424 b
2525 case _ =>
2626 false
2727 }
2828
2929
3030 func tryGetString (key) = match getString(this, key) {
3131 case b: String =>
3232 b
3333 case _ =>
3434 ""
3535 }
3636
3737
3838 func getAssetString (assetId) = match assetId {
3939 case b: ByteVector =>
4040 toBase58String(b)
4141 case _ =>
4242 "WAVES"
4343 }
4444
4545
4646 func getAssetBytes (assetIdStr) = if ((assetIdStr == "WAVES"))
4747 then unit
4848 else fromBase58String(assetIdStr)
4949
5050
5151 func getBalance (assetIdStr) = if ((assetIdStr == "WAVES"))
5252 then wavesBalance(this).available
5353 else assetBalance(this, fromBase58String(assetIdStr))
5454
5555
5656 func getMarketAssets () = split(tryGetString("setup_tokens"), ",")
5757
5858
5959 func getOutdatedUr (assetIdStr) = {
6060 let down = fraction(tryGetInteger(("total_supplied_" + assetIdStr)), tryGetInteger((assetIdStr + "_sRate")), Scale16)
6161 if ((down == 0))
6262 then 0
6363 else fraction(Scale8, fraction(tryGetInteger(("total_borrowed_" + assetIdStr)), tryGetInteger((assetIdStr + "_bRate")), Scale16), down)
6464 }
6565
6666
6767 func getRateCurve (assetIdStr) = match assetIdStr {
6868 case _ =>
6969 if (("34N9YcEETLWn93qYQ64EsP1x89tSruJU44RrEMSXXEPJ" == $match0))
7070 then $Tuple4(2000000, 25000000, 80000000, 100000000)
7171 else if (("DG2xFkPdDwKUoBkzGAhQtLpSGzfXLiCYPEzeKH2Ad24p" == $match0))
7272 then $Tuple4(2000000, 25000000, 80000000, 100000000)
7373 else if (("Ajso6nTTjptu2UHLx6hfSXVtHFtRBJCkKYd5SAyj7zf5" == $match0))
7474 then $Tuple4(2000000, 40000000, 80000000, 150000000)
7575 else if (("HEB8Qaw9xrWpWs8tHsiATYGBWDBtP2S7kcPALrMu43AS" == $match0))
7676 then $Tuple4(0, 20000000, 80000000, 40000000)
7777 else if (("WAVES" == $match0))
7878 then $Tuple4(2000000, 30000000, 80000000, 50000000)
7979 else $Tuple4(0, 20000000, 80000000, 80000000)
8080 }
8181
8282
8383 func getInterest (assetIdStr) = {
8484 let ur = getOutdatedUr(assetIdStr)
8585 let curve = getRateCurve(assetIdStr)
8686 let rate = (curve._1 + (if ((curve._3 >= ur))
8787 then fraction(ur, curve._2, curve._3)
8888 else (curve._2 + fraction((ur - curve._3), (curve._4 - curve._2), (100000000 - curve._3)))))
8989 max([fraction(rate, Scale8, (dayBlocks * 365)), 1])
9090 }
9191
9292
9393 func tokenRatesRecalc (assetIdStr) = {
9494 let interest = getInterest(assetIdStr)
9595 let ur = getOutdatedUr(assetIdStr)
9696 let lastRecalcHeight = tryGetInteger("lastRateHeight")
9797 let lastBRate = max([tryGetInteger((assetIdStr + "_bRate")), Scale16])
9898 let newBRate = (lastBRate + ((height - lastRecalcHeight) * interest))
9999 let lastSRate = max([tryGetInteger((assetIdStr + "_sRate")), Scale16])
100100 let newSRate = (lastSRate + ((((height - lastRecalcHeight) * fraction(interest, ur, Scale8)) * (100 - reserveFund)) / 100))
101101 [IntegerEntry((assetIdStr + "_sRate"), newSRate), IntegerEntry((assetIdStr + "_bRate"), newBRate), IntegerEntry("lastRateHeight", height)]
102102 }
103103
104104
105105 func getActualRate (assetIdStr,rateType) = {
106106 func f (accum,token) = {
107107 let recalc = tokenRatesRecalc(token)
108108 $Tuple2(if ((token != assetIdStr))
109109 then accum._1
110110 else if ((rateType == "sRate"))
111111 then recalc[0].value
112112 else recalc[1].value, (accum._2 ++ recalc))
113113 }
114114
115115 let $l = getMarketAssets()
116116 let $s = size($l)
117117 let $acc0 = $Tuple2(0, nil)
118118 func $f0_1 ($a,$i) = if (($i >= $s))
119119 then $a
120120 else f($a, $l[$i])
121121
122122 func $f0_2 ($a,$i) = if (($i >= $s))
123123 then $a
124124 else throw("List size exceeds 6")
125125
126126 $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6)
127127 }
128128
129129
130130 func getUr (assetIdStr) = {
131131 let rates = tokenRatesRecalc(assetIdStr)
132132 let down = fraction(tryGetInteger(("total_supplied_" + assetIdStr)), rates[0].value, Scale16)
133133 fraction(Scale8, fraction(tryGetInteger(("total_borrowed_" + assetIdStr)), rates[1].value, Scale16), down)
134134 }
135135
136136
137137 func ratesRecalc () = {
138138 func f (accum,token) = (accum ++ tokenRatesRecalc(token))
139139
140140 let $l = getMarketAssets()
141141 let $s = size($l)
142142 let $acc0 = nil
143143 func $f0_1 ($a,$i) = if (($i >= $s))
144144 then $a
145145 else f($a, $l[$i])
146146
147147 func $f0_2 ($a,$i) = if (($i >= $s))
148148 then $a
149149 else throw("List size exceeds 6")
150150
151151 $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6)
152152 }
153153
154154
155155 func getTokenPrice (assetIdStr) = {
156- let inv = invoke(addressFromStringValue("3P5BTtdj32Sd1Dyh1Mdw33xQAAckSfMfnKf"), "getTWAP60", [assetIdStr, false], nil)
157- if ((inv == inv))
158- then match inv {
159- case x: (Int, Int) =>
160- x
161- case _ =>
162- throw("error of price oracle")
163- }
156+ let inv1 = invoke(addressFromStringValue("3P5BTtdj32Sd1Dyh1Mdw33xQAAckSfMfnKf"), "getTWAP60", [assetIdStr, false], nil)
157+ if ((inv1 == inv1))
158+ then {
159+ let inv2 = invoke(addressFromStringValue("3P8pvmcBi9JeBrnPgWDTaPWrWmGzxiDkpTu"), "getTWAP60", [assetIdStr, false], nil)
160+ if ((inv2 == inv2))
161+ then {
162+ let data1 = match inv1 {
163+ case x: (Int, Int) =>
164+ x
165+ case _ =>
166+ throw("error of price oracle")
167+ }
168+ if ((data1 == data1))
169+ then {
170+ let data2 = match inv2 {
171+ case x: (Int, Int) =>
172+ x
173+ case _ =>
174+ throw("error of price oracle")
175+ }
176+ if ((data2 == data2))
177+ then $Tuple2(min([data1._1, data2._1]), max([data1._2, data2._2]))
178+ else throw("Strict value is not equal to itself.")
179+ }
180+ else throw("Strict value is not equal to itself.")
181+ }
182+ else throw("Strict value is not equal to itself.")
183+ }
164184 else throw("Strict value is not equal to itself.")
165185 }
166186
167187
168188 func calcAssetScale (assetIdStr) = {
169189 let decimals = if ((assetIdStr == "WAVES"))
170190 then 8
171191 else value(assetInfo(fromBase58String(assetIdStr))).decimals
172192 pow(10, 0, decimals, 0, 0, DOWN)
173193 }
174194
175195
176196 func calcUserCollateral (address) = {
177197 let userCollateralInvoke = invoke(this, "getUserCollateral", [false, address, true, ""], nil)
178198 if ((userCollateralInvoke == userCollateralInvoke))
179199 then {
180200 let userCollateralValue = match userCollateralInvoke {
181201 case x: Int =>
182202 x
183203 case _ =>
184204 throw("issue while doing in-dapp invocation")
185205 }
186206 if ((userCollateralValue == userCollateralValue))
187207 then userCollateralValue
188208 else throw("Strict value is not equal to itself.")
189209 }
190210 else throw("Strict value is not equal to itself.")
191211 }
192212
193213
194214 @Callable(i)
195215 func preInit (tokens,ltvs,lts,penalties) = {
196216 func f (accum,token) = (accum ++ [IntegerEntry((token + "_bRate"), Scale16), IntegerEntry((token + "_sRate"), Scale16)])
197217
198218 if ((i.caller != this))
199219 then throw("admin only")
200220 else {
201221 let rates = {
202222 let $l = split(tokens, ",")
203223 let $s = size($l)
204224 let $acc0 = nil
205225 func $f0_1 ($a,$i) = if (($i >= $s))
206226 then $a
207227 else f($a, $l[$i])
208228
209229 func $f0_2 ($a,$i) = if (($i >= $s))
210230 then $a
211231 else throw("List size exceeds 6")
212232
213233 $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6)
214234 }
215235 ([StringEntry("setup_tokens", tokens), StringEntry("setup_ltvs", ltvs), StringEntry("setup_lts", lts), StringEntry("setup_penalties", penalties), BooleanEntry("setup_active", true)] ++ rates)
216236 }
217237 }
218238
219239
220240
221241 @Callable(i)
222242 func updateParameter (key,val) = if ((i.caller != this))
223243 then throw("admin only")
224244 else [StringEntry(key, val)]
225245
226246
227247
228248 @Callable(i)
229249 func supply () = if (!(tryGetBoolean("setup_active")))
230250 then throw("market is stopped")
231251 else if (if ((size(i.payments) != 1))
232252 then true
233253 else (i.payments[0].amount == 0))
234254 then throw("1 payment has to be attached")
235255 else {
236256 let assetIdStr = getAssetString(i.payments[0].assetId)
237257 let assetAmount = i.payments[0].amount
238- let $t062446311 = getActualRate(assetIdStr, "sRate")
239- let sRate = $t062446311._1
240- let ratesRecalcResult = $t062446311._2
258+ let $t065496616 = getActualRate(assetIdStr, "sRate")
259+ let sRate = $t065496616._1
260+ let ratesRecalcResult = $t065496616._2
241261 let amount = fraction(assetAmount, Scale16, sRate, DOWN)
242262 let address = toString(i.caller)
243263 if ((indexOf(tryGetString("setup_tokens"), assetIdStr) == unit))
244264 then throw("this asset is not supported by the market")
245265 else ([IntegerEntry(((address + "_supplied_") + assetIdStr), (tryGetInteger(((address + "_supplied_") + assetIdStr)) + amount)), IntegerEntry(("total_supplied_" + assetIdStr), (tryGetInteger(("total_supplied_" + assetIdStr)) + amount))] ++ ratesRecalcResult)
246266 }
247267
248268
249269
250270 @Callable(i)
251271 func withdraw (assetIdStr,assetAmount) = {
252- let $t068826949 = getActualRate(assetIdStr, "sRate")
253- let sRate = $t068826949._1
254- let ratesRecalcResult = $t068826949._2
272+ let $t071877254 = getActualRate(assetIdStr, "sRate")
273+ let sRate = $t071877254._1
274+ let ratesRecalcResult = $t071877254._2
255275 let amount = fraction(assetAmount, Scale16, sRate, HALFUP)
256276 let address = toString(i.caller)
257277 let assetSupplied = tryGetInteger(("total_supplied_" + assetIdStr))
258278 let assetBorrowed = tryGetInteger(("total_borrowed_" + assetIdStr))
259279 let userAssetSupplied = tryGetInteger(((address + "_supplied_") + assetIdStr))
260280 let userAssetBorrowed = tryGetInteger(((address + "_borrowed_") + assetIdStr))
261281 let collateralValueInv = invoke(this, "getUserCollateral", [false, address, true, ((assetIdStr + ",supplied,") + toString(-(amount)))], nil)
262282 if ((collateralValueInv == collateralValueInv))
263283 then {
264284 let collateralValue = match collateralValueInv {
265285 case x: Int =>
266286 x
267287 case _ =>
268288 throw("can't get user collateral value")
269289 }
270290 if (!(tryGetBoolean("setup_active")))
271291 then throw("market is stopped")
272292 else if ((0 > collateralValue))
273293 then throw("you dont have enough collateral for this operation")
274294 else if ((amount > (assetSupplied - assetBorrowed)))
275295 then throw("this amount is not available on the market")
276296 else if ((amount > (userAssetSupplied - userAssetBorrowed)))
277297 then throw("this amount is not available for this user")
278298 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)
279299 }
280300 else throw("Strict value is not equal to itself.")
281301 }
282302
283303
284304
285305 @Callable(i)
286306 func borrow (assetIdStr,assetAmount) = {
287307 let address = toString(i.caller)
288- let $t084418508 = getActualRate(assetIdStr, "bRate")
289- let bRate = $t084418508._1
290- let ratesRecalcResult = $t084418508._2
308+ let $t087468813 = getActualRate(assetIdStr, "bRate")
309+ let bRate = $t087468813._1
310+ let ratesRecalcResult = $t087468813._2
291311 let amount = fraction(assetAmount, Scale16, bRate, CEILING)
292312 let collateralValueInv = invoke(this, "getUserCollateral", [false, address, true, ((assetIdStr + ",borrowed,") + toString(amount))], nil)
293313 if ((collateralValueInv == collateralValueInv))
294314 then {
295315 let collateralValue = match collateralValueInv {
296316 case x: Int =>
297317 x
298318 case _ =>
299319 throw("can't get user collateral value")
300320 }
301321 if (!(tryGetBoolean("setup_active")))
302322 then throw("market is stopped")
303323 else if ((0 > collateralValue))
304324 then throw("you have to supply more to borrow")
305325 else {
306326 let assetSupplied = tryGetInteger(("total_supplied_" + assetIdStr))
307327 let assetBorrowed = tryGetInteger(("total_borrowed_" + assetIdStr))
308328 let userAssetBorrowed = tryGetInteger(((address + "_borrowed_") + assetIdStr))
309329 if ((amount > (assetSupplied - assetBorrowed)))
310330 then throw("this amount is not available")
311331 else ([IntegerEntry(((address + "_borrowed_") + assetIdStr), (userAssetBorrowed + amount)), IntegerEntry(("total_borrowed_" + assetIdStr), (assetBorrowed + amount)), ScriptTransfer(i.caller, assetAmount, getAssetBytes(assetIdStr))] ++ ratesRecalcResult)
312332 }
313333 }
314334 else throw("Strict value is not equal to itself.")
315335 }
316336
317337
318338
319339 @Callable(i)
320340 func repay () = if (!(tryGetBoolean("setup_active")))
321341 then throw("market is stopped")
322342 else if (if ((size(i.payments) != 1))
323343 then true
324344 else (i.payments[0].amount == 0))
325345 then throw("1 payment has to be attached")
326346 else {
327347 let assetIdStr = getAssetString(i.payments[0].assetId)
328348 let assetAmount = i.payments[0].amount
329- let $t099329999 = getActualRate(assetIdStr, "bRate")
330- let bRate = $t099329999._1
331- let ratesRecalcResult = $t099329999._2
349+ let $t01023710304 = getActualRate(assetIdStr, "bRate")
350+ let bRate = $t01023710304._1
351+ let ratesRecalcResult = $t01023710304._2
332352 let amount = fraction(assetAmount, Scale16, bRate)
333353 let address = toString(i.caller)
334354 let assetSupplied = tryGetInteger(("total_supplied_" + assetIdStr))
335355 let assetBorrowed = tryGetInteger(("total_borrowed_" + assetIdStr))
336356 let userAssetBorrowed = tryGetInteger(((address + "_borrowed_") + assetIdStr))
337357 let amountLeft = (userAssetBorrowed - amount)
338358 let repayAmount = if ((amountLeft >= 0))
339359 then amount
340360 else userAssetBorrowed
341361 if ((indexOf(tryGetString("setup_tokens"), assetIdStr) == unit))
342362 then throw("this asset is not supported by the market")
343363 else (([IntegerEntry(((address + "_borrowed_") + assetIdStr), (userAssetBorrowed - repayAmount)), IntegerEntry(("total_borrowed_" + assetIdStr), (assetBorrowed - repayAmount))] ++ ratesRecalcResult) ++ (if ((amountLeft >= 0))
344364 then nil
345365 else [ScriptTransfer(i.caller, -(amountLeft), i.payments[0].assetId)]))
346366 }
347367
348368
349369
350370 @Callable(i)
351371 func liquidate (debug,address,assetAmount,sAssetIdStr,bAssetIdStr,routeStr) = if ((i.caller != Address(base58'3PCqdm1mAoQqR46oZotFanmqb5CLUvrKEo2')))
352372 then throw("temporarily listed for whitelist only")
353373 else if (!(tryGetBoolean("setup_active")))
354374 then throw("market is stopped")
355375 else {
356376 let userCollateral = calcUserCollateral(address)
357377 if ((userCollateral == userCollateral))
358378 then {
359- let $t01136311432 = getActualRate(sAssetIdStr, "sRate")
360- let sRate = $t01136311432._1
361- let ratesRecalcResult1 = $t01136311432._2
362- let $t01143711506 = getActualRate(bAssetIdStr, "bRate")
363- let bRate = $t01143711506._1
364- let ratesRecalcResult2 = $t01143711506._2
379+ let $t01166811737 = getActualRate(sAssetIdStr, "sRate")
380+ let sRate = $t01166811737._1
381+ let ratesRecalcResult1 = $t01166811737._2
382+ let $t01174211811 = getActualRate(bAssetIdStr, "bRate")
383+ let bRate = $t01174211811._1
384+ let ratesRecalcResult2 = $t01174211811._2
365385 let sAssetAmount = fraction(assetAmount, Scale16, sRate)
366386 let currentSPosition = tryGetInteger(((address + "_supplied_") + sAssetIdStr))
367387 let currentBPosition = tryGetInteger(((address + "_borrowed_") + bAssetIdStr))
368388 if ((userCollateral > 0))
369389 then throw("user can't be liquidated")
370390 else if ((sAssetAmount > currentSPosition))
371391 then throw("position to liquidate is bigger than user's supply")
372392 else {
373393 let aggregatorAddress = Address(base58'3PGFHzVGT4NTigwCKP1NcwoXkodVZwvBuuU')
374394 let balance0Before = getBalance(sAssetIdStr)
375395 if ((balance0Before == balance0Before))
376396 then {
377397 let balance1Before = getBalance(bAssetIdStr)
378398 if ((balance1Before == balance1Before))
379399 then {
380400 let exchangeInvoke = invoke(aggregatorAddress, "swap", [routeStr, 0], [AttachedPayment(getAssetBytes(sAssetIdStr), assetAmount)])
381401 if ((exchangeInvoke == exchangeInvoke))
382402 then {
383403 let asset0Sold = (balance0Before - getBalance(sAssetIdStr))
384404 if ((asset0Sold == asset0Sold))
385405 then {
386406 let asset1Bought = (getBalance(bAssetIdStr) - balance1Before)
387407 if ((asset1Bought == asset1Bought))
388408 then {
389409 let asset0Price = getTokenPrice(sAssetIdStr)._2
390410 let asset0Scale = calcAssetScale(sAssetIdStr)
391411 let asset0Usd = fraction(asset0Sold, asset0Price, asset0Scale)
392412 let asset1Price = getTokenPrice(bAssetIdStr)._1
393413 let asset1Scale = calcAssetScale(bAssetIdStr)
394414 let asset1Usd = fraction(asset1Bought, asset1Price, asset1Scale)
395415 let penalty = parseIntValue(split(tryGetString("setup_penalties"), ",")[value(indexOf(getMarketAssets(), bAssetIdStr))])
396416 let liquidationProfit = (asset1Usd - fraction(asset0Usd, (Scale8 - penalty), Scale8))
397417 let sAssetChange = fraction(asset0Sold, Scale16, sRate)
398418 let bAssetChange = fraction(asset1Bought, Scale16, bRate)
399419 if ((asset0Sold > assetAmount))
400420 then throw("more assets exchanged than expected")
401421 else if ((0 > liquidationProfit))
402422 then throw("price impact is bigger than liquidation penalty")
403423 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)), ScriptTransfer(i.caller, liquidationProfit, getAssetBytes(bAssetIdStr))]
404424 }
405425 else throw("Strict value is not equal to itself.")
406426 }
407427 else throw("Strict value is not equal to itself.")
408428 }
409429 else throw("Strict value is not equal to itself.")
410430 }
411431 else throw("Strict value is not equal to itself.")
412432 }
413433 else throw("Strict value is not equal to itself.")
414434 }
415435 }
416436 else throw("Strict value is not equal to itself.")
417437 }
418438
419439
420440
421441 @Callable(i)
422442 func getUserCollateral (debug,address,minusBorrowed,afterChange) = {
423443 let assets = getMarketAssets()
424444 let ltvs = split(tryGetString("setup_ltvs"), ",")
425445 let lts = split(tryGetString("setup_lts"), ",")
426446 let rates = getActualRate(assets[0], "sRate")._2
427447 let changeHandler = split(afterChange, ",")
428448 func f (accum,next) = if ((next >= size(assets)))
429449 then accum
430450 else {
431451 let decimals = if ((assets[next] == "WAVES"))
432452 then 8
433453 else value(assetInfo(fromBase58String(assets[next]))).decimals
434454 let assetScale = pow(10, 0, decimals, 0, 0, DOWN)
435455 let assetPrice = getTokenPrice(assets[next])
436456 ((accum + fraction(fraction(fraction((tryGetInteger(((address + "_supplied_") + assets[next])) + (if (if (if ((afterChange != ""))
437457 then (changeHandler[0] == assets[next])
438458 else false)
439459 then (changeHandler[1] == "supplied")
440460 else false)
441461 then parseIntValue(changeHandler[2])
442462 else 0)), rates[(next * 3)].value, Scale16), parseIntValue(ltvs[next]), Scale8), assetPrice._1, assetScale)) - (if (minusBorrowed)
443463 then fraction(fraction(fraction((tryGetInteger(((address + "_borrowed_") + assets[next])) + (if (if (if ((afterChange != ""))
444464 then (changeHandler[0] == assets[next])
445465 else false)
446466 then (changeHandler[1] == "borrowed")
447467 else false)
448468 then parseIntValue(changeHandler[2])
449469 else 0)), rates[((next * 3) + 1)].value, Scale16), Scale8, parseIntValue(lts[next])), assetPrice._2, assetScale)
450470 else 0))
451471 }
452472
453473 let result = {
454474 let $l = [0, 1, 2, 3, 4, 5]
455475 let $s = size($l)
456476 let $acc0 = 0
457477 func $f0_1 ($a,$i) = if (($i >= $s))
458478 then $a
459479 else f($a, $l[$i])
460480
461481 func $f0_2 ($a,$i) = if (($i >= $s))
462482 then $a
463483 else throw("List size exceeds 6")
464484
465485 $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6)
466486 }
467487 if (debug)
468488 then throw(toString(result))
469489 else $Tuple2(rates, result)
470490 }
471491
472492
473493
474494 @Callable(i)
475495 func getPrices (debug) = {
476496 let assets = getMarketAssets()
477497 func f (accum,next) = if ((next >= size(assets)))
478498 then accum
479499 else {
480500 let assetPrice = getTokenPrice(assets[next])
481501 ((((accum + toString(assetPrice._1)) + ",") + toString(assetPrice._2)) + "|")
482502 }
483503
484504 let result = {
485505 let $l = [0, 1, 2, 3, 4, 5]
486506 let $s = size($l)
487507 let $acc0 = ""
488508 func $f0_1 ($a,$i) = if (($i >= $s))
489509 then $a
490510 else f($a, $l[$i])
491511
492512 func $f0_2 ($a,$i) = if (($i >= $s))
493513 then $a
494514 else throw("List size exceeds 6")
495515
496516 $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6)
497517 }
498518 if (debug)
499519 then throw(result)
500520 else $Tuple2(nil, result)
501521 }
502522
503523
504524
505525 @Callable(i)
506526 func calculateUtilizationRatio (assetIdStr,debug) = if (debug)
507527 then throw(toString(getUr(assetIdStr)))
508528 else $Tuple2(nil, getUr(assetIdStr))
509529
510530
511531
512532 @Callable(i)
513533 func calculateOutdatedUR (assetIdStr,debug) = if (debug)
514534 then throw(toString(getOutdatedUr(assetIdStr)))
515535 else $Tuple2(nil, getOutdatedUr(assetIdStr))
516536
517537
518538
519539 @Callable(i)
520540 func calculateTokenRates (debug) = {
521541 func f (accum,assetIdStr) = {
522542 let rates = tokenRatesRecalc(assetIdStr)
523543 $Tuple2(((((accum._1 + toString(rates[1].value)) + "|") + toString(rates[0].value)) + ","), (accum._2 ++ rates))
524544 }
525545
526546 let parameter = {
527547 let $l = getMarketAssets()
528548 let $s = size($l)
529549 let $acc0 = $Tuple2("", nil)
530550 func $f0_1 ($a,$i) = if (($i >= $s))
531551 then $a
532552 else f($a, $l[$i])
533553
534554 func $f0_2 ($a,$i) = if (($i >= $s))
535555 then $a
536556 else throw("List size exceeds 6")
537557
538558 $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6)
539559 }
540560 if (debug)
541561 then throw(parameter._1)
542562 else $Tuple2(parameter._2, parameter._1)
543563 }
544564
545565
546566
547567 @Callable(i)
548568 func calculateTokensInterest (debug) = {
549569 func f (accum,assetIdStr) = {
550570 let rate = fraction(getInterest(assetIdStr), dayBlocks, Scale8)
551571 ((accum + toString(rate)) + ",")
552572 }
553573
554574 let parameter = {
555575 let $l = getMarketAssets()
556576 let $s = size($l)
557577 let $acc0 = ""
558578 func $f0_1 ($a,$i) = if (($i >= $s))
559579 then $a
560580 else f($a, $l[$i])
561581
562582 func $f0_2 ($a,$i) = if (($i >= $s))
563583 then $a
564584 else throw("List size exceeds 6")
565585
566586 $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6)
567587 }
568588 if (debug)
569589 then throw(parameter)
570590 else $Tuple2(nil, parameter)
571591 }
572592
573593
574594
575595 @Callable(i)
576596 func reSetup (assetIdStr) = {
577597 let lastResetup = tryGetInteger("resetup_lastUpdate")
578598 if ((dayBlocks > (height - lastResetup)))
579599 then throw("can be updated only once per day")
580600 else {
581601 let lts = split(tryGetString("setup_lts"), ",")
582602 let assets = getMarketAssets()
583603 let ur = getUr(assetIdStr)
584604 let tempLT = tryGetInteger((("setup_" + assetIdStr) + "_tempLT"))
585605 let lt = parseIntValue(assets[value(indexOf(assets, assetIdStr))])
586606 if ((ur > 90000000))
587607 then [IntegerEntry((("setup_" + assetIdStr) + "_tempLT"), fraction(tempLT, 9975, 10000))]
588608 else if (if ((lt > tempLT))
589609 then (90000000 > ur)
590610 else false)
591611 then [IntegerEntry((("setup_" + assetIdStr) + "_tempLT"), fraction(tempLT, 10025, 10000))]
592612 else nil
593613 }
594614 }
595615
596616
597617
598618 @Callable(i)
599619 func shutdown (shutdown) = {
600620 let whitelist = [base58'3PMcMiMEs6w56NRGacksXtFG5zS7doE9fpL', base58'3PAxdDSmN758L5SHSGRC5apEtQE2aApZotG', base58'3PJKmXoHJvVeQXjSJdhtkUcFDtdiQqMbUTD', base58'3PQdNxynJy5mche2kxMVc5shXWzK8Gstq3o', base58'3PGgoUsQX3a5zGCc4e2nEnDCWAkzJ1jASzv', base58'3P6Ksahs71SiKQgQ4qaZuFAVhqncdi2nvJQ']
601621 if ((indexOf(whitelist, i.caller.bytes) == unit))
602622 then throw("user not in a whitelist")
603623 else [BooleanEntry("setup_active", !(shutdown))]
604624 }
605625
606626
607627 @Verifier(tx)
608628 func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
609629

github/deemru/w8io/fabc49c 
93.42 ms