tx · 8oTC6roBS3qrXv1qcmDGng34u5vzakvAMty4XZWqQrSt

3N7LYefWk1WhvCsY5A9nTq244SbVPmhCypi:  -0.01400000 Waves

2022.03.03 22:28 [1948215] smart account 3N7LYefWk1WhvCsY5A9nTq244SbVPmhCypi > SELF 0.00000000 Waves

{ "type": 13, "id": "8oTC6roBS3qrXv1qcmDGng34u5vzakvAMty4XZWqQrSt", "fee": 1400000, "feeAssetId": null, "timestamp": 1646335681616, "version": 1, "sender": "3N7LYefWk1WhvCsY5A9nTq244SbVPmhCypi", "senderPublicKey": "4qGVXRFATZNzo2RZZ5UYHXojGyJgSRBwtgJcCU8rJe5A", "proofs": [ "3x3QkatcxrGiCCTmjAQHRtmGevpB36996mHHV52aBR9T8matibPdKhWnbSG8vHSZksDQ7QqryGs8Xb653ghDdKXD" ], "script": "base64:AAIFAAAAAAAAAD0IAhIFCgMICAESAwoBARIHCgUBAQEBARIICgYBAQEBAQESABIDCgEBEgMKAQgSABIECgIBARIGCgQBAQEBAAAAOgAAAAAHV0FWRUxFVAAAAAAABfXhAAAAAAAFUEFVTEkAAAAAAAAPQkAAAAAACEJJR1BBVUxJCQABNgAAAAEAAAAAAAAPQkAAAAAACFBSSUNFTEVUAAAAAAAAD0JAAAAAAARNVUxUAAAAAAAF9eEAAAAAAAlCSUdNVUxUMTYJAAE2AAAAAQAAI4byb8EAAAAAAAAJTVVMVFNDQUxFAAAAAAAAAAAIAAAAAAdTQ0FMRTE2AAAAAAAAAAAQAAAAAANTRVACAAAAAl9fAAAAAAVIQUxGOAAAAAAAAvrwgAAAAAALRVVMRVJOVU1CRVIJAAE2AAAAAQAAYJKhE9jVdAAAAAAGc2NhbGU2AAAAAAAAD0JAAAAAAAxzY2FsZTZCaWdJbnQJAAE2AAAAAQAAAAAAAA9CQAAAAAAMc2NhbGU4QmlnSW50CQABNgAAAAEAAAAAAAX14QABAAAAEmtleU5ldXRyaW5vQWRkcmVzcwAAAAACAAAAHSVzJXNfX2NvbmZpZ19fbm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AhoYWxmTGlmZQkBAAAADGdldEludE9yRmFpbAAAAAIFAAAAE25zYnRTdGFraW5nQ29udHJhY3QJAQAAAAtrZXlIYWxmTGlmZQAAAAAEAAAAAXcJAABrAAAAAwUAAAAHYW1vdW50MgkAAGwAAAAGAAAAAAAAAAACAAAAAAAAAAAACQAAawAAAAMJAABlAAAAAgUAAAAHaGVpZ2h0MgUAAAAHaGVpZ2h0MQUAAAAETVVMVAUAAAAIaGFsZkxpZmUAAAAAAAAAAAgAAAAAAAAAAAgFAAAABkhBTEZVUAUAAAAETVVMVAQAAAABdgkAAGsAAAADCQAAZAAAAAIFAAAAB2Ftb3VudDEFAAAAB2Ftb3VudDIFAAAABE1VTFQJAABkAAAAAgUAAAAHYW1vdW50MQUAAAABdwkABRQAAAACBQAAAANuaWwJAABkAAAAAgUAAAAHaGVpZ2h0MQkAAGkAAAACCQAAZQAAAAIFAAAABUhBTEY4CQAAaAAAAAIFAAAACGhhbGZMaWZlCQAAbQAAAAYFAAAAAXYAAAAAAAAAAAgAAAAAAAAAAAIAAAAAAAAAAAAAAAAAAAAAAAgFAAAABkhBTEZVUAUAAAAETVVMVAAAAAC45Koj", "chainId": 84, "height": 1948215, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 9Ca8GfrDNAwKi7BMFT6XmCM11KzQqgXr3CY7ZVksX5R9 Next: 7TVQfj8ojaYSeqXN5ezyjW3JNk6SfPuoLyo6j1n7yutg Diff:
OldNewDifferences
101101 func O (M,N) = valueOrErrorMessage(getInteger(M, N), makeString(["mandatory ", toString(M), ".", N, " is not defined"], ""))
102102
103103
104-func P (M,N) = valueOrErrorMessage(getBoolean(M, N), makeString(["mandatory ", toString(M), ".", N, " is not defined"], ""))
104+func P (M,N) = valueOrElse(getInteger(M, N), 0)
105105
106106
107-func Q (R,S) = fraction(fraction(R, d, S), a, b)
107+func Q (M,N) = valueOrErrorMessage(getBoolean(M, N), makeString(["mandatory ", toString(M), ".", N, " is not defined"], ""))
108108
109109
110-func T (R,S) = fraction(fraction(R, S, d), b, a)
110+func R (S,T) = fraction(fraction(S, d, T), a, b)
111111
112112
113-func U (V,W) = fraction(toBigInt(V), f, toBigInt(W))
113+func U (S,T) = fraction(fraction(S, T, d), b, a)
114114
115115
116-func X (Y,Z) = toInt(fraction(Y, toBigInt(Z), f))
116+func V (W,X) = fraction(toBigInt(W), f, toBigInt(X))
117117
118118
119-func aa (Y) = {
120- let ab = Y
121- if ($isInstanceOf(ab, "List[Any]"))
119+func Y (Z,aa) = toInt(fraction(Z, toBigInt(aa), f))
120+
121+
122+func ab (Z) = {
123+ let ac = Z
124+ if ($isInstanceOf(ac, "List[Any]"))
122125 then {
123- let ac = ab
124- ac
126+ let ad = ac
127+ ad
125128 }
126129 else throw("fail to cast into List[Any]")
127130 }
128131
129132
130-func ad (Y) = {
131- let ab = Y
132- if ($isInstanceOf(ab, "Int"))
133+func ae (Z) = {
134+ let ac = Z
135+ if ($isInstanceOf(ac, "Int"))
133136 then {
134- let ae = ab
135- ae
137+ let af = ac
138+ af
136139 }
137140 else throw("fail to cast into Int")
138141 }
139142
140143
141-func af (Y) = {
142- let ab = Y
143- if ($isInstanceOf(ab, "String"))
144+func ag (Z) = {
145+ let ac = Z
146+ if ($isInstanceOf(ac, "String"))
144147 then {
145- let ag = ab
146- ag
148+ let ah = ac
149+ ah
147150 }
148151 else throw("fail to cast into String")
149152 }
150153
151154
152-let ah = addressFromStringValue(L(this, o()))
155+let ai = addressFromStringValue(L(this, o()))
153156
154-let ai = addressFromStringValue(L(ah, u()))
157+let aj = addressFromStringValue(L(ai, u()))
155158
156-let aj = addressFromStringValue(L(ah, t()))
159+let ak = addressFromStringValue(L(ai, t()))
157160
158-let ak = L(ah, r())
161+let al = L(ai, r())
159162
160-let al = L(ah, s())
163+let am = L(ai, s())
161164
162-let am = addressFromStringValue(L(this, D()))
165+let an = addressFromStringValue(L(this, D()))
163166
164-let an = L(ah, q())
167+let ao = L(ai, q())
165168
166-let ao = fromBase58String(an)
169+let ap = fromBase58String(ao)
167170
168-let ap = getStringValue(ah, v())
171+let aq = getStringValue(ai, v())
169172
170-let aq = fromBase58String(ap)
173+let ar = fromBase58String(aq)
171174
172-@Callable(ar)
173-func constructor (as,at,au) = if ((ar.caller != this))
174- then throw("not authorized")
175- else [StringEntry(o(), as), StringEntry(D(), at), IntegerEntry(p(), au)]
176-
177-
178-
179-@Callable(ar)
180-func calcSwapLimitMATH (av) = {
181- let aw = toBigInt(3)
182- let ax = U(av, l)
183- let ay = pow(ax, 16, k, 16, 8, CEILING)
184- let az = fraction(aw, ay, n)
185- $Tuple2(nil, toInt(az))
186- }
187-
188-
189-
190-@Callable(ar)
191-func calculateKMATH (aA,aB,S,aC,aD) = {
192- let aE = toBigInt(2718281)
193- let aF = 6
194- let aG = valueOrElse(getInteger(aj, "nsbtCurveParam_a"), 3)
195- let aH = valueOrElse(getInteger(aj, "nsbtCurveParam_b"), ((3 * b) / 10))
196- let aI = T(aA, S)
197- let aJ = fraction(aI, e, aB)
198- if ((aJ > 10678564816))
199- then throw("BR > 10678.564816% will overflow exponent")
200- else {
201- let aK = (aG * (aJ - e))
202- let aL = pow(aE, aF, toBigInt(aK), g, h, DOWN)
203- let aM = fraction(toBigInt(aH), aL, c)
204- $Tuple2(nil, [aG, aH, aI, aJ, aK, toString(aL), toString(aM)])
205- }
206- }
207-
208-
209-
210-@Callable(ar)
211-func curveFunctionMATH (aA,aB,S,aC,aD,aN) = {
212- let aO = aa(invoke(this, "calculateKMATH", [aA, aB, S, aC, aD], nil))
213- if ((aO == aO))
175+func as (at) = {
176+ let au = value(assetInfo(ar)).quantity
177+ let av = ab(invoke(this, "calcNeutinoMetricsMATH", nil, nil))
178+ if ((av == av))
214179 then {
215- let aM = parseBigIntValue(af(aO[6]))
216- let aP = T(aN, S)
217- let aQ = toBigInt(aC)
218- let aR = toBigInt((aC - aD))
219- let aS = fraction(toBigInt(aP), f, aM)
220- let aT = fraction(aS, aR, aQ)
221- let aU = toInt(fraction(aR, aQ, (aT + aQ)))
222- let aV = ((aC - aD) - aU)
223- $Tuple2(nil, [aV, aP, aA, aB, aC, aD, ad(aO[0]), ad(aO[1]), ad(aO[2]), ad(S), ad(aO[3]), ad(aO[4]), aO[5], aO[6], toString(aS), toString(aT), toString(aU)])
224- }
225- else throw("Strict value is not equal to itself.")
226- }
227-
228-
229-
230-@Callable(ar)
231-func calcContractNsbtPriceMATH () = {
232- let aW = value(assetInfo(aq)).quantity
233- let aX = aa(invoke(this, "calcNeutinoMetricsMATH", nil, nil))
234- if ((aX == aX))
235- then {
236- let aY = ad(aX[9])
237- let aZ = ad(aX[0])
238- let aO = aa(invoke(this, "calculateKMATH", [ad(aX[4]), ad(aX[6]), aZ, aW, aY], nil))
239- if ((aO == aO))
180+ let aw = if ((at == unit))
181+ then ae(av[9])
182+ else value(at)
183+ let ax = ae(av[0])
184+ let ay = ab(invoke(this, "calculateKMATH", [ae(av[4]), ae(av[6]), ax, au, aw], nil))
185+ if ((ay == ay))
240186 then {
241- let aM = parseBigIntValue(af(aO[6]))
242- let ba = X(aM, e)
243- let bb = fraction(aW, e, (aW - aY))
244- let bc = fraction(bb, bb, e)
245- let bd = fraction(ba, bc, e)
246- let be = fraction(bd, b, e)
247- let bf = fraction(be, b, aZ)
248- $Tuple2(nil, [be, bf])
187+ let az = parseBigIntValue(ag(ay[6]))
188+ let aA = Y(az, e)
189+ let aB = fraction(au, e, (au - aw))
190+ let aC = fraction(aB, aB, e)
191+ let aD = fraction(aA, aC, e)
192+ let aE = fraction(aD, b, e)
193+ let aF = fraction(aE, b, ax)
194+ $Tuple2(nil, [aE, aF])
249195 }
250196 else throw("Strict value is not equal to itself.")
251197 }
253199 }
254200
255201
202+@Callable(aG)
203+func constructor (aH,aI,aJ) = if ((aG.caller != this))
204+ then throw("not authorized")
205+ else [StringEntry(o(), aH), StringEntry(D(), aI), IntegerEntry(p(), aJ)]
256206
257-@Callable(ar)
258-func calcNeutinoMetricsMATH () = {
259- let aZ = getIntegerValue(ai, I())
260- let bg = valueOrElse(getInteger(ah, y()), 0)
261- let bh = valueOrElse(getInteger(ah, x()), 0)
262- let bi = (wavesBalance(ah).regular - bh)
263- let bj = T(bi, aZ)
264- let bk = (((bg + value(assetInfo(ao)).quantity) - assetBalance(ah, ao)) - assetBalance(addressFromStringValue(ak), ao))
265- let bl = (bj - bk)
266- let bm = (bk - bj)
267- let bn = (fraction(bl, b, bk) * 100)
268- let bo = fraction(bj, b, bk)
269- let aW = value(assetInfo(aq)).quantity
270- let aY = (aW - assetBalance(aj, aq))
271- $Tuple2(nil, [aZ, bg, bh, bi, bj, bk, bl, bn, bo, aY, aW])
207+
208+
209+@Callable(aG)
210+func calcSwapLimitMATH (aK) = {
211+ let aL = toBigInt(3)
212+ let aM = V(aK, l)
213+ let aN = pow(aM, 16, k, 16, 8, CEILING)
214+ let aO = fraction(aL, aN, n)
215+ $Tuple2(nil, toInt(aO))
272216 }
273217
274218
275219
276-@Callable(ar)
277-func getUnstakeComissionAmountMATH (R,bp) = {
278- let bq = O(am, J())
279- $Tuple2(nil, fraction(R, pow(2, 0, fraction(-((height - bp)), e, bq), 8, 8, HALFUP), e))
220+@Callable(aG)
221+func calculateKMATH (aP,aQ,T,aR,aS) = {
222+ let aT = toBigInt(2718281)
223+ let aU = 6
224+ let aV = valueOrElse(getInteger(ak, "nsbtCurveParam_a"), 3)
225+ let aW = valueOrElse(getInteger(ak, "nsbtCurveParam_b"), ((3 * b) / 10))
226+ let aX = U(aP, T)
227+ let aY = fraction(aX, e, aQ)
228+ if ((aY > 10678564816))
229+ then throw("BR > 10678.564816% will overflow exponent")
230+ else {
231+ let aZ = (aV * (aY - e))
232+ let ba = pow(aT, aU, toBigInt(aZ), g, h, DOWN)
233+ let az = fraction(toBigInt(aW), ba, c)
234+ $Tuple2(nil, [aV, aW, aX, aY, aZ, toString(ba), toString(az)])
235+ }
280236 }
281237
282238
283239
284-@Callable(ar)
285-func mergeStakesMATH (br,bs,bt,bu) = {
286- let bq = O(am, J())
287- let bv = fraction(bt, pow(2, 0, fraction((bu - bs), e, bq), 8, 8, HALFUP), e)
288- let bw = fraction((br + bt), e, (br + bv))
289- $Tuple2(nil, (bs + ((j - (bq * log(bw, 8, 2, 0, 8, HALFUP))) / e)))
240+@Callable(aG)
241+func curveFunctionMATH (aP,aQ,T,aR,aS,bb) = {
242+ let ay = ab(invoke(this, "calculateKMATH", [aP, aQ, T, aR, aS], nil))
243+ if ((ay == ay))
244+ then {
245+ let az = parseBigIntValue(ag(ay[6]))
246+ let bc = U(bb, T)
247+ let bd = toBigInt(aR)
248+ let be = toBigInt((aR - aS))
249+ let bf = fraction(toBigInt(bc), f, az)
250+ let bg = fraction(bf, be, bd)
251+ let bh = toInt(fraction(be, bd, (bg + bd)))
252+ let bi = ((aR - aS) - bh)
253+ $Tuple2(nil, [bi, bc, aP, aQ, aR, aS, ae(ay[0]), ae(ay[1]), ae(ay[2]), T, ae(ay[3]), ae(ay[4]), ay[5], ay[6], toString(bf), toString(bg), bh])
254+ }
255+ else throw("Strict value is not equal to itself.")
256+ }
257+
258+
259+
260+@Callable(aG)
261+func calcContractNsbtPriceMATH () = as(unit)
262+
263+
264+
265+@Callable(aG)
266+func calcContractNsbtPriceBySupplyMATH (aw) = as(aw)
267+
268+
269+
270+@Callable(aG)
271+func calcUserSwapLimitsMATH (bj) = {
272+ let ax = getIntegerValue(aj, I())
273+ let bk = valueOrElse(getInteger(an, K(bj)), 0)
274+ let bl = ae(invoke(this, "calcSwapLimitMATH", [bk], nil))
275+ if ((bl == bl))
276+ then {
277+ let bm = P(ai, E())
278+ let bn = valueOrElse(getInteger(ai, F(bj)), 0)
279+ let bo = ((height - bn) > bm)
280+ let bp = if (bo)
281+ then 0
282+ else valueOrElse(getInteger(ai, H(bj)), 0)
283+ let bq = if (bo)
284+ then 0
285+ else (bm - (height - bn))
286+ let br = R(bl, ax)
287+ $Tuple2(nil, [bl, bp, bq, br])
288+ }
289+ else throw("Strict value is not equal to itself.")
290+ }
291+
292+
293+
294+@Callable(aG)
295+func calcNeutinoMetricsMATH () = {
296+ let ax = getIntegerValue(aj, I())
297+ let bs = valueOrElse(getInteger(ai, y()), 0)
298+ let bt = valueOrElse(getInteger(ai, x()), 0)
299+ let bu = (wavesBalance(ai).regular - bt)
300+ let bv = U(bu, ax)
301+ let bw = (((bs + value(assetInfo(ap)).quantity) - assetBalance(ai, ap)) - assetBalance(addressFromStringValue(al), ap))
302+ let bx = (bv - bw)
303+ let by = (bw - bv)
304+ let bz = if ((bw == 0))
305+ then 0
306+ else (fraction(bx, b, bw) * 100)
307+ let bA = if ((bw == 0))
308+ then 0
309+ else fraction(bv, b, bw)
310+ let au = value(assetInfo(ar)).quantity
311+ let aw = (au - assetBalance(ak, ar))
312+ $Tuple2(nil, [ax, bs, bt, bu, bv, bw, bx, bz, bA, aw, au])
313+ }
314+
315+
316+
317+@Callable(aG)
318+func getUnstakeComissionAmountMATH (S,bB) = {
319+ let bC = O(an, J())
320+ $Tuple2(nil, fraction(S, pow(2, 0, fraction(-((height - bB)), e, bC), 8, 8, HALFUP), e))
321+ }
322+
323+
324+
325+@Callable(aG)
326+func mergeStakesMATH (bD,bE,bF,bG) = {
327+ let bC = O(an, J())
328+ let bH = fraction(bF, pow(2, 0, fraction((bG - bE), e, bC), 8, 8, HALFUP), e)
329+ let bI = fraction((bD + bF), e, (bD + bH))
330+ $Tuple2(nil, (bE + ((j - (bC * log(bI, 8, 2, 0, 8, HALFUP))) / e)))
290331 }
291332
292333
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let a = 100000000
55
66 let b = 1000000
77
88 let c = toBigInt(1000000)
99
1010 let d = 1000000
1111
1212 let e = 100000000
1313
1414 let f = toBigInt(10000000000000000)
1515
1616 let g = 8
1717
1818 let h = 16
1919
2020 let i = "__"
2121
2222 let j = 50000000
2323
2424 let k = toBigInt(27182818284590452)
2525
2626 let l = 1000000
2727
2828 let m = toBigInt(1000000)
2929
3030 let n = toBigInt(100000000)
3131
3232 func o () = "%s%s__config__neutrinoAddress"
3333
3434
3535 func p () = "%s%s__config__swapAParam"
3636
3737
3838 func q () = "neutrino_asset_id"
3939
4040
4141 func r () = "liquidation_contract"
4242
4343
4444 func s () = "rpd_contract"
4545
4646
4747 func t () = "auction_contract"
4848
4949
5050 func u () = "control_contract"
5151
5252
5353 func v () = "bond_asset_id"
5454
5555
5656 func w () = "balance_lock_"
5757
5858
5959 func x () = (w() + "waves")
6060
6161
6262 func y () = (w() + "neutrino")
6363
6464
6565 func z () = "min_waves_swap_amount"
6666
6767
6868 func A () = "min_neutrino_swap_amount"
6969
7070
7171 func B () = "wavesOut_swap_feePart"
7272
7373
7474 func C () = "neutrinoOut_swap_feePart"
7575
7676
7777 func D () = "%s__nsbtLockContract"
7878
7979
8080 func E () = "%s__quickSwapLimitDuration"
8181
8282
8383 func F (G) = makeString(["%s%s", "userLastQuickSwapHeight", G], i)
8484
8585
8686 func H (G) = makeString(["%s%s", "quickSwapUserSpentInPeriod", G], i)
8787
8888
8989 func I () = "price"
9090
9191
9292 func J () = "%s__halfLife"
9393
9494
9595 func K (G) = makeString(["%s%s%s", "paramByUser", G, "amount"], i)
9696
9797
9898 func L (M,N) = valueOrErrorMessage(getString(M, N), makeString(["mandatory ", toString(M), ".", N, " is not defined"], ""))
9999
100100
101101 func O (M,N) = valueOrErrorMessage(getInteger(M, N), makeString(["mandatory ", toString(M), ".", N, " is not defined"], ""))
102102
103103
104-func P (M,N) = valueOrErrorMessage(getBoolean(M, N), makeString(["mandatory ", toString(M), ".", N, " is not defined"], ""))
104+func P (M,N) = valueOrElse(getInteger(M, N), 0)
105105
106106
107-func Q (R,S) = fraction(fraction(R, d, S), a, b)
107+func Q (M,N) = valueOrErrorMessage(getBoolean(M, N), makeString(["mandatory ", toString(M), ".", N, " is not defined"], ""))
108108
109109
110-func T (R,S) = fraction(fraction(R, S, d), b, a)
110+func R (S,T) = fraction(fraction(S, d, T), a, b)
111111
112112
113-func U (V,W) = fraction(toBigInt(V), f, toBigInt(W))
113+func U (S,T) = fraction(fraction(S, T, d), b, a)
114114
115115
116-func X (Y,Z) = toInt(fraction(Y, toBigInt(Z), f))
116+func V (W,X) = fraction(toBigInt(W), f, toBigInt(X))
117117
118118
119-func aa (Y) = {
120- let ab = Y
121- if ($isInstanceOf(ab, "List[Any]"))
119+func Y (Z,aa) = toInt(fraction(Z, toBigInt(aa), f))
120+
121+
122+func ab (Z) = {
123+ let ac = Z
124+ if ($isInstanceOf(ac, "List[Any]"))
122125 then {
123- let ac = ab
124- ac
126+ let ad = ac
127+ ad
125128 }
126129 else throw("fail to cast into List[Any]")
127130 }
128131
129132
130-func ad (Y) = {
131- let ab = Y
132- if ($isInstanceOf(ab, "Int"))
133+func ae (Z) = {
134+ let ac = Z
135+ if ($isInstanceOf(ac, "Int"))
133136 then {
134- let ae = ab
135- ae
137+ let af = ac
138+ af
136139 }
137140 else throw("fail to cast into Int")
138141 }
139142
140143
141-func af (Y) = {
142- let ab = Y
143- if ($isInstanceOf(ab, "String"))
144+func ag (Z) = {
145+ let ac = Z
146+ if ($isInstanceOf(ac, "String"))
144147 then {
145- let ag = ab
146- ag
148+ let ah = ac
149+ ah
147150 }
148151 else throw("fail to cast into String")
149152 }
150153
151154
152-let ah = addressFromStringValue(L(this, o()))
155+let ai = addressFromStringValue(L(this, o()))
153156
154-let ai = addressFromStringValue(L(ah, u()))
157+let aj = addressFromStringValue(L(ai, u()))
155158
156-let aj = addressFromStringValue(L(ah, t()))
159+let ak = addressFromStringValue(L(ai, t()))
157160
158-let ak = L(ah, r())
161+let al = L(ai, r())
159162
160-let al = L(ah, s())
163+let am = L(ai, s())
161164
162-let am = addressFromStringValue(L(this, D()))
165+let an = addressFromStringValue(L(this, D()))
163166
164-let an = L(ah, q())
167+let ao = L(ai, q())
165168
166-let ao = fromBase58String(an)
169+let ap = fromBase58String(ao)
167170
168-let ap = getStringValue(ah, v())
171+let aq = getStringValue(ai, v())
169172
170-let aq = fromBase58String(ap)
173+let ar = fromBase58String(aq)
171174
172-@Callable(ar)
173-func constructor (as,at,au) = if ((ar.caller != this))
174- then throw("not authorized")
175- else [StringEntry(o(), as), StringEntry(D(), at), IntegerEntry(p(), au)]
176-
177-
178-
179-@Callable(ar)
180-func calcSwapLimitMATH (av) = {
181- let aw = toBigInt(3)
182- let ax = U(av, l)
183- let ay = pow(ax, 16, k, 16, 8, CEILING)
184- let az = fraction(aw, ay, n)
185- $Tuple2(nil, toInt(az))
186- }
187-
188-
189-
190-@Callable(ar)
191-func calculateKMATH (aA,aB,S,aC,aD) = {
192- let aE = toBigInt(2718281)
193- let aF = 6
194- let aG = valueOrElse(getInteger(aj, "nsbtCurveParam_a"), 3)
195- let aH = valueOrElse(getInteger(aj, "nsbtCurveParam_b"), ((3 * b) / 10))
196- let aI = T(aA, S)
197- let aJ = fraction(aI, e, aB)
198- if ((aJ > 10678564816))
199- then throw("BR > 10678.564816% will overflow exponent")
200- else {
201- let aK = (aG * (aJ - e))
202- let aL = pow(aE, aF, toBigInt(aK), g, h, DOWN)
203- let aM = fraction(toBigInt(aH), aL, c)
204- $Tuple2(nil, [aG, aH, aI, aJ, aK, toString(aL), toString(aM)])
205- }
206- }
207-
208-
209-
210-@Callable(ar)
211-func curveFunctionMATH (aA,aB,S,aC,aD,aN) = {
212- let aO = aa(invoke(this, "calculateKMATH", [aA, aB, S, aC, aD], nil))
213- if ((aO == aO))
175+func as (at) = {
176+ let au = value(assetInfo(ar)).quantity
177+ let av = ab(invoke(this, "calcNeutinoMetricsMATH", nil, nil))
178+ if ((av == av))
214179 then {
215- let aM = parseBigIntValue(af(aO[6]))
216- let aP = T(aN, S)
217- let aQ = toBigInt(aC)
218- let aR = toBigInt((aC - aD))
219- let aS = fraction(toBigInt(aP), f, aM)
220- let aT = fraction(aS, aR, aQ)
221- let aU = toInt(fraction(aR, aQ, (aT + aQ)))
222- let aV = ((aC - aD) - aU)
223- $Tuple2(nil, [aV, aP, aA, aB, aC, aD, ad(aO[0]), ad(aO[1]), ad(aO[2]), ad(S), ad(aO[3]), ad(aO[4]), aO[5], aO[6], toString(aS), toString(aT), toString(aU)])
224- }
225- else throw("Strict value is not equal to itself.")
226- }
227-
228-
229-
230-@Callable(ar)
231-func calcContractNsbtPriceMATH () = {
232- let aW = value(assetInfo(aq)).quantity
233- let aX = aa(invoke(this, "calcNeutinoMetricsMATH", nil, nil))
234- if ((aX == aX))
235- then {
236- let aY = ad(aX[9])
237- let aZ = ad(aX[0])
238- let aO = aa(invoke(this, "calculateKMATH", [ad(aX[4]), ad(aX[6]), aZ, aW, aY], nil))
239- if ((aO == aO))
180+ let aw = if ((at == unit))
181+ then ae(av[9])
182+ else value(at)
183+ let ax = ae(av[0])
184+ let ay = ab(invoke(this, "calculateKMATH", [ae(av[4]), ae(av[6]), ax, au, aw], nil))
185+ if ((ay == ay))
240186 then {
241- let aM = parseBigIntValue(af(aO[6]))
242- let ba = X(aM, e)
243- let bb = fraction(aW, e, (aW - aY))
244- let bc = fraction(bb, bb, e)
245- let bd = fraction(ba, bc, e)
246- let be = fraction(bd, b, e)
247- let bf = fraction(be, b, aZ)
248- $Tuple2(nil, [be, bf])
187+ let az = parseBigIntValue(ag(ay[6]))
188+ let aA = Y(az, e)
189+ let aB = fraction(au, e, (au - aw))
190+ let aC = fraction(aB, aB, e)
191+ let aD = fraction(aA, aC, e)
192+ let aE = fraction(aD, b, e)
193+ let aF = fraction(aE, b, ax)
194+ $Tuple2(nil, [aE, aF])
249195 }
250196 else throw("Strict value is not equal to itself.")
251197 }
252198 else throw("Strict value is not equal to itself.")
253199 }
254200
255201
202+@Callable(aG)
203+func constructor (aH,aI,aJ) = if ((aG.caller != this))
204+ then throw("not authorized")
205+ else [StringEntry(o(), aH), StringEntry(D(), aI), IntegerEntry(p(), aJ)]
256206
257-@Callable(ar)
258-func calcNeutinoMetricsMATH () = {
259- let aZ = getIntegerValue(ai, I())
260- let bg = valueOrElse(getInteger(ah, y()), 0)
261- let bh = valueOrElse(getInteger(ah, x()), 0)
262- let bi = (wavesBalance(ah).regular - bh)
263- let bj = T(bi, aZ)
264- let bk = (((bg + value(assetInfo(ao)).quantity) - assetBalance(ah, ao)) - assetBalance(addressFromStringValue(ak), ao))
265- let bl = (bj - bk)
266- let bm = (bk - bj)
267- let bn = (fraction(bl, b, bk) * 100)
268- let bo = fraction(bj, b, bk)
269- let aW = value(assetInfo(aq)).quantity
270- let aY = (aW - assetBalance(aj, aq))
271- $Tuple2(nil, [aZ, bg, bh, bi, bj, bk, bl, bn, bo, aY, aW])
207+
208+
209+@Callable(aG)
210+func calcSwapLimitMATH (aK) = {
211+ let aL = toBigInt(3)
212+ let aM = V(aK, l)
213+ let aN = pow(aM, 16, k, 16, 8, CEILING)
214+ let aO = fraction(aL, aN, n)
215+ $Tuple2(nil, toInt(aO))
272216 }
273217
274218
275219
276-@Callable(ar)
277-func getUnstakeComissionAmountMATH (R,bp) = {
278- let bq = O(am, J())
279- $Tuple2(nil, fraction(R, pow(2, 0, fraction(-((height - bp)), e, bq), 8, 8, HALFUP), e))
220+@Callable(aG)
221+func calculateKMATH (aP,aQ,T,aR,aS) = {
222+ let aT = toBigInt(2718281)
223+ let aU = 6
224+ let aV = valueOrElse(getInteger(ak, "nsbtCurveParam_a"), 3)
225+ let aW = valueOrElse(getInteger(ak, "nsbtCurveParam_b"), ((3 * b) / 10))
226+ let aX = U(aP, T)
227+ let aY = fraction(aX, e, aQ)
228+ if ((aY > 10678564816))
229+ then throw("BR > 10678.564816% will overflow exponent")
230+ else {
231+ let aZ = (aV * (aY - e))
232+ let ba = pow(aT, aU, toBigInt(aZ), g, h, DOWN)
233+ let az = fraction(toBigInt(aW), ba, c)
234+ $Tuple2(nil, [aV, aW, aX, aY, aZ, toString(ba), toString(az)])
235+ }
280236 }
281237
282238
283239
284-@Callable(ar)
285-func mergeStakesMATH (br,bs,bt,bu) = {
286- let bq = O(am, J())
287- let bv = fraction(bt, pow(2, 0, fraction((bu - bs), e, bq), 8, 8, HALFUP), e)
288- let bw = fraction((br + bt), e, (br + bv))
289- $Tuple2(nil, (bs + ((j - (bq * log(bw, 8, 2, 0, 8, HALFUP))) / e)))
240+@Callable(aG)
241+func curveFunctionMATH (aP,aQ,T,aR,aS,bb) = {
242+ let ay = ab(invoke(this, "calculateKMATH", [aP, aQ, T, aR, aS], nil))
243+ if ((ay == ay))
244+ then {
245+ let az = parseBigIntValue(ag(ay[6]))
246+ let bc = U(bb, T)
247+ let bd = toBigInt(aR)
248+ let be = toBigInt((aR - aS))
249+ let bf = fraction(toBigInt(bc), f, az)
250+ let bg = fraction(bf, be, bd)
251+ let bh = toInt(fraction(be, bd, (bg + bd)))
252+ let bi = ((aR - aS) - bh)
253+ $Tuple2(nil, [bi, bc, aP, aQ, aR, aS, ae(ay[0]), ae(ay[1]), ae(ay[2]), T, ae(ay[3]), ae(ay[4]), ay[5], ay[6], toString(bf), toString(bg), bh])
254+ }
255+ else throw("Strict value is not equal to itself.")
256+ }
257+
258+
259+
260+@Callable(aG)
261+func calcContractNsbtPriceMATH () = as(unit)
262+
263+
264+
265+@Callable(aG)
266+func calcContractNsbtPriceBySupplyMATH (aw) = as(aw)
267+
268+
269+
270+@Callable(aG)
271+func calcUserSwapLimitsMATH (bj) = {
272+ let ax = getIntegerValue(aj, I())
273+ let bk = valueOrElse(getInteger(an, K(bj)), 0)
274+ let bl = ae(invoke(this, "calcSwapLimitMATH", [bk], nil))
275+ if ((bl == bl))
276+ then {
277+ let bm = P(ai, E())
278+ let bn = valueOrElse(getInteger(ai, F(bj)), 0)
279+ let bo = ((height - bn) > bm)
280+ let bp = if (bo)
281+ then 0
282+ else valueOrElse(getInteger(ai, H(bj)), 0)
283+ let bq = if (bo)
284+ then 0
285+ else (bm - (height - bn))
286+ let br = R(bl, ax)
287+ $Tuple2(nil, [bl, bp, bq, br])
288+ }
289+ else throw("Strict value is not equal to itself.")
290+ }
291+
292+
293+
294+@Callable(aG)
295+func calcNeutinoMetricsMATH () = {
296+ let ax = getIntegerValue(aj, I())
297+ let bs = valueOrElse(getInteger(ai, y()), 0)
298+ let bt = valueOrElse(getInteger(ai, x()), 0)
299+ let bu = (wavesBalance(ai).regular - bt)
300+ let bv = U(bu, ax)
301+ let bw = (((bs + value(assetInfo(ap)).quantity) - assetBalance(ai, ap)) - assetBalance(addressFromStringValue(al), ap))
302+ let bx = (bv - bw)
303+ let by = (bw - bv)
304+ let bz = if ((bw == 0))
305+ then 0
306+ else (fraction(bx, b, bw) * 100)
307+ let bA = if ((bw == 0))
308+ then 0
309+ else fraction(bv, b, bw)
310+ let au = value(assetInfo(ar)).quantity
311+ let aw = (au - assetBalance(ak, ar))
312+ $Tuple2(nil, [ax, bs, bt, bu, bv, bw, bx, bz, bA, aw, au])
313+ }
314+
315+
316+
317+@Callable(aG)
318+func getUnstakeComissionAmountMATH (S,bB) = {
319+ let bC = O(an, J())
320+ $Tuple2(nil, fraction(S, pow(2, 0, fraction(-((height - bB)), e, bC), 8, 8, HALFUP), e))
321+ }
322+
323+
324+
325+@Callable(aG)
326+func mergeStakesMATH (bD,bE,bF,bG) = {
327+ let bC = O(an, J())
328+ let bH = fraction(bF, pow(2, 0, fraction((bG - bE), e, bC), 8, 8, HALFUP), e)
329+ let bI = fraction((bD + bF), e, (bD + bH))
330+ $Tuple2(nil, (bE + ((j - (bC * log(bI, 8, 2, 0, 8, HALFUP))) / e)))
290331 }
291332
292333

github/deemru/w8io/026f985 
64.87 ms