tx · 5c4WjjNNnut1mZH3e1jJrfo1fwgEvZdrHQVAzs8y4KXx

3N8aqXmsyH4LoDFyypgngYYKT49pQ8nB4dx:  -0.08000000 Waves

2023.05.24 19:01 [2592271] smart account 3N8aqXmsyH4LoDFyypgngYYKT49pQ8nB4dx > SELF 0.00000000 Waves

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

github/deemru/w8io/169f3d6 
35.69 ms