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 | |
---|---|---|---|
7 | 7 | ||
8 | 8 | let c = 1000000 | |
9 | 9 | ||
10 | - | let d = Address(base58' | |
10 | + | let d = Address(base58'3MvRWw2FPEimFCTGtK7qY9uAJbM7XJ4ZfJS') | |
11 | 11 | ||
12 | - | let e = " | |
12 | + | let e = ["8DtMtpVwVq62sdcVFVzh6nuprgzG7LSjpLdHnQnrAFgY", "FLdC14nUVRyiSYjVrMo3X4g8rXQjLbNRaGAyQAm8V68V"] | |
13 | 13 | ||
14 | - | let f = | |
14 | + | let f = Address(base58'3Mzzt65puEs2W9M1m9iFBvMEdfM5bASE1hJ') | |
15 | 15 | ||
16 | - | func g (h) = !((h != Address(base58'3Mzzt65puEs2W9M1m9iFBvMEdfM5bASE1hJ'))) | |
16 | + | let g = "3N4KbMnJH8FaM94jqxNFe2oyZ8GB7Z8yVBP" | |
17 | + | ||
18 | + | let h = [base58'3PMcMiMEs6w56NRGacksXtFG5zS7doE9fpL', base58'3PAxdDSmN758L5SHSGRC5apEtQE2aApZotG', base58'3PJKmXoHJvVeQXjSJdhtkUcFDtdiQqMbUTD', base58'3PQdNxynJy5mche2kxMVc5shXWzK8Gstq3o', base58'3PHbdpaKzz8EiAngGHaFu2hVuNCdsC67qh3', base58'3P6Ksahs71SiKQgQ4qaZuFAVhqncdi2nvJQ'] | |
19 | + | ||
20 | + | func i (j) = !((j != Address(base58'3Mzzt65puEs2W9M1m9iFBvMEdfM5bASE1hJ'))) | |
17 | 21 | ||
18 | 22 | ||
19 | - | func | |
20 | - | let | |
21 | - | if (("8DtMtpVwVq62sdcVFVzh6nuprgzG7LSjpLdHnQnrAFgY" == | |
23 | + | func k (l) = { | |
24 | + | let m = l | |
25 | + | if (("8DtMtpVwVq62sdcVFVzh6nuprgzG7LSjpLdHnQnrAFgY" == m)) | |
22 | 26 | then $Tuple4(2000000, 25000000, 80000000, 100000000) | |
23 | - | else if ((" | |
27 | + | else if (("FLdC14nUVRyiSYjVrMo3X4g8rXQjLbNRaGAyQAm8V68V" == m)) | |
24 | 28 | then $Tuple4(2000000, 25000000, 80000000, 100000000) | |
25 | - | else if (("WAVES" == k)) | |
26 | - | then $Tuple4(2000000, 30000000, 80000000, 50000000) | |
27 | - | else $Tuple4(0, 20000000, 80000000, 80000000) | |
29 | + | else if (("25FEqEjRkqK6yCkiT7Lz6SAYz7gUFCtxfCChnrVFD5AT" == m)) | |
30 | + | then $Tuple4(2000000, 25000000, 80000000, 100000000) | |
31 | + | else if (("WAVES" == m)) | |
32 | + | then $Tuple4(2000000, 30000000, 80000000, 50000000) | |
33 | + | else $Tuple4(0, 20000000, 80000000, 80000000) | |
28 | 34 | } | |
29 | 35 | ||
30 | 36 | ||
31 | - | let | |
37 | + | let n = 100000000 | |
32 | 38 | ||
33 | - | let | |
39 | + | let o = 10000000000 | |
34 | 40 | ||
35 | - | let | |
41 | + | let p = (n * n) | |
36 | 42 | ||
37 | - | let | |
43 | + | let q = 1440 | |
38 | 44 | ||
39 | - | func | |
40 | - | func | |
45 | + | func r (s) = { | |
46 | + | func t (u,v) = ((u + toString(v)) + ",") | |
41 | 47 | ||
42 | - | let | |
43 | - | let | |
44 | - | let | |
45 | - | func | |
46 | - | then | |
47 | - | else | |
48 | + | let w = s | |
49 | + | let x = size(w) | |
50 | + | let y = "" | |
51 | + | func z (A,B) = if ((B >= x)) | |
52 | + | then A | |
53 | + | else t(A, w[B]) | |
48 | 54 | ||
49 | - | func | |
50 | - | then | |
55 | + | func C (A,B) = if ((B >= x)) | |
56 | + | then A | |
51 | 57 | else throw("List size exceeds 6") | |
52 | 58 | ||
53 | - | | |
59 | + | C(z(z(z(z(z(z(y, 0), 1), 2), 3), 4), 5), 6) | |
54 | 60 | } | |
55 | 61 | ||
56 | 62 | ||
57 | - | func | |
58 | - | let | |
59 | - | if ($isInstanceOf( | |
63 | + | func D (E) = { | |
64 | + | let m = getInteger(this, E) | |
65 | + | if ($isInstanceOf(m, "Int")) | |
60 | 66 | then { | |
61 | - | let | |
62 | - | | |
67 | + | let F = m | |
68 | + | F | |
63 | 69 | } | |
64 | 70 | else 0 | |
65 | 71 | } | |
66 | 72 | ||
67 | 73 | ||
68 | - | func | |
69 | - | let | |
70 | - | if ($isInstanceOf( | |
74 | + | func G (E) = { | |
75 | + | let m = getBoolean(this, E) | |
76 | + | if ($isInstanceOf(m, "Boolean")) | |
71 | 77 | then { | |
72 | - | let | |
73 | - | | |
78 | + | let F = m | |
79 | + | F | |
74 | 80 | } | |
75 | 81 | else false | |
76 | 82 | } | |
77 | 83 | ||
78 | 84 | ||
79 | - | func | |
80 | - | let | |
81 | - | if ($isInstanceOf( | |
85 | + | func H (E) = { | |
86 | + | let m = getString(this, E) | |
87 | + | if ($isInstanceOf(m, "String")) | |
82 | 88 | then { | |
83 | - | let | |
84 | - | | |
89 | + | let F = m | |
90 | + | F | |
85 | 91 | } | |
86 | 92 | else "" | |
87 | 93 | } | |
88 | 94 | ||
89 | 95 | ||
90 | - | func | |
91 | - | let | |
92 | - | if ($isInstanceOf( | |
96 | + | func I (E) = { | |
97 | + | let m = getBinary(this, E) | |
98 | + | if ($isInstanceOf(m, "ByteVector")) | |
93 | 99 | then { | |
94 | - | let | |
95 | - | | |
100 | + | let F = m | |
101 | + | F | |
96 | 102 | } | |
97 | 103 | else base58'' | |
98 | 104 | } | |
99 | 105 | ||
100 | 106 | ||
101 | - | func | |
102 | - | let | |
103 | - | if ($isInstanceOf( | |
107 | + | func J (K) = { | |
108 | + | let m = K | |
109 | + | if ($isInstanceOf(m, "ByteVector")) | |
104 | 110 | then { | |
105 | - | let | |
106 | - | toBase58String( | |
111 | + | let F = m | |
112 | + | toBase58String(F) | |
107 | 113 | } | |
108 | 114 | else "WAVES" | |
109 | 115 | } | |
110 | 116 | ||
111 | 117 | ||
112 | - | func | |
118 | + | func L (l) = if ((l == "WAVES")) | |
113 | 119 | then unit | |
114 | - | else fromBase58String( | |
120 | + | else fromBase58String(l) | |
115 | 121 | ||
116 | 122 | ||
117 | - | func | |
123 | + | func M (l) = if ((l == "WAVES")) | |
118 | 124 | then wavesBalance(this).available | |
119 | - | else assetBalance(this, fromBase58String( | |
125 | + | else assetBalance(this, fromBase58String(l)) | |
120 | 126 | ||
121 | 127 | ||
122 | - | func | |
128 | + | func N () = split(H("setup_tokens"), ",") | |
123 | 129 | ||
124 | 130 | ||
125 | - | func | |
126 | - | let | |
127 | - | if (( | |
131 | + | func O () = { | |
132 | + | let P = H("setup_maxsupply") | |
133 | + | if ((P == "")) | |
128 | 134 | then [-1, -1, -1, -1, -1, -1, -1] | |
129 | - | else split( | |
135 | + | else split(P, ",") | |
130 | 136 | } | |
131 | 137 | ||
132 | 138 | ||
133 | - | func | |
134 | - | let | |
135 | - | if (( | |
139 | + | func Q (l) = { | |
140 | + | let R = fraction(D(("total_supplied_" + l)), D((l + "_sRate")), p) | |
141 | + | if ((R == 0)) | |
136 | 142 | then 0 | |
137 | - | else fraction( | |
143 | + | else fraction(n, fraction(D(("total_borrowed_" + l)), D((l + "_bRate")), p), R) | |
138 | 144 | } | |
139 | 145 | ||
140 | 146 | ||
141 | - | func | |
142 | - | let | |
143 | - | let | |
144 | - | let | |
145 | - | then fraction( | |
146 | - | else ( | |
147 | - | max([fraction( | |
147 | + | func S (l) = { | |
148 | + | let T = Q(l) | |
149 | + | let U = k(l) | |
150 | + | let V = (U._1 + (if ((U._3 >= T)) | |
151 | + | then fraction(T, U._2, U._3) | |
152 | + | else (U._2 + fraction((T - U._3), U._4, (100000000 - U._3))))) | |
153 | + | max([fraction(V, n, (q * 365)), 1]) | |
148 | 154 | } | |
149 | 155 | ||
150 | 156 | ||
151 | - | func | |
152 | - | let | |
153 | - | let | |
154 | - | let | |
155 | - | let | |
156 | - | let | |
157 | - | let | |
158 | - | let | |
159 | - | [IntegerEntry(( | |
157 | + | func W (l) = { | |
158 | + | let X = S(l) | |
159 | + | let T = Q(l) | |
160 | + | let Y = D("lastRateHeight") | |
161 | + | let Z = max([D((l + "_bRate")), p]) | |
162 | + | let aa = (Z + ((height - Y) * X)) | |
163 | + | let ab = max([D((l + "_sRate")), p]) | |
164 | + | let ac = (ab + ((((height - Y) * fraction(X, T, n)) * (100 - b)) / 100)) | |
165 | + | [IntegerEntry((l + "_sRate"), ac), IntegerEntry((l + "_bRate"), aa), IntegerEntry("lastRateHeight", height)] | |
160 | 166 | } | |
161 | 167 | ||
162 | 168 | ||
163 | - | func | |
164 | - | func | |
165 | - | let | |
166 | - | $Tuple2(if (( | |
167 | - | then | |
168 | - | else if (( | |
169 | - | then | |
170 | - | else | |
169 | + | func ad (l,ae) = { | |
170 | + | func t (u,af) = { | |
171 | + | let ag = W(af) | |
172 | + | $Tuple2(if ((af != l)) | |
173 | + | then u._1 | |
174 | + | else if ((ae == "sRate")) | |
175 | + | then ag[0].value | |
176 | + | else ag[1].value, (u._2 ++ ag)) | |
171 | 177 | } | |
172 | 178 | ||
173 | - | let | |
174 | - | let | |
175 | - | let | |
176 | - | func | |
177 | - | then | |
178 | - | else | |
179 | + | let w = N() | |
180 | + | let x = size(w) | |
181 | + | let y = $Tuple2(0, nil) | |
182 | + | func z (A,B) = if ((B >= x)) | |
183 | + | then A | |
184 | + | else t(A, w[B]) | |
179 | 185 | ||
180 | - | func | |
181 | - | then | |
186 | + | func C (A,B) = if ((B >= x)) | |
187 | + | then A | |
182 | 188 | else throw("List size exceeds 6") | |
183 | 189 | ||
184 | - | | |
190 | + | C(z(z(z(z(z(z(y, 0), 1), 2), 3), 4), 5), 6) | |
185 | 191 | } | |
186 | 192 | ||
187 | 193 | ||
188 | - | func | |
189 | - | let | |
190 | - | let | |
191 | - | fraction( | |
194 | + | func ah (l) = { | |
195 | + | let ai = W(l) | |
196 | + | let R = fraction(D(("total_supplied_" + l)), ai[0].value, p) | |
197 | + | fraction(n, fraction(D(("total_borrowed_" + l)), ai[1].value, p), R) | |
192 | 198 | } | |
193 | 199 | ||
194 | 200 | ||
195 | - | func | |
196 | - | func | |
201 | + | func aj () = { | |
202 | + | func t (u,af) = (u ++ W(af)) | |
197 | 203 | ||
198 | - | let | |
199 | - | let | |
200 | - | let | |
201 | - | func | |
202 | - | then | |
203 | - | else | |
204 | + | let w = N() | |
205 | + | let x = size(w) | |
206 | + | let y = nil | |
207 | + | func z (A,B) = if ((B >= x)) | |
208 | + | then A | |
209 | + | else t(A, w[B]) | |
204 | 210 | ||
205 | - | func | |
206 | - | then | |
211 | + | func C (A,B) = if ((B >= x)) | |
212 | + | then A | |
207 | 213 | else throw("List size exceeds 6") | |
208 | 214 | ||
209 | - | | |
215 | + | C(z(z(z(z(z(z(y, 0), 1), 2), 3), 4), 5), 6) | |
210 | 216 | } | |
211 | 217 | ||
212 | 218 | ||
213 | - | func | |
214 | - | let | |
215 | - | if (( | |
219 | + | func ak (l) = { | |
220 | + | let al = invoke(addressFromStringValue(g), "getTWAP60", [l, false], nil) | |
221 | + | if ((al == al)) | |
216 | 222 | then { | |
217 | - | let | |
218 | - | let | |
219 | - | if ($isInstanceOf( | |
223 | + | let am = { | |
224 | + | let m = al | |
225 | + | if ($isInstanceOf(m, "(Int, Int)")) | |
220 | 226 | then { | |
221 | - | let | |
222 | - | | |
227 | + | let an = m | |
228 | + | an | |
223 | 229 | } | |
224 | 230 | else throw("error of price oracle") | |
225 | 231 | } | |
226 | - | if (( | |
227 | - | then | |
232 | + | if ((am == am)) | |
233 | + | then am | |
228 | 234 | else throw("Strict value is not equal to itself.") | |
229 | 235 | } | |
230 | 236 | else throw("Strict value is not equal to itself.") | |
231 | 237 | } | |
232 | 238 | ||
233 | 239 | ||
234 | - | func | |
235 | - | let | |
240 | + | func ao (l) = { | |
241 | + | let ap = if ((l == "WAVES")) | |
236 | 242 | then 8 | |
237 | - | else value(assetInfo(fromBase58String( | |
238 | - | pow(10, 0, | |
243 | + | else value(assetInfo(fromBase58String(l))).decimals | |
244 | + | pow(10, 0, ap, 0, 0, DOWN) | |
239 | 245 | } | |
240 | 246 | ||
241 | 247 | ||
242 | - | func | |
243 | - | let | |
244 | - | if (( | |
248 | + | func aq (j) = { | |
249 | + | let ar = invoke(this, "getUserCollateral", [false, j, true, ""], nil) | |
250 | + | if ((ar == ar)) | |
245 | 251 | then { | |
246 | - | let | |
247 | - | let | |
248 | - | if ($isInstanceOf( | |
252 | + | let as = { | |
253 | + | let m = ar | |
254 | + | if ($isInstanceOf(m, "Int")) | |
249 | 255 | then { | |
250 | - | let | |
251 | - | | |
256 | + | let an = m | |
257 | + | an | |
252 | 258 | } | |
253 | 259 | else throw("issue while doing in-dapp invocation") | |
254 | 260 | } | |
255 | - | if (( | |
256 | - | then | |
261 | + | if ((as == as)) | |
262 | + | then as | |
257 | 263 | else throw("Strict value is not equal to itself.") | |
258 | 264 | } | |
259 | 265 | else throw("Strict value is not equal to itself.") | |
260 | 266 | } | |
261 | 267 | ||
262 | 268 | ||
263 | - | func | |
269 | + | func at (l,au,j) = if (!(G("setup_active"))) | |
264 | 270 | then throw("market is stopped") | |
265 | 271 | else { | |
266 | - | let | |
267 | - | let | |
268 | - | let | |
269 | - | let | |
270 | - | let | |
271 | - | let | |
272 | - | if ($isInstanceOf( | |
272 | + | let av = ad(l, "sRate") | |
273 | + | let aw = av._1 | |
274 | + | let ax = av._2 | |
275 | + | let ay = fraction(au, p, aw, DOWN) | |
276 | + | let az = { | |
277 | + | let m = getString(("setup_maxSupply_" + l)) | |
278 | + | if ($isInstanceOf(m, "String")) | |
273 | 279 | then { | |
274 | - | let | |
275 | - | parseIntValue( | |
280 | + | let an = m | |
281 | + | parseIntValue(an) | |
276 | 282 | } | |
277 | 283 | else 0 | |
278 | 284 | } | |
279 | - | let | |
280 | - | let | |
281 | - | let | |
282 | - | let | |
283 | - | let | |
284 | - | if ((indexOf( | |
285 | + | let aA = ak(l) | |
286 | + | let aB = (D(((j + "_supplied_") + l)) + ay) | |
287 | + | let V = ad(l, "sRate")._1 | |
288 | + | let aC = ao(l) | |
289 | + | let aD = fraction(fraction(aB, V, p), aA._1, aC) | |
290 | + | if ((indexOf(H("setup_tokens"), l) == unit)) | |
285 | 291 | then throw("this asset is not supported by the market") | |
286 | - | else if (if (( | |
287 | - | then ( | |
292 | + | else if (if ((az != 0)) | |
293 | + | then (aD > az) | |
288 | 294 | else false) | |
289 | 295 | then throw("max total supply for this token reached in the pool") | |
290 | - | else $Tuple2(([IntegerEntry((( | |
296 | + | else $Tuple2(([IntegerEntry(((j + "_supplied_") + l), aB), IntegerEntry(("total_supplied_" + l), (D(("total_supplied_" + l)) + ay))] ++ ax), au) | |
291 | 297 | } | |
292 | 298 | ||
293 | 299 | ||
294 | - | func | |
295 | - | let | |
296 | - | let | |
297 | - | let | |
298 | - | let | |
299 | - | let | |
300 | - | if (( | |
300 | + | func aE (l,au,j) = { | |
301 | + | let aF = ad(l, "bRate") | |
302 | + | let aG = aF._1 | |
303 | + | let ax = aF._2 | |
304 | + | let ay = fraction(au, p, aG, CEILING) | |
305 | + | let aH = invoke(this, "getUserCollateral", [false, j, true, ((l + ",borrowed,") + toString(ay))], nil) | |
306 | + | if ((aH == aH)) | |
301 | 307 | then { | |
302 | - | let | |
303 | - | let | |
304 | - | if ($isInstanceOf( | |
308 | + | let aI = { | |
309 | + | let m = aH | |
310 | + | if ($isInstanceOf(m, "Int")) | |
305 | 311 | then { | |
306 | - | let | |
307 | - | | |
312 | + | let an = m | |
313 | + | an | |
308 | 314 | } | |
309 | 315 | else throw("can't get user collateral value") | |
310 | 316 | } | |
311 | - | if (!( | |
317 | + | if (!(G("setup_active"))) | |
312 | 318 | then throw("market is stopped") | |
313 | 319 | else { | |
314 | - | let | |
315 | - | let | |
316 | - | let | |
317 | - | if (( | |
320 | + | let aJ = D(("total_supplied_" + l)) | |
321 | + | let aK = D(("total_borrowed_" + l)) | |
322 | + | let aL = D(((j + "_borrowed_") + l)) | |
323 | + | if ((ay > (aJ - aK))) | |
318 | 324 | then throw("this amount is not available") | |
319 | - | else $Tuple2(([IntegerEntry((( | |
325 | + | else $Tuple2(([IntegerEntry(((j + "_borrowed_") + l), (aL + ay)), IntegerEntry(("total_borrowed_" + l), (aK + ay))] ++ ax), au) | |
320 | 326 | } | |
321 | 327 | } | |
322 | 328 | else throw("Strict value is not equal to itself.") | |
323 | 329 | } | |
324 | 330 | ||
325 | 331 | ||
326 | - | @Callable( | |
327 | - | func flashPosition ( | |
328 | - | let | |
329 | - | let | |
330 | - | let | |
331 | - | if (( | |
332 | + | @Callable(aM) | |
333 | + | func flashPosition (aN,aO,aP,aQ,aR,aS,aT) = { | |
334 | + | let aU = aE(aP, aQ, aN) | |
335 | + | let aV = L(aP) | |
336 | + | let aW = reentrantInvoke(addressFromStringValue(aR), aS, split(aT, ","), [AttachedPayment(aV, aQ)]) | |
337 | + | if ((aW == aW)) | |
332 | 338 | then { | |
333 | - | let | |
334 | - | let | |
335 | - | if ($isInstanceOf( | |
336 | - | then | |
337 | - | else throw(($getType( | |
339 | + | let aX = { | |
340 | + | let aY = aW | |
341 | + | if ($isInstanceOf(aY, "Int")) | |
342 | + | then aY | |
343 | + | else throw(($getType(aY) + " couldn't be cast to Int")) | |
338 | 344 | } | |
339 | - | if (( | |
345 | + | if ((aX == aX)) | |
340 | 346 | then { | |
341 | - | let | |
342 | - | let | |
343 | - | let | |
344 | - | if ($isInstanceOf( | |
345 | - | then | |
346 | - | else throw(($getType( | |
347 | + | let aZ = at(aO, aX, aN) | |
348 | + | let aI = { | |
349 | + | let aY = invoke(this, "getUserCollateral", [false, aN, true, ((aO + ",supplied,") + toString(aX))], nil) | |
350 | + | if ($isInstanceOf(aY, "Int")) | |
351 | + | then aY | |
352 | + | else throw(($getType(aY) + " couldn't be cast to Int")) | |
347 | 353 | } | |
348 | - | if (( | |
354 | + | if ((aI == aI)) | |
349 | 355 | then { | |
350 | - | let | |
351 | - | let | |
352 | - | if ($isInstanceOf( | |
353 | - | then | |
354 | - | else throw(($getType( | |
356 | + | let ba = { | |
357 | + | let aY = invoke(this, "getUserCollateral", [false, aN, true, ((aP + ",borrowed,") + toString(aQ))], nil) | |
358 | + | if ($isInstanceOf(aY, "Int")) | |
359 | + | then aY | |
360 | + | else throw(($getType(aY) + " couldn't be cast to Int")) | |
355 | 361 | } | |
356 | - | if (( | |
357 | - | then if (( | |
362 | + | if ((ba == ba)) | |
363 | + | then if ((ba > aI)) | |
358 | 364 | then throw("not enough collateral provided") | |
359 | - | else ( | |
365 | + | else (aU._1 ++ aZ._1) | |
360 | 366 | else throw("Strict value is not equal to itself.") | |
361 | 367 | } | |
362 | 368 | else throw("Strict value is not equal to itself.") | |
368 | 374 | ||
369 | 375 | ||
370 | 376 | ||
371 | - | @Callable( | |
372 | - | func supply () = if (if ((size( | |
377 | + | @Callable(aM) | |
378 | + | func supply () = if (if ((size(aM.payments) != 1)) | |
373 | 379 | then true | |
374 | - | else ( | |
380 | + | else (aM.payments[0].amount == 0)) | |
375 | 381 | then throw("1 payment has to be attached") | |
376 | 382 | else { | |
377 | - | let | |
378 | - | let | |
379 | - | | |
383 | + | let l = J(aM.payments[0].assetId) | |
384 | + | let au = aM.payments[0].amount | |
385 | + | at(l, au, toString(aM.caller)) | |
380 | 386 | } | |
381 | 387 | ||
382 | 388 | ||
383 | 389 | ||
384 | - | @Callable( | |
385 | - | func withdraw ( | |
386 | - | let | |
387 | - | let | |
388 | - | let | |
389 | - | let | |
390 | - | let | |
391 | - | let | |
392 | - | let | |
393 | - | let | |
394 | - | let | |
395 | - | let | |
396 | - | if (( | |
390 | + | @Callable(aM) | |
391 | + | func withdraw (l,au) = { | |
392 | + | let bb = ad(l, "sRate") | |
393 | + | let aw = bb._1 | |
394 | + | let ax = bb._2 | |
395 | + | let ay = fraction(au, p, aw, CEILING) | |
396 | + | let j = toString(aM.caller) | |
397 | + | let aJ = D(("total_supplied_" + l)) | |
398 | + | let aK = D(("total_borrowed_" + l)) | |
399 | + | let bc = D(((j + "_supplied_") + l)) | |
400 | + | let aL = D(((j + "_borrowed_") + l)) | |
401 | + | let aH = invoke(this, "getUserCollateral", [false, j, true, ((l + ",supplied,") + toString(-(ay)))], nil) | |
402 | + | if ((aH == aH)) | |
397 | 403 | then { | |
398 | - | let | |
399 | - | let | |
400 | - | if ($isInstanceOf( | |
404 | + | let aI = { | |
405 | + | let m = aH | |
406 | + | if ($isInstanceOf(m, "Int")) | |
401 | 407 | then { | |
402 | - | let | |
403 | - | | |
408 | + | let an = m | |
409 | + | an | |
404 | 410 | } | |
405 | 411 | else throw("can't get user collateral value") | |
406 | 412 | } | |
407 | - | if (!( | |
413 | + | if (!(G("setup_active"))) | |
408 | 414 | then throw("market is stopped") | |
409 | - | else if ((0 > | |
415 | + | else if ((0 > aI)) | |
410 | 416 | then throw("you dont have enough collateral for this operation") | |
411 | - | else if (( | |
417 | + | else if ((ay > (aJ - aK))) | |
412 | 418 | then throw("this amount is not available on the market") | |
413 | - | else if (( | |
419 | + | else if ((ay > (bc - aL))) | |
414 | 420 | then throw("this amount is not available for this user") | |
415 | - | else ([IntegerEntry((( | |
421 | + | else ([IntegerEntry(((j + "_supplied_") + l), (D(((j + "_supplied_") + l)) - ay)), IntegerEntry(("total_supplied_" + l), (D(("total_supplied_" + l)) - ay)), ScriptTransfer(aM.caller, au, L(l))] ++ ax) | |
416 | 422 | } | |
417 | 423 | else throw("Strict value is not equal to itself.") | |
418 | 424 | } | |
419 | 425 | ||
420 | 426 | ||
421 | 427 | ||
422 | - | @Callable( | |
423 | - | func borrow ( | |
424 | - | let | |
425 | - | let | |
426 | - | let | |
427 | - | ( | |
428 | + | @Callable(aM) | |
429 | + | func borrow (l,au) = { | |
430 | + | let j = toString(aM.caller) | |
431 | + | let bd = aE(l, au, j) | |
432 | + | let ay = bd._2 | |
433 | + | (bd._1 ++ [ScriptTransfer(aM.caller, ay, L(l))]) | |
428 | 434 | } | |
429 | 435 | ||
430 | 436 | ||
431 | 437 | ||
432 | - | @Callable( | |
433 | - | func repay () = if (!( | |
438 | + | @Callable(aM) | |
439 | + | func repay () = if (!(G("setup_active"))) | |
434 | 440 | then throw("market is stopped") | |
435 | - | else if (if ((size( | |
441 | + | else if (if ((size(aM.payments) != 1)) | |
436 | 442 | then true | |
437 | - | else ( | |
443 | + | else (aM.payments[0].amount == 0)) | |
438 | 444 | then throw("1 payment has to be attached") | |
439 | 445 | else { | |
440 | - | let | |
441 | - | let | |
442 | - | let | |
443 | - | let | |
444 | - | let | |
445 | - | let | |
446 | - | let | |
447 | - | let | |
448 | - | let | |
449 | - | let | |
450 | - | let | |
451 | - | let | |
452 | - | then | |
453 | - | else | |
454 | - | if ((indexOf( | |
446 | + | let l = J(aM.payments[0].assetId) | |
447 | + | let au = aM.payments[0].amount | |
448 | + | let be = ad(l, "bRate") | |
449 | + | let aG = be._1 | |
450 | + | let ax = be._2 | |
451 | + | let ay = fraction(au, p, aG, CEILING) | |
452 | + | let j = toString(aM.caller) | |
453 | + | let aJ = D(("total_supplied_" + l)) | |
454 | + | let aK = D(("total_borrowed_" + l)) | |
455 | + | let aL = D(((j + "_borrowed_") + l)) | |
456 | + | let bf = (aL - ay) | |
457 | + | let bg = if ((bf >= 0)) | |
458 | + | then ay | |
459 | + | else aL | |
460 | + | if ((indexOf(H("setup_tokens"), l) == unit)) | |
455 | 461 | then throw("this asset is not supported by the market") | |
456 | - | else (([IntegerEntry((( | |
462 | + | else (([IntegerEntry(((j + "_borrowed_") + l), (aL - bg)), IntegerEntry(("total_borrowed_" + l), (aK - bg))] ++ ax) ++ (if ((bf >= 0)) | |
457 | 463 | then nil | |
458 | - | else [ScriptTransfer( | |
464 | + | else [ScriptTransfer(aM.caller, -(bf), aM.payments[0].assetId)])) | |
459 | 465 | } | |
460 | 466 | ||
461 | 467 | ||
462 | 468 | ||
463 | - | @Callable( | |
464 | - | func repayFor ( | |
469 | + | @Callable(aM) | |
470 | + | func repayFor (j) = if (!(G("setup_active"))) | |
465 | 471 | then throw("market is stopped") | |
466 | - | else if (if ((size( | |
472 | + | else if (if ((size(aM.payments) != 1)) | |
467 | 473 | then true | |
468 | - | else ( | |
474 | + | else (aM.payments[0].amount == 0)) | |
469 | 475 | then throw("1 payment has to be attached") | |
470 | 476 | else { | |
471 | - | let | |
472 | - | let | |
473 | - | let | |
474 | - | let | |
475 | - | let | |
476 | - | let | |
477 | - | let | |
478 | - | let | |
479 | - | let | |
480 | - | let | |
481 | - | let | |
482 | - | then | |
483 | - | else | |
484 | - | if ((indexOf( | |
477 | + | let l = J(aM.payments[0].assetId) | |
478 | + | let au = aM.payments[0].amount | |
479 | + | let bh = ad(l, "bRate") | |
480 | + | let aG = bh._1 | |
481 | + | let ax = bh._2 | |
482 | + | let ay = fraction(au, p, aG, CEILING) | |
483 | + | let aJ = D(("total_supplied_" + l)) | |
484 | + | let aK = D(("total_borrowed_" + l)) | |
485 | + | let aL = D(((j + "_borrowed_") + l)) | |
486 | + | let bf = (aL - ay) | |
487 | + | let bg = if ((bf >= 0)) | |
488 | + | then ay | |
489 | + | else aL | |
490 | + | if ((indexOf(H("setup_tokens"), l) == unit)) | |
485 | 491 | then throw("this asset is not supported by the market") | |
486 | - | else (([IntegerEntry((( | |
492 | + | else (([IntegerEntry(((j + "_borrowed_") + l), (aL - bg)), IntegerEntry(("total_borrowed_" + l), (aK - bg))] ++ ax) ++ (if ((bf >= 0)) | |
487 | 493 | then nil | |
488 | - | else [ScriptTransfer( | |
494 | + | else [ScriptTransfer(aM.caller, -(bf), aM.payments[0].assetId)])) | |
489 | 495 | } | |
490 | 496 | ||
491 | 497 | ||
492 | 498 | ||
493 | - | @Callable( | |
494 | - | func stakeTokenAll ( | |
499 | + | @Callable(aM) | |
500 | + | func stakeTokenAll (l) = if ((aM.caller != this)) | |
495 | 501 | then throw("only for internal smart contract invocations") | |
496 | 502 | else { | |
497 | - | let | |
498 | - | let | |
499 | - | if (( | |
503 | + | let ay = M(l) | |
504 | + | let bi = invoke(this, "stakeToken", [l, ay], nil) | |
505 | + | if ((bi == bi)) | |
500 | 506 | then nil | |
501 | 507 | else throw("Strict value is not equal to itself.") | |
502 | 508 | } | |
503 | 509 | ||
504 | 510 | ||
505 | 511 | ||
506 | - | @Callable( | |
507 | - | func stakeToken ( | |
512 | + | @Callable(aM) | |
513 | + | func stakeToken (l,ay) = if ((aM.caller != this)) | |
508 | 514 | then throw("only for internal smart contract invocations") | |
509 | - | else if (( | |
515 | + | else if ((l == "DG2xFkPdDwKUoBkzGAhQtLpSGzfXLiCYPEzeKH2Ad24p")) | |
510 | 516 | then { | |
511 | - | let | |
512 | - | let | |
513 | - | if (( | |
514 | - | then [IntegerEntry("autostake_amount_DG2xFkPdDwKUoBkzGAhQtLpSGzfXLiCYPEzeKH2Ad24p", ( | |
517 | + | let bj = D("autostake_amount_DG2xFkPdDwKUoBkzGAhQtLpSGzfXLiCYPEzeKH2Ad24p") | |
518 | + | let bi = invoke(Address(base58'3PNikM6yp4NqcSU8guxQtmR5onr2D4e8yTJ'), "stake", nil, [AttachedPayment(base58'DG2xFkPdDwKUoBkzGAhQtLpSGzfXLiCYPEzeKH2Ad24p', ay)]) | |
519 | + | if ((bi == bi)) | |
520 | + | then [IntegerEntry("autostake_amount_DG2xFkPdDwKUoBkzGAhQtLpSGzfXLiCYPEzeKH2Ad24p", (bj + ay))] | |
515 | 521 | else throw("Strict value is not equal to itself.") | |
516 | 522 | } | |
517 | - | else if (( | |
523 | + | else if ((l == "8t4DPWTwPzpatHA9AkTxWAB47THnYzBsDnoY7fQqbG91")) | |
518 | 524 | then { | |
519 | - | let | |
520 | - | let | |
521 | - | if (( | |
522 | - | then [IntegerEntry("autostake_amount_8t4DPWTwPzpatHA9AkTxWAB47THnYzBsDnoY7fQqbG91", ( | |
525 | + | let bj = D("autostake_amount_8t4DPWTwPzpatHA9AkTxWAB47THnYzBsDnoY7fQqbG91") | |
526 | + | let bi = invoke(Address(base58'3PQTM38wDmAY9vWonK6ha7QL3PAycLz5oPP'), "stake", nil, [AttachedPayment(base58'8t4DPWTwPzpatHA9AkTxWAB47THnYzBsDnoY7fQqbG91', ay)]) | |
527 | + | if ((bi == bi)) | |
528 | + | then [IntegerEntry("autostake_amount_8t4DPWTwPzpatHA9AkTxWAB47THnYzBsDnoY7fQqbG91", (bj + ay))] | |
523 | 529 | else throw("Strict value is not equal to itself.") | |
524 | 530 | } | |
525 | - | else if (( | |
531 | + | else if ((l == "At8D6NFFpheCbvKVnjVoeLL84Eo8NZn6ovManxfLaFWL")) | |
526 | 532 | then { | |
527 | - | let | |
528 | - | let | |
529 | - | if (( | |
530 | - | then [IntegerEntry("autostake_amount_At8D6NFFpheCbvKVnjVoeLL84Eo8NZn6ovManxfLaFWL", ( | |
533 | + | let bj = D("autostake_amount_At8D6NFFpheCbvKVnjVoeLL84Eo8NZn6ovManxfLaFWL") | |
534 | + | let bi = invoke(Address(base58'3PBiotFpqjRMkkeFBccnQNUXUopy7KFez5C'), "stake", nil, [AttachedPayment(base58'At8D6NFFpheCbvKVnjVoeLL84Eo8NZn6ovManxfLaFWL', ay)]) | |
535 | + | if ((bi == bi)) | |
536 | + | then [IntegerEntry("autostake_amount_At8D6NFFpheCbvKVnjVoeLL84Eo8NZn6ovManxfLaFWL", (bj + ay))] | |
531 | 537 | else throw("Strict value is not equal to itself.") | |
532 | 538 | } | |
533 | 539 | else nil | |
534 | 540 | ||
535 | 541 | ||
536 | 542 | ||
537 | - | @Callable( | |
538 | - | func unstakeToken ( | |
543 | + | @Callable(aM) | |
544 | + | func unstakeToken (l,ay) = if ((aM.caller != this)) | |
539 | 545 | then throw("only for internal smart contract invocations") | |
540 | - | else if (( | |
546 | + | else if ((l == "8t4DPWTwPzpatHA9AkTxWAB47THnYzBsDnoY7fQqbG91")) | |
541 | 547 | then { | |
542 | - | let | |
543 | - | let | |
544 | - | if (( | |
545 | - | then [IntegerEntry("autostake_amount_8t4DPWTwPzpatHA9AkTxWAB47THnYzBsDnoY7fQqbG91", ( | |
548 | + | let bj = D("autostake_amount_8t4DPWTwPzpatHA9AkTxWAB47THnYzBsDnoY7fQqbG91") | |
549 | + | let bi = invoke(Address(base58'3PQTM38wDmAY9vWonK6ha7QL3PAycLz5oPP'), "unStake", [ay], nil) | |
550 | + | if ((bi == bi)) | |
551 | + | then [IntegerEntry("autostake_amount_8t4DPWTwPzpatHA9AkTxWAB47THnYzBsDnoY7fQqbG91", (bj - ay))] | |
546 | 552 | else throw("Strict value is not equal to itself.") | |
547 | 553 | } | |
548 | - | else if (( | |
554 | + | else if ((l == "At8D6NFFpheCbvKVnjVoeLL84Eo8NZn6ovManxfLaFWL")) | |
549 | 555 | then { | |
550 | - | let | |
551 | - | let | |
552 | - | if (( | |
556 | + | let bj = D("autostake_amount_At8D6NFFpheCbvKVnjVoeLL84Eo8NZn6ovManxfLaFWL") | |
557 | + | let bi = invoke(Address(base58'3PBiotFpqjRMkkeFBccnQNUXUopy7KFez5C'), "unstake", [ay], nil) | |
558 | + | if ((bi == bi)) | |
553 | 559 | then { | |
554 | - | let | |
555 | - | if (( | |
560 | + | let bk = M("At8D6NFFpheCbvKVnjVoeLL84Eo8NZn6ovManxfLaFWL") | |
561 | + | if ((bk == bk)) | |
556 | 562 | then { | |
557 | - | let | |
558 | - | if (( | |
563 | + | let bl = invoke(Address(base58'3PQrVbTVpqXHqpVKftkNdjy3zZAh4dsRzN6'), "gnsbtRewardsSYSREADONLY", [toString(this)], nil) | |
564 | + | if ((bl == bl)) | |
559 | 565 | then { | |
560 | - | let | |
561 | - | let | |
562 | - | if ($isInstanceOf( | |
566 | + | let bm = { | |
567 | + | let m = bl | |
568 | + | if ($isInstanceOf(m, "List[Any]")) | |
563 | 569 | then { | |
564 | - | let | |
565 | - | let | |
566 | - | let | |
567 | - | if ($isInstanceOf( | |
570 | + | let an = m | |
571 | + | let bn = an[1] | |
572 | + | let bo = bn | |
573 | + | if ($isInstanceOf(bo, "String")) | |
568 | 574 | then { | |
569 | - | let | |
570 | - | let | |
571 | - | let | |
572 | - | if (if (( | |
575 | + | let bn = bo | |
576 | + | let bp = parseIntValue(split(split(bn, "_")[1], ":")[1]) | |
577 | + | let bq = parseIntValue(split(split(bn, "_")[0], ":")[1]) | |
578 | + | if (if ((bp != 0)) | |
573 | 579 | then true | |
574 | - | else ( | |
580 | + | else (bq != 0)) | |
575 | 581 | then { | |
576 | - | let | |
577 | - | if (( | |
582 | + | let br = M("DG2xFkPdDwKUoBkzGAhQtLpSGzfXLiCYPEzeKH2Ad24p") | |
583 | + | if ((br == br)) | |
578 | 584 | then { | |
579 | - | let | |
580 | - | if (( | |
585 | + | let bs = M("WAVES") | |
586 | + | if ((bs == bs)) | |
581 | 587 | then { | |
582 | - | let | |
583 | - | if (( | |
588 | + | let al = invoke(Address(base58'3PBiotFpqjRMkkeFBccnQNUXUopy7KFez5C'), "claimRewards", nil, nil) | |
589 | + | if ((al == al)) | |
584 | 590 | then { | |
585 | - | let | |
586 | - | if (( | |
591 | + | let bt = M("WAVES") | |
592 | + | if ((bt == bt)) | |
587 | 593 | then { | |
588 | - | let | |
589 | - | if (( | |
594 | + | let bu = invoke(Address(base58'3PLiXyywNThdvf3vVEUxwc7TJTucjZvuegh'), "swap", ["DG2xFkPdDwKUoBkzGAhQtLpSGzfXLiCYPEzeKH2Ad24p", 0], [AttachedPayment(unit, (bt - bs))]) | |
595 | + | if ((bu == bu)) | |
590 | 596 | then { | |
591 | - | let | |
592 | - | if (( | |
597 | + | let bv = M("DG2xFkPdDwKUoBkzGAhQtLpSGzfXLiCYPEzeKH2Ad24p") | |
598 | + | if ((bv == bv)) | |
593 | 599 | then { | |
594 | - | let | |
595 | - | if (( | |
600 | + | let bw = invoke(Address(base58'3P7r93vXHuusageNJVGwzqaz3WMotAu49Yz'), "swap", ["At8D6NFFpheCbvKVnjVoeLL84Eo8NZn6ovManxfLaFWL", 0], [AttachedPayment(base58'DG2xFkPdDwKUoBkzGAhQtLpSGzfXLiCYPEzeKH2Ad24p', (bv - br))]) | |
601 | + | if ((bw == bw)) | |
596 | 602 | then { | |
597 | - | let | |
598 | - | if (( | |
603 | + | let bx = invoke(this, "addInterest", ["At8D6NFFpheCbvKVnjVoeLL84Eo8NZn6ovManxfLaFWL", (M("At8D6NFFpheCbvKVnjVoeLL84Eo8NZn6ovManxfLaFWL") - bk)], nil) | |
604 | + | if ((bx == bx)) | |
599 | 605 | then 2 | |
600 | 606 | else throw("Strict value is not equal to itself.") | |
601 | 607 | } | |
619 | 625 | } | |
620 | 626 | else 0 | |
621 | 627 | } | |
622 | - | if (( | |
623 | - | then [IntegerEntry("autostake_amount_At8D6NFFpheCbvKVnjVoeLL84Eo8NZn6ovManxfLaFWL", ( | |
628 | + | if ((bm == bm)) | |
629 | + | then [IntegerEntry("autostake_amount_At8D6NFFpheCbvKVnjVoeLL84Eo8NZn6ovManxfLaFWL", (bj - ay))] | |
624 | 630 | else throw("Strict value is not equal to itself.") | |
625 | 631 | } | |
626 | 632 | else throw("Strict value is not equal to itself.") | |
633 | 639 | ||
634 | 640 | ||
635 | 641 | ||
636 | - | @Callable( | |
637 | - | func addInterest ( | |
642 | + | @Callable(aM) | |
643 | + | func addInterest (l,ay) = if ((aM.caller != this)) | |
638 | 644 | then throw("only for self invocation") | |
639 | 645 | else { | |
640 | - | let | |
641 | - | let | |
642 | - | let | |
643 | - | let | |
646 | + | let by = D(("autostake_lastEarned_" + l)) | |
647 | + | let bz = D(("autostake_lastBlock_" + l)) | |
648 | + | let bA = fraction(ay, 80, 100) | |
649 | + | let bB = if (if ((bz == height)) | |
644 | 650 | then true | |
645 | - | else ( | |
651 | + | else (ay == 0)) | |
646 | 652 | then nil | |
647 | - | else [IntegerEntry(("autostake_preLastEarned_" + | |
648 | - | ( | |
653 | + | else [IntegerEntry(("autostake_preLastEarned_" + l), by), IntegerEntry(("autostake_preLastBlock_" + l), bz), IntegerEntry(("autostake_lastEarned_" + l), (by + bA)), IntegerEntry(("autostake_lastBlock_" + l), height)] | |
654 | + | (bB ++ [IntegerEntry((l + "_sRate"), (D((l + "_sRate")) + fraction(p, bA, D(("total_supplied_" + l)))))]) | |
649 | 655 | } | |
650 | 656 | ||
651 | 657 | ||
652 | 658 | ||
653 | - | @Callable( | |
659 | + | @Callable(aM) | |
654 | 660 | func addInterestEXTERNAL () = { | |
655 | - | let | |
656 | - | let | |
657 | - | let | |
658 | - | let | |
659 | - | let | |
660 | - | let | |
661 | + | let ay = fraction(aM.payments[0].amount, 80, 100) | |
662 | + | let K = aM.payments[0].assetId | |
663 | + | let l = J(K) | |
664 | + | let by = D(("autostake_lastEarned_" + l)) | |
665 | + | let bz = D(("autostake_lastBlock_" + l)) | |
666 | + | let bB = if (if ((bz == height)) | |
661 | 667 | then true | |
662 | - | else ( | |
668 | + | else (ay == 0)) | |
663 | 669 | then nil | |
664 | - | else [IntegerEntry(("autostake_preLastEarned_" + | |
665 | - | ( | |
670 | + | else [IntegerEntry(("autostake_preLastEarned_" + l), by), IntegerEntry(("autostake_preLastBlock_" + l), bz), IntegerEntry(("autostake_lastEarned_" + l), (by + ay)), IntegerEntry(("autostake_lastBlock_" + l), height)] | |
671 | + | (bB ++ [IntegerEntry((l + "_sRate"), (D((l + "_sRate")) + fraction(p, ay, D(("total_supplied_" + l)))))]) | |
666 | 672 | } | |
667 | 673 | ||
668 | 674 | ||
669 | 675 | ||
670 | - | @Callable( | |
671 | - | func preInit ( | |
672 | - | func | |
676 | + | @Callable(aM) | |
677 | + | func preInit (bC,bD,bE,bF) = { | |
678 | + | func t (u,af) = (u ++ [IntegerEntry((af + "_bRate"), p), IntegerEntry((af + "_sRate"), p)]) | |
673 | 679 | ||
674 | - | if (( | |
680 | + | if ((aM.caller != this)) | |
675 | 681 | then throw("admin only") | |
676 | 682 | else { | |
677 | - | let | |
678 | - | let | |
679 | - | let | |
680 | - | let | |
681 | - | func | |
682 | - | then | |
683 | - | else | |
683 | + | let ai = { | |
684 | + | let w = split(bC, ",") | |
685 | + | let x = size(w) | |
686 | + | let y = nil | |
687 | + | func z (A,B) = if ((B >= x)) | |
688 | + | then A | |
689 | + | else t(A, w[B]) | |
684 | 690 | ||
685 | - | func | |
686 | - | then | |
691 | + | func C (A,B) = if ((B >= x)) | |
692 | + | then A | |
687 | 693 | else throw("List size exceeds 6") | |
688 | 694 | ||
689 | - | | |
695 | + | C(z(z(z(z(z(z(y, 0), 1), 2), 3), 4), 5), 6) | |
690 | 696 | } | |
691 | - | ([StringEntry("setup_tokens", | |
697 | + | ([StringEntry("setup_tokens", bC), StringEntry("setup_ltvs", bD), StringEntry("setup_lts", bE), StringEntry("setup_penalties", bF), BooleanEntry("setup_active", true)] ++ ai) | |
692 | 698 | } | |
693 | 699 | } | |
694 | 700 | ||
695 | 701 | ||
696 | 702 | ||
697 | - | @Callable( | |
698 | - | func initNewToken ( | |
703 | + | @Callable(aM) | |
704 | + | func initNewToken (af,bG,bH,bI) = if ((aM.caller != this)) | |
699 | 705 | then throw("admin only") | |
700 | - | else [StringEntry("setup_tokens", (( | |
706 | + | else [StringEntry("setup_tokens", ((H("setup_tokens") + ",") + af)), StringEntry("setup_ltvs", ((H("setup_ltvs") + ",") + bG)), StringEntry("setup_lts", ((H("setup_lts") + ",") + bH)), StringEntry("setup_penalties", ((H("setup_penalties") + ",") + bI)), IntegerEntry((af + "_bRate"), p), IntegerEntry((af + "_sRate"), p)] | |
701 | 707 | ||
702 | 708 | ||
703 | 709 | ||
704 | - | @Callable( | |
705 | - | func updateParameter ( | |
706 | - | then ( | |
710 | + | @Callable(aM) | |
711 | + | func updateParameter (E,bJ) = if (if ((aM.caller != this)) | |
712 | + | then (aM.caller != Address(base58'3P3o9cLTV2u9N4nYNKRYL6gy6cUEU9DwXW8')) | |
707 | 713 | else false) | |
708 | 714 | then throw("admin only") | |
709 | - | else [IntegerEntry( | |
715 | + | else [IntegerEntry(E, parseIntValue(bJ))] | |
710 | 716 | ||
711 | 717 | ||
712 | 718 | ||
713 | - | @Callable( | |
714 | - | func updateString ( | |
715 | - | then ( | |
719 | + | @Callable(aM) | |
720 | + | func updateString (E,bJ) = if (if ((aM.caller != this)) | |
721 | + | then (aM.caller != Address(base58'3P3o9cLTV2u9N4nYNKRYL6gy6cUEU9DwXW8')) | |
716 | 722 | else false) | |
717 | 723 | then throw("admin only") | |
718 | - | else [StringEntry( | |
724 | + | else [StringEntry(E, bJ)] | |
719 | 725 | ||
720 | 726 | ||
721 | 727 | ||
722 | - | @Callable( | |
723 | - | func claimToReserveFund ( | |
724 | - | let | |
725 | - | let | |
726 | - | let | |
727 | - | func | |
728 | - | then | |
728 | + | @Callable(aM) | |
729 | + | func claimToReserveFund (bK) = { | |
730 | + | let bL = N() | |
731 | + | let ai = ad(bL[0], "sRate")._2 | |
732 | + | let s = [0, 1, 2, 3, 4, 5] | |
733 | + | func t (u,bM) = if ((bM >= size(bL))) | |
734 | + | then u | |
729 | 735 | else { | |
730 | - | let | |
731 | - | let | |
732 | - | let | |
733 | - | then parseIntValue( | |
734 | - | else 0)) + fraction( | |
735 | - | let | |
736 | - | then invoke(this, "unstakeToken", [ | |
736 | + | let l = bL[bM] | |
737 | + | let bN = H(("autostake_amount_" + l)) | |
738 | + | let ay = ((((M(l) + D(("autostake_amount_" + l))) + (if ((bN != "")) | |
739 | + | then parseIntValue(bN) | |
740 | + | else 0)) + fraction(D(("total_borrowed_" + l)), ai[((bM * 3) + 1)].value, p)) - fraction(D(("total_supplied_" + l)), ai[(bM * 3)].value, p)) | |
741 | + | let bi = if ((D(("autostake_amount_" + l)) > 0)) | |
742 | + | then invoke(this, "unstakeToken", [l, max([ay, 0])], nil) | |
737 | 743 | else 0 | |
738 | - | if (( | |
739 | - | then ( | |
744 | + | if ((bi == bi)) | |
745 | + | then (u ++ [ay]) | |
740 | 746 | else throw("Strict value is not equal to itself.") | |
741 | 747 | } | |
742 | 748 | ||
743 | - | let | |
744 | - | let | |
745 | - | let | |
746 | - | let | |
747 | - | func | |
748 | - | then | |
749 | - | else | |
749 | + | let bO = { | |
750 | + | let w = s | |
751 | + | let x = size(w) | |
752 | + | let y = nil | |
753 | + | func z (A,B) = if ((B >= x)) | |
754 | + | then A | |
755 | + | else t(A, w[B]) | |
750 | 756 | ||
751 | - | func | |
752 | - | then | |
757 | + | func C (A,B) = if ((B >= x)) | |
758 | + | then A | |
753 | 759 | else throw("List size exceeds 6") | |
754 | 760 | ||
755 | - | | |
761 | + | C(z(z(z(z(z(z(y, 0), 1), 2), 3), 4), 5), 6) | |
756 | 762 | } | |
757 | - | func | |
758 | - | then | |
763 | + | func bP (u,bM) = if ((bM >= size(bL))) | |
764 | + | then u | |
759 | 765 | else { | |
760 | - | let | |
761 | - | ( | |
766 | + | let l = bL[bM] | |
767 | + | (u ++ [ScriptTransfer(a, max([bO[bM], 0]), L(l))]) | |
762 | 768 | } | |
763 | 769 | ||
764 | - | if ( | |
765 | - | then throw( | |
770 | + | if (bK) | |
771 | + | then throw(r(bO)) | |
766 | 772 | else $Tuple2({ | |
767 | - | let | |
768 | - | let | |
769 | - | let | |
770 | - | func | |
771 | - | then | |
772 | - | else | |
773 | + | let w = s | |
774 | + | let x = size(w) | |
775 | + | let y = nil | |
776 | + | func bQ (A,B) = if ((B >= x)) | |
777 | + | then A | |
778 | + | else bP(A, w[B]) | |
773 | 779 | ||
774 | - | func | |
775 | - | then | |
780 | + | func bR (A,B) = if ((B >= x)) | |
781 | + | then A | |
776 | 782 | else throw("List size exceeds 6") | |
777 | 783 | ||
778 | - | | |
779 | - | }, | |
784 | + | bR(bQ(bQ(bQ(bQ(bQ(bQ(y, 0), 1), 2), 3), 4), 5), 6) | |
785 | + | }, bO) | |
780 | 786 | } | |
781 | 787 | ||
782 | 788 | ||
783 | 789 | ||
784 | - | @Callable( | |
785 | - | func reSetup ( | |
786 | - | let | |
787 | - | if (( | |
790 | + | @Callable(aM) | |
791 | + | func reSetup (l) = { | |
792 | + | let bS = D("resetup_lastUpdate") | |
793 | + | if ((q > (height - bS))) | |
788 | 794 | then throw("can be updated only once per day") | |
789 | 795 | else { | |
790 | - | let | |
791 | - | let | |
792 | - | let | |
793 | - | let | |
794 | - | let | |
795 | - | if (( | |
796 | - | then [IntegerEntry((("setup_" + | |
797 | - | else if (if (( | |
798 | - | then (90000000 > | |
796 | + | let bE = split(H("setup_lts"), ",") | |
797 | + | let bL = N() | |
798 | + | let T = ah(l) | |
799 | + | let bT = D((("setup_" + l) + "_tempLT")) | |
800 | + | let bH = parseIntValue(bL[value(indexOf(bL, l))]) | |
801 | + | if ((T > 90000000)) | |
802 | + | then [IntegerEntry((("setup_" + l) + "_tempLT"), fraction(bT, 9975, 10000))] | |
803 | + | else if (if ((bH > bT)) | |
804 | + | then (90000000 > T) | |
799 | 805 | else false) | |
800 | - | then [IntegerEntry((("setup_" + | |
806 | + | then [IntegerEntry((("setup_" + l) + "_tempLT"), fraction(bT, 10025, 10000))] | |
801 | 807 | else nil | |
802 | 808 | } | |
803 | 809 | } | |
804 | 810 | ||
805 | 811 | ||
806 | 812 | ||
807 | - | @Callable( | |
808 | - | func shutdown ( | |
813 | + | @Callable(aM) | |
814 | + | func shutdown (bU) = if ((indexOf(h, aM.caller.bytes) == unit)) | |
809 | 815 | then throw("user not in a whitelist") | |
810 | - | else [BooleanEntry("setup_active", !( | |
816 | + | else [BooleanEntry("setup_active", !(bU))] | |
811 | 817 | ||
812 | 818 | ||
813 | 819 | ||
814 | - | @Callable( | |
815 | - | func liquidate ( | |
820 | + | @Callable(aM) | |
821 | + | func liquidate (bK,j,au,aO,aP,bV) = if (!(i(aM.caller))) | |
816 | 822 | then throw("temporarily available for whitelist only") | |
817 | - | else if (!( | |
823 | + | else if (!(G("setup_active"))) | |
818 | 824 | then throw("market is stopped") | |
819 | 825 | else { | |
820 | - | let | |
821 | - | if (( | |
826 | + | let bW = aq(j) | |
827 | + | if ((bW == bW)) | |
822 | 828 | then { | |
823 | - | let bV = ab(aM, "sRate") | |
824 | - | let au = bV._1 | |
825 | - | let bW = bV._2 | |
826 | - | let bX = ab(aN, "bRate") | |
827 | - | let aE = bX._1 | |
829 | + | let bX = ad(aO, "sRate") | |
830 | + | let aw = bX._1 | |
828 | 831 | let bY = bX._2 | |
829 | - | let bZ = fraction(as, n, au) | |
830 | - | let ca = B(((h + "_supplied_") + aM)) | |
831 | - | let cb = B(((h + "_borrowed_") + aN)) | |
832 | - | let cc = if ((cb > 0)) | |
833 | - | then cb | |
832 | + | let bZ = ad(aP, "bRate") | |
833 | + | let aG = bZ._1 | |
834 | + | let ca = bZ._2 | |
835 | + | let cb = fraction(au, p, aw) | |
836 | + | let cc = D(((j + "_supplied_") + aO)) | |
837 | + | let cd = D(((j + "_borrowed_") + aP)) | |
838 | + | let ce = if ((cd > 0)) | |
839 | + | then cd | |
834 | 840 | else throw("user has no borrow in this token") | |
835 | - | if (( | |
841 | + | if ((bW > 0)) | |
836 | 842 | then throw("user can't be liquidated") | |
837 | - | else if (( | |
843 | + | else if ((cb > cc)) | |
838 | 844 | then throw("position to liquidate is bigger than user's supply") | |
839 | 845 | else { | |
840 | - | let | |
841 | - | if (( | |
846 | + | let cf = M(aO) | |
847 | + | if ((cf == cf)) | |
842 | 848 | then { | |
843 | - | let | |
844 | - | if (( | |
849 | + | let cg = M(aP) | |
850 | + | if ((cg == cg)) | |
845 | 851 | then { | |
846 | - | let | |
847 | - | if (( | |
852 | + | let ch = invoke(f, "swap", [bV, 0], [AttachedPayment(L(aO), au)]) | |
853 | + | if ((ch == ch)) | |
848 | 854 | then { | |
849 | - | let | |
850 | - | if (( | |
855 | + | let ci = (cf - M(aO)) | |
856 | + | if ((ci == ci)) | |
851 | 857 | then { | |
852 | - | let | |
853 | - | if (( | |
858 | + | let cj = (M(aP) - cg) | |
859 | + | if ((cj == cj)) | |
854 | 860 | then { | |
855 | - | let | |
856 | - | let | |
857 | - | let | |
858 | - | let | |
859 | - | let | |
860 | - | let | |
861 | - | let | |
862 | - | let | |
863 | - | let | |
864 | - | let | |
865 | - | if (( | |
861 | + | let ck = ak(aO)._1 | |
862 | + | let cl = ao(aO) | |
863 | + | let cm = fraction(ci, ck, cl) | |
864 | + | let cn = ak(aP)._2 | |
865 | + | let co = ao(aP) | |
866 | + | let cp = fraction(cj, cn, co) | |
867 | + | let bI = parseIntValue(split(H("setup_penalties"), ",")[value(indexOf(N(), aP))]) | |
868 | + | let cq = (cp - fraction(cm, (n - bI), n)) | |
869 | + | let cr = fraction(ci, p, aw) | |
870 | + | let cs = fraction(fraction(cj, p, aG), (n - fraction(cq, n, cp)), n) | |
871 | + | if ((ci > au)) | |
866 | 872 | then throw("more assets exchanged than expected") | |
867 | - | else if ((0 > | |
873 | + | else if ((0 > cq)) | |
868 | 874 | then throw("price impact is bigger than liquidation penalty") | |
869 | - | else [IntegerEntry((( | |
875 | + | else [IntegerEntry(((j + "_supplied_") + aO), (cc - cr)), IntegerEntry(((j + "_borrowed_") + aP), (ce - cs)), IntegerEntry(("total_supplied_" + aO), (D(("total_supplied_" + aO)) - cr)), IntegerEntry(("total_borrowed_" + aP), (D(("total_borrowed_" + aP)) - cs))] | |
870 | 876 | } | |
871 | 877 | else throw("Strict value is not equal to itself.") | |
872 | 878 | } | |
884 | 890 | ||
885 | 891 | ||
886 | 892 | ||
887 | - | @Callable( | |
888 | - | func liquidateV2 ( | |
893 | + | @Callable(aM) | |
894 | + | func liquidateV2 (bK,j,aO) = if (!(i(aM.caller))) | |
889 | 895 | then throw("temporarily available for whitelist only") | |
890 | - | else if (!( | |
896 | + | else if (!(G("setup_active"))) | |
891 | 897 | then throw("market is stopped") | |
892 | 898 | else { | |
893 | - | let | |
894 | - | let | |
895 | - | let | |
896 | - | let | |
897 | - | if (( | |
898 | - | then if (( | |
899 | + | let aV = aM.payments[0].assetId | |
900 | + | let aP = J(aV) | |
901 | + | let ct = aM.payments[0].amount | |
902 | + | let bW = aq(j) | |
903 | + | if ((bW == bW)) | |
904 | + | then if ((bW > 0)) | |
899 | 905 | then throw("user can't be liquidated") | |
900 | 906 | else { | |
901 | - | let cs = L() | |
902 | - | let ct = value(indexOf(cs, aN)) | |
903 | - | let cu = value(indexOf(cs, aM)) | |
904 | - | let cv = ab(aN, "bRate") | |
905 | - | let aE = cv._1 | |
906 | - | let bW = cv._2 | |
907 | - | let cl = ai(aN)._2 | |
908 | - | let cm = am(aN) | |
909 | - | let cw = fraction(cr, cl, cm) | |
910 | - | let bG = parseIntValue(value(split(F("setup_penalties"), ",")[ct])) | |
911 | - | let ci = ai(aM)._1 | |
912 | - | let cj = am(aM) | |
913 | - | let cx = fraction(cw, (l + bG), l) | |
914 | - | let bZ = fraction(cx, cj, ci) | |
915 | - | let aO = fraction(cr, n, aE) | |
916 | - | let aV = fraction(bZ, n, bW[((cu * 3) + 1)].value) | |
917 | - | let ca = B(((h + "_supplied_") + aM)) | |
918 | - | let cb = B(((h + "_borrowed_") + aN)) | |
919 | - | let cc = if ((cb > 0)) | |
920 | - | then cb | |
921 | - | else throw("user has no borrow in this token") | |
922 | - | if ((aV > ca)) | |
923 | - | then throw("position to liquidate is bigger than user's supply") | |
924 | - | else if (bI) | |
925 | - | then throw("liquidation will pass") | |
926 | - | else ([ScriptTransfer(aK.caller, bZ, J(aM)), IntegerEntry(((h + "_supplied_") + aM), (ca - aV)), IntegerEntry(((h + "_borrowed_") + aN), (cc - aO)), IntegerEntry(("total_supplied_" + aM), (B(("total_supplied_" + aM)) - aV)), IntegerEntry(("total_borrowed_" + aN), (B(("total_borrowed_" + aN)) - aO))] ++ bW) | |
907 | + | let cu = N() | |
908 | + | let cv = value(indexOf(cu, aP)) | |
909 | + | let cw = value(indexOf(cu, aO)) | |
910 | + | let cx = ad(aP, "bRate") | |
911 | + | let aG = cx._1 | |
912 | + | let bY = cx._2 | |
913 | + | let cn = ak(aP)._2 | |
914 | + | let co = ao(aP) | |
915 | + | let cy = fraction(ct, cn, co) | |
916 | + | let bI = parseIntValue(value(split(H("setup_penalties"), ",")[cv])) | |
917 | + | let ck = ak(aO)._1 | |
918 | + | let cl = ao(aO) | |
919 | + | let cz = fraction(cy, (n + bI), n) | |
920 | + | let cb = fraction(cz, cl, ck) | |
921 | + | let aQ = fraction(ct, p, aG) | |
922 | + | let aX = fraction(cb, p, bY[((cw * 3) + 1)].value) | |
923 | + | let bi = if ((indexOf(e, aO) != unit)) | |
924 | + | then { | |
925 | + | let cA = split(j, "_")[1] | |
926 | + | let cB = split(j, "_")[0] | |
927 | + | reentrantInvoke(d, "liquidate", [cB, cA, aX], nil) | |
928 | + | } | |
929 | + | else nil | |
930 | + | if ((bi == bi)) | |
931 | + | then { | |
932 | + | let cc = D(((j + "_supplied_") + aO)) | |
933 | + | let cd = D(((j + "_borrowed_") + aP)) | |
934 | + | let ce = if ((cd > 0)) | |
935 | + | then cd | |
936 | + | else throw("user has no borrow in this token") | |
937 | + | if ((aX > cc)) | |
938 | + | then throw("position to liquidate is bigger than user's supply") | |
939 | + | else if (bK) | |
940 | + | then throw("liquidation will pass") | |
941 | + | else ([ScriptTransfer(aM.caller, cb, L(aO)), IntegerEntry(((j + "_supplied_") + aO), (cc - aX)), IntegerEntry(((j + "_borrowed_") + aP), (ce - aQ)), IntegerEntry(("total_supplied_" + aO), (D(("total_supplied_" + aO)) - aX)), IntegerEntry(("total_borrowed_" + aP), (D(("total_borrowed_" + aP)) - aQ))] ++ bY) | |
942 | + | } | |
943 | + | else throw("Strict value is not equal to itself.") | |
927 | 944 | } | |
928 | 945 | else throw("Strict value is not equal to itself.") | |
929 | 946 | } | |
930 | 947 | ||
931 | 948 | ||
932 | 949 | ||
933 | - | @Callable( | |
934 | - | func getUserCollateral ( | |
935 | - | let | |
936 | - | let | |
937 | - | let | |
938 | - | let | |
939 | - | let | |
940 | - | func | |
941 | - | then | |
950 | + | @Callable(aM) | |
951 | + | func getUserCollateral (bK,j,cC,cD) = { | |
952 | + | let bL = N() | |
953 | + | let bD = split(H("setup_ltvs"), ",") | |
954 | + | let bE = split(H("setup_lts"), ",") | |
955 | + | let ai = ad(bL[0], "sRate")._2 | |
956 | + | let cE = split(cD, ",") | |
957 | + | func t (u,v) = if ((v >= size(bL))) | |
958 | + | then u | |
942 | 959 | else { | |
943 | - | let | |
944 | - | let | |
945 | - | let | |
946 | - | then if (if (( | |
960 | + | let cF = D(((j + "_supplied_") + bL[v])) | |
961 | + | let cG = D(((j + "_borrowed_") + bL[v])) | |
962 | + | let cH = if ((cD == "")) | |
963 | + | then if (if ((cG != 0)) | |
947 | 964 | then true | |
948 | - | else ( | |
965 | + | else (cF != 0)) | |
949 | 966 | then true | |
950 | 967 | else false | |
951 | 968 | else true | |
952 | - | if ( | |
969 | + | if (cH) | |
953 | 970 | then { | |
954 | - | let | |
955 | - | let | |
956 | - | (( | |
957 | - | then ( | |
971 | + | let aC = ao(bL[v]) | |
972 | + | let aA = ak(bL[v]) | |
973 | + | ((u + fraction(fraction(fraction((cF + (if (if (if ((cD != "")) | |
974 | + | then (cE[0] == bL[v]) | |
958 | 975 | else false) | |
959 | - | then ( | |
976 | + | then (cE[1] == "supplied") | |
960 | 977 | else false) | |
961 | - | then parseIntValue( | |
962 | - | else 0)), | |
963 | - | then fraction(fraction(fraction(( | |
964 | - | then ( | |
978 | + | then parseIntValue(cE[2]) | |
979 | + | else 0)), ai[(v * 3)].value, p), parseIntValue(bD[v]), n), aA._1, aC)) - (if (cC) | |
980 | + | then fraction(fraction(fraction((cG + (if (if (if ((cD != "")) | |
981 | + | then (cE[0] == bL[v]) | |
965 | 982 | else false) | |
966 | - | then ( | |
983 | + | then (cE[1] == "borrowed") | |
967 | 984 | else false) | |
968 | - | then parseIntValue( | |
969 | - | else 0)), | |
985 | + | then parseIntValue(cE[2]) | |
986 | + | else 0)), ai[((v * 3) + 1)].value, p), n, parseIntValue(bE[v])), aA._2, aC) | |
970 | 987 | else 0)) | |
971 | 988 | } | |
972 | - | else | |
989 | + | else u | |
973 | 990 | } | |
974 | 991 | ||
975 | - | let | |
976 | - | let | |
977 | - | let | |
978 | - | let | |
979 | - | func | |
980 | - | then | |
981 | - | else | |
992 | + | let cI = { | |
993 | + | let w = [0, 1, 2, 3, 4, 5] | |
994 | + | let x = size(w) | |
995 | + | let y = 0 | |
996 | + | func z (A,B) = if ((B >= x)) | |
997 | + | then A | |
998 | + | else t(A, w[B]) | |
982 | 999 | ||
983 | - | func | |
984 | - | then | |
1000 | + | func C (A,B) = if ((B >= x)) | |
1001 | + | then A | |
985 | 1002 | else throw("List size exceeds 6") | |
986 | 1003 | ||
987 | - | | |
1004 | + | C(z(z(z(z(z(z(y, 0), 1), 2), 3), 4), 5), 6) | |
988 | 1005 | } | |
989 | - | if ( | |
990 | - | then throw(toString( | |
991 | - | else $Tuple2(nil, | |
1006 | + | if (bK) | |
1007 | + | then throw(toString(cI)) | |
1008 | + | else $Tuple2(nil, cI) | |
992 | 1009 | } | |
993 | 1010 | ||
994 | 1011 | ||
995 | 1012 | ||
996 | - | @Callable( | |
997 | - | func getAssetDebt ( | |
998 | - | let | |
999 | - | let | |
1000 | - | let | |
1001 | - | let | |
1002 | - | if ( | |
1003 | - | then throw(toString( | |
1004 | - | else $Tuple2(nil, | |
1013 | + | @Callable(aM) | |
1014 | + | func getAssetDebt (bK,j,l) = { | |
1015 | + | let cG = D(((j + "_borrowed_") + l)) | |
1016 | + | let aC = ao(l) | |
1017 | + | let V = ad(l, "bRate")._1 | |
1018 | + | let cI = fraction(cG, V, p) | |
1019 | + | if (bK) | |
1020 | + | then throw(toString(cI)) | |
1021 | + | else $Tuple2(nil, cI) | |
1005 | 1022 | } | |
1006 | 1023 | ||
1007 | 1024 | ||
1008 | 1025 | ||
1009 | - | @Callable( | |
1010 | - | func getPrices ( | |
1011 | - | let | |
1012 | - | func | |
1013 | - | then | |
1026 | + | @Callable(aM) | |
1027 | + | func getPrices (bK) = { | |
1028 | + | let bL = N() | |
1029 | + | func t (u,v) = if ((v >= size(bL))) | |
1030 | + | then u | |
1014 | 1031 | else { | |
1015 | - | let | |
1016 | - | (((( | |
1032 | + | let aA = ak(bL[v]) | |
1033 | + | ((((u + toString(aA._1)) + ",") + toString(aA._2)) + "|") | |
1017 | 1034 | } | |
1018 | 1035 | ||
1019 | - | let | |
1020 | - | let | |
1021 | - | let | |
1022 | - | let | |
1023 | - | func | |
1024 | - | then | |
1025 | - | else | |
1036 | + | let cI = { | |
1037 | + | let w = [0, 1, 2, 3, 4, 5] | |
1038 | + | let x = size(w) | |
1039 | + | let y = "" | |
1040 | + | func z (A,B) = if ((B >= x)) | |
1041 | + | then A | |
1042 | + | else t(A, w[B]) | |
1026 | 1043 | ||
1027 | - | func | |
1028 | - | then | |
1044 | + | func C (A,B) = if ((B >= x)) | |
1045 | + | then A | |
1029 | 1046 | else throw("List size exceeds 6") | |
1030 | 1047 | ||
1031 | - | | |
1048 | + | C(z(z(z(z(z(z(y, 0), 1), 2), 3), 4), 5), 6) | |
1032 | 1049 | } | |
1033 | - | if ( | |
1034 | - | then throw( | |
1035 | - | else $Tuple2(nil, | |
1050 | + | if (bK) | |
1051 | + | then throw(cI) | |
1052 | + | else $Tuple2(nil, cI) | |
1036 | 1053 | } | |
1037 | 1054 | ||
1038 | 1055 | ||
1039 | 1056 | ||
1040 | - | @Callable( | |
1041 | - | func calculateUtilizationRatio ( | |
1042 | - | then throw(toString( | |
1043 | - | else $Tuple2(nil, | |
1057 | + | @Callable(aM) | |
1058 | + | func calculateUtilizationRatio (l,bK) = if (bK) | |
1059 | + | then throw(toString(ah(l))) | |
1060 | + | else $Tuple2(nil, ah(l)) | |
1044 | 1061 | ||
1045 | 1062 | ||
1046 | 1063 | ||
1047 | - | @Callable( | |
1048 | - | func calculateOutdatedUR ( | |
1049 | - | then throw(toString( | |
1050 | - | else $Tuple2(nil, | |
1064 | + | @Callable(aM) | |
1065 | + | func calculateOutdatedUR (l,bK) = if (bK) | |
1066 | + | then throw(toString(Q(l))) | |
1067 | + | else $Tuple2(nil, Q(l)) | |
1051 | 1068 | ||
1052 | 1069 | ||
1053 | 1070 | ||
1054 | - | @Callable( | |
1055 | - | func calculateTokenRates ( | |
1056 | - | func | |
1057 | - | let | |
1058 | - | $Tuple2((((( | |
1071 | + | @Callable(aM) | |
1072 | + | func calculateTokenRates (bK) = { | |
1073 | + | func t (u,l) = { | |
1074 | + | let ai = W(l) | |
1075 | + | $Tuple2(((((u._1 + toString(ai[1].value)) + "|") + toString(ai[0].value)) + ","), (u._2 ++ ai)) | |
1059 | 1076 | } | |
1060 | 1077 | ||
1061 | - | let | |
1062 | - | let | |
1063 | - | let | |
1064 | - | let | |
1065 | - | func | |
1066 | - | then | |
1067 | - | else | |
1078 | + | let bO = { | |
1079 | + | let w = N() | |
1080 | + | let x = size(w) | |
1081 | + | let y = $Tuple2("", nil) | |
1082 | + | func z (A,B) = if ((B >= x)) | |
1083 | + | then A | |
1084 | + | else t(A, w[B]) | |
1068 | 1085 | ||
1069 | - | func | |
1070 | - | then | |
1086 | + | func C (A,B) = if ((B >= x)) | |
1087 | + | then A | |
1071 | 1088 | else throw("List size exceeds 6") | |
1072 | 1089 | ||
1073 | - | | |
1090 | + | C(z(z(z(z(z(z(y, 0), 1), 2), 3), 4), 5), 6) | |
1074 | 1091 | } | |
1075 | - | if ( | |
1076 | - | then throw( | |
1077 | - | else $Tuple2( | |
1092 | + | if (bK) | |
1093 | + | then throw(bO._1) | |
1094 | + | else $Tuple2(bO._2, bO._1) | |
1078 | 1095 | } | |
1079 | 1096 | ||
1080 | 1097 | ||
1081 | 1098 | ||
1082 | - | @Callable( | |
1083 | - | func calculateTokensInterest ( | |
1084 | - | func | |
1085 | - | let | |
1086 | - | (( | |
1099 | + | @Callable(aM) | |
1100 | + | func calculateTokensInterest (bK) = { | |
1101 | + | func t (u,l) = { | |
1102 | + | let V = fraction(S(l), q, n) | |
1103 | + | ((u + toString(V)) + ",") | |
1087 | 1104 | } | |
1088 | 1105 | ||
1089 | - | let | |
1090 | - | let | |
1091 | - | let | |
1092 | - | let | |
1093 | - | func | |
1094 | - | then | |
1095 | - | else | |
1106 | + | let bO = { | |
1107 | + | let w = N() | |
1108 | + | let x = size(w) | |
1109 | + | let y = "" | |
1110 | + | func z (A,B) = if ((B >= x)) | |
1111 | + | then A | |
1112 | + | else t(A, w[B]) | |
1096 | 1113 | ||
1097 | - | func | |
1098 | - | then | |
1114 | + | func C (A,B) = if ((B >= x)) | |
1115 | + | then A | |
1099 | 1116 | else throw("List size exceeds 6") | |
1100 | 1117 | ||
1101 | - | | |
1118 | + | C(z(z(z(z(z(z(y, 0), 1), 2), 3), 4), 5), 6) | |
1102 | 1119 | } | |
1103 | - | if ( | |
1104 | - | then throw( | |
1105 | - | else $Tuple2(nil, | |
1120 | + | if (bK) | |
1121 | + | then throw(bO) | |
1122 | + | else $Tuple2(nil, bO) | |
1106 | 1123 | } | |
1107 | 1124 | ||
1108 | 1125 | ||
1109 | - | @Verifier( | |
1110 | - | func | |
1126 | + | @Verifier(cJ) | |
1127 | + | func cK () = sigVerify(cJ.bodyBytes, cJ.proofs[0], cJ.senderPublicKey) | |
1111 | 1128 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = Address(base58'3Mzzt65puEs2W9M1m9iFBvMEdfM5bASE1hJ') | |
5 | 5 | ||
6 | 6 | let b = 20 | |
7 | 7 | ||
8 | 8 | let c = 1000000 | |
9 | 9 | ||
10 | - | let d = Address(base58' | |
10 | + | let d = Address(base58'3MvRWw2FPEimFCTGtK7qY9uAJbM7XJ4ZfJS') | |
11 | 11 | ||
12 | - | let e = " | |
12 | + | let e = ["8DtMtpVwVq62sdcVFVzh6nuprgzG7LSjpLdHnQnrAFgY", "FLdC14nUVRyiSYjVrMo3X4g8rXQjLbNRaGAyQAm8V68V"] | |
13 | 13 | ||
14 | - | let f = | |
14 | + | let f = Address(base58'3Mzzt65puEs2W9M1m9iFBvMEdfM5bASE1hJ') | |
15 | 15 | ||
16 | - | func g (h) = !((h != Address(base58'3Mzzt65puEs2W9M1m9iFBvMEdfM5bASE1hJ'))) | |
16 | + | let g = "3N4KbMnJH8FaM94jqxNFe2oyZ8GB7Z8yVBP" | |
17 | + | ||
18 | + | let h = [base58'3PMcMiMEs6w56NRGacksXtFG5zS7doE9fpL', base58'3PAxdDSmN758L5SHSGRC5apEtQE2aApZotG', base58'3PJKmXoHJvVeQXjSJdhtkUcFDtdiQqMbUTD', base58'3PQdNxynJy5mche2kxMVc5shXWzK8Gstq3o', base58'3PHbdpaKzz8EiAngGHaFu2hVuNCdsC67qh3', base58'3P6Ksahs71SiKQgQ4qaZuFAVhqncdi2nvJQ'] | |
19 | + | ||
20 | + | func i (j) = !((j != Address(base58'3Mzzt65puEs2W9M1m9iFBvMEdfM5bASE1hJ'))) | |
17 | 21 | ||
18 | 22 | ||
19 | - | func | |
20 | - | let | |
21 | - | if (("8DtMtpVwVq62sdcVFVzh6nuprgzG7LSjpLdHnQnrAFgY" == | |
23 | + | func k (l) = { | |
24 | + | let m = l | |
25 | + | if (("8DtMtpVwVq62sdcVFVzh6nuprgzG7LSjpLdHnQnrAFgY" == m)) | |
22 | 26 | then $Tuple4(2000000, 25000000, 80000000, 100000000) | |
23 | - | else if ((" | |
27 | + | else if (("FLdC14nUVRyiSYjVrMo3X4g8rXQjLbNRaGAyQAm8V68V" == m)) | |
24 | 28 | then $Tuple4(2000000, 25000000, 80000000, 100000000) | |
25 | - | else if (("WAVES" == k)) | |
26 | - | then $Tuple4(2000000, 30000000, 80000000, 50000000) | |
27 | - | else $Tuple4(0, 20000000, 80000000, 80000000) | |
29 | + | else if (("25FEqEjRkqK6yCkiT7Lz6SAYz7gUFCtxfCChnrVFD5AT" == m)) | |
30 | + | then $Tuple4(2000000, 25000000, 80000000, 100000000) | |
31 | + | else if (("WAVES" == m)) | |
32 | + | then $Tuple4(2000000, 30000000, 80000000, 50000000) | |
33 | + | else $Tuple4(0, 20000000, 80000000, 80000000) | |
28 | 34 | } | |
29 | 35 | ||
30 | 36 | ||
31 | - | let | |
37 | + | let n = 100000000 | |
32 | 38 | ||
33 | - | let | |
39 | + | let o = 10000000000 | |
34 | 40 | ||
35 | - | let | |
41 | + | let p = (n * n) | |
36 | 42 | ||
37 | - | let | |
43 | + | let q = 1440 | |
38 | 44 | ||
39 | - | func | |
40 | - | func | |
45 | + | func r (s) = { | |
46 | + | func t (u,v) = ((u + toString(v)) + ",") | |
41 | 47 | ||
42 | - | let | |
43 | - | let | |
44 | - | let | |
45 | - | func | |
46 | - | then | |
47 | - | else | |
48 | + | let w = s | |
49 | + | let x = size(w) | |
50 | + | let y = "" | |
51 | + | func z (A,B) = if ((B >= x)) | |
52 | + | then A | |
53 | + | else t(A, w[B]) | |
48 | 54 | ||
49 | - | func | |
50 | - | then | |
55 | + | func C (A,B) = if ((B >= x)) | |
56 | + | then A | |
51 | 57 | else throw("List size exceeds 6") | |
52 | 58 | ||
53 | - | | |
59 | + | C(z(z(z(z(z(z(y, 0), 1), 2), 3), 4), 5), 6) | |
54 | 60 | } | |
55 | 61 | ||
56 | 62 | ||
57 | - | func | |
58 | - | let | |
59 | - | if ($isInstanceOf( | |
63 | + | func D (E) = { | |
64 | + | let m = getInteger(this, E) | |
65 | + | if ($isInstanceOf(m, "Int")) | |
60 | 66 | then { | |
61 | - | let | |
62 | - | | |
67 | + | let F = m | |
68 | + | F | |
63 | 69 | } | |
64 | 70 | else 0 | |
65 | 71 | } | |
66 | 72 | ||
67 | 73 | ||
68 | - | func | |
69 | - | let | |
70 | - | if ($isInstanceOf( | |
74 | + | func G (E) = { | |
75 | + | let m = getBoolean(this, E) | |
76 | + | if ($isInstanceOf(m, "Boolean")) | |
71 | 77 | then { | |
72 | - | let | |
73 | - | | |
78 | + | let F = m | |
79 | + | F | |
74 | 80 | } | |
75 | 81 | else false | |
76 | 82 | } | |
77 | 83 | ||
78 | 84 | ||
79 | - | func | |
80 | - | let | |
81 | - | if ($isInstanceOf( | |
85 | + | func H (E) = { | |
86 | + | let m = getString(this, E) | |
87 | + | if ($isInstanceOf(m, "String")) | |
82 | 88 | then { | |
83 | - | let | |
84 | - | | |
89 | + | let F = m | |
90 | + | F | |
85 | 91 | } | |
86 | 92 | else "" | |
87 | 93 | } | |
88 | 94 | ||
89 | 95 | ||
90 | - | func | |
91 | - | let | |
92 | - | if ($isInstanceOf( | |
96 | + | func I (E) = { | |
97 | + | let m = getBinary(this, E) | |
98 | + | if ($isInstanceOf(m, "ByteVector")) | |
93 | 99 | then { | |
94 | - | let | |
95 | - | | |
100 | + | let F = m | |
101 | + | F | |
96 | 102 | } | |
97 | 103 | else base58'' | |
98 | 104 | } | |
99 | 105 | ||
100 | 106 | ||
101 | - | func | |
102 | - | let | |
103 | - | if ($isInstanceOf( | |
107 | + | func J (K) = { | |
108 | + | let m = K | |
109 | + | if ($isInstanceOf(m, "ByteVector")) | |
104 | 110 | then { | |
105 | - | let | |
106 | - | toBase58String( | |
111 | + | let F = m | |
112 | + | toBase58String(F) | |
107 | 113 | } | |
108 | 114 | else "WAVES" | |
109 | 115 | } | |
110 | 116 | ||
111 | 117 | ||
112 | - | func | |
118 | + | func L (l) = if ((l == "WAVES")) | |
113 | 119 | then unit | |
114 | - | else fromBase58String( | |
120 | + | else fromBase58String(l) | |
115 | 121 | ||
116 | 122 | ||
117 | - | func | |
123 | + | func M (l) = if ((l == "WAVES")) | |
118 | 124 | then wavesBalance(this).available | |
119 | - | else assetBalance(this, fromBase58String( | |
125 | + | else assetBalance(this, fromBase58String(l)) | |
120 | 126 | ||
121 | 127 | ||
122 | - | func | |
128 | + | func N () = split(H("setup_tokens"), ",") | |
123 | 129 | ||
124 | 130 | ||
125 | - | func | |
126 | - | let | |
127 | - | if (( | |
131 | + | func O () = { | |
132 | + | let P = H("setup_maxsupply") | |
133 | + | if ((P == "")) | |
128 | 134 | then [-1, -1, -1, -1, -1, -1, -1] | |
129 | - | else split( | |
135 | + | else split(P, ",") | |
130 | 136 | } | |
131 | 137 | ||
132 | 138 | ||
133 | - | func | |
134 | - | let | |
135 | - | if (( | |
139 | + | func Q (l) = { | |
140 | + | let R = fraction(D(("total_supplied_" + l)), D((l + "_sRate")), p) | |
141 | + | if ((R == 0)) | |
136 | 142 | then 0 | |
137 | - | else fraction( | |
143 | + | else fraction(n, fraction(D(("total_borrowed_" + l)), D((l + "_bRate")), p), R) | |
138 | 144 | } | |
139 | 145 | ||
140 | 146 | ||
141 | - | func | |
142 | - | let | |
143 | - | let | |
144 | - | let | |
145 | - | then fraction( | |
146 | - | else ( | |
147 | - | max([fraction( | |
147 | + | func S (l) = { | |
148 | + | let T = Q(l) | |
149 | + | let U = k(l) | |
150 | + | let V = (U._1 + (if ((U._3 >= T)) | |
151 | + | then fraction(T, U._2, U._3) | |
152 | + | else (U._2 + fraction((T - U._3), U._4, (100000000 - U._3))))) | |
153 | + | max([fraction(V, n, (q * 365)), 1]) | |
148 | 154 | } | |
149 | 155 | ||
150 | 156 | ||
151 | - | func | |
152 | - | let | |
153 | - | let | |
154 | - | let | |
155 | - | let | |
156 | - | let | |
157 | - | let | |
158 | - | let | |
159 | - | [IntegerEntry(( | |
157 | + | func W (l) = { | |
158 | + | let X = S(l) | |
159 | + | let T = Q(l) | |
160 | + | let Y = D("lastRateHeight") | |
161 | + | let Z = max([D((l + "_bRate")), p]) | |
162 | + | let aa = (Z + ((height - Y) * X)) | |
163 | + | let ab = max([D((l + "_sRate")), p]) | |
164 | + | let ac = (ab + ((((height - Y) * fraction(X, T, n)) * (100 - b)) / 100)) | |
165 | + | [IntegerEntry((l + "_sRate"), ac), IntegerEntry((l + "_bRate"), aa), IntegerEntry("lastRateHeight", height)] | |
160 | 166 | } | |
161 | 167 | ||
162 | 168 | ||
163 | - | func | |
164 | - | func | |
165 | - | let | |
166 | - | $Tuple2(if (( | |
167 | - | then | |
168 | - | else if (( | |
169 | - | then | |
170 | - | else | |
169 | + | func ad (l,ae) = { | |
170 | + | func t (u,af) = { | |
171 | + | let ag = W(af) | |
172 | + | $Tuple2(if ((af != l)) | |
173 | + | then u._1 | |
174 | + | else if ((ae == "sRate")) | |
175 | + | then ag[0].value | |
176 | + | else ag[1].value, (u._2 ++ ag)) | |
171 | 177 | } | |
172 | 178 | ||
173 | - | let | |
174 | - | let | |
175 | - | let | |
176 | - | func | |
177 | - | then | |
178 | - | else | |
179 | + | let w = N() | |
180 | + | let x = size(w) | |
181 | + | let y = $Tuple2(0, nil) | |
182 | + | func z (A,B) = if ((B >= x)) | |
183 | + | then A | |
184 | + | else t(A, w[B]) | |
179 | 185 | ||
180 | - | func | |
181 | - | then | |
186 | + | func C (A,B) = if ((B >= x)) | |
187 | + | then A | |
182 | 188 | else throw("List size exceeds 6") | |
183 | 189 | ||
184 | - | | |
190 | + | C(z(z(z(z(z(z(y, 0), 1), 2), 3), 4), 5), 6) | |
185 | 191 | } | |
186 | 192 | ||
187 | 193 | ||
188 | - | func | |
189 | - | let | |
190 | - | let | |
191 | - | fraction( | |
194 | + | func ah (l) = { | |
195 | + | let ai = W(l) | |
196 | + | let R = fraction(D(("total_supplied_" + l)), ai[0].value, p) | |
197 | + | fraction(n, fraction(D(("total_borrowed_" + l)), ai[1].value, p), R) | |
192 | 198 | } | |
193 | 199 | ||
194 | 200 | ||
195 | - | func | |
196 | - | func | |
201 | + | func aj () = { | |
202 | + | func t (u,af) = (u ++ W(af)) | |
197 | 203 | ||
198 | - | let | |
199 | - | let | |
200 | - | let | |
201 | - | func | |
202 | - | then | |
203 | - | else | |
204 | + | let w = N() | |
205 | + | let x = size(w) | |
206 | + | let y = nil | |
207 | + | func z (A,B) = if ((B >= x)) | |
208 | + | then A | |
209 | + | else t(A, w[B]) | |
204 | 210 | ||
205 | - | func | |
206 | - | then | |
211 | + | func C (A,B) = if ((B >= x)) | |
212 | + | then A | |
207 | 213 | else throw("List size exceeds 6") | |
208 | 214 | ||
209 | - | | |
215 | + | C(z(z(z(z(z(z(y, 0), 1), 2), 3), 4), 5), 6) | |
210 | 216 | } | |
211 | 217 | ||
212 | 218 | ||
213 | - | func | |
214 | - | let | |
215 | - | if (( | |
219 | + | func ak (l) = { | |
220 | + | let al = invoke(addressFromStringValue(g), "getTWAP60", [l, false], nil) | |
221 | + | if ((al == al)) | |
216 | 222 | then { | |
217 | - | let | |
218 | - | let | |
219 | - | if ($isInstanceOf( | |
223 | + | let am = { | |
224 | + | let m = al | |
225 | + | if ($isInstanceOf(m, "(Int, Int)")) | |
220 | 226 | then { | |
221 | - | let | |
222 | - | | |
227 | + | let an = m | |
228 | + | an | |
223 | 229 | } | |
224 | 230 | else throw("error of price oracle") | |
225 | 231 | } | |
226 | - | if (( | |
227 | - | then | |
232 | + | if ((am == am)) | |
233 | + | then am | |
228 | 234 | else throw("Strict value is not equal to itself.") | |
229 | 235 | } | |
230 | 236 | else throw("Strict value is not equal to itself.") | |
231 | 237 | } | |
232 | 238 | ||
233 | 239 | ||
234 | - | func | |
235 | - | let | |
240 | + | func ao (l) = { | |
241 | + | let ap = if ((l == "WAVES")) | |
236 | 242 | then 8 | |
237 | - | else value(assetInfo(fromBase58String( | |
238 | - | pow(10, 0, | |
243 | + | else value(assetInfo(fromBase58String(l))).decimals | |
244 | + | pow(10, 0, ap, 0, 0, DOWN) | |
239 | 245 | } | |
240 | 246 | ||
241 | 247 | ||
242 | - | func | |
243 | - | let | |
244 | - | if (( | |
248 | + | func aq (j) = { | |
249 | + | let ar = invoke(this, "getUserCollateral", [false, j, true, ""], nil) | |
250 | + | if ((ar == ar)) | |
245 | 251 | then { | |
246 | - | let | |
247 | - | let | |
248 | - | if ($isInstanceOf( | |
252 | + | let as = { | |
253 | + | let m = ar | |
254 | + | if ($isInstanceOf(m, "Int")) | |
249 | 255 | then { | |
250 | - | let | |
251 | - | | |
256 | + | let an = m | |
257 | + | an | |
252 | 258 | } | |
253 | 259 | else throw("issue while doing in-dapp invocation") | |
254 | 260 | } | |
255 | - | if (( | |
256 | - | then | |
261 | + | if ((as == as)) | |
262 | + | then as | |
257 | 263 | else throw("Strict value is not equal to itself.") | |
258 | 264 | } | |
259 | 265 | else throw("Strict value is not equal to itself.") | |
260 | 266 | } | |
261 | 267 | ||
262 | 268 | ||
263 | - | func | |
269 | + | func at (l,au,j) = if (!(G("setup_active"))) | |
264 | 270 | then throw("market is stopped") | |
265 | 271 | else { | |
266 | - | let | |
267 | - | let | |
268 | - | let | |
269 | - | let | |
270 | - | let | |
271 | - | let | |
272 | - | if ($isInstanceOf( | |
272 | + | let av = ad(l, "sRate") | |
273 | + | let aw = av._1 | |
274 | + | let ax = av._2 | |
275 | + | let ay = fraction(au, p, aw, DOWN) | |
276 | + | let az = { | |
277 | + | let m = getString(("setup_maxSupply_" + l)) | |
278 | + | if ($isInstanceOf(m, "String")) | |
273 | 279 | then { | |
274 | - | let | |
275 | - | parseIntValue( | |
280 | + | let an = m | |
281 | + | parseIntValue(an) | |
276 | 282 | } | |
277 | 283 | else 0 | |
278 | 284 | } | |
279 | - | let | |
280 | - | let | |
281 | - | let | |
282 | - | let | |
283 | - | let | |
284 | - | if ((indexOf( | |
285 | + | let aA = ak(l) | |
286 | + | let aB = (D(((j + "_supplied_") + l)) + ay) | |
287 | + | let V = ad(l, "sRate")._1 | |
288 | + | let aC = ao(l) | |
289 | + | let aD = fraction(fraction(aB, V, p), aA._1, aC) | |
290 | + | if ((indexOf(H("setup_tokens"), l) == unit)) | |
285 | 291 | then throw("this asset is not supported by the market") | |
286 | - | else if (if (( | |
287 | - | then ( | |
292 | + | else if (if ((az != 0)) | |
293 | + | then (aD > az) | |
288 | 294 | else false) | |
289 | 295 | then throw("max total supply for this token reached in the pool") | |
290 | - | else $Tuple2(([IntegerEntry((( | |
296 | + | else $Tuple2(([IntegerEntry(((j + "_supplied_") + l), aB), IntegerEntry(("total_supplied_" + l), (D(("total_supplied_" + l)) + ay))] ++ ax), au) | |
291 | 297 | } | |
292 | 298 | ||
293 | 299 | ||
294 | - | func | |
295 | - | let | |
296 | - | let | |
297 | - | let | |
298 | - | let | |
299 | - | let | |
300 | - | if (( | |
300 | + | func aE (l,au,j) = { | |
301 | + | let aF = ad(l, "bRate") | |
302 | + | let aG = aF._1 | |
303 | + | let ax = aF._2 | |
304 | + | let ay = fraction(au, p, aG, CEILING) | |
305 | + | let aH = invoke(this, "getUserCollateral", [false, j, true, ((l + ",borrowed,") + toString(ay))], nil) | |
306 | + | if ((aH == aH)) | |
301 | 307 | then { | |
302 | - | let | |
303 | - | let | |
304 | - | if ($isInstanceOf( | |
308 | + | let aI = { | |
309 | + | let m = aH | |
310 | + | if ($isInstanceOf(m, "Int")) | |
305 | 311 | then { | |
306 | - | let | |
307 | - | | |
312 | + | let an = m | |
313 | + | an | |
308 | 314 | } | |
309 | 315 | else throw("can't get user collateral value") | |
310 | 316 | } | |
311 | - | if (!( | |
317 | + | if (!(G("setup_active"))) | |
312 | 318 | then throw("market is stopped") | |
313 | 319 | else { | |
314 | - | let | |
315 | - | let | |
316 | - | let | |
317 | - | if (( | |
320 | + | let aJ = D(("total_supplied_" + l)) | |
321 | + | let aK = D(("total_borrowed_" + l)) | |
322 | + | let aL = D(((j + "_borrowed_") + l)) | |
323 | + | if ((ay > (aJ - aK))) | |
318 | 324 | then throw("this amount is not available") | |
319 | - | else $Tuple2(([IntegerEntry((( | |
325 | + | else $Tuple2(([IntegerEntry(((j + "_borrowed_") + l), (aL + ay)), IntegerEntry(("total_borrowed_" + l), (aK + ay))] ++ ax), au) | |
320 | 326 | } | |
321 | 327 | } | |
322 | 328 | else throw("Strict value is not equal to itself.") | |
323 | 329 | } | |
324 | 330 | ||
325 | 331 | ||
326 | - | @Callable( | |
327 | - | func flashPosition ( | |
328 | - | let | |
329 | - | let | |
330 | - | let | |
331 | - | if (( | |
332 | + | @Callable(aM) | |
333 | + | func flashPosition (aN,aO,aP,aQ,aR,aS,aT) = { | |
334 | + | let aU = aE(aP, aQ, aN) | |
335 | + | let aV = L(aP) | |
336 | + | let aW = reentrantInvoke(addressFromStringValue(aR), aS, split(aT, ","), [AttachedPayment(aV, aQ)]) | |
337 | + | if ((aW == aW)) | |
332 | 338 | then { | |
333 | - | let | |
334 | - | let | |
335 | - | if ($isInstanceOf( | |
336 | - | then | |
337 | - | else throw(($getType( | |
339 | + | let aX = { | |
340 | + | let aY = aW | |
341 | + | if ($isInstanceOf(aY, "Int")) | |
342 | + | then aY | |
343 | + | else throw(($getType(aY) + " couldn't be cast to Int")) | |
338 | 344 | } | |
339 | - | if (( | |
345 | + | if ((aX == aX)) | |
340 | 346 | then { | |
341 | - | let | |
342 | - | let | |
343 | - | let | |
344 | - | if ($isInstanceOf( | |
345 | - | then | |
346 | - | else throw(($getType( | |
347 | + | let aZ = at(aO, aX, aN) | |
348 | + | let aI = { | |
349 | + | let aY = invoke(this, "getUserCollateral", [false, aN, true, ((aO + ",supplied,") + toString(aX))], nil) | |
350 | + | if ($isInstanceOf(aY, "Int")) | |
351 | + | then aY | |
352 | + | else throw(($getType(aY) + " couldn't be cast to Int")) | |
347 | 353 | } | |
348 | - | if (( | |
354 | + | if ((aI == aI)) | |
349 | 355 | then { | |
350 | - | let | |
351 | - | let | |
352 | - | if ($isInstanceOf( | |
353 | - | then | |
354 | - | else throw(($getType( | |
356 | + | let ba = { | |
357 | + | let aY = invoke(this, "getUserCollateral", [false, aN, true, ((aP + ",borrowed,") + toString(aQ))], nil) | |
358 | + | if ($isInstanceOf(aY, "Int")) | |
359 | + | then aY | |
360 | + | else throw(($getType(aY) + " couldn't be cast to Int")) | |
355 | 361 | } | |
356 | - | if (( | |
357 | - | then if (( | |
362 | + | if ((ba == ba)) | |
363 | + | then if ((ba > aI)) | |
358 | 364 | then throw("not enough collateral provided") | |
359 | - | else ( | |
365 | + | else (aU._1 ++ aZ._1) | |
360 | 366 | else throw("Strict value is not equal to itself.") | |
361 | 367 | } | |
362 | 368 | else throw("Strict value is not equal to itself.") | |
363 | 369 | } | |
364 | 370 | else throw("Strict value is not equal to itself.") | |
365 | 371 | } | |
366 | 372 | else throw("Strict value is not equal to itself.") | |
367 | 373 | } | |
368 | 374 | ||
369 | 375 | ||
370 | 376 | ||
371 | - | @Callable( | |
372 | - | func supply () = if (if ((size( | |
377 | + | @Callable(aM) | |
378 | + | func supply () = if (if ((size(aM.payments) != 1)) | |
373 | 379 | then true | |
374 | - | else ( | |
380 | + | else (aM.payments[0].amount == 0)) | |
375 | 381 | then throw("1 payment has to be attached") | |
376 | 382 | else { | |
377 | - | let | |
378 | - | let | |
379 | - | | |
383 | + | let l = J(aM.payments[0].assetId) | |
384 | + | let au = aM.payments[0].amount | |
385 | + | at(l, au, toString(aM.caller)) | |
380 | 386 | } | |
381 | 387 | ||
382 | 388 | ||
383 | 389 | ||
384 | - | @Callable( | |
385 | - | func withdraw ( | |
386 | - | let | |
387 | - | let | |
388 | - | let | |
389 | - | let | |
390 | - | let | |
391 | - | let | |
392 | - | let | |
393 | - | let | |
394 | - | let | |
395 | - | let | |
396 | - | if (( | |
390 | + | @Callable(aM) | |
391 | + | func withdraw (l,au) = { | |
392 | + | let bb = ad(l, "sRate") | |
393 | + | let aw = bb._1 | |
394 | + | let ax = bb._2 | |
395 | + | let ay = fraction(au, p, aw, CEILING) | |
396 | + | let j = toString(aM.caller) | |
397 | + | let aJ = D(("total_supplied_" + l)) | |
398 | + | let aK = D(("total_borrowed_" + l)) | |
399 | + | let bc = D(((j + "_supplied_") + l)) | |
400 | + | let aL = D(((j + "_borrowed_") + l)) | |
401 | + | let aH = invoke(this, "getUserCollateral", [false, j, true, ((l + ",supplied,") + toString(-(ay)))], nil) | |
402 | + | if ((aH == aH)) | |
397 | 403 | then { | |
398 | - | let | |
399 | - | let | |
400 | - | if ($isInstanceOf( | |
404 | + | let aI = { | |
405 | + | let m = aH | |
406 | + | if ($isInstanceOf(m, "Int")) | |
401 | 407 | then { | |
402 | - | let | |
403 | - | | |
408 | + | let an = m | |
409 | + | an | |
404 | 410 | } | |
405 | 411 | else throw("can't get user collateral value") | |
406 | 412 | } | |
407 | - | if (!( | |
413 | + | if (!(G("setup_active"))) | |
408 | 414 | then throw("market is stopped") | |
409 | - | else if ((0 > | |
415 | + | else if ((0 > aI)) | |
410 | 416 | then throw("you dont have enough collateral for this operation") | |
411 | - | else if (( | |
417 | + | else if ((ay > (aJ - aK))) | |
412 | 418 | then throw("this amount is not available on the market") | |
413 | - | else if (( | |
419 | + | else if ((ay > (bc - aL))) | |
414 | 420 | then throw("this amount is not available for this user") | |
415 | - | else ([IntegerEntry((( | |
421 | + | else ([IntegerEntry(((j + "_supplied_") + l), (D(((j + "_supplied_") + l)) - ay)), IntegerEntry(("total_supplied_" + l), (D(("total_supplied_" + l)) - ay)), ScriptTransfer(aM.caller, au, L(l))] ++ ax) | |
416 | 422 | } | |
417 | 423 | else throw("Strict value is not equal to itself.") | |
418 | 424 | } | |
419 | 425 | ||
420 | 426 | ||
421 | 427 | ||
422 | - | @Callable( | |
423 | - | func borrow ( | |
424 | - | let | |
425 | - | let | |
426 | - | let | |
427 | - | ( | |
428 | + | @Callable(aM) | |
429 | + | func borrow (l,au) = { | |
430 | + | let j = toString(aM.caller) | |
431 | + | let bd = aE(l, au, j) | |
432 | + | let ay = bd._2 | |
433 | + | (bd._1 ++ [ScriptTransfer(aM.caller, ay, L(l))]) | |
428 | 434 | } | |
429 | 435 | ||
430 | 436 | ||
431 | 437 | ||
432 | - | @Callable( | |
433 | - | func repay () = if (!( | |
438 | + | @Callable(aM) | |
439 | + | func repay () = if (!(G("setup_active"))) | |
434 | 440 | then throw("market is stopped") | |
435 | - | else if (if ((size( | |
441 | + | else if (if ((size(aM.payments) != 1)) | |
436 | 442 | then true | |
437 | - | else ( | |
443 | + | else (aM.payments[0].amount == 0)) | |
438 | 444 | then throw("1 payment has to be attached") | |
439 | 445 | else { | |
440 | - | let | |
441 | - | let | |
442 | - | let | |
443 | - | let | |
444 | - | let | |
445 | - | let | |
446 | - | let | |
447 | - | let | |
448 | - | let | |
449 | - | let | |
450 | - | let | |
451 | - | let | |
452 | - | then | |
453 | - | else | |
454 | - | if ((indexOf( | |
446 | + | let l = J(aM.payments[0].assetId) | |
447 | + | let au = aM.payments[0].amount | |
448 | + | let be = ad(l, "bRate") | |
449 | + | let aG = be._1 | |
450 | + | let ax = be._2 | |
451 | + | let ay = fraction(au, p, aG, CEILING) | |
452 | + | let j = toString(aM.caller) | |
453 | + | let aJ = D(("total_supplied_" + l)) | |
454 | + | let aK = D(("total_borrowed_" + l)) | |
455 | + | let aL = D(((j + "_borrowed_") + l)) | |
456 | + | let bf = (aL - ay) | |
457 | + | let bg = if ((bf >= 0)) | |
458 | + | then ay | |
459 | + | else aL | |
460 | + | if ((indexOf(H("setup_tokens"), l) == unit)) | |
455 | 461 | then throw("this asset is not supported by the market") | |
456 | - | else (([IntegerEntry((( | |
462 | + | else (([IntegerEntry(((j + "_borrowed_") + l), (aL - bg)), IntegerEntry(("total_borrowed_" + l), (aK - bg))] ++ ax) ++ (if ((bf >= 0)) | |
457 | 463 | then nil | |
458 | - | else [ScriptTransfer( | |
464 | + | else [ScriptTransfer(aM.caller, -(bf), aM.payments[0].assetId)])) | |
459 | 465 | } | |
460 | 466 | ||
461 | 467 | ||
462 | 468 | ||
463 | - | @Callable( | |
464 | - | func repayFor ( | |
469 | + | @Callable(aM) | |
470 | + | func repayFor (j) = if (!(G("setup_active"))) | |
465 | 471 | then throw("market is stopped") | |
466 | - | else if (if ((size( | |
472 | + | else if (if ((size(aM.payments) != 1)) | |
467 | 473 | then true | |
468 | - | else ( | |
474 | + | else (aM.payments[0].amount == 0)) | |
469 | 475 | then throw("1 payment has to be attached") | |
470 | 476 | else { | |
471 | - | let | |
472 | - | let | |
473 | - | let | |
474 | - | let | |
475 | - | let | |
476 | - | let | |
477 | - | let | |
478 | - | let | |
479 | - | let | |
480 | - | let | |
481 | - | let | |
482 | - | then | |
483 | - | else | |
484 | - | if ((indexOf( | |
477 | + | let l = J(aM.payments[0].assetId) | |
478 | + | let au = aM.payments[0].amount | |
479 | + | let bh = ad(l, "bRate") | |
480 | + | let aG = bh._1 | |
481 | + | let ax = bh._2 | |
482 | + | let ay = fraction(au, p, aG, CEILING) | |
483 | + | let aJ = D(("total_supplied_" + l)) | |
484 | + | let aK = D(("total_borrowed_" + l)) | |
485 | + | let aL = D(((j + "_borrowed_") + l)) | |
486 | + | let bf = (aL - ay) | |
487 | + | let bg = if ((bf >= 0)) | |
488 | + | then ay | |
489 | + | else aL | |
490 | + | if ((indexOf(H("setup_tokens"), l) == unit)) | |
485 | 491 | then throw("this asset is not supported by the market") | |
486 | - | else (([IntegerEntry((( | |
492 | + | else (([IntegerEntry(((j + "_borrowed_") + l), (aL - bg)), IntegerEntry(("total_borrowed_" + l), (aK - bg))] ++ ax) ++ (if ((bf >= 0)) | |
487 | 493 | then nil | |
488 | - | else [ScriptTransfer( | |
494 | + | else [ScriptTransfer(aM.caller, -(bf), aM.payments[0].assetId)])) | |
489 | 495 | } | |
490 | 496 | ||
491 | 497 | ||
492 | 498 | ||
493 | - | @Callable( | |
494 | - | func stakeTokenAll ( | |
499 | + | @Callable(aM) | |
500 | + | func stakeTokenAll (l) = if ((aM.caller != this)) | |
495 | 501 | then throw("only for internal smart contract invocations") | |
496 | 502 | else { | |
497 | - | let | |
498 | - | let | |
499 | - | if (( | |
503 | + | let ay = M(l) | |
504 | + | let bi = invoke(this, "stakeToken", [l, ay], nil) | |
505 | + | if ((bi == bi)) | |
500 | 506 | then nil | |
501 | 507 | else throw("Strict value is not equal to itself.") | |
502 | 508 | } | |
503 | 509 | ||
504 | 510 | ||
505 | 511 | ||
506 | - | @Callable( | |
507 | - | func stakeToken ( | |
512 | + | @Callable(aM) | |
513 | + | func stakeToken (l,ay) = if ((aM.caller != this)) | |
508 | 514 | then throw("only for internal smart contract invocations") | |
509 | - | else if (( | |
515 | + | else if ((l == "DG2xFkPdDwKUoBkzGAhQtLpSGzfXLiCYPEzeKH2Ad24p")) | |
510 | 516 | then { | |
511 | - | let | |
512 | - | let | |
513 | - | if (( | |
514 | - | then [IntegerEntry("autostake_amount_DG2xFkPdDwKUoBkzGAhQtLpSGzfXLiCYPEzeKH2Ad24p", ( | |
517 | + | let bj = D("autostake_amount_DG2xFkPdDwKUoBkzGAhQtLpSGzfXLiCYPEzeKH2Ad24p") | |
518 | + | let bi = invoke(Address(base58'3PNikM6yp4NqcSU8guxQtmR5onr2D4e8yTJ'), "stake", nil, [AttachedPayment(base58'DG2xFkPdDwKUoBkzGAhQtLpSGzfXLiCYPEzeKH2Ad24p', ay)]) | |
519 | + | if ((bi == bi)) | |
520 | + | then [IntegerEntry("autostake_amount_DG2xFkPdDwKUoBkzGAhQtLpSGzfXLiCYPEzeKH2Ad24p", (bj + ay))] | |
515 | 521 | else throw("Strict value is not equal to itself.") | |
516 | 522 | } | |
517 | - | else if (( | |
523 | + | else if ((l == "8t4DPWTwPzpatHA9AkTxWAB47THnYzBsDnoY7fQqbG91")) | |
518 | 524 | then { | |
519 | - | let | |
520 | - | let | |
521 | - | if (( | |
522 | - | then [IntegerEntry("autostake_amount_8t4DPWTwPzpatHA9AkTxWAB47THnYzBsDnoY7fQqbG91", ( | |
525 | + | let bj = D("autostake_amount_8t4DPWTwPzpatHA9AkTxWAB47THnYzBsDnoY7fQqbG91") | |
526 | + | let bi = invoke(Address(base58'3PQTM38wDmAY9vWonK6ha7QL3PAycLz5oPP'), "stake", nil, [AttachedPayment(base58'8t4DPWTwPzpatHA9AkTxWAB47THnYzBsDnoY7fQqbG91', ay)]) | |
527 | + | if ((bi == bi)) | |
528 | + | then [IntegerEntry("autostake_amount_8t4DPWTwPzpatHA9AkTxWAB47THnYzBsDnoY7fQqbG91", (bj + ay))] | |
523 | 529 | else throw("Strict value is not equal to itself.") | |
524 | 530 | } | |
525 | - | else if (( | |
531 | + | else if ((l == "At8D6NFFpheCbvKVnjVoeLL84Eo8NZn6ovManxfLaFWL")) | |
526 | 532 | then { | |
527 | - | let | |
528 | - | let | |
529 | - | if (( | |
530 | - | then [IntegerEntry("autostake_amount_At8D6NFFpheCbvKVnjVoeLL84Eo8NZn6ovManxfLaFWL", ( | |
533 | + | let bj = D("autostake_amount_At8D6NFFpheCbvKVnjVoeLL84Eo8NZn6ovManxfLaFWL") | |
534 | + | let bi = invoke(Address(base58'3PBiotFpqjRMkkeFBccnQNUXUopy7KFez5C'), "stake", nil, [AttachedPayment(base58'At8D6NFFpheCbvKVnjVoeLL84Eo8NZn6ovManxfLaFWL', ay)]) | |
535 | + | if ((bi == bi)) | |
536 | + | then [IntegerEntry("autostake_amount_At8D6NFFpheCbvKVnjVoeLL84Eo8NZn6ovManxfLaFWL", (bj + ay))] | |
531 | 537 | else throw("Strict value is not equal to itself.") | |
532 | 538 | } | |
533 | 539 | else nil | |
534 | 540 | ||
535 | 541 | ||
536 | 542 | ||
537 | - | @Callable( | |
538 | - | func unstakeToken ( | |
543 | + | @Callable(aM) | |
544 | + | func unstakeToken (l,ay) = if ((aM.caller != this)) | |
539 | 545 | then throw("only for internal smart contract invocations") | |
540 | - | else if (( | |
546 | + | else if ((l == "8t4DPWTwPzpatHA9AkTxWAB47THnYzBsDnoY7fQqbG91")) | |
541 | 547 | then { | |
542 | - | let | |
543 | - | let | |
544 | - | if (( | |
545 | - | then [IntegerEntry("autostake_amount_8t4DPWTwPzpatHA9AkTxWAB47THnYzBsDnoY7fQqbG91", ( | |
548 | + | let bj = D("autostake_amount_8t4DPWTwPzpatHA9AkTxWAB47THnYzBsDnoY7fQqbG91") | |
549 | + | let bi = invoke(Address(base58'3PQTM38wDmAY9vWonK6ha7QL3PAycLz5oPP'), "unStake", [ay], nil) | |
550 | + | if ((bi == bi)) | |
551 | + | then [IntegerEntry("autostake_amount_8t4DPWTwPzpatHA9AkTxWAB47THnYzBsDnoY7fQqbG91", (bj - ay))] | |
546 | 552 | else throw("Strict value is not equal to itself.") | |
547 | 553 | } | |
548 | - | else if (( | |
554 | + | else if ((l == "At8D6NFFpheCbvKVnjVoeLL84Eo8NZn6ovManxfLaFWL")) | |
549 | 555 | then { | |
550 | - | let | |
551 | - | let | |
552 | - | if (( | |
556 | + | let bj = D("autostake_amount_At8D6NFFpheCbvKVnjVoeLL84Eo8NZn6ovManxfLaFWL") | |
557 | + | let bi = invoke(Address(base58'3PBiotFpqjRMkkeFBccnQNUXUopy7KFez5C'), "unstake", [ay], nil) | |
558 | + | if ((bi == bi)) | |
553 | 559 | then { | |
554 | - | let | |
555 | - | if (( | |
560 | + | let bk = M("At8D6NFFpheCbvKVnjVoeLL84Eo8NZn6ovManxfLaFWL") | |
561 | + | if ((bk == bk)) | |
556 | 562 | then { | |
557 | - | let | |
558 | - | if (( | |
563 | + | let bl = invoke(Address(base58'3PQrVbTVpqXHqpVKftkNdjy3zZAh4dsRzN6'), "gnsbtRewardsSYSREADONLY", [toString(this)], nil) | |
564 | + | if ((bl == bl)) | |
559 | 565 | then { | |
560 | - | let | |
561 | - | let | |
562 | - | if ($isInstanceOf( | |
566 | + | let bm = { | |
567 | + | let m = bl | |
568 | + | if ($isInstanceOf(m, "List[Any]")) | |
563 | 569 | then { | |
564 | - | let | |
565 | - | let | |
566 | - | let | |
567 | - | if ($isInstanceOf( | |
570 | + | let an = m | |
571 | + | let bn = an[1] | |
572 | + | let bo = bn | |
573 | + | if ($isInstanceOf(bo, "String")) | |
568 | 574 | then { | |
569 | - | let | |
570 | - | let | |
571 | - | let | |
572 | - | if (if (( | |
575 | + | let bn = bo | |
576 | + | let bp = parseIntValue(split(split(bn, "_")[1], ":")[1]) | |
577 | + | let bq = parseIntValue(split(split(bn, "_")[0], ":")[1]) | |
578 | + | if (if ((bp != 0)) | |
573 | 579 | then true | |
574 | - | else ( | |
580 | + | else (bq != 0)) | |
575 | 581 | then { | |
576 | - | let | |
577 | - | if (( | |
582 | + | let br = M("DG2xFkPdDwKUoBkzGAhQtLpSGzfXLiCYPEzeKH2Ad24p") | |
583 | + | if ((br == br)) | |
578 | 584 | then { | |
579 | - | let | |
580 | - | if (( | |
585 | + | let bs = M("WAVES") | |
586 | + | if ((bs == bs)) | |
581 | 587 | then { | |
582 | - | let | |
583 | - | if (( | |
588 | + | let al = invoke(Address(base58'3PBiotFpqjRMkkeFBccnQNUXUopy7KFez5C'), "claimRewards", nil, nil) | |
589 | + | if ((al == al)) | |
584 | 590 | then { | |
585 | - | let | |
586 | - | if (( | |
591 | + | let bt = M("WAVES") | |
592 | + | if ((bt == bt)) | |
587 | 593 | then { | |
588 | - | let | |
589 | - | if (( | |
594 | + | let bu = invoke(Address(base58'3PLiXyywNThdvf3vVEUxwc7TJTucjZvuegh'), "swap", ["DG2xFkPdDwKUoBkzGAhQtLpSGzfXLiCYPEzeKH2Ad24p", 0], [AttachedPayment(unit, (bt - bs))]) | |
595 | + | if ((bu == bu)) | |
590 | 596 | then { | |
591 | - | let | |
592 | - | if (( | |
597 | + | let bv = M("DG2xFkPdDwKUoBkzGAhQtLpSGzfXLiCYPEzeKH2Ad24p") | |
598 | + | if ((bv == bv)) | |
593 | 599 | then { | |
594 | - | let | |
595 | - | if (( | |
600 | + | let bw = invoke(Address(base58'3P7r93vXHuusageNJVGwzqaz3WMotAu49Yz'), "swap", ["At8D6NFFpheCbvKVnjVoeLL84Eo8NZn6ovManxfLaFWL", 0], [AttachedPayment(base58'DG2xFkPdDwKUoBkzGAhQtLpSGzfXLiCYPEzeKH2Ad24p', (bv - br))]) | |
601 | + | if ((bw == bw)) | |
596 | 602 | then { | |
597 | - | let | |
598 | - | if (( | |
603 | + | let bx = invoke(this, "addInterest", ["At8D6NFFpheCbvKVnjVoeLL84Eo8NZn6ovManxfLaFWL", (M("At8D6NFFpheCbvKVnjVoeLL84Eo8NZn6ovManxfLaFWL") - bk)], nil) | |
604 | + | if ((bx == bx)) | |
599 | 605 | then 2 | |
600 | 606 | else throw("Strict value is not equal to itself.") | |
601 | 607 | } | |
602 | 608 | else throw("Strict value is not equal to itself.") | |
603 | 609 | } | |
604 | 610 | else throw("Strict value is not equal to itself.") | |
605 | 611 | } | |
606 | 612 | else throw("Strict value is not equal to itself.") | |
607 | 613 | } | |
608 | 614 | else throw("Strict value is not equal to itself.") | |
609 | 615 | } | |
610 | 616 | else throw("Strict value is not equal to itself.") | |
611 | 617 | } | |
612 | 618 | else throw("Strict value is not equal to itself.") | |
613 | 619 | } | |
614 | 620 | else throw("Strict value is not equal to itself.") | |
615 | 621 | } | |
616 | 622 | else 1 | |
617 | 623 | } | |
618 | 624 | else 1 | |
619 | 625 | } | |
620 | 626 | else 0 | |
621 | 627 | } | |
622 | - | if (( | |
623 | - | then [IntegerEntry("autostake_amount_At8D6NFFpheCbvKVnjVoeLL84Eo8NZn6ovManxfLaFWL", ( | |
628 | + | if ((bm == bm)) | |
629 | + | then [IntegerEntry("autostake_amount_At8D6NFFpheCbvKVnjVoeLL84Eo8NZn6ovManxfLaFWL", (bj - ay))] | |
624 | 630 | else throw("Strict value is not equal to itself.") | |
625 | 631 | } | |
626 | 632 | else throw("Strict value is not equal to itself.") | |
627 | 633 | } | |
628 | 634 | else throw("Strict value is not equal to itself.") | |
629 | 635 | } | |
630 | 636 | else throw("Strict value is not equal to itself.") | |
631 | 637 | } | |
632 | 638 | else nil | |
633 | 639 | ||
634 | 640 | ||
635 | 641 | ||
636 | - | @Callable( | |
637 | - | func addInterest ( | |
642 | + | @Callable(aM) | |
643 | + | func addInterest (l,ay) = if ((aM.caller != this)) | |
638 | 644 | then throw("only for self invocation") | |
639 | 645 | else { | |
640 | - | let | |
641 | - | let | |
642 | - | let | |
643 | - | let | |
646 | + | let by = D(("autostake_lastEarned_" + l)) | |
647 | + | let bz = D(("autostake_lastBlock_" + l)) | |
648 | + | let bA = fraction(ay, 80, 100) | |
649 | + | let bB = if (if ((bz == height)) | |
644 | 650 | then true | |
645 | - | else ( | |
651 | + | else (ay == 0)) | |
646 | 652 | then nil | |
647 | - | else [IntegerEntry(("autostake_preLastEarned_" + | |
648 | - | ( | |
653 | + | else [IntegerEntry(("autostake_preLastEarned_" + l), by), IntegerEntry(("autostake_preLastBlock_" + l), bz), IntegerEntry(("autostake_lastEarned_" + l), (by + bA)), IntegerEntry(("autostake_lastBlock_" + l), height)] | |
654 | + | (bB ++ [IntegerEntry((l + "_sRate"), (D((l + "_sRate")) + fraction(p, bA, D(("total_supplied_" + l)))))]) | |
649 | 655 | } | |
650 | 656 | ||
651 | 657 | ||
652 | 658 | ||
653 | - | @Callable( | |
659 | + | @Callable(aM) | |
654 | 660 | func addInterestEXTERNAL () = { | |
655 | - | let | |
656 | - | let | |
657 | - | let | |
658 | - | let | |
659 | - | let | |
660 | - | let | |
661 | + | let ay = fraction(aM.payments[0].amount, 80, 100) | |
662 | + | let K = aM.payments[0].assetId | |
663 | + | let l = J(K) | |
664 | + | let by = D(("autostake_lastEarned_" + l)) | |
665 | + | let bz = D(("autostake_lastBlock_" + l)) | |
666 | + | let bB = if (if ((bz == height)) | |
661 | 667 | then true | |
662 | - | else ( | |
668 | + | else (ay == 0)) | |
663 | 669 | then nil | |
664 | - | else [IntegerEntry(("autostake_preLastEarned_" + | |
665 | - | ( | |
670 | + | else [IntegerEntry(("autostake_preLastEarned_" + l), by), IntegerEntry(("autostake_preLastBlock_" + l), bz), IntegerEntry(("autostake_lastEarned_" + l), (by + ay)), IntegerEntry(("autostake_lastBlock_" + l), height)] | |
671 | + | (bB ++ [IntegerEntry((l + "_sRate"), (D((l + "_sRate")) + fraction(p, ay, D(("total_supplied_" + l)))))]) | |
666 | 672 | } | |
667 | 673 | ||
668 | 674 | ||
669 | 675 | ||
670 | - | @Callable( | |
671 | - | func preInit ( | |
672 | - | func | |
676 | + | @Callable(aM) | |
677 | + | func preInit (bC,bD,bE,bF) = { | |
678 | + | func t (u,af) = (u ++ [IntegerEntry((af + "_bRate"), p), IntegerEntry((af + "_sRate"), p)]) | |
673 | 679 | ||
674 | - | if (( | |
680 | + | if ((aM.caller != this)) | |
675 | 681 | then throw("admin only") | |
676 | 682 | else { | |
677 | - | let | |
678 | - | let | |
679 | - | let | |
680 | - | let | |
681 | - | func | |
682 | - | then | |
683 | - | else | |
683 | + | let ai = { | |
684 | + | let w = split(bC, ",") | |
685 | + | let x = size(w) | |
686 | + | let y = nil | |
687 | + | func z (A,B) = if ((B >= x)) | |
688 | + | then A | |
689 | + | else t(A, w[B]) | |
684 | 690 | ||
685 | - | func | |
686 | - | then | |
691 | + | func C (A,B) = if ((B >= x)) | |
692 | + | then A | |
687 | 693 | else throw("List size exceeds 6") | |
688 | 694 | ||
689 | - | | |
695 | + | C(z(z(z(z(z(z(y, 0), 1), 2), 3), 4), 5), 6) | |
690 | 696 | } | |
691 | - | ([StringEntry("setup_tokens", | |
697 | + | ([StringEntry("setup_tokens", bC), StringEntry("setup_ltvs", bD), StringEntry("setup_lts", bE), StringEntry("setup_penalties", bF), BooleanEntry("setup_active", true)] ++ ai) | |
692 | 698 | } | |
693 | 699 | } | |
694 | 700 | ||
695 | 701 | ||
696 | 702 | ||
697 | - | @Callable( | |
698 | - | func initNewToken ( | |
703 | + | @Callable(aM) | |
704 | + | func initNewToken (af,bG,bH,bI) = if ((aM.caller != this)) | |
699 | 705 | then throw("admin only") | |
700 | - | else [StringEntry("setup_tokens", (( | |
706 | + | else [StringEntry("setup_tokens", ((H("setup_tokens") + ",") + af)), StringEntry("setup_ltvs", ((H("setup_ltvs") + ",") + bG)), StringEntry("setup_lts", ((H("setup_lts") + ",") + bH)), StringEntry("setup_penalties", ((H("setup_penalties") + ",") + bI)), IntegerEntry((af + "_bRate"), p), IntegerEntry((af + "_sRate"), p)] | |
701 | 707 | ||
702 | 708 | ||
703 | 709 | ||
704 | - | @Callable( | |
705 | - | func updateParameter ( | |
706 | - | then ( | |
710 | + | @Callable(aM) | |
711 | + | func updateParameter (E,bJ) = if (if ((aM.caller != this)) | |
712 | + | then (aM.caller != Address(base58'3P3o9cLTV2u9N4nYNKRYL6gy6cUEU9DwXW8')) | |
707 | 713 | else false) | |
708 | 714 | then throw("admin only") | |
709 | - | else [IntegerEntry( | |
715 | + | else [IntegerEntry(E, parseIntValue(bJ))] | |
710 | 716 | ||
711 | 717 | ||
712 | 718 | ||
713 | - | @Callable( | |
714 | - | func updateString ( | |
715 | - | then ( | |
719 | + | @Callable(aM) | |
720 | + | func updateString (E,bJ) = if (if ((aM.caller != this)) | |
721 | + | then (aM.caller != Address(base58'3P3o9cLTV2u9N4nYNKRYL6gy6cUEU9DwXW8')) | |
716 | 722 | else false) | |
717 | 723 | then throw("admin only") | |
718 | - | else [StringEntry( | |
724 | + | else [StringEntry(E, bJ)] | |
719 | 725 | ||
720 | 726 | ||
721 | 727 | ||
722 | - | @Callable( | |
723 | - | func claimToReserveFund ( | |
724 | - | let | |
725 | - | let | |
726 | - | let | |
727 | - | func | |
728 | - | then | |
728 | + | @Callable(aM) | |
729 | + | func claimToReserveFund (bK) = { | |
730 | + | let bL = N() | |
731 | + | let ai = ad(bL[0], "sRate")._2 | |
732 | + | let s = [0, 1, 2, 3, 4, 5] | |
733 | + | func t (u,bM) = if ((bM >= size(bL))) | |
734 | + | then u | |
729 | 735 | else { | |
730 | - | let | |
731 | - | let | |
732 | - | let | |
733 | - | then parseIntValue( | |
734 | - | else 0)) + fraction( | |
735 | - | let | |
736 | - | then invoke(this, "unstakeToken", [ | |
736 | + | let l = bL[bM] | |
737 | + | let bN = H(("autostake_amount_" + l)) | |
738 | + | let ay = ((((M(l) + D(("autostake_amount_" + l))) + (if ((bN != "")) | |
739 | + | then parseIntValue(bN) | |
740 | + | else 0)) + fraction(D(("total_borrowed_" + l)), ai[((bM * 3) + 1)].value, p)) - fraction(D(("total_supplied_" + l)), ai[(bM * 3)].value, p)) | |
741 | + | let bi = if ((D(("autostake_amount_" + l)) > 0)) | |
742 | + | then invoke(this, "unstakeToken", [l, max([ay, 0])], nil) | |
737 | 743 | else 0 | |
738 | - | if (( | |
739 | - | then ( | |
744 | + | if ((bi == bi)) | |
745 | + | then (u ++ [ay]) | |
740 | 746 | else throw("Strict value is not equal to itself.") | |
741 | 747 | } | |
742 | 748 | ||
743 | - | let | |
744 | - | let | |
745 | - | let | |
746 | - | let | |
747 | - | func | |
748 | - | then | |
749 | - | else | |
749 | + | let bO = { | |
750 | + | let w = s | |
751 | + | let x = size(w) | |
752 | + | let y = nil | |
753 | + | func z (A,B) = if ((B >= x)) | |
754 | + | then A | |
755 | + | else t(A, w[B]) | |
750 | 756 | ||
751 | - | func | |
752 | - | then | |
757 | + | func C (A,B) = if ((B >= x)) | |
758 | + | then A | |
753 | 759 | else throw("List size exceeds 6") | |
754 | 760 | ||
755 | - | | |
761 | + | C(z(z(z(z(z(z(y, 0), 1), 2), 3), 4), 5), 6) | |
756 | 762 | } | |
757 | - | func | |
758 | - | then | |
763 | + | func bP (u,bM) = if ((bM >= size(bL))) | |
764 | + | then u | |
759 | 765 | else { | |
760 | - | let | |
761 | - | ( | |
766 | + | let l = bL[bM] | |
767 | + | (u ++ [ScriptTransfer(a, max([bO[bM], 0]), L(l))]) | |
762 | 768 | } | |
763 | 769 | ||
764 | - | if ( | |
765 | - | then throw( | |
770 | + | if (bK) | |
771 | + | then throw(r(bO)) | |
766 | 772 | else $Tuple2({ | |
767 | - | let | |
768 | - | let | |
769 | - | let | |
770 | - | func | |
771 | - | then | |
772 | - | else | |
773 | + | let w = s | |
774 | + | let x = size(w) | |
775 | + | let y = nil | |
776 | + | func bQ (A,B) = if ((B >= x)) | |
777 | + | then A | |
778 | + | else bP(A, w[B]) | |
773 | 779 | ||
774 | - | func | |
775 | - | then | |
780 | + | func bR (A,B) = if ((B >= x)) | |
781 | + | then A | |
776 | 782 | else throw("List size exceeds 6") | |
777 | 783 | ||
778 | - | | |
779 | - | }, | |
784 | + | bR(bQ(bQ(bQ(bQ(bQ(bQ(y, 0), 1), 2), 3), 4), 5), 6) | |
785 | + | }, bO) | |
780 | 786 | } | |
781 | 787 | ||
782 | 788 | ||
783 | 789 | ||
784 | - | @Callable( | |
785 | - | func reSetup ( | |
786 | - | let | |
787 | - | if (( | |
790 | + | @Callable(aM) | |
791 | + | func reSetup (l) = { | |
792 | + | let bS = D("resetup_lastUpdate") | |
793 | + | if ((q > (height - bS))) | |
788 | 794 | then throw("can be updated only once per day") | |
789 | 795 | else { | |
790 | - | let | |
791 | - | let | |
792 | - | let | |
793 | - | let | |
794 | - | let | |
795 | - | if (( | |
796 | - | then [IntegerEntry((("setup_" + | |
797 | - | else if (if (( | |
798 | - | then (90000000 > | |
796 | + | let bE = split(H("setup_lts"), ",") | |
797 | + | let bL = N() | |
798 | + | let T = ah(l) | |
799 | + | let bT = D((("setup_" + l) + "_tempLT")) | |
800 | + | let bH = parseIntValue(bL[value(indexOf(bL, l))]) | |
801 | + | if ((T > 90000000)) | |
802 | + | then [IntegerEntry((("setup_" + l) + "_tempLT"), fraction(bT, 9975, 10000))] | |
803 | + | else if (if ((bH > bT)) | |
804 | + | then (90000000 > T) | |
799 | 805 | else false) | |
800 | - | then [IntegerEntry((("setup_" + | |
806 | + | then [IntegerEntry((("setup_" + l) + "_tempLT"), fraction(bT, 10025, 10000))] | |
801 | 807 | else nil | |
802 | 808 | } | |
803 | 809 | } | |
804 | 810 | ||
805 | 811 | ||
806 | 812 | ||
807 | - | @Callable( | |
808 | - | func shutdown ( | |
813 | + | @Callable(aM) | |
814 | + | func shutdown (bU) = if ((indexOf(h, aM.caller.bytes) == unit)) | |
809 | 815 | then throw("user not in a whitelist") | |
810 | - | else [BooleanEntry("setup_active", !( | |
816 | + | else [BooleanEntry("setup_active", !(bU))] | |
811 | 817 | ||
812 | 818 | ||
813 | 819 | ||
814 | - | @Callable( | |
815 | - | func liquidate ( | |
820 | + | @Callable(aM) | |
821 | + | func liquidate (bK,j,au,aO,aP,bV) = if (!(i(aM.caller))) | |
816 | 822 | then throw("temporarily available for whitelist only") | |
817 | - | else if (!( | |
823 | + | else if (!(G("setup_active"))) | |
818 | 824 | then throw("market is stopped") | |
819 | 825 | else { | |
820 | - | let | |
821 | - | if (( | |
826 | + | let bW = aq(j) | |
827 | + | if ((bW == bW)) | |
822 | 828 | then { | |
823 | - | let bV = ab(aM, "sRate") | |
824 | - | let au = bV._1 | |
825 | - | let bW = bV._2 | |
826 | - | let bX = ab(aN, "bRate") | |
827 | - | let aE = bX._1 | |
829 | + | let bX = ad(aO, "sRate") | |
830 | + | let aw = bX._1 | |
828 | 831 | let bY = bX._2 | |
829 | - | let bZ = fraction(as, n, au) | |
830 | - | let ca = B(((h + "_supplied_") + aM)) | |
831 | - | let cb = B(((h + "_borrowed_") + aN)) | |
832 | - | let cc = if ((cb > 0)) | |
833 | - | then cb | |
832 | + | let bZ = ad(aP, "bRate") | |
833 | + | let aG = bZ._1 | |
834 | + | let ca = bZ._2 | |
835 | + | let cb = fraction(au, p, aw) | |
836 | + | let cc = D(((j + "_supplied_") + aO)) | |
837 | + | let cd = D(((j + "_borrowed_") + aP)) | |
838 | + | let ce = if ((cd > 0)) | |
839 | + | then cd | |
834 | 840 | else throw("user has no borrow in this token") | |
835 | - | if (( | |
841 | + | if ((bW > 0)) | |
836 | 842 | then throw("user can't be liquidated") | |
837 | - | else if (( | |
843 | + | else if ((cb > cc)) | |
838 | 844 | then throw("position to liquidate is bigger than user's supply") | |
839 | 845 | else { | |
840 | - | let | |
841 | - | if (( | |
846 | + | let cf = M(aO) | |
847 | + | if ((cf == cf)) | |
842 | 848 | then { | |
843 | - | let | |
844 | - | if (( | |
849 | + | let cg = M(aP) | |
850 | + | if ((cg == cg)) | |
845 | 851 | then { | |
846 | - | let | |
847 | - | if (( | |
852 | + | let ch = invoke(f, "swap", [bV, 0], [AttachedPayment(L(aO), au)]) | |
853 | + | if ((ch == ch)) | |
848 | 854 | then { | |
849 | - | let | |
850 | - | if (( | |
855 | + | let ci = (cf - M(aO)) | |
856 | + | if ((ci == ci)) | |
851 | 857 | then { | |
852 | - | let | |
853 | - | if (( | |
858 | + | let cj = (M(aP) - cg) | |
859 | + | if ((cj == cj)) | |
854 | 860 | then { | |
855 | - | let | |
856 | - | let | |
857 | - | let | |
858 | - | let | |
859 | - | let | |
860 | - | let | |
861 | - | let | |
862 | - | let | |
863 | - | let | |
864 | - | let | |
865 | - | if (( | |
861 | + | let ck = ak(aO)._1 | |
862 | + | let cl = ao(aO) | |
863 | + | let cm = fraction(ci, ck, cl) | |
864 | + | let cn = ak(aP)._2 | |
865 | + | let co = ao(aP) | |
866 | + | let cp = fraction(cj, cn, co) | |
867 | + | let bI = parseIntValue(split(H("setup_penalties"), ",")[value(indexOf(N(), aP))]) | |
868 | + | let cq = (cp - fraction(cm, (n - bI), n)) | |
869 | + | let cr = fraction(ci, p, aw) | |
870 | + | let cs = fraction(fraction(cj, p, aG), (n - fraction(cq, n, cp)), n) | |
871 | + | if ((ci > au)) | |
866 | 872 | then throw("more assets exchanged than expected") | |
867 | - | else if ((0 > | |
873 | + | else if ((0 > cq)) | |
868 | 874 | then throw("price impact is bigger than liquidation penalty") | |
869 | - | else [IntegerEntry((( | |
875 | + | else [IntegerEntry(((j + "_supplied_") + aO), (cc - cr)), IntegerEntry(((j + "_borrowed_") + aP), (ce - cs)), IntegerEntry(("total_supplied_" + aO), (D(("total_supplied_" + aO)) - cr)), IntegerEntry(("total_borrowed_" + aP), (D(("total_borrowed_" + aP)) - cs))] | |
870 | 876 | } | |
871 | 877 | else throw("Strict value is not equal to itself.") | |
872 | 878 | } | |
873 | 879 | else throw("Strict value is not equal to itself.") | |
874 | 880 | } | |
875 | 881 | else throw("Strict value is not equal to itself.") | |
876 | 882 | } | |
877 | 883 | else throw("Strict value is not equal to itself.") | |
878 | 884 | } | |
879 | 885 | else throw("Strict value is not equal to itself.") | |
880 | 886 | } | |
881 | 887 | } | |
882 | 888 | else throw("Strict value is not equal to itself.") | |
883 | 889 | } | |
884 | 890 | ||
885 | 891 | ||
886 | 892 | ||
887 | - | @Callable( | |
888 | - | func liquidateV2 ( | |
893 | + | @Callable(aM) | |
894 | + | func liquidateV2 (bK,j,aO) = if (!(i(aM.caller))) | |
889 | 895 | then throw("temporarily available for whitelist only") | |
890 | - | else if (!( | |
896 | + | else if (!(G("setup_active"))) | |
891 | 897 | then throw("market is stopped") | |
892 | 898 | else { | |
893 | - | let | |
894 | - | let | |
895 | - | let | |
896 | - | let | |
897 | - | if (( | |
898 | - | then if (( | |
899 | + | let aV = aM.payments[0].assetId | |
900 | + | let aP = J(aV) | |
901 | + | let ct = aM.payments[0].amount | |
902 | + | let bW = aq(j) | |
903 | + | if ((bW == bW)) | |
904 | + | then if ((bW > 0)) | |
899 | 905 | then throw("user can't be liquidated") | |
900 | 906 | else { | |
901 | - | let cs = L() | |
902 | - | let ct = value(indexOf(cs, aN)) | |
903 | - | let cu = value(indexOf(cs, aM)) | |
904 | - | let cv = ab(aN, "bRate") | |
905 | - | let aE = cv._1 | |
906 | - | let bW = cv._2 | |
907 | - | let cl = ai(aN)._2 | |
908 | - | let cm = am(aN) | |
909 | - | let cw = fraction(cr, cl, cm) | |
910 | - | let bG = parseIntValue(value(split(F("setup_penalties"), ",")[ct])) | |
911 | - | let ci = ai(aM)._1 | |
912 | - | let cj = am(aM) | |
913 | - | let cx = fraction(cw, (l + bG), l) | |
914 | - | let bZ = fraction(cx, cj, ci) | |
915 | - | let aO = fraction(cr, n, aE) | |
916 | - | let aV = fraction(bZ, n, bW[((cu * 3) + 1)].value) | |
917 | - | let ca = B(((h + "_supplied_") + aM)) | |
918 | - | let cb = B(((h + "_borrowed_") + aN)) | |
919 | - | let cc = if ((cb > 0)) | |
920 | - | then cb | |
921 | - | else throw("user has no borrow in this token") | |
922 | - | if ((aV > ca)) | |
923 | - | then throw("position to liquidate is bigger than user's supply") | |
924 | - | else if (bI) | |
925 | - | then throw("liquidation will pass") | |
926 | - | else ([ScriptTransfer(aK.caller, bZ, J(aM)), IntegerEntry(((h + "_supplied_") + aM), (ca - aV)), IntegerEntry(((h + "_borrowed_") + aN), (cc - aO)), IntegerEntry(("total_supplied_" + aM), (B(("total_supplied_" + aM)) - aV)), IntegerEntry(("total_borrowed_" + aN), (B(("total_borrowed_" + aN)) - aO))] ++ bW) | |
907 | + | let cu = N() | |
908 | + | let cv = value(indexOf(cu, aP)) | |
909 | + | let cw = value(indexOf(cu, aO)) | |
910 | + | let cx = ad(aP, "bRate") | |
911 | + | let aG = cx._1 | |
912 | + | let bY = cx._2 | |
913 | + | let cn = ak(aP)._2 | |
914 | + | let co = ao(aP) | |
915 | + | let cy = fraction(ct, cn, co) | |
916 | + | let bI = parseIntValue(value(split(H("setup_penalties"), ",")[cv])) | |
917 | + | let ck = ak(aO)._1 | |
918 | + | let cl = ao(aO) | |
919 | + | let cz = fraction(cy, (n + bI), n) | |
920 | + | let cb = fraction(cz, cl, ck) | |
921 | + | let aQ = fraction(ct, p, aG) | |
922 | + | let aX = fraction(cb, p, bY[((cw * 3) + 1)].value) | |
923 | + | let bi = if ((indexOf(e, aO) != unit)) | |
924 | + | then { | |
925 | + | let cA = split(j, "_")[1] | |
926 | + | let cB = split(j, "_")[0] | |
927 | + | reentrantInvoke(d, "liquidate", [cB, cA, aX], nil) | |
928 | + | } | |
929 | + | else nil | |
930 | + | if ((bi == bi)) | |
931 | + | then { | |
932 | + | let cc = D(((j + "_supplied_") + aO)) | |
933 | + | let cd = D(((j + "_borrowed_") + aP)) | |
934 | + | let ce = if ((cd > 0)) | |
935 | + | then cd | |
936 | + | else throw("user has no borrow in this token") | |
937 | + | if ((aX > cc)) | |
938 | + | then throw("position to liquidate is bigger than user's supply") | |
939 | + | else if (bK) | |
940 | + | then throw("liquidation will pass") | |
941 | + | else ([ScriptTransfer(aM.caller, cb, L(aO)), IntegerEntry(((j + "_supplied_") + aO), (cc - aX)), IntegerEntry(((j + "_borrowed_") + aP), (ce - aQ)), IntegerEntry(("total_supplied_" + aO), (D(("total_supplied_" + aO)) - aX)), IntegerEntry(("total_borrowed_" + aP), (D(("total_borrowed_" + aP)) - aQ))] ++ bY) | |
942 | + | } | |
943 | + | else throw("Strict value is not equal to itself.") | |
927 | 944 | } | |
928 | 945 | else throw("Strict value is not equal to itself.") | |
929 | 946 | } | |
930 | 947 | ||
931 | 948 | ||
932 | 949 | ||
933 | - | @Callable( | |
934 | - | func getUserCollateral ( | |
935 | - | let | |
936 | - | let | |
937 | - | let | |
938 | - | let | |
939 | - | let | |
940 | - | func | |
941 | - | then | |
950 | + | @Callable(aM) | |
951 | + | func getUserCollateral (bK,j,cC,cD) = { | |
952 | + | let bL = N() | |
953 | + | let bD = split(H("setup_ltvs"), ",") | |
954 | + | let bE = split(H("setup_lts"), ",") | |
955 | + | let ai = ad(bL[0], "sRate")._2 | |
956 | + | let cE = split(cD, ",") | |
957 | + | func t (u,v) = if ((v >= size(bL))) | |
958 | + | then u | |
942 | 959 | else { | |
943 | - | let | |
944 | - | let | |
945 | - | let | |
946 | - | then if (if (( | |
960 | + | let cF = D(((j + "_supplied_") + bL[v])) | |
961 | + | let cG = D(((j + "_borrowed_") + bL[v])) | |
962 | + | let cH = if ((cD == "")) | |
963 | + | then if (if ((cG != 0)) | |
947 | 964 | then true | |
948 | - | else ( | |
965 | + | else (cF != 0)) | |
949 | 966 | then true | |
950 | 967 | else false | |
951 | 968 | else true | |
952 | - | if ( | |
969 | + | if (cH) | |
953 | 970 | then { | |
954 | - | let | |
955 | - | let | |
956 | - | (( | |
957 | - | then ( | |
971 | + | let aC = ao(bL[v]) | |
972 | + | let aA = ak(bL[v]) | |
973 | + | ((u + fraction(fraction(fraction((cF + (if (if (if ((cD != "")) | |
974 | + | then (cE[0] == bL[v]) | |
958 | 975 | else false) | |
959 | - | then ( | |
976 | + | then (cE[1] == "supplied") | |
960 | 977 | else false) | |
961 | - | then parseIntValue( | |
962 | - | else 0)), | |
963 | - | then fraction(fraction(fraction(( | |
964 | - | then ( | |
978 | + | then parseIntValue(cE[2]) | |
979 | + | else 0)), ai[(v * 3)].value, p), parseIntValue(bD[v]), n), aA._1, aC)) - (if (cC) | |
980 | + | then fraction(fraction(fraction((cG + (if (if (if ((cD != "")) | |
981 | + | then (cE[0] == bL[v]) | |
965 | 982 | else false) | |
966 | - | then ( | |
983 | + | then (cE[1] == "borrowed") | |
967 | 984 | else false) | |
968 | - | then parseIntValue( | |
969 | - | else 0)), | |
985 | + | then parseIntValue(cE[2]) | |
986 | + | else 0)), ai[((v * 3) + 1)].value, p), n, parseIntValue(bE[v])), aA._2, aC) | |
970 | 987 | else 0)) | |
971 | 988 | } | |
972 | - | else | |
989 | + | else u | |
973 | 990 | } | |
974 | 991 | ||
975 | - | let | |
976 | - | let | |
977 | - | let | |
978 | - | let | |
979 | - | func | |
980 | - | then | |
981 | - | else | |
992 | + | let cI = { | |
993 | + | let w = [0, 1, 2, 3, 4, 5] | |
994 | + | let x = size(w) | |
995 | + | let y = 0 | |
996 | + | func z (A,B) = if ((B >= x)) | |
997 | + | then A | |
998 | + | else t(A, w[B]) | |
982 | 999 | ||
983 | - | func | |
984 | - | then | |
1000 | + | func C (A,B) = if ((B >= x)) | |
1001 | + | then A | |
985 | 1002 | else throw("List size exceeds 6") | |
986 | 1003 | ||
987 | - | | |
1004 | + | C(z(z(z(z(z(z(y, 0), 1), 2), 3), 4), 5), 6) | |
988 | 1005 | } | |
989 | - | if ( | |
990 | - | then throw(toString( | |
991 | - | else $Tuple2(nil, | |
1006 | + | if (bK) | |
1007 | + | then throw(toString(cI)) | |
1008 | + | else $Tuple2(nil, cI) | |
992 | 1009 | } | |
993 | 1010 | ||
994 | 1011 | ||
995 | 1012 | ||
996 | - | @Callable( | |
997 | - | func getAssetDebt ( | |
998 | - | let | |
999 | - | let | |
1000 | - | let | |
1001 | - | let | |
1002 | - | if ( | |
1003 | - | then throw(toString( | |
1004 | - | else $Tuple2(nil, | |
1013 | + | @Callable(aM) | |
1014 | + | func getAssetDebt (bK,j,l) = { | |
1015 | + | let cG = D(((j + "_borrowed_") + l)) | |
1016 | + | let aC = ao(l) | |
1017 | + | let V = ad(l, "bRate")._1 | |
1018 | + | let cI = fraction(cG, V, p) | |
1019 | + | if (bK) | |
1020 | + | then throw(toString(cI)) | |
1021 | + | else $Tuple2(nil, cI) | |
1005 | 1022 | } | |
1006 | 1023 | ||
1007 | 1024 | ||
1008 | 1025 | ||
1009 | - | @Callable( | |
1010 | - | func getPrices ( | |
1011 | - | let | |
1012 | - | func | |
1013 | - | then | |
1026 | + | @Callable(aM) | |
1027 | + | func getPrices (bK) = { | |
1028 | + | let bL = N() | |
1029 | + | func t (u,v) = if ((v >= size(bL))) | |
1030 | + | then u | |
1014 | 1031 | else { | |
1015 | - | let | |
1016 | - | (((( | |
1032 | + | let aA = ak(bL[v]) | |
1033 | + | ((((u + toString(aA._1)) + ",") + toString(aA._2)) + "|") | |
1017 | 1034 | } | |
1018 | 1035 | ||
1019 | - | let | |
1020 | - | let | |
1021 | - | let | |
1022 | - | let | |
1023 | - | func | |
1024 | - | then | |
1025 | - | else | |
1036 | + | let cI = { | |
1037 | + | let w = [0, 1, 2, 3, 4, 5] | |
1038 | + | let x = size(w) | |
1039 | + | let y = "" | |
1040 | + | func z (A,B) = if ((B >= x)) | |
1041 | + | then A | |
1042 | + | else t(A, w[B]) | |
1026 | 1043 | ||
1027 | - | func | |
1028 | - | then | |
1044 | + | func C (A,B) = if ((B >= x)) | |
1045 | + | then A | |
1029 | 1046 | else throw("List size exceeds 6") | |
1030 | 1047 | ||
1031 | - | | |
1048 | + | C(z(z(z(z(z(z(y, 0), 1), 2), 3), 4), 5), 6) | |
1032 | 1049 | } | |
1033 | - | if ( | |
1034 | - | then throw( | |
1035 | - | else $Tuple2(nil, | |
1050 | + | if (bK) | |
1051 | + | then throw(cI) | |
1052 | + | else $Tuple2(nil, cI) | |
1036 | 1053 | } | |
1037 | 1054 | ||
1038 | 1055 | ||
1039 | 1056 | ||
1040 | - | @Callable( | |
1041 | - | func calculateUtilizationRatio ( | |
1042 | - | then throw(toString( | |
1043 | - | else $Tuple2(nil, | |
1057 | + | @Callable(aM) | |
1058 | + | func calculateUtilizationRatio (l,bK) = if (bK) | |
1059 | + | then throw(toString(ah(l))) | |
1060 | + | else $Tuple2(nil, ah(l)) | |
1044 | 1061 | ||
1045 | 1062 | ||
1046 | 1063 | ||
1047 | - | @Callable( | |
1048 | - | func calculateOutdatedUR ( | |
1049 | - | then throw(toString( | |
1050 | - | else $Tuple2(nil, | |
1064 | + | @Callable(aM) | |
1065 | + | func calculateOutdatedUR (l,bK) = if (bK) | |
1066 | + | then throw(toString(Q(l))) | |
1067 | + | else $Tuple2(nil, Q(l)) | |
1051 | 1068 | ||
1052 | 1069 | ||
1053 | 1070 | ||
1054 | - | @Callable( | |
1055 | - | func calculateTokenRates ( | |
1056 | - | func | |
1057 | - | let | |
1058 | - | $Tuple2((((( | |
1071 | + | @Callable(aM) | |
1072 | + | func calculateTokenRates (bK) = { | |
1073 | + | func t (u,l) = { | |
1074 | + | let ai = W(l) | |
1075 | + | $Tuple2(((((u._1 + toString(ai[1].value)) + "|") + toString(ai[0].value)) + ","), (u._2 ++ ai)) | |
1059 | 1076 | } | |
1060 | 1077 | ||
1061 | - | let | |
1062 | - | let | |
1063 | - | let | |
1064 | - | let | |
1065 | - | func | |
1066 | - | then | |
1067 | - | else | |
1078 | + | let bO = { | |
1079 | + | let w = N() | |
1080 | + | let x = size(w) | |
1081 | + | let y = $Tuple2("", nil) | |
1082 | + | func z (A,B) = if ((B >= x)) | |
1083 | + | then A | |
1084 | + | else t(A, w[B]) | |
1068 | 1085 | ||
1069 | - | func | |
1070 | - | then | |
1086 | + | func C (A,B) = if ((B >= x)) | |
1087 | + | then A | |
1071 | 1088 | else throw("List size exceeds 6") | |
1072 | 1089 | ||
1073 | - | | |
1090 | + | C(z(z(z(z(z(z(y, 0), 1), 2), 3), 4), 5), 6) | |
1074 | 1091 | } | |
1075 | - | if ( | |
1076 | - | then throw( | |
1077 | - | else $Tuple2( | |
1092 | + | if (bK) | |
1093 | + | then throw(bO._1) | |
1094 | + | else $Tuple2(bO._2, bO._1) | |
1078 | 1095 | } | |
1079 | 1096 | ||
1080 | 1097 | ||
1081 | 1098 | ||
1082 | - | @Callable( | |
1083 | - | func calculateTokensInterest ( | |
1084 | - | func | |
1085 | - | let | |
1086 | - | (( | |
1099 | + | @Callable(aM) | |
1100 | + | func calculateTokensInterest (bK) = { | |
1101 | + | func t (u,l) = { | |
1102 | + | let V = fraction(S(l), q, n) | |
1103 | + | ((u + toString(V)) + ",") | |
1087 | 1104 | } | |
1088 | 1105 | ||
1089 | - | let | |
1090 | - | let | |
1091 | - | let | |
1092 | - | let | |
1093 | - | func | |
1094 | - | then | |
1095 | - | else | |
1106 | + | let bO = { | |
1107 | + | let w = N() | |
1108 | + | let x = size(w) | |
1109 | + | let y = "" | |
1110 | + | func z (A,B) = if ((B >= x)) | |
1111 | + | then A | |
1112 | + | else t(A, w[B]) | |
1096 | 1113 | ||
1097 | - | func | |
1098 | - | then | |
1114 | + | func C (A,B) = if ((B >= x)) | |
1115 | + | then A | |
1099 | 1116 | else throw("List size exceeds 6") | |
1100 | 1117 | ||
1101 | - | | |
1118 | + | C(z(z(z(z(z(z(y, 0), 1), 2), 3), 4), 5), 6) | |
1102 | 1119 | } | |
1103 | - | if ( | |
1104 | - | then throw( | |
1105 | - | else $Tuple2(nil, | |
1120 | + | if (bK) | |
1121 | + | then throw(bO) | |
1122 | + | else $Tuple2(nil, bO) | |
1106 | 1123 | } | |
1107 | 1124 | ||
1108 | 1125 | ||
1109 | - | @Verifier( | |
1110 | - | func | |
1126 | + | @Verifier(cJ) | |
1127 | + | func cK () = sigVerify(cJ.bodyBytes, cJ.proofs[0], cJ.senderPublicKey) | |
1111 | 1128 |
github/deemru/w8io/169f3d6 436.52 ms ◑