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