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