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