tx · 94qzdrAm6k7J16siRBJtnDT48zHbSiEUMC4dXCe1RUnd

3N8aqXmsyH4LoDFyypgngYYKT49pQ8nB4dx:  -0.04500000 Waves

2023.08.04 11:15 [2695585] smart account 3N8aqXmsyH4LoDFyypgngYYKT49pQ8nB4dx > SELF 0.00000000 Waves

{ "type": 13, "id": "94qzdrAm6k7J16siRBJtnDT48zHbSiEUMC4dXCe1RUnd", "fee": 4500000, "feeAssetId": null, "timestamp": 1691136983240, "version": 2, "chainId": 84, "sender": "3N8aqXmsyH4LoDFyypgngYYKT49pQ8nB4dx", "senderPublicKey": "Hn75Ffw1pMKXcKvsGG5tJsFa7E4qyApSvkYUP4j8KDnN", "proofs": [ "B6DFb3xKuLpF31fZwKkgbiXhdXHjaaweDZ66d3L8gsxThkPnpFsBgavHe1VwKYHmGTA17iJf8a5iixunxDEsV1v" ], "script": "base64:BgI1CAISABIAEgMKAQESBQoDAQEBEgkKBwEBCAgBAQESBAoCAQESBAoCAQESABIAEgASABIAEgA+AAxrX2Jhc2VPcmFjbGUCDGtfYmFzZU9yYWNsZQANa19pbml0aWFsaXplZAINa19pbml0aWFsaXplZAAIa19wYXVzZWQCCGtfcGF1c2VkAAVrX2ZlZQIFa19mZWUAEGtfbWF4UHJpY2VJbXBhY3QCEGtfbWF4UHJpY2VJbXBhY3QAEGtfbWF4UHJpY2VTcHJlYWQCEGtfbWF4UHJpY2VTcHJlYWQAEGtfbWF4T3JhY2xlRGVsYXkCEGtfbWF4T3JhY2xlRGVsYXkAE2tfcXVvdGVBc3NldFJlc2VydmUCCGtfcXRBc3RSABJrX2Jhc2VBc3NldFJlc2VydmUCCGtfYnNBc3RSABJrX3F1b3RlQXNzZXRXZWlnaHQCCGtfcXRBc3RXABFrX2Jhc2VBc3NldFdlaWdodAIIa19ic0FzdFcAE2tfdG90YWxQb3NpdGlvblNpemUCE2tfdG90YWxQb3NpdGlvblNpemUACGtfbGFzdFR4AghrX2xhc3RUeAAUa19jb29yZGluYXRvckFkZHJ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iBub3Qgc2V0IGluIGNvb3JkaW5hdG9yCQD0AwMIBQJ0eAlib2R5Qnl0ZXMJAJEDAggFAnR4BnByb29mcwAACAUCdHgPc2VuZGVyUHVibGljS2V5y7flPw==", "height": 2695585, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 5c4WjjNNnut1mZH3e1jJrfo1fwgEvZdrHQVAzs8y4KXx Next: BAUZ8M2BKZdid8yp4TpcYteD3pyVWjoaBjLwKLSZySEa Diff:
OldNewDifferences
303303 func bE (bF,bG,bH) = [IntegerEntry(e, bF), IntegerEntry(f, bG), IntegerEntry(g, bH)]
304304
305305
306-func bI (aq,ar) = [IntegerEntry(h, aq), IntegerEntry(i, ar)]
306+func bI (aq,ar) = if (if ((0 >= aq))
307+ then true
308+ else (0 >= ar))
309+ then throw("Can not updateAmmReserves: _qtAstR <= 0 || _bsAstR <= 0")
310+ else [IntegerEntry(h, aq), IntegerEntry(i, ar)]
307311
308312
309313 func bJ (av,aw) = [IntegerEntry(j, av), IntegerEntry(k, aw)]
481485
482486
483487 @Callable(bM)
488+func view_getPrices () = {
489+ let bY = invoke(this, "syncTerminalPriceToOracle", nil, nil)
490+ if ((bY == bY))
491+ then {
492+ let ck = bh()
493+ let bm = ck._1
494+ let bn = ck._2
495+ let cl = D(F(bm, S()), F(bn, T()))
496+ let cm = bg()
497+ throw(((toString(cl) + ",") + toString(cm)))
498+ }
499+ else throw("Strict value is not equal to itself.")
500+ }
501+
502+
503+
504+@Callable(bM)
484505 func computeSpotPrice () = {
485506 let bY = invoke(this, "syncTerminalPriceToOracle", nil, nil)
486507 if ((bY == bY))
495516
496517 @Callable(bM)
497518 func computeTerminalAmmPrice () = {
498- let ck = bh()
499- let bm = ck._1
500- let bn = ck._2
519+ let cn = bh()
520+ let bm = cn._1
521+ let bn = cn._2
501522 let bN = D(F(bm, S()), F(bn, T()))
502523 $Tuple2(nil, bN)
503524 }
504525
505526
506-@Verifier(cl)
507-func cm () = {
508- let cn = getString(this, n)
509- if (isDefined(cn))
527+@Verifier(co)
528+func cp () = {
529+ let cq = getString(this, n)
530+ if (isDefined(cq))
510531 then {
511- let co = getString(addressFromStringValue(value(cn)), p)
512- if (isDefined(co))
513- then valueOrElse(getBoolean(addressFromStringValue(value(co)), ((("status_" + toString(this)) + "_") + toBase58String(cl.id))), false)
532+ let cr = getString(addressFromStringValue(value(cq)), p)
533+ if (isDefined(cr))
534+ then valueOrElse(getBoolean(addressFromStringValue(value(cr)), ((("status_" + toString(this)) + "_") + toBase58String(co.id))), false)
514535 else throw("unable to verify: admin not set in coordinator")
515536 }
516- else sigVerify(cl.bodyBytes, cl.proofs[0], cl.senderPublicKey)
537+ else sigVerify(co.bodyBytes, co.proofs[0], co.senderPublicKey)
517538 }
518539
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let a = "k_baseOracle"
55
66 let b = "k_initialized"
77
88 let c = "k_paused"
99
1010 let d = "k_fee"
1111
1212 let e = "k_maxPriceImpact"
1313
1414 let f = "k_maxPriceSpread"
1515
1616 let g = "k_maxOracleDelay"
1717
1818 let h = "k_qtAstR"
1919
2020 let i = "k_bsAstR"
2121
2222 let j = "k_qtAstW"
2323
2424 let k = "k_bsAstW"
2525
2626 let l = "k_totalPositionSize"
2727
2828 let m = "k_lastTx"
2929
3030 let n = "k_coordinatorAddress"
3131
3232 let o = "k_vault_address"
3333
3434 let p = "k_admin_address"
3535
3636 let q = "k_quote_asset"
3737
3838 let r = "k_spot_address"
3939
4040 func s (t,u) = ((t + "_") + u)
4141
4242
4343 func v () = valueOrErrorMessage(addressFromString(getStringValue(this, n)), "Coordinator not set")
4444
4545
4646 func w () = addressFromString(getStringValue(v(), p))
4747
4848
4949 func x () = fromBase58String(getStringValue(v(), q))
5050
5151
5252 func y () = addressFromString(valueOrErrorMessage(getString(v(), r), "Spot address not set"))
5353
5454
5555 let z = 6
5656
5757 let A = (1 * (((((10 * 10) * 10) * 10) * 10) * 10))
5858
5959 func B (C) = (toString(C) + ",")
6060
6161
6262 func D (C,E) = fraction(C, A, E, HALFEVEN)
6363
6464
6565 func F (C,E) = fraction(C, E, A, HALFEVEN)
6666
6767
6868 func G (C,E) = fraction(C, toBigInt(A), E, HALFEVEN)
6969
7070
7171 func H (C,E) = fraction(C, E, toBigInt(A), HALFEVEN)
7272
7373
7474 func I (C) = if ((C > 0))
7575 then C
7676 else -(C)
7777
7878
7979 func J (K) = valueOrErrorMessage(getInteger(this, K), ("no value for " + K))
8080
8181
8282 func L (K,M) = valueOrElse(getInteger(this, K), M)
8383
8484
8585 func N (u,t) = {
8686 let O = valueOrErrorMessage(getInteger(u, t), ("No value for key " + t))
8787 O
8888 }
8989
9090
9191 func P () = J(d)
9292
9393
9494 func Q () = J(h)
9595
9696
9797 func R () = J(i)
9898
9999
100100 func S () = L(j, A)
101101
102102
103103 func T () = L(k, A)
104104
105105
106106 func U () = J(l)
107107
108108
109109 func V () = J(e)
110110
111111
112112 func W () = J(f)
113113
114114
115115 func X () = J(g)
116116
117117
118118 func Y () = lastBlock.timestamp
119119
120120
121121 func Z (aa) = {
122122 let ab = getString(this, aa)
123123 if (if (isDefined(ab))
124124 then (value(ab) != "")
125125 else false)
126126 then {
127127 let ac = split(value(ab), ",")
128128 let ad = valueOrErrorMessage(addressFromString(ac[0]), ("Invalid oracle address in: " + value(ab)))
129129 let ae = ac[1]
130130 let af = ac[2]
131131 let ag = ac[3]
132132 $Tuple4(ad, ae, af, ag)
133133 }
134134 else unit
135135 }
136136
137137
138138 func ah () = valueOrElse(getBoolean(this, b), false)
139139
140140
141141 func ai () = valueOrElse(getBoolean(this, c), false)
142142
143143
144144 func aj (ak,al,am) = if (ak)
145145 then {
146146 let an = (R() - am)
147147 if ((0 >= an))
148148 then throw("Tx lead to base asset reserve <= 0, revert")
149149 else $Tuple3((Q() + al), an, (U() + am))
150150 }
151151 else {
152152 let ao = (Q() - al)
153153 if ((0 >= ao))
154154 then throw("Tx lead to base quote reserve <= 0, revert")
155155 else $Tuple3(ao, (R() + am), (U() - am))
156156 }
157157
158158
159159 func ap (aq,ar) = {
160160 let as = toBigInt(aq)
161161 let at = toBigInt(ar)
162162 H(as, at)
163163 }
164164
165165
166166 func au (ak,al) = {
167167 let aq = Q()
168168 let ar = R()
169169 let av = S()
170170 let aw = T()
171171 let ax = D(al, av)
172172 let K = ap(aq, ar)
173173 let ay = if (ak)
174174 then (aq + ax)
175175 else (aq - ax)
176176 let az = toInt(G(K, toBigInt(ay)))
177177 let aA = I((az - ar))
178178 let aB = if (ak)
179179 then aA
180180 else -(aA)
181181 let aC = aj(ak, ax, aA)
182182 let aD = aC._1
183183 let aE = aC._2
184184 let aF = aC._3
185185 let aG = D(F(aq, av), F(ar, aw))
186186 let aH = D(al, aA)
187187 let aI = I((aG - aH))
188188 let aJ = (A - D(aG, (aG + aI)))
189189 let aK = V()
190190 if ((aJ > aK))
191191 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)))
192192 else $Tuple4(aB, aD, aE, aF)
193193 }
194194
195195
196196 func aL (ak,am,aM,aN,aO,aP,aQ) = {
197197 let aG = D(F(aN, aO), F(aP, aQ))
198198 if ((am == 0))
199199 then throw("Invalid base asset amount")
200200 else {
201201 let K = ap(aN, aP)
202202 let aR = if (ak)
203203 then (aP + am)
204204 else (aP - am)
205205 let aS = toInt(G(K, toBigInt(aR)))
206206 let aT = I((aS - aN))
207207 let aU = F(aT, aO)
208208 let aK = V()
209209 let aV = aj(!(ak), aT, am)
210210 let aD = aV._1
211211 let aE = aV._2
212212 let aF = aV._3
213213 let aH = D(aU, am)
214214 let aI = I((aG - aH))
215215 let aJ = (A - D(aG, (aG + aI)))
216216 if (if ((aJ > aK))
217217 then aM
218218 else false)
219219 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)))
220220 else $Tuple5(aU, aD, aE, aF, aJ)
221221 }
222222 }
223223
224224
225225 func aW (ak,am,aM) = aL(ak, am, aM, Q(), S(), R(), T())
226226
227227
228228 func aX (aY,ae,af) = {
229229 let aZ = valueOrErrorMessage(getInteger(aY, ae), ((("Can not get oracle price. Oracle: " + toString(aY)) + " key: ") + ae))
230230 if ((af != ""))
231231 then {
232232 let ba = lastBlock.height
233233 let bb = valueOrErrorMessage(getInteger(aY, af), ((("Can not get oracle block. Oracle: " + toString(aY)) + " key: ") + af))
234234 if (((ba - bb) > X()))
235235 then throw(((("Oracle stale data. Last oracle block: " + toString(bb)) + " current block: ") + toString(ba)))
236236 else aZ
237237 }
238238 else aZ
239239 }
240240
241241
242242 func bc () = {
243243 let bd = valueOrErrorMessage(Z(a), "No base asset oracle data")
244244 let be = aX(bd._1, bd._2, bd._3)
245245 let bf = A
246246 D(be, bf)
247247 }
248248
249249
250250 func bg () = {
251251 let aN = Q()
252252 let aP = R()
253253 let av = S()
254254 let aw = T()
255255 D(F(aN, av), F(aP, aw))
256256 }
257257
258258
259259 func bh () = {
260260 let bi = U()
261261 if ((bi == 0))
262262 then $Tuple2(Q(), R())
263263 else {
264264 let bj = (bi > 0)
265265 let bk = aW(bj, I(bi), false)
266266 let bl = bk._1
267267 let bm = bk._2
268268 let bn = bk._3
269269 $Tuple2(bm, bn)
270270 }
271271 }
272272
273273
274274 func bo (bp,U,bq,br) = {
275275 let bs = toBigInt(bp)
276276 let bt = toBigInt(U)
277277 let bu = toBigInt(bq)
278278 let bv = toBigInt(br)
279279 let K = H(bu, bs)
280280 let bw = (bs + bt)
281281 let bx = G(K, bw)
282282 let by = G(bx, bw)
283283 let bz = G(bv, by)
284284 toInt(bz)
285285 }
286286
287287
288288 func bA (bB,aq,ar) = {
289289 let bi = U()
290290 if ((bi == 0))
291291 then {
292292 let bC = D(F(bB, ar), aq)
293293 $Tuple2(bC, A)
294294 }
295295 else {
296296 let bC = bo(ar, bi, aq, bB)
297297 let bD = A
298298 $Tuple2(bC, bD)
299299 }
300300 }
301301
302302
303303 func bE (bF,bG,bH) = [IntegerEntry(e, bF), IntegerEntry(f, bG), IntegerEntry(g, bH)]
304304
305305
306-func bI (aq,ar) = [IntegerEntry(h, aq), IntegerEntry(i, ar)]
306+func bI (aq,ar) = if (if ((0 >= aq))
307+ then true
308+ else (0 >= ar))
309+ then throw("Can not updateAmmReserves: _qtAstR <= 0 || _bsAstR <= 0")
310+ else [IntegerEntry(h, aq), IntegerEntry(i, ar)]
307311
308312
309313 func bJ (av,aw) = [IntegerEntry(j, av), IntegerEntry(k, aw)]
310314
311315
312316 func bK (aq,ar,bL) = {
313317 let av = S()
314318 let aw = T()
315319 (bI(aq, ar) ++ [IntegerEntry(l, bL)])
316320 }
317321
318322
319323 @Callable(bM)
320324 func pause () = if ((bM.caller != w()))
321325 then throw("Invalid pause params")
322326 else [BooleanEntry(c, true)]
323327
324328
325329
326330 @Callable(bM)
327331 func unpause () = if ((bM.caller != w()))
328332 then throw("Invalid unpause params")
329333 else [BooleanEntry(c, false)]
330334
331335
332336
333337 @Callable(bM)
334338 func changeLiquidity (al) = if (!(if ((bM.caller == y()))
335339 then true
336340 else (bM.caller == w())))
337341 then throw("Invalid changeLiquidity params")
338342 else {
339343 let aq = Q()
340344 let ar = R()
341345 let av = S()
342346 let aw = T()
343347 let bN = D(F(aq, av), F(ar, aw))
344348 let bO = (aq + al)
345349 let bP = (D(F(bO, av), bN) - ar)
346350 let bQ = (ar + bP)
347351 let bR = bA(bc(), bO, bQ)
348352 let bS = bR._1
349353 let bT = bR._2
350354 (bI(bO, bQ) ++ bJ(bS, bT))
351355 }
352356
353357
354358
355359 @Callable(bM)
356360 func changeSettings (bF,bG,bH) = if (if (if (if (if ((0 >= bF))
357361 then true
358362 else (0 >= bG))
359363 then true
360364 else (0 >= bH))
361365 then true
362366 else !(ah()))
363367 then true
364368 else (bM.caller != w()))
365369 then throw("Invalid changeSettings params")
366370 else bE(bF, bG, bH)
367371
368372
369373
370374 @Callable(bM)
371375 func initialize (aq,ar,bU,bV,bF,bG,bH) = if (if (if (if (if (if (if ((0 >= aq))
372376 then true
373377 else (0 >= ar))
374378 then true
375379 else (0 >= bF))
376380 then true
377381 else (0 >= bG))
378382 then true
379383 else (0 >= bH))
380384 then true
381385 else ah())
382386 then true
383387 else (bM.caller != this))
384388 then throw("Invalid initialize parameters")
385389 else ((bK(aq, ar, 0) ++ bE(bF, bG, bH)) ++ [BooleanEntry(b, true), StringEntry(a, bU), StringEntry(n, toString(addressFromStringValue(bV)))])
386390
387391
388392
389393 @Callable(bM)
390394 func swapToBase (bW,bX) = {
391395 let bY = invoke(this, "syncTerminalPriceToOracle", nil, nil)
392396 if ((bY == bY))
393397 then {
394398 let bZ = invoke(this, "ensureCalledOnce", nil, nil)
395399 if ((bZ == bZ))
396400 then if (if (if (!(ah()))
397401 then true
398402 else ai())
399403 then true
400404 else (bM.caller != y()))
401405 then throw("Invalid swapToBase parameters")
402406 else {
403407 let ca = au(true, bW)
404408 let aB = ca._1
405409 let ay = ca._2
406410 let az = ca._3
407411 let cb = ca._4
408412 let cc = bK(ay, az, cb)
409413 $Tuple2(cc, aB)
410414 }
411415 else throw("Strict value is not equal to itself.")
412416 }
413417 else throw("Strict value is not equal to itself.")
414418 }
415419
416420
417421
418422 @Callable(bM)
419423 func swapToQuote (bW,cd) = {
420424 let bY = invoke(this, "syncTerminalPriceToOracle", nil, nil)
421425 if ((bY == bY))
422426 then {
423427 let bZ = invoke(this, "ensureCalledOnce", nil, nil)
424428 if ((bZ == bZ))
425429 then if (if (if (!(ah()))
426430 then true
427431 else ai())
428432 then true
429433 else (bM.caller != y()))
430434 then throw("Invalid swapToQuote parameters")
431435 else {
432436 let ce = aW(true, bW, true)
433437 let cf = ce._1
434438 let ay = ce._2
435439 let az = ce._3
436440 let cb = (U() - bW)
437441 let cc = bK(ay, az, cb)
438442 $Tuple2(cc, cf)
439443 }
440444 else throw("Strict value is not equal to itself.")
441445 }
442446 else throw("Strict value is not equal to itself.")
443447 }
444448
445449
446450
447451 @Callable(bM)
448452 func syncTerminalPriceToOracle () = {
449453 let aq = Q()
450454 let ar = R()
451455 let cg = bA(bc(), aq, ar)
452456 let bS = cg._1
453457 let bT = cg._2
454458 bJ(bS, bT)
455459 }
456460
457461
458462
459463 @Callable(bM)
460464 func ensureCalledOnce () = if ((bM.caller != this))
461465 then throw("Invalid saveCurrentTxId parameters")
462466 else {
463467 let ch = toBase58String(bM.transactionId)
464468 let ci = valueOrElse(getString(this, m), "")
465469 if ((ci != ch))
466470 then [StringEntry(m, ch)]
467471 else throw("Can not call vAMM methods twice in one tx")
468472 }
469473
470474
471475
472476 @Callable(bM)
473477 func view_getTerminalAmmPrice () = {
474478 let cj = bh()
475479 let bm = cj._1
476480 let bn = cj._2
477481 let bN = D(F(bm, S()), F(bn, T()))
478482 throw(toString(bN))
479483 }
480484
481485
482486
483487 @Callable(bM)
488+func view_getPrices () = {
489+ let bY = invoke(this, "syncTerminalPriceToOracle", nil, nil)
490+ if ((bY == bY))
491+ then {
492+ let ck = bh()
493+ let bm = ck._1
494+ let bn = ck._2
495+ let cl = D(F(bm, S()), F(bn, T()))
496+ let cm = bg()
497+ throw(((toString(cl) + ",") + toString(cm)))
498+ }
499+ else throw("Strict value is not equal to itself.")
500+ }
501+
502+
503+
504+@Callable(bM)
484505 func computeSpotPrice () = {
485506 let bY = invoke(this, "syncTerminalPriceToOracle", nil, nil)
486507 if ((bY == bY))
487508 then {
488509 let bz = bg()
489510 $Tuple2(nil, bz)
490511 }
491512 else throw("Strict value is not equal to itself.")
492513 }
493514
494515
495516
496517 @Callable(bM)
497518 func computeTerminalAmmPrice () = {
498- let ck = bh()
499- let bm = ck._1
500- let bn = ck._2
519+ let cn = bh()
520+ let bm = cn._1
521+ let bn = cn._2
501522 let bN = D(F(bm, S()), F(bn, T()))
502523 $Tuple2(nil, bN)
503524 }
504525
505526
506-@Verifier(cl)
507-func cm () = {
508- let cn = getString(this, n)
509- if (isDefined(cn))
527+@Verifier(co)
528+func cp () = {
529+ let cq = getString(this, n)
530+ if (isDefined(cq))
510531 then {
511- let co = getString(addressFromStringValue(value(cn)), p)
512- if (isDefined(co))
513- then valueOrElse(getBoolean(addressFromStringValue(value(co)), ((("status_" + toString(this)) + "_") + toBase58String(cl.id))), false)
532+ let cr = getString(addressFromStringValue(value(cq)), p)
533+ if (isDefined(cr))
534+ then valueOrElse(getBoolean(addressFromStringValue(value(cr)), ((("status_" + toString(this)) + "_") + toBase58String(co.id))), false)
514535 else throw("unable to verify: admin not set in coordinator")
515536 }
516- else sigVerify(cl.bodyBytes, cl.proofs[0], cl.senderPublicKey)
537+ else sigVerify(co.bodyBytes, co.proofs[0], co.senderPublicKey)
517538 }
518539

github/deemru/w8io/169f3d6 
68.88 ms