tx · BAUZ8M2BKZdid8yp4TpcYteD3pyVWjoaBjLwKLSZySEa 3N8aqXmsyH4LoDFyypgngYYKT49pQ8nB4dx: -0.04500000 Waves 2023.08.04 17:35 [2695966] smart account 3N8aqXmsyH4LoDFyypgngYYKT49pQ8nB4dx > SELF 0.00000000 Waves
{ "type": 13, "id": "BAUZ8M2BKZdid8yp4TpcYteD3pyVWjoaBjLwKLSZySEa", "fee": 4500000, "feeAssetId": null, "timestamp": 1691159757164, "version": 2, "chainId": 84, "sender": "3N8aqXmsyH4LoDFyypgngYYKT49pQ8nB4dx", "senderPublicKey": "Hn75Ffw1pMKXcKvsGG5tJsFa7E4qyApSvkYUP4j8KDnN", "proofs": [ "3WbrYvK283wFAC46ojDnJHBDFqziKCewTyx4bb7XZEfbHQEosaLao5gRLJx8ddyhwtU2uRZhEquDEFN6ybUBBin1" ], "script": "base64:BgI1CAISABIAEgMKAQESBQoDAQEBEgkKBwEBCAgBAQESBAoCAQESBAoCAQESABIAEgASABIAEgA+AAxrX2Jhc2VPcmFjbGUCDGtfYmFzZU9yYWNsZQANa19pbml0aWFsaXplZAINa19pbml0aWFsaXplZAAIa19wYXVzZWQCCGtfcGF1c2VkAAVrX2ZlZQIFa19mZWUAEGtfbWF4UHJpY2VJbXBhY3QCEGtfbWF4UHJpY2VJbXBhY3QAEGtfbWF4UHJpY2VTcHJlYWQCEGtfbWF4UHJpY2VTcHJlYWQAEGtfbWF4T3JhY2xlRGVsYXkCEGtfbWF4T3JhY2xlRGVsYXkAE2tfcXVvdGVBc3NldFJlc2VydmUCCGtfcXRBc3RSABJrX2Jhc2VBc3NldFJlc2VydmUCCGtfYnNBc3RSABJrX3F1b3RlQXNzZXRXZWlnaHQCCGtfcXRBc3RXABFrX2Jhc2VBc3NldFdlaWdodAIIa19ic0FzdFcAE2tfdG90YWxQb3NpdGlvblNpemUCE2tfdG90YWxQb3NpdGlvblNpemUACGtfbGFzdFR4AghrX2xhc3RUeAAUa19jb29yZGluYXRvckFkZH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yRWxzZQIJAJsIAgkBEUBleHRyTmF0aXZlKDEwNjIpAQkBBXZhbHVlAQUFYWRtaW4JAKwCAgkArAICCQCsAgICB3N0YXR1c18JAKUIAQUEdGhpcwIBXwkA2AQBCAUCdHgCaWQHCQACAQIudW5hYmxlIHRvIHZlcmlmeTogYWRtaW4gbm90IHNldCBpbiBjb29yZGluYXRvcgkA9AMDCAUCdHgJYm9keUJ5dGVzCQCRAwIIBQJ0eAZwcm9vZnMAAAgFAnR4D3NlbmRlclB1YmxpY0tleXsQ6z8=", "height": 2695966, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 94qzdrAm6k7J16siRBJtnDT48zHbSiEUMC4dXCe1RUnd Next: none Diff:
Old | New | Differences | |
---|---|---|---|
189 | 189 | let aK = V() | |
190 | 190 | if ((aJ > aK)) | |
191 | 191 | then throw(((((((((((((("Price impact " + toString(aJ)) + " > max price impact ") + toString(aK)) + " before quote asset: ") + toString(aq)) + " before base asset: ") + toString(ar)) + " quote asset amount to exchange: ") + toString(al)) + " price before: ") + toString(aG)) + " marketPrice: ") + toString(aH))) | |
192 | - | else $ | |
192 | + | else $Tuple5(aB, aD, aE, aF, aJ) | |
193 | 193 | } | |
194 | 194 | ||
195 | 195 | ||
409 | 409 | let ay = ca._2 | |
410 | 410 | let az = ca._3 | |
411 | 411 | let cb = ca._4 | |
412 | + | let aJ = ca._5 | |
412 | 413 | let cc = bK(ay, az, cb) | |
413 | - | $Tuple2(cc, aB) | |
414 | + | $Tuple2(cc, $Tuple2(aB, aJ)) | |
414 | 415 | } | |
415 | 416 | else throw("Strict value is not equal to itself.") | |
416 | 417 | } | |
437 | 438 | let cf = ce._1 | |
438 | 439 | let ay = ce._2 | |
439 | 440 | let az = ce._3 | |
441 | + | let cg = ce._4 | |
442 | + | let aJ = ce._5 | |
440 | 443 | let cb = (U() - bW) | |
441 | 444 | let cc = bK(ay, az, cb) | |
442 | - | $Tuple2(cc, cf) | |
445 | + | $Tuple2(cc, $Tuple2(cf, aJ)) | |
443 | 446 | } | |
444 | 447 | else throw("Strict value is not equal to itself.") | |
445 | 448 | } | |
452 | 455 | func syncTerminalPriceToOracle () = { | |
453 | 456 | let aq = Q() | |
454 | 457 | let ar = R() | |
455 | - | let | |
456 | - | let bS = | |
457 | - | let bT = | |
458 | + | let ch = bA(bc(), aq, ar) | |
459 | + | let bS = ch._1 | |
460 | + | let bT = ch._2 | |
458 | 461 | bJ(bS, bT) | |
459 | 462 | } | |
460 | 463 | ||
464 | 467 | func ensureCalledOnce () = if ((bM.caller != this)) | |
465 | 468 | then throw("Invalid saveCurrentTxId parameters") | |
466 | 469 | else { | |
467 | - | let | |
468 | - | let | |
469 | - | if (( | |
470 | - | then [StringEntry(m, | |
470 | + | let ci = toBase58String(bM.transactionId) | |
471 | + | let cj = valueOrElse(getString(this, m), "") | |
472 | + | if ((cj != ci)) | |
473 | + | then [StringEntry(m, ci)] | |
471 | 474 | else throw("Can not call vAMM methods twice in one tx") | |
472 | 475 | } | |
473 | 476 | ||
475 | 478 | ||
476 | 479 | @Callable(bM) | |
477 | 480 | func view_getTerminalAmmPrice () = { | |
478 | - | let | |
479 | - | let bm = | |
480 | - | let bn = | |
481 | + | let ck = bh() | |
482 | + | let bm = ck._1 | |
483 | + | let bn = ck._2 | |
481 | 484 | let bN = D(F(bm, S()), F(bn, T())) | |
482 | 485 | throw(toString(bN)) | |
483 | 486 | } | |
489 | 492 | let bY = invoke(this, "syncTerminalPriceToOracle", nil, nil) | |
490 | 493 | if ((bY == bY)) | |
491 | 494 | then { | |
492 | - | let | |
493 | - | let bm = | |
494 | - | let bn = | |
495 | - | let | |
496 | - | let | |
497 | - | throw(((toString( | |
495 | + | let cl = bh() | |
496 | + | let bm = cl._1 | |
497 | + | let bn = cl._2 | |
498 | + | let cm = D(F(bm, S()), F(bn, T())) | |
499 | + | let cn = bg() | |
500 | + | throw(((toString(cm) + ",") + toString(cn))) | |
498 | 501 | } | |
499 | 502 | else throw("Strict value is not equal to itself.") | |
500 | 503 | } | |
516 | 519 | ||
517 | 520 | @Callable(bM) | |
518 | 521 | func computeTerminalAmmPrice () = { | |
519 | - | let | |
520 | - | let bm = | |
521 | - | let bn = | |
522 | + | let co = bh() | |
523 | + | let bm = co._1 | |
524 | + | let bn = co._2 | |
522 | 525 | let bN = D(F(bm, S()), F(bn, T())) | |
523 | 526 | $Tuple2(nil, bN) | |
524 | 527 | } | |
525 | 528 | ||
526 | 529 | ||
527 | - | @Verifier( | |
528 | - | func | |
529 | - | let | |
530 | - | if (isDefined( | |
530 | + | @Verifier(cp) | |
531 | + | func cq () = { | |
532 | + | let cr = getString(this, n) | |
533 | + | if (isDefined(cr)) | |
531 | 534 | then { | |
532 | - | let | |
533 | - | if (isDefined( | |
534 | - | then valueOrElse(getBoolean(addressFromStringValue(value( | |
535 | + | let cs = getString(addressFromStringValue(value(cr)), p) | |
536 | + | if (isDefined(cs)) | |
537 | + | then valueOrElse(getBoolean(addressFromStringValue(value(cs)), ((("status_" + toString(this)) + "_") + toBase58String(cp.id))), false) | |
535 | 538 | else throw("unable to verify: admin not set in coordinator") | |
536 | 539 | } | |
537 | - | else sigVerify( | |
540 | + | else sigVerify(cp.bodyBytes, cp.proofs[0], cp.senderPublicKey) | |
538 | 541 | } | |
539 | 542 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = "k_baseOracle" | |
5 | 5 | ||
6 | 6 | let b = "k_initialized" | |
7 | 7 | ||
8 | 8 | let c = "k_paused" | |
9 | 9 | ||
10 | 10 | let d = "k_fee" | |
11 | 11 | ||
12 | 12 | let e = "k_maxPriceImpact" | |
13 | 13 | ||
14 | 14 | let f = "k_maxPriceSpread" | |
15 | 15 | ||
16 | 16 | let g = "k_maxOracleDelay" | |
17 | 17 | ||
18 | 18 | let h = "k_qtAstR" | |
19 | 19 | ||
20 | 20 | let i = "k_bsAstR" | |
21 | 21 | ||
22 | 22 | let j = "k_qtAstW" | |
23 | 23 | ||
24 | 24 | let k = "k_bsAstW" | |
25 | 25 | ||
26 | 26 | let l = "k_totalPositionSize" | |
27 | 27 | ||
28 | 28 | let m = "k_lastTx" | |
29 | 29 | ||
30 | 30 | let n = "k_coordinatorAddress" | |
31 | 31 | ||
32 | 32 | let o = "k_vault_address" | |
33 | 33 | ||
34 | 34 | let p = "k_admin_address" | |
35 | 35 | ||
36 | 36 | let q = "k_quote_asset" | |
37 | 37 | ||
38 | 38 | let r = "k_spot_address" | |
39 | 39 | ||
40 | 40 | func s (t,u) = ((t + "_") + u) | |
41 | 41 | ||
42 | 42 | ||
43 | 43 | func v () = valueOrErrorMessage(addressFromString(getStringValue(this, n)), "Coordinator not set") | |
44 | 44 | ||
45 | 45 | ||
46 | 46 | func w () = addressFromString(getStringValue(v(), p)) | |
47 | 47 | ||
48 | 48 | ||
49 | 49 | func x () = fromBase58String(getStringValue(v(), q)) | |
50 | 50 | ||
51 | 51 | ||
52 | 52 | func y () = addressFromString(valueOrErrorMessage(getString(v(), r), "Spot address not set")) | |
53 | 53 | ||
54 | 54 | ||
55 | 55 | let z = 6 | |
56 | 56 | ||
57 | 57 | let A = (1 * (((((10 * 10) * 10) * 10) * 10) * 10)) | |
58 | 58 | ||
59 | 59 | func B (C) = (toString(C) + ",") | |
60 | 60 | ||
61 | 61 | ||
62 | 62 | func D (C,E) = fraction(C, A, E, HALFEVEN) | |
63 | 63 | ||
64 | 64 | ||
65 | 65 | func F (C,E) = fraction(C, E, A, HALFEVEN) | |
66 | 66 | ||
67 | 67 | ||
68 | 68 | func G (C,E) = fraction(C, toBigInt(A), E, HALFEVEN) | |
69 | 69 | ||
70 | 70 | ||
71 | 71 | func H (C,E) = fraction(C, E, toBigInt(A), HALFEVEN) | |
72 | 72 | ||
73 | 73 | ||
74 | 74 | func I (C) = if ((C > 0)) | |
75 | 75 | then C | |
76 | 76 | else -(C) | |
77 | 77 | ||
78 | 78 | ||
79 | 79 | func J (K) = valueOrErrorMessage(getInteger(this, K), ("no value for " + K)) | |
80 | 80 | ||
81 | 81 | ||
82 | 82 | func L (K,M) = valueOrElse(getInteger(this, K), M) | |
83 | 83 | ||
84 | 84 | ||
85 | 85 | func N (u,t) = { | |
86 | 86 | let O = valueOrErrorMessage(getInteger(u, t), ("No value for key " + t)) | |
87 | 87 | O | |
88 | 88 | } | |
89 | 89 | ||
90 | 90 | ||
91 | 91 | func P () = J(d) | |
92 | 92 | ||
93 | 93 | ||
94 | 94 | func Q () = J(h) | |
95 | 95 | ||
96 | 96 | ||
97 | 97 | func R () = J(i) | |
98 | 98 | ||
99 | 99 | ||
100 | 100 | func S () = L(j, A) | |
101 | 101 | ||
102 | 102 | ||
103 | 103 | func T () = L(k, A) | |
104 | 104 | ||
105 | 105 | ||
106 | 106 | func U () = J(l) | |
107 | 107 | ||
108 | 108 | ||
109 | 109 | func V () = J(e) | |
110 | 110 | ||
111 | 111 | ||
112 | 112 | func W () = J(f) | |
113 | 113 | ||
114 | 114 | ||
115 | 115 | func X () = J(g) | |
116 | 116 | ||
117 | 117 | ||
118 | 118 | func Y () = lastBlock.timestamp | |
119 | 119 | ||
120 | 120 | ||
121 | 121 | func Z (aa) = { | |
122 | 122 | let ab = getString(this, aa) | |
123 | 123 | if (if (isDefined(ab)) | |
124 | 124 | then (value(ab) != "") | |
125 | 125 | else false) | |
126 | 126 | then { | |
127 | 127 | let ac = split(value(ab), ",") | |
128 | 128 | let ad = valueOrErrorMessage(addressFromString(ac[0]), ("Invalid oracle address in: " + value(ab))) | |
129 | 129 | let ae = ac[1] | |
130 | 130 | let af = ac[2] | |
131 | 131 | let ag = ac[3] | |
132 | 132 | $Tuple4(ad, ae, af, ag) | |
133 | 133 | } | |
134 | 134 | else unit | |
135 | 135 | } | |
136 | 136 | ||
137 | 137 | ||
138 | 138 | func ah () = valueOrElse(getBoolean(this, b), false) | |
139 | 139 | ||
140 | 140 | ||
141 | 141 | func ai () = valueOrElse(getBoolean(this, c), false) | |
142 | 142 | ||
143 | 143 | ||
144 | 144 | func aj (ak,al,am) = if (ak) | |
145 | 145 | then { | |
146 | 146 | let an = (R() - am) | |
147 | 147 | if ((0 >= an)) | |
148 | 148 | then throw("Tx lead to base asset reserve <= 0, revert") | |
149 | 149 | else $Tuple3((Q() + al), an, (U() + am)) | |
150 | 150 | } | |
151 | 151 | else { | |
152 | 152 | let ao = (Q() - al) | |
153 | 153 | if ((0 >= ao)) | |
154 | 154 | then throw("Tx lead to base quote reserve <= 0, revert") | |
155 | 155 | else $Tuple3(ao, (R() + am), (U() - am)) | |
156 | 156 | } | |
157 | 157 | ||
158 | 158 | ||
159 | 159 | func ap (aq,ar) = { | |
160 | 160 | let as = toBigInt(aq) | |
161 | 161 | let at = toBigInt(ar) | |
162 | 162 | H(as, at) | |
163 | 163 | } | |
164 | 164 | ||
165 | 165 | ||
166 | 166 | func au (ak,al) = { | |
167 | 167 | let aq = Q() | |
168 | 168 | let ar = R() | |
169 | 169 | let av = S() | |
170 | 170 | let aw = T() | |
171 | 171 | let ax = D(al, av) | |
172 | 172 | let K = ap(aq, ar) | |
173 | 173 | let ay = if (ak) | |
174 | 174 | then (aq + ax) | |
175 | 175 | else (aq - ax) | |
176 | 176 | let az = toInt(G(K, toBigInt(ay))) | |
177 | 177 | let aA = I((az - ar)) | |
178 | 178 | let aB = if (ak) | |
179 | 179 | then aA | |
180 | 180 | else -(aA) | |
181 | 181 | let aC = aj(ak, ax, aA) | |
182 | 182 | let aD = aC._1 | |
183 | 183 | let aE = aC._2 | |
184 | 184 | let aF = aC._3 | |
185 | 185 | let aG = D(F(aq, av), F(ar, aw)) | |
186 | 186 | let aH = D(al, aA) | |
187 | 187 | let aI = I((aG - aH)) | |
188 | 188 | let aJ = (A - D(aG, (aG + aI))) | |
189 | 189 | let aK = V() | |
190 | 190 | if ((aJ > aK)) | |
191 | 191 | then throw(((((((((((((("Price impact " + toString(aJ)) + " > max price impact ") + toString(aK)) + " before quote asset: ") + toString(aq)) + " before base asset: ") + toString(ar)) + " quote asset amount to exchange: ") + toString(al)) + " price before: ") + toString(aG)) + " marketPrice: ") + toString(aH))) | |
192 | - | else $ | |
192 | + | else $Tuple5(aB, aD, aE, aF, aJ) | |
193 | 193 | } | |
194 | 194 | ||
195 | 195 | ||
196 | 196 | func aL (ak,am,aM,aN,aO,aP,aQ) = { | |
197 | 197 | let aG = D(F(aN, aO), F(aP, aQ)) | |
198 | 198 | if ((am == 0)) | |
199 | 199 | then throw("Invalid base asset amount") | |
200 | 200 | else { | |
201 | 201 | let K = ap(aN, aP) | |
202 | 202 | let aR = if (ak) | |
203 | 203 | then (aP + am) | |
204 | 204 | else (aP - am) | |
205 | 205 | let aS = toInt(G(K, toBigInt(aR))) | |
206 | 206 | let aT = I((aS - aN)) | |
207 | 207 | let aU = F(aT, aO) | |
208 | 208 | let aK = V() | |
209 | 209 | let aV = aj(!(ak), aT, am) | |
210 | 210 | let aD = aV._1 | |
211 | 211 | let aE = aV._2 | |
212 | 212 | let aF = aV._3 | |
213 | 213 | let aH = D(aU, am) | |
214 | 214 | let aI = I((aG - aH)) | |
215 | 215 | let aJ = (A - D(aG, (aG + aI))) | |
216 | 216 | if (if ((aJ > aK)) | |
217 | 217 | then aM | |
218 | 218 | else false) | |
219 | 219 | then throw(((((((((((((("Price impact " + toString(aJ)) + " > max price impact ") + toString(aK)) + " before quote asset: ") + toString(aN)) + " before base asset: ") + toString(aP)) + " base asset amount to exchange: ") + toString(am)) + " price before: ") + toString(aG)) + " market price: ") + toString(aH))) | |
220 | 220 | else $Tuple5(aU, aD, aE, aF, aJ) | |
221 | 221 | } | |
222 | 222 | } | |
223 | 223 | ||
224 | 224 | ||
225 | 225 | func aW (ak,am,aM) = aL(ak, am, aM, Q(), S(), R(), T()) | |
226 | 226 | ||
227 | 227 | ||
228 | 228 | func aX (aY,ae,af) = { | |
229 | 229 | let aZ = valueOrErrorMessage(getInteger(aY, ae), ((("Can not get oracle price. Oracle: " + toString(aY)) + " key: ") + ae)) | |
230 | 230 | if ((af != "")) | |
231 | 231 | then { | |
232 | 232 | let ba = lastBlock.height | |
233 | 233 | let bb = valueOrErrorMessage(getInteger(aY, af), ((("Can not get oracle block. Oracle: " + toString(aY)) + " key: ") + af)) | |
234 | 234 | if (((ba - bb) > X())) | |
235 | 235 | then throw(((("Oracle stale data. Last oracle block: " + toString(bb)) + " current block: ") + toString(ba))) | |
236 | 236 | else aZ | |
237 | 237 | } | |
238 | 238 | else aZ | |
239 | 239 | } | |
240 | 240 | ||
241 | 241 | ||
242 | 242 | func bc () = { | |
243 | 243 | let bd = valueOrErrorMessage(Z(a), "No base asset oracle data") | |
244 | 244 | let be = aX(bd._1, bd._2, bd._3) | |
245 | 245 | let bf = A | |
246 | 246 | D(be, bf) | |
247 | 247 | } | |
248 | 248 | ||
249 | 249 | ||
250 | 250 | func bg () = { | |
251 | 251 | let aN = Q() | |
252 | 252 | let aP = R() | |
253 | 253 | let av = S() | |
254 | 254 | let aw = T() | |
255 | 255 | D(F(aN, av), F(aP, aw)) | |
256 | 256 | } | |
257 | 257 | ||
258 | 258 | ||
259 | 259 | func bh () = { | |
260 | 260 | let bi = U() | |
261 | 261 | if ((bi == 0)) | |
262 | 262 | then $Tuple2(Q(), R()) | |
263 | 263 | else { | |
264 | 264 | let bj = (bi > 0) | |
265 | 265 | let bk = aW(bj, I(bi), false) | |
266 | 266 | let bl = bk._1 | |
267 | 267 | let bm = bk._2 | |
268 | 268 | let bn = bk._3 | |
269 | 269 | $Tuple2(bm, bn) | |
270 | 270 | } | |
271 | 271 | } | |
272 | 272 | ||
273 | 273 | ||
274 | 274 | func bo (bp,U,bq,br) = { | |
275 | 275 | let bs = toBigInt(bp) | |
276 | 276 | let bt = toBigInt(U) | |
277 | 277 | let bu = toBigInt(bq) | |
278 | 278 | let bv = toBigInt(br) | |
279 | 279 | let K = H(bu, bs) | |
280 | 280 | let bw = (bs + bt) | |
281 | 281 | let bx = G(K, bw) | |
282 | 282 | let by = G(bx, bw) | |
283 | 283 | let bz = G(bv, by) | |
284 | 284 | toInt(bz) | |
285 | 285 | } | |
286 | 286 | ||
287 | 287 | ||
288 | 288 | func bA (bB,aq,ar) = { | |
289 | 289 | let bi = U() | |
290 | 290 | if ((bi == 0)) | |
291 | 291 | then { | |
292 | 292 | let bC = D(F(bB, ar), aq) | |
293 | 293 | $Tuple2(bC, A) | |
294 | 294 | } | |
295 | 295 | else { | |
296 | 296 | let bC = bo(ar, bi, aq, bB) | |
297 | 297 | let bD = A | |
298 | 298 | $Tuple2(bC, bD) | |
299 | 299 | } | |
300 | 300 | } | |
301 | 301 | ||
302 | 302 | ||
303 | 303 | func bE (bF,bG,bH) = [IntegerEntry(e, bF), IntegerEntry(f, bG), IntegerEntry(g, bH)] | |
304 | 304 | ||
305 | 305 | ||
306 | 306 | func bI (aq,ar) = if (if ((0 >= aq)) | |
307 | 307 | then true | |
308 | 308 | else (0 >= ar)) | |
309 | 309 | then throw("Can not updateAmmReserves: _qtAstR <= 0 || _bsAstR <= 0") | |
310 | 310 | else [IntegerEntry(h, aq), IntegerEntry(i, ar)] | |
311 | 311 | ||
312 | 312 | ||
313 | 313 | func bJ (av,aw) = [IntegerEntry(j, av), IntegerEntry(k, aw)] | |
314 | 314 | ||
315 | 315 | ||
316 | 316 | func bK (aq,ar,bL) = { | |
317 | 317 | let av = S() | |
318 | 318 | let aw = T() | |
319 | 319 | (bI(aq, ar) ++ [IntegerEntry(l, bL)]) | |
320 | 320 | } | |
321 | 321 | ||
322 | 322 | ||
323 | 323 | @Callable(bM) | |
324 | 324 | func pause () = if ((bM.caller != w())) | |
325 | 325 | then throw("Invalid pause params") | |
326 | 326 | else [BooleanEntry(c, true)] | |
327 | 327 | ||
328 | 328 | ||
329 | 329 | ||
330 | 330 | @Callable(bM) | |
331 | 331 | func unpause () = if ((bM.caller != w())) | |
332 | 332 | then throw("Invalid unpause params") | |
333 | 333 | else [BooleanEntry(c, false)] | |
334 | 334 | ||
335 | 335 | ||
336 | 336 | ||
337 | 337 | @Callable(bM) | |
338 | 338 | func changeLiquidity (al) = if (!(if ((bM.caller == y())) | |
339 | 339 | then true | |
340 | 340 | else (bM.caller == w()))) | |
341 | 341 | then throw("Invalid changeLiquidity params") | |
342 | 342 | else { | |
343 | 343 | let aq = Q() | |
344 | 344 | let ar = R() | |
345 | 345 | let av = S() | |
346 | 346 | let aw = T() | |
347 | 347 | let bN = D(F(aq, av), F(ar, aw)) | |
348 | 348 | let bO = (aq + al) | |
349 | 349 | let bP = (D(F(bO, av), bN) - ar) | |
350 | 350 | let bQ = (ar + bP) | |
351 | 351 | let bR = bA(bc(), bO, bQ) | |
352 | 352 | let bS = bR._1 | |
353 | 353 | let bT = bR._2 | |
354 | 354 | (bI(bO, bQ) ++ bJ(bS, bT)) | |
355 | 355 | } | |
356 | 356 | ||
357 | 357 | ||
358 | 358 | ||
359 | 359 | @Callable(bM) | |
360 | 360 | func changeSettings (bF,bG,bH) = if (if (if (if (if ((0 >= bF)) | |
361 | 361 | then true | |
362 | 362 | else (0 >= bG)) | |
363 | 363 | then true | |
364 | 364 | else (0 >= bH)) | |
365 | 365 | then true | |
366 | 366 | else !(ah())) | |
367 | 367 | then true | |
368 | 368 | else (bM.caller != w())) | |
369 | 369 | then throw("Invalid changeSettings params") | |
370 | 370 | else bE(bF, bG, bH) | |
371 | 371 | ||
372 | 372 | ||
373 | 373 | ||
374 | 374 | @Callable(bM) | |
375 | 375 | func initialize (aq,ar,bU,bV,bF,bG,bH) = if (if (if (if (if (if (if ((0 >= aq)) | |
376 | 376 | then true | |
377 | 377 | else (0 >= ar)) | |
378 | 378 | then true | |
379 | 379 | else (0 >= bF)) | |
380 | 380 | then true | |
381 | 381 | else (0 >= bG)) | |
382 | 382 | then true | |
383 | 383 | else (0 >= bH)) | |
384 | 384 | then true | |
385 | 385 | else ah()) | |
386 | 386 | then true | |
387 | 387 | else (bM.caller != this)) | |
388 | 388 | then throw("Invalid initialize parameters") | |
389 | 389 | else ((bK(aq, ar, 0) ++ bE(bF, bG, bH)) ++ [BooleanEntry(b, true), StringEntry(a, bU), StringEntry(n, toString(addressFromStringValue(bV)))]) | |
390 | 390 | ||
391 | 391 | ||
392 | 392 | ||
393 | 393 | @Callable(bM) | |
394 | 394 | func swapToBase (bW,bX) = { | |
395 | 395 | let bY = invoke(this, "syncTerminalPriceToOracle", nil, nil) | |
396 | 396 | if ((bY == bY)) | |
397 | 397 | then { | |
398 | 398 | let bZ = invoke(this, "ensureCalledOnce", nil, nil) | |
399 | 399 | if ((bZ == bZ)) | |
400 | 400 | then if (if (if (!(ah())) | |
401 | 401 | then true | |
402 | 402 | else ai()) | |
403 | 403 | then true | |
404 | 404 | else (bM.caller != y())) | |
405 | 405 | then throw("Invalid swapToBase parameters") | |
406 | 406 | else { | |
407 | 407 | let ca = au(true, bW) | |
408 | 408 | let aB = ca._1 | |
409 | 409 | let ay = ca._2 | |
410 | 410 | let az = ca._3 | |
411 | 411 | let cb = ca._4 | |
412 | + | let aJ = ca._5 | |
412 | 413 | let cc = bK(ay, az, cb) | |
413 | - | $Tuple2(cc, aB) | |
414 | + | $Tuple2(cc, $Tuple2(aB, aJ)) | |
414 | 415 | } | |
415 | 416 | else throw("Strict value is not equal to itself.") | |
416 | 417 | } | |
417 | 418 | else throw("Strict value is not equal to itself.") | |
418 | 419 | } | |
419 | 420 | ||
420 | 421 | ||
421 | 422 | ||
422 | 423 | @Callable(bM) | |
423 | 424 | func swapToQuote (bW,cd) = { | |
424 | 425 | let bY = invoke(this, "syncTerminalPriceToOracle", nil, nil) | |
425 | 426 | if ((bY == bY)) | |
426 | 427 | then { | |
427 | 428 | let bZ = invoke(this, "ensureCalledOnce", nil, nil) | |
428 | 429 | if ((bZ == bZ)) | |
429 | 430 | then if (if (if (!(ah())) | |
430 | 431 | then true | |
431 | 432 | else ai()) | |
432 | 433 | then true | |
433 | 434 | else (bM.caller != y())) | |
434 | 435 | then throw("Invalid swapToQuote parameters") | |
435 | 436 | else { | |
436 | 437 | let ce = aW(true, bW, true) | |
437 | 438 | let cf = ce._1 | |
438 | 439 | let ay = ce._2 | |
439 | 440 | let az = ce._3 | |
441 | + | let cg = ce._4 | |
442 | + | let aJ = ce._5 | |
440 | 443 | let cb = (U() - bW) | |
441 | 444 | let cc = bK(ay, az, cb) | |
442 | - | $Tuple2(cc, cf) | |
445 | + | $Tuple2(cc, $Tuple2(cf, aJ)) | |
443 | 446 | } | |
444 | 447 | else throw("Strict value is not equal to itself.") | |
445 | 448 | } | |
446 | 449 | else throw("Strict value is not equal to itself.") | |
447 | 450 | } | |
448 | 451 | ||
449 | 452 | ||
450 | 453 | ||
451 | 454 | @Callable(bM) | |
452 | 455 | func syncTerminalPriceToOracle () = { | |
453 | 456 | let aq = Q() | |
454 | 457 | let ar = R() | |
455 | - | let | |
456 | - | let bS = | |
457 | - | let bT = | |
458 | + | let ch = bA(bc(), aq, ar) | |
459 | + | let bS = ch._1 | |
460 | + | let bT = ch._2 | |
458 | 461 | bJ(bS, bT) | |
459 | 462 | } | |
460 | 463 | ||
461 | 464 | ||
462 | 465 | ||
463 | 466 | @Callable(bM) | |
464 | 467 | func ensureCalledOnce () = if ((bM.caller != this)) | |
465 | 468 | then throw("Invalid saveCurrentTxId parameters") | |
466 | 469 | else { | |
467 | - | let | |
468 | - | let | |
469 | - | if (( | |
470 | - | then [StringEntry(m, | |
470 | + | let ci = toBase58String(bM.transactionId) | |
471 | + | let cj = valueOrElse(getString(this, m), "") | |
472 | + | if ((cj != ci)) | |
473 | + | then [StringEntry(m, ci)] | |
471 | 474 | else throw("Can not call vAMM methods twice in one tx") | |
472 | 475 | } | |
473 | 476 | ||
474 | 477 | ||
475 | 478 | ||
476 | 479 | @Callable(bM) | |
477 | 480 | func view_getTerminalAmmPrice () = { | |
478 | - | let | |
479 | - | let bm = | |
480 | - | let bn = | |
481 | + | let ck = bh() | |
482 | + | let bm = ck._1 | |
483 | + | let bn = ck._2 | |
481 | 484 | let bN = D(F(bm, S()), F(bn, T())) | |
482 | 485 | throw(toString(bN)) | |
483 | 486 | } | |
484 | 487 | ||
485 | 488 | ||
486 | 489 | ||
487 | 490 | @Callable(bM) | |
488 | 491 | func view_getPrices () = { | |
489 | 492 | let bY = invoke(this, "syncTerminalPriceToOracle", nil, nil) | |
490 | 493 | if ((bY == bY)) | |
491 | 494 | then { | |
492 | - | let | |
493 | - | let bm = | |
494 | - | let bn = | |
495 | - | let | |
496 | - | let | |
497 | - | throw(((toString( | |
495 | + | let cl = bh() | |
496 | + | let bm = cl._1 | |
497 | + | let bn = cl._2 | |
498 | + | let cm = D(F(bm, S()), F(bn, T())) | |
499 | + | let cn = bg() | |
500 | + | throw(((toString(cm) + ",") + toString(cn))) | |
498 | 501 | } | |
499 | 502 | else throw("Strict value is not equal to itself.") | |
500 | 503 | } | |
501 | 504 | ||
502 | 505 | ||
503 | 506 | ||
504 | 507 | @Callable(bM) | |
505 | 508 | func computeSpotPrice () = { | |
506 | 509 | let bY = invoke(this, "syncTerminalPriceToOracle", nil, nil) | |
507 | 510 | if ((bY == bY)) | |
508 | 511 | then { | |
509 | 512 | let bz = bg() | |
510 | 513 | $Tuple2(nil, bz) | |
511 | 514 | } | |
512 | 515 | else throw("Strict value is not equal to itself.") | |
513 | 516 | } | |
514 | 517 | ||
515 | 518 | ||
516 | 519 | ||
517 | 520 | @Callable(bM) | |
518 | 521 | func computeTerminalAmmPrice () = { | |
519 | - | let | |
520 | - | let bm = | |
521 | - | let bn = | |
522 | + | let co = bh() | |
523 | + | let bm = co._1 | |
524 | + | let bn = co._2 | |
522 | 525 | let bN = D(F(bm, S()), F(bn, T())) | |
523 | 526 | $Tuple2(nil, bN) | |
524 | 527 | } | |
525 | 528 | ||
526 | 529 | ||
527 | - | @Verifier( | |
528 | - | func | |
529 | - | let | |
530 | - | if (isDefined( | |
530 | + | @Verifier(cp) | |
531 | + | func cq () = { | |
532 | + | let cr = getString(this, n) | |
533 | + | if (isDefined(cr)) | |
531 | 534 | then { | |
532 | - | let | |
533 | - | if (isDefined( | |
534 | - | then valueOrElse(getBoolean(addressFromStringValue(value( | |
535 | + | let cs = getString(addressFromStringValue(value(cr)), p) | |
536 | + | if (isDefined(cs)) | |
537 | + | then valueOrElse(getBoolean(addressFromStringValue(value(cs)), ((("status_" + toString(this)) + "_") + toBase58String(cp.id))), false) | |
535 | 538 | else throw("unable to verify: admin not set in coordinator") | |
536 | 539 | } | |
537 | - | else sigVerify( | |
540 | + | else sigVerify(cp.bodyBytes, cp.proofs[0], cp.senderPublicKey) | |
538 | 541 | } | |
539 | 542 |
github/deemru/w8io/169f3d6 81.04 ms ◑