tx · 78SWcrSAJ4UJ9c5HLKYZGZu9CB7ShxdWBqDWi8jSjvHq 3MuzRcW6fRnqCC76KgKznZP68qsWB1J6shn: -0.07500000 Waves 2023.02.19 14:09 [2456432] smart account 3MuzRcW6fRnqCC76KgKznZP68qsWB1J6shn > SELF 0.00000000 Waves
{ "type": 13, "id": "78SWcrSAJ4UJ9c5HLKYZGZu9CB7ShxdWBqDWi8jSjvHq", "fee": 7500000, "feeAssetId": null, "timestamp": 1676805010430, "version": 2, "chainId": 84, "sender": "3MuzRcW6fRnqCC76KgKznZP68qsWB1J6shn", "senderPublicKey": "EjNbd48ENcnJ4wjBkASdYJHavM8QHrAbFDbJ46ffyUcU", "proofs": [ "5RTe5ZspHRU5HhbBmEhmFoetvg2NRUW2Zx2zeQjzBHg9CxcXt14M2T67TSBfCFwnFEnm78uU2tNxtindd8kvbtAS" ], "script": "base64:BgJ0CAISABIAEgASABIDCgEBEgMKAQESEAoOAQEBAQEBAQEBAQEBAQESFQoTAQEBAQEBAQgICAEBAQEBAQEBARIGCgQBAQEIEgASAwoBARIFCgMBAQQSAwoBCBIAEgASABIDCgEIEgMKAQESABIAEgASBAoCCAi5AQAMa19iYXNlT3JhY2xlAgxrX2Jhc2VPcmFjbGUADWtfcXVvdGVPcmFjbGUCDWtfcXVvdGVPcmFjbGUACWtfYmFsYW5jZQIJa19iYWxhbmNlAAprX3NlcXVlbmNlAgprX3NlcXVlbmNlAA5rX3Bvc2l0aW9uU2l6ZQIOa19wb3NpdGlvblNpemUAEGtfcG9zaXRpb25NYXJnaW4CEGtfcG9zaXRpb25NYXJnaW4AFmtfcG9zaXRpb25PcGVuTm90aW9uYWwCFmtfcG9zaXRpb25PcGVuTm90aW9uYWwALmtfcG9zaXRpb25MYXN0VXBkYXRlZEN1bXVsYXRpdmVQcmVtaXVtRnJhY3Rpb24CEmtfcG9zaXRpb25GcmFjdGlvbgASa19wb3NpdGlvblNlcXVlbmNlAhJrX3Bvc2l0aW9uU2VxdWVuY2UAD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Wx1ZQEFDmNvb3JkaW5hdG9yU3RyBQ9rX2FkbWluX2FkZHJlc3MDCQEJaXNEZWZpbmVkAQUFYWRtaW4JAQt2YWx1ZU9yRWxzZQIJAJsIAgkBEUBleHRyTmF0aXZlKDEwNjIpAQkBBXZhbHVlAQUFYWRtaW4JAKwCAgkArAICCQCsAgICB3N0YXR1c18JAKUIAQUEdGhpcwIBXwkA2AQBCAUCdHgCaWQHCQACAQIudW5hYmxlIHRvIHZlcmlmeTogYWRtaW4gbm90IHNldCBpbiBjb29yZGluYXRvcgkA9AMDCAUCdHgJYm9keUJ5dGVzCQCRAwIIBQJ0eAZwcm9vZnMAAAgFAnR4D3NlbmRlclB1YmxpY0tleWuClq8=", "height": 2456432, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: EaEhcyWbSqpTnKwemrq93WxNfUqkNDBew1Gk9oZH8FHp Next: 5ZRYXQTdiyFXSxtvpq1MceAw1Eqf2z6Kd6BWHJB7ZHz1 Diff:
Old | New | Differences | |
---|---|---|---|
59 | 59 | ||
60 | 60 | let C = "k_fundingMode" | |
61 | 61 | ||
62 | - | let D = "k_ | |
62 | + | let D = "k_latestLongPremiumFraction" | |
63 | 63 | ||
64 | - | let E = "k_ | |
64 | + | let E = "k_latestShortPremiumFraction" | |
65 | 65 | ||
66 | - | let F = "k_ | |
66 | + | let F = "k_nextFundingBlockMinTimestamp" | |
67 | 67 | ||
68 | - | let G = "k_ | |
68 | + | let G = "k_longFundingRate" | |
69 | 69 | ||
70 | - | let H = "k_ | |
70 | + | let H = "k_shortFundingRate" | |
71 | 71 | ||
72 | - | let I = "k_ | |
72 | + | let I = "k_qtAstR" | |
73 | 73 | ||
74 | - | let J = "k_ | |
74 | + | let J = "k_bsAstR" | |
75 | 75 | ||
76 | - | let K = "k_ | |
76 | + | let K = "k_qtAstW" | |
77 | 77 | ||
78 | - | let L = "k_ | |
78 | + | let L = "k_bsAstW" | |
79 | 79 | ||
80 | - | let M = "k_ | |
80 | + | let M = "k_totalPositionSize" | |
81 | 81 | ||
82 | - | let N = "k_ | |
82 | + | let N = "k_totalLongPositionSize" | |
83 | 83 | ||
84 | - | let O = "k_ | |
84 | + | let O = "k_totalShortPositionSize" | |
85 | 85 | ||
86 | - | let P = "k_ | |
86 | + | let P = "k_openInterestNotional" | |
87 | 87 | ||
88 | - | let Q = "k_ | |
88 | + | let Q = "k_openInterestShort" | |
89 | 89 | ||
90 | - | let R = "k_ | |
90 | + | let R = "k_openInterestLong" | |
91 | 91 | ||
92 | - | let S = "k_ | |
92 | + | let S = "k_lastTx" | |
93 | 93 | ||
94 | - | let T = "k_ | |
94 | + | let T = "k_coordinatorAddress" | |
95 | 95 | ||
96 | - | let U = "k_ | |
96 | + | let U = "k_vault_address" | |
97 | 97 | ||
98 | - | let V = "k_ | |
98 | + | let V = "k_admin_address" | |
99 | 99 | ||
100 | - | let W = "k_ | |
100 | + | let W = "k_quote_asset" | |
101 | 101 | ||
102 | - | let X = "k_ | |
102 | + | let X = "k_quote_staking" | |
103 | 103 | ||
104 | - | let Y = "k_ | |
104 | + | let Y = "k_staking_address" | |
105 | 105 | ||
106 | - | let Z = "k_ | |
106 | + | let Z = "k_miner_address" | |
107 | 107 | ||
108 | - | let aa = "k_ | |
108 | + | let aa = "k_orders_address" | |
109 | 109 | ||
110 | - | let ab = "k_ | |
110 | + | let ab = "k_referral_address" | |
111 | 111 | ||
112 | - | let ac = "k_ | |
112 | + | let ac = "k_exchange_address" | |
113 | 113 | ||
114 | - | let ad = "k_ | |
114 | + | let ad = "k_nft_manager_address" | |
115 | 115 | ||
116 | - | let ae = "k_miner_address" | |
117 | - | ||
118 | - | let af = "k_orders_address" | |
119 | - | ||
120 | - | let ag = "k_referral_address" | |
121 | - | ||
122 | - | let ah = "k_exchange_address" | |
123 | - | ||
124 | - | let ai = "k_nft_manager_address" | |
125 | - | ||
126 | - | func aj (ak,al) = ((ak + "_") + al) | |
116 | + | func ae (af,ag) = ((af + "_") + ag) | |
127 | 117 | ||
128 | 118 | ||
129 | - | func | |
119 | + | func ah () = valueOrErrorMessage(addressFromString(getStringValue(this, T)), "Coordinator not set") | |
130 | 120 | ||
131 | 121 | ||
132 | - | func | |
122 | + | func ai () = addressFromString(getStringValue(ah(), V)) | |
133 | 123 | ||
134 | 124 | ||
135 | - | func | |
125 | + | func aj () = fromBase58String(getStringValue(ah(), W)) | |
136 | 126 | ||
137 | 127 | ||
138 | - | func | |
128 | + | func ak () = valueOrErrorMessage(addressFromString(getStringValue(ah(), X)), "Quote asset staking not set") | |
139 | 129 | ||
140 | 130 | ||
141 | - | func | |
131 | + | func al () = valueOrErrorMessage(addressFromString(getStringValue(ah(), Y)), "Staking not set") | |
142 | 132 | ||
143 | 133 | ||
144 | - | func | |
134 | + | func am () = valueOrErrorMessage(addressFromString(getStringValue(ah(), U)), "Vault not set") | |
145 | 135 | ||
146 | 136 | ||
147 | - | func | |
137 | + | func an () = valueOrErrorMessage(addressFromString(getStringValue(ah(), Z)), "Miner not set") | |
148 | 138 | ||
149 | 139 | ||
150 | - | func | |
140 | + | func ao () = valueOrErrorMessage(addressFromString(getStringValue(ah(), aa)), "Orders not set") | |
151 | 141 | ||
152 | 142 | ||
153 | - | func | |
143 | + | func ap () = valueOrErrorMessage(addressFromString(getStringValue(ah(), ab)), "Referral not set") | |
154 | 144 | ||
155 | 145 | ||
156 | - | func | |
146 | + | func aq () = valueOrErrorMessage(addressFromString(getStringValue(ah(), ad)), "NFT Manager not set") | |
157 | 147 | ||
158 | 148 | ||
159 | - | let | |
149 | + | let ar = "k_token_param" | |
160 | 150 | ||
161 | - | let | |
151 | + | let as = "k_token_type" | |
162 | 152 | ||
163 | - | let | |
153 | + | let at = "fee_reduction" | |
164 | 154 | ||
165 | - | let | |
155 | + | let au = 1 | |
166 | 156 | ||
167 | - | let | |
157 | + | let av = 2 | |
168 | 158 | ||
169 | - | let | |
159 | + | let aw = 15 | |
170 | 160 | ||
171 | - | let | |
161 | + | let ax = 1000 | |
172 | 162 | ||
173 | - | let | |
163 | + | let ay = 6 | |
174 | 164 | ||
175 | - | let | |
165 | + | let az = (1 * (((((10 * 10) * 10) * 10) * 10) * 10)) | |
176 | 166 | ||
177 | - | let | |
167 | + | let aA = (525600 * az) | |
178 | 168 | ||
179 | - | let | |
169 | + | let aB = (86400 * az) | |
180 | 170 | ||
181 | - | let | |
171 | + | let aC = 1 | |
182 | 172 | ||
183 | - | let | |
173 | + | let aD = 2 | |
184 | 174 | ||
185 | - | let | |
175 | + | let aE = 1 | |
186 | 176 | ||
187 | - | let | |
177 | + | let aF = 2 | |
188 | 178 | ||
189 | - | func | |
179 | + | func aG (aH) = (toString(aH) + ",") | |
190 | 180 | ||
191 | 181 | ||
192 | - | func | |
182 | + | func aI (aH,aJ) = fraction(aH, az, aJ, HALFEVEN) | |
193 | 183 | ||
194 | 184 | ||
195 | - | func | |
185 | + | func aK (aH,aJ) = fraction(aH, aJ, az, HALFEVEN) | |
196 | 186 | ||
197 | 187 | ||
198 | - | func | |
188 | + | func aL (aH,aJ) = fraction(aH, toBigInt(az), aJ, HALFEVEN) | |
199 | 189 | ||
200 | 190 | ||
201 | - | func | |
191 | + | func aM (aH,aJ) = fraction(aH, aJ, toBigInt(az), HALFEVEN) | |
202 | 192 | ||
203 | 193 | ||
204 | - | func | |
205 | - | then | |
206 | - | else -( | |
194 | + | func aN (aH) = if ((aH > 0)) | |
195 | + | then aH | |
196 | + | else -(aH) | |
207 | 197 | ||
208 | 198 | ||
209 | - | func | |
210 | - | then | |
211 | - | else | |
199 | + | func aO (aH,aJ) = if ((aH >= aJ)) | |
200 | + | then aH | |
201 | + | else aJ | |
212 | 202 | ||
213 | 203 | ||
214 | - | func | |
204 | + | func aP (aQ) = if ((size(aQ) == 0)) | |
215 | 205 | then "" | |
216 | - | else makeString( | |
206 | + | else makeString(aQ, ",") | |
217 | 207 | ||
218 | 208 | ||
219 | - | func | |
209 | + | func aR (aS) = if ((aS == "")) | |
220 | 210 | then nil | |
221 | - | else split( | |
211 | + | else split(aS, ",") | |
222 | 212 | ||
223 | 213 | ||
224 | - | func | |
225 | - | then (removeByIndex( | |
226 | - | else ( | |
214 | + | func aT (aQ,aU,aV) = if ((size(aQ) > aU)) | |
215 | + | then (removeByIndex(aQ, 0) :+ aV) | |
216 | + | else (aQ :+ aV) | |
227 | 217 | ||
228 | 218 | ||
229 | - | func | |
219 | + | func aW (aX) = valueOrErrorMessage(getInteger(this, aX), ("no value for " + aX)) | |
230 | 220 | ||
231 | 221 | ||
232 | - | func | |
222 | + | func aY (aX,aZ) = valueOrElse(getInteger(this, aX), aZ) | |
233 | 223 | ||
234 | 224 | ||
235 | - | func | |
236 | - | let | |
237 | - | | |
225 | + | func ba (ag,af) = { | |
226 | + | let bb = valueOrErrorMessage(getString(ag, af), ("No value for key " + af)) | |
227 | + | bb | |
238 | 228 | } | |
239 | 229 | ||
240 | 230 | ||
241 | - | func | |
242 | - | let | |
243 | - | | |
231 | + | func bc (ag,af) = { | |
232 | + | let bb = valueOrErrorMessage(getInteger(ag, af), ("No value for key " + af)) | |
233 | + | bb | |
244 | 234 | } | |
245 | 235 | ||
246 | 236 | ||
247 | - | func | |
237 | + | func bd () = aW(c) | |
248 | 238 | ||
249 | 239 | ||
250 | - | func | |
240 | + | func be () = aW(p) | |
251 | 241 | ||
252 | 242 | ||
253 | - | func | |
243 | + | func bf () = aW(q) | |
254 | 244 | ||
255 | 245 | ||
256 | - | func | |
246 | + | func bg () = aW(s) | |
257 | 247 | ||
258 | 248 | ||
259 | - | func | |
249 | + | func bh () = aW(I) | |
260 | 250 | ||
261 | 251 | ||
262 | - | func | |
252 | + | func bi () = aW(J) | |
263 | 253 | ||
264 | 254 | ||
265 | - | func | |
255 | + | func bj () = aY(K, az) | |
266 | 256 | ||
267 | 257 | ||
268 | - | func | |
258 | + | func bk () = aY(L, az) | |
269 | 259 | ||
270 | 260 | ||
271 | - | func | |
261 | + | func bl () = aW(M) | |
272 | 262 | ||
273 | 263 | ||
274 | - | func | |
264 | + | func bm () = aW(P) | |
275 | 265 | ||
276 | 266 | ||
277 | - | func | |
267 | + | func bn () = aW(Q) | |
278 | 268 | ||
279 | 269 | ||
280 | - | func | |
270 | + | func bo () = aW(R) | |
281 | 271 | ||
282 | 272 | ||
283 | - | func | |
273 | + | func bp () = aW(F) | |
284 | 274 | ||
285 | 275 | ||
286 | - | func | |
276 | + | func bq () = aW(r) | |
287 | 277 | ||
288 | 278 | ||
289 | - | func | |
279 | + | func br () = (bq() * az) | |
290 | 280 | ||
291 | 281 | ||
292 | - | func | |
282 | + | func bs () = (bq() * ax) | |
293 | 283 | ||
294 | 284 | ||
295 | - | func | |
285 | + | func bt () = aW(t) | |
296 | 286 | ||
297 | 287 | ||
298 | - | func | |
288 | + | func bu () = aW(u) | |
299 | 289 | ||
300 | 290 | ||
301 | - | func | |
291 | + | func bv () = aW(v) | |
302 | 292 | ||
303 | 293 | ||
304 | - | func | |
294 | + | func bw () = aW(w) | |
305 | 295 | ||
306 | 296 | ||
307 | - | func | |
297 | + | func bx () = aW(x) | |
308 | 298 | ||
309 | 299 | ||
310 | - | func | |
300 | + | func by () = aW(y) | |
311 | 301 | ||
312 | 302 | ||
313 | - | func | |
303 | + | func bz () = aW(z) | |
314 | 304 | ||
315 | 305 | ||
316 | - | func | |
306 | + | func bA () = aW(D) | |
317 | 307 | ||
318 | 308 | ||
319 | - | func | |
309 | + | func bB () = aW(E) | |
320 | 310 | ||
321 | 311 | ||
322 | - | func | |
312 | + | func bC () = aW(O) | |
323 | 313 | ||
324 | 314 | ||
325 | - | func | |
315 | + | func bD () = aW(N) | |
326 | 316 | ||
327 | 317 | ||
328 | - | func | |
318 | + | func bE () = aY(d, 0) | |
329 | 319 | ||
330 | 320 | ||
331 | - | func | |
321 | + | func bF () = aW(A) | |
332 | 322 | ||
333 | 323 | ||
334 | - | func | |
324 | + | func bG () = aW(B) | |
335 | 325 | ||
336 | 326 | ||
337 | - | func | |
327 | + | func bH () = aY(C, aE) | |
338 | 328 | ||
339 | 329 | ||
340 | - | func | |
330 | + | func bI () = lastBlock.timestamp | |
341 | 331 | ||
342 | 332 | ||
343 | - | func | |
333 | + | func bJ (bK) = valueOrElse(getString(ao(), "k_sender"), toString(bK.caller)) | |
344 | 334 | ||
345 | 335 | ||
346 | - | func | |
347 | - | let | |
348 | - | if (if ( | |
349 | - | then (0 > | |
336 | + | func bL (bM,bN,bO) = { | |
337 | + | let bP = (bM - bN) | |
338 | + | if (if (bO) | |
339 | + | then (0 > bP) | |
350 | 340 | else false) | |
351 | - | then throw(((("Invalid margin: " + toString( | |
352 | - | else if (if (!( | |
353 | - | then ( | |
341 | + | then throw(((("Invalid margin: " + toString(bM)) + " < ") + toString(bN))) | |
342 | + | else if (if (!(bO)) | |
343 | + | then (bP >= 0) | |
354 | 344 | else false) | |
355 | - | then throw(((("Invalid margin: " + toString( | |
345 | + | then throw(((("Invalid margin: " + toString(bM)) + " > ") + toString(bN))) | |
356 | 346 | else true | |
357 | 347 | } | |
358 | 348 | ||
359 | 349 | ||
360 | - | func | |
350 | + | func bQ (bR) = if ((bR == 0)) | |
361 | 351 | then throw("Should not be called with _positionSize == 0") | |
362 | - | else if (( | |
363 | - | then | |
364 | - | else | |
352 | + | else if ((bR > 0)) | |
353 | + | then bA() | |
354 | + | else bB() | |
365 | 355 | ||
366 | 356 | ||
367 | - | func | |
368 | - | let | |
369 | - | let | |
370 | - | if ($isInstanceOf( | |
357 | + | func bS (bT) = { | |
358 | + | let bU = getInteger(this, ae(e, bT)) | |
359 | + | let bV = bU | |
360 | + | if ($isInstanceOf(bV, "Int")) | |
371 | 361 | then { | |
372 | - | let | |
373 | - | $Tuple5( | |
362 | + | let bW = bV | |
363 | + | $Tuple5(bW, getIntegerValue(this, ae(f, bT)), getIntegerValue(this, ae(g, bT)), getIntegerValue(this, ae(h, bT)), getIntegerValue(this, ae(l, bT))) | |
374 | 364 | } | |
375 | 365 | else $Tuple5(0, 0, 0, 0, 0) | |
376 | 366 | } | |
377 | 367 | ||
378 | 368 | ||
379 | - | func | |
380 | - | let | |
381 | - | let | |
382 | - | if ($isInstanceOf( | |
369 | + | func bX (bT) = { | |
370 | + | let bY = getString(this, ae(j, bT)) | |
371 | + | let bV = bY | |
372 | + | if ($isInstanceOf(bV, "String")) | |
383 | 373 | then { | |
384 | - | let | |
385 | - | | |
374 | + | let bZ = bV | |
375 | + | bZ | |
386 | 376 | } | |
387 | - | else toBase58String( | |
377 | + | else toBase58String(aj()) | |
388 | 378 | } | |
389 | 379 | ||
390 | 380 | ||
391 | - | func | |
392 | - | let | |
393 | - | let | |
394 | - | if ($isInstanceOf( | |
381 | + | func ca (bT) = { | |
382 | + | let cb = getInteger(this, ae(k, bT)) | |
383 | + | let bV = cb | |
384 | + | if ($isInstanceOf(bV, "Int")) | |
395 | 385 | then { | |
396 | - | let | |
397 | - | | |
386 | + | let cc = bV | |
387 | + | cc | |
398 | 388 | } | |
399 | - | else | |
389 | + | else be() | |
400 | 390 | } | |
401 | 391 | ||
402 | 392 | ||
403 | - | func | |
393 | + | func cd (bT) = if ((bS(bT)._1 == 0)) | |
404 | 394 | then throw("No open position") | |
405 | 395 | else true | |
406 | 396 | ||
407 | 397 | ||
408 | - | func | |
409 | - | let | |
410 | - | if (if (isDefined( | |
411 | - | then (value( | |
398 | + | func ce (cf) = { | |
399 | + | let cg = getString(this, cf) | |
400 | + | if (if (isDefined(cg)) | |
401 | + | then (value(cg) != "") | |
412 | 402 | else false) | |
413 | 403 | then { | |
414 | - | let | |
415 | - | let | |
416 | - | let | |
417 | - | let | |
418 | - | let | |
419 | - | $Tuple4( | |
404 | + | let ch = split(value(cg), ",") | |
405 | + | let ci = valueOrErrorMessage(addressFromString(ch[0]), ("Invalid oracle address in: " + value(cg))) | |
406 | + | let cj = ch[1] | |
407 | + | let ck = ch[2] | |
408 | + | let cl = ch[3] | |
409 | + | $Tuple4(ci, cj, ck, cl) | |
420 | 410 | } | |
421 | 411 | else unit | |
422 | 412 | } | |
423 | 413 | ||
424 | 414 | ||
425 | - | func | |
415 | + | func cm () = valueOrElse(getBoolean(this, m), false) | |
426 | 416 | ||
427 | 417 | ||
428 | - | func | |
418 | + | func cn () = valueOrElse(getBoolean(this, n), false) | |
429 | 419 | ||
430 | 420 | ||
431 | - | func | |
421 | + | func co () = valueOrElse(getBoolean(this, o), false) | |
432 | 422 | ||
433 | 423 | ||
434 | - | func | |
424 | + | func cp (cq,cr,cs) = if (cq) | |
435 | 425 | then { | |
436 | - | let | |
437 | - | if ((0 >= | |
426 | + | let ct = (bi() - cs) | |
427 | + | if ((0 >= ct)) | |
438 | 428 | then throw("Tx lead to base asset reserve <= 0, revert") | |
439 | - | else $Tuple3(( | |
429 | + | else $Tuple3((bh() + cr), ct, (bl() + cs)) | |
440 | 430 | } | |
441 | 431 | else { | |
442 | - | let | |
443 | - | if ((0 >= | |
432 | + | let cu = (bh() - cr) | |
433 | + | if ((0 >= cu)) | |
444 | 434 | then throw("Tx lead to base quote reserve <= 0, revert") | |
445 | - | else $Tuple3( | |
435 | + | else $Tuple3(cu, (bi() + cs), (bl() - cs)) | |
446 | 436 | } | |
447 | 437 | ||
448 | 438 | ||
449 | - | func | |
450 | - | let | |
451 | - | let | |
452 | - | | |
439 | + | func cv (cw,cx) = { | |
440 | + | let cy = toBigInt(cw) | |
441 | + | let cz = toBigInt(cx) | |
442 | + | aM(cy, cz) | |
453 | 443 | } | |
454 | 444 | ||
455 | 445 | ||
456 | - | func | |
457 | - | let | |
458 | - | let | |
459 | - | let | |
460 | - | let | |
461 | - | let | |
462 | - | let | |
463 | - | let | |
464 | - | then ( | |
465 | - | else ( | |
466 | - | let | |
467 | - | let | |
468 | - | let | |
469 | - | then | |
470 | - | else -( | |
471 | - | let | |
472 | - | let | |
473 | - | let | |
474 | - | let | |
475 | - | let | |
476 | - | let | |
477 | - | let | |
478 | - | let | |
479 | - | let | |
480 | - | if (( | |
481 | - | then throw(((((((((((((("Price impact " + toString( | |
482 | - | else $Tuple4( | |
446 | + | func cA (cq,cr) = { | |
447 | + | let cw = bh() | |
448 | + | let cx = bi() | |
449 | + | let cB = bj() | |
450 | + | let cC = bk() | |
451 | + | let cD = aI(cr, cB) | |
452 | + | let aX = cv(cw, cx) | |
453 | + | let cE = if (cq) | |
454 | + | then (cw + cD) | |
455 | + | else (cw - cD) | |
456 | + | let cF = toInt(aL(aX, toBigInt(cE))) | |
457 | + | let cG = aN((cF - cx)) | |
458 | + | let cH = if (cq) | |
459 | + | then cG | |
460 | + | else -(cG) | |
461 | + | let cI = cp(cq, cD, cG) | |
462 | + | let cJ = cI._1 | |
463 | + | let cK = cI._2 | |
464 | + | let cL = cI._3 | |
465 | + | let cM = aI(aK(cw, cB), aK(cx, cC)) | |
466 | + | let cN = aI(cr, cG) | |
467 | + | let cO = aN((cM - cN)) | |
468 | + | let cP = (az - aI(cM, (cM + cO))) | |
469 | + | let cQ = bx() | |
470 | + | if ((cP > cQ)) | |
471 | + | then throw(((((((((((((("Price impact " + toString(cP)) + " > max price impact ") + toString(cQ)) + " before quote asset: ") + toString(cw)) + " before base asset: ") + toString(cx)) + " quote asset amount to exchange: ") + toString(cr)) + " price before: ") + toString(cM)) + " marketPrice: ") + toString(cN))) | |
472 | + | else $Tuple4(cH, cJ, cK, cL) | |
483 | 473 | } | |
484 | 474 | ||
485 | 475 | ||
486 | - | func | |
487 | - | let | |
488 | - | let | |
489 | - | | |
476 | + | func cR (cS,cT) = { | |
477 | + | let cU = ((((bI() - cT) / 1000) / 60) * az) | |
478 | + | let cV = aI(aK(aK(cS, cU), bf()), aA) | |
479 | + | cV | |
490 | 480 | } | |
491 | 481 | ||
492 | 482 | ||
493 | - | func | |
494 | - | let | |
483 | + | func cW (cX,cS,cY,cT,cZ) = { | |
484 | + | let da = if ((cX != 0)) | |
495 | 485 | then { | |
496 | - | let | |
497 | - | | |
486 | + | let db = bQ(cX) | |
487 | + | aK((db - cY), cX) | |
498 | 488 | } | |
499 | 489 | else 0 | |
500 | - | let | |
501 | - | let | |
502 | - | let | |
503 | - | then $Tuple2(0, | |
504 | - | else $Tuple2( | |
505 | - | let | |
506 | - | let | |
507 | - | $Tuple4( | |
490 | + | let cV = cR(cS, cT) | |
491 | + | let dc = (((cZ - cV) - da) + cS) | |
492 | + | let dd = if ((0 > dc)) | |
493 | + | then $Tuple2(0, aN(dc)) | |
494 | + | else $Tuple2(aN(dc), 0) | |
495 | + | let de = dd._1 | |
496 | + | let df = dd._2 | |
497 | + | $Tuple4(de, df, da, cV) | |
508 | 498 | } | |
509 | 499 | ||
510 | 500 | ||
511 | - | func | |
512 | - | let | |
513 | - | if (( | |
501 | + | func dg (cq,cs,dh,di,dj,dk,dl) = { | |
502 | + | let cM = aI(aK(di, dj), aK(dk, dl)) | |
503 | + | if ((cs == 0)) | |
514 | 504 | then throw("Invalid base asset amount") | |
515 | 505 | else { | |
516 | - | let | |
517 | - | let | |
518 | - | then ( | |
519 | - | else ( | |
520 | - | let | |
521 | - | let | |
522 | - | let | |
523 | - | let | |
524 | - | let | |
525 | - | let | |
526 | - | let | |
527 | - | let | |
528 | - | let | |
529 | - | let | |
530 | - | let | |
531 | - | if (if (( | |
532 | - | then | |
506 | + | let aX = cv(di, dk) | |
507 | + | let dm = if (cq) | |
508 | + | then (dk + cs) | |
509 | + | else (dk - cs) | |
510 | + | let dn = toInt(aL(aX, toBigInt(dm))) | |
511 | + | let do = aN((dn - di)) | |
512 | + | let dp = aK(do, dj) | |
513 | + | let cQ = bx() | |
514 | + | let dq = cp(!(cq), do, cs) | |
515 | + | let cJ = dq._1 | |
516 | + | let cK = dq._2 | |
517 | + | let cL = dq._3 | |
518 | + | let cN = aI(dp, cs) | |
519 | + | let cO = aN((cM - cN)) | |
520 | + | let cP = (az - aI(cM, (cM + cO))) | |
521 | + | if (if ((cP > cQ)) | |
522 | + | then dh | |
533 | 523 | else false) | |
534 | - | then throw(((((((((((((("Price impact " + toString( | |
535 | - | else $Tuple7( | |
536 | - | then | |
537 | - | else 0)), ( | |
538 | - | then | |
539 | - | else 0)), | |
524 | + | then throw(((((((((((((("Price impact " + toString(cP)) + " > max price impact ") + toString(cQ)) + " before quote asset: ") + toString(di)) + " before base asset: ") + toString(dk)) + " base asset amount to exchange: ") + toString(cs)) + " price before: ") + toString(cM)) + " market price: ") + toString(cN))) | |
525 | + | else $Tuple7(dp, cJ, cK, cL, (bD() - (if (cq) | |
526 | + | then aN(cs) | |
527 | + | else 0)), (bC() - (if (!(cq)) | |
528 | + | then aN(cs) | |
529 | + | else 0)), cP) | |
540 | 530 | } | |
541 | 531 | } | |
542 | 532 | ||
543 | 533 | ||
544 | - | func | |
534 | + | func dr (cq,cs,dh) = dg(cq, cs, dh, bh(), bj(), bi(), bk()) | |
545 | 535 | ||
546 | 536 | ||
547 | - | func | |
548 | - | let | |
549 | - | if (( | |
537 | + | func ds (dt,cj,ck) = { | |
538 | + | let du = valueOrErrorMessage(getInteger(dt, cj), ((("Can not get oracle price. Oracle: " + toString(dt)) + " key: ") + cj)) | |
539 | + | if ((ck != "")) | |
550 | 540 | then { | |
551 | - | let | |
552 | - | let | |
553 | - | if ((( | |
554 | - | then throw(((("Oracle stale data. Last oracle block: " + toString( | |
555 | - | else | |
541 | + | let dv = lastBlock.height | |
542 | + | let dw = valueOrErrorMessage(getInteger(dt, ck), ((("Can not get oracle block. Oracle: " + toString(dt)) + " key: ") + ck)) | |
543 | + | if (((dv - dw) > bG())) | |
544 | + | then throw(((("Oracle stale data. Last oracle block: " + toString(dw)) + " current block: ") + toString(dv))) | |
545 | + | else du | |
556 | 546 | } | |
557 | - | else | |
547 | + | else du | |
558 | 548 | } | |
559 | 549 | ||
560 | 550 | ||
561 | - | func | |
562 | - | let | |
563 | - | let | |
564 | - | let | |
565 | - | let | |
551 | + | func dx () = { | |
552 | + | let dy = valueOrErrorMessage(ce(a), "No base asset oracle data") | |
553 | + | let dz = ds(dy._1, dy._2, dy._3) | |
554 | + | let dA = ce(b) | |
555 | + | let dB = if (isDefined(dA)) | |
566 | 556 | then { | |
567 | - | let | |
568 | - | | |
557 | + | let dC = value(dA) | |
558 | + | ds(dC._1, dC._2, dC._3) | |
569 | 559 | } | |
570 | - | else | |
571 | - | | |
560 | + | else az | |
561 | + | aI(dz, dB) | |
572 | 562 | } | |
573 | 563 | ||
574 | 564 | ||
575 | - | func | |
576 | - | let | |
577 | - | let | |
578 | - | let | |
579 | - | if (( | |
565 | + | func dD () = { | |
566 | + | let dy = valueOrErrorMessage(ce(a), "No base asset oracle data") | |
567 | + | let dt = dy._1 | |
568 | + | let cl = dy._4 | |
569 | + | if ((cl != "")) | |
580 | 570 | then { | |
581 | - | let | |
582 | - | !( | |
571 | + | let dE = valueOrErrorMessage(getBoolean(dt, cl), ((("Can not get oracle is open/closed. Oracle: " + toString(dt)) + " key: ") + cl)) | |
572 | + | !(dE) | |
583 | 573 | } | |
584 | 574 | else false | |
585 | 575 | } | |
586 | 576 | ||
587 | 577 | ||
588 | - | func | |
589 | - | let | |
590 | - | let | |
591 | - | let | |
592 | - | | |
578 | + | func dF (dG,di,dk,cB,cC) = { | |
579 | + | let dH = aI(aK(di, cB), aK(dk, cC)) | |
580 | + | let dI = aI((dG + dH), (2 * az)) | |
581 | + | let dF = aI(aN((dG - dH)), dI) | |
582 | + | dF | |
593 | 583 | } | |
594 | 584 | ||
595 | 585 | ||
596 | - | func | |
597 | - | let | |
598 | - | let | |
599 | - | let | |
600 | - | let | |
601 | - | let | |
602 | - | if (if (( | |
603 | - | then ( | |
586 | + | func dJ (di,dk) = { | |
587 | + | let dK = dx() | |
588 | + | let cB = bj() | |
589 | + | let cC = bk() | |
590 | + | let dL = dF(dK, bh(), bi(), cB, cC) | |
591 | + | let dM = dF(dK, di, dk, cB, cC) | |
592 | + | if (if ((dM > by())) | |
593 | + | then (dM > dL) | |
604 | 594 | else false) | |
605 | - | then throw(((("Price spread " + toString( | |
595 | + | then throw(((("Price spread " + toString(dM)) + " > max price spread ") + toString(by()))) | |
606 | 596 | else true | |
607 | 597 | } | |
608 | 598 | ||
609 | 599 | ||
610 | - | func | |
611 | - | let | |
612 | - | if (( | |
613 | - | then throw(((("Long open notional " + toString( | |
614 | - | else if (( | |
615 | - | then throw(((("Short open notional " + toString( | |
600 | + | func dN (dO,dP) = { | |
601 | + | let dQ = bz() | |
602 | + | if ((dO > dQ)) | |
603 | + | then throw(((("Long open notional " + toString(dO)) + " > max open notional ") + toString(dQ))) | |
604 | + | else if ((dP > dQ)) | |
605 | + | then throw(((("Short open notional " + toString(dP)) + " > max open notional ") + toString(dQ))) | |
616 | 606 | else true | |
617 | 607 | } | |
618 | 608 | ||
619 | 609 | ||
620 | - | func | |
621 | - | let | |
622 | - | let | |
623 | - | let | |
624 | - | let | |
625 | - | | |
610 | + | func dR () = { | |
611 | + | let di = bh() | |
612 | + | let dk = bi() | |
613 | + | let cB = bj() | |
614 | + | let cC = bk() | |
615 | + | aI(aK(di, cB), aK(dk, cC)) | |
626 | 616 | } | |
627 | 617 | ||
628 | 618 | ||
629 | - | func | |
630 | - | let | |
631 | - | let | |
632 | - | (aN( | |
619 | + | func dS () = { | |
620 | + | let dK = dx() | |
621 | + | let dT = dR() | |
622 | + | (aI(aN((dK - dT)), dK) > bw()) | |
633 | 623 | } | |
634 | 624 | ||
635 | 625 | ||
636 | - | func | |
637 | - | let | |
638 | - | let | |
639 | - | let | |
626 | + | func dU (bR,dV,di,dj,dk,dl) = { | |
627 | + | let dW = aN(bR) | |
628 | + | let dX = (0 > bR) | |
629 | + | let dY = if ((dV == aC)) | |
640 | 630 | then { | |
641 | - | let | |
642 | - | | |
631 | + | let dZ = dg(!(dX), dW, false, di, dj, dk, dl)._1 | |
632 | + | dZ | |
643 | 633 | } | |
644 | - | else | |
645 | - | | |
634 | + | else aK(dW, dx()) | |
635 | + | dY | |
646 | 636 | } | |
647 | 637 | ||
648 | 638 | ||
649 | - | func | |
639 | + | func ea (bR,eb,di,dj,dk,dl,dV) = if ((bR == 0)) | |
650 | 640 | then throw("Invalid position size") | |
651 | 641 | else { | |
652 | - | let | |
653 | - | let | |
654 | - | let | |
655 | - | then ( | |
656 | - | else ( | |
657 | - | $Tuple2( | |
642 | + | let dX = (0 > bR) | |
643 | + | let dY = dU(bR, dV, di, dj, dk, dl) | |
644 | + | let ec = if (dX) | |
645 | + | then (eb - dY) | |
646 | + | else (dY - eb) | |
647 | + | $Tuple2(dY, ec) | |
658 | 648 | } | |
659 | 649 | ||
660 | 650 | ||
661 | - | func | |
662 | - | let | |
663 | - | let | |
664 | - | let | |
665 | - | let | |
666 | - | let | |
667 | - | | |
651 | + | func ed (bT,dV) = { | |
652 | + | let ee = bS(bT) | |
653 | + | let bW = ee._1 | |
654 | + | let ef = ee._2 | |
655 | + | let eg = ee._3 | |
656 | + | let eh = ee._4 | |
657 | + | ea(bW, eg, bh(), bj(), bi(), bk(), dV) | |
668 | 658 | } | |
669 | 659 | ||
670 | 660 | ||
671 | - | func | |
661 | + | func ei (ej,ek,el) = aI((ej - ek), el) | |
672 | 662 | ||
673 | 663 | ||
674 | - | func | |
675 | - | let | |
676 | - | let | |
677 | - | let | |
678 | - | let | |
679 | - | let | |
680 | - | let | |
681 | - | let | |
682 | - | let | |
683 | - | let | |
684 | - | let | |
685 | - | let | |
686 | - | let | |
687 | - | | |
664 | + | func em (bT,dV) = { | |
665 | + | let en = bS(bT) | |
666 | + | let bW = en._1 | |
667 | + | let ef = en._2 | |
668 | + | let eo = en._3 | |
669 | + | let ep = en._4 | |
670 | + | let eq = en._5 | |
671 | + | let er = ed(bT, dV) | |
672 | + | let dY = er._1 | |
673 | + | let ec = er._2 | |
674 | + | let es = cW(bW, ef, ep, eq, ec) | |
675 | + | let de = es._1 | |
676 | + | let df = es._2 | |
677 | + | ei(de, df, dY) | |
688 | 678 | } | |
689 | 679 | ||
690 | 680 | ||
691 | - | func | |
681 | + | func et (bT) = em(bT, aC) | |
692 | 682 | ||
693 | 683 | ||
694 | - | func | |
695 | - | let | |
696 | - | let | |
697 | - | let | |
698 | - | let | |
699 | - | let | |
700 | - | if (( | |
701 | - | then | |
702 | - | else | |
684 | + | func eu (bT,bR) = { | |
685 | + | let ev = aO(bv(), (az - aI(et(bT), bt()))) | |
686 | + | let ew = aK(aN(bR), ev) | |
687 | + | let ex = dr((bR > 0), ew, false) | |
688 | + | let ey = ex._1 | |
689 | + | let cP = ex._7 | |
690 | + | if ((bx() > cP)) | |
691 | + | then ew | |
692 | + | else aK(aN(bR), bv()) | |
703 | 693 | } | |
704 | 694 | ||
705 | 695 | ||
706 | - | func | |
707 | - | let | |
708 | - | let | |
709 | - | let | |
710 | - | let | |
711 | - | let | |
712 | - | let | |
713 | - | let | |
714 | - | let | |
715 | - | if (if (( | |
716 | - | then ( | |
696 | + | func ez (bT,eA,eB,eC,eD,dh,eE) = { | |
697 | + | let eF = bS(bT) | |
698 | + | let eG = eF._1 | |
699 | + | let eH = eF._2 | |
700 | + | let eI = eF._3 | |
701 | + | let eJ = eF._4 | |
702 | + | let eK = eF._5 | |
703 | + | let eL = (eG > 0) | |
704 | + | let eM = aN(eG) | |
705 | + | if (if ((eM >= eA)) | |
706 | + | then (eA > 0) | |
717 | 707 | else false) | |
718 | 708 | then { | |
719 | - | let | |
720 | - | let | |
721 | - | let | |
722 | - | let | |
723 | - | let | |
724 | - | let | |
725 | - | let | |
726 | - | then -( | |
727 | - | else | |
728 | - | let | |
729 | - | let | |
730 | - | let | |
731 | - | let | |
732 | - | let | |
733 | - | let | |
734 | - | let | |
735 | - | let | |
736 | - | let | |
737 | - | let | |
738 | - | let | |
739 | - | let | |
740 | - | let | |
741 | - | let | |
742 | - | then (( | |
743 | - | else (( | |
744 | - | let | |
745 | - | let | |
709 | + | let eN = (eM > eA) | |
710 | + | let eO = dr((eG > 0), eA, dh) | |
711 | + | let eP = eO._1 | |
712 | + | let cE = eO._2 | |
713 | + | let cF = eO._3 | |
714 | + | let eQ = eO._4 | |
715 | + | let eR = if ((eG > 0)) | |
716 | + | then -(eA) | |
717 | + | else eA | |
718 | + | let eS = ed(bT, aC) | |
719 | + | let eT = eS._1 | |
720 | + | let ec = eS._2 | |
721 | + | let eU = aI(aN(eR), eM) | |
722 | + | let eV = aK(ec, eU) | |
723 | + | let eW = cW(eG, eH, eJ, eK, ec) | |
724 | + | let eX = eW._1 | |
725 | + | let eY = eW._2 | |
726 | + | let eZ = eW._3 | |
727 | + | let cV = eW._4 | |
728 | + | let fa = cW(eG, eH, eJ, eK, eV)._2 | |
729 | + | let fb = aK(aK(eT, eU), eB) | |
730 | + | let fc = (ec - eV) | |
731 | + | let fd = if ((eG > 0)) | |
732 | + | then ((eT - eP) - fc) | |
733 | + | else ((fc + eT) - eP) | |
734 | + | let fe = (eG + eR) | |
735 | + | let ff = if ((fe == 0)) | |
746 | 736 | then $Tuple2(0, 0) | |
747 | - | else $Tuple2( | |
748 | - | let | |
749 | - | let | |
750 | - | let | |
751 | - | let | |
752 | - | let | |
753 | - | then ( | |
754 | - | else ( | |
755 | - | let | |
756 | - | let | |
757 | - | then if ( | |
737 | + | else $Tuple2(aN(fd), bQ(fe)) | |
738 | + | let fg = ff._1 | |
739 | + | let fh = ff._2 | |
740 | + | let fi = (eI - fg) | |
741 | + | let fj = em(bT, aC) | |
742 | + | let fk = if ((eG > 0)) | |
743 | + | then (aK((fg + fc), fj) - fc) | |
744 | + | else (aK((fg - fc), fj) - fc) | |
745 | + | let fl = ((eX - (fk + fc)) - fb) | |
746 | + | let fm = if ((0 > fl)) | |
747 | + | then if (eE) | |
758 | 748 | then 0 | |
759 | 749 | else throw("Invalid internalClosePosition params: unable to pay fee") | |
760 | - | else | |
761 | - | let | |
762 | - | then ( | |
763 | - | else | |
764 | - | if (if (( | |
765 | - | then ( | |
750 | + | else fl | |
751 | + | let fn = if (eD) | |
752 | + | then (fk + fm) | |
753 | + | else fk | |
754 | + | if (if ((eC != 0)) | |
755 | + | then (eC > eP) | |
766 | 756 | else false) | |
767 | - | then throw(((("Limit error: " + toString( | |
768 | - | else $Tuple17( | |
769 | - | then | |
757 | + | then throw(((("Limit error: " + toString(eP)) + " < ") + toString(eC))) | |
758 | + | else $Tuple17(fe, fn, fg, fh, fa, eV, if (if (eD) | |
759 | + | then eN | |
770 | 760 | else false) | |
771 | 761 | then 0 | |
772 | - | else | |
773 | - | then | |
774 | - | else 0)), ( | |
775 | - | then | |
776 | - | else 0)), ( | |
777 | - | then | |
778 | - | else 0)), ( | |
779 | - | then | |
780 | - | else 0)), ( | |
762 | + | else fm, cE, cF, eQ, (bm() - fi), (bD() - (if (eL) | |
763 | + | then aN(eR) | |
764 | + | else 0)), (bC() - (if (!(eL)) | |
765 | + | then aN(eR) | |
766 | + | else 0)), (bo() - (if (eL) | |
767 | + | then fi | |
768 | + | else 0)), (bn() - (if (!(eL)) | |
769 | + | then fi | |
770 | + | else 0)), (fb + cV), eP) | |
781 | 771 | } | |
782 | - | else throw(((("Invalid internalClosePosition params: invalid position size: " + toString( | |
772 | + | else throw(((("Invalid internalClosePosition params: invalid position size: " + toString(eA)) + " max: ") + toString(eM))) | |
783 | 773 | } | |
784 | 774 | ||
785 | 775 | ||
786 | - | func ft () = { | |
787 | - | let fu = ((bN() / 1000) / 60) | |
788 | - | let fv = (fu - aB) | |
789 | - | let fw = valueOrElse(getString(this, D), "") | |
790 | - | let fx = split(fw, ",") | |
791 | - | func fy (fz,fA) = if ((fv >= valueOrErrorMessage(parseInt(fA), ("getTwapSpotPrice: invalid int: " + fw)))) | |
792 | - | then (fz :+ parseIntValue(fA)) | |
793 | - | else fz | |
794 | - | ||
795 | - | let fB = { | |
796 | - | let fC = fx | |
797 | - | let fD = size(fC) | |
798 | - | let fE = nil | |
799 | - | func fF (fG,fH) = if ((fH >= fD)) | |
800 | - | then fG | |
801 | - | else fy(fG, fC[fH]) | |
802 | - | ||
803 | - | func fI (fG,fH) = if ((fH >= fD)) | |
804 | - | then fG | |
805 | - | else throw("List size exceeds 20") | |
806 | - | ||
807 | - | fI(fF(fF(fF(fF(fF(fF(fF(fF(fF(fF(fF(fF(fF(fF(fF(fF(fF(fF(fF(fF(fE, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20) | |
808 | - | } | |
809 | - | let fJ = if ((size(fB) > 0)) | |
810 | - | then max(fB) | |
811 | - | else valueOrErrorMessage(parseInt(fx[0]), ("getTwapSpotPrice: invalid int: " + fw)) | |
812 | - | let fK = valueOrElse(getInteger(this, E), 0) | |
813 | - | let fL = valueOrElse(getInteger(this, ((F + "_") + toString(fK))), 0) | |
814 | - | let fM = valueOrElse(getInteger(this, ((G + "_") + toString(fK))), 0) | |
815 | - | let fN = (fL + ((fu - fK) * fM)) | |
816 | - | let fO = valueOrElse(getInteger(this, ((F + "_") + toString(fJ))), 0) | |
817 | - | let fP = valueOrElse(getInteger(this, ((G + "_") + toString(fJ))), 0) | |
818 | - | let fQ = (fO + ((fv - fJ) * fP)) | |
819 | - | ((fN - fQ) / aB) | |
820 | - | } | |
821 | - | ||
822 | - | ||
823 | - | func fR () = { | |
824 | - | let bW = bq() | |
825 | - | if ((bW == 0)) | |
826 | - | then $Tuple2(bm(), bn()) | |
776 | + | func fo () = { | |
777 | + | let bR = bl() | |
778 | + | if ((bR == 0)) | |
779 | + | then $Tuple2(bh(), bi()) | |
827 | 780 | else { | |
828 | - | let | |
829 | - | let | |
830 | - | let | |
831 | - | let | |
832 | - | let | |
833 | - | $Tuple2( | |
781 | + | let fp = (bR > 0) | |
782 | + | let fq = dr(fp, aN(bR), false) | |
783 | + | let fr = fq._1 | |
784 | + | let fs = fq._2 | |
785 | + | let ft = fq._3 | |
786 | + | $Tuple2(fs, ft) | |
834 | 787 | } | |
835 | 788 | } | |
836 | 789 | ||
837 | 790 | ||
838 | - | func | |
839 | - | let | |
840 | - | let | |
841 | - | let | |
842 | - | let | |
843 | - | let | |
844 | - | let | |
845 | - | let | |
846 | - | let | |
847 | - | let | |
848 | - | toInt( | |
791 | + | func fu (fv,bl,fw,fx) = { | |
792 | + | let fy = toBigInt(fv) | |
793 | + | let fz = toBigInt(bl) | |
794 | + | let fA = toBigInt(fw) | |
795 | + | let fB = toBigInt(fx) | |
796 | + | let aX = aM(fA, fy) | |
797 | + | let fC = (fy + fz) | |
798 | + | let fD = aL(aX, fC) | |
799 | + | let fE = aL(fD, fC) | |
800 | + | let fF = aL(fB, fE) | |
801 | + | toInt(fF) | |
849 | 802 | } | |
850 | 803 | ||
851 | 804 | ||
852 | - | func | |
853 | - | let | |
854 | - | if (( | |
805 | + | func fG (fH,cw,cx) = { | |
806 | + | let bR = bl() | |
807 | + | if ((bR == 0)) | |
855 | 808 | then { | |
856 | - | let | |
857 | - | $Tuple3( | |
809 | + | let fI = aI(aK(fH, cx), cw) | |
810 | + | $Tuple3(fI, az, 0) | |
858 | 811 | } | |
859 | 812 | else { | |
860 | - | let | |
861 | - | let | |
862 | - | let | |
863 | - | let | |
864 | - | let | |
865 | - | $Tuple3( | |
813 | + | let fp = (bR > 0) | |
814 | + | let fr = dr(fp, aN(bR), false)._1 | |
815 | + | let fI = fu(cx, bR, cw, fH) | |
816 | + | let fJ = az | |
817 | + | let fK = ea(bR, fr, cw, fI, cx, fJ, aC)._2 | |
818 | + | $Tuple3(fI, fJ, fK) | |
866 | 819 | } | |
867 | 820 | } | |
868 | 821 | ||
869 | 822 | ||
870 | - | func | |
871 | - | let | |
872 | - | let | |
873 | - | let | |
874 | - | if (if (if (( | |
823 | + | func fL () = { | |
824 | + | let fM = dx() | |
825 | + | let fN = dR() | |
826 | + | let fO = (fN - fM) | |
827 | + | if (if (if ((bC() == 0)) | |
875 | 828 | then true | |
876 | - | else ( | |
829 | + | else (bD() == 0)) | |
877 | 830 | then true | |
878 | - | else | |
831 | + | else dD()) | |
879 | 832 | then $Tuple3(0, 0, 0) | |
880 | - | else if ((0 > | |
833 | + | else if ((0 > fO)) | |
881 | 834 | then { | |
882 | - | let | |
883 | - | if (( | |
835 | + | let fP = aI(aK(fO, br()), aB) | |
836 | + | if ((bH() == aE)) | |
884 | 837 | then { | |
885 | - | let | |
886 | - | $Tuple3( | |
838 | + | let fQ = aI(aK(fP, bC()), bD()) | |
839 | + | $Tuple3(fP, fQ, 0) | |
887 | 840 | } | |
888 | 841 | else { | |
889 | - | let | |
890 | - | let | |
891 | - | let | |
892 | - | $Tuple3( | |
842 | + | let fR = aN(aK(fP, bC())) | |
843 | + | let fS = aN(aK(fP, bD())) | |
844 | + | let fT = (fR - fS) | |
845 | + | $Tuple3(fP, fP, fT) | |
893 | 846 | } | |
894 | 847 | } | |
895 | 848 | else { | |
896 | - | let | |
897 | - | if (( | |
849 | + | let fQ = aI(aK(fO, br()), aB) | |
850 | + | if ((bH() == aE)) | |
898 | 851 | then { | |
899 | - | let | |
900 | - | $Tuple3( | |
852 | + | let fP = aI(aK(fQ, bD()), bC()) | |
853 | + | $Tuple3(fP, fQ, 0) | |
901 | 854 | } | |
902 | 855 | else { | |
903 | - | let | |
904 | - | let | |
905 | - | let | |
906 | - | $Tuple3( | |
856 | + | let fS = aN(aK(fQ, bD())) | |
857 | + | let fR = aN(aK(fQ, bC())) | |
858 | + | let fT = (fS - fR) | |
859 | + | $Tuple3(fQ, fQ, fT) | |
907 | 860 | } | |
908 | 861 | } | |
909 | 862 | } | |
910 | 863 | ||
911 | 864 | ||
912 | - | func | |
913 | - | let | |
914 | - | let | |
915 | - | let | |
865 | + | func fU (fV,fW) = { | |
866 | + | let fX = be() | |
867 | + | let fY = aK(fX, fW) | |
868 | + | let fZ = if ((fV != "")) | |
916 | 869 | then { | |
917 | - | let | |
918 | - | if (( | |
870 | + | let ga = ba(aq(), ae(as, fV)) | |
871 | + | if ((ga == at)) | |
919 | 872 | then { | |
920 | - | let | |
921 | - | let | |
922 | - | $Tuple2( | |
873 | + | let gb = bc(aq(), ae(ar, fV)) | |
874 | + | let gc = aK(fY, gb) | |
875 | + | $Tuple2(gc, true) | |
923 | 876 | } | |
924 | 877 | else throw("Invalid attached artifact") | |
925 | 878 | } | |
926 | - | else $Tuple2( | |
927 | - | let | |
928 | - | let | |
929 | - | $Tuple2( | |
879 | + | else $Tuple2(fY, false) | |
880 | + | let gc = fZ._1 | |
881 | + | let gd = fZ._2 | |
882 | + | $Tuple2(gc, gd) | |
930 | 883 | } | |
931 | 884 | ||
932 | 885 | ||
933 | - | func | |
934 | - | let | |
935 | - | if (( | |
886 | + | func ge (bT,gf) = { | |
887 | + | let eG = bS(bT)._1 | |
888 | + | if ((eG == 0)) | |
936 | 889 | then true | |
937 | - | else ( | |
890 | + | else (bX(bT) == gf) | |
938 | 891 | } | |
939 | 892 | ||
940 | 893 | ||
941 | - | func | |
894 | + | func gg (bT,gf) = (bX(bT) == gf) | |
942 | 895 | ||
943 | 896 | ||
944 | - | func | |
945 | - | let | |
946 | - | if (( | |
897 | + | func gh (bT,fV) = { | |
898 | + | let gi = invoke(an(), "computeFeeDiscount", [bT], nil) | |
899 | + | if ((gi == gi)) | |
947 | 900 | then { | |
948 | - | let | |
949 | - | let | |
950 | - | if ($isInstanceOf( | |
901 | + | let gj = { | |
902 | + | let bV = gi | |
903 | + | if ($isInstanceOf(bV, "Int")) | |
951 | 904 | then { | |
952 | - | let | |
953 | - | | |
905 | + | let gk = bV | |
906 | + | gk | |
954 | 907 | } | |
955 | 908 | else throw("Invalid computeFeeDiscount result") | |
956 | 909 | } | |
957 | - | let | |
958 | - | let | |
959 | - | let | |
960 | - | $Tuple2( | |
910 | + | let gl = fU(fV, gj) | |
911 | + | let gc = gl._1 | |
912 | + | let gd = gl._2 | |
913 | + | $Tuple2(gc, gd) | |
961 | 914 | } | |
962 | 915 | else throw("Strict value is not equal to itself.") | |
963 | 916 | } | |
964 | 917 | ||
965 | 918 | ||
966 | - | func | |
967 | - | let | |
968 | - | then toBase58String(valueOrErrorMessage( | |
919 | + | func gm (bK) = { | |
920 | + | let gn = if ((size(bK.payments) > 1)) | |
921 | + | then toBase58String(valueOrErrorMessage(bK.payments[1].assetId, "Invalid artifactId")) | |
969 | 922 | else "" | |
970 | - | | |
923 | + | gn | |
971 | 924 | } | |
972 | 925 | ||
973 | 926 | ||
974 | - | func | |
975 | - | let | |
976 | - | let | |
977 | - | $Tuple2( | |
927 | + | func go (gp) = { | |
928 | + | let gq = aK(gp, bF()) | |
929 | + | let gr = (gp - gq) | |
930 | + | $Tuple2(gq, gr) | |
978 | 931 | } | |
979 | 932 | ||
980 | 933 | ||
981 | - | func | |
934 | + | func gs (gt,gu,gv,gw,eB,gx,gy,gz,gA,dQ,gB,gC,gD,gE) = [IntegerEntry(s, gt), IntegerEntry(t, gu), IntegerEntry(u, gv), IntegerEntry(r, gw), IntegerEntry(p, eB), IntegerEntry(w, gx), IntegerEntry(x, gy), IntegerEntry(v, gz), IntegerEntry(y, gA), IntegerEntry(z, dQ), IntegerEntry(A, gB), IntegerEntry(B, gB), IntegerEntry(q, gD), IntegerEntry(C, gE)] | |
982 | 935 | ||
983 | 936 | ||
984 | - | func | |
937 | + | func gF (gG,gH,gI,gJ,gK) = [IntegerEntry(F, gG), IntegerEntry(D, gH), IntegerEntry(E, gI), IntegerEntry(G, gJ), IntegerEntry(H, gK)] | |
985 | 938 | ||
986 | 939 | ||
987 | - | func | |
940 | + | func gL (gM,ag) = if (gM) | |
988 | 941 | then { | |
989 | - | let | |
990 | - | [IntegerEntry( | |
942 | + | let gN = bE() | |
943 | + | [IntegerEntry(ae(i, ag), (gN + 1)), IntegerEntry(d, (gN + 1))] | |
991 | 944 | } | |
992 | 945 | else nil | |
993 | 946 | ||
994 | 947 | ||
995 | - | func | |
996 | - | then [IntegerEntry( | |
948 | + | func gO (gM,ag,eB) = if (gM) | |
949 | + | then [IntegerEntry(ae(k, ag), eB)] | |
997 | 950 | else nil | |
998 | 951 | ||
999 | 952 | ||
1000 | - | func | |
953 | + | func gP (ag,eA,gQ,gR,db,gS) = [IntegerEntry(ae(e, ag), eA), IntegerEntry(ae(f, ag), gQ), IntegerEntry(ae(g, ag), gR), IntegerEntry(ae(h, ag), db), IntegerEntry(ae(l, ag), gS)] | |
1001 | 954 | ||
1002 | 955 | ||
1003 | - | func hw (hx) = { | |
1004 | - | let fu = ((bN() / 1000) / 60) | |
1005 | - | let hy = valueOrElse(getInteger(this, E), 0) | |
1006 | - | if ((hy > fu)) | |
1007 | - | then throw("TWAP out-of-order") | |
1008 | - | else { | |
1009 | - | let fK = if ((hy == 0)) | |
1010 | - | then fu | |
1011 | - | else hy | |
1012 | - | if ((fu > hy)) | |
1013 | - | then { | |
1014 | - | let hz = valueOrElse(getInteger(this, ((F + "_") + toString(hy))), 0) | |
1015 | - | let hA = valueOrElse(getInteger(this, ((G + "_") + toString(hy))), hx) | |
1016 | - | let hB = (hz + ((fu - fK) * hA)) | |
1017 | - | let fx = aY(aW(valueOrElse(getString(this, D), "")), aB, toString(fu)) | |
1018 | - | [IntegerEntry(aj(F, toString(fu)), hB), IntegerEntry(aj(G, toString(fu)), hx), IntegerEntry(aj(H, toString(fu)), hy), IntegerEntry(E, fu), StringEntry(D, aU(fx))] | |
1019 | - | } | |
1020 | - | else { | |
1021 | - | let hC = valueOrElse(getInteger(this, aj(H, toString(fu))), 0) | |
1022 | - | let hz = valueOrElse(getInteger(this, aj(F, toString(hC))), 0) | |
1023 | - | let hA = valueOrElse(getInteger(this, aj(G, toString(hC))), hx) | |
1024 | - | let hB = (hz + ((fu - hC) * hA)) | |
1025 | - | [IntegerEntry(aj(F, toString(fu)), hB), IntegerEntry(aj(G, toString(fu)), hx)] | |
1026 | - | } | |
1027 | - | } | |
956 | + | func gT (cw,cx) = [IntegerEntry(I, cw), IntegerEntry(J, cx)] | |
957 | + | ||
958 | + | ||
959 | + | func gU (cB,cC) = [IntegerEntry(K, cB), IntegerEntry(L, cC)] | |
960 | + | ||
961 | + | ||
962 | + | func gV (cw,cx,gW,gX,gY,gZ,ha,hb) = { | |
963 | + | let cB = bj() | |
964 | + | let cC = bk() | |
965 | + | if (((gY - gZ) != gW)) | |
966 | + | then throw(((((("Invalid AMM state data: " + toString(gY)) + " + ") + toString(gZ)) + " != ") + toString(gW))) | |
967 | + | else (gT(cw, cx) ++ [IntegerEntry(M, gW), IntegerEntry(P, gX), IntegerEntry(N, gY), IntegerEntry(O, gZ), IntegerEntry(R, ha), IntegerEntry(Q, hb)]) | |
1028 | 968 | } | |
1029 | 969 | ||
1030 | 970 | ||
1031 | - | func | |
971 | + | func hc (ag) = [DeleteEntry(ae(e, ag)), DeleteEntry(ae(f, ag)), DeleteEntry(ae(g, ag)), DeleteEntry(ae(h, ag)), DeleteEntry(ae(j, ag)), DeleteEntry(ae(k, ag)), DeleteEntry(ae(l, ag))] | |
1032 | 972 | ||
1033 | 973 | ||
1034 | - | func hE (cG,cH) = [IntegerEntry(P, cG), IntegerEntry(Q, cH)] | |
1035 | - | ||
1036 | - | ||
1037 | - | func hF (cB,cC,hG,hH,hI,hJ,hK,hL) = { | |
1038 | - | let cG = bo() | |
1039 | - | let cH = bp() | |
1040 | - | if (((hI - hJ) != hG)) | |
1041 | - | then throw(((((("Invalid AMM state data: " + toString(hI)) + " + ") + toString(hJ)) + " != ") + toString(hG))) | |
1042 | - | else ((hD(cB, cC) ++ [IntegerEntry(R, hG), IntegerEntry(U, hH), IntegerEntry(S, hI), IntegerEntry(T, hJ), IntegerEntry(W, hK), IntegerEntry(V, hL)]) ++ hw(aN(aP(cB, cG), aP(cC, cH)))) | |
974 | + | func hd (ag,he) = { | |
975 | + | let hf = assetBalance(this, aj()) | |
976 | + | if ((he > hf)) | |
977 | + | then throw(((("Unable to withdraw " + toString(he)) + " from contract balance ") + toString(hf))) | |
978 | + | else [ScriptTransfer(ag, he, aj())] | |
1043 | 979 | } | |
1044 | 980 | ||
1045 | 981 | ||
1046 | - | func hM (al) = [DeleteEntry(aj(e, al)), DeleteEntry(aj(f, al)), DeleteEntry(aj(g, al)), DeleteEntry(aj(h, al)), DeleteEntry(aj(j, al)), DeleteEntry(aj(k, al)), DeleteEntry(aj(l, al))] | |
982 | + | func hg (bK) = if ((0 > bK)) | |
983 | + | then throw("Balance") | |
984 | + | else [IntegerEntry(c, bK)] | |
1047 | 985 | ||
1048 | 986 | ||
1049 | - | func hN (al,hO) = { | |
1050 | - | let hP = assetBalance(this, ao()) | |
1051 | - | if ((hO > hP)) | |
1052 | - | then throw(((("Unable to withdraw " + toString(hO)) + " from contract balance ") + toString(hP))) | |
1053 | - | else [ScriptTransfer(al, hO, ao())] | |
1054 | - | } | |
987 | + | func hh (bK) = [ScriptTransfer(al(), bK, aj())] | |
1055 | 988 | ||
1056 | 989 | ||
1057 | - | func hQ (bP) = if ((0 > bP)) | |
1058 | - | then throw("Balance") | |
1059 | - | else [IntegerEntry(c, bP)] | |
1060 | - | ||
1061 | - | ||
1062 | - | func hR (bP) = [ScriptTransfer(aq(), bP, ao())] | |
1063 | - | ||
1064 | - | ||
1065 | - | func hS (hT,bP) = if (hT) | |
1066 | - | then [Burn(valueOrErrorMessage(bP.payments[1].assetId, "Invalid artifact"), 1)] | |
990 | + | func hi (hj,bK) = if (hj) | |
991 | + | then [Burn(valueOrErrorMessage(bK.payments[1].assetId, "Invalid artifact"), 1)] | |
1067 | 992 | else nil | |
1068 | 993 | ||
1069 | 994 | ||
1070 | - | @Callable( | |
1071 | - | func pause () = if (( | |
995 | + | @Callable(bK) | |
996 | + | func pause () = if ((bK.caller != ai())) | |
1072 | 997 | then throw("Invalid pause params") | |
1073 | 998 | else [BooleanEntry(n, true)] | |
1074 | 999 | ||
1075 | 1000 | ||
1076 | 1001 | ||
1077 | - | @Callable( | |
1078 | - | func unpause () = if (( | |
1002 | + | @Callable(bK) | |
1003 | + | func unpause () = if ((bK.caller != ai())) | |
1079 | 1004 | then throw("Invalid unpause params") | |
1080 | 1005 | else [BooleanEntry(n, false)] | |
1081 | 1006 | ||
1082 | 1007 | ||
1083 | 1008 | ||
1084 | - | @Callable( | |
1085 | - | func setCloseOnly () = if (( | |
1009 | + | @Callable(bK) | |
1010 | + | func setCloseOnly () = if ((bK.caller != ai())) | |
1086 | 1011 | then throw("Invalid setCloseOnly params") | |
1087 | 1012 | else [BooleanEntry(o, true)] | |
1088 | 1013 | ||
1089 | 1014 | ||
1090 | 1015 | ||
1091 | - | @Callable( | |
1092 | - | func unsetCloseOnly () = if (( | |
1016 | + | @Callable(bK) | |
1017 | + | func unsetCloseOnly () = if ((bK.caller != ai())) | |
1093 | 1018 | then throw("Invalid unsetCloseOnly params") | |
1094 | 1019 | else [BooleanEntry(o, false)] | |
1095 | 1020 | ||
1096 | 1021 | ||
1097 | 1022 | ||
1098 | - | @Callable( | |
1099 | - | func addLiquidity ( | |
1023 | + | @Callable(bK) | |
1024 | + | func addLiquidity (cr) = if (if ((bK.caller != ai())) | |
1100 | 1025 | then true | |
1101 | - | else (0 >= | |
1026 | + | else (0 >= cr)) | |
1102 | 1027 | then throw("Invalid addLiquidity params") | |
1103 | 1028 | else { | |
1104 | - | let | |
1105 | - | let | |
1106 | - | let | |
1107 | - | let | |
1108 | - | let | |
1109 | - | let | |
1110 | - | let | |
1111 | - | let | |
1112 | - | let | |
1113 | - | let | |
1114 | - | let | |
1115 | - | let | |
1116 | - | let | |
1029 | + | let cw = bh() | |
1030 | + | let cx = bi() | |
1031 | + | let cB = bj() | |
1032 | + | let cC = bk() | |
1033 | + | let hk = aI(aK(cw, cB), aK(cx, cC)) | |
1034 | + | let hl = (cw + cr) | |
1035 | + | let hm = (aI(aK(hl, cB), hk) - cx) | |
1036 | + | let hn = (cx + hm) | |
1037 | + | let ho = fG(dx(), hl, hn) | |
1038 | + | let hp = ho._1 | |
1039 | + | let hq = ho._2 | |
1040 | + | let fK = ho._3 | |
1041 | + | let hr = if ((fK != 0)) | |
1117 | 1042 | then { | |
1118 | - | let | |
1119 | - | if (( | |
1043 | + | let hr = invoke(am(), "exchangeFreeAndLocked", [fK], nil) | |
1044 | + | if ((hr == hr)) | |
1120 | 1045 | then nil | |
1121 | 1046 | else throw("Strict value is not equal to itself.") | |
1122 | 1047 | } | |
1123 | 1048 | else nil | |
1124 | - | if (( | |
1125 | - | then ( | |
1049 | + | if ((hr == hr)) | |
1050 | + | then (gT(hl, hn) ++ gU(hp, hq)) | |
1126 | 1051 | else throw("Strict value is not equal to itself.") | |
1127 | 1052 | } | |
1128 | 1053 | ||
1129 | 1054 | ||
1130 | 1055 | ||
1131 | - | @Callable( | |
1132 | - | func removeLiquidity ( | |
1056 | + | @Callable(bK) | |
1057 | + | func removeLiquidity (cr) = if (if ((bK.caller != ai())) | |
1133 | 1058 | then true | |
1134 | - | else ( | |
1059 | + | else (cr >= 0)) | |
1135 | 1060 | then throw("Invalid removeLiquidity params") | |
1136 | 1061 | else { | |
1137 | - | let | |
1138 | - | let | |
1139 | - | let | |
1140 | - | let | |
1141 | - | let | |
1142 | - | let | |
1143 | - | let | |
1144 | - | let | |
1145 | - | let | |
1146 | - | let | |
1147 | - | let | |
1148 | - | let | |
1149 | - | let | |
1062 | + | let cw = bh() | |
1063 | + | let cx = bi() | |
1064 | + | let cB = bj() | |
1065 | + | let cC = bk() | |
1066 | + | let hk = aI(aK(cw, cB), aK(cx, cC)) | |
1067 | + | let hl = (cw - cr) | |
1068 | + | let hs = aN((aI(aK(hl, cB), hk) - cx)) | |
1069 | + | let hn = (cx - hs) | |
1070 | + | let ht = fG(dx(), hl, hn) | |
1071 | + | let hp = ht._1 | |
1072 | + | let hq = ht._2 | |
1073 | + | let fK = ht._3 | |
1074 | + | let hr = if ((fK != 0)) | |
1150 | 1075 | then { | |
1151 | - | let | |
1152 | - | if (( | |
1076 | + | let hr = invoke(am(), "exchangeFreeAndLocked", [fK], nil) | |
1077 | + | if ((hr == hr)) | |
1153 | 1078 | then nil | |
1154 | 1079 | else throw("Strict value is not equal to itself.") | |
1155 | 1080 | } | |
1156 | 1081 | else nil | |
1157 | - | if (( | |
1158 | - | then ( | |
1082 | + | if ((hr == hr)) | |
1083 | + | then (gT(hl, hn) ++ gU(hp, hq)) | |
1159 | 1084 | else throw("Strict value is not equal to itself.") | |
1160 | 1085 | } | |
1161 | 1086 | ||
1162 | 1087 | ||
1163 | 1088 | ||
1164 | - | @Callable( | |
1165 | - | func changeSettings ( | |
1089 | + | @Callable(bK) | |
1090 | + | func changeSettings (gt,gu,gv,gw,eB,gx,gy,gz,gA,dQ,gB,gC,gD,gE) = if (if (if (if (if (if (if (if (if (if (if (if (if (if (if (if (if ((0 >= gw)) | |
1166 | 1091 | then true | |
1167 | - | else (0 >= | |
1092 | + | else (0 >= gt)) | |
1168 | 1093 | then true | |
1169 | - | else (0 >= | |
1094 | + | else (0 >= gu)) | |
1170 | 1095 | then true | |
1171 | - | else (0 >= | |
1096 | + | else (0 >= gv)) | |
1172 | 1097 | then true | |
1173 | - | else (0 >= | |
1098 | + | else (0 >= eB)) | |
1174 | 1099 | then true | |
1175 | - | else (0 >= | |
1100 | + | else (0 >= gx)) | |
1176 | 1101 | then true | |
1177 | - | else (0 >= | |
1102 | + | else (0 >= gy)) | |
1178 | 1103 | then true | |
1179 | - | else (0 >= | |
1104 | + | else (0 >= gz)) | |
1180 | 1105 | then true | |
1181 | - | else (0 >= | |
1106 | + | else (0 >= gA)) | |
1182 | 1107 | then true | |
1183 | - | else (0 >= | |
1108 | + | else (0 >= dQ)) | |
1184 | 1109 | then true | |
1185 | - | else (0 >= | |
1110 | + | else (0 >= gB)) | |
1186 | 1111 | then true | |
1187 | - | else ( | |
1112 | + | else (gB > az)) | |
1188 | 1113 | then true | |
1189 | - | else (0 >= | |
1114 | + | else (0 >= gC)) | |
1190 | 1115 | then true | |
1191 | - | else (0 >= | |
1116 | + | else (0 >= gD)) | |
1192 | 1117 | then true | |
1193 | - | else if (( | |
1194 | - | then ( | |
1118 | + | else if ((gE != aF)) | |
1119 | + | then (gE != aE) | |
1195 | 1120 | else false) | |
1196 | 1121 | then true | |
1197 | - | else !( | |
1122 | + | else !(cm())) | |
1198 | 1123 | then true | |
1199 | - | else ( | |
1124 | + | else (bK.caller != ai())) | |
1200 | 1125 | then throw("Invalid changeSettings params") | |
1201 | - | else | |
1126 | + | else gs(gt, gu, gv, gw, eB, gx, gy, gz, gA, dQ, gB, gC, gD, gE) | |
1202 | 1127 | ||
1203 | 1128 | ||
1204 | 1129 | ||
1205 | - | @Callable( | |
1206 | - | func initialize ( | |
1130 | + | @Callable(bK) | |
1131 | + | func initialize (cw,cx,gw,gt,gu,gv,eB,hu,hv,hw,gx,gy,gz,gA,dQ,gB,gC,gD,gE) = if (if (if (if (if (if (if (if (if (if (if (if (if (if (if (if (if (if (if ((0 >= cw)) | |
1207 | 1132 | then true | |
1208 | - | else (0 >= | |
1133 | + | else (0 >= cx)) | |
1209 | 1134 | then true | |
1210 | - | else (0 >= | |
1135 | + | else (0 >= gw)) | |
1211 | 1136 | then true | |
1212 | - | else (0 >= | |
1137 | + | else (0 >= gt)) | |
1213 | 1138 | then true | |
1214 | - | else (0 >= | |
1139 | + | else (0 >= gu)) | |
1215 | 1140 | then true | |
1216 | - | else (0 >= | |
1141 | + | else (0 >= gv)) | |
1217 | 1142 | then true | |
1218 | - | else (0 >= | |
1143 | + | else (0 >= eB)) | |
1219 | 1144 | then true | |
1220 | - | else (0 >= | |
1145 | + | else (0 >= gx)) | |
1221 | 1146 | then true | |
1222 | - | else (0 >= | |
1147 | + | else (0 >= gy)) | |
1223 | 1148 | then true | |
1224 | - | else (0 >= | |
1149 | + | else (0 >= gz)) | |
1225 | 1150 | then true | |
1226 | - | else (0 >= | |
1151 | + | else (0 >= gA)) | |
1227 | 1152 | then true | |
1228 | - | else (0 >= | |
1153 | + | else (0 >= dQ)) | |
1229 | 1154 | then true | |
1230 | - | else (0 >= | |
1155 | + | else (0 >= gB)) | |
1231 | 1156 | then true | |
1232 | - | else ( | |
1157 | + | else (gB > az)) | |
1233 | 1158 | then true | |
1234 | - | else (0 >= | |
1159 | + | else (0 >= gC)) | |
1235 | 1160 | then true | |
1236 | - | else (0 >= | |
1161 | + | else (0 >= gD)) | |
1237 | 1162 | then true | |
1238 | - | else if (( | |
1239 | - | then ( | |
1163 | + | else if ((gE != aF)) | |
1164 | + | then (gE != aE) | |
1240 | 1165 | else false) | |
1241 | 1166 | then true | |
1242 | - | else | |
1167 | + | else cm()) | |
1243 | 1168 | then true | |
1244 | - | else ( | |
1169 | + | else (bK.caller != this)) | |
1245 | 1170 | then throw("Invalid initialize parameters") | |
1246 | - | else (((( | |
1171 | + | else ((((gV(cw, cx, 0, 0, 0, 0, 0, 0) ++ gs(gt, gu, gv, gw, eB, gx, gy, gz, gA, dQ, gB, gC, gD, gE)) ++ gF((bI() + gw), 0, 0, 0, 0)) ++ hg(0)) ++ [BooleanEntry(m, true), StringEntry(a, hu), StringEntry(b, hv), StringEntry(T, toString(addressFromStringValue(hw)))]) | |
1247 | 1172 | ||
1248 | 1173 | ||
1249 | 1174 | ||
1250 | - | @Callable( | |
1251 | - | func increasePosition ( | |
1252 | - | let | |
1253 | - | if (( | |
1175 | + | @Callable(bK) | |
1176 | + | func increasePosition (hx,hy,hz,hA) = { | |
1177 | + | let hB = invoke(this, "syncTerminalPriceToOracle", nil, nil) | |
1178 | + | if ((hB == hB)) | |
1254 | 1179 | then { | |
1255 | - | let | |
1256 | - | if (( | |
1180 | + | let hC = invoke(this, "ensureCalledOnce", nil, nil) | |
1181 | + | if ((hC == hC)) | |
1257 | 1182 | then { | |
1258 | - | let | |
1259 | - | let | |
1260 | - | let | |
1261 | - | let | |
1262 | - | let | |
1263 | - | if (if (if (if (if (if (if (if (if (if (( | |
1264 | - | then ( | |
1183 | + | let bT = bJ(bK) | |
1184 | + | let hD = bK.payments[0].amount | |
1185 | + | let gf = bK.payments[0].assetId | |
1186 | + | let hE = toBase58String(value(gf)) | |
1187 | + | let hF = (gf == aj()) | |
1188 | + | if (if (if (if (if (if (if (if (if (if ((hx != au)) | |
1189 | + | then (hx != av) | |
1265 | 1190 | else false) | |
1266 | 1191 | then true | |
1267 | - | else (0 >= | |
1192 | + | else (0 >= hD)) | |
1268 | 1193 | then true | |
1269 | - | else !( | |
1194 | + | else !(cm())) | |
1270 | 1195 | then true | |
1271 | - | else !( | |
1196 | + | else !(hF)) | |
1272 | 1197 | then true | |
1273 | - | else !( | |
1198 | + | else !(ge(bT, hE))) | |
1274 | 1199 | then true | |
1275 | - | else !( | |
1200 | + | else !(bL(aI(az, hy), bg(), true))) | |
1276 | 1201 | then true | |
1277 | - | else | |
1202 | + | else cn()) | |
1278 | 1203 | then true | |
1279 | - | else | |
1204 | + | else co()) | |
1280 | 1205 | then true | |
1281 | - | else | |
1206 | + | else dD()) | |
1282 | 1207 | then throw("Invalid increasePosition parameters") | |
1283 | 1208 | else { | |
1284 | - | let | |
1285 | - | let | |
1286 | - | let | |
1287 | - | let | |
1288 | - | let | |
1289 | - | let | |
1290 | - | if (( | |
1209 | + | let hG = gh(bT, gm(bK)) | |
1210 | + | let gc = hG._1 | |
1211 | + | let gd = hG._2 | |
1212 | + | let he = aI(hD, (aK(gc, hy) + az)) | |
1213 | + | let hH = (hD - he) | |
1214 | + | let hI = invoke(ap(), "acceptPaymentWithLink", [bT, hA], [AttachedPayment(aj(), hH)]) | |
1215 | + | if ((hI == hI)) | |
1291 | 1216 | then { | |
1292 | - | let | |
1293 | - | let | |
1294 | - | if ($isInstanceOf( | |
1217 | + | let hJ = { | |
1218 | + | let bV = hI | |
1219 | + | if ($isInstanceOf(bV, "Int")) | |
1295 | 1220 | then { | |
1296 | - | let | |
1297 | - | | |
1221 | + | let gk = bV | |
1222 | + | gk | |
1298 | 1223 | } | |
1299 | 1224 | else throw("Invalid referrerFee") | |
1300 | 1225 | } | |
1301 | - | let | |
1302 | - | let | |
1303 | - | let | |
1304 | - | let | |
1305 | - | let | |
1306 | - | let | |
1307 | - | let | |
1308 | - | let | |
1309 | - | let | |
1310 | - | then ( | |
1311 | - | else ( | |
1312 | - | let | |
1313 | - | then | |
1226 | + | let hK = (hH - hJ) | |
1227 | + | let hL = bS(bT) | |
1228 | + | let eG = hL._1 | |
1229 | + | let eH = hL._2 | |
1230 | + | let eI = hL._3 | |
1231 | + | let eJ = hL._4 | |
1232 | + | let eK = hL._5 | |
1233 | + | let hM = (eG == 0) | |
1234 | + | let hN = if ((eG > 0)) | |
1235 | + | then (hx == au) | |
1236 | + | else (hx == av) | |
1237 | + | let hO = if (!(hM)) | |
1238 | + | then hN | |
1314 | 1239 | else false | |
1315 | - | let | |
1316 | - | let | |
1240 | + | let hP = (hx == au) | |
1241 | + | let hQ = if (if (hM) | |
1317 | 1242 | then true | |
1318 | - | else | |
1243 | + | else hO) | |
1319 | 1244 | then { | |
1320 | - | let | |
1321 | - | let | |
1322 | - | let | |
1323 | - | let | |
1324 | - | let | |
1325 | - | let | |
1326 | - | if (if (( | |
1327 | - | then ( | |
1245 | + | let hR = aK(he, hy) | |
1246 | + | let hS = cA(hP, hR) | |
1247 | + | let cH = hS._1 | |
1248 | + | let cE = hS._2 | |
1249 | + | let cF = hS._3 | |
1250 | + | let eQ = hS._4 | |
1251 | + | if (if ((hz != 0)) | |
1252 | + | then (hz > aN(cH)) | |
1328 | 1253 | else false) | |
1329 | - | then throw(((("Limit error: " + toString( | |
1254 | + | then throw(((("Limit error: " + toString(aN(cH))) + " < ") + toString(hz))) | |
1330 | 1255 | else { | |
1331 | - | let | |
1332 | - | let | |
1333 | - | then | |
1256 | + | let fe = (eG + cH) | |
1257 | + | let hT = (bo() + (if ((fe > 0)) | |
1258 | + | then hR | |
1334 | 1259 | else 0)) | |
1335 | - | let | |
1336 | - | then | |
1260 | + | let hU = (bn() + (if ((0 > fe)) | |
1261 | + | then hR | |
1337 | 1262 | else 0)) | |
1338 | - | let | |
1339 | - | let | |
1340 | - | let | |
1341 | - | let | |
1342 | - | let | |
1343 | - | if (!( | |
1263 | + | let hV = cW(eG, eH, eJ, eK, he) | |
1264 | + | let de = hV._1 | |
1265 | + | let eY = hV._2 | |
1266 | + | let eZ = hV._3 | |
1267 | + | let cV = hV._4 | |
1268 | + | if (!(dJ(cE, cF))) | |
1344 | 1269 | then throw("Over max spread limit") | |
1345 | - | else if (!( | |
1270 | + | else if (!(dN(hT, hU))) | |
1346 | 1271 | then throw("Over max open notional") | |
1347 | - | else $Tuple14( | |
1348 | - | then | |
1349 | - | else 0)), ( | |
1350 | - | then | |
1351 | - | else 0)), | |
1272 | + | else $Tuple14(fe, de, (eI + hR), bQ(fe), bI(), cF, cE, eQ, (bm() + hR), (bD() + (if ((fe > 0)) | |
1273 | + | then aN(cH) | |
1274 | + | else 0)), (bC() + (if ((0 > fe)) | |
1275 | + | then aN(cH) | |
1276 | + | else 0)), hT, hU, cV) | |
1352 | 1277 | } | |
1353 | 1278 | } | |
1354 | 1279 | else { | |
1355 | - | let | |
1356 | - | let | |
1357 | - | let | |
1358 | - | let | |
1359 | - | if (( | |
1280 | + | let hR = aK(he, hy) | |
1281 | + | let hW = ed(toString(bK.caller), aC) | |
1282 | + | let eT = hW._1 | |
1283 | + | let ec = hW._2 | |
1284 | + | if ((eT > hR)) | |
1360 | 1285 | then throw("Use decreasePosition to decrease position size") | |
1361 | 1286 | else throw("Close position first") | |
1362 | 1287 | } | |
1363 | - | let | |
1364 | - | let | |
1365 | - | let | |
1366 | - | let | |
1367 | - | let | |
1368 | - | let | |
1369 | - | let | |
1370 | - | let | |
1371 | - | let | |
1372 | - | let | |
1373 | - | let | |
1374 | - | let | |
1375 | - | let | |
1376 | - | let | |
1377 | - | let | |
1378 | - | let | |
1379 | - | let | |
1380 | - | let | |
1381 | - | then invoke( | |
1382 | - | else invoke( | |
1383 | - | if (( | |
1288 | + | let fe = hQ._1 | |
1289 | + | let hX = hQ._2 | |
1290 | + | let fg = hQ._3 | |
1291 | + | let hY = hQ._4 | |
1292 | + | let hZ = hQ._5 | |
1293 | + | let cF = hQ._6 | |
1294 | + | let cE = hQ._7 | |
1295 | + | let eQ = hQ._8 | |
1296 | + | let ia = hQ._9 | |
1297 | + | let ib = hQ._10 | |
1298 | + | let ic = hQ._11 | |
1299 | + | let hT = hQ._12 | |
1300 | + | let hU = hQ._13 | |
1301 | + | let cV = hQ._14 | |
1302 | + | let id = go((hK + cV)) | |
1303 | + | let gq = id._1 | |
1304 | + | let gr = id._2 | |
1305 | + | let ie = if ((he >= cV)) | |
1306 | + | then invoke(am(), "addLocked", nil, [AttachedPayment(aj(), (he - cV))]) | |
1307 | + | else invoke(am(), "withdrawLocked", [(cV - he)], nil) | |
1308 | + | if ((ie == ie)) | |
1384 | 1309 | then { | |
1385 | - | let | |
1386 | - | if (( | |
1310 | + | let if = invoke(am(), "addFree", nil, [AttachedPayment(aj(), gr)]) | |
1311 | + | if ((if == if)) | |
1387 | 1312 | then { | |
1388 | - | let | |
1389 | - | if (( | |
1313 | + | let ig = invoke(an(), "notifyFees", [bT, hK], nil) | |
1314 | + | if ((ig == ig)) | |
1390 | 1315 | then { | |
1391 | - | let | |
1392 | - | if (( | |
1393 | - | then (((((( | |
1316 | + | let ih = invoke(an(), "notifyNotional", [bT, fg], nil) | |
1317 | + | if ((ih == ih)) | |
1318 | + | then ((((((gP(bT, fe, hX, fg, hY, hZ) ++ gL(hM, bT)) ++ gO(hM, bT, gc)) ++ gV(cE, cF, eQ, ia, ib, ic, hT, hU)) ++ hh(gq)) ++ hg(((bd() + he) - cV))) ++ hi(gd, bK)) | |
1394 | 1319 | else throw("Strict value is not equal to itself.") | |
1395 | 1320 | } | |
1396 | 1321 | else throw("Strict value is not equal to itself.") | |
1409 | 1334 | ||
1410 | 1335 | ||
1411 | 1336 | ||
1412 | - | @Callable( | |
1337 | + | @Callable(bK) | |
1413 | 1338 | func addMargin () = { | |
1414 | - | let | |
1415 | - | if (( | |
1339 | + | let hB = invoke(this, "syncTerminalPriceToOracle", nil, nil) | |
1340 | + | if ((hB == hB)) | |
1416 | 1341 | then { | |
1417 | - | let | |
1418 | - | if (( | |
1342 | + | let hC = invoke(this, "ensureCalledOnce", nil, nil) | |
1343 | + | if ((hC == hC)) | |
1419 | 1344 | then { | |
1420 | - | let | |
1421 | - | let | |
1422 | - | let | |
1423 | - | let | |
1424 | - | let | |
1425 | - | if (if (if (if (if (if (if (!( | |
1345 | + | let bT = toString(bK.caller) | |
1346 | + | let he = bK.payments[0].amount | |
1347 | + | let gf = bK.payments[0].assetId | |
1348 | + | let hE = toBase58String(value(gf)) | |
1349 | + | let hF = (gf == aj()) | |
1350 | + | if (if (if (if (if (if (if (!(hF)) | |
1426 | 1351 | then true | |
1427 | - | else !( | |
1352 | + | else !(cd(toString(bK.caller)))) | |
1428 | 1353 | then true | |
1429 | - | else !( | |
1354 | + | else !(gg(bT, hE))) | |
1430 | 1355 | then true | |
1431 | - | else !( | |
1356 | + | else !(cm())) | |
1432 | 1357 | then true | |
1433 | - | else | |
1358 | + | else cn()) | |
1434 | 1359 | then true | |
1435 | - | else | |
1360 | + | else co()) | |
1436 | 1361 | then true | |
1437 | - | else | |
1362 | + | else dD()) | |
1438 | 1363 | then throw("Invalid addMargin parameters") | |
1439 | 1364 | else { | |
1440 | - | let | |
1441 | - | let | |
1442 | - | let | |
1443 | - | let | |
1444 | - | let | |
1445 | - | let | |
1446 | - | let | |
1447 | - | if (( | |
1365 | + | let ii = bS(bT) | |
1366 | + | let eG = ii._1 | |
1367 | + | let eH = ii._2 | |
1368 | + | let eI = ii._3 | |
1369 | + | let eJ = ii._4 | |
1370 | + | let eK = ii._5 | |
1371 | + | let ie = invoke(am(), "addLocked", nil, [AttachedPayment(aj(), he)]) | |
1372 | + | if ((ie == ie)) | |
1448 | 1373 | then { | |
1449 | - | let | |
1450 | - | let | |
1374 | + | let cV = cR(eH, eK) | |
1375 | + | let ij = if ((cV > 0)) | |
1451 | 1376 | then { | |
1452 | - | let | |
1453 | - | let | |
1454 | - | let | |
1455 | - | let | |
1456 | - | if (( | |
1377 | + | let ik = go(cV) | |
1378 | + | let gq = ik._1 | |
1379 | + | let gr = ik._2 | |
1380 | + | let il = invoke(am(), "withdrawLocked", [gq], nil) | |
1381 | + | if ((il == il)) | |
1457 | 1382 | then { | |
1458 | - | let | |
1459 | - | if (( | |
1460 | - | then | |
1383 | + | let im = invoke(am(), "exchangeFreeAndLocked", [-(gr)], nil) | |
1384 | + | if ((im == im)) | |
1385 | + | then hh(gq) | |
1461 | 1386 | else throw("Strict value is not equal to itself.") | |
1462 | 1387 | } | |
1463 | 1388 | else throw("Strict value is not equal to itself.") | |
1464 | 1389 | } | |
1465 | 1390 | else nil | |
1466 | - | if (( | |
1467 | - | then (( | |
1391 | + | if ((ij == ij)) | |
1392 | + | then ((gP(bT, eG, ((eH - cV) + he), eI, eJ, bI()) ++ hg(((bd() + he) - cV))) ++ ij) | |
1468 | 1393 | else throw("Strict value is not equal to itself.") | |
1469 | 1394 | } | |
1470 | 1395 | else throw("Strict value is not equal to itself.") | |
1477 | 1402 | ||
1478 | 1403 | ||
1479 | 1404 | ||
1480 | - | @Callable( | |
1481 | - | func removeMargin ( | |
1482 | - | let | |
1483 | - | if (( | |
1405 | + | @Callable(bK) | |
1406 | + | func removeMargin (he) = { | |
1407 | + | let hB = invoke(this, "syncTerminalPriceToOracle", nil, nil) | |
1408 | + | if ((hB == hB)) | |
1484 | 1409 | then { | |
1485 | - | let | |
1486 | - | if (( | |
1410 | + | let hC = invoke(this, "ensureCalledOnce", nil, nil) | |
1411 | + | if ((hC == hC)) | |
1487 | 1412 | then { | |
1488 | - | let | |
1489 | - | if (if (if (if (if ((0 >= | |
1413 | + | let bT = toString(bK.caller) | |
1414 | + | if (if (if (if (if ((0 >= he)) | |
1490 | 1415 | then true | |
1491 | - | else !( | |
1416 | + | else !(cd(bT))) | |
1492 | 1417 | then true | |
1493 | - | else !( | |
1418 | + | else !(cm())) | |
1494 | 1419 | then true | |
1495 | - | else | |
1420 | + | else cn()) | |
1496 | 1421 | then true | |
1497 | - | else | |
1422 | + | else dD()) | |
1498 | 1423 | then throw("Invalid removeMargin parameters") | |
1499 | 1424 | else { | |
1500 | - | let | |
1501 | - | let | |
1502 | - | let | |
1503 | - | let | |
1504 | - | let | |
1505 | - | let | |
1506 | - | let | |
1507 | - | let | |
1508 | - | let | |
1509 | - | let | |
1510 | - | let | |
1511 | - | if (( | |
1425 | + | let in = bS(bT) | |
1426 | + | let eG = in._1 | |
1427 | + | let eH = in._2 | |
1428 | + | let eI = in._3 | |
1429 | + | let eJ = in._4 | |
1430 | + | let eK = in._5 | |
1431 | + | let io = cW(eG, eH, eJ, eK, -(he)) | |
1432 | + | let de = io._1 | |
1433 | + | let df = io._2 | |
1434 | + | let da = io._3 | |
1435 | + | let cV = io._4 | |
1436 | + | if ((df != 0)) | |
1512 | 1437 | then throw("Invalid removed margin amount") | |
1513 | 1438 | else { | |
1514 | - | let | |
1515 | - | if (!( | |
1516 | - | then throw(((("Too much margin removed: " + toString( | |
1439 | + | let fj = ei(de, df, eI) | |
1440 | + | if (!(bL(fj, bg(), true))) | |
1441 | + | then throw(((("Too much margin removed: " + toString(fj)) + " < ") + toString(bg()))) | |
1517 | 1442 | else { | |
1518 | - | let | |
1519 | - | let | |
1520 | - | let | |
1521 | - | let | |
1443 | + | let ip = go(cV) | |
1444 | + | let gq = ip._1 | |
1445 | + | let gr = ip._2 | |
1446 | + | let ij = if ((cV > 0)) | |
1522 | 1447 | then { | |
1523 | - | let | |
1524 | - | if (( | |
1525 | - | then | |
1448 | + | let im = invoke(am(), "exchangeFreeAndLocked", [-(gr)], nil) | |
1449 | + | if ((im == im)) | |
1450 | + | then hh(gq) | |
1526 | 1451 | else throw("Strict value is not equal to itself.") | |
1527 | 1452 | } | |
1528 | 1453 | else nil | |
1529 | - | if (( | |
1454 | + | if ((ij == ij)) | |
1530 | 1455 | then { | |
1531 | - | let | |
1532 | - | if (( | |
1533 | - | then ((( | |
1456 | + | let il = invoke(am(), "withdrawLocked", [(he + gq)], nil) | |
1457 | + | if ((il == il)) | |
1458 | + | then (((gP(bT, eG, de, eI, bQ(eG), bI()) ++ hd(bK.caller, he)) ++ hg(((bd() - he) - cV))) ++ ij) | |
1534 | 1459 | else throw("Strict value is not equal to itself.") | |
1535 | 1460 | } | |
1536 | 1461 | else throw("Strict value is not equal to itself.") | |
1545 | 1470 | ||
1546 | 1471 | ||
1547 | 1472 | ||
1548 | - | @Callable( | |
1549 | - | func closePosition ( | |
1550 | - | let | |
1551 | - | if (( | |
1473 | + | @Callable(bK) | |
1474 | + | func closePosition (eA,eC,eD) = { | |
1475 | + | let hB = invoke(this, "syncTerminalPriceToOracle", nil, nil) | |
1476 | + | if ((hB == hB)) | |
1552 | 1477 | then { | |
1553 | - | let | |
1554 | - | if (( | |
1478 | + | let hC = invoke(this, "ensureCalledOnce", nil, nil) | |
1479 | + | if ((hC == hC)) | |
1555 | 1480 | then { | |
1556 | - | let | |
1557 | - | let | |
1558 | - | let | |
1559 | - | if (if (if (if (if (if (!( | |
1481 | + | let bT = bJ(bK) | |
1482 | + | let iq = valueOrErrorMessage(addressFromString(bT), "Invalid caller") | |
1483 | + | let cc = ca(bT) | |
1484 | + | if (if (if (if (if (if (!(cd(bT))) | |
1560 | 1485 | then true | |
1561 | - | else !( | |
1486 | + | else !(cm())) | |
1562 | 1487 | then true | |
1563 | - | else | |
1488 | + | else cn()) | |
1564 | 1489 | then true | |
1565 | - | else (0 >= | |
1490 | + | else (0 >= eA)) | |
1566 | 1491 | then true | |
1567 | - | else (0 > | |
1492 | + | else (0 > eC)) | |
1568 | 1493 | then true | |
1569 | - | else | |
1494 | + | else dD()) | |
1570 | 1495 | then throw("Invalid closePosition parameters") | |
1571 | 1496 | else { | |
1572 | - | let | |
1573 | - | let | |
1574 | - | let | |
1575 | - | let | |
1576 | - | let | |
1577 | - | let | |
1578 | - | let | |
1579 | - | let | |
1580 | - | let | |
1581 | - | let | |
1582 | - | let | |
1583 | - | let | |
1584 | - | let | |
1585 | - | let | |
1586 | - | let | |
1587 | - | let | |
1588 | - | let | |
1589 | - | let | |
1590 | - | if (( | |
1497 | + | let eK = bS(bT)._5 | |
1498 | + | let ir = ez(bT, eA, cc, eC, eD, true, true) | |
1499 | + | let fe = ir._1 | |
1500 | + | let fn = ir._2 | |
1501 | + | let fg = ir._3 | |
1502 | + | let fh = ir._4 | |
1503 | + | let fa = ir._5 | |
1504 | + | let eV = ir._6 | |
1505 | + | let fm = ir._7 | |
1506 | + | let cE = ir._8 | |
1507 | + | let cF = ir._9 | |
1508 | + | let eQ = ir._10 | |
1509 | + | let ia = ir._11 | |
1510 | + | let ib = ir._12 | |
1511 | + | let ic = ir._13 | |
1512 | + | let hT = ir._14 | |
1513 | + | let hU = ir._15 | |
1514 | + | let is = ir._16 | |
1515 | + | if ((fa > 0)) | |
1591 | 1516 | then throw("Invalid closePosition parameters: bad debt") | |
1592 | - | else if (( | |
1517 | + | else if ((eK >= bI())) | |
1593 | 1518 | then throw("Invalid closePosition parameters: wait at least 1 block before closing the position") | |
1594 | 1519 | else { | |
1595 | - | let | |
1596 | - | let | |
1597 | - | let | |
1598 | - | let | |
1520 | + | let eN = (fe != 0) | |
1521 | + | let it = (fm + is) | |
1522 | + | let iu = (bd() - it) | |
1523 | + | let iv = if ((0 > iu)) | |
1599 | 1524 | then 0 | |
1600 | - | else | |
1601 | - | let | |
1602 | - | if (( | |
1525 | + | else iu | |
1526 | + | let il = invoke(am(), "withdrawLocked", [it], nil) | |
1527 | + | if ((il == il)) | |
1603 | 1528 | then { | |
1604 | - | let | |
1605 | - | let | |
1606 | - | let | |
1607 | - | let | |
1608 | - | if (( | |
1529 | + | let iw = go(is) | |
1530 | + | let gq = iw._1 | |
1531 | + | let gr = iw._2 | |
1532 | + | let if = invoke(am(), "addFree", nil, [AttachedPayment(aj(), gr)]) | |
1533 | + | if ((if == if)) | |
1609 | 1534 | then { | |
1610 | - | let | |
1611 | - | if (( | |
1535 | + | let ig = invoke(an(), "notifyFees", [bT, is], nil) | |
1536 | + | if ((ig == ig)) | |
1612 | 1537 | then { | |
1613 | - | let | |
1614 | - | if (( | |
1615 | - | then (((((if ( | |
1616 | - | then | |
1617 | - | else | |
1618 | - | then | |
1619 | - | else nil)) ++ | |
1538 | + | let ih = invoke(an(), "notifyNotional", [bT, fg], nil) | |
1539 | + | if ((ih == ih)) | |
1540 | + | then (((((if (eN) | |
1541 | + | then gP(bT, fe, fn, fg, fh, bI()) | |
1542 | + | else hc(bT)) ++ gV(cE, cF, eQ, ia, ib, ic, hT, hU)) ++ (if ((fm > 0)) | |
1543 | + | then hd(iq, fm) | |
1544 | + | else nil)) ++ hg(iv)) ++ hh(gq)) | |
1620 | 1545 | else throw("Strict value is not equal to itself.") | |
1621 | 1546 | } | |
1622 | 1547 | else throw("Strict value is not equal to itself.") | |
1634 | 1559 | ||
1635 | 1560 | ||
1636 | 1561 | ||
1637 | - | @Callable( | |
1638 | - | func liquidate ( | |
1639 | - | let | |
1640 | - | if (( | |
1562 | + | @Callable(bK) | |
1563 | + | func liquidate (bT) = { | |
1564 | + | let hB = invoke(this, "syncTerminalPriceToOracle", nil, nil) | |
1565 | + | if ((hB == hB)) | |
1641 | 1566 | then { | |
1642 | - | let | |
1643 | - | let | |
1567 | + | let ix = em(bT, aC) | |
1568 | + | let iy = if (dS()) | |
1644 | 1569 | then { | |
1645 | - | let | |
1646 | - | | |
1570 | + | let iz = em(bT, aD) | |
1571 | + | aO(ix, iz) | |
1647 | 1572 | } | |
1648 | - | else | |
1649 | - | if (if (if (if (if (!( | |
1573 | + | else ix | |
1574 | + | if (if (if (if (if (!(bL(iy, bt(), false))) | |
1650 | 1575 | then true | |
1651 | - | else !( | |
1576 | + | else !(cd(bT))) | |
1652 | 1577 | then true | |
1653 | - | else !( | |
1578 | + | else !(cm())) | |
1654 | 1579 | then true | |
1655 | - | else | |
1580 | + | else cn()) | |
1656 | 1581 | then true | |
1657 | - | else | |
1582 | + | else dD()) | |
1658 | 1583 | then throw("Unable to liquidate") | |
1659 | 1584 | else { | |
1660 | - | let | |
1661 | - | then ( | |
1585 | + | let iA = if (if ((ix > bu())) | |
1586 | + | then (bv() > 0) | |
1662 | 1587 | else false) | |
1663 | - | then ( | |
1588 | + | then (az > bv()) | |
1664 | 1589 | else false | |
1665 | - | let | |
1666 | - | let | |
1667 | - | let | |
1590 | + | let eG = bS(bT)._1 | |
1591 | + | let dW = aN(eG) | |
1592 | + | let iB = if (iA) | |
1668 | 1593 | then { | |
1669 | - | let | |
1670 | - | let | |
1671 | - | $Tuple2( | |
1594 | + | let iC = eu(bT, eG) | |
1595 | + | let iD = aI(aN(iC), dW) | |
1596 | + | $Tuple2(iD, aN(iC)) | |
1672 | 1597 | } | |
1673 | - | else $Tuple2(0, | |
1674 | - | let | |
1675 | - | let | |
1676 | - | let | |
1677 | - | then | |
1678 | - | else | |
1679 | - | let | |
1680 | - | let | |
1681 | - | let | |
1682 | - | let | |
1683 | - | let | |
1684 | - | let | |
1685 | - | let | |
1686 | - | let | |
1687 | - | let | |
1688 | - | let | |
1689 | - | let | |
1690 | - | let | |
1691 | - | let | |
1692 | - | let | |
1693 | - | let | |
1694 | - | let | |
1695 | - | let | |
1696 | - | let | |
1697 | - | let | |
1698 | - | let | |
1598 | + | else $Tuple2(0, dW) | |
1599 | + | let iD = iB._1 | |
1600 | + | let iC = iB._2 | |
1601 | + | let iE = ez(bT, if (iA) | |
1602 | + | then iC | |
1603 | + | else dW, bu(), 0, true, false, true) | |
1604 | + | let fe = iE._1 | |
1605 | + | let fn = iE._2 | |
1606 | + | let fg = iE._3 | |
1607 | + | let fh = iE._4 | |
1608 | + | let fa = iE._5 | |
1609 | + | let eV = iE._6 | |
1610 | + | let fm = iE._7 | |
1611 | + | let cE = iE._8 | |
1612 | + | let cF = iE._9 | |
1613 | + | let eQ = iE._10 | |
1614 | + | let ia = iE._11 | |
1615 | + | let ib = iE._12 | |
1616 | + | let ic = iE._13 | |
1617 | + | let hT = iE._14 | |
1618 | + | let hU = iE._15 | |
1619 | + | let iF = iE._16 | |
1620 | + | let iG = (iF / 2) | |
1621 | + | let gr = (iF - iG) | |
1622 | + | let iu = (bd() - iF) | |
1623 | + | let iH = if ((0 > iu)) | |
1699 | 1624 | then 0 | |
1700 | - | else | |
1701 | - | let | |
1625 | + | else iu | |
1626 | + | let im = if ((fa > 0)) | |
1702 | 1627 | then { | |
1703 | - | let | |
1704 | - | if (( | |
1628 | + | let im = invoke(am(), "exchangeFreeAndLocked", [(fa + iF)], nil) | |
1629 | + | if ((im == im)) | |
1705 | 1630 | then nil | |
1706 | 1631 | else throw("Strict value is not equal to itself.") | |
1707 | 1632 | } | |
1708 | 1633 | else nil | |
1709 | - | if (( | |
1634 | + | if ((im == im)) | |
1710 | 1635 | then { | |
1711 | - | let | |
1712 | - | if (( | |
1636 | + | let il = invoke(am(), "withdrawLocked", [iF], nil) | |
1637 | + | if ((il == il)) | |
1713 | 1638 | then { | |
1714 | - | let | |
1715 | - | if (( | |
1639 | + | let iI = invoke(am(), "addFree", nil, [AttachedPayment(aj(), gr)]) | |
1640 | + | if ((iI == iI)) | |
1716 | 1641 | then { | |
1717 | - | let | |
1718 | - | if (( | |
1719 | - | then ((((if ( | |
1720 | - | then | |
1721 | - | else | |
1642 | + | let ih = invoke(an(), "notifyNotional", [bT, fg], nil) | |
1643 | + | if ((ih == ih)) | |
1644 | + | then ((((if (iA) | |
1645 | + | then gP(bT, fe, fn, fg, fh, bI()) | |
1646 | + | else hc(bT)) ++ gV(cE, cF, eQ, ia, ib, ic, hT, hU)) ++ hd(bK.caller, iG)) ++ hg(iH)) | |
1722 | 1647 | else throw("Strict value is not equal to itself.") | |
1723 | 1648 | } | |
1724 | 1649 | else throw("Strict value is not equal to itself.") | |
1733 | 1658 | ||
1734 | 1659 | ||
1735 | 1660 | ||
1736 | - | @Callable( | |
1661 | + | @Callable(bK) | |
1737 | 1662 | func payFunding () = { | |
1738 | - | let | |
1739 | - | if (( | |
1663 | + | let hB = invoke(this, "syncTerminalPriceToOracle", nil, nil) | |
1664 | + | if ((hB == hB)) | |
1740 | 1665 | then { | |
1741 | - | let | |
1742 | - | if (if (if (( | |
1666 | + | let iJ = bp() | |
1667 | + | if (if (if ((iJ > bI())) | |
1743 | 1668 | then true | |
1744 | - | else !( | |
1669 | + | else !(cm())) | |
1745 | 1670 | then true | |
1746 | - | else | |
1747 | - | then throw(((("Invalid funding block timestamp: " + toString( | |
1671 | + | else cn()) | |
1672 | + | then throw(((("Invalid funding block timestamp: " + toString(bI())) + " < ") + toString(iJ))) | |
1748 | 1673 | else { | |
1749 | - | let | |
1750 | - | let | |
1751 | - | let | |
1752 | - | let | |
1753 | - | let | |
1754 | - | let | |
1674 | + | let fM = dx() | |
1675 | + | let iK = fL() | |
1676 | + | let fP = iK._1 | |
1677 | + | let fQ = iK._2 | |
1678 | + | let fT = iK._3 | |
1679 | + | let iL = if ((fT > 0)) | |
1755 | 1680 | then { | |
1756 | - | let | |
1757 | - | if (( | |
1681 | + | let iL = invoke(am(), "exchangeFreeAndLocked", [-(fT)], nil) | |
1682 | + | if ((iL == iL)) | |
1758 | 1683 | then nil | |
1759 | 1684 | else throw("Strict value is not equal to itself.") | |
1760 | 1685 | } | |
1761 | 1686 | else nil | |
1762 | - | if (( | |
1763 | - | then | |
1687 | + | if ((iL == iL)) | |
1688 | + | then gF((iJ + bs()), (bA() + fQ), (bB() + fP), aI(fQ, fM), aI(fP, fM)) | |
1764 | 1689 | else throw("Strict value is not equal to itself.") | |
1765 | 1690 | } | |
1766 | 1691 | } | |
1769 | 1694 | ||
1770 | 1695 | ||
1771 | 1696 | ||
1772 | - | @Callable( | |
1697 | + | @Callable(bK) | |
1773 | 1698 | func syncTerminalPriceToOracle () = { | |
1774 | - | let | |
1775 | - | let | |
1776 | - | let | |
1777 | - | let | |
1778 | - | let | |
1779 | - | let | |
1780 | - | let | |
1781 | - | then ( | |
1699 | + | let cw = bh() | |
1700 | + | let cx = bi() | |
1701 | + | let iM = fG(dx(), cw, cx) | |
1702 | + | let hp = iM._1 | |
1703 | + | let hq = iM._2 | |
1704 | + | let fK = iM._3 | |
1705 | + | let iN = if (if ((0 > fK)) | |
1706 | + | then (aN(fK) > bd()) | |
1782 | 1707 | else false) | |
1783 | - | then -( | |
1784 | - | else | |
1785 | - | let | |
1708 | + | then -(bd()) | |
1709 | + | else fK | |
1710 | + | let hr = if ((iN != 0)) | |
1786 | 1711 | then { | |
1787 | - | let | |
1788 | - | if (( | |
1712 | + | let hr = invoke(am(), "exchangeFreeAndLocked", [iN], nil) | |
1713 | + | if ((hr == hr)) | |
1789 | 1714 | then nil | |
1790 | 1715 | else throw("Strict value is not equal to itself.") | |
1791 | 1716 | } | |
1792 | 1717 | else nil | |
1793 | - | if (( | |
1794 | - | then ( | |
1718 | + | if ((hr == hr)) | |
1719 | + | then (hg((bd() + iN)) ++ gU(hp, hq)) | |
1795 | 1720 | else throw("Strict value is not equal to itself.") | |
1796 | 1721 | } | |
1797 | 1722 | ||
1798 | 1723 | ||
1799 | 1724 | ||
1800 | - | @Callable( | |
1801 | - | func ensureCalledOnce () = if (( | |
1725 | + | @Callable(bK) | |
1726 | + | func ensureCalledOnce () = if ((bK.caller != this)) | |
1802 | 1727 | then throw("Invalid saveCurrentTxId parameters") | |
1803 | 1728 | else { | |
1804 | - | let | |
1805 | - | if (( | |
1806 | - | then [StringEntry( | |
1729 | + | let iO = valueOrElse(getString(this, S), "") | |
1730 | + | if ((iO != toBase58String(bK.transactionId))) | |
1731 | + | then [StringEntry(S, iO)] | |
1807 | 1732 | else throw("Can not call vAMM methods twice in one tx") | |
1808 | 1733 | } | |
1809 | 1734 | ||
1810 | 1735 | ||
1811 | 1736 | ||
1812 | - | @Callable( | |
1813 | - | func view_calcRemainMarginWithFundingPayment ( | |
1814 | - | let | |
1815 | - | if (( | |
1737 | + | @Callable(bK) | |
1738 | + | func view_calcRemainMarginWithFundingPayment (bT) = { | |
1739 | + | let hB = invoke(this, "syncTerminalPriceToOracle", nil, nil) | |
1740 | + | if ((hB == hB)) | |
1816 | 1741 | then { | |
1817 | - | let | |
1818 | - | let | |
1819 | - | let | |
1820 | - | let | |
1821 | - | let | |
1822 | - | let | |
1823 | - | let | |
1824 | - | let | |
1825 | - | let | |
1826 | - | let | |
1827 | - | let | |
1828 | - | let | |
1829 | - | let | |
1830 | - | let | |
1831 | - | throw((((((( | |
1742 | + | let iP = bS(bT) | |
1743 | + | let bW = iP._1 | |
1744 | + | let ef = iP._2 | |
1745 | + | let eo = iP._3 | |
1746 | + | let eh = iP._4 | |
1747 | + | let eq = iP._5 | |
1748 | + | let iQ = ed(bT, aC) | |
1749 | + | let dY = iQ._1 | |
1750 | + | let ec = iQ._2 | |
1751 | + | let iR = cW(bW, ef, eh, eq, ec) | |
1752 | + | let de = iR._1 | |
1753 | + | let df = iR._2 | |
1754 | + | let da = iR._3 | |
1755 | + | let cV = iR._4 | |
1756 | + | throw(((((((aG(de) + aG(da)) + aG(et(bT))) + aG(ec)) + aG(df)) + aG(dY)) + aG(cV))) | |
1832 | 1757 | } | |
1833 | 1758 | else throw("Strict value is not equal to itself.") | |
1834 | 1759 | } | |
1835 | 1760 | ||
1836 | 1761 | ||
1837 | 1762 | ||
1838 | - | @Callable( | |
1839 | - | func view_getPegAdjustCost ( | |
1840 | - | let | |
1841 | - | let | |
1842 | - | let | |
1843 | - | throw(toString( | |
1763 | + | @Callable(bK) | |
1764 | + | func view_getPegAdjustCost (iS) = { | |
1765 | + | let cw = bh() | |
1766 | + | let cx = bi() | |
1767 | + | let fF = fG(iS, cw, cx) | |
1768 | + | throw(toString(fF._3)) | |
1844 | 1769 | } | |
1845 | 1770 | ||
1846 | 1771 | ||
1847 | 1772 | ||
1848 | - | @Callable( | |
1773 | + | @Callable(bK) | |
1849 | 1774 | func view_getTerminalAmmPrice () = { | |
1850 | - | let | |
1851 | - | let | |
1852 | - | let | |
1853 | - | let | |
1854 | - | throw(toString( | |
1775 | + | let iT = fo() | |
1776 | + | let fs = iT._1 | |
1777 | + | let ft = iT._2 | |
1778 | + | let hk = aI(aK(fs, bj()), aK(ft, bk())) | |
1779 | + | throw(toString(hk)) | |
1855 | 1780 | } | |
1856 | 1781 | ||
1857 | 1782 | ||
1858 | 1783 | ||
1859 | - | @Callable( | |
1784 | + | @Callable(bK) | |
1860 | 1785 | func view_getFunding () = { | |
1861 | - | let | |
1862 | - | let | |
1863 | - | let | |
1864 | - | let | |
1865 | - | let | |
1866 | - | let | |
1867 | - | let | |
1868 | - | throw((((( | |
1786 | + | let fM = dx() | |
1787 | + | let iU = fL() | |
1788 | + | let fP = iU._1 | |
1789 | + | let fQ = iU._2 | |
1790 | + | let fT = iU._3 | |
1791 | + | let iV = aI(fQ, fM) | |
1792 | + | let iW = aI(fP, fM) | |
1793 | + | throw(((((aG(iV) + aG(iW)) + aG(dR())) + aG(dx())) + aG(fT))) | |
1869 | 1794 | } | |
1870 | 1795 | ||
1871 | 1796 | ||
1872 | 1797 | ||
1873 | - | @Callable( | |
1798 | + | @Callable(bK) | |
1874 | 1799 | func computeSpotPrice () = { | |
1875 | - | let | |
1876 | - | if (( | |
1800 | + | let hB = invoke(this, "syncTerminalPriceToOracle", nil, nil) | |
1801 | + | if ((hB == hB)) | |
1877 | 1802 | then { | |
1878 | - | let | |
1879 | - | $Tuple2(nil, | |
1803 | + | let fF = dR() | |
1804 | + | $Tuple2(nil, fF) | |
1880 | 1805 | } | |
1881 | 1806 | else throw("Strict value is not equal to itself.") | |
1882 | 1807 | } | |
1883 | 1808 | ||
1884 | 1809 | ||
1885 | 1810 | ||
1886 | - | @Callable( | |
1887 | - | func computeFeeForTraderWithArtifact ( | |
1888 | - | let | |
1889 | - | $Tuple2(nil, | |
1811 | + | @Callable(bK) | |
1812 | + | func computeFeeForTraderWithArtifact (bT,fV) = { | |
1813 | + | let fF = gh(bT, fV) | |
1814 | + | $Tuple2(nil, fF) | |
1890 | 1815 | } | |
1891 | 1816 | ||
1892 | 1817 | ||
1893 | - | @Verifier( | |
1894 | - | func | |
1895 | - | let | |
1896 | - | if (isDefined( | |
1818 | + | @Verifier(iX) | |
1819 | + | func iY () = { | |
1820 | + | let iZ = getString(this, T) | |
1821 | + | if (isDefined(iZ)) | |
1897 | 1822 | then { | |
1898 | - | let | |
1899 | - | if (isDefined( | |
1900 | - | then valueOrElse(getBoolean(addressFromStringValue(value( | |
1823 | + | let ja = getString(addressFromStringValue(value(iZ)), V) | |
1824 | + | if (isDefined(ja)) | |
1825 | + | then valueOrElse(getBoolean(addressFromStringValue(value(ja)), ((("status_" + toString(this)) + "_") + toBase58String(iX.id))), false) | |
1901 | 1826 | else throw("unable to verify: admin not set in coordinator") | |
1902 | 1827 | } | |
1903 | - | else sigVerify( | |
1828 | + | else sigVerify(iX.bodyBytes, iX.proofs[0], iX.senderPublicKey) | |
1904 | 1829 | } | |
1905 | 1830 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = "k_baseOracle" | |
5 | 5 | ||
6 | 6 | let b = "k_quoteOracle" | |
7 | 7 | ||
8 | 8 | let c = "k_balance" | |
9 | 9 | ||
10 | 10 | let d = "k_sequence" | |
11 | 11 | ||
12 | 12 | let e = "k_positionSize" | |
13 | 13 | ||
14 | 14 | let f = "k_positionMargin" | |
15 | 15 | ||
16 | 16 | let g = "k_positionOpenNotional" | |
17 | 17 | ||
18 | 18 | let h = "k_positionFraction" | |
19 | 19 | ||
20 | 20 | let i = "k_positionSequence" | |
21 | 21 | ||
22 | 22 | let j = "k_positionAsset" | |
23 | 23 | ||
24 | 24 | let k = "k_positionFee" | |
25 | 25 | ||
26 | 26 | let l = "k_positionTimestamp" | |
27 | 27 | ||
28 | 28 | let m = "k_initialized" | |
29 | 29 | ||
30 | 30 | let n = "k_paused" | |
31 | 31 | ||
32 | 32 | let o = "k_closeOnly" | |
33 | 33 | ||
34 | 34 | let p = "k_fee" | |
35 | 35 | ||
36 | 36 | let q = "k_rollover_fee" | |
37 | 37 | ||
38 | 38 | let r = "k_fundingPeriod" | |
39 | 39 | ||
40 | 40 | let s = "k_initMarginRatio" | |
41 | 41 | ||
42 | 42 | let t = "k_mmr" | |
43 | 43 | ||
44 | 44 | let u = "k_liquidationFeeRatio" | |
45 | 45 | ||
46 | 46 | let v = "k_partLiquidationRatio" | |
47 | 47 | ||
48 | 48 | let w = "k_spreadLimit" | |
49 | 49 | ||
50 | 50 | let x = "k_maxPriceImpact" | |
51 | 51 | ||
52 | 52 | let y = "k_maxPriceSpread" | |
53 | 53 | ||
54 | 54 | let z = "k_maxOpenNotional" | |
55 | 55 | ||
56 | 56 | let A = "k_feeToStakersPercent" | |
57 | 57 | ||
58 | 58 | let B = "k_maxOracleDelay" | |
59 | 59 | ||
60 | 60 | let C = "k_fundingMode" | |
61 | 61 | ||
62 | - | let D = "k_ | |
62 | + | let D = "k_latestLongPremiumFraction" | |
63 | 63 | ||
64 | - | let E = "k_ | |
64 | + | let E = "k_latestShortPremiumFraction" | |
65 | 65 | ||
66 | - | let F = "k_ | |
66 | + | let F = "k_nextFundingBlockMinTimestamp" | |
67 | 67 | ||
68 | - | let G = "k_ | |
68 | + | let G = "k_longFundingRate" | |
69 | 69 | ||
70 | - | let H = "k_ | |
70 | + | let H = "k_shortFundingRate" | |
71 | 71 | ||
72 | - | let I = "k_ | |
72 | + | let I = "k_qtAstR" | |
73 | 73 | ||
74 | - | let J = "k_ | |
74 | + | let J = "k_bsAstR" | |
75 | 75 | ||
76 | - | let K = "k_ | |
76 | + | let K = "k_qtAstW" | |
77 | 77 | ||
78 | - | let L = "k_ | |
78 | + | let L = "k_bsAstW" | |
79 | 79 | ||
80 | - | let M = "k_ | |
80 | + | let M = "k_totalPositionSize" | |
81 | 81 | ||
82 | - | let N = "k_ | |
82 | + | let N = "k_totalLongPositionSize" | |
83 | 83 | ||
84 | - | let O = "k_ | |
84 | + | let O = "k_totalShortPositionSize" | |
85 | 85 | ||
86 | - | let P = "k_ | |
86 | + | let P = "k_openInterestNotional" | |
87 | 87 | ||
88 | - | let Q = "k_ | |
88 | + | let Q = "k_openInterestShort" | |
89 | 89 | ||
90 | - | let R = "k_ | |
90 | + | let R = "k_openInterestLong" | |
91 | 91 | ||
92 | - | let S = "k_ | |
92 | + | let S = "k_lastTx" | |
93 | 93 | ||
94 | - | let T = "k_ | |
94 | + | let T = "k_coordinatorAddress" | |
95 | 95 | ||
96 | - | let U = "k_ | |
96 | + | let U = "k_vault_address" | |
97 | 97 | ||
98 | - | let V = "k_ | |
98 | + | let V = "k_admin_address" | |
99 | 99 | ||
100 | - | let W = "k_ | |
100 | + | let W = "k_quote_asset" | |
101 | 101 | ||
102 | - | let X = "k_ | |
102 | + | let X = "k_quote_staking" | |
103 | 103 | ||
104 | - | let Y = "k_ | |
104 | + | let Y = "k_staking_address" | |
105 | 105 | ||
106 | - | let Z = "k_ | |
106 | + | let Z = "k_miner_address" | |
107 | 107 | ||
108 | - | let aa = "k_ | |
108 | + | let aa = "k_orders_address" | |
109 | 109 | ||
110 | - | let ab = "k_ | |
110 | + | let ab = "k_referral_address" | |
111 | 111 | ||
112 | - | let ac = "k_ | |
112 | + | let ac = "k_exchange_address" | |
113 | 113 | ||
114 | - | let ad = "k_ | |
114 | + | let ad = "k_nft_manager_address" | |
115 | 115 | ||
116 | - | let ae = "k_miner_address" | |
117 | - | ||
118 | - | let af = "k_orders_address" | |
119 | - | ||
120 | - | let ag = "k_referral_address" | |
121 | - | ||
122 | - | let ah = "k_exchange_address" | |
123 | - | ||
124 | - | let ai = "k_nft_manager_address" | |
125 | - | ||
126 | - | func aj (ak,al) = ((ak + "_") + al) | |
116 | + | func ae (af,ag) = ((af + "_") + ag) | |
127 | 117 | ||
128 | 118 | ||
129 | - | func | |
119 | + | func ah () = valueOrErrorMessage(addressFromString(getStringValue(this, T)), "Coordinator not set") | |
130 | 120 | ||
131 | 121 | ||
132 | - | func | |
122 | + | func ai () = addressFromString(getStringValue(ah(), V)) | |
133 | 123 | ||
134 | 124 | ||
135 | - | func | |
125 | + | func aj () = fromBase58String(getStringValue(ah(), W)) | |
136 | 126 | ||
137 | 127 | ||
138 | - | func | |
128 | + | func ak () = valueOrErrorMessage(addressFromString(getStringValue(ah(), X)), "Quote asset staking not set") | |
139 | 129 | ||
140 | 130 | ||
141 | - | func | |
131 | + | func al () = valueOrErrorMessage(addressFromString(getStringValue(ah(), Y)), "Staking not set") | |
142 | 132 | ||
143 | 133 | ||
144 | - | func | |
134 | + | func am () = valueOrErrorMessage(addressFromString(getStringValue(ah(), U)), "Vault not set") | |
145 | 135 | ||
146 | 136 | ||
147 | - | func | |
137 | + | func an () = valueOrErrorMessage(addressFromString(getStringValue(ah(), Z)), "Miner not set") | |
148 | 138 | ||
149 | 139 | ||
150 | - | func | |
140 | + | func ao () = valueOrErrorMessage(addressFromString(getStringValue(ah(), aa)), "Orders not set") | |
151 | 141 | ||
152 | 142 | ||
153 | - | func | |
143 | + | func ap () = valueOrErrorMessage(addressFromString(getStringValue(ah(), ab)), "Referral not set") | |
154 | 144 | ||
155 | 145 | ||
156 | - | func | |
146 | + | func aq () = valueOrErrorMessage(addressFromString(getStringValue(ah(), ad)), "NFT Manager not set") | |
157 | 147 | ||
158 | 148 | ||
159 | - | let | |
149 | + | let ar = "k_token_param" | |
160 | 150 | ||
161 | - | let | |
151 | + | let as = "k_token_type" | |
162 | 152 | ||
163 | - | let | |
153 | + | let at = "fee_reduction" | |
164 | 154 | ||
165 | - | let | |
155 | + | let au = 1 | |
166 | 156 | ||
167 | - | let | |
157 | + | let av = 2 | |
168 | 158 | ||
169 | - | let | |
159 | + | let aw = 15 | |
170 | 160 | ||
171 | - | let | |
161 | + | let ax = 1000 | |
172 | 162 | ||
173 | - | let | |
163 | + | let ay = 6 | |
174 | 164 | ||
175 | - | let | |
165 | + | let az = (1 * (((((10 * 10) * 10) * 10) * 10) * 10)) | |
176 | 166 | ||
177 | - | let | |
167 | + | let aA = (525600 * az) | |
178 | 168 | ||
179 | - | let | |
169 | + | let aB = (86400 * az) | |
180 | 170 | ||
181 | - | let | |
171 | + | let aC = 1 | |
182 | 172 | ||
183 | - | let | |
173 | + | let aD = 2 | |
184 | 174 | ||
185 | - | let | |
175 | + | let aE = 1 | |
186 | 176 | ||
187 | - | let | |
177 | + | let aF = 2 | |
188 | 178 | ||
189 | - | func | |
179 | + | func aG (aH) = (toString(aH) + ",") | |
190 | 180 | ||
191 | 181 | ||
192 | - | func | |
182 | + | func aI (aH,aJ) = fraction(aH, az, aJ, HALFEVEN) | |
193 | 183 | ||
194 | 184 | ||
195 | - | func | |
185 | + | func aK (aH,aJ) = fraction(aH, aJ, az, HALFEVEN) | |
196 | 186 | ||
197 | 187 | ||
198 | - | func | |
188 | + | func aL (aH,aJ) = fraction(aH, toBigInt(az), aJ, HALFEVEN) | |
199 | 189 | ||
200 | 190 | ||
201 | - | func | |
191 | + | func aM (aH,aJ) = fraction(aH, aJ, toBigInt(az), HALFEVEN) | |
202 | 192 | ||
203 | 193 | ||
204 | - | func | |
205 | - | then | |
206 | - | else -( | |
194 | + | func aN (aH) = if ((aH > 0)) | |
195 | + | then aH | |
196 | + | else -(aH) | |
207 | 197 | ||
208 | 198 | ||
209 | - | func | |
210 | - | then | |
211 | - | else | |
199 | + | func aO (aH,aJ) = if ((aH >= aJ)) | |
200 | + | then aH | |
201 | + | else aJ | |
212 | 202 | ||
213 | 203 | ||
214 | - | func | |
204 | + | func aP (aQ) = if ((size(aQ) == 0)) | |
215 | 205 | then "" | |
216 | - | else makeString( | |
206 | + | else makeString(aQ, ",") | |
217 | 207 | ||
218 | 208 | ||
219 | - | func | |
209 | + | func aR (aS) = if ((aS == "")) | |
220 | 210 | then nil | |
221 | - | else split( | |
211 | + | else split(aS, ",") | |
222 | 212 | ||
223 | 213 | ||
224 | - | func | |
225 | - | then (removeByIndex( | |
226 | - | else ( | |
214 | + | func aT (aQ,aU,aV) = if ((size(aQ) > aU)) | |
215 | + | then (removeByIndex(aQ, 0) :+ aV) | |
216 | + | else (aQ :+ aV) | |
227 | 217 | ||
228 | 218 | ||
229 | - | func | |
219 | + | func aW (aX) = valueOrErrorMessage(getInteger(this, aX), ("no value for " + aX)) | |
230 | 220 | ||
231 | 221 | ||
232 | - | func | |
222 | + | func aY (aX,aZ) = valueOrElse(getInteger(this, aX), aZ) | |
233 | 223 | ||
234 | 224 | ||
235 | - | func | |
236 | - | let | |
237 | - | | |
225 | + | func ba (ag,af) = { | |
226 | + | let bb = valueOrErrorMessage(getString(ag, af), ("No value for key " + af)) | |
227 | + | bb | |
238 | 228 | } | |
239 | 229 | ||
240 | 230 | ||
241 | - | func | |
242 | - | let | |
243 | - | | |
231 | + | func bc (ag,af) = { | |
232 | + | let bb = valueOrErrorMessage(getInteger(ag, af), ("No value for key " + af)) | |
233 | + | bb | |
244 | 234 | } | |
245 | 235 | ||
246 | 236 | ||
247 | - | func | |
237 | + | func bd () = aW(c) | |
248 | 238 | ||
249 | 239 | ||
250 | - | func | |
240 | + | func be () = aW(p) | |
251 | 241 | ||
252 | 242 | ||
253 | - | func | |
243 | + | func bf () = aW(q) | |
254 | 244 | ||
255 | 245 | ||
256 | - | func | |
246 | + | func bg () = aW(s) | |
257 | 247 | ||
258 | 248 | ||
259 | - | func | |
249 | + | func bh () = aW(I) | |
260 | 250 | ||
261 | 251 | ||
262 | - | func | |
252 | + | func bi () = aW(J) | |
263 | 253 | ||
264 | 254 | ||
265 | - | func | |
255 | + | func bj () = aY(K, az) | |
266 | 256 | ||
267 | 257 | ||
268 | - | func | |
258 | + | func bk () = aY(L, az) | |
269 | 259 | ||
270 | 260 | ||
271 | - | func | |
261 | + | func bl () = aW(M) | |
272 | 262 | ||
273 | 263 | ||
274 | - | func | |
264 | + | func bm () = aW(P) | |
275 | 265 | ||
276 | 266 | ||
277 | - | func | |
267 | + | func bn () = aW(Q) | |
278 | 268 | ||
279 | 269 | ||
280 | - | func | |
270 | + | func bo () = aW(R) | |
281 | 271 | ||
282 | 272 | ||
283 | - | func | |
273 | + | func bp () = aW(F) | |
284 | 274 | ||
285 | 275 | ||
286 | - | func | |
276 | + | func bq () = aW(r) | |
287 | 277 | ||
288 | 278 | ||
289 | - | func | |
279 | + | func br () = (bq() * az) | |
290 | 280 | ||
291 | 281 | ||
292 | - | func | |
282 | + | func bs () = (bq() * ax) | |
293 | 283 | ||
294 | 284 | ||
295 | - | func | |
285 | + | func bt () = aW(t) | |
296 | 286 | ||
297 | 287 | ||
298 | - | func | |
288 | + | func bu () = aW(u) | |
299 | 289 | ||
300 | 290 | ||
301 | - | func | |
291 | + | func bv () = aW(v) | |
302 | 292 | ||
303 | 293 | ||
304 | - | func | |
294 | + | func bw () = aW(w) | |
305 | 295 | ||
306 | 296 | ||
307 | - | func | |
297 | + | func bx () = aW(x) | |
308 | 298 | ||
309 | 299 | ||
310 | - | func | |
300 | + | func by () = aW(y) | |
311 | 301 | ||
312 | 302 | ||
313 | - | func | |
303 | + | func bz () = aW(z) | |
314 | 304 | ||
315 | 305 | ||
316 | - | func | |
306 | + | func bA () = aW(D) | |
317 | 307 | ||
318 | 308 | ||
319 | - | func | |
309 | + | func bB () = aW(E) | |
320 | 310 | ||
321 | 311 | ||
322 | - | func | |
312 | + | func bC () = aW(O) | |
323 | 313 | ||
324 | 314 | ||
325 | - | func | |
315 | + | func bD () = aW(N) | |
326 | 316 | ||
327 | 317 | ||
328 | - | func | |
318 | + | func bE () = aY(d, 0) | |
329 | 319 | ||
330 | 320 | ||
331 | - | func | |
321 | + | func bF () = aW(A) | |
332 | 322 | ||
333 | 323 | ||
334 | - | func | |
324 | + | func bG () = aW(B) | |
335 | 325 | ||
336 | 326 | ||
337 | - | func | |
327 | + | func bH () = aY(C, aE) | |
338 | 328 | ||
339 | 329 | ||
340 | - | func | |
330 | + | func bI () = lastBlock.timestamp | |
341 | 331 | ||
342 | 332 | ||
343 | - | func | |
333 | + | func bJ (bK) = valueOrElse(getString(ao(), "k_sender"), toString(bK.caller)) | |
344 | 334 | ||
345 | 335 | ||
346 | - | func | |
347 | - | let | |
348 | - | if (if ( | |
349 | - | then (0 > | |
336 | + | func bL (bM,bN,bO) = { | |
337 | + | let bP = (bM - bN) | |
338 | + | if (if (bO) | |
339 | + | then (0 > bP) | |
350 | 340 | else false) | |
351 | - | then throw(((("Invalid margin: " + toString( | |
352 | - | else if (if (!( | |
353 | - | then ( | |
341 | + | then throw(((("Invalid margin: " + toString(bM)) + " < ") + toString(bN))) | |
342 | + | else if (if (!(bO)) | |
343 | + | then (bP >= 0) | |
354 | 344 | else false) | |
355 | - | then throw(((("Invalid margin: " + toString( | |
345 | + | then throw(((("Invalid margin: " + toString(bM)) + " > ") + toString(bN))) | |
356 | 346 | else true | |
357 | 347 | } | |
358 | 348 | ||
359 | 349 | ||
360 | - | func | |
350 | + | func bQ (bR) = if ((bR == 0)) | |
361 | 351 | then throw("Should not be called with _positionSize == 0") | |
362 | - | else if (( | |
363 | - | then | |
364 | - | else | |
352 | + | else if ((bR > 0)) | |
353 | + | then bA() | |
354 | + | else bB() | |
365 | 355 | ||
366 | 356 | ||
367 | - | func | |
368 | - | let | |
369 | - | let | |
370 | - | if ($isInstanceOf( | |
357 | + | func bS (bT) = { | |
358 | + | let bU = getInteger(this, ae(e, bT)) | |
359 | + | let bV = bU | |
360 | + | if ($isInstanceOf(bV, "Int")) | |
371 | 361 | then { | |
372 | - | let | |
373 | - | $Tuple5( | |
362 | + | let bW = bV | |
363 | + | $Tuple5(bW, getIntegerValue(this, ae(f, bT)), getIntegerValue(this, ae(g, bT)), getIntegerValue(this, ae(h, bT)), getIntegerValue(this, ae(l, bT))) | |
374 | 364 | } | |
375 | 365 | else $Tuple5(0, 0, 0, 0, 0) | |
376 | 366 | } | |
377 | 367 | ||
378 | 368 | ||
379 | - | func | |
380 | - | let | |
381 | - | let | |
382 | - | if ($isInstanceOf( | |
369 | + | func bX (bT) = { | |
370 | + | let bY = getString(this, ae(j, bT)) | |
371 | + | let bV = bY | |
372 | + | if ($isInstanceOf(bV, "String")) | |
383 | 373 | then { | |
384 | - | let | |
385 | - | | |
374 | + | let bZ = bV | |
375 | + | bZ | |
386 | 376 | } | |
387 | - | else toBase58String( | |
377 | + | else toBase58String(aj()) | |
388 | 378 | } | |
389 | 379 | ||
390 | 380 | ||
391 | - | func | |
392 | - | let | |
393 | - | let | |
394 | - | if ($isInstanceOf( | |
381 | + | func ca (bT) = { | |
382 | + | let cb = getInteger(this, ae(k, bT)) | |
383 | + | let bV = cb | |
384 | + | if ($isInstanceOf(bV, "Int")) | |
395 | 385 | then { | |
396 | - | let | |
397 | - | | |
386 | + | let cc = bV | |
387 | + | cc | |
398 | 388 | } | |
399 | - | else | |
389 | + | else be() | |
400 | 390 | } | |
401 | 391 | ||
402 | 392 | ||
403 | - | func | |
393 | + | func cd (bT) = if ((bS(bT)._1 == 0)) | |
404 | 394 | then throw("No open position") | |
405 | 395 | else true | |
406 | 396 | ||
407 | 397 | ||
408 | - | func | |
409 | - | let | |
410 | - | if (if (isDefined( | |
411 | - | then (value( | |
398 | + | func ce (cf) = { | |
399 | + | let cg = getString(this, cf) | |
400 | + | if (if (isDefined(cg)) | |
401 | + | then (value(cg) != "") | |
412 | 402 | else false) | |
413 | 403 | then { | |
414 | - | let | |
415 | - | let | |
416 | - | let | |
417 | - | let | |
418 | - | let | |
419 | - | $Tuple4( | |
404 | + | let ch = split(value(cg), ",") | |
405 | + | let ci = valueOrErrorMessage(addressFromString(ch[0]), ("Invalid oracle address in: " + value(cg))) | |
406 | + | let cj = ch[1] | |
407 | + | let ck = ch[2] | |
408 | + | let cl = ch[3] | |
409 | + | $Tuple4(ci, cj, ck, cl) | |
420 | 410 | } | |
421 | 411 | else unit | |
422 | 412 | } | |
423 | 413 | ||
424 | 414 | ||
425 | - | func | |
415 | + | func cm () = valueOrElse(getBoolean(this, m), false) | |
426 | 416 | ||
427 | 417 | ||
428 | - | func | |
418 | + | func cn () = valueOrElse(getBoolean(this, n), false) | |
429 | 419 | ||
430 | 420 | ||
431 | - | func | |
421 | + | func co () = valueOrElse(getBoolean(this, o), false) | |
432 | 422 | ||
433 | 423 | ||
434 | - | func | |
424 | + | func cp (cq,cr,cs) = if (cq) | |
435 | 425 | then { | |
436 | - | let | |
437 | - | if ((0 >= | |
426 | + | let ct = (bi() - cs) | |
427 | + | if ((0 >= ct)) | |
438 | 428 | then throw("Tx lead to base asset reserve <= 0, revert") | |
439 | - | else $Tuple3(( | |
429 | + | else $Tuple3((bh() + cr), ct, (bl() + cs)) | |
440 | 430 | } | |
441 | 431 | else { | |
442 | - | let | |
443 | - | if ((0 >= | |
432 | + | let cu = (bh() - cr) | |
433 | + | if ((0 >= cu)) | |
444 | 434 | then throw("Tx lead to base quote reserve <= 0, revert") | |
445 | - | else $Tuple3( | |
435 | + | else $Tuple3(cu, (bi() + cs), (bl() - cs)) | |
446 | 436 | } | |
447 | 437 | ||
448 | 438 | ||
449 | - | func | |
450 | - | let | |
451 | - | let | |
452 | - | | |
439 | + | func cv (cw,cx) = { | |
440 | + | let cy = toBigInt(cw) | |
441 | + | let cz = toBigInt(cx) | |
442 | + | aM(cy, cz) | |
453 | 443 | } | |
454 | 444 | ||
455 | 445 | ||
456 | - | func | |
457 | - | let | |
458 | - | let | |
459 | - | let | |
460 | - | let | |
461 | - | let | |
462 | - | let | |
463 | - | let | |
464 | - | then ( | |
465 | - | else ( | |
466 | - | let | |
467 | - | let | |
468 | - | let | |
469 | - | then | |
470 | - | else -( | |
471 | - | let | |
472 | - | let | |
473 | - | let | |
474 | - | let | |
475 | - | let | |
476 | - | let | |
477 | - | let | |
478 | - | let | |
479 | - | let | |
480 | - | if (( | |
481 | - | then throw(((((((((((((("Price impact " + toString( | |
482 | - | else $Tuple4( | |
446 | + | func cA (cq,cr) = { | |
447 | + | let cw = bh() | |
448 | + | let cx = bi() | |
449 | + | let cB = bj() | |
450 | + | let cC = bk() | |
451 | + | let cD = aI(cr, cB) | |
452 | + | let aX = cv(cw, cx) | |
453 | + | let cE = if (cq) | |
454 | + | then (cw + cD) | |
455 | + | else (cw - cD) | |
456 | + | let cF = toInt(aL(aX, toBigInt(cE))) | |
457 | + | let cG = aN((cF - cx)) | |
458 | + | let cH = if (cq) | |
459 | + | then cG | |
460 | + | else -(cG) | |
461 | + | let cI = cp(cq, cD, cG) | |
462 | + | let cJ = cI._1 | |
463 | + | let cK = cI._2 | |
464 | + | let cL = cI._3 | |
465 | + | let cM = aI(aK(cw, cB), aK(cx, cC)) | |
466 | + | let cN = aI(cr, cG) | |
467 | + | let cO = aN((cM - cN)) | |
468 | + | let cP = (az - aI(cM, (cM + cO))) | |
469 | + | let cQ = bx() | |
470 | + | if ((cP > cQ)) | |
471 | + | then throw(((((((((((((("Price impact " + toString(cP)) + " > max price impact ") + toString(cQ)) + " before quote asset: ") + toString(cw)) + " before base asset: ") + toString(cx)) + " quote asset amount to exchange: ") + toString(cr)) + " price before: ") + toString(cM)) + " marketPrice: ") + toString(cN))) | |
472 | + | else $Tuple4(cH, cJ, cK, cL) | |
483 | 473 | } | |
484 | 474 | ||
485 | 475 | ||
486 | - | func | |
487 | - | let | |
488 | - | let | |
489 | - | | |
476 | + | func cR (cS,cT) = { | |
477 | + | let cU = ((((bI() - cT) / 1000) / 60) * az) | |
478 | + | let cV = aI(aK(aK(cS, cU), bf()), aA) | |
479 | + | cV | |
490 | 480 | } | |
491 | 481 | ||
492 | 482 | ||
493 | - | func | |
494 | - | let | |
483 | + | func cW (cX,cS,cY,cT,cZ) = { | |
484 | + | let da = if ((cX != 0)) | |
495 | 485 | then { | |
496 | - | let | |
497 | - | | |
486 | + | let db = bQ(cX) | |
487 | + | aK((db - cY), cX) | |
498 | 488 | } | |
499 | 489 | else 0 | |
500 | - | let | |
501 | - | let | |
502 | - | let | |
503 | - | then $Tuple2(0, | |
504 | - | else $Tuple2( | |
505 | - | let | |
506 | - | let | |
507 | - | $Tuple4( | |
490 | + | let cV = cR(cS, cT) | |
491 | + | let dc = (((cZ - cV) - da) + cS) | |
492 | + | let dd = if ((0 > dc)) | |
493 | + | then $Tuple2(0, aN(dc)) | |
494 | + | else $Tuple2(aN(dc), 0) | |
495 | + | let de = dd._1 | |
496 | + | let df = dd._2 | |
497 | + | $Tuple4(de, df, da, cV) | |
508 | 498 | } | |
509 | 499 | ||
510 | 500 | ||
511 | - | func | |
512 | - | let | |
513 | - | if (( | |
501 | + | func dg (cq,cs,dh,di,dj,dk,dl) = { | |
502 | + | let cM = aI(aK(di, dj), aK(dk, dl)) | |
503 | + | if ((cs == 0)) | |
514 | 504 | then throw("Invalid base asset amount") | |
515 | 505 | else { | |
516 | - | let | |
517 | - | let | |
518 | - | then ( | |
519 | - | else ( | |
520 | - | let | |
521 | - | let | |
522 | - | let | |
523 | - | let | |
524 | - | let | |
525 | - | let | |
526 | - | let | |
527 | - | let | |
528 | - | let | |
529 | - | let | |
530 | - | let | |
531 | - | if (if (( | |
532 | - | then | |
506 | + | let aX = cv(di, dk) | |
507 | + | let dm = if (cq) | |
508 | + | then (dk + cs) | |
509 | + | else (dk - cs) | |
510 | + | let dn = toInt(aL(aX, toBigInt(dm))) | |
511 | + | let do = aN((dn - di)) | |
512 | + | let dp = aK(do, dj) | |
513 | + | let cQ = bx() | |
514 | + | let dq = cp(!(cq), do, cs) | |
515 | + | let cJ = dq._1 | |
516 | + | let cK = dq._2 | |
517 | + | let cL = dq._3 | |
518 | + | let cN = aI(dp, cs) | |
519 | + | let cO = aN((cM - cN)) | |
520 | + | let cP = (az - aI(cM, (cM + cO))) | |
521 | + | if (if ((cP > cQ)) | |
522 | + | then dh | |
533 | 523 | else false) | |
534 | - | then throw(((((((((((((("Price impact " + toString( | |
535 | - | else $Tuple7( | |
536 | - | then | |
537 | - | else 0)), ( | |
538 | - | then | |
539 | - | else 0)), | |
524 | + | then throw(((((((((((((("Price impact " + toString(cP)) + " > max price impact ") + toString(cQ)) + " before quote asset: ") + toString(di)) + " before base asset: ") + toString(dk)) + " base asset amount to exchange: ") + toString(cs)) + " price before: ") + toString(cM)) + " market price: ") + toString(cN))) | |
525 | + | else $Tuple7(dp, cJ, cK, cL, (bD() - (if (cq) | |
526 | + | then aN(cs) | |
527 | + | else 0)), (bC() - (if (!(cq)) | |
528 | + | then aN(cs) | |
529 | + | else 0)), cP) | |
540 | 530 | } | |
541 | 531 | } | |
542 | 532 | ||
543 | 533 | ||
544 | - | func | |
534 | + | func dr (cq,cs,dh) = dg(cq, cs, dh, bh(), bj(), bi(), bk()) | |
545 | 535 | ||
546 | 536 | ||
547 | - | func | |
548 | - | let | |
549 | - | if (( | |
537 | + | func ds (dt,cj,ck) = { | |
538 | + | let du = valueOrErrorMessage(getInteger(dt, cj), ((("Can not get oracle price. Oracle: " + toString(dt)) + " key: ") + cj)) | |
539 | + | if ((ck != "")) | |
550 | 540 | then { | |
551 | - | let | |
552 | - | let | |
553 | - | if ((( | |
554 | - | then throw(((("Oracle stale data. Last oracle block: " + toString( | |
555 | - | else | |
541 | + | let dv = lastBlock.height | |
542 | + | let dw = valueOrErrorMessage(getInteger(dt, ck), ((("Can not get oracle block. Oracle: " + toString(dt)) + " key: ") + ck)) | |
543 | + | if (((dv - dw) > bG())) | |
544 | + | then throw(((("Oracle stale data. Last oracle block: " + toString(dw)) + " current block: ") + toString(dv))) | |
545 | + | else du | |
556 | 546 | } | |
557 | - | else | |
547 | + | else du | |
558 | 548 | } | |
559 | 549 | ||
560 | 550 | ||
561 | - | func | |
562 | - | let | |
563 | - | let | |
564 | - | let | |
565 | - | let | |
551 | + | func dx () = { | |
552 | + | let dy = valueOrErrorMessage(ce(a), "No base asset oracle data") | |
553 | + | let dz = ds(dy._1, dy._2, dy._3) | |
554 | + | let dA = ce(b) | |
555 | + | let dB = if (isDefined(dA)) | |
566 | 556 | then { | |
567 | - | let | |
568 | - | | |
557 | + | let dC = value(dA) | |
558 | + | ds(dC._1, dC._2, dC._3) | |
569 | 559 | } | |
570 | - | else | |
571 | - | | |
560 | + | else az | |
561 | + | aI(dz, dB) | |
572 | 562 | } | |
573 | 563 | ||
574 | 564 | ||
575 | - | func | |
576 | - | let | |
577 | - | let | |
578 | - | let | |
579 | - | if (( | |
565 | + | func dD () = { | |
566 | + | let dy = valueOrErrorMessage(ce(a), "No base asset oracle data") | |
567 | + | let dt = dy._1 | |
568 | + | let cl = dy._4 | |
569 | + | if ((cl != "")) | |
580 | 570 | then { | |
581 | - | let | |
582 | - | !( | |
571 | + | let dE = valueOrErrorMessage(getBoolean(dt, cl), ((("Can not get oracle is open/closed. Oracle: " + toString(dt)) + " key: ") + cl)) | |
572 | + | !(dE) | |
583 | 573 | } | |
584 | 574 | else false | |
585 | 575 | } | |
586 | 576 | ||
587 | 577 | ||
588 | - | func | |
589 | - | let | |
590 | - | let | |
591 | - | let | |
592 | - | | |
578 | + | func dF (dG,di,dk,cB,cC) = { | |
579 | + | let dH = aI(aK(di, cB), aK(dk, cC)) | |
580 | + | let dI = aI((dG + dH), (2 * az)) | |
581 | + | let dF = aI(aN((dG - dH)), dI) | |
582 | + | dF | |
593 | 583 | } | |
594 | 584 | ||
595 | 585 | ||
596 | - | func | |
597 | - | let | |
598 | - | let | |
599 | - | let | |
600 | - | let | |
601 | - | let | |
602 | - | if (if (( | |
603 | - | then ( | |
586 | + | func dJ (di,dk) = { | |
587 | + | let dK = dx() | |
588 | + | let cB = bj() | |
589 | + | let cC = bk() | |
590 | + | let dL = dF(dK, bh(), bi(), cB, cC) | |
591 | + | let dM = dF(dK, di, dk, cB, cC) | |
592 | + | if (if ((dM > by())) | |
593 | + | then (dM > dL) | |
604 | 594 | else false) | |
605 | - | then throw(((("Price spread " + toString( | |
595 | + | then throw(((("Price spread " + toString(dM)) + " > max price spread ") + toString(by()))) | |
606 | 596 | else true | |
607 | 597 | } | |
608 | 598 | ||
609 | 599 | ||
610 | - | func | |
611 | - | let | |
612 | - | if (( | |
613 | - | then throw(((("Long open notional " + toString( | |
614 | - | else if (( | |
615 | - | then throw(((("Short open notional " + toString( | |
600 | + | func dN (dO,dP) = { | |
601 | + | let dQ = bz() | |
602 | + | if ((dO > dQ)) | |
603 | + | then throw(((("Long open notional " + toString(dO)) + " > max open notional ") + toString(dQ))) | |
604 | + | else if ((dP > dQ)) | |
605 | + | then throw(((("Short open notional " + toString(dP)) + " > max open notional ") + toString(dQ))) | |
616 | 606 | else true | |
617 | 607 | } | |
618 | 608 | ||
619 | 609 | ||
620 | - | func | |
621 | - | let | |
622 | - | let | |
623 | - | let | |
624 | - | let | |
625 | - | | |
610 | + | func dR () = { | |
611 | + | let di = bh() | |
612 | + | let dk = bi() | |
613 | + | let cB = bj() | |
614 | + | let cC = bk() | |
615 | + | aI(aK(di, cB), aK(dk, cC)) | |
626 | 616 | } | |
627 | 617 | ||
628 | 618 | ||
629 | - | func | |
630 | - | let | |
631 | - | let | |
632 | - | (aN( | |
619 | + | func dS () = { | |
620 | + | let dK = dx() | |
621 | + | let dT = dR() | |
622 | + | (aI(aN((dK - dT)), dK) > bw()) | |
633 | 623 | } | |
634 | 624 | ||
635 | 625 | ||
636 | - | func | |
637 | - | let | |
638 | - | let | |
639 | - | let | |
626 | + | func dU (bR,dV,di,dj,dk,dl) = { | |
627 | + | let dW = aN(bR) | |
628 | + | let dX = (0 > bR) | |
629 | + | let dY = if ((dV == aC)) | |
640 | 630 | then { | |
641 | - | let | |
642 | - | | |
631 | + | let dZ = dg(!(dX), dW, false, di, dj, dk, dl)._1 | |
632 | + | dZ | |
643 | 633 | } | |
644 | - | else | |
645 | - | | |
634 | + | else aK(dW, dx()) | |
635 | + | dY | |
646 | 636 | } | |
647 | 637 | ||
648 | 638 | ||
649 | - | func | |
639 | + | func ea (bR,eb,di,dj,dk,dl,dV) = if ((bR == 0)) | |
650 | 640 | then throw("Invalid position size") | |
651 | 641 | else { | |
652 | - | let | |
653 | - | let | |
654 | - | let | |
655 | - | then ( | |
656 | - | else ( | |
657 | - | $Tuple2( | |
642 | + | let dX = (0 > bR) | |
643 | + | let dY = dU(bR, dV, di, dj, dk, dl) | |
644 | + | let ec = if (dX) | |
645 | + | then (eb - dY) | |
646 | + | else (dY - eb) | |
647 | + | $Tuple2(dY, ec) | |
658 | 648 | } | |
659 | 649 | ||
660 | 650 | ||
661 | - | func | |
662 | - | let | |
663 | - | let | |
664 | - | let | |
665 | - | let | |
666 | - | let | |
667 | - | | |
651 | + | func ed (bT,dV) = { | |
652 | + | let ee = bS(bT) | |
653 | + | let bW = ee._1 | |
654 | + | let ef = ee._2 | |
655 | + | let eg = ee._3 | |
656 | + | let eh = ee._4 | |
657 | + | ea(bW, eg, bh(), bj(), bi(), bk(), dV) | |
668 | 658 | } | |
669 | 659 | ||
670 | 660 | ||
671 | - | func | |
661 | + | func ei (ej,ek,el) = aI((ej - ek), el) | |
672 | 662 | ||
673 | 663 | ||
674 | - | func | |
675 | - | let | |
676 | - | let | |
677 | - | let | |
678 | - | let | |
679 | - | let | |
680 | - | let | |
681 | - | let | |
682 | - | let | |
683 | - | let | |
684 | - | let | |
685 | - | let | |
686 | - | let | |
687 | - | | |
664 | + | func em (bT,dV) = { | |
665 | + | let en = bS(bT) | |
666 | + | let bW = en._1 | |
667 | + | let ef = en._2 | |
668 | + | let eo = en._3 | |
669 | + | let ep = en._4 | |
670 | + | let eq = en._5 | |
671 | + | let er = ed(bT, dV) | |
672 | + | let dY = er._1 | |
673 | + | let ec = er._2 | |
674 | + | let es = cW(bW, ef, ep, eq, ec) | |
675 | + | let de = es._1 | |
676 | + | let df = es._2 | |
677 | + | ei(de, df, dY) | |
688 | 678 | } | |
689 | 679 | ||
690 | 680 | ||
691 | - | func | |
681 | + | func et (bT) = em(bT, aC) | |
692 | 682 | ||
693 | 683 | ||
694 | - | func | |
695 | - | let | |
696 | - | let | |
697 | - | let | |
698 | - | let | |
699 | - | let | |
700 | - | if (( | |
701 | - | then | |
702 | - | else | |
684 | + | func eu (bT,bR) = { | |
685 | + | let ev = aO(bv(), (az - aI(et(bT), bt()))) | |
686 | + | let ew = aK(aN(bR), ev) | |
687 | + | let ex = dr((bR > 0), ew, false) | |
688 | + | let ey = ex._1 | |
689 | + | let cP = ex._7 | |
690 | + | if ((bx() > cP)) | |
691 | + | then ew | |
692 | + | else aK(aN(bR), bv()) | |
703 | 693 | } | |
704 | 694 | ||
705 | 695 | ||
706 | - | func | |
707 | - | let | |
708 | - | let | |
709 | - | let | |
710 | - | let | |
711 | - | let | |
712 | - | let | |
713 | - | let | |
714 | - | let | |
715 | - | if (if (( | |
716 | - | then ( | |
696 | + | func ez (bT,eA,eB,eC,eD,dh,eE) = { | |
697 | + | let eF = bS(bT) | |
698 | + | let eG = eF._1 | |
699 | + | let eH = eF._2 | |
700 | + | let eI = eF._3 | |
701 | + | let eJ = eF._4 | |
702 | + | let eK = eF._5 | |
703 | + | let eL = (eG > 0) | |
704 | + | let eM = aN(eG) | |
705 | + | if (if ((eM >= eA)) | |
706 | + | then (eA > 0) | |
717 | 707 | else false) | |
718 | 708 | then { | |
719 | - | let | |
720 | - | let | |
721 | - | let | |
722 | - | let | |
723 | - | let | |
724 | - | let | |
725 | - | let | |
726 | - | then -( | |
727 | - | else | |
728 | - | let | |
729 | - | let | |
730 | - | let | |
731 | - | let | |
732 | - | let | |
733 | - | let | |
734 | - | let | |
735 | - | let | |
736 | - | let | |
737 | - | let | |
738 | - | let | |
739 | - | let | |
740 | - | let | |
741 | - | let | |
742 | - | then (( | |
743 | - | else (( | |
744 | - | let | |
745 | - | let | |
709 | + | let eN = (eM > eA) | |
710 | + | let eO = dr((eG > 0), eA, dh) | |
711 | + | let eP = eO._1 | |
712 | + | let cE = eO._2 | |
713 | + | let cF = eO._3 | |
714 | + | let eQ = eO._4 | |
715 | + | let eR = if ((eG > 0)) | |
716 | + | then -(eA) | |
717 | + | else eA | |
718 | + | let eS = ed(bT, aC) | |
719 | + | let eT = eS._1 | |
720 | + | let ec = eS._2 | |
721 | + | let eU = aI(aN(eR), eM) | |
722 | + | let eV = aK(ec, eU) | |
723 | + | let eW = cW(eG, eH, eJ, eK, ec) | |
724 | + | let eX = eW._1 | |
725 | + | let eY = eW._2 | |
726 | + | let eZ = eW._3 | |
727 | + | let cV = eW._4 | |
728 | + | let fa = cW(eG, eH, eJ, eK, eV)._2 | |
729 | + | let fb = aK(aK(eT, eU), eB) | |
730 | + | let fc = (ec - eV) | |
731 | + | let fd = if ((eG > 0)) | |
732 | + | then ((eT - eP) - fc) | |
733 | + | else ((fc + eT) - eP) | |
734 | + | let fe = (eG + eR) | |
735 | + | let ff = if ((fe == 0)) | |
746 | 736 | then $Tuple2(0, 0) | |
747 | - | else $Tuple2( | |
748 | - | let | |
749 | - | let | |
750 | - | let | |
751 | - | let | |
752 | - | let | |
753 | - | then ( | |
754 | - | else ( | |
755 | - | let | |
756 | - | let | |
757 | - | then if ( | |
737 | + | else $Tuple2(aN(fd), bQ(fe)) | |
738 | + | let fg = ff._1 | |
739 | + | let fh = ff._2 | |
740 | + | let fi = (eI - fg) | |
741 | + | let fj = em(bT, aC) | |
742 | + | let fk = if ((eG > 0)) | |
743 | + | then (aK((fg + fc), fj) - fc) | |
744 | + | else (aK((fg - fc), fj) - fc) | |
745 | + | let fl = ((eX - (fk + fc)) - fb) | |
746 | + | let fm = if ((0 > fl)) | |
747 | + | then if (eE) | |
758 | 748 | then 0 | |
759 | 749 | else throw("Invalid internalClosePosition params: unable to pay fee") | |
760 | - | else | |
761 | - | let | |
762 | - | then ( | |
763 | - | else | |
764 | - | if (if (( | |
765 | - | then ( | |
750 | + | else fl | |
751 | + | let fn = if (eD) | |
752 | + | then (fk + fm) | |
753 | + | else fk | |
754 | + | if (if ((eC != 0)) | |
755 | + | then (eC > eP) | |
766 | 756 | else false) | |
767 | - | then throw(((("Limit error: " + toString( | |
768 | - | else $Tuple17( | |
769 | - | then | |
757 | + | then throw(((("Limit error: " + toString(eP)) + " < ") + toString(eC))) | |
758 | + | else $Tuple17(fe, fn, fg, fh, fa, eV, if (if (eD) | |
759 | + | then eN | |
770 | 760 | else false) | |
771 | 761 | then 0 | |
772 | - | else | |
773 | - | then | |
774 | - | else 0)), ( | |
775 | - | then | |
776 | - | else 0)), ( | |
777 | - | then | |
778 | - | else 0)), ( | |
779 | - | then | |
780 | - | else 0)), ( | |
762 | + | else fm, cE, cF, eQ, (bm() - fi), (bD() - (if (eL) | |
763 | + | then aN(eR) | |
764 | + | else 0)), (bC() - (if (!(eL)) | |
765 | + | then aN(eR) | |
766 | + | else 0)), (bo() - (if (eL) | |
767 | + | then fi | |
768 | + | else 0)), (bn() - (if (!(eL)) | |
769 | + | then fi | |
770 | + | else 0)), (fb + cV), eP) | |
781 | 771 | } | |
782 | - | else throw(((("Invalid internalClosePosition params: invalid position size: " + toString( | |
772 | + | else throw(((("Invalid internalClosePosition params: invalid position size: " + toString(eA)) + " max: ") + toString(eM))) | |
783 | 773 | } | |
784 | 774 | ||
785 | 775 | ||
786 | - | func ft () = { | |
787 | - | let fu = ((bN() / 1000) / 60) | |
788 | - | let fv = (fu - aB) | |
789 | - | let fw = valueOrElse(getString(this, D), "") | |
790 | - | let fx = split(fw, ",") | |
791 | - | func fy (fz,fA) = if ((fv >= valueOrErrorMessage(parseInt(fA), ("getTwapSpotPrice: invalid int: " + fw)))) | |
792 | - | then (fz :+ parseIntValue(fA)) | |
793 | - | else fz | |
794 | - | ||
795 | - | let fB = { | |
796 | - | let fC = fx | |
797 | - | let fD = size(fC) | |
798 | - | let fE = nil | |
799 | - | func fF (fG,fH) = if ((fH >= fD)) | |
800 | - | then fG | |
801 | - | else fy(fG, fC[fH]) | |
802 | - | ||
803 | - | func fI (fG,fH) = if ((fH >= fD)) | |
804 | - | then fG | |
805 | - | else throw("List size exceeds 20") | |
806 | - | ||
807 | - | fI(fF(fF(fF(fF(fF(fF(fF(fF(fF(fF(fF(fF(fF(fF(fF(fF(fF(fF(fF(fF(fE, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20) | |
808 | - | } | |
809 | - | let fJ = if ((size(fB) > 0)) | |
810 | - | then max(fB) | |
811 | - | else valueOrErrorMessage(parseInt(fx[0]), ("getTwapSpotPrice: invalid int: " + fw)) | |
812 | - | let fK = valueOrElse(getInteger(this, E), 0) | |
813 | - | let fL = valueOrElse(getInteger(this, ((F + "_") + toString(fK))), 0) | |
814 | - | let fM = valueOrElse(getInteger(this, ((G + "_") + toString(fK))), 0) | |
815 | - | let fN = (fL + ((fu - fK) * fM)) | |
816 | - | let fO = valueOrElse(getInteger(this, ((F + "_") + toString(fJ))), 0) | |
817 | - | let fP = valueOrElse(getInteger(this, ((G + "_") + toString(fJ))), 0) | |
818 | - | let fQ = (fO + ((fv - fJ) * fP)) | |
819 | - | ((fN - fQ) / aB) | |
820 | - | } | |
821 | - | ||
822 | - | ||
823 | - | func fR () = { | |
824 | - | let bW = bq() | |
825 | - | if ((bW == 0)) | |
826 | - | then $Tuple2(bm(), bn()) | |
776 | + | func fo () = { | |
777 | + | let bR = bl() | |
778 | + | if ((bR == 0)) | |
779 | + | then $Tuple2(bh(), bi()) | |
827 | 780 | else { | |
828 | - | let | |
829 | - | let | |
830 | - | let | |
831 | - | let | |
832 | - | let | |
833 | - | $Tuple2( | |
781 | + | let fp = (bR > 0) | |
782 | + | let fq = dr(fp, aN(bR), false) | |
783 | + | let fr = fq._1 | |
784 | + | let fs = fq._2 | |
785 | + | let ft = fq._3 | |
786 | + | $Tuple2(fs, ft) | |
834 | 787 | } | |
835 | 788 | } | |
836 | 789 | ||
837 | 790 | ||
838 | - | func | |
839 | - | let | |
840 | - | let | |
841 | - | let | |
842 | - | let | |
843 | - | let | |
844 | - | let | |
845 | - | let | |
846 | - | let | |
847 | - | let | |
848 | - | toInt( | |
791 | + | func fu (fv,bl,fw,fx) = { | |
792 | + | let fy = toBigInt(fv) | |
793 | + | let fz = toBigInt(bl) | |
794 | + | let fA = toBigInt(fw) | |
795 | + | let fB = toBigInt(fx) | |
796 | + | let aX = aM(fA, fy) | |
797 | + | let fC = (fy + fz) | |
798 | + | let fD = aL(aX, fC) | |
799 | + | let fE = aL(fD, fC) | |
800 | + | let fF = aL(fB, fE) | |
801 | + | toInt(fF) | |
849 | 802 | } | |
850 | 803 | ||
851 | 804 | ||
852 | - | func | |
853 | - | let | |
854 | - | if (( | |
805 | + | func fG (fH,cw,cx) = { | |
806 | + | let bR = bl() | |
807 | + | if ((bR == 0)) | |
855 | 808 | then { | |
856 | - | let | |
857 | - | $Tuple3( | |
809 | + | let fI = aI(aK(fH, cx), cw) | |
810 | + | $Tuple3(fI, az, 0) | |
858 | 811 | } | |
859 | 812 | else { | |
860 | - | let | |
861 | - | let | |
862 | - | let | |
863 | - | let | |
864 | - | let | |
865 | - | $Tuple3( | |
813 | + | let fp = (bR > 0) | |
814 | + | let fr = dr(fp, aN(bR), false)._1 | |
815 | + | let fI = fu(cx, bR, cw, fH) | |
816 | + | let fJ = az | |
817 | + | let fK = ea(bR, fr, cw, fI, cx, fJ, aC)._2 | |
818 | + | $Tuple3(fI, fJ, fK) | |
866 | 819 | } | |
867 | 820 | } | |
868 | 821 | ||
869 | 822 | ||
870 | - | func | |
871 | - | let | |
872 | - | let | |
873 | - | let | |
874 | - | if (if (if (( | |
823 | + | func fL () = { | |
824 | + | let fM = dx() | |
825 | + | let fN = dR() | |
826 | + | let fO = (fN - fM) | |
827 | + | if (if (if ((bC() == 0)) | |
875 | 828 | then true | |
876 | - | else ( | |
829 | + | else (bD() == 0)) | |
877 | 830 | then true | |
878 | - | else | |
831 | + | else dD()) | |
879 | 832 | then $Tuple3(0, 0, 0) | |
880 | - | else if ((0 > | |
833 | + | else if ((0 > fO)) | |
881 | 834 | then { | |
882 | - | let | |
883 | - | if (( | |
835 | + | let fP = aI(aK(fO, br()), aB) | |
836 | + | if ((bH() == aE)) | |
884 | 837 | then { | |
885 | - | let | |
886 | - | $Tuple3( | |
838 | + | let fQ = aI(aK(fP, bC()), bD()) | |
839 | + | $Tuple3(fP, fQ, 0) | |
887 | 840 | } | |
888 | 841 | else { | |
889 | - | let | |
890 | - | let | |
891 | - | let | |
892 | - | $Tuple3( | |
842 | + | let fR = aN(aK(fP, bC())) | |
843 | + | let fS = aN(aK(fP, bD())) | |
844 | + | let fT = (fR - fS) | |
845 | + | $Tuple3(fP, fP, fT) | |
893 | 846 | } | |
894 | 847 | } | |
895 | 848 | else { | |
896 | - | let | |
897 | - | if (( | |
849 | + | let fQ = aI(aK(fO, br()), aB) | |
850 | + | if ((bH() == aE)) | |
898 | 851 | then { | |
899 | - | let | |
900 | - | $Tuple3( | |
852 | + | let fP = aI(aK(fQ, bD()), bC()) | |
853 | + | $Tuple3(fP, fQ, 0) | |
901 | 854 | } | |
902 | 855 | else { | |
903 | - | let | |
904 | - | let | |
905 | - | let | |
906 | - | $Tuple3( | |
856 | + | let fS = aN(aK(fQ, bD())) | |
857 | + | let fR = aN(aK(fQ, bC())) | |
858 | + | let fT = (fS - fR) | |
859 | + | $Tuple3(fQ, fQ, fT) | |
907 | 860 | } | |
908 | 861 | } | |
909 | 862 | } | |
910 | 863 | ||
911 | 864 | ||
912 | - | func | |
913 | - | let | |
914 | - | let | |
915 | - | let | |
865 | + | func fU (fV,fW) = { | |
866 | + | let fX = be() | |
867 | + | let fY = aK(fX, fW) | |
868 | + | let fZ = if ((fV != "")) | |
916 | 869 | then { | |
917 | - | let | |
918 | - | if (( | |
870 | + | let ga = ba(aq(), ae(as, fV)) | |
871 | + | if ((ga == at)) | |
919 | 872 | then { | |
920 | - | let | |
921 | - | let | |
922 | - | $Tuple2( | |
873 | + | let gb = bc(aq(), ae(ar, fV)) | |
874 | + | let gc = aK(fY, gb) | |
875 | + | $Tuple2(gc, true) | |
923 | 876 | } | |
924 | 877 | else throw("Invalid attached artifact") | |
925 | 878 | } | |
926 | - | else $Tuple2( | |
927 | - | let | |
928 | - | let | |
929 | - | $Tuple2( | |
879 | + | else $Tuple2(fY, false) | |
880 | + | let gc = fZ._1 | |
881 | + | let gd = fZ._2 | |
882 | + | $Tuple2(gc, gd) | |
930 | 883 | } | |
931 | 884 | ||
932 | 885 | ||
933 | - | func | |
934 | - | let | |
935 | - | if (( | |
886 | + | func ge (bT,gf) = { | |
887 | + | let eG = bS(bT)._1 | |
888 | + | if ((eG == 0)) | |
936 | 889 | then true | |
937 | - | else ( | |
890 | + | else (bX(bT) == gf) | |
938 | 891 | } | |
939 | 892 | ||
940 | 893 | ||
941 | - | func | |
894 | + | func gg (bT,gf) = (bX(bT) == gf) | |
942 | 895 | ||
943 | 896 | ||
944 | - | func | |
945 | - | let | |
946 | - | if (( | |
897 | + | func gh (bT,fV) = { | |
898 | + | let gi = invoke(an(), "computeFeeDiscount", [bT], nil) | |
899 | + | if ((gi == gi)) | |
947 | 900 | then { | |
948 | - | let | |
949 | - | let | |
950 | - | if ($isInstanceOf( | |
901 | + | let gj = { | |
902 | + | let bV = gi | |
903 | + | if ($isInstanceOf(bV, "Int")) | |
951 | 904 | then { | |
952 | - | let | |
953 | - | | |
905 | + | let gk = bV | |
906 | + | gk | |
954 | 907 | } | |
955 | 908 | else throw("Invalid computeFeeDiscount result") | |
956 | 909 | } | |
957 | - | let | |
958 | - | let | |
959 | - | let | |
960 | - | $Tuple2( | |
910 | + | let gl = fU(fV, gj) | |
911 | + | let gc = gl._1 | |
912 | + | let gd = gl._2 | |
913 | + | $Tuple2(gc, gd) | |
961 | 914 | } | |
962 | 915 | else throw("Strict value is not equal to itself.") | |
963 | 916 | } | |
964 | 917 | ||
965 | 918 | ||
966 | - | func | |
967 | - | let | |
968 | - | then toBase58String(valueOrErrorMessage( | |
919 | + | func gm (bK) = { | |
920 | + | let gn = if ((size(bK.payments) > 1)) | |
921 | + | then toBase58String(valueOrErrorMessage(bK.payments[1].assetId, "Invalid artifactId")) | |
969 | 922 | else "" | |
970 | - | | |
923 | + | gn | |
971 | 924 | } | |
972 | 925 | ||
973 | 926 | ||
974 | - | func | |
975 | - | let | |
976 | - | let | |
977 | - | $Tuple2( | |
927 | + | func go (gp) = { | |
928 | + | let gq = aK(gp, bF()) | |
929 | + | let gr = (gp - gq) | |
930 | + | $Tuple2(gq, gr) | |
978 | 931 | } | |
979 | 932 | ||
980 | 933 | ||
981 | - | func | |
934 | + | func gs (gt,gu,gv,gw,eB,gx,gy,gz,gA,dQ,gB,gC,gD,gE) = [IntegerEntry(s, gt), IntegerEntry(t, gu), IntegerEntry(u, gv), IntegerEntry(r, gw), IntegerEntry(p, eB), IntegerEntry(w, gx), IntegerEntry(x, gy), IntegerEntry(v, gz), IntegerEntry(y, gA), IntegerEntry(z, dQ), IntegerEntry(A, gB), IntegerEntry(B, gB), IntegerEntry(q, gD), IntegerEntry(C, gE)] | |
982 | 935 | ||
983 | 936 | ||
984 | - | func | |
937 | + | func gF (gG,gH,gI,gJ,gK) = [IntegerEntry(F, gG), IntegerEntry(D, gH), IntegerEntry(E, gI), IntegerEntry(G, gJ), IntegerEntry(H, gK)] | |
985 | 938 | ||
986 | 939 | ||
987 | - | func | |
940 | + | func gL (gM,ag) = if (gM) | |
988 | 941 | then { | |
989 | - | let | |
990 | - | [IntegerEntry( | |
942 | + | let gN = bE() | |
943 | + | [IntegerEntry(ae(i, ag), (gN + 1)), IntegerEntry(d, (gN + 1))] | |
991 | 944 | } | |
992 | 945 | else nil | |
993 | 946 | ||
994 | 947 | ||
995 | - | func | |
996 | - | then [IntegerEntry( | |
948 | + | func gO (gM,ag,eB) = if (gM) | |
949 | + | then [IntegerEntry(ae(k, ag), eB)] | |
997 | 950 | else nil | |
998 | 951 | ||
999 | 952 | ||
1000 | - | func | |
953 | + | func gP (ag,eA,gQ,gR,db,gS) = [IntegerEntry(ae(e, ag), eA), IntegerEntry(ae(f, ag), gQ), IntegerEntry(ae(g, ag), gR), IntegerEntry(ae(h, ag), db), IntegerEntry(ae(l, ag), gS)] | |
1001 | 954 | ||
1002 | 955 | ||
1003 | - | func hw (hx) = { | |
1004 | - | let fu = ((bN() / 1000) / 60) | |
1005 | - | let hy = valueOrElse(getInteger(this, E), 0) | |
1006 | - | if ((hy > fu)) | |
1007 | - | then throw("TWAP out-of-order") | |
1008 | - | else { | |
1009 | - | let fK = if ((hy == 0)) | |
1010 | - | then fu | |
1011 | - | else hy | |
1012 | - | if ((fu > hy)) | |
1013 | - | then { | |
1014 | - | let hz = valueOrElse(getInteger(this, ((F + "_") + toString(hy))), 0) | |
1015 | - | let hA = valueOrElse(getInteger(this, ((G + "_") + toString(hy))), hx) | |
1016 | - | let hB = (hz + ((fu - fK) * hA)) | |
1017 | - | let fx = aY(aW(valueOrElse(getString(this, D), "")), aB, toString(fu)) | |
1018 | - | [IntegerEntry(aj(F, toString(fu)), hB), IntegerEntry(aj(G, toString(fu)), hx), IntegerEntry(aj(H, toString(fu)), hy), IntegerEntry(E, fu), StringEntry(D, aU(fx))] | |
1019 | - | } | |
1020 | - | else { | |
1021 | - | let hC = valueOrElse(getInteger(this, aj(H, toString(fu))), 0) | |
1022 | - | let hz = valueOrElse(getInteger(this, aj(F, toString(hC))), 0) | |
1023 | - | let hA = valueOrElse(getInteger(this, aj(G, toString(hC))), hx) | |
1024 | - | let hB = (hz + ((fu - hC) * hA)) | |
1025 | - | [IntegerEntry(aj(F, toString(fu)), hB), IntegerEntry(aj(G, toString(fu)), hx)] | |
1026 | - | } | |
1027 | - | } | |
956 | + | func gT (cw,cx) = [IntegerEntry(I, cw), IntegerEntry(J, cx)] | |
957 | + | ||
958 | + | ||
959 | + | func gU (cB,cC) = [IntegerEntry(K, cB), IntegerEntry(L, cC)] | |
960 | + | ||
961 | + | ||
962 | + | func gV (cw,cx,gW,gX,gY,gZ,ha,hb) = { | |
963 | + | let cB = bj() | |
964 | + | let cC = bk() | |
965 | + | if (((gY - gZ) != gW)) | |
966 | + | then throw(((((("Invalid AMM state data: " + toString(gY)) + " + ") + toString(gZ)) + " != ") + toString(gW))) | |
967 | + | else (gT(cw, cx) ++ [IntegerEntry(M, gW), IntegerEntry(P, gX), IntegerEntry(N, gY), IntegerEntry(O, gZ), IntegerEntry(R, ha), IntegerEntry(Q, hb)]) | |
1028 | 968 | } | |
1029 | 969 | ||
1030 | 970 | ||
1031 | - | func | |
971 | + | func hc (ag) = [DeleteEntry(ae(e, ag)), DeleteEntry(ae(f, ag)), DeleteEntry(ae(g, ag)), DeleteEntry(ae(h, ag)), DeleteEntry(ae(j, ag)), DeleteEntry(ae(k, ag)), DeleteEntry(ae(l, ag))] | |
1032 | 972 | ||
1033 | 973 | ||
1034 | - | func hE (cG,cH) = [IntegerEntry(P, cG), IntegerEntry(Q, cH)] | |
1035 | - | ||
1036 | - | ||
1037 | - | func hF (cB,cC,hG,hH,hI,hJ,hK,hL) = { | |
1038 | - | let cG = bo() | |
1039 | - | let cH = bp() | |
1040 | - | if (((hI - hJ) != hG)) | |
1041 | - | then throw(((((("Invalid AMM state data: " + toString(hI)) + " + ") + toString(hJ)) + " != ") + toString(hG))) | |
1042 | - | else ((hD(cB, cC) ++ [IntegerEntry(R, hG), IntegerEntry(U, hH), IntegerEntry(S, hI), IntegerEntry(T, hJ), IntegerEntry(W, hK), IntegerEntry(V, hL)]) ++ hw(aN(aP(cB, cG), aP(cC, cH)))) | |
974 | + | func hd (ag,he) = { | |
975 | + | let hf = assetBalance(this, aj()) | |
976 | + | if ((he > hf)) | |
977 | + | then throw(((("Unable to withdraw " + toString(he)) + " from contract balance ") + toString(hf))) | |
978 | + | else [ScriptTransfer(ag, he, aj())] | |
1043 | 979 | } | |
1044 | 980 | ||
1045 | 981 | ||
1046 | - | func hM (al) = [DeleteEntry(aj(e, al)), DeleteEntry(aj(f, al)), DeleteEntry(aj(g, al)), DeleteEntry(aj(h, al)), DeleteEntry(aj(j, al)), DeleteEntry(aj(k, al)), DeleteEntry(aj(l, al))] | |
982 | + | func hg (bK) = if ((0 > bK)) | |
983 | + | then throw("Balance") | |
984 | + | else [IntegerEntry(c, bK)] | |
1047 | 985 | ||
1048 | 986 | ||
1049 | - | func hN (al,hO) = { | |
1050 | - | let hP = assetBalance(this, ao()) | |
1051 | - | if ((hO > hP)) | |
1052 | - | then throw(((("Unable to withdraw " + toString(hO)) + " from contract balance ") + toString(hP))) | |
1053 | - | else [ScriptTransfer(al, hO, ao())] | |
1054 | - | } | |
987 | + | func hh (bK) = [ScriptTransfer(al(), bK, aj())] | |
1055 | 988 | ||
1056 | 989 | ||
1057 | - | func hQ (bP) = if ((0 > bP)) | |
1058 | - | then throw("Balance") | |
1059 | - | else [IntegerEntry(c, bP)] | |
1060 | - | ||
1061 | - | ||
1062 | - | func hR (bP) = [ScriptTransfer(aq(), bP, ao())] | |
1063 | - | ||
1064 | - | ||
1065 | - | func hS (hT,bP) = if (hT) | |
1066 | - | then [Burn(valueOrErrorMessage(bP.payments[1].assetId, "Invalid artifact"), 1)] | |
990 | + | func hi (hj,bK) = if (hj) | |
991 | + | then [Burn(valueOrErrorMessage(bK.payments[1].assetId, "Invalid artifact"), 1)] | |
1067 | 992 | else nil | |
1068 | 993 | ||
1069 | 994 | ||
1070 | - | @Callable( | |
1071 | - | func pause () = if (( | |
995 | + | @Callable(bK) | |
996 | + | func pause () = if ((bK.caller != ai())) | |
1072 | 997 | then throw("Invalid pause params") | |
1073 | 998 | else [BooleanEntry(n, true)] | |
1074 | 999 | ||
1075 | 1000 | ||
1076 | 1001 | ||
1077 | - | @Callable( | |
1078 | - | func unpause () = if (( | |
1002 | + | @Callable(bK) | |
1003 | + | func unpause () = if ((bK.caller != ai())) | |
1079 | 1004 | then throw("Invalid unpause params") | |
1080 | 1005 | else [BooleanEntry(n, false)] | |
1081 | 1006 | ||
1082 | 1007 | ||
1083 | 1008 | ||
1084 | - | @Callable( | |
1085 | - | func setCloseOnly () = if (( | |
1009 | + | @Callable(bK) | |
1010 | + | func setCloseOnly () = if ((bK.caller != ai())) | |
1086 | 1011 | then throw("Invalid setCloseOnly params") | |
1087 | 1012 | else [BooleanEntry(o, true)] | |
1088 | 1013 | ||
1089 | 1014 | ||
1090 | 1015 | ||
1091 | - | @Callable( | |
1092 | - | func unsetCloseOnly () = if (( | |
1016 | + | @Callable(bK) | |
1017 | + | func unsetCloseOnly () = if ((bK.caller != ai())) | |
1093 | 1018 | then throw("Invalid unsetCloseOnly params") | |
1094 | 1019 | else [BooleanEntry(o, false)] | |
1095 | 1020 | ||
1096 | 1021 | ||
1097 | 1022 | ||
1098 | - | @Callable( | |
1099 | - | func addLiquidity ( | |
1023 | + | @Callable(bK) | |
1024 | + | func addLiquidity (cr) = if (if ((bK.caller != ai())) | |
1100 | 1025 | then true | |
1101 | - | else (0 >= | |
1026 | + | else (0 >= cr)) | |
1102 | 1027 | then throw("Invalid addLiquidity params") | |
1103 | 1028 | else { | |
1104 | - | let | |
1105 | - | let | |
1106 | - | let | |
1107 | - | let | |
1108 | - | let | |
1109 | - | let | |
1110 | - | let | |
1111 | - | let | |
1112 | - | let | |
1113 | - | let | |
1114 | - | let | |
1115 | - | let | |
1116 | - | let | |
1029 | + | let cw = bh() | |
1030 | + | let cx = bi() | |
1031 | + | let cB = bj() | |
1032 | + | let cC = bk() | |
1033 | + | let hk = aI(aK(cw, cB), aK(cx, cC)) | |
1034 | + | let hl = (cw + cr) | |
1035 | + | let hm = (aI(aK(hl, cB), hk) - cx) | |
1036 | + | let hn = (cx + hm) | |
1037 | + | let ho = fG(dx(), hl, hn) | |
1038 | + | let hp = ho._1 | |
1039 | + | let hq = ho._2 | |
1040 | + | let fK = ho._3 | |
1041 | + | let hr = if ((fK != 0)) | |
1117 | 1042 | then { | |
1118 | - | let | |
1119 | - | if (( | |
1043 | + | let hr = invoke(am(), "exchangeFreeAndLocked", [fK], nil) | |
1044 | + | if ((hr == hr)) | |
1120 | 1045 | then nil | |
1121 | 1046 | else throw("Strict value is not equal to itself.") | |
1122 | 1047 | } | |
1123 | 1048 | else nil | |
1124 | - | if (( | |
1125 | - | then ( | |
1049 | + | if ((hr == hr)) | |
1050 | + | then (gT(hl, hn) ++ gU(hp, hq)) | |
1126 | 1051 | else throw("Strict value is not equal to itself.") | |
1127 | 1052 | } | |
1128 | 1053 | ||
1129 | 1054 | ||
1130 | 1055 | ||
1131 | - | @Callable( | |
1132 | - | func removeLiquidity ( | |
1056 | + | @Callable(bK) | |
1057 | + | func removeLiquidity (cr) = if (if ((bK.caller != ai())) | |
1133 | 1058 | then true | |
1134 | - | else ( | |
1059 | + | else (cr >= 0)) | |
1135 | 1060 | then throw("Invalid removeLiquidity params") | |
1136 | 1061 | else { | |
1137 | - | let | |
1138 | - | let | |
1139 | - | let | |
1140 | - | let | |
1141 | - | let | |
1142 | - | let | |
1143 | - | let | |
1144 | - | let | |
1145 | - | let | |
1146 | - | let | |
1147 | - | let | |
1148 | - | let | |
1149 | - | let | |
1062 | + | let cw = bh() | |
1063 | + | let cx = bi() | |
1064 | + | let cB = bj() | |
1065 | + | let cC = bk() | |
1066 | + | let hk = aI(aK(cw, cB), aK(cx, cC)) | |
1067 | + | let hl = (cw - cr) | |
1068 | + | let hs = aN((aI(aK(hl, cB), hk) - cx)) | |
1069 | + | let hn = (cx - hs) | |
1070 | + | let ht = fG(dx(), hl, hn) | |
1071 | + | let hp = ht._1 | |
1072 | + | let hq = ht._2 | |
1073 | + | let fK = ht._3 | |
1074 | + | let hr = if ((fK != 0)) | |
1150 | 1075 | then { | |
1151 | - | let | |
1152 | - | if (( | |
1076 | + | let hr = invoke(am(), "exchangeFreeAndLocked", [fK], nil) | |
1077 | + | if ((hr == hr)) | |
1153 | 1078 | then nil | |
1154 | 1079 | else throw("Strict value is not equal to itself.") | |
1155 | 1080 | } | |
1156 | 1081 | else nil | |
1157 | - | if (( | |
1158 | - | then ( | |
1082 | + | if ((hr == hr)) | |
1083 | + | then (gT(hl, hn) ++ gU(hp, hq)) | |
1159 | 1084 | else throw("Strict value is not equal to itself.") | |
1160 | 1085 | } | |
1161 | 1086 | ||
1162 | 1087 | ||
1163 | 1088 | ||
1164 | - | @Callable( | |
1165 | - | func changeSettings ( | |
1089 | + | @Callable(bK) | |
1090 | + | func changeSettings (gt,gu,gv,gw,eB,gx,gy,gz,gA,dQ,gB,gC,gD,gE) = if (if (if (if (if (if (if (if (if (if (if (if (if (if (if (if (if ((0 >= gw)) | |
1166 | 1091 | then true | |
1167 | - | else (0 >= | |
1092 | + | else (0 >= gt)) | |
1168 | 1093 | then true | |
1169 | - | else (0 >= | |
1094 | + | else (0 >= gu)) | |
1170 | 1095 | then true | |
1171 | - | else (0 >= | |
1096 | + | else (0 >= gv)) | |
1172 | 1097 | then true | |
1173 | - | else (0 >= | |
1098 | + | else (0 >= eB)) | |
1174 | 1099 | then true | |
1175 | - | else (0 >= | |
1100 | + | else (0 >= gx)) | |
1176 | 1101 | then true | |
1177 | - | else (0 >= | |
1102 | + | else (0 >= gy)) | |
1178 | 1103 | then true | |
1179 | - | else (0 >= | |
1104 | + | else (0 >= gz)) | |
1180 | 1105 | then true | |
1181 | - | else (0 >= | |
1106 | + | else (0 >= gA)) | |
1182 | 1107 | then true | |
1183 | - | else (0 >= | |
1108 | + | else (0 >= dQ)) | |
1184 | 1109 | then true | |
1185 | - | else (0 >= | |
1110 | + | else (0 >= gB)) | |
1186 | 1111 | then true | |
1187 | - | else ( | |
1112 | + | else (gB > az)) | |
1188 | 1113 | then true | |
1189 | - | else (0 >= | |
1114 | + | else (0 >= gC)) | |
1190 | 1115 | then true | |
1191 | - | else (0 >= | |
1116 | + | else (0 >= gD)) | |
1192 | 1117 | then true | |
1193 | - | else if (( | |
1194 | - | then ( | |
1118 | + | else if ((gE != aF)) | |
1119 | + | then (gE != aE) | |
1195 | 1120 | else false) | |
1196 | 1121 | then true | |
1197 | - | else !( | |
1122 | + | else !(cm())) | |
1198 | 1123 | then true | |
1199 | - | else ( | |
1124 | + | else (bK.caller != ai())) | |
1200 | 1125 | then throw("Invalid changeSettings params") | |
1201 | - | else | |
1126 | + | else gs(gt, gu, gv, gw, eB, gx, gy, gz, gA, dQ, gB, gC, gD, gE) | |
1202 | 1127 | ||
1203 | 1128 | ||
1204 | 1129 | ||
1205 | - | @Callable( | |
1206 | - | func initialize ( | |
1130 | + | @Callable(bK) | |
1131 | + | func initialize (cw,cx,gw,gt,gu,gv,eB,hu,hv,hw,gx,gy,gz,gA,dQ,gB,gC,gD,gE) = if (if (if (if (if (if (if (if (if (if (if (if (if (if (if (if (if (if (if ((0 >= cw)) | |
1207 | 1132 | then true | |
1208 | - | else (0 >= | |
1133 | + | else (0 >= cx)) | |
1209 | 1134 | then true | |
1210 | - | else (0 >= | |
1135 | + | else (0 >= gw)) | |
1211 | 1136 | then true | |
1212 | - | else (0 >= | |
1137 | + | else (0 >= gt)) | |
1213 | 1138 | then true | |
1214 | - | else (0 >= | |
1139 | + | else (0 >= gu)) | |
1215 | 1140 | then true | |
1216 | - | else (0 >= | |
1141 | + | else (0 >= gv)) | |
1217 | 1142 | then true | |
1218 | - | else (0 >= | |
1143 | + | else (0 >= eB)) | |
1219 | 1144 | then true | |
1220 | - | else (0 >= | |
1145 | + | else (0 >= gx)) | |
1221 | 1146 | then true | |
1222 | - | else (0 >= | |
1147 | + | else (0 >= gy)) | |
1223 | 1148 | then true | |
1224 | - | else (0 >= | |
1149 | + | else (0 >= gz)) | |
1225 | 1150 | then true | |
1226 | - | else (0 >= | |
1151 | + | else (0 >= gA)) | |
1227 | 1152 | then true | |
1228 | - | else (0 >= | |
1153 | + | else (0 >= dQ)) | |
1229 | 1154 | then true | |
1230 | - | else (0 >= | |
1155 | + | else (0 >= gB)) | |
1231 | 1156 | then true | |
1232 | - | else ( | |
1157 | + | else (gB > az)) | |
1233 | 1158 | then true | |
1234 | - | else (0 >= | |
1159 | + | else (0 >= gC)) | |
1235 | 1160 | then true | |
1236 | - | else (0 >= | |
1161 | + | else (0 >= gD)) | |
1237 | 1162 | then true | |
1238 | - | else if (( | |
1239 | - | then ( | |
1163 | + | else if ((gE != aF)) | |
1164 | + | then (gE != aE) | |
1240 | 1165 | else false) | |
1241 | 1166 | then true | |
1242 | - | else | |
1167 | + | else cm()) | |
1243 | 1168 | then true | |
1244 | - | else ( | |
1169 | + | else (bK.caller != this)) | |
1245 | 1170 | then throw("Invalid initialize parameters") | |
1246 | - | else (((( | |
1171 | + | else ((((gV(cw, cx, 0, 0, 0, 0, 0, 0) ++ gs(gt, gu, gv, gw, eB, gx, gy, gz, gA, dQ, gB, gC, gD, gE)) ++ gF((bI() + gw), 0, 0, 0, 0)) ++ hg(0)) ++ [BooleanEntry(m, true), StringEntry(a, hu), StringEntry(b, hv), StringEntry(T, toString(addressFromStringValue(hw)))]) | |
1247 | 1172 | ||
1248 | 1173 | ||
1249 | 1174 | ||
1250 | - | @Callable( | |
1251 | - | func increasePosition ( | |
1252 | - | let | |
1253 | - | if (( | |
1175 | + | @Callable(bK) | |
1176 | + | func increasePosition (hx,hy,hz,hA) = { | |
1177 | + | let hB = invoke(this, "syncTerminalPriceToOracle", nil, nil) | |
1178 | + | if ((hB == hB)) | |
1254 | 1179 | then { | |
1255 | - | let | |
1256 | - | if (( | |
1180 | + | let hC = invoke(this, "ensureCalledOnce", nil, nil) | |
1181 | + | if ((hC == hC)) | |
1257 | 1182 | then { | |
1258 | - | let | |
1259 | - | let | |
1260 | - | let | |
1261 | - | let | |
1262 | - | let | |
1263 | - | if (if (if (if (if (if (if (if (if (if (( | |
1264 | - | then ( | |
1183 | + | let bT = bJ(bK) | |
1184 | + | let hD = bK.payments[0].amount | |
1185 | + | let gf = bK.payments[0].assetId | |
1186 | + | let hE = toBase58String(value(gf)) | |
1187 | + | let hF = (gf == aj()) | |
1188 | + | if (if (if (if (if (if (if (if (if (if ((hx != au)) | |
1189 | + | then (hx != av) | |
1265 | 1190 | else false) | |
1266 | 1191 | then true | |
1267 | - | else (0 >= | |
1192 | + | else (0 >= hD)) | |
1268 | 1193 | then true | |
1269 | - | else !( | |
1194 | + | else !(cm())) | |
1270 | 1195 | then true | |
1271 | - | else !( | |
1196 | + | else !(hF)) | |
1272 | 1197 | then true | |
1273 | - | else !( | |
1198 | + | else !(ge(bT, hE))) | |
1274 | 1199 | then true | |
1275 | - | else !( | |
1200 | + | else !(bL(aI(az, hy), bg(), true))) | |
1276 | 1201 | then true | |
1277 | - | else | |
1202 | + | else cn()) | |
1278 | 1203 | then true | |
1279 | - | else | |
1204 | + | else co()) | |
1280 | 1205 | then true | |
1281 | - | else | |
1206 | + | else dD()) | |
1282 | 1207 | then throw("Invalid increasePosition parameters") | |
1283 | 1208 | else { | |
1284 | - | let | |
1285 | - | let | |
1286 | - | let | |
1287 | - | let | |
1288 | - | let | |
1289 | - | let | |
1290 | - | if (( | |
1209 | + | let hG = gh(bT, gm(bK)) | |
1210 | + | let gc = hG._1 | |
1211 | + | let gd = hG._2 | |
1212 | + | let he = aI(hD, (aK(gc, hy) + az)) | |
1213 | + | let hH = (hD - he) | |
1214 | + | let hI = invoke(ap(), "acceptPaymentWithLink", [bT, hA], [AttachedPayment(aj(), hH)]) | |
1215 | + | if ((hI == hI)) | |
1291 | 1216 | then { | |
1292 | - | let | |
1293 | - | let | |
1294 | - | if ($isInstanceOf( | |
1217 | + | let hJ = { | |
1218 | + | let bV = hI | |
1219 | + | if ($isInstanceOf(bV, "Int")) | |
1295 | 1220 | then { | |
1296 | - | let | |
1297 | - | | |
1221 | + | let gk = bV | |
1222 | + | gk | |
1298 | 1223 | } | |
1299 | 1224 | else throw("Invalid referrerFee") | |
1300 | 1225 | } | |
1301 | - | let | |
1302 | - | let | |
1303 | - | let | |
1304 | - | let | |
1305 | - | let | |
1306 | - | let | |
1307 | - | let | |
1308 | - | let | |
1309 | - | let | |
1310 | - | then ( | |
1311 | - | else ( | |
1312 | - | let | |
1313 | - | then | |
1226 | + | let hK = (hH - hJ) | |
1227 | + | let hL = bS(bT) | |
1228 | + | let eG = hL._1 | |
1229 | + | let eH = hL._2 | |
1230 | + | let eI = hL._3 | |
1231 | + | let eJ = hL._4 | |
1232 | + | let eK = hL._5 | |
1233 | + | let hM = (eG == 0) | |
1234 | + | let hN = if ((eG > 0)) | |
1235 | + | then (hx == au) | |
1236 | + | else (hx == av) | |
1237 | + | let hO = if (!(hM)) | |
1238 | + | then hN | |
1314 | 1239 | else false | |
1315 | - | let | |
1316 | - | let | |
1240 | + | let hP = (hx == au) | |
1241 | + | let hQ = if (if (hM) | |
1317 | 1242 | then true | |
1318 | - | else | |
1243 | + | else hO) | |
1319 | 1244 | then { | |
1320 | - | let | |
1321 | - | let | |
1322 | - | let | |
1323 | - | let | |
1324 | - | let | |
1325 | - | let | |
1326 | - | if (if (( | |
1327 | - | then ( | |
1245 | + | let hR = aK(he, hy) | |
1246 | + | let hS = cA(hP, hR) | |
1247 | + | let cH = hS._1 | |
1248 | + | let cE = hS._2 | |
1249 | + | let cF = hS._3 | |
1250 | + | let eQ = hS._4 | |
1251 | + | if (if ((hz != 0)) | |
1252 | + | then (hz > aN(cH)) | |
1328 | 1253 | else false) | |
1329 | - | then throw(((("Limit error: " + toString( | |
1254 | + | then throw(((("Limit error: " + toString(aN(cH))) + " < ") + toString(hz))) | |
1330 | 1255 | else { | |
1331 | - | let | |
1332 | - | let | |
1333 | - | then | |
1256 | + | let fe = (eG + cH) | |
1257 | + | let hT = (bo() + (if ((fe > 0)) | |
1258 | + | then hR | |
1334 | 1259 | else 0)) | |
1335 | - | let | |
1336 | - | then | |
1260 | + | let hU = (bn() + (if ((0 > fe)) | |
1261 | + | then hR | |
1337 | 1262 | else 0)) | |
1338 | - | let | |
1339 | - | let | |
1340 | - | let | |
1341 | - | let | |
1342 | - | let | |
1343 | - | if (!( | |
1263 | + | let hV = cW(eG, eH, eJ, eK, he) | |
1264 | + | let de = hV._1 | |
1265 | + | let eY = hV._2 | |
1266 | + | let eZ = hV._3 | |
1267 | + | let cV = hV._4 | |
1268 | + | if (!(dJ(cE, cF))) | |
1344 | 1269 | then throw("Over max spread limit") | |
1345 | - | else if (!( | |
1270 | + | else if (!(dN(hT, hU))) | |
1346 | 1271 | then throw("Over max open notional") | |
1347 | - | else $Tuple14( | |
1348 | - | then | |
1349 | - | else 0)), ( | |
1350 | - | then | |
1351 | - | else 0)), | |
1272 | + | else $Tuple14(fe, de, (eI + hR), bQ(fe), bI(), cF, cE, eQ, (bm() + hR), (bD() + (if ((fe > 0)) | |
1273 | + | then aN(cH) | |
1274 | + | else 0)), (bC() + (if ((0 > fe)) | |
1275 | + | then aN(cH) | |
1276 | + | else 0)), hT, hU, cV) | |
1352 | 1277 | } | |
1353 | 1278 | } | |
1354 | 1279 | else { | |
1355 | - | let | |
1356 | - | let | |
1357 | - | let | |
1358 | - | let | |
1359 | - | if (( | |
1280 | + | let hR = aK(he, hy) | |
1281 | + | let hW = ed(toString(bK.caller), aC) | |
1282 | + | let eT = hW._1 | |
1283 | + | let ec = hW._2 | |
1284 | + | if ((eT > hR)) | |
1360 | 1285 | then throw("Use decreasePosition to decrease position size") | |
1361 | 1286 | else throw("Close position first") | |
1362 | 1287 | } | |
1363 | - | let | |
1364 | - | let | |
1365 | - | let | |
1366 | - | let | |
1367 | - | let | |
1368 | - | let | |
1369 | - | let | |
1370 | - | let | |
1371 | - | let | |
1372 | - | let | |
1373 | - | let | |
1374 | - | let | |
1375 | - | let | |
1376 | - | let | |
1377 | - | let | |
1378 | - | let | |
1379 | - | let | |
1380 | - | let | |
1381 | - | then invoke( | |
1382 | - | else invoke( | |
1383 | - | if (( | |
1288 | + | let fe = hQ._1 | |
1289 | + | let hX = hQ._2 | |
1290 | + | let fg = hQ._3 | |
1291 | + | let hY = hQ._4 | |
1292 | + | let hZ = hQ._5 | |
1293 | + | let cF = hQ._6 | |
1294 | + | let cE = hQ._7 | |
1295 | + | let eQ = hQ._8 | |
1296 | + | let ia = hQ._9 | |
1297 | + | let ib = hQ._10 | |
1298 | + | let ic = hQ._11 | |
1299 | + | let hT = hQ._12 | |
1300 | + | let hU = hQ._13 | |
1301 | + | let cV = hQ._14 | |
1302 | + | let id = go((hK + cV)) | |
1303 | + | let gq = id._1 | |
1304 | + | let gr = id._2 | |
1305 | + | let ie = if ((he >= cV)) | |
1306 | + | then invoke(am(), "addLocked", nil, [AttachedPayment(aj(), (he - cV))]) | |
1307 | + | else invoke(am(), "withdrawLocked", [(cV - he)], nil) | |
1308 | + | if ((ie == ie)) | |
1384 | 1309 | then { | |
1385 | - | let | |
1386 | - | if (( | |
1310 | + | let if = invoke(am(), "addFree", nil, [AttachedPayment(aj(), gr)]) | |
1311 | + | if ((if == if)) | |
1387 | 1312 | then { | |
1388 | - | let | |
1389 | - | if (( | |
1313 | + | let ig = invoke(an(), "notifyFees", [bT, hK], nil) | |
1314 | + | if ((ig == ig)) | |
1390 | 1315 | then { | |
1391 | - | let | |
1392 | - | if (( | |
1393 | - | then (((((( | |
1316 | + | let ih = invoke(an(), "notifyNotional", [bT, fg], nil) | |
1317 | + | if ((ih == ih)) | |
1318 | + | then ((((((gP(bT, fe, hX, fg, hY, hZ) ++ gL(hM, bT)) ++ gO(hM, bT, gc)) ++ gV(cE, cF, eQ, ia, ib, ic, hT, hU)) ++ hh(gq)) ++ hg(((bd() + he) - cV))) ++ hi(gd, bK)) | |
1394 | 1319 | else throw("Strict value is not equal to itself.") | |
1395 | 1320 | } | |
1396 | 1321 | else throw("Strict value is not equal to itself.") | |
1397 | 1322 | } | |
1398 | 1323 | else throw("Strict value is not equal to itself.") | |
1399 | 1324 | } | |
1400 | 1325 | else throw("Strict value is not equal to itself.") | |
1401 | 1326 | } | |
1402 | 1327 | else throw("Strict value is not equal to itself.") | |
1403 | 1328 | } | |
1404 | 1329 | } | |
1405 | 1330 | else throw("Strict value is not equal to itself.") | |
1406 | 1331 | } | |
1407 | 1332 | else throw("Strict value is not equal to itself.") | |
1408 | 1333 | } | |
1409 | 1334 | ||
1410 | 1335 | ||
1411 | 1336 | ||
1412 | - | @Callable( | |
1337 | + | @Callable(bK) | |
1413 | 1338 | func addMargin () = { | |
1414 | - | let | |
1415 | - | if (( | |
1339 | + | let hB = invoke(this, "syncTerminalPriceToOracle", nil, nil) | |
1340 | + | if ((hB == hB)) | |
1416 | 1341 | then { | |
1417 | - | let | |
1418 | - | if (( | |
1342 | + | let hC = invoke(this, "ensureCalledOnce", nil, nil) | |
1343 | + | if ((hC == hC)) | |
1419 | 1344 | then { | |
1420 | - | let | |
1421 | - | let | |
1422 | - | let | |
1423 | - | let | |
1424 | - | let | |
1425 | - | if (if (if (if (if (if (if (!( | |
1345 | + | let bT = toString(bK.caller) | |
1346 | + | let he = bK.payments[0].amount | |
1347 | + | let gf = bK.payments[0].assetId | |
1348 | + | let hE = toBase58String(value(gf)) | |
1349 | + | let hF = (gf == aj()) | |
1350 | + | if (if (if (if (if (if (if (!(hF)) | |
1426 | 1351 | then true | |
1427 | - | else !( | |
1352 | + | else !(cd(toString(bK.caller)))) | |
1428 | 1353 | then true | |
1429 | - | else !( | |
1354 | + | else !(gg(bT, hE))) | |
1430 | 1355 | then true | |
1431 | - | else !( | |
1356 | + | else !(cm())) | |
1432 | 1357 | then true | |
1433 | - | else | |
1358 | + | else cn()) | |
1434 | 1359 | then true | |
1435 | - | else | |
1360 | + | else co()) | |
1436 | 1361 | then true | |
1437 | - | else | |
1362 | + | else dD()) | |
1438 | 1363 | then throw("Invalid addMargin parameters") | |
1439 | 1364 | else { | |
1440 | - | let | |
1441 | - | let | |
1442 | - | let | |
1443 | - | let | |
1444 | - | let | |
1445 | - | let | |
1446 | - | let | |
1447 | - | if (( | |
1365 | + | let ii = bS(bT) | |
1366 | + | let eG = ii._1 | |
1367 | + | let eH = ii._2 | |
1368 | + | let eI = ii._3 | |
1369 | + | let eJ = ii._4 | |
1370 | + | let eK = ii._5 | |
1371 | + | let ie = invoke(am(), "addLocked", nil, [AttachedPayment(aj(), he)]) | |
1372 | + | if ((ie == ie)) | |
1448 | 1373 | then { | |
1449 | - | let | |
1450 | - | let | |
1374 | + | let cV = cR(eH, eK) | |
1375 | + | let ij = if ((cV > 0)) | |
1451 | 1376 | then { | |
1452 | - | let | |
1453 | - | let | |
1454 | - | let | |
1455 | - | let | |
1456 | - | if (( | |
1377 | + | let ik = go(cV) | |
1378 | + | let gq = ik._1 | |
1379 | + | let gr = ik._2 | |
1380 | + | let il = invoke(am(), "withdrawLocked", [gq], nil) | |
1381 | + | if ((il == il)) | |
1457 | 1382 | then { | |
1458 | - | let | |
1459 | - | if (( | |
1460 | - | then | |
1383 | + | let im = invoke(am(), "exchangeFreeAndLocked", [-(gr)], nil) | |
1384 | + | if ((im == im)) | |
1385 | + | then hh(gq) | |
1461 | 1386 | else throw("Strict value is not equal to itself.") | |
1462 | 1387 | } | |
1463 | 1388 | else throw("Strict value is not equal to itself.") | |
1464 | 1389 | } | |
1465 | 1390 | else nil | |
1466 | - | if (( | |
1467 | - | then (( | |
1391 | + | if ((ij == ij)) | |
1392 | + | then ((gP(bT, eG, ((eH - cV) + he), eI, eJ, bI()) ++ hg(((bd() + he) - cV))) ++ ij) | |
1468 | 1393 | else throw("Strict value is not equal to itself.") | |
1469 | 1394 | } | |
1470 | 1395 | else throw("Strict value is not equal to itself.") | |
1471 | 1396 | } | |
1472 | 1397 | } | |
1473 | 1398 | else throw("Strict value is not equal to itself.") | |
1474 | 1399 | } | |
1475 | 1400 | else throw("Strict value is not equal to itself.") | |
1476 | 1401 | } | |
1477 | 1402 | ||
1478 | 1403 | ||
1479 | 1404 | ||
1480 | - | @Callable( | |
1481 | - | func removeMargin ( | |
1482 | - | let | |
1483 | - | if (( | |
1405 | + | @Callable(bK) | |
1406 | + | func removeMargin (he) = { | |
1407 | + | let hB = invoke(this, "syncTerminalPriceToOracle", nil, nil) | |
1408 | + | if ((hB == hB)) | |
1484 | 1409 | then { | |
1485 | - | let | |
1486 | - | if (( | |
1410 | + | let hC = invoke(this, "ensureCalledOnce", nil, nil) | |
1411 | + | if ((hC == hC)) | |
1487 | 1412 | then { | |
1488 | - | let | |
1489 | - | if (if (if (if (if ((0 >= | |
1413 | + | let bT = toString(bK.caller) | |
1414 | + | if (if (if (if (if ((0 >= he)) | |
1490 | 1415 | then true | |
1491 | - | else !( | |
1416 | + | else !(cd(bT))) | |
1492 | 1417 | then true | |
1493 | - | else !( | |
1418 | + | else !(cm())) | |
1494 | 1419 | then true | |
1495 | - | else | |
1420 | + | else cn()) | |
1496 | 1421 | then true | |
1497 | - | else | |
1422 | + | else dD()) | |
1498 | 1423 | then throw("Invalid removeMargin parameters") | |
1499 | 1424 | else { | |
1500 | - | let | |
1501 | - | let | |
1502 | - | let | |
1503 | - | let | |
1504 | - | let | |
1505 | - | let | |
1506 | - | let | |
1507 | - | let | |
1508 | - | let | |
1509 | - | let | |
1510 | - | let | |
1511 | - | if (( | |
1425 | + | let in = bS(bT) | |
1426 | + | let eG = in._1 | |
1427 | + | let eH = in._2 | |
1428 | + | let eI = in._3 | |
1429 | + | let eJ = in._4 | |
1430 | + | let eK = in._5 | |
1431 | + | let io = cW(eG, eH, eJ, eK, -(he)) | |
1432 | + | let de = io._1 | |
1433 | + | let df = io._2 | |
1434 | + | let da = io._3 | |
1435 | + | let cV = io._4 | |
1436 | + | if ((df != 0)) | |
1512 | 1437 | then throw("Invalid removed margin amount") | |
1513 | 1438 | else { | |
1514 | - | let | |
1515 | - | if (!( | |
1516 | - | then throw(((("Too much margin removed: " + toString( | |
1439 | + | let fj = ei(de, df, eI) | |
1440 | + | if (!(bL(fj, bg(), true))) | |
1441 | + | then throw(((("Too much margin removed: " + toString(fj)) + " < ") + toString(bg()))) | |
1517 | 1442 | else { | |
1518 | - | let | |
1519 | - | let | |
1520 | - | let | |
1521 | - | let | |
1443 | + | let ip = go(cV) | |
1444 | + | let gq = ip._1 | |
1445 | + | let gr = ip._2 | |
1446 | + | let ij = if ((cV > 0)) | |
1522 | 1447 | then { | |
1523 | - | let | |
1524 | - | if (( | |
1525 | - | then | |
1448 | + | let im = invoke(am(), "exchangeFreeAndLocked", [-(gr)], nil) | |
1449 | + | if ((im == im)) | |
1450 | + | then hh(gq) | |
1526 | 1451 | else throw("Strict value is not equal to itself.") | |
1527 | 1452 | } | |
1528 | 1453 | else nil | |
1529 | - | if (( | |
1454 | + | if ((ij == ij)) | |
1530 | 1455 | then { | |
1531 | - | let | |
1532 | - | if (( | |
1533 | - | then ((( | |
1456 | + | let il = invoke(am(), "withdrawLocked", [(he + gq)], nil) | |
1457 | + | if ((il == il)) | |
1458 | + | then (((gP(bT, eG, de, eI, bQ(eG), bI()) ++ hd(bK.caller, he)) ++ hg(((bd() - he) - cV))) ++ ij) | |
1534 | 1459 | else throw("Strict value is not equal to itself.") | |
1535 | 1460 | } | |
1536 | 1461 | else throw("Strict value is not equal to itself.") | |
1537 | 1462 | } | |
1538 | 1463 | } | |
1539 | 1464 | } | |
1540 | 1465 | } | |
1541 | 1466 | else throw("Strict value is not equal to itself.") | |
1542 | 1467 | } | |
1543 | 1468 | else throw("Strict value is not equal to itself.") | |
1544 | 1469 | } | |
1545 | 1470 | ||
1546 | 1471 | ||
1547 | 1472 | ||
1548 | - | @Callable( | |
1549 | - | func closePosition ( | |
1550 | - | let | |
1551 | - | if (( | |
1473 | + | @Callable(bK) | |
1474 | + | func closePosition (eA,eC,eD) = { | |
1475 | + | let hB = invoke(this, "syncTerminalPriceToOracle", nil, nil) | |
1476 | + | if ((hB == hB)) | |
1552 | 1477 | then { | |
1553 | - | let | |
1554 | - | if (( | |
1478 | + | let hC = invoke(this, "ensureCalledOnce", nil, nil) | |
1479 | + | if ((hC == hC)) | |
1555 | 1480 | then { | |
1556 | - | let | |
1557 | - | let | |
1558 | - | let | |
1559 | - | if (if (if (if (if (if (!( | |
1481 | + | let bT = bJ(bK) | |
1482 | + | let iq = valueOrErrorMessage(addressFromString(bT), "Invalid caller") | |
1483 | + | let cc = ca(bT) | |
1484 | + | if (if (if (if (if (if (!(cd(bT))) | |
1560 | 1485 | then true | |
1561 | - | else !( | |
1486 | + | else !(cm())) | |
1562 | 1487 | then true | |
1563 | - | else | |
1488 | + | else cn()) | |
1564 | 1489 | then true | |
1565 | - | else (0 >= | |
1490 | + | else (0 >= eA)) | |
1566 | 1491 | then true | |
1567 | - | else (0 > | |
1492 | + | else (0 > eC)) | |
1568 | 1493 | then true | |
1569 | - | else | |
1494 | + | else dD()) | |
1570 | 1495 | then throw("Invalid closePosition parameters") | |
1571 | 1496 | else { | |
1572 | - | let | |
1573 | - | let | |
1574 | - | let | |
1575 | - | let | |
1576 | - | let | |
1577 | - | let | |
1578 | - | let | |
1579 | - | let | |
1580 | - | let | |
1581 | - | let | |
1582 | - | let | |
1583 | - | let | |
1584 | - | let | |
1585 | - | let | |
1586 | - | let | |
1587 | - | let | |
1588 | - | let | |
1589 | - | let | |
1590 | - | if (( | |
1497 | + | let eK = bS(bT)._5 | |
1498 | + | let ir = ez(bT, eA, cc, eC, eD, true, true) | |
1499 | + | let fe = ir._1 | |
1500 | + | let fn = ir._2 | |
1501 | + | let fg = ir._3 | |
1502 | + | let fh = ir._4 | |
1503 | + | let fa = ir._5 | |
1504 | + | let eV = ir._6 | |
1505 | + | let fm = ir._7 | |
1506 | + | let cE = ir._8 | |
1507 | + | let cF = ir._9 | |
1508 | + | let eQ = ir._10 | |
1509 | + | let ia = ir._11 | |
1510 | + | let ib = ir._12 | |
1511 | + | let ic = ir._13 | |
1512 | + | let hT = ir._14 | |
1513 | + | let hU = ir._15 | |
1514 | + | let is = ir._16 | |
1515 | + | if ((fa > 0)) | |
1591 | 1516 | then throw("Invalid closePosition parameters: bad debt") | |
1592 | - | else if (( | |
1517 | + | else if ((eK >= bI())) | |
1593 | 1518 | then throw("Invalid closePosition parameters: wait at least 1 block before closing the position") | |
1594 | 1519 | else { | |
1595 | - | let | |
1596 | - | let | |
1597 | - | let | |
1598 | - | let | |
1520 | + | let eN = (fe != 0) | |
1521 | + | let it = (fm + is) | |
1522 | + | let iu = (bd() - it) | |
1523 | + | let iv = if ((0 > iu)) | |
1599 | 1524 | then 0 | |
1600 | - | else | |
1601 | - | let | |
1602 | - | if (( | |
1525 | + | else iu | |
1526 | + | let il = invoke(am(), "withdrawLocked", [it], nil) | |
1527 | + | if ((il == il)) | |
1603 | 1528 | then { | |
1604 | - | let | |
1605 | - | let | |
1606 | - | let | |
1607 | - | let | |
1608 | - | if (( | |
1529 | + | let iw = go(is) | |
1530 | + | let gq = iw._1 | |
1531 | + | let gr = iw._2 | |
1532 | + | let if = invoke(am(), "addFree", nil, [AttachedPayment(aj(), gr)]) | |
1533 | + | if ((if == if)) | |
1609 | 1534 | then { | |
1610 | - | let | |
1611 | - | if (( | |
1535 | + | let ig = invoke(an(), "notifyFees", [bT, is], nil) | |
1536 | + | if ((ig == ig)) | |
1612 | 1537 | then { | |
1613 | - | let | |
1614 | - | if (( | |
1615 | - | then (((((if ( | |
1616 | - | then | |
1617 | - | else | |
1618 | - | then | |
1619 | - | else nil)) ++ | |
1538 | + | let ih = invoke(an(), "notifyNotional", [bT, fg], nil) | |
1539 | + | if ((ih == ih)) | |
1540 | + | then (((((if (eN) | |
1541 | + | then gP(bT, fe, fn, fg, fh, bI()) | |
1542 | + | else hc(bT)) ++ gV(cE, cF, eQ, ia, ib, ic, hT, hU)) ++ (if ((fm > 0)) | |
1543 | + | then hd(iq, fm) | |
1544 | + | else nil)) ++ hg(iv)) ++ hh(gq)) | |
1620 | 1545 | else throw("Strict value is not equal to itself.") | |
1621 | 1546 | } | |
1622 | 1547 | else throw("Strict value is not equal to itself.") | |
1623 | 1548 | } | |
1624 | 1549 | else throw("Strict value is not equal to itself.") | |
1625 | 1550 | } | |
1626 | 1551 | else throw("Strict value is not equal to itself.") | |
1627 | 1552 | } | |
1628 | 1553 | } | |
1629 | 1554 | } | |
1630 | 1555 | else throw("Strict value is not equal to itself.") | |
1631 | 1556 | } | |
1632 | 1557 | else throw("Strict value is not equal to itself.") | |
1633 | 1558 | } | |
1634 | 1559 | ||
1635 | 1560 | ||
1636 | 1561 | ||
1637 | - | @Callable( | |
1638 | - | func liquidate ( | |
1639 | - | let | |
1640 | - | if (( | |
1562 | + | @Callable(bK) | |
1563 | + | func liquidate (bT) = { | |
1564 | + | let hB = invoke(this, "syncTerminalPriceToOracle", nil, nil) | |
1565 | + | if ((hB == hB)) | |
1641 | 1566 | then { | |
1642 | - | let | |
1643 | - | let | |
1567 | + | let ix = em(bT, aC) | |
1568 | + | let iy = if (dS()) | |
1644 | 1569 | then { | |
1645 | - | let | |
1646 | - | | |
1570 | + | let iz = em(bT, aD) | |
1571 | + | aO(ix, iz) | |
1647 | 1572 | } | |
1648 | - | else | |
1649 | - | if (if (if (if (if (!( | |
1573 | + | else ix | |
1574 | + | if (if (if (if (if (!(bL(iy, bt(), false))) | |
1650 | 1575 | then true | |
1651 | - | else !( | |
1576 | + | else !(cd(bT))) | |
1652 | 1577 | then true | |
1653 | - | else !( | |
1578 | + | else !(cm())) | |
1654 | 1579 | then true | |
1655 | - | else | |
1580 | + | else cn()) | |
1656 | 1581 | then true | |
1657 | - | else | |
1582 | + | else dD()) | |
1658 | 1583 | then throw("Unable to liquidate") | |
1659 | 1584 | else { | |
1660 | - | let | |
1661 | - | then ( | |
1585 | + | let iA = if (if ((ix > bu())) | |
1586 | + | then (bv() > 0) | |
1662 | 1587 | else false) | |
1663 | - | then ( | |
1588 | + | then (az > bv()) | |
1664 | 1589 | else false | |
1665 | - | let | |
1666 | - | let | |
1667 | - | let | |
1590 | + | let eG = bS(bT)._1 | |
1591 | + | let dW = aN(eG) | |
1592 | + | let iB = if (iA) | |
1668 | 1593 | then { | |
1669 | - | let | |
1670 | - | let | |
1671 | - | $Tuple2( | |
1594 | + | let iC = eu(bT, eG) | |
1595 | + | let iD = aI(aN(iC), dW) | |
1596 | + | $Tuple2(iD, aN(iC)) | |
1672 | 1597 | } | |
1673 | - | else $Tuple2(0, | |
1674 | - | let | |
1675 | - | let | |
1676 | - | let | |
1677 | - | then | |
1678 | - | else | |
1679 | - | let | |
1680 | - | let | |
1681 | - | let | |
1682 | - | let | |
1683 | - | let | |
1684 | - | let | |
1685 | - | let | |
1686 | - | let | |
1687 | - | let | |
1688 | - | let | |
1689 | - | let | |
1690 | - | let | |
1691 | - | let | |
1692 | - | let | |
1693 | - | let | |
1694 | - | let | |
1695 | - | let | |
1696 | - | let | |
1697 | - | let | |
1698 | - | let | |
1598 | + | else $Tuple2(0, dW) | |
1599 | + | let iD = iB._1 | |
1600 | + | let iC = iB._2 | |
1601 | + | let iE = ez(bT, if (iA) | |
1602 | + | then iC | |
1603 | + | else dW, bu(), 0, true, false, true) | |
1604 | + | let fe = iE._1 | |
1605 | + | let fn = iE._2 | |
1606 | + | let fg = iE._3 | |
1607 | + | let fh = iE._4 | |
1608 | + | let fa = iE._5 | |
1609 | + | let eV = iE._6 | |
1610 | + | let fm = iE._7 | |
1611 | + | let cE = iE._8 | |
1612 | + | let cF = iE._9 | |
1613 | + | let eQ = iE._10 | |
1614 | + | let ia = iE._11 | |
1615 | + | let ib = iE._12 | |
1616 | + | let ic = iE._13 | |
1617 | + | let hT = iE._14 | |
1618 | + | let hU = iE._15 | |
1619 | + | let iF = iE._16 | |
1620 | + | let iG = (iF / 2) | |
1621 | + | let gr = (iF - iG) | |
1622 | + | let iu = (bd() - iF) | |
1623 | + | let iH = if ((0 > iu)) | |
1699 | 1624 | then 0 | |
1700 | - | else | |
1701 | - | let | |
1625 | + | else iu | |
1626 | + | let im = if ((fa > 0)) | |
1702 | 1627 | then { | |
1703 | - | let | |
1704 | - | if (( | |
1628 | + | let im = invoke(am(), "exchangeFreeAndLocked", [(fa + iF)], nil) | |
1629 | + | if ((im == im)) | |
1705 | 1630 | then nil | |
1706 | 1631 | else throw("Strict value is not equal to itself.") | |
1707 | 1632 | } | |
1708 | 1633 | else nil | |
1709 | - | if (( | |
1634 | + | if ((im == im)) | |
1710 | 1635 | then { | |
1711 | - | let | |
1712 | - | if (( | |
1636 | + | let il = invoke(am(), "withdrawLocked", [iF], nil) | |
1637 | + | if ((il == il)) | |
1713 | 1638 | then { | |
1714 | - | let | |
1715 | - | if (( | |
1639 | + | let iI = invoke(am(), "addFree", nil, [AttachedPayment(aj(), gr)]) | |
1640 | + | if ((iI == iI)) | |
1716 | 1641 | then { | |
1717 | - | let | |
1718 | - | if (( | |
1719 | - | then ((((if ( | |
1720 | - | then | |
1721 | - | else | |
1642 | + | let ih = invoke(an(), "notifyNotional", [bT, fg], nil) | |
1643 | + | if ((ih == ih)) | |
1644 | + | then ((((if (iA) | |
1645 | + | then gP(bT, fe, fn, fg, fh, bI()) | |
1646 | + | else hc(bT)) ++ gV(cE, cF, eQ, ia, ib, ic, hT, hU)) ++ hd(bK.caller, iG)) ++ hg(iH)) | |
1722 | 1647 | else throw("Strict value is not equal to itself.") | |
1723 | 1648 | } | |
1724 | 1649 | else throw("Strict value is not equal to itself.") | |
1725 | 1650 | } | |
1726 | 1651 | else throw("Strict value is not equal to itself.") | |
1727 | 1652 | } | |
1728 | 1653 | else throw("Strict value is not equal to itself.") | |
1729 | 1654 | } | |
1730 | 1655 | } | |
1731 | 1656 | else throw("Strict value is not equal to itself.") | |
1732 | 1657 | } | |
1733 | 1658 | ||
1734 | 1659 | ||
1735 | 1660 | ||
1736 | - | @Callable( | |
1661 | + | @Callable(bK) | |
1737 | 1662 | func payFunding () = { | |
1738 | - | let | |
1739 | - | if (( | |
1663 | + | let hB = invoke(this, "syncTerminalPriceToOracle", nil, nil) | |
1664 | + | if ((hB == hB)) | |
1740 | 1665 | then { | |
1741 | - | let | |
1742 | - | if (if (if (( | |
1666 | + | let iJ = bp() | |
1667 | + | if (if (if ((iJ > bI())) | |
1743 | 1668 | then true | |
1744 | - | else !( | |
1669 | + | else !(cm())) | |
1745 | 1670 | then true | |
1746 | - | else | |
1747 | - | then throw(((("Invalid funding block timestamp: " + toString( | |
1671 | + | else cn()) | |
1672 | + | then throw(((("Invalid funding block timestamp: " + toString(bI())) + " < ") + toString(iJ))) | |
1748 | 1673 | else { | |
1749 | - | let | |
1750 | - | let | |
1751 | - | let | |
1752 | - | let | |
1753 | - | let | |
1754 | - | let | |
1674 | + | let fM = dx() | |
1675 | + | let iK = fL() | |
1676 | + | let fP = iK._1 | |
1677 | + | let fQ = iK._2 | |
1678 | + | let fT = iK._3 | |
1679 | + | let iL = if ((fT > 0)) | |
1755 | 1680 | then { | |
1756 | - | let | |
1757 | - | if (( | |
1681 | + | let iL = invoke(am(), "exchangeFreeAndLocked", [-(fT)], nil) | |
1682 | + | if ((iL == iL)) | |
1758 | 1683 | then nil | |
1759 | 1684 | else throw("Strict value is not equal to itself.") | |
1760 | 1685 | } | |
1761 | 1686 | else nil | |
1762 | - | if (( | |
1763 | - | then | |
1687 | + | if ((iL == iL)) | |
1688 | + | then gF((iJ + bs()), (bA() + fQ), (bB() + fP), aI(fQ, fM), aI(fP, fM)) | |
1764 | 1689 | else throw("Strict value is not equal to itself.") | |
1765 | 1690 | } | |
1766 | 1691 | } | |
1767 | 1692 | else throw("Strict value is not equal to itself.") | |
1768 | 1693 | } | |
1769 | 1694 | ||
1770 | 1695 | ||
1771 | 1696 | ||
1772 | - | @Callable( | |
1697 | + | @Callable(bK) | |
1773 | 1698 | func syncTerminalPriceToOracle () = { | |
1774 | - | let | |
1775 | - | let | |
1776 | - | let | |
1777 | - | let | |
1778 | - | let | |
1779 | - | let | |
1780 | - | let | |
1781 | - | then ( | |
1699 | + | let cw = bh() | |
1700 | + | let cx = bi() | |
1701 | + | let iM = fG(dx(), cw, cx) | |
1702 | + | let hp = iM._1 | |
1703 | + | let hq = iM._2 | |
1704 | + | let fK = iM._3 | |
1705 | + | let iN = if (if ((0 > fK)) | |
1706 | + | then (aN(fK) > bd()) | |
1782 | 1707 | else false) | |
1783 | - | then -( | |
1784 | - | else | |
1785 | - | let | |
1708 | + | then -(bd()) | |
1709 | + | else fK | |
1710 | + | let hr = if ((iN != 0)) | |
1786 | 1711 | then { | |
1787 | - | let | |
1788 | - | if (( | |
1712 | + | let hr = invoke(am(), "exchangeFreeAndLocked", [iN], nil) | |
1713 | + | if ((hr == hr)) | |
1789 | 1714 | then nil | |
1790 | 1715 | else throw("Strict value is not equal to itself.") | |
1791 | 1716 | } | |
1792 | 1717 | else nil | |
1793 | - | if (( | |
1794 | - | then ( | |
1718 | + | if ((hr == hr)) | |
1719 | + | then (hg((bd() + iN)) ++ gU(hp, hq)) | |
1795 | 1720 | else throw("Strict value is not equal to itself.") | |
1796 | 1721 | } | |
1797 | 1722 | ||
1798 | 1723 | ||
1799 | 1724 | ||
1800 | - | @Callable( | |
1801 | - | func ensureCalledOnce () = if (( | |
1725 | + | @Callable(bK) | |
1726 | + | func ensureCalledOnce () = if ((bK.caller != this)) | |
1802 | 1727 | then throw("Invalid saveCurrentTxId parameters") | |
1803 | 1728 | else { | |
1804 | - | let | |
1805 | - | if (( | |
1806 | - | then [StringEntry( | |
1729 | + | let iO = valueOrElse(getString(this, S), "") | |
1730 | + | if ((iO != toBase58String(bK.transactionId))) | |
1731 | + | then [StringEntry(S, iO)] | |
1807 | 1732 | else throw("Can not call vAMM methods twice in one tx") | |
1808 | 1733 | } | |
1809 | 1734 | ||
1810 | 1735 | ||
1811 | 1736 | ||
1812 | - | @Callable( | |
1813 | - | func view_calcRemainMarginWithFundingPayment ( | |
1814 | - | let | |
1815 | - | if (( | |
1737 | + | @Callable(bK) | |
1738 | + | func view_calcRemainMarginWithFundingPayment (bT) = { | |
1739 | + | let hB = invoke(this, "syncTerminalPriceToOracle", nil, nil) | |
1740 | + | if ((hB == hB)) | |
1816 | 1741 | then { | |
1817 | - | let | |
1818 | - | let | |
1819 | - | let | |
1820 | - | let | |
1821 | - | let | |
1822 | - | let | |
1823 | - | let | |
1824 | - | let | |
1825 | - | let | |
1826 | - | let | |
1827 | - | let | |
1828 | - | let | |
1829 | - | let | |
1830 | - | let | |
1831 | - | throw((((((( | |
1742 | + | let iP = bS(bT) | |
1743 | + | let bW = iP._1 | |
1744 | + | let ef = iP._2 | |
1745 | + | let eo = iP._3 | |
1746 | + | let eh = iP._4 | |
1747 | + | let eq = iP._5 | |
1748 | + | let iQ = ed(bT, aC) | |
1749 | + | let dY = iQ._1 | |
1750 | + | let ec = iQ._2 | |
1751 | + | let iR = cW(bW, ef, eh, eq, ec) | |
1752 | + | let de = iR._1 | |
1753 | + | let df = iR._2 | |
1754 | + | let da = iR._3 | |
1755 | + | let cV = iR._4 | |
1756 | + | throw(((((((aG(de) + aG(da)) + aG(et(bT))) + aG(ec)) + aG(df)) + aG(dY)) + aG(cV))) | |
1832 | 1757 | } | |
1833 | 1758 | else throw("Strict value is not equal to itself.") | |
1834 | 1759 | } | |
1835 | 1760 | ||
1836 | 1761 | ||
1837 | 1762 | ||
1838 | - | @Callable( | |
1839 | - | func view_getPegAdjustCost ( | |
1840 | - | let | |
1841 | - | let | |
1842 | - | let | |
1843 | - | throw(toString( | |
1763 | + | @Callable(bK) | |
1764 | + | func view_getPegAdjustCost (iS) = { | |
1765 | + | let cw = bh() | |
1766 | + | let cx = bi() | |
1767 | + | let fF = fG(iS, cw, cx) | |
1768 | + | throw(toString(fF._3)) | |
1844 | 1769 | } | |
1845 | 1770 | ||
1846 | 1771 | ||
1847 | 1772 | ||
1848 | - | @Callable( | |
1773 | + | @Callable(bK) | |
1849 | 1774 | func view_getTerminalAmmPrice () = { | |
1850 | - | let | |
1851 | - | let | |
1852 | - | let | |
1853 | - | let | |
1854 | - | throw(toString( | |
1775 | + | let iT = fo() | |
1776 | + | let fs = iT._1 | |
1777 | + | let ft = iT._2 | |
1778 | + | let hk = aI(aK(fs, bj()), aK(ft, bk())) | |
1779 | + | throw(toString(hk)) | |
1855 | 1780 | } | |
1856 | 1781 | ||
1857 | 1782 | ||
1858 | 1783 | ||
1859 | - | @Callable( | |
1784 | + | @Callable(bK) | |
1860 | 1785 | func view_getFunding () = { | |
1861 | - | let | |
1862 | - | let | |
1863 | - | let | |
1864 | - | let | |
1865 | - | let | |
1866 | - | let | |
1867 | - | let | |
1868 | - | throw((((( | |
1786 | + | let fM = dx() | |
1787 | + | let iU = fL() | |
1788 | + | let fP = iU._1 | |
1789 | + | let fQ = iU._2 | |
1790 | + | let fT = iU._3 | |
1791 | + | let iV = aI(fQ, fM) | |
1792 | + | let iW = aI(fP, fM) | |
1793 | + | throw(((((aG(iV) + aG(iW)) + aG(dR())) + aG(dx())) + aG(fT))) | |
1869 | 1794 | } | |
1870 | 1795 | ||
1871 | 1796 | ||
1872 | 1797 | ||
1873 | - | @Callable( | |
1798 | + | @Callable(bK) | |
1874 | 1799 | func computeSpotPrice () = { | |
1875 | - | let | |
1876 | - | if (( | |
1800 | + | let hB = invoke(this, "syncTerminalPriceToOracle", nil, nil) | |
1801 | + | if ((hB == hB)) | |
1877 | 1802 | then { | |
1878 | - | let | |
1879 | - | $Tuple2(nil, | |
1803 | + | let fF = dR() | |
1804 | + | $Tuple2(nil, fF) | |
1880 | 1805 | } | |
1881 | 1806 | else throw("Strict value is not equal to itself.") | |
1882 | 1807 | } | |
1883 | 1808 | ||
1884 | 1809 | ||
1885 | 1810 | ||
1886 | - | @Callable( | |
1887 | - | func computeFeeForTraderWithArtifact ( | |
1888 | - | let | |
1889 | - | $Tuple2(nil, | |
1811 | + | @Callable(bK) | |
1812 | + | func computeFeeForTraderWithArtifact (bT,fV) = { | |
1813 | + | let fF = gh(bT, fV) | |
1814 | + | $Tuple2(nil, fF) | |
1890 | 1815 | } | |
1891 | 1816 | ||
1892 | 1817 | ||
1893 | - | @Verifier( | |
1894 | - | func | |
1895 | - | let | |
1896 | - | if (isDefined( | |
1818 | + | @Verifier(iX) | |
1819 | + | func iY () = { | |
1820 | + | let iZ = getString(this, T) | |
1821 | + | if (isDefined(iZ)) | |
1897 | 1822 | then { | |
1898 | - | let | |
1899 | - | if (isDefined( | |
1900 | - | then valueOrElse(getBoolean(addressFromStringValue(value( | |
1823 | + | let ja = getString(addressFromStringValue(value(iZ)), V) | |
1824 | + | if (isDefined(ja)) | |
1825 | + | then valueOrElse(getBoolean(addressFromStringValue(value(ja)), ((("status_" + toString(this)) + "_") + toBase58String(iX.id))), false) | |
1901 | 1826 | else throw("unable to verify: admin not set in coordinator") | |
1902 | 1827 | } | |
1903 | - | else sigVerify( | |
1828 | + | else sigVerify(iX.bodyBytes, iX.proofs[0], iX.senderPublicKey) | |
1904 | 1829 | } | |
1905 | 1830 |
github/deemru/w8io/169f3d6 885.20 ms ◑