tx · EkWofM7H9gSdyB5iJ23Ggehz56Ynq5muvPrziavS3A5T

3NCirkt9JEVbGqQbZ8EV4GwPEA9WtrtvTf7:  -0.04100000 Waves

2023.05.04 13:44 [2562907] smart account 3NCirkt9JEVbGqQbZ8EV4GwPEA9WtrtvTf7 > SELF 0.00000000 Waves

{ "type": 13, "id": "EkWofM7H9gSdyB5iJ23Ggehz56Ynq5muvPrziavS3A5T", "fee": 4100000, "feeAssetId": null, "timestamp": 1683197058776, "version": 2, "chainId": 84, "sender": "3NCirkt9JEVbGqQbZ8EV4GwPEA9WtrtvTf7", "senderPublicKey": "39d34gHEFix6mHDrcvRHQSCi92XfGvi2DUZrsezx8yNz", "proofs": [ "3EGp9CpA8Jhji9oEAz4fMGWwsa4zHSEY6JKj7ECZBpuzsKdATpS7StpVddughg3RsdBdqWLZsuH6wWpLDhs6K6Zn" ], "script": "base64:BgLELAgCEgUKAwEEARIHCgUBBAEIARIDCgEIEgMKAQgSABIECgIBBBIECgIBBBIDCgEBEgASBAoCCAESABIECgIIARIECgIIARIECgIBARIDCgEBEgUKAwEBARIFCgMBCAESBAoCAQgSBAoCAQgSBAoCCAgSABIDCgEIEgUKAwEBARIECgIIARIECgIBARIECgIICBILCgkIAQECAQIIBAQSBgoECAgBCBIAIgZzY2FsZTgiDHNjYWxlOEJpZ0ludCIHc2NhbGUxOCIKemVyb0JpZ0ludCIEYmlnMCIEYmlnMSIEYmlnMiIEYmlnMyIEYmlnNCIKc2xpcHBhZ2U0RCILd2F2ZXNTdHJpbmciCmFtcEluaXRpYWwiBUFtdWx0IgVEY29udiIDU0VQIgVFTVBUWSIKUG9vbEFjdGl2ZSIKUG9vbFB1dERpcyIOUG9vbE1hdGNoZXJEaXMiDFBvb2xTaHV0ZG93biIOaWR4UG9vbEFkZHJlc3MiCWlkeFBvb2xTdCIJaWR4TFBBc0lkIglpZHhBbUFzSWQiCWlkeFByQXNJZCILaWR4QW10QXNEY20iDWlkeFByaWNlQXNEY20iC2lkeElBbX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Aml5BnByb29mcwAABQJpQUYtd+g=", "height": 2562907, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: none Next: none Full:
OldNewDifferences
1-# no script
1+{-# STDLIB_VERSION 6 #-}
2+{-# SCRIPT_TYPE ACCOUNT #-}
3+{-# CONTENT_TYPE DAPP #-}
4+let scale8 = 100000000
5+
6+let scale8BigInt = toBigInt(100000000)
7+
8+let scale18 = toBigInt(1000000000000000000)
9+
10+let zeroBigInt = toBigInt(0)
11+
12+let big0 = toBigInt(0)
13+
14+let big1 = toBigInt(1)
15+
16+let big2 = toBigInt(2)
17+
18+let big3 = toBigInt(3)
19+
20+let big4 = toBigInt(4)
21+
22+let slippage4D = toBigInt((scale8 - ((scale8 * 1) / scale8)))
23+
24+let wavesString = "WAVES"
25+
26+let ampInitial = 50
27+
28+let Amult = "100"
29+
30+let Dconv = "1"
31+
32+let SEP = "__"
33+
34+let EMPTY = ""
35+
36+let PoolActive = 1
37+
38+let PoolPutDis = 2
39+
40+let PoolMatcherDis = 3
41+
42+let PoolShutdown = 4
43+
44+let idxPoolAddress = 1
45+
46+let idxPoolSt = 2
47+
48+let idxLPAsId = 3
49+
50+let idxAmAsId = 4
51+
52+let idxPrAsId = 5
53+
54+let idxAmtAsDcm = 6
55+
56+let idxPriceAsDcm = 7
57+
58+let idxIAmtAsId = 8
59+
60+let idxIPriceAsId = 9
61+
62+let idxFactStakCntr = 1
63+
64+let idxFactoryRestCntr = 6
65+
66+let idxFactSlippCntr = 7
67+
68+let idxFactGwxRewCntr = 10
69+
70+let feeDefault = fraction(10, scale8, 10000)
71+
72+func t1 (origVal,origScaleMult) = fraction(toBigInt(origVal), scale18, toBigInt(origScaleMult))
73+
74+
75+func t1BigInt (origVal,origScaleMult) = fraction(origVal, scale18, origScaleMult)
76+
77+
78+func f1 (val,resultScaleMult) = toInt(fraction(val, toBigInt(resultScaleMult), scale18))
79+
80+
81+func fromX18Round (val,resultScaleMult,round) = toInt(fraction(val, toBigInt(resultScaleMult), scale18, round))
82+
83+
84+func t2 (origVal,origScaleMult) = fraction(origVal, scale18, toBigInt(origScaleMult))
85+
86+
87+func f2 (val,resultScaleMult) = fraction(val, toBigInt(resultScaleMult), scale18)
88+
89+
90+func ts (amt,resScale,curScale) = fraction(amt, resScale, curScale)
91+
92+
93+func abs (val) = if ((zeroBigInt > val))
94+ then -(val)
95+ else val
96+
97+
98+func absBigInt (val) = if ((zeroBigInt > val))
99+ then -(val)
100+ else val
101+
102+
103+func fc () = "%s__factoryContract"
104+
105+
106+func mpk () = "%s__managerPublicKey"
107+
108+
109+func pmpk () = "%s__pendingManagerPublicKey"
110+
111+
112+func pl () = "%s%s__price__last"
113+
114+
115+func ph (h,t) = makeString(["%s%s%d%d__price__history", toString(h), toString(t)], SEP)
116+
117+
118+func pau (ua,txId) = ((("%s%s%s__P__" + ua) + "__") + txId)
119+
120+
121+func gau (ua,txId) = ((("%s%s%s__G__" + ua) + "__") + txId)
122+
123+
124+func aa () = "%s__amountAsset"
125+
126+
127+func pa () = "%s__priceAsset"
128+
129+
130+func amp () = "%s__amp"
131+
132+
133+func keyAmpHistory (heightBlocks) = ("%s%d__amp__" + toString(heightBlocks))
134+
135+
136+func keyChangeAmpLastCall () = "%s__changeAmpLastCall"
137+
138+
139+let keyFee = "%s__fee"
140+
141+let fee = valueOrElse(getInteger(this, keyFee), feeDefault)
142+
143+let keyDLp = makeString(["%s", "dLp"], SEP)
144+
145+let keyDLpRefreshedHeight = makeString(["%s", "dLpRefreshedHeight"], SEP)
146+
147+let keyDLpRefreshDelay = makeString(["%s", "refreshDLpDelay"], SEP)
148+
149+let dLpRefreshDelayDefault = 30
150+
151+let dLpRefreshDelay = valueOrElse(getInteger(this, keyDLpRefreshDelay), dLpRefreshDelayDefault)
152+
153+func fcfg () = "%s__factoryConfig"
154+
155+
156+func mtpk () = "%s%s__matcher__publicKey"
157+
158+
159+func pc (iAmtAs,iPrAs) = (((("%d%d%s__" + iAmtAs) + "__") + iPrAs) + "__config")
160+
161+
162+func mba (bAStr) = ("%s%s%s__mappings__baseAsset2internalId__" + bAStr)
163+
164+
165+func aps () = "%s__shutdown"
166+
167+
168+func keyAllowedLpStableScriptHash () = "%s__allowedLpStableScriptHash"
169+
170+
171+func keyFeeCollectorAddress () = "%s__feeCollectorAddress"
172+
173+
174+func keySkipOrderValidation (poolAddress) = ("%s%s__skipOrderValidation__" + poolAddress)
175+
176+
177+func throwOrderError (orderValid,orderValidInfo,senderValid,matcherValid) = throw((((((((("order validation failed: orderValid=" + toString(orderValid)) + " (") + orderValidInfo) + ")") + " senderValid=") + toString(senderValid)) + " matcherValid=") + toString(matcherValid)))
178+
179+
180+func strf (addr,key) = valueOrErrorMessage(getString(addr, key), makeString(["mandatory ", toString(addr), ".", key, " not defined"], ""))
181+
182+
183+func intf (addr,key) = valueOrErrorMessage(getInteger(addr, key), makeString(["mandatory ", toString(addr), ".", key, " not defined"], ""))
184+
185+
186+func throwErr (msg) = throw(makeString(["lp_stable.ride:", msg], " "))
187+
188+
189+func fmtErr (msg) = makeString(["lp_stable.ride:", msg], " ")
190+
191+
192+let fca = addressFromStringValue(strf(this, fc()))
193+
194+let inFee = {
195+ let @ = invoke(fca, "getInFeeREADONLY", [toString(this)], nil)
196+ if ($isInstanceOf(@, "Int"))
197+ then @
198+ else throw(($getType(@) + " couldn't be cast to Int"))
199+ }
200+
201+let outFee = {
202+ let @ = invoke(fca, "getOutFeeREADONLY", [toString(this)], nil)
203+ if ($isInstanceOf(@, "Int"))
204+ then @
205+ else throw(($getType(@) + " couldn't be cast to Int"))
206+ }
207+
208+let A = strf(this, amp())
209+
210+func igs () = valueOrElse(getBoolean(fca, aps()), false)
211+
212+
213+func mp () = fromBase58String(strf(fca, mtpk()))
214+
215+
216+let feeCollectorAddress = addressFromStringValue(strf(fca, keyFeeCollectorAddress()))
217+
218+func gpc () = {
219+ let amtAs = strf(this, aa())
220+ let priceAs = strf(this, pa())
221+ let iPriceAs = intf(fca, mba(priceAs))
222+ let iAmtAs = intf(fca, mba(amtAs))
223+ split(strf(fca, pc(toString(iAmtAs), toString(iPriceAs))), SEP)
224+ }
225+
226+
227+func parseAssetId (input) = if ((input == wavesString))
228+ then unit
229+ else fromBase58String(input)
230+
231+
232+func assetIdToString (input) = if ((input == unit))
233+ then wavesString
234+ else toBase58String(value(input))
235+
236+
237+func parsePoolConfig (poolConfig) = $Tuple9(addressFromStringValue(poolConfig[idxPoolAddress]), parseIntValue(poolConfig[idxPoolSt]), fromBase58String(poolConfig[idxLPAsId]), parseAssetId(poolConfig[idxAmAsId]), parseAssetId(poolConfig[idxPrAsId]), parseIntValue(poolConfig[idxAmtAsDcm]), parseIntValue(poolConfig[idxPriceAsDcm]), fromBase58String(poolConfig[idxIAmtAsId]), fromBase58String(poolConfig[idxIPriceAsId]))
238+
239+
240+let poolConfigParsed = parsePoolConfig(gpc())
241+
242+let $t081858414 = poolConfigParsed
243+
244+let cfgPoolAddress = $t081858414._1
245+
246+let cfgPoolStatus = $t081858414._2
247+
248+let cfgLpAssetId = $t081858414._3
249+
250+let cfgAmountAssetId = $t081858414._4
251+
252+let cfgPriceAssetId = $t081858414._5
253+
254+let cfgAmountAssetDecimals = $t081858414._6
255+
256+let cfgPriceAssetDecimals = $t081858414._7
257+
258+let cfgInAmountAssedId = $t081858414._8
259+
260+let cfgInPriceAssetId = $t081858414._9
261+
262+func gfc () = split(strf(fca, fcfg()), SEP)
263+
264+
265+let factoryConfig = gfc()
266+
267+let stakingContract = valueOrErrorMessage(addressFromString(factoryConfig[idxFactStakCntr]), "Invalid staking contract address")
268+
269+let slipageContract = valueOrErrorMessage(addressFromString(factoryConfig[idxFactSlippCntr]), "Invalid slipage contract address")
270+
271+let gwxContract = valueOrErrorMessage(addressFromString(factoryConfig[idxFactGwxRewCntr]), "Invalid gwx contract address")
272+
273+let restContract = valueOrErrorMessage(addressFromString(factoryConfig[idxFactoryRestCntr]), "Invalid gwx contract address")
274+
275+func dataPutActionInfo (inAmtAssetAmt,inPriceAssetAmt,outLpAmt,price,slipByUser,slippageReal,txHeight,txTimestamp,slipageAmAmt,slipagePrAmt) = makeString(["%d%d%d%d%d%d%d%d%d%d", toString(inAmtAssetAmt), toString(inPriceAssetAmt), toString(outLpAmt), toString(price), toString(slipByUser), toString(slippageReal), toString(txHeight), toString(txTimestamp), toString(slipageAmAmt), toString(slipagePrAmt)], SEP)
276+
277+
278+func dataGetActionInfo (outAmtAssetAmt,outPriceAssetAmt,inLpAmt,price,txHeight,txTimestamp) = makeString(["%d%d%d%d%d%d", toString(outAmtAssetAmt), toString(outPriceAssetAmt), toString(inLpAmt), toString(price), toString(txHeight), toString(txTimestamp)], SEP)
279+
280+
281+func getAccBalance (assetId) = if ((assetId == "WAVES"))
282+ then wavesBalance(this).available
283+ else assetBalance(this, fromBase58String(assetId))
284+
285+
286+func cpbi (prAmtX18,amAmtX18) = fraction(prAmtX18, scale18, amAmtX18)
287+
288+
289+func cpbir (prAmtX18,amAmtX18,round) = fraction(prAmtX18, scale18, amAmtX18, round)
290+
291+
292+func vad (A1,A2,slippage) = {
293+ let diff = fraction((A1 - A2), scale8BigInt, A2)
294+ let pass = ((slippage - abs(diff)) > zeroBigInt)
295+ if (!(pass))
296+ then throw(("Big slpg: " + toString(diff)))
297+ else $Tuple2(pass, min([A1, A2]))
298+ }
299+
300+
301+func vd (D1,D0,slpg) = {
302+ let diff = fraction(D0, scale8BigInt, D1)
303+ let fail = (slpg > diff)
304+ if (if (fail)
305+ then true
306+ else (D0 > D1))
307+ then throw(((((((toString(D0) + " ") + toString(D1)) + " ") + toString(diff)) + " ") + toString(slpg)))
308+ else fail
309+ }
310+
311+
312+func pcp (amAssetDcm,prAssetDcm,amAmt,prAmt) = {
313+ let amtAsAmtX18 = t1(amAmt, amAssetDcm)
314+ let prAsAmtX18 = t1(prAmt, prAssetDcm)
315+ cpbi(prAsAmtX18, amtAsAmtX18)
316+ }
317+
318+
319+func calcPrices (amAmt,prAmt,lpAmt) = {
320+ let amtAsDcm = cfgAmountAssetDecimals
321+ let prAsDcm = cfgPriceAssetDecimals
322+ let priceX18 = pcp(amtAsDcm, prAsDcm, amAmt, prAmt)
323+ let amAmtX18 = t1(amAmt, amtAsDcm)
324+ let prAmtX18 = t1(prAmt, prAsDcm)
325+ let lpAmtX18 = t1(lpAmt, scale8)
326+ let lpPrInAmAsX18 = cpbi(amAmtX18, lpAmtX18)
327+ let lpPrInPrAsX18 = cpbi(prAmtX18, lpAmtX18)
328+[priceX18, lpPrInAmAsX18, lpPrInPrAsX18]
329+ }
330+
331+
332+func calculatePrices (amAmt,prAmt,lpAmt) = {
333+ let p = calcPrices(amAmt, prAmt, lpAmt)
334+[f1(p[0], scale8), f1(p[1], scale8), f1(p[2], scale8)]
335+ }
336+
337+
338+func takeFee (amount,fee) = {
339+ let feeAmount = if ((fee == 0))
340+ then 0
341+ else fraction(amount, fee, scale8)
342+ $Tuple2((amount - feeAmount), feeAmount)
343+ }
344+
345+
346+func getD (xp) = {
347+ let xp0 = xp[0]
348+ let xp1 = xp[1]
349+ let s = (xp0 + xp1)
350+ if ((s == big0))
351+ then big0
352+ else {
353+ let a = parseIntValue(A)
354+ let ann = (a * 2)
355+ let p = fraction(xp0, xp1, big1)
356+ let xp0_xp1_n_n = fraction(p, big4, big1)
357+ let ann_s = fraction(toBigInt(ann), s, big1)
358+ let ann_1 = toBigInt((ann - 1))
359+ func calcDNext (d) = {
360+ let dd = fraction(d, d, big1)
361+ let ddd = fraction(dd, d, big1)
362+ let dp = fraction(ddd, big1, xp0_xp1_n_n)
363+ fraction((ann_s + fraction(dp, big2, big1)), d, (fraction(ann_1, d, big1) + fraction(big3, dp, big1)))
364+ }
365+
366+ func calc (acc,i) = if (acc._2)
367+ then acc
368+ else {
369+ let d = acc._1
370+ let dNext = calcDNext(d)
371+ let dDiffRaw = (dNext - value(d))
372+ let dDiff = if ((big0 > dDiffRaw))
373+ then -(dDiffRaw)
374+ else dDiffRaw
375+ if ((big1 >= dDiff))
376+ then $Tuple2(dNext, true)
377+ else $Tuple2(dNext, false)
378+ }
379+
380+ let arr = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16]
381+ let $t01291912967 = {
382+ let $l = arr
383+ let $s = size($l)
384+ let $acc0 = $Tuple2(s, false)
385+ func $f0_1 ($a,$i) = if (($i >= $s))
386+ then $a
387+ else calc($a, $l[$i])
388+
389+ func $f0_2 ($a,$i) = if (($i >= $s))
390+ then $a
391+ else throw("List size exceeds 17")
392+
393+ $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17)
394+ }
395+ let d = $t01291912967._1
396+ let found = $t01291912967._2
397+ if (found)
398+ then d
399+ else throw(("D calculation error, D = " + toString(d)))
400+ }
401+ }
402+
403+
404+func ego (txId58,pmtAssetId,pmtLpAmt,userAddress) = {
405+ let lpId = cfgLpAssetId
406+ let amId = toBase58String(value(cfgAmountAssetId))
407+ let prId = toBase58String(value(cfgPriceAssetId))
408+ let amDcm = cfgAmountAssetDecimals
409+ let prDcm = cfgPriceAssetDecimals
410+ let sts = toString(cfgPoolStatus)
411+ let lpEmiss = valueOrErrorMessage(assetInfo(lpId), "Wrong LP id").quantity
412+ if ((toBase58String(lpId) != pmtAssetId))
413+ then throw("Wrong pmt asset")
414+ else {
415+ let amBalance = getAccBalance(amId)
416+ let amBalanceX18 = t1(amBalance, amDcm)
417+ let prBalance = getAccBalance(prId)
418+ let prBalanceX18 = t1(prBalance, prDcm)
419+ let curPriceX18 = cpbi(prBalanceX18, amBalanceX18)
420+ let curPrice = f1(curPriceX18, scale8)
421+ let pmtLpAmtX18 = t1(pmtLpAmt, scale8)
422+ let lpEmissX18 = t1(lpEmiss, scale8)
423+ let outAmAmtX18 = fraction(amBalanceX18, pmtLpAmtX18, lpEmissX18)
424+ let outPrAmtX18 = fraction(prBalanceX18, pmtLpAmtX18, lpEmissX18)
425+ let outAmAmt = fromX18Round(outAmAmtX18, amDcm, FLOOR)
426+ let outPrAmt = fromX18Round(outPrAmtX18, prDcm, FLOOR)
427+ let state = if ((txId58 == ""))
428+ then nil
429+ else [ScriptTransfer(userAddress, outAmAmt, if ((amId == "WAVES"))
430+ then unit
431+ else fromBase58String(amId)), ScriptTransfer(userAddress, outPrAmt, if ((prId == "WAVES"))
432+ then unit
433+ else fromBase58String(prId)), StringEntry(gau(toString(userAddress), txId58), dataGetActionInfo(outAmAmt, outPrAmt, pmtLpAmt, curPrice, height, lastBlock.timestamp)), IntegerEntry(pl(), curPrice), IntegerEntry(ph(height, lastBlock.timestamp), curPrice)]
434+ $Tuple10(outAmAmt, outPrAmt, amId, prId, amBalance, prBalance, lpEmiss, curPriceX18, sts, state)
435+ }
436+ }
437+
438+
439+func epo (txId58,slippage,inAmAmt,inAmId,inPrAmt,inPrId,userAddress,isEval,emitLp,isOneAsset,validateSlippage,pmtAmt,pmtId) = {
440+ let lpId = cfgLpAssetId
441+ let amIdStr = toBase58String(value(cfgAmountAssetId))
442+ let prIdStr = toBase58String(value(cfgPriceAssetId))
443+ let inAmIdStr = cfgInAmountAssedId
444+ let inPrIdStr = cfgInPriceAssetId
445+ let amtDcm = cfgAmountAssetDecimals
446+ let priceDcm = cfgPriceAssetDecimals
447+ let sts = toString(cfgPoolStatus)
448+ let lpEm = valueOrErrorMessage(assetInfo(lpId), "Wr lp as").quantity
449+ let amBalance = if (isEval)
450+ then getAccBalance(amIdStr)
451+ else if (if (isOneAsset)
452+ then (pmtId == amIdStr)
453+ else false)
454+ then (getAccBalance(amIdStr) - pmtAmt)
455+ else if (isOneAsset)
456+ then getAccBalance(amIdStr)
457+ else (getAccBalance(amIdStr) - inAmAmt)
458+ let prBalance = if (isEval)
459+ then getAccBalance(prIdStr)
460+ else if (if (isOneAsset)
461+ then (pmtId == prIdStr)
462+ else false)
463+ then (getAccBalance(prIdStr) - pmtAmt)
464+ else if (isOneAsset)
465+ then getAccBalance(prIdStr)
466+ else (getAccBalance(prIdStr) - inPrAmt)
467+ let inAmAssetAmtX18 = t1(inAmAmt, amtDcm)
468+ let inPrAssetAmtX18 = t1(inPrAmt, priceDcm)
469+ let userPriceX18 = cpbi(inPrAssetAmtX18, inAmAssetAmtX18)
470+ let amBalanceX18 = t1(amBalance, amtDcm)
471+ let prBalanceX18 = t1(prBalance, priceDcm)
472+ let D0 = getD([amBalanceX18, prBalanceX18])
473+ let r = if ((lpEm == 0))
474+ then {
475+ let D1 = getD([(amBalanceX18 + inAmAssetAmtX18), (prBalanceX18 + inPrAssetAmtX18)])
476+ let checkD = if ((D1 > D0))
477+ then true
478+ else throw("D1 should be greater than D0")
479+ if ((checkD == checkD))
480+ then {
481+ let curPriceX18 = zeroBigInt
482+ let slippageX18 = zeroBigInt
483+ let lpAmtX18 = D1
484+ $Tuple5(f1(lpAmtX18, scale8), f1(inAmAssetAmtX18, amtDcm), f1(inPrAssetAmtX18, priceDcm), cpbi((prBalanceX18 + inPrAssetAmtX18), (amBalanceX18 + inAmAssetAmtX18)), slippageX18)
485+ }
486+ else throw("Strict value is not equal to itself.")
487+ }
488+ else {
489+ let curPriceX18 = cpbi(prBalanceX18, amBalanceX18)
490+ let slippageRealX18 = fraction(abs((curPriceX18 - userPriceX18)), scale18, curPriceX18)
491+ let slippageX18 = t1(slippage, scale8)
492+ if (if (if (validateSlippage)
493+ then (curPriceX18 != zeroBigInt)
494+ else false)
495+ then (slippageRealX18 > slippageX18)
496+ else false)
497+ then throw(((("Price slippage " + toString(slippageRealX18)) + " > ") + toString(slippageX18)))
498+ else {
499+ let lpEmissionX18 = t1(lpEm, scale8)
500+ let prViaAmX18 = fraction(inAmAssetAmtX18, cpbir(prBalanceX18, amBalanceX18, CEILING), scale18, CEILING)
501+ let amViaPrX18 = fraction(inPrAssetAmtX18, scale18, cpbir(prBalanceX18, amBalanceX18, FLOOR), CEILING)
502+ let expectedAmts = if ((prViaAmX18 > inPrAssetAmtX18))
503+ then $Tuple2(amViaPrX18, inPrAssetAmtX18)
504+ else $Tuple2(inAmAssetAmtX18, prViaAmX18)
505+ let expAmtAssetAmtX18 = expectedAmts._1
506+ let expPriceAssetAmtX18 = expectedAmts._2
507+ let D1 = getD([(amBalanceX18 + expAmtAssetAmtX18), (prBalanceX18 + expPriceAssetAmtX18)])
508+ let checkD = if ((D1 > D0))
509+ then true
510+ else throw("D1 should be greater than D0")
511+ if ((checkD == checkD))
512+ then {
513+ let lpAmtX18 = fraction(lpEmissionX18, (D1 - D0), D0)
514+ $Tuple5(fromX18Round(lpAmtX18, scale8, FLOOR), fromX18Round(expAmtAssetAmtX18, amtDcm, CEILING), fromX18Round(expPriceAssetAmtX18, priceDcm, CEILING), curPriceX18, slippageX18)
515+ }
516+ else throw("Strict value is not equal to itself.")
517+ }
518+ }
519+ let calcLpAmt = r._1
520+ let calcAmAssetPmt = r._2
521+ let calcPrAssetPmt = r._3
522+ let curPrice = f1(r._4, scale8)
523+ let slippageCalc = f1(r._5, scale8)
524+ if ((0 >= calcLpAmt))
525+ then throw("LP <= 0")
526+ else {
527+ let emitLpAmt = if (!(emitLp))
528+ then 0
529+ else calcLpAmt
530+ let amDiff = (inAmAmt - calcAmAssetPmt)
531+ let prDiff = (inPrAmt - calcPrAssetPmt)
532+ let $t02080621151 = if (if (isOneAsset)
533+ then (pmtId == amIdStr)
534+ else false)
535+ then $Tuple2(pmtAmt, 0)
536+ else if (if (isOneAsset)
537+ then (pmtId == prIdStr)
538+ else false)
539+ then $Tuple2(0, pmtAmt)
540+ else $Tuple2(calcAmAssetPmt, calcPrAssetPmt)
541+ let writeAmAmt = $t02080621151._1
542+ let writePrAmt = $t02080621151._2
543+ let commonState = [IntegerEntry(pl(), curPrice), IntegerEntry(ph(height, lastBlock.timestamp), curPrice), StringEntry(pau(userAddress, txId58), dataPutActionInfo(writeAmAmt, writePrAmt, emitLpAmt, curPrice, slippage, slippageCalc, height, lastBlock.timestamp, amDiff, prDiff))]
544+ $Tuple13(calcLpAmt, emitLpAmt, curPrice, amBalance, prBalance, lpEm, lpId, sts, commonState, amDiff, prDiff, inAmId, inPrId)
545+ }
546+ }
547+
548+
549+func getYD (xp,i,D) = {
550+ let n = big2
551+ let x = xp[if ((i == 0))
552+ then 1
553+ else 0]
554+ let aPrecision = parseBigIntValue(Amult)
555+ let a = (parseBigIntValue(A) * aPrecision)
556+ let s = x
557+ let ann = (a * n)
558+ let c = (((((D * D) / (x * n)) * D) * aPrecision) / (ann * n))
559+ let b = ((s + ((D * aPrecision) / ann)) - D)
560+ func calc (acc,cur) = {
561+ let $t02234622366 = acc
562+ let y = $t02234622366._1
563+ let found = $t02234622366._2
564+ if ((found != unit))
565+ then acc
566+ else {
567+ let yNext = (((y * y) + c) / ((big2 * y) + b))
568+ let yDiff = absBigInt((yNext - value(y)))
569+ if ((big1 >= yDiff))
570+ then $Tuple2(yNext, cur)
571+ else $Tuple2(yNext, unit)
572+ }
573+ }
574+
575+ let arr = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
576+ let $t02267322720 = {
577+ let $l = arr
578+ let $s = size($l)
579+ let $acc0 = $Tuple2(D, unit)
580+ func $f0_1 ($a,$i) = if (($i >= $s))
581+ then $a
582+ else calc($a, $l[$i])
583+
584+ func $f0_2 ($a,$i) = if (($i >= $s))
585+ then $a
586+ else throw("List size exceeds 15")
587+
588+ $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15)
589+ }
590+ let y = $t02267322720._1
591+ let found = $t02267322720._2
592+ if ((found != unit))
593+ then y
594+ else throw(("Y calculation error, Y = " + toString(y)))
595+ }
596+
597+
598+func calcDLp (amountBalance,priceBalance,lpEmission) = {
599+ let updatedDLp = fraction(getD([t1BigInt(amountBalance, toBigInt(cfgAmountAssetDecimals)), t1BigInt(priceBalance, toBigInt(cfgPriceAssetDecimals))]), scale18, lpEmission)
600+ if ((lpEmission == big0))
601+ then big0
602+ else updatedDLp
603+ }
604+
605+
606+func calcCurrentDLp (amountAssetDelta,priceAssetDelta,lpAssetEmissionDelta) = {
607+ let amountAssetBalance = (toBigInt(getAccBalance(assetIdToString(cfgAmountAssetId))) - amountAssetDelta)
608+ let priceAssetBalance = (toBigInt(getAccBalance(assetIdToString(cfgPriceAssetId))) - priceAssetDelta)
609+ let lpAssetEmission = (toBigInt(value(assetInfo(cfgLpAssetId)).quantity) - lpAssetEmissionDelta)
610+ let currentDLp = calcDLp(amountAssetBalance, priceAssetBalance, lpAssetEmission)
611+ currentDLp
612+ }
613+
614+
615+func refreshDLpInternal (amountAssetBalanceDelta,priceAssetBalanceDelta,lpAssetEmissionDelta) = {
616+ let amountAssetBalance = (getAccBalance(assetIdToString(cfgAmountAssetId)) + amountAssetBalanceDelta)
617+ let priceAssetBalance = (getAccBalance(assetIdToString(cfgPriceAssetId)) + priceAssetBalanceDelta)
618+ let lpAssetEmission = (value(assetInfo(cfgLpAssetId)).quantity + lpAssetEmissionDelta)
619+ let updatedDLp = calcDLp(toBigInt(amountAssetBalance), toBigInt(priceAssetBalance), toBigInt(lpAssetEmission))
620+ let actions = [IntegerEntry(keyDLpRefreshedHeight, height), StringEntry(keyDLp, toString(updatedDLp))]
621+ $Tuple2(actions, updatedDLp)
622+ }
623+
624+
625+func validateUpdatedDLp (oldDLp,updatedDLp) = if ((updatedDLp >= oldDLp))
626+ then true
627+ else throwErr("updated DLp lower than current DLp")
628+
629+
630+func validateMatcherOrderAllowed (order) = {
631+ let amountAssetBalance = getAccBalance(assetIdToString(cfgAmountAssetId))
632+ let priceAssetBalance = getAccBalance(assetIdToString(cfgPriceAssetId))
633+ let amountAssetAmount = order.amount
634+ let priceAssetAmount = fraction(order.amount, order.price, scale8, FLOOR)
635+ let $t02491825130 = if ((order.orderType == Buy))
636+ then $Tuple2(amountAssetAmount, -(priceAssetAmount))
637+ else $Tuple2(-(amountAssetAmount), priceAssetAmount)
638+ let amountAssetBalanceDelta = $t02491825130._1
639+ let priceAssetBalanceDelta = $t02491825130._2
640+ if (if (if (igs())
641+ then true
642+ else (cfgPoolStatus == PoolMatcherDis))
643+ then true
644+ else (cfgPoolStatus == PoolShutdown))
645+ then throw("Admin blocked")
646+ else if (if ((order.assetPair.amountAsset != cfgAmountAssetId))
647+ then true
648+ else (order.assetPair.priceAsset != cfgPriceAssetId))
649+ then throw("Wr assets")
650+ else {
651+ let dLp = parseBigIntValue(valueOrElse(getString(this, keyDLp), "0"))
652+ let $t02547225572 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
653+ let unusedActions = $t02547225572._1
654+ let dLpNew = $t02547225572._2
655+ let isOrderValid = (dLpNew >= dLp)
656+ let info = makeString(["dLp=", toString(dLp), " dLpNew=", toString(dLpNew), " amountAssetBalance=", toString(amountAssetBalance), " priceAssetBalance=", toString(priceAssetBalance), " amountAssetBalanceDelta=", toString(amountAssetBalanceDelta), " priceAssetBalanceDelta=", toString(priceAssetBalanceDelta), " height=", toString(height)], "")
657+ $Tuple2(isOrderValid, info)
658+ }
659+ }
660+
661+
662+func cg (i) = if ((size(i.payments) != 1))
663+ then throw("1 pmnt exp")
664+ else {
665+ let pmt = value(i.payments[0])
666+ let pmtAssetId = value(pmt.assetId)
667+ let pmtAmt = pmt.amount
668+ let r = ego(toBase58String(i.transactionId), toBase58String(pmtAssetId), pmtAmt, i.caller)
669+ let outAmAmt = r._1
670+ let outPrAmt = r._2
671+ let sts = parseIntValue(r._9)
672+ let state = r._10
673+ if (if (igs())
674+ then true
675+ else (sts == PoolShutdown))
676+ then throw(("Admin blocked: " + toString(sts)))
677+ else $Tuple5(outAmAmt, outPrAmt, pmtAmt, pmtAssetId, state)
678+ }
679+
680+
681+func cp (caller,txId,amAsPmt,prAsPmt,slippage,emitLp,isOneAsset,validateSlippage,pmtAmt,pmtId) = {
682+ let r = epo(txId, slippage, value(amAsPmt).amount, value(amAsPmt).assetId, value(prAsPmt).amount, value(prAsPmt).assetId, caller, (txId == ""), emitLp, isOneAsset, validateSlippage, pmtAmt, pmtId)
683+ let sts = parseIntValue(r._8)
684+ if (if (if (igs())
685+ then true
686+ else (sts == PoolPutDis))
687+ then true
688+ else (sts == PoolShutdown))
689+ then throw(("Blocked:" + toString(sts)))
690+ else r
691+ }
692+
693+
694+func calcPutOneTkn (pmtAmtRaw,pmtAssetId,userAddress,txId,withTakeFee) = {
695+ let amId = toBase58String(value(cfgAmountAssetId))
696+ let prId = toBase58String(value(cfgPriceAssetId))
697+ let lpId = cfgLpAssetId
698+ let amtDcm = cfgAmountAssetDecimals
699+ let priceDcm = cfgPriceAssetDecimals
700+ let lpAssetEmission = toBigInt(valueOrErrorMessage(assetInfo(lpId), "invalid lp asset").quantity)
701+ let chechEmission = if ((lpAssetEmission > big0))
702+ then true
703+ else throw("initial deposit requires all coins")
704+ if ((chechEmission == chechEmission))
705+ then {
706+ let amBalance = getAccBalance(amId)
707+ let prBalance = getAccBalance(prId)
708+ let $t02822828690 = if ((txId == ""))
709+ then $Tuple2(amBalance, prBalance)
710+ else if ((pmtAssetId == amId))
711+ then if ((pmtAmtRaw > amBalance))
712+ then throw("invalid payment amount")
713+ else $Tuple2((amBalance - pmtAmtRaw), prBalance)
714+ else if ((pmtAssetId == prId))
715+ then if ((pmtAmtRaw > prBalance))
716+ then throw("invalid payment amount")
717+ else $Tuple2(amBalance, (prBalance - pmtAmtRaw))
718+ else throw("wrong pmtAssetId")
719+ let amBalanceOld = $t02822828690._1
720+ let prBalanceOld = $t02822828690._2
721+ let $t02869628872 = if ((pmtAssetId == amId))
722+ then $Tuple2(pmtAmtRaw, 0)
723+ else if ((pmtAssetId == prId))
724+ then $Tuple2(0, pmtAmtRaw)
725+ else throw("invalid payment")
726+ let amAmountRaw = $t02869628872._1
727+ let prAmountRaw = $t02869628872._2
728+ let $t02887629130 = if (withTakeFee)
729+ then $Tuple3(takeFee(amAmountRaw, inFee)._1, takeFee(prAmountRaw, inFee)._1, takeFee(pmtAmtRaw, inFee)._2)
730+ else $Tuple3(amAmountRaw, prAmountRaw, 0)
731+ let amAmount = $t02887629130._1
732+ let prAmount = $t02887629130._2
733+ let feeAmount = $t02887629130._3
734+ let amBalanceNew = (amBalanceOld + amAmount)
735+ let prBalanceNew = (prBalanceOld + prAmount)
736+ let D0 = getD([t1(amBalanceOld, cfgAmountAssetDecimals), t1(prBalanceOld, cfgPriceAssetDecimals)])
737+ let D1 = getD([t1(amBalanceNew, cfgAmountAssetDecimals), t1(prBalanceNew, cfgPriceAssetDecimals)])
738+ let checkD = if ((D1 > D0))
739+ then true
740+ else throw()
741+ if ((checkD == checkD))
742+ then {
743+ let lpAmount = fraction(lpAssetEmission, (D1 - D0), D0, FLOOR)
744+ let curPrice = f1(cpbi(t1(prBalanceNew, priceDcm), t1(amBalanceNew, amtDcm)), scale8)
745+ let commonState = [IntegerEntry(pl(), curPrice), IntegerEntry(ph(height, lastBlock.timestamp), curPrice), StringEntry(pau(userAddress, txId), dataPutActionInfo(amAmountRaw, prAmountRaw, toInt(lpAmount), curPrice, 0, 0, height, lastBlock.timestamp, 0, 0))]
746+ let poolProportion = fraction(prBalanceOld, scale8, amBalanceOld)
747+ let amountAssetPart = fraction(pmtAmtRaw, scale8, (poolProportion + scale8))
748+ let priceAssetPart = (pmtAmtRaw - amountAssetPart)
749+ let lpAmtBoth = fraction(lpAssetEmission, toBigInt(priceAssetPart), toBigInt(prBalanceOld))
750+ let bonus = toInt(fraction((lpAmount - lpAmtBoth), scale8BigInt, lpAmtBoth))
751+ $Tuple4(toInt(lpAmount), commonState, feeAmount, bonus)
752+ }
753+ else throw("Strict value is not equal to itself.")
754+ }
755+ else throw("Strict value is not equal to itself.")
756+ }
757+
758+
759+func getOneTknV2Internal (outAssetId,minOutAmount,payments,caller,originCaller,transactionId) = {
760+ let lpId = toBase58String(value(cfgLpAssetId))
761+ let amId = toBase58String(value(cfgAmountAssetId))
762+ let prId = toBase58String(value(cfgPriceAssetId))
763+ let amDecimals = cfgAmountAssetDecimals
764+ let prDecimals = cfgPriceAssetDecimals
765+ let poolStatus = cfgPoolStatus
766+ let userAddress = if ((caller == restContract))
767+ then originCaller
768+ else caller
769+ let pmt = value(payments[0])
770+ let pmtAssetId = value(pmt.assetId)
771+ let pmtAmt = pmt.amount
772+ let currentDLp = calcCurrentDLp(big0, big0, big0)
773+ if ((currentDLp == currentDLp))
774+ then {
775+ let txId58 = toBase58String(transactionId)
776+ if ((lpId != toBase58String(pmtAssetId)))
777+ then throw("Wrong LP")
778+ else {
779+ let amBalance = getAccBalance(amId)
780+ let prBalance = getAccBalance(prId)
781+ let $t03124231353 = {
782+ let @ = invoke(this, "getOneTknV2READONLY", [outAssetId, pmtAmt], nil)
783+ if ($isInstanceOf(@, "(Int, Int)"))
784+ then @
785+ else throw(($getType(@) + " couldn't be cast to (Int, Int)"))
786+ }
787+ if (($t03124231353 == $t03124231353))
788+ then {
789+ let feeAmount = $t03124231353._2
790+ let totalGet = $t03124231353._1
791+ let totalAmount = if (if ((minOutAmount > 0))
792+ then (minOutAmount > totalGet)
793+ else false)
794+ then throwErr(makeString(["amount to receive is less than ", toString(minOutAmount)], ""))
795+ else totalGet
796+ let $t03154331850 = if ((outAssetId == amId))
797+ then $Tuple4(totalAmount, 0, ((amBalance - totalAmount) - feeAmount), prBalance)
798+ else if ((outAssetId == prId))
799+ then $Tuple4(0, totalAmount, amBalance, ((prBalance - totalAmount) - feeAmount))
800+ else throw("invalid out asset id")
801+ let outAm = $t03154331850._1
802+ let outPr = $t03154331850._2
803+ let amBalanceNew = $t03154331850._3
804+ let prBalanceNew = $t03154331850._4
805+ let curPrX18 = cpbi(t1(prBalanceNew, prDecimals), t1(amBalanceNew, amDecimals))
806+ let curPr = f1(curPrX18, scale8)
807+ let outAssetIdOrWaves = if ((outAssetId == "WAVES"))
808+ then unit
809+ else fromBase58String(outAssetId)
810+ let sendFeeToMatcher = if ((feeAmount > 0))
811+ then [ScriptTransfer(feeCollectorAddress, feeAmount, outAssetIdOrWaves)]
812+ else nil
813+ let state = ([ScriptTransfer(userAddress, totalAmount, outAssetIdOrWaves), StringEntry(gau(toString(userAddress), txId58), dataGetActionInfo(outAm, outPr, pmtAmt, curPr, height, lastBlock.timestamp)), IntegerEntry(pl(), curPr), IntegerEntry(ph(height, lastBlock.timestamp), curPr)] ++ sendFeeToMatcher)
814+ if ((state == state))
815+ then {
816+ let burn = invoke(fca, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
817+ if ((burn == burn))
818+ then {
819+ let $t03263532985 = {
820+ let feeAmountForCalc = if ((this == feeCollectorAddress))
821+ then 0
822+ else feeAmount
823+ let outInAmountAsset = if ((parseAssetId(outAssetId) == cfgAmountAssetId))
824+ then true
825+ else false
826+ if (outInAmountAsset)
827+ then $Tuple2(-((totalGet + feeAmountForCalc)), 0)
828+ else $Tuple2(0, -((totalGet + feeAmountForCalc)))
829+ }
830+ let amountAssetBalanceDelta = $t03263532985._1
831+ let priceAssetBalanceDelta = $t03263532985._2
832+ let $t03298833096 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
833+ let refreshDLpActions = $t03298833096._1
834+ let updatedDLp = $t03298833096._2
835+ let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
836+ if ((isUpdatedDLpValid == isUpdatedDLpValid))
837+ then $Tuple2((state ++ refreshDLpActions), totalAmount)
838+ else throw("Strict value is not equal to itself.")
839+ }
840+ else throw("Strict value is not equal to itself.")
841+ }
842+ else throw("Strict value is not equal to itself.")
843+ }
844+ else throw("Strict value is not equal to itself.")
845+ }
846+ }
847+ else throw("Strict value is not equal to itself.")
848+ }
849+
850+
851+func m () = match getString(mpk()) {
852+ case s: String =>
853+ fromBase58String(s)
854+ case _: Unit =>
855+ unit
856+ case _ =>
857+ throw("Match error")
858+}
859+
860+
861+func pm () = match getString(pmpk()) {
862+ case s: String =>
863+ fromBase58String(s)
864+ case _: Unit =>
865+ unit
866+ case _ =>
867+ throw("Match error")
868+}
869+
870+
871+let pd = throw("Permission denied")
872+
873+func isManager (i) = match m() {
874+ case pk: ByteVector =>
875+ (i.callerPublicKey == pk)
876+ case _: Unit =>
877+ (i.caller == this)
878+ case _ =>
879+ throw("Match error")
880+}
881+
882+
883+func mm (i) = match m() {
884+ case pk: ByteVector =>
885+ if ((i.callerPublicKey == pk))
886+ then true
887+ else pd
888+ case _: Unit =>
889+ if ((i.caller == this))
890+ then true
891+ else pd
892+ case _ =>
893+ throw("Match error")
894+}
895+
896+
897+func getY (isReverse,D,poolAmountInBalance) = {
898+ let poolConfig = gpc()
899+ let amId = poolConfig[idxAmAsId]
900+ let prId = poolConfig[idxPrAsId]
901+ let n = big2
902+ let aPrecision = parseBigIntValue(Amult)
903+ let a = (parseBigIntValue(A) * aPrecision)
904+ let xp = if ((isReverse == false))
905+ then [(toBigInt(getAccBalance(amId)) + poolAmountInBalance), toBigInt(getAccBalance(prId))]
906+ else [(toBigInt(getAccBalance(prId)) + poolAmountInBalance), toBigInt(getAccBalance(amId))]
907+ let x = xp[0]
908+ let s = x
909+ let ann = (a * n)
910+ let c = (((((D * D) / (x * n)) * D) * aPrecision) / (ann * n))
911+ let b = ((s + ((D * aPrecision) / ann)) - D)
912+ func calc (acc,cur) = {
913+ let $t03454334563 = acc
914+ let y = $t03454334563._1
915+ let found = $t03454334563._2
916+ if ((found != unit))
917+ then acc
918+ else {
919+ let yNext = (((y * y) + c) / ((big2 * y) + b))
920+ let yDiff = absBigInt((yNext - value(y)))
921+ if ((big1 >= yDiff))
922+ then $Tuple2(yNext, cur)
923+ else $Tuple2(yNext, unit)
924+ }
925+ }
926+
927+ let arr = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
928+ let $t03489434941 = {
929+ let $l = arr
930+ let $s = size($l)
931+ let $acc0 = $Tuple2(D, unit)
932+ func $f0_1 ($a,$i) = if (($i >= $s))
933+ then $a
934+ else calc($a, $l[$i])
935+
936+ func $f0_2 ($a,$i) = if (($i >= $s))
937+ then $a
938+ else throw("List size exceeds 15")
939+
940+ $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15)
941+ }
942+ let y = $t03489434941._1
943+ let found = $t03489434941._2
944+ if ((found != unit))
945+ then y
946+ else throw(("Y calculation error, Y = " + toString(y)))
947+ }
948+
949+
950+func skipOrderValidation () = valueOrElse(getBoolean(fca, keySkipOrderValidation(toString(this))), false)
951+
952+
953+@Callable(i)
954+func calculateAmountOutForSwapREADONLY (cleanAmountIn,isReverse,feePoolAmount) = {
955+ let $t03529335717 = if ((isReverse == false))
956+ then {
957+ let assetOut = strf(this, pa())
958+ let poolAmountInBalance = (toBigInt(getAccBalance(strf(this, aa()))) + toBigInt(cleanAmountIn))
959+ $Tuple2(assetOut, poolAmountInBalance)
960+ }
961+ else {
962+ let assetOut = strf(this, aa())
963+ let poolAmountInBalance = (toBigInt(getAccBalance(strf(this, pa()))) + toBigInt(cleanAmountIn))
964+ $Tuple2(assetOut, poolAmountInBalance)
965+ }
966+ let assetOut = $t03529335717._1
967+ let poolAmountInBalance = $t03529335717._2
968+ let poolConfig = gpc()
969+ let amId = poolConfig[idxAmAsId]
970+ let prId = poolConfig[idxPrAsId]
971+ let xp = [toBigInt(getAccBalance(amId)), toBigInt(getAccBalance(prId))]
972+ let D = getD(xp)
973+ let y = getY(isReverse, D, toBigInt(cleanAmountIn))
974+ let dy = ((toBigInt(getAccBalance(assetOut)) - y) - toBigInt(1))
975+ let totalGetRaw = max([0, toInt(dy)])
976+ let newXp = if ((isReverse == false))
977+ then [((toBigInt(getAccBalance(amId)) + toBigInt(cleanAmountIn)) + toBigInt(feePoolAmount)), (toBigInt(getAccBalance(prId)) - dy)]
978+ else [(toBigInt(getAccBalance(amId)) - dy), ((toBigInt(getAccBalance(prId)) + toBigInt(cleanAmountIn)) + toBigInt(feePoolAmount))]
979+ let newD = getD(newXp)
980+ let checkD = if ((newD >= D))
981+ then true
982+ else throw(makeString(["new D is fewer error", toString(D), toString(newD)], "__"))
983+ if ((checkD == checkD))
984+ then $Tuple2(nil, totalGetRaw)
985+ else throw("Strict value is not equal to itself.")
986+ }
987+
988+
989+
990+@Callable(i)
991+func calculateAmountOutForSwapAndSendTokens (cleanAmountIn,isReverse,amountOutMin,addressTo,feePoolAmount) = {
992+ let swapContact = {
993+ let @ = invoke(fca, "getSwapContractREADONLY", nil, nil)
994+ if ($isInstanceOf(@, "String"))
995+ then @
996+ else throw(($getType(@) + " couldn't be cast to String"))
997+ }
998+ let checks = [if ((value(i.payments[0]).amount >= cleanAmountIn))
999+ then true
1000+ else throwErr("Wrong amount"), if ((i.caller == addressFromStringValue(swapContact)))
1001+ then true
1002+ else throwErr("Permission denied")]
1003+ if ((checks == checks))
1004+ then {
1005+ let pmt = value(i.payments[0])
1006+ let assetIn = assetIdToString(pmt.assetId)
1007+ let $t03715337547 = if ((isReverse == false))
1008+ then {
1009+ let assetOut = strf(this, pa())
1010+ let poolAmountInBalance = (getAccBalance(assetIn) - value(i.payments[0]).amount)
1011+ $Tuple2(assetOut, poolAmountInBalance)
1012+ }
1013+ else {
1014+ let assetOut = strf(this, aa())
1015+ let poolAmountInBalance = (getAccBalance(assetIn) - value(i.payments[0]).amount)
1016+ $Tuple2(assetOut, poolAmountInBalance)
1017+ }
1018+ let assetOut = $t03715337547._1
1019+ let poolAmountInBalance = $t03715337547._2
1020+ let poolConfig = gpc()
1021+ let amId = poolConfig[idxAmAsId]
1022+ let prId = poolConfig[idxPrAsId]
1023+ let xp = if ((isReverse == false))
1024+ then [(toBigInt(getAccBalance(amId)) - toBigInt(value(i.payments[0]).amount)), toBigInt(getAccBalance(prId))]
1025+ else [toBigInt(getAccBalance(amId)), (toBigInt(getAccBalance(prId)) - toBigInt(value(i.payments[0]).amount))]
1026+ let D = getD(xp)
1027+ let y = getY(isReverse, D, toBigInt(0))
1028+ let dy = ((toBigInt(getAccBalance(assetOut)) - y) - toBigInt(1))
1029+ let totalGetRaw = max([0, toInt(dy)])
1030+ let checkMin = if ((totalGetRaw >= amountOutMin))
1031+ then true
1032+ else throw("Exchange result is fewer coins than expected")
1033+ if ((checkMin == checkMin))
1034+ then {
1035+ let newXp = if ((isReverse == false))
1036+ then [(toBigInt(getAccBalance(amId)) + toBigInt(feePoolAmount)), (toBigInt(getAccBalance(prId)) - dy)]
1037+ else [(toBigInt(getAccBalance(amId)) - dy), (toBigInt(getAccBalance(prId)) + toBigInt(feePoolAmount))]
1038+ let newD = getD(newXp)
1039+ let checkD = if ((newD >= D))
1040+ then true
1041+ else throw("new D is fewer error")
1042+ if ((checkD == checkD))
1043+ then $Tuple2([ScriptTransfer(addressFromStringValue(addressTo), totalGetRaw, parseAssetId(assetOut))], totalGetRaw)
1044+ else throw("Strict value is not equal to itself.")
1045+ }
1046+ else throw("Strict value is not equal to itself.")
1047+ }
1048+ else throw("Strict value is not equal to itself.")
1049+ }
1050+
1051+
1052+
1053+@Callable(i)
1054+func constructor (fc) = {
1055+ let c = mm(i)
1056+ if ((c == c))
1057+ then [StringEntry(fc(), fc)]
1058+ else throw("Strict value is not equal to itself.")
1059+ }
1060+
1061+
1062+
1063+@Callable(i)
1064+func setManager (pendingManagerPublicKey) = {
1065+ let c = mm(i)
1066+ if ((c == c))
1067+ then {
1068+ let cm = fromBase58String(pendingManagerPublicKey)
1069+ if ((cm == cm))
1070+ then [StringEntry(pmpk(), pendingManagerPublicKey)]
1071+ else throw("Strict value is not equal to itself.")
1072+ }
1073+ else throw("Strict value is not equal to itself.")
1074+ }
1075+
1076+
1077+
1078+@Callable(i)
1079+func confirmManager () = {
1080+ let p = pm()
1081+ let hpm = if (isDefined(p))
1082+ then true
1083+ else throw("No pending manager")
1084+ if ((hpm == hpm))
1085+ then {
1086+ let cpm = if ((i.callerPublicKey == value(p)))
1087+ then true
1088+ else throw("You are not pending manager")
1089+ if ((cpm == cpm))
1090+ then [StringEntry(mpk(), toBase58String(value(p))), DeleteEntry(pmpk())]
1091+ else throw("Strict value is not equal to itself.")
1092+ }
1093+ else throw("Strict value is not equal to itself.")
1094+ }
1095+
1096+
1097+
1098+@Callable(i)
1099+func put (slip,autoStake) = {
1100+ let factCfg = gfc()
1101+ let stakingCntr = valueOrErrorMessage(addressFromString(factCfg[idxFactStakCntr]), "Wr st addr")
1102+ let slipCntr = valueOrErrorMessage(addressFromString(factCfg[idxFactSlippCntr]), "Wr sl addr")
1103+ if ((0 > slip))
1104+ then throw("Wrong slippage")
1105+ else if ((size(i.payments) != 2))
1106+ then throw("2 pmnts expd")
1107+ else {
1108+ let amAssetPmt = toBigInt(value(i.payments[0]).amount)
1109+ let prAssetPmt = toBigInt(value(i.payments[1]).amount)
1110+ let amountAssetBalance = (toBigInt(getAccBalance(assetIdToString(cfgAmountAssetId))) - amAssetPmt)
1111+ if ((amountAssetBalance == amountAssetBalance))
1112+ then {
1113+ let priceAssetBalance = (toBigInt(getAccBalance(assetIdToString(cfgPriceAssetId))) - prAssetPmt)
1114+ if ((priceAssetBalance == priceAssetBalance))
1115+ then {
1116+ let lpAssetEmission = toBigInt(value(assetInfo(cfgLpAssetId)).quantity)
1117+ if ((lpAssetEmission == lpAssetEmission))
1118+ then {
1119+ let currentDLp = calcCurrentDLp(amAssetPmt, prAssetPmt, toBigInt(0))
1120+ if ((currentDLp == currentDLp))
1121+ then {
1122+ let e = cp(toString(i.caller), toBase58String(i.transactionId), AttachedPayment(value(i.payments[0]).assetId, value(i.payments[0]).amount), i.payments[1], slip, true, false, true, 0, "")
1123+ let emitLpAmt = e._2
1124+ let lpAssetId = e._7
1125+ let state = e._9
1126+ let amDiff = e._10
1127+ let prDiff = e._11
1128+ let amId = e._12
1129+ let prId = e._13
1130+ let r = invoke(fca, "emit", [emitLpAmt], nil)
1131+ if ((r == r))
1132+ then {
1133+ let el = match r {
1134+ case legacy: Address =>
1135+ invoke(legacy, "emit", [emitLpAmt], nil)
1136+ case _ =>
1137+ unit
1138+ }
1139+ if ((el == el))
1140+ then {
1141+ let sa = if ((amDiff > 0))
1142+ then invoke(slipCntr, "put", nil, [AttachedPayment(amId, amDiff)])
1143+ else nil
1144+ if ((sa == sa))
1145+ then {
1146+ let sp = if ((prDiff > 0))
1147+ then invoke(slipCntr, "put", nil, [AttachedPayment(prId, prDiff)])
1148+ else nil
1149+ if ((sp == sp))
1150+ then {
1151+ let lpTrnsfr = if (autoStake)
1152+ then {
1153+ let ss = invoke(stakingCntr, "stake", nil, [AttachedPayment(lpAssetId, emitLpAmt)])
1154+ if ((ss == ss))
1155+ then nil
1156+ else throw("Strict value is not equal to itself.")
1157+ }
1158+ else [ScriptTransfer(i.caller, emitLpAmt, lpAssetId)]
1159+ let $t04216642308 = refreshDLpInternal(0, 0, 0)
1160+ let refreshDLpActions = $t04216642308._1
1161+ let updatedDLp = $t04216642308._2
1162+ let check = if ((updatedDLp >= currentDLp))
1163+ then true
1164+ else throwErr(makeString(["updated DLp lower than current DLp", toString(amountAssetBalance), toString(priceAssetBalance), toString(lpAssetEmission), toString(currentDLp), toString(updatedDLp), toString(amDiff), toString(prDiff)], " "))
1165+ if ((check == check))
1166+ then {
1167+ let lpAssetEmissionAfter = value(assetInfo(cfgLpAssetId)).quantity
1168+ if ((lpAssetEmissionAfter == lpAssetEmissionAfter))
1169+ then ((state ++ lpTrnsfr) ++ refreshDLpActions)
1170+ else throw("Strict value is not equal to itself.")
1171+ }
1172+ else throw("Strict value is not equal to itself.")
1173+ }
1174+ else throw("Strict value is not equal to itself.")
1175+ }
1176+ else throw("Strict value is not equal to itself.")
1177+ }
1178+ else throw("Strict value is not equal to itself.")
1179+ }
1180+ else throw("Strict value is not equal to itself.")
1181+ }
1182+ else throw("Strict value is not equal to itself.")
1183+ }
1184+ else throw("Strict value is not equal to itself.")
1185+ }
1186+ else throw("Strict value is not equal to itself.")
1187+ }
1188+ else throw("Strict value is not equal to itself.")
1189+ }
1190+ }
1191+
1192+
1193+
1194+@Callable(i)
1195+func putOneTknV2 (minOutAmount,autoStake) = {
1196+ let isPoolOneTokenOperationsDisabled = {
1197+ let @ = invoke(fca, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
1198+ if ($isInstanceOf(@, "Boolean"))
1199+ then @
1200+ else throw(($getType(@) + " couldn't be cast to Boolean"))
1201+ }
1202+ let isPutDisabled = if (if (if (igs())
1203+ then true
1204+ else (cfgPoolStatus == PoolPutDis))
1205+ then true
1206+ else (cfgPoolStatus == PoolShutdown))
1207+ then true
1208+ else isPoolOneTokenOperationsDisabled
1209+ let checks = [if (if (!(isPutDisabled))
1210+ then true
1211+ else isManager(i))
1212+ then true
1213+ else throwErr("put operation is blocked by admin"), if ((size(i.payments) == 1))
1214+ then true
1215+ else throwErr("exactly 1 payment are expected")]
1216+ if ((checks == checks))
1217+ then {
1218+ let amId = toBase58String(value(cfgAmountAssetId))
1219+ let prId = toBase58String(value(cfgPriceAssetId))
1220+ let lpId = cfgLpAssetId
1221+ let amDecimals = cfgAmountAssetDecimals
1222+ let prDecimals = cfgPriceAssetDecimals
1223+ let userAddress = if ((i.caller == this))
1224+ then i.originCaller
1225+ else i.caller
1226+ let pmt = value(i.payments[0])
1227+ let pmtAssetId = toBase58String(value(pmt.assetId))
1228+ let pmtAmt = pmt.amount
1229+ let currentDLp = if ((pmt.assetId == cfgAmountAssetId))
1230+ then calcCurrentDLp(toBigInt(pmtAmt), toBigInt(0), toBigInt(0))
1231+ else calcCurrentDLp(toBigInt(0), toBigInt(pmtAmt), toBigInt(0))
1232+ if ((currentDLp == currentDLp))
1233+ then {
1234+ let $t04394944107 = calcPutOneTkn(pmtAmt, pmtAssetId, toString(userAddress), toBase58String(i.transactionId), true)
1235+ if (($t04394944107 == $t04394944107))
1236+ then {
1237+ let feeAmount = $t04394944107._3
1238+ let state = $t04394944107._2
1239+ let estimLP = $t04394944107._1
1240+ let emitLpAmt = if (if ((minOutAmount > 0))
1241+ then (minOutAmount > estimLP)
1242+ else false)
1243+ then throwErr(makeString(["amount to receive is less than ", toString(minOutAmount)], ""))
1244+ else estimLP
1245+ let e = invoke(fca, "emit", [emitLpAmt], nil)
1246+ if ((e == e))
1247+ then {
1248+ let el = match e {
1249+ case legacy: Address =>
1250+ invoke(legacy, "emit", [emitLpAmt], nil)
1251+ case _ =>
1252+ unit
1253+ }
1254+ if ((el == el))
1255+ then {
1256+ let lpTrnsfr = if (autoStake)
1257+ then {
1258+ let ss = invoke(stakingContract, "stakeFor", [toString(i.caller)], [AttachedPayment(lpId, emitLpAmt)])
1259+ if ((ss == ss))
1260+ then nil
1261+ else throw("Strict value is not equal to itself.")
1262+ }
1263+ else [ScriptTransfer(i.caller, emitLpAmt, lpId)]
1264+ let sendFeeToMatcher = if ((feeAmount > 0))
1265+ then [ScriptTransfer(feeCollectorAddress, feeAmount, fromBase58String(pmtAssetId))]
1266+ else nil
1267+ let $t04499245341 = if ((this == feeCollectorAddress))
1268+ then $Tuple2(0, 0)
1269+ else {
1270+ let paymentInAmountAsset = if ((pmt.assetId == cfgAmountAssetId))
1271+ then true
1272+ else false
1273+ if (paymentInAmountAsset)
1274+ then $Tuple2(-(feeAmount), 0)
1275+ else $Tuple2(0, -(feeAmount))
1276+ }
1277+ let amountAssetBalanceDelta = $t04499245341._1
1278+ let priceAssetBalanceDelta = $t04499245341._2
1279+ let $t04534445452 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
1280+ let refreshDLpActions = $t04534445452._1
1281+ let updatedDLp = $t04534445452._2
1282+ let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
1283+ if ((isUpdatedDLpValid == isUpdatedDLpValid))
1284+ then $Tuple2((((state ++ lpTrnsfr) ++ sendFeeToMatcher) ++ refreshDLpActions), emitLpAmt)
1285+ else throw("Strict value is not equal to itself.")
1286+ }
1287+ else throw("Strict value is not equal to itself.")
1288+ }
1289+ else throw("Strict value is not equal to itself.")
1290+ }
1291+ else throw("Strict value is not equal to itself.")
1292+ }
1293+ else throw("Strict value is not equal to itself.")
1294+ }
1295+ else throw("Strict value is not equal to itself.")
1296+ }
1297+
1298+
1299+
1300+@Callable(i)
1301+func putForFree (maxSlpg) = if ((0 > maxSlpg))
1302+ then throw("Wrong slpg")
1303+ else if ((size(i.payments) != 2))
1304+ then throw("2 pmnts expd")
1305+ else {
1306+ let estPut = cp(toString(i.caller), toBase58String(i.transactionId), AttachedPayment(value(i.payments[0]).assetId, value(i.payments[0]).amount), i.payments[1], maxSlpg, false, false, true, 0, "")
1307+ let state = estPut._9
1308+ let amAssetPmt = toBigInt(value(i.payments[0]).amount)
1309+ let prAssetPmt = toBigInt(value(i.payments[1]).amount)
1310+ let currentDLp = calcCurrentDLp(amAssetPmt, prAssetPmt, toBigInt(0))
1311+ if ((currentDLp == currentDLp))
1312+ then {
1313+ let $t04648246547 = refreshDLpInternal(0, 0, 0)
1314+ let refreshDLpActions = $t04648246547._1
1315+ let updatedDLp = $t04648246547._2
1316+ let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
1317+ if ((isUpdatedDLpValid == isUpdatedDLpValid))
1318+ then (state ++ refreshDLpActions)
1319+ else throw("Strict value is not equal to itself.")
1320+ }
1321+ else throw("Strict value is not equal to itself.")
1322+ }
1323+
1324+
1325+
1326+@Callable(i)
1327+func get () = {
1328+ let currentDLp = calcCurrentDLp(toBigInt(0), toBigInt(0), toBigInt(0))
1329+ if ((currentDLp == currentDLp))
1330+ then {
1331+ let r = cg(i)
1332+ let outAmtAmt = r._1
1333+ let outPrAmt = r._2
1334+ let pmtAmt = r._3
1335+ let pmtAssetId = r._4
1336+ let state = r._5
1337+ let b = invoke(fca, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
1338+ if ((b == b))
1339+ then {
1340+ let $t04772047802 = refreshDLpInternal(-(outAmtAmt), -(outPrAmt), 0)
1341+ let refreshDLpActions = $t04772047802._1
1342+ let updatedDLp = $t04772047802._2
1343+ let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
1344+ if ((isUpdatedDLpValid == isUpdatedDLpValid))
1345+ then (state ++ refreshDLpActions)
1346+ else throw("Strict value is not equal to itself.")
1347+ }
1348+ else throw("Strict value is not equal to itself.")
1349+ }
1350+ else throw("Strict value is not equal to itself.")
1351+ }
1352+
1353+
1354+
1355+@Callable(i)
1356+func getOneTknV2 (outAssetId,minOutAmount) = {
1357+ let isPoolOneTokenOperationsDisabled = {
1358+ let @ = invoke(fca, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
1359+ if ($isInstanceOf(@, "Boolean"))
1360+ then @
1361+ else throw(($getType(@) + " couldn't be cast to Boolean"))
1362+ }
1363+ let isGetDisabled = if (if (igs())
1364+ then true
1365+ else (cfgPoolStatus == PoolShutdown))
1366+ then true
1367+ else isPoolOneTokenOperationsDisabled
1368+ let checks = [if (if (!(isGetDisabled))
1369+ then true
1370+ else isManager(i))
1371+ then true
1372+ else throwErr("get operation is blocked by admin"), if ((size(i.payments) == 1))
1373+ then true
1374+ else throwErr("exactly 1 payment are expected")]
1375+ if ((checks == checks))
1376+ then {
1377+ let $t04842048575 = getOneTknV2Internal(outAssetId, minOutAmount, i.payments, i.caller, i.originCaller, i.transactionId)
1378+ let state = $t04842048575._1
1379+ let totalAmount = $t04842048575._2
1380+ $Tuple2(state, totalAmount)
1381+ }
1382+ else throw("Strict value is not equal to itself.")
1383+ }
1384+
1385+
1386+
1387+@Callable(i)
1388+func refreshDLp () = {
1389+ let lastRefreshedBlockHeight = valueOrElse(getInteger(keyDLpRefreshedHeight), 0)
1390+ let checkLastRefreshedBlockHeight = if (((height - lastRefreshedBlockHeight) >= dLpRefreshDelay))
1391+ then unit
1392+ else throwErr(makeString([toString(dLpRefreshDelay), " blocks have not passed since the previous call"], ""))
1393+ if ((checkLastRefreshedBlockHeight == checkLastRefreshedBlockHeight))
1394+ then {
1395+ let dLp = valueOrErrorMessage(parseBigInt(valueOrElse(getString(this, keyDLp), "0")), fmtErr("invalid dLp"))
1396+ let $t04909949163 = refreshDLpInternal(0, 0, 0)
1397+ let dLpUpdateActions = $t04909949163._1
1398+ let updatedDLp = $t04909949163._2
1399+ let actions = if ((dLp != updatedDLp))
1400+ then dLpUpdateActions
1401+ else throwErr("nothing to refresh")
1402+ $Tuple2(actions, toString(updatedDLp))
1403+ }
1404+ else throw("Strict value is not equal to itself.")
1405+ }
1406+
1407+
1408+
1409+@Callable(i)
1410+func getOneTknV2READONLY (outAssetId,lpAssetAmount) = {
1411+ let amId = toBase58String(value(cfgAmountAssetId))
1412+ let prId = toBase58String(value(cfgPriceAssetId))
1413+ let lpId = toBase58String(value(cfgLpAssetId))
1414+ let xp = [toBigInt(getAccBalance(amId)), toBigInt(getAccBalance(prId))]
1415+ let lpEmission = toBigInt(valueOrErrorMessage(assetInfo(fromBase58String(lpId)), "invalid lp asset").quantity)
1416+ let D0 = getD(xp)
1417+ let D1 = (D0 - fraction(toBigInt(lpAssetAmount), D0, lpEmission))
1418+ let index = if ((outAssetId == amId))
1419+ then 0
1420+ else if ((outAssetId == prId))
1421+ then 1
1422+ else throw("invalid out asset id")
1423+ let newY = getYD(xp, index, D1)
1424+ let dy = (xp[index] - newY)
1425+ let totalGetRaw = max([0, toInt((dy - big1))])
1426+ let $t05017350228 = takeFee(totalGetRaw, outFee)
1427+ let totalGet = $t05017350228._1
1428+ let feeAmount = $t05017350228._2
1429+ $Tuple2(nil, $Tuple2(totalGet, feeAmount))
1430+ }
1431+
1432+
1433+
1434+@Callable(i)
1435+func getOneTknV2WithBonusREADONLY (outAssetId,lpAssetAmount) = {
1436+ let amId = toBase58String(value(cfgAmountAssetId))
1437+ let prId = toBase58String(value(cfgPriceAssetId))
1438+ let lpId = toBase58String(value(cfgLpAssetId))
1439+ let amBalance = getAccBalance(amId)
1440+ let prBalance = getAccBalance(prId)
1441+ let $t05060350718 = {
1442+ let @ = invoke(this, "getOneTknV2READONLY", [outAssetId, lpAssetAmount], nil)
1443+ if ($isInstanceOf(@, "(Int, Int)"))
1444+ then @
1445+ else throw(($getType(@) + " couldn't be cast to (Int, Int)"))
1446+ }
1447+ let totalGet = $t05060350718._1
1448+ let feeAmount = $t05060350718._2
1449+ let r = ego("", lpId, lpAssetAmount, this)
1450+ let outAmAmt = r._1
1451+ let outPrAmt = r._2
1452+ let sumOfGetAssets = (outAmAmt + outPrAmt)
1453+ let bonus = if ((sumOfGetAssets == 0))
1454+ then if ((totalGet == 0))
1455+ then 0
1456+ else throw("bonus calculation error")
1457+ else fraction((totalGet - sumOfGetAssets), scale8, sumOfGetAssets)
1458+ $Tuple2(nil, $Tuple3(totalGet, feeAmount, bonus))
1459+ }
1460+
1461+
1462+
1463+@Callable(i)
1464+func getNoLess (noLessThenAmtAsset,noLessThenPriceAsset) = {
1465+ let r = cg(i)
1466+ let outAmAmt = r._1
1467+ let outPrAmt = r._2
1468+ let pmtAmt = r._3
1469+ let pmtAssetId = r._4
1470+ let state = r._5
1471+ if ((noLessThenAmtAsset > outAmAmt))
1472+ then throw(((("Failed: " + toString(outAmAmt)) + " < ") + toString(noLessThenAmtAsset)))
1473+ else if ((noLessThenPriceAsset > outPrAmt))
1474+ then throw(((("Failed: " + toString(outPrAmt)) + " < ") + toString(noLessThenPriceAsset)))
1475+ else {
1476+ let currentDLp = calcCurrentDLp(toBigInt(0), toBigInt(0), toBigInt(0))
1477+ if ((currentDLp == currentDLp))
1478+ then {
1479+ let burnLPAssetOnFactory = invoke(fca, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
1480+ if ((burnLPAssetOnFactory == burnLPAssetOnFactory))
1481+ then {
1482+ let $t05188451965 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1483+ let refreshDLpActions = $t05188451965._1
1484+ let updatedDLp = $t05188451965._2
1485+ let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
1486+ if ((isUpdatedDLpValid == isUpdatedDLpValid))
1487+ then (state ++ refreshDLpActions)
1488+ else throw("Strict value is not equal to itself.")
1489+ }
1490+ else throw("Strict value is not equal to itself.")
1491+ }
1492+ else throw("Strict value is not equal to itself.")
1493+ }
1494+ }
1495+
1496+
1497+
1498+@Callable(i)
1499+func unstakeAndGet (amount) = {
1500+ let checkPayments = if ((size(i.payments) != 0))
1501+ then throw("No pmnts expd")
1502+ else true
1503+ if ((checkPayments == checkPayments))
1504+ then {
1505+ let factoryCfg = gfc()
1506+ let lpAssetId = cfgLpAssetId
1507+ let staking = valueOrErrorMessage(addressFromString(factoryCfg[idxFactStakCntr]), "Wr st addr")
1508+ let currentDLp = calcCurrentDLp(toBigInt(0), toBigInt(0), toBigInt(0))
1509+ if ((currentDLp == currentDLp))
1510+ then {
1511+ let unstakeInv = invoke(staking, "unstake", [toBase58String(lpAssetId), amount], nil)
1512+ if ((unstakeInv == unstakeInv))
1513+ then {
1514+ let r = ego(toBase58String(i.transactionId), toBase58String(lpAssetId), amount, i.caller)
1515+ let outAmAmt = r._1
1516+ let outPrAmt = r._2
1517+ let sts = parseIntValue(r._9)
1518+ let state = r._10
1519+ let v = if (if (igs())
1520+ then true
1521+ else (sts == PoolShutdown))
1522+ then throw(("Blocked: " + toString(sts)))
1523+ else true
1524+ if ((v == v))
1525+ then {
1526+ let burnA = invoke(fca, "burn", [amount], [AttachedPayment(lpAssetId, amount)])
1527+ if ((burnA == burnA))
1528+ then {
1529+ let $t05299253073 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1530+ let refreshDLpActions = $t05299253073._1
1531+ let updatedDLp = $t05299253073._2
1532+ let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
1533+ if ((isUpdatedDLpValid == isUpdatedDLpValid))
1534+ then (state ++ refreshDLpActions)
1535+ else throw("Strict value is not equal to itself.")
1536+ }
1537+ else throw("Strict value is not equal to itself.")
1538+ }
1539+ else throw("Strict value is not equal to itself.")
1540+ }
1541+ else throw("Strict value is not equal to itself.")
1542+ }
1543+ else throw("Strict value is not equal to itself.")
1544+ }
1545+ else throw("Strict value is not equal to itself.")
1546+ }
1547+
1548+
1549+
1550+@Callable(i)
1551+func unstakeAndGetNoLess (unstakeAmount,noLessThenAmountAsset,noLessThenPriceAsset) = {
1552+ let isGetDisabled = if (igs())
1553+ then true
1554+ else (cfgPoolStatus == PoolShutdown)
1555+ let checks = [if (!(isGetDisabled))
1556+ then true
1557+ else throw("get operation is blocked by admin"), if ((size(i.payments) == 0))
1558+ then true
1559+ else throw("no payments are expected")]
1560+ if ((checks == checks))
1561+ then {
1562+ let currentDLp = calcCurrentDLp(toBigInt(0), toBigInt(0), toBigInt(0))
1563+ if ((currentDLp == currentDLp))
1564+ then {
1565+ let unstakeInv = invoke(stakingContract, "unstake", [toBase58String(cfgLpAssetId), unstakeAmount], nil)
1566+ if ((unstakeInv == unstakeInv))
1567+ then {
1568+ let res = ego(toBase58String(i.transactionId), toBase58String(cfgLpAssetId), unstakeAmount, i.caller)
1569+ let outAmAmt = res._1
1570+ let outPrAmt = res._2
1571+ let state = res._10
1572+ let checkAmounts = [if ((outAmAmt >= noLessThenAmountAsset))
1573+ then true
1574+ else throw(makeString(["amount asset amount to receive is less than ", toString(noLessThenAmountAsset)], "")), if ((outPrAmt >= noLessThenPriceAsset))
1575+ then true
1576+ else throw(makeString(["price asset amount to receive is less than ", toString(noLessThenPriceAsset)], ""))]
1577+ if ((checkAmounts == checkAmounts))
1578+ then {
1579+ let burnLPAssetOnFactory = invoke(fca, "burn", [unstakeAmount], [AttachedPayment(cfgLpAssetId, unstakeAmount)])
1580+ if ((burnLPAssetOnFactory == burnLPAssetOnFactory))
1581+ then {
1582+ let $t05432454405 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1583+ let refreshDLpActions = $t05432454405._1
1584+ let updatedDLp = $t05432454405._2
1585+ let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
1586+ if ((isUpdatedDLpValid == isUpdatedDLpValid))
1587+ then (state ++ refreshDLpActions)
1588+ else throw("Strict value is not equal to itself.")
1589+ }
1590+ else throw("Strict value is not equal to itself.")
1591+ }
1592+ else throw("Strict value is not equal to itself.")
1593+ }
1594+ else throw("Strict value is not equal to itself.")
1595+ }
1596+ else throw("Strict value is not equal to itself.")
1597+ }
1598+ else throw("Strict value is not equal to itself.")
1599+ }
1600+
1601+
1602+
1603+@Callable(i)
1604+func unstakeAndGetOneTknV2 (unstakeAmount,outAssetId,minOutAmount) = {
1605+ let isPoolOneTokenOperationsDisabled = {
1606+ let @ = invoke(fca, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
1607+ if ($isInstanceOf(@, "Boolean"))
1608+ then @
1609+ else throw(($getType(@) + " couldn't be cast to Boolean"))
1610+ }
1611+ let isGetDisabled = if (if (igs())
1612+ then true
1613+ else (cfgPoolStatus == PoolShutdown))
1614+ then true
1615+ else isPoolOneTokenOperationsDisabled
1616+ let checks = [if (if (!(isGetDisabled))
1617+ then true
1618+ else isManager(i))
1619+ then true
1620+ else throwErr("get operation is blocked by admin"), if ((size(i.payments) == 0))
1621+ then true
1622+ else throwErr("no payments are expected")]
1623+ if ((checks == checks))
1624+ then {
1625+ let factoryCfg = gfc()
1626+ let lpAssetId = cfgLpAssetId
1627+ let staking = valueOrErrorMessage(addressFromString(factoryCfg[idxFactStakCntr]), "Wr st addr")
1628+ let userAddress = i.caller
1629+ let lpAssetRecipientAddress = this
1630+ let unstakeInv = invoke(staking, "unstakeINTERNAL", [lpAssetId, unstakeAmount, userAddress.bytes, lpAssetRecipientAddress.bytes], nil)
1631+ if ((unstakeInv == unstakeInv))
1632+ then {
1633+ let $t05542755615 = getOneTknV2Internal(outAssetId, minOutAmount, [AttachedPayment(lpAssetId, unstakeAmount)], i.caller, i.originCaller, i.transactionId)
1634+ let state = $t05542755615._1
1635+ let totalAmount = $t05542755615._2
1636+ $Tuple2(state, totalAmount)
1637+ }
1638+ else throw("Strict value is not equal to itself.")
1639+ }
1640+ else throw("Strict value is not equal to itself.")
1641+ }
1642+
1643+
1644+
1645+@Callable(i)
1646+func putOneTknV2WithBonusREADONLY (paymentAmountRaw,paymentAssetId) = {
1647+ let $t05574355846 = calcPutOneTkn(paymentAmountRaw, paymentAssetId, "", "", true)
1648+ let lpAmount = $t05574355846._1
1649+ let state = $t05574355846._2
1650+ let feeAmount = $t05574355846._3
1651+ let bonus = $t05574355846._4
1652+ $Tuple2(nil, $Tuple3(lpAmount, feeAmount, bonus))
1653+ }
1654+
1655+
1656+
1657+@Callable(i)
1658+func putOneTknV2WithoutTakeFeeREADONLY (paymentAmountRaw,paymentAssetId) = {
1659+ let $t05599456098 = calcPutOneTkn(paymentAmountRaw, paymentAssetId, "", "", false)
1660+ let lpAmount = $t05599456098._1
1661+ let state = $t05599456098._2
1662+ let feeAmount = $t05599456098._3
1663+ let bonus = $t05599456098._4
1664+ $Tuple2(nil, $Tuple3(lpAmount, feeAmount, bonus))
1665+ }
1666+
1667+
1668+
1669+@Callable(i)
1670+func activate (amtAsStr,prAsStr) = if ((toString(i.caller) != toString(fca)))
1671+ then throw("denied")
1672+ else $Tuple2([StringEntry(aa(), amtAsStr), StringEntry(pa(), prAsStr), StringEntry(amp(), toString(ampInitial))], "success")
1673+
1674+
1675+
1676+@Callable(i)
1677+func getPoolConfigWrapperREADONLY () = $Tuple2(nil, gpc())
1678+
1679+
1680+
1681+@Callable(i)
1682+func getAccBalanceWrapperREADONLY (assetId) = $Tuple2(nil, getAccBalance(assetId))
1683+
1684+
1685+
1686+@Callable(i)
1687+func calcPricesWrapperREADONLY (amAmt,prAmt,lpAmt) = {
1688+ let pr = calcPrices(amAmt, prAmt, lpAmt)
1689+ $Tuple2(nil, [toString(pr[0]), toString(pr[1]), toString(pr[2])])
1690+ }
1691+
1692+
1693+
1694+@Callable(i)
1695+func fromX18WrapperREADONLY (val,resScaleMult) = $Tuple2(nil, f1(parseBigIntValue(val), resScaleMult))
1696+
1697+
1698+
1699+@Callable(i)
1700+func toX18WrapperREADONLY (origVal,origScaleMult) = $Tuple2(nil, toString(t1(origVal, origScaleMult)))
1701+
1702+
1703+
1704+@Callable(i)
1705+func calcPriceBigIntWrapperREADONLY (prAmtX18,amAmtX18) = $Tuple2(nil, toString(cpbi(parseBigIntValue(prAmtX18), parseBigIntValue(amAmtX18))))
1706+
1707+
1708+
1709+@Callable(i)
1710+func estimatePutOperationWrapperREADONLY (txId58,slippage,inAmAmt,inAmId,inPrAmt,inPrId,usrAddr,isEval,emitLp) = $Tuple2(nil, epo(txId58, slippage, inAmAmt, inAmId, inPrAmt, inPrId, usrAddr, isEval, emitLp, true, false, 0, ""))
1711+
1712+
1713+
1714+@Callable(i)
1715+func estimateGetOperationWrapperREADONLY (txId58,pmtAsId,pmtLpAmt,usrAddr) = {
1716+ let r = ego(txId58, pmtAsId, pmtLpAmt, addressFromStringValue(usrAddr))
1717+ $Tuple2(nil, $Tuple10(r._1, r._2, r._3, r._4, r._5, r._6, r._7, toString(r._8), r._9, r._10))
1718+ }
1719+
1720+
1721+
1722+@Callable(i)
1723+func changeAmp () = {
1724+ let cfg = invoke(fca, "getChangeAmpConfigREADONLY", [toString(this)], nil)
1725+ let $t05850758706 = match cfg {
1726+ case list: List[Any] =>
1727+ $Tuple3({
1728+ let @ = list[0]
1729+ if ($isInstanceOf(@, "Int"))
1730+ then @
1731+ else throw(($getType(@) + " couldn't be cast to Int"))
1732+ }, {
1733+ let @ = list[1]
1734+ if ($isInstanceOf(@, "Int"))
1735+ then @
1736+ else throw(($getType(@) + " couldn't be cast to Int"))
1737+ }, {
1738+ let @ = list[2]
1739+ if ($isInstanceOf(@, "Int"))
1740+ then @
1741+ else throw(($getType(@) + " couldn't be cast to Int"))
1742+ })
1743+ case _ =>
1744+ throwErr("invalid entry type")
1745+ }
1746+ let delay = $t05850758706._1
1747+ let delta = $t05850758706._2
1748+ let target = $t05850758706._3
1749+ let curAmp = parseIntValue(getStringValue(amp()))
1750+ let newAmpRaw = (curAmp + delta)
1751+ let newAmp = if ((0 > delta))
1752+ then if ((target > newAmpRaw))
1753+ then target
1754+ else newAmpRaw
1755+ else if ((newAmpRaw > target))
1756+ then target
1757+ else newAmpRaw
1758+ let lastCall = valueOrElse(getInteger(keyChangeAmpLastCall()), 0)
1759+ let wait = (lastCall + delay)
1760+ let checks = [if ((height > wait))
1761+ then true
1762+ else throwErr("try again in few blocks"), if ((curAmp != newAmp))
1763+ then true
1764+ else throwErr("already reached target")]
1765+ if ((checks == checks))
1766+ then [IntegerEntry(keyChangeAmpLastCall(), height), StringEntry(amp(), toString(newAmp)), StringEntry(keyAmpHistory(height), toString(newAmp))]
1767+ else throw("Strict value is not equal to itself.")
1768+ }
1769+
1770+
1771+@Verifier(tx)
1772+func verify () = {
1773+ let targetPublicKey = match m() {
1774+ case pk: ByteVector =>
1775+ pk
1776+ case _: Unit =>
1777+ tx.senderPublicKey
1778+ case _ =>
1779+ throw("Match error")
1780+ }
1781+ match tx {
1782+ case order: Order =>
1783+ let matcherPub = mp()
1784+ let $t05961859735 = if (skipOrderValidation())
1785+ then $Tuple2(true, "")
1786+ else validateMatcherOrderAllowed(order)
1787+ let orderValid = $t05961859735._1
1788+ let orderValidInfo = $t05961859735._2
1789+ let senderValid = sigVerify(order.bodyBytes, order.proofs[0], order.senderPublicKey)
1790+ let matcherValid = sigVerify(order.bodyBytes, order.proofs[1], matcherPub)
1791+ if (if (if (orderValid)
1792+ then senderValid
1793+ else false)
1794+ then matcherValid
1795+ else false)
1796+ then true
1797+ else throwOrderError(orderValid, orderValidInfo, senderValid, matcherValid)
1798+ case s: SetScriptTransaction =>
1799+ if (sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey))
1800+ then true
1801+ else {
1802+ let newHash = blake2b256(value(s.script))
1803+ let allowedHash = fromBase64String(value(getString(fca, keyAllowedLpStableScriptHash())))
1804+ let currentHash = scriptHash(this)
1805+ if ((allowedHash == newHash))
1806+ then (currentHash != newHash)
1807+ else false
1808+ }
1809+ case _ =>
1810+ sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey)
1811+ }
1812+ }
1813+

github/deemru/w8io/026f985 
72.57 ms