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