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