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