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