tx · F7otVsd7AiXYeKHxX82NC1JjYCrebCmM5kG96GrzqaEj

3NAefciWv6f9fWvEXdGgpHfanJFG8HqfjuT:  -0.04100000 Waves

2023.07.11 16:34 [2661312] smart account 3NAefciWv6f9fWvEXdGgpHfanJFG8HqfjuT > SELF 0.00000000 Waves

{ "type": 13, "id": "F7otVsd7AiXYeKHxX82NC1JjYCrebCmM5kG96GrzqaEj", "fee": 4100000, "feeAssetId": null, "timestamp": 1689082575525, "version": 2, "chainId": 84, "sender": "3NAefciWv6f9fWvEXdGgpHfanJFG8HqfjuT", "senderPublicKey": "D1BL65meykxFZTCuq7jq9HSGLLnWvQamQPUNrguW5w39", "proofs": [ "3QeV7gkJ9rswtpf4bH45booqfB7FnjESFuKqaWHM1JtiBVFRoksDhvSbN8c8dwkr83sd1WSPC8KpYeHc2CE8qkWQ" ], "script": "base64:BgKGLQgCEgUKAwEEARIHCgUBBAEIARIDCgEIEgQKAgEEEgQKAgEEEgMKAQESABIECgIIARIAEgQKAggBEgQKAggBEgQKAgEBEgMKAQESBQoDAQEBEgUKAwEIARIECgIBCBIECgIBCBIECgIICBIAEgMKAQgSBQoDAQEBEgQKAggBEgQKAgEBEgQKAggIEgsKCQgBAQIBAggEBBIGCgQICAEIEgAiBnNjYWxlOCIMc2NhbGU4QmlnSW50IgdzY2FsZTE4Igp6ZXJvQmlnSW50IgRiaWcwIgRiaWcxIgRiaWcyIgRiaWczIgRiaWc0IgpzbGlwcGFnZTREIgt3YXZlc1N0cmluZyIKYW1wSW5pdGlhbCIFQW11bHQiBURjb252IgNTRVAiBUVNUFRZIgpQb29sQWN0aXZlIgpQb29sUHV0RGlzIhRQb29sUHV0QW5kTWF0Y2hlckRpcyIMUG9vbFNodXRkb3duIg5pZHhQb29sQWRkcmVzcyIJaWR4UG9vbFN0IglpZHhMUEFzSWQiCWlkeEFtQXNJZCIJaWR4UHJBc0lkIgtpZHhBbXRBc0RjbSINaWR4UHJpY2VBc0RjbSILaWR4SUFtdEFzSWQi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ZmYEAmFLCAUCaXkCXzEEAmFMCAUCaXkCXzIEAmFNCQD0AwMIBQJmZglib2R5Qnl0ZXMJAJEDAggFAmZmBnByb29mcwAACAUCZmYPc2VuZGVyUHVibGljS2V5BAJhTgkA9AMDCAUCZmYJYm9keUJ5dGVzCQCRAwIIBQJmZgZwcm9vZnMAAQUCaXgDAwMFAmFLBQJhTQcFAmFOBwYJAQJhSgQFAmFLBQJhTAUCYU0FAmFOAwkAAQIFAmFRAhRTZXRTY3JpcHRUcmFuc2FjdGlvbgQCYVYFAmFRAwkA9AMDCAUCaXUJYm9keUJ5dGVzCQCRAwIIBQJpdQZwcm9vZnMAAAUCaXcGBAJpegkA9gMBCQEFdmFsdWUBCAUCYVYGc2NyaXB0BAJpQQkA2wQBCQEFdmFsdWUBCQCdCAIFAmFVCQECYUYABAJpQgkA8QcBBQR0aGlzAwkAAAIFAmlBBQJpegkBAiE9AgUCaUIFAml6BwkA9AMDCAUCaXUJYm9keUJ5dGVzCQCRAwIIBQJpdQZwcm9vZnMAAAUCaXcMZGiI", "height": 2661312, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: AhEyMbZNaz8srCunnPeGDdsJhAz58puwxty4k9bzeLnR Next: GJeoZQ95hkv7RkNrgxgPMnpXTvSghbJhek6DuhX6JZVB Diff:
OldNewDifferences
3737
3838 let PoolPutDis = 2
3939
40-let PoolMatcherDis = 3
40+let PoolPutAndMatcherDis = 3
4141
4242 let PoolShutdown = 4
4343
263263
264264 let poolConfigParsed = parsePoolConfig(gpc())
265265
266-let $t086088794 = poolConfigParsed
266+let $t086168802 = poolConfigParsed
267267
268-let cfgPoolAddress = $t086088794._1
268+let cfgPoolAddress = $t086168802._1
269269
270-let cfgPoolStatus = $t086088794._2
270+let cfgPoolStatus = $t086168802._2
271271
272-let cfgLpAssetId = $t086088794._3
272+let cfgLpAssetId = $t086168802._3
273273
274-let cfgAmountAssetId = $t086088794._4
274+let cfgAmountAssetId = $t086168802._4
275275
276-let cfgPriceAssetId = $t086088794._5
276+let cfgPriceAssetId = $t086168802._5
277277
278-let cfgAmountAssetDecimals = $t086088794._6
278+let cfgAmountAssetDecimals = $t086168802._6
279279
280-let cfgPriceAssetDecimals = $t086088794._7
280+let cfgPriceAssetDecimals = $t086168802._7
281281
282282 func gfc () = split(strf(fca, fcfg()), SEP)
283283
398398 }
399399
400400 let arr = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16]
401- let $t01329913347 = {
401+ let $t01330713355 = {
402402 let $l = arr
403403 let $s = size($l)
404404 let $acc0 = $Tuple2(s, false)
412412
413413 $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)
414414 }
415- let d = $t01329913347._1
416- let found = $t01329913347._2
415+ let d = $t01330713355._1
416+ let found = $t01330713355._2
417417 if (found)
418418 then d
419419 else throw(("D calculation error, D = " + toString(d)))
547547 else calcLpAmt
548548 let amDiff = (inAmAmt - calcAmAssetPmt)
549549 let prDiff = (inPrAmt - calcPrAssetPmt)
550- let $t02110921454 = if (if (isOneAsset)
550+ let $t02111721462 = if (if (isOneAsset)
551551 then (pmtId == amIdStr)
552552 else false)
553553 then $Tuple2(pmtAmt, 0)
556556 else false)
557557 then $Tuple2(0, pmtAmt)
558558 else $Tuple2(calcAmAssetPmt, calcPrAssetPmt)
559- let writeAmAmt = $t02110921454._1
560- let writePrAmt = $t02110921454._2
559+ let writeAmAmt = $t02111721462._1
560+ let writePrAmt = $t02111721462._2
561561 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))]
562562 $Tuple13(calcLpAmt, emitLpAmt, curPrice, amBalance, prBalance, lpEm, lpId, sts, commonState, amDiff, prDiff, inAmId, inPrId)
563563 }
576576 let c = (((((D * D) / (x * n)) * D) * aPrecision) / (ann * n))
577577 let b = ((s + ((D * aPrecision) / ann)) - D)
578578 func calc (acc,cur) = {
579- let $t02264922669 = acc
580- let y = $t02264922669._1
581- let found = $t02264922669._2
579+ let $t02265722677 = acc
580+ let y = $t02265722677._1
581+ let found = $t02265722677._2
582582 if ((found != unit))
583583 then acc
584584 else {
591591 }
592592
593593 let arr = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
594- let $t02297623023 = {
594+ let $t02298423031 = {
595595 let $l = arr
596596 let $s = size($l)
597597 let $acc0 = $Tuple2(D, unit)
605605
606606 $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)
607607 }
608- let y = $t02297623023._1
609- let found = $t02297623023._2
608+ let y = $t02298423031._1
609+ let found = $t02298423031._2
610610 if ((found != unit))
611611 then y
612612 else throw(("Y calculation error, Y = " + toString(y)))
640640 }
641641
642642
643-func validateUpdatedDLp (oldDLp,updatedDLp) = if (if ((updatedDLp == big0))
644- then true
645- else (updatedDLp >= oldDLp))
643+func validateUpdatedDLp (oldDLp,updatedDLp) = if ((updatedDLp >= oldDLp))
646644 then true
647645 else throwErr("updated DLp lower than current DLp")
648646
652650 let priceAssetBalance = getAccBalance(assetIdToString(cfgPriceAssetId))
653651 let amountAssetAmount = order.amount
654652 let priceAssetAmount = fraction(order.amount, order.price, scale8, FLOOR)
655- let $t02524325455 = if ((order.orderType == Buy))
653+ let $t02522925441 = if ((order.orderType == Buy))
656654 then $Tuple2(amountAssetAmount, -(priceAssetAmount))
657655 else $Tuple2(-(amountAssetAmount), priceAssetAmount)
658- let amountAssetBalanceDelta = $t02524325455._1
659- let priceAssetBalanceDelta = $t02524325455._2
656+ let amountAssetBalanceDelta = $t02522925441._1
657+ let priceAssetBalanceDelta = $t02522925441._2
660658 if (if (if (igs())
661659 then true
662- else (cfgPoolStatus == PoolMatcherDis))
660+ else (cfgPoolStatus == PoolPutAndMatcherDis))
663661 then true
664662 else (cfgPoolStatus == PoolShutdown))
665663 then throw("Admin blocked")
669667 then throw("Wr assets")
670668 else {
671669 let dLp = parseBigIntValue(valueOrElse(getString(this, keyDLp), "0"))
672- let $t02579725897 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
673- let unusedActions = $t02579725897._1
674- let dLpNew = $t02579725897._2
670+ let $t02578925889 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
671+ let unusedActions = $t02578925889._1
672+ let dLpNew = $t02578925889._2
675673 let isOrderValid = (dLpNew >= dLp)
676674 let info = makeString(["dLp=", toString(dLp), " dLpNew=", toString(dLpNew), " amountAssetBalance=", toString(amountAssetBalance), " priceAssetBalance=", toString(priceAssetBalance), " amountAssetBalanceDelta=", toString(amountAssetBalanceDelta), " priceAssetBalanceDelta=", toString(priceAssetBalanceDelta), " height=", toString(height)], "")
677675 $Tuple2(isOrderValid, info)
701699 func cp (caller,txId,amAsPmt,prAsPmt,slippage,emitLp,isOneAsset,validateSlippage,pmtAmt,pmtId) = {
702700 let r = epo(txId, slippage, value(amAsPmt).amount, value(amAsPmt).assetId, value(prAsPmt).amount, value(prAsPmt).assetId, caller, (txId == ""), emitLp, isOneAsset, validateSlippage, pmtAmt, pmtId)
703701 let sts = parseIntValue(r._8)
704- if (if (if (igs())
702+ if (if (if (if (igs())
705703 then true
706704 else (sts == PoolPutDis))
705+ then true
706+ else (sts == PoolPutAndMatcherDis))
707707 then true
708708 else (sts == PoolShutdown))
709709 then throw(("Blocked:" + toString(sts)))
725725 then {
726726 let amBalance = getAccBalance(amId)
727727 let prBalance = getAccBalance(prId)
728- let $t02855329015 = if ((txId == ""))
728+ let $t02860629068 = if ((txId == ""))
729729 then $Tuple2(amBalance, prBalance)
730730 else if ((pmtAssetId == amId))
731731 then if ((pmtAmtRaw > amBalance))
736736 then throw("invalid payment amount")
737737 else $Tuple2(amBalance, (prBalance - pmtAmtRaw))
738738 else throw("wrong pmtAssetId")
739- let amBalanceOld = $t02855329015._1
740- let prBalanceOld = $t02855329015._2
741- let $t02902129197 = if ((pmtAssetId == amId))
739+ let amBalanceOld = $t02860629068._1
740+ let prBalanceOld = $t02860629068._2
741+ let $t02907429250 = if ((pmtAssetId == amId))
742742 then $Tuple2(pmtAmtRaw, 0)
743743 else if ((pmtAssetId == prId))
744744 then $Tuple2(0, pmtAmtRaw)
745745 else throw("invalid payment")
746- let amAmountRaw = $t02902129197._1
747- let prAmountRaw = $t02902129197._2
748- let $t02920129455 = if (withTakeFee)
746+ let amAmountRaw = $t02907429250._1
747+ let prAmountRaw = $t02907429250._2
748+ let $t02925429508 = if (withTakeFee)
749749 then $Tuple3(takeFee(amAmountRaw, inFee)._1, takeFee(prAmountRaw, inFee)._1, takeFee(pmtAmtRaw, inFee)._2)
750750 else $Tuple3(amAmountRaw, prAmountRaw, 0)
751- let amAmount = $t02920129455._1
752- let prAmount = $t02920129455._2
753- let feeAmount = $t02920129455._3
751+ let amAmount = $t02925429508._1
752+ let prAmount = $t02925429508._2
753+ let feeAmount = $t02925429508._3
754754 let amBalanceNew = (amBalanceOld + amAmount)
755755 let prBalanceNew = (prBalanceOld + prAmount)
756756 let D0 = getD([t1(amBalanceOld, cfgAmountAssetDecimals), t1(prBalanceOld, cfgPriceAssetDecimals)])
798798 else {
799799 let amBalance = getAccBalance(amId)
800800 let prBalance = getAccBalance(prId)
801- let $t03156731678 = {
801+ let $t03162031731 = {
802802 let @ = invoke(this, "getOneTknV2READONLY", [outAssetId, pmtAmt], nil)
803803 if ($isInstanceOf(@, "(Int, Int)"))
804804 then @
805805 else throw(($getType(@) + " couldn't be cast to (Int, Int)"))
806806 }
807- if (($t03156731678 == $t03156731678))
807+ if (($t03162031731 == $t03162031731))
808808 then {
809- let feeAmount = $t03156731678._2
810- let totalGet = $t03156731678._1
809+ let feeAmount = $t03162031731._2
810+ let totalGet = $t03162031731._1
811811 let totalAmount = if (if ((minOutAmount > 0))
812812 then (minOutAmount > totalGet)
813813 else false)
814814 then throwErr(makeString(["amount to receive is less than ", toString(minOutAmount)], ""))
815815 else totalGet
816- let $t03186832175 = if ((outAssetId == amId))
816+ let $t03192132228 = if ((outAssetId == amId))
817817 then $Tuple4(totalAmount, 0, ((amBalance - totalAmount) - feeAmount), prBalance)
818818 else if ((outAssetId == prId))
819819 then $Tuple4(0, totalAmount, amBalance, ((prBalance - totalAmount) - feeAmount))
820820 else throw("invalid out asset id")
821- let outAm = $t03186832175._1
822- let outPr = $t03186832175._2
823- let amBalanceNew = $t03186832175._3
824- let prBalanceNew = $t03186832175._4
821+ let outAm = $t03192132228._1
822+ let outPr = $t03192132228._2
823+ let amBalanceNew = $t03192132228._3
824+ let prBalanceNew = $t03192132228._4
825825 let curPrX18 = cpbi(t1(prBalanceNew, prDecimals), t1(amBalanceNew, amDecimals))
826826 let curPr = f1(curPrX18, scale8)
827827 let outAssetIdOrWaves = if ((outAssetId == "WAVES"))
836836 let burn = invoke(fca, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
837837 if ((burn == burn))
838838 then {
839- let $t03296033310 = {
839+ let $t03301333363 = {
840840 let feeAmountForCalc = if ((this == feeCollectorAddress))
841841 then 0
842842 else feeAmount
847847 then $Tuple2(-((totalGet + feeAmountForCalc)), 0)
848848 else $Tuple2(0, -((totalGet + feeAmountForCalc)))
849849 }
850- let amountAssetBalanceDelta = $t03296033310._1
851- let priceAssetBalanceDelta = $t03296033310._2
852- let $t03331333421 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
853- let refreshDLpActions = $t03331333421._1
854- let updatedDLp = $t03331333421._2
850+ let amountAssetBalanceDelta = $t03301333363._1
851+ let priceAssetBalanceDelta = $t03301333363._2
852+ let $t03336633474 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
853+ let refreshDLpActions = $t03336633474._1
854+ let updatedDLp = $t03336633474._2
855855 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
856856 if ((isUpdatedDLpValid == isUpdatedDLpValid))
857857 then $Tuple2((state ++ refreshDLpActions), totalAmount)
923923 let c = (((((D * D) / (x * n)) * D) * aPrecision) / (ann * n))
924924 let b = ((s + ((D * aPrecision) / ann)) - D)
925925 func calc (acc,cur) = {
926- let $t03490834928 = acc
927- let y = $t03490834928._1
928- let found = $t03490834928._2
926+ let $t03496134981 = acc
927+ let y = $t03496134981._1
928+ let found = $t03496134981._2
929929 if ((found != unit))
930930 then acc
931931 else {
938938 }
939939
940940 let arr = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
941- let $t03525935306 = {
941+ let $t03531235359 = {
942942 let $l = arr
943943 let $s = size($l)
944944 let $acc0 = $Tuple2(D, unit)
952952
953953 $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)
954954 }
955- let y = $t03525935306._1
956- let found = $t03525935306._2
955+ let y = $t03531235359._1
956+ let found = $t03531235359._2
957957 if ((found != unit))
958958 then y
959959 else throw(("Y calculation error, Y = " + toString(y)))
965965
966966 @Callable(i)
967967 func calculateAmountOutForSwapREADONLY (cleanAmountIn,isReverse,feePoolAmount) = {
968- let $t03565836082 = if ((isReverse == false))
968+ let $t03571136135 = if ((isReverse == false))
969969 then {
970970 let assetOut = strf(this, pa())
971971 let poolAmountInBalance = (toBigInt(getAccBalance(strf(this, aa()))) + toBigInt(cleanAmountIn))
976976 let poolAmountInBalance = (toBigInt(getAccBalance(strf(this, pa()))) + toBigInt(cleanAmountIn))
977977 $Tuple2(assetOut, poolAmountInBalance)
978978 }
979- let assetOut = $t03565836082._1
980- let poolAmountInBalance = $t03565836082._2
979+ let assetOut = $t03571136135._1
980+ let poolAmountInBalance = $t03571136135._2
981981 let poolConfig = gpc()
982982 let amId = poolConfig[idxAmAsId]
983983 let prId = poolConfig[idxPrAsId]
10171017 then {
10181018 let pmt = value(i.payments[0])
10191019 let assetIn = assetIdToString(pmt.assetId)
1020- let $t03751837912 = if ((isReverse == false))
1020+ let $t03757137965 = if ((isReverse == false))
10211021 then {
10221022 let assetOut = strf(this, pa())
10231023 let poolAmountInBalance = (getAccBalance(assetIn) - value(i.payments[0]).amount)
10281028 let poolAmountInBalance = (getAccBalance(assetIn) - value(i.payments[0]).amount)
10291029 $Tuple2(assetOut, poolAmountInBalance)
10301030 }
1031- let assetOut = $t03751837912._1
1032- let poolAmountInBalance = $t03751837912._2
1031+ let assetOut = $t03757137965._1
1032+ let poolAmountInBalance = $t03757137965._2
10331033 let poolConfig = gpc()
10341034 let amId = poolConfig[idxAmAsId]
10351035 let prId = poolConfig[idxPrAsId]
11341134 else throw("Strict value is not equal to itself.")
11351135 }
11361136 else [ScriptTransfer(i.caller, emitLpAmt, lpAssetId)]
1137- let $t04205642198 = refreshDLpInternal(0, 0, 0)
1138- let refreshDLpActions = $t04205642198._1
1139- let updatedDLp = $t04205642198._2
1137+ let $t04210942251 = refreshDLpInternal(0, 0, 0)
1138+ let refreshDLpActions = $t04210942251._1
1139+ let updatedDLp = $t04210942251._2
11401140 let check = if ((updatedDLp >= currentDLp))
11411141 then true
11421142 else throwErr(makeString(["updated DLp lower than current DLp", toString(amountAssetBalance), toString(priceAssetBalance), toString(lpAssetEmission), toString(currentDLp), toString(updatedDLp), toString(amDiff), toString(prDiff)], " "))
11771177 then @
11781178 else throw(($getType(@) + " couldn't be cast to Boolean"))
11791179 }
1180- let isPutDisabled = if (if (if (igs())
1180+ let isPutDisabled = if (if (if (if (igs())
11811181 then true
11821182 else (cfgPoolStatus == PoolPutDis))
1183+ then true
1184+ else (cfgPoolStatus == PoolPutAndMatcherDis))
11831185 then true
11841186 else (cfgPoolStatus == PoolShutdown))
11851187 then true
12091211 else calcCurrentDLp(toBigInt(0), toBigInt(pmtAmt), toBigInt(0))
12101212 if ((currentDLp == currentDLp))
12111213 then {
1212- let $t04383943997 = calcPutOneTkn(pmtAmt, pmtAssetId, toString(userAddress), toBase58String(i.transactionId), true)
1213- if (($t04383943997 == $t04383943997))
1214+ let $t04395444112 = calcPutOneTkn(pmtAmt, pmtAssetId, toString(userAddress), toBase58String(i.transactionId), true)
1215+ if (($t04395444112 == $t04395444112))
12141216 then {
1215- let feeAmount = $t04383943997._3
1216- let state = $t04383943997._2
1217- let estimLP = $t04383943997._1
1217+ let feeAmount = $t04395444112._3
1218+ let state = $t04395444112._2
1219+ let estimLP = $t04395444112._1
12181220 let emitLpAmt = if (if ((minOutAmount > 0))
12191221 then (minOutAmount > estimLP)
12201222 else false)
12421244 let sendFeeToMatcher = if ((feeAmount > 0))
12431245 then [ScriptTransfer(feeCollectorAddress, feeAmount, fromBase58String(pmtAssetId))]
12441246 else nil
1245- let $t04488245231 = if ((this == feeCollectorAddress))
1247+ let $t04499745346 = if ((this == feeCollectorAddress))
12461248 then $Tuple2(0, 0)
12471249 else {
12481250 let paymentInAmountAsset = if ((pmt.assetId == cfgAmountAssetId))
12521254 then $Tuple2(-(feeAmount), 0)
12531255 else $Tuple2(0, -(feeAmount))
12541256 }
1255- let amountAssetBalanceDelta = $t04488245231._1
1256- let priceAssetBalanceDelta = $t04488245231._2
1257- let $t04523445342 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
1258- let refreshDLpActions = $t04523445342._1
1259- let updatedDLp = $t04523445342._2
1257+ let amountAssetBalanceDelta = $t04499745346._1
1258+ let priceAssetBalanceDelta = $t04499745346._2
1259+ let $t04534945457 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
1260+ let refreshDLpActions = $t04534945457._1
1261+ let updatedDLp = $t04534945457._2
12601262 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
12611263 if ((isUpdatedDLpValid == isUpdatedDLpValid))
12621264 then $Tuple2((((state ++ lpTrnsfr) ++ sendFeeToMatcher) ++ refreshDLpActions), emitLpAmt)
12881290 let currentDLp = calcCurrentDLp(amAssetPmt, prAssetPmt, toBigInt(0))
12891291 if ((currentDLp == currentDLp))
12901292 then {
1291- let $t04637246437 = refreshDLpInternal(0, 0, 0)
1292- let refreshDLpActions = $t04637246437._1
1293- let updatedDLp = $t04637246437._2
1293+ let $t04648746552 = refreshDLpInternal(0, 0, 0)
1294+ let refreshDLpActions = $t04648746552._1
1295+ let updatedDLp = $t04648746552._2
12941296 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
12951297 if ((isUpdatedDLpValid == isUpdatedDLpValid))
12961298 then (state ++ refreshDLpActions)
13151317 let b = invoke(fca, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
13161318 if ((b == b))
13171319 then {
1318- let $t04761047692 = refreshDLpInternal(-(outAmtAmt), -(outPrAmt), 0)
1319- let refreshDLpActions = $t04761047692._1
1320- let updatedDLp = $t04761047692._2
1320+ let $t04772547807 = refreshDLpInternal(-(outAmtAmt), -(outPrAmt), 0)
1321+ let refreshDLpActions = $t04772547807._1
1322+ let updatedDLp = $t04772547807._2
13211323 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
13221324 if ((isUpdatedDLpValid == isUpdatedDLpValid))
13231325 then (state ++ refreshDLpActions)
13521354 else throwErr("exactly 1 payment are expected")]
13531355 if ((checks == checks))
13541356 then {
1355- let $t04831048465 = getOneTknV2Internal(outAssetId, minOutAmount, i.payments, i.caller, i.originCaller, i.transactionId)
1356- let state = $t04831048465._1
1357- let totalAmount = $t04831048465._2
1357+ let $t04842548580 = getOneTknV2Internal(outAssetId, minOutAmount, i.payments, i.caller, i.originCaller, i.transactionId)
1358+ let state = $t04842548580._1
1359+ let totalAmount = $t04842548580._2
13581360 $Tuple2(state, totalAmount)
13591361 }
13601362 else throw("Strict value is not equal to itself.")
13711373 if ((checkLastRefreshedBlockHeight == checkLastRefreshedBlockHeight))
13721374 then {
13731375 let dLp = valueOrErrorMessage(parseBigInt(valueOrElse(getString(this, keyDLp), "0")), fmtErr("invalid dLp"))
1374- let $t04898949053 = refreshDLpInternal(0, 0, 0)
1375- let dLpUpdateActions = $t04898949053._1
1376- let updatedDLp = $t04898949053._2
1376+ let $t04910449168 = refreshDLpInternal(0, 0, 0)
1377+ let dLpUpdateActions = $t04910449168._1
1378+ let updatedDLp = $t04910449168._2
13771379 let actions = if ((dLp != updatedDLp))
13781380 then dLpUpdateActions
13791381 else throwErr("nothing to refresh")
14011403 let newY = getYD(xp, index, D1)
14021404 let dy = (xp[index] - newY)
14031405 let totalGetRaw = max([0, toInt((dy - big1))])
1404- let $t05006350118 = takeFee(totalGetRaw, outFee)
1405- let totalGet = $t05006350118._1
1406- let feeAmount = $t05006350118._2
1406+ let $t05017850233 = takeFee(totalGetRaw, outFee)
1407+ let totalGet = $t05017850233._1
1408+ let feeAmount = $t05017850233._2
14071409 $Tuple2(nil, $Tuple2(totalGet, feeAmount))
14081410 }
14091411
14161418 let lpId = toBase58String(value(cfgLpAssetId))
14171419 let amBalance = getAccBalance(amId)
14181420 let prBalance = getAccBalance(prId)
1419- let $t05049350608 = {
1421+ let $t05060850723 = {
14201422 let @ = invoke(this, "getOneTknV2READONLY", [outAssetId, lpAssetAmount], nil)
14211423 if ($isInstanceOf(@, "(Int, Int)"))
14221424 then @
14231425 else throw(($getType(@) + " couldn't be cast to (Int, Int)"))
14241426 }
1425- let totalGet = $t05049350608._1
1426- let feeAmount = $t05049350608._2
1427+ let totalGet = $t05060850723._1
1428+ let feeAmount = $t05060850723._2
14271429 let r = ego("", lpId, lpAssetAmount, this)
14281430 let outAmAmt = r._1
14291431 let outPrAmt = r._2
14571459 let burnLPAssetOnFactory = invoke(fca, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
14581460 if ((burnLPAssetOnFactory == burnLPAssetOnFactory))
14591461 then {
1460- let $t05177451855 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1461- let refreshDLpActions = $t05177451855._1
1462- let updatedDLp = $t05177451855._2
1462+ let $t05188951970 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1463+ let refreshDLpActions = $t05188951970._1
1464+ let updatedDLp = $t05188951970._2
14631465 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
14641466 if ((isUpdatedDLpValid == isUpdatedDLpValid))
14651467 then (state ++ refreshDLpActions)
15041506 let burnA = invoke(fca, "burn", [amount], [AttachedPayment(lpAssetId, amount)])
15051507 if ((burnA == burnA))
15061508 then {
1507- let $t05288252963 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1508- let refreshDLpActions = $t05288252963._1
1509- let updatedDLp = $t05288252963._2
1509+ let $t05299753078 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1510+ let refreshDLpActions = $t05299753078._1
1511+ let updatedDLp = $t05299753078._2
15101512 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
15111513 if ((isUpdatedDLpValid == isUpdatedDLpValid))
15121514 then (state ++ refreshDLpActions)
15571559 let burnLPAssetOnFactory = invoke(fca, "burn", [unstakeAmount], [AttachedPayment(cfgLpAssetId, unstakeAmount)])
15581560 if ((burnLPAssetOnFactory == burnLPAssetOnFactory))
15591561 then {
1560- let $t05421454295 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1561- let refreshDLpActions = $t05421454295._1
1562- let updatedDLp = $t05421454295._2
1562+ let $t05432954410 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1563+ let refreshDLpActions = $t05432954410._1
1564+ let updatedDLp = $t05432954410._2
15631565 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
15641566 if ((isUpdatedDLpValid == isUpdatedDLpValid))
15651567 then (state ++ refreshDLpActions)
16081610 let unstakeInv = invoke(staking, "unstakeINTERNAL", [lpAssetId, unstakeAmount, userAddress.bytes, lpAssetRecipientAddress.bytes], nil)
16091611 if ((unstakeInv == unstakeInv))
16101612 then {
1611- let $t05531755505 = getOneTknV2Internal(outAssetId, minOutAmount, [AttachedPayment(lpAssetId, unstakeAmount)], i.caller, i.originCaller, i.transactionId)
1612- let state = $t05531755505._1
1613- let totalAmount = $t05531755505._2
1613+ let $t05543255620 = getOneTknV2Internal(outAssetId, minOutAmount, [AttachedPayment(lpAssetId, unstakeAmount)], i.caller, i.originCaller, i.transactionId)
1614+ let state = $t05543255620._1
1615+ let totalAmount = $t05543255620._2
16141616 $Tuple2(state, totalAmount)
16151617 }
16161618 else throw("Strict value is not equal to itself.")
16221624
16231625 @Callable(i)
16241626 func putOneTknV2WithBonusREADONLY (paymentAmountRaw,paymentAssetId) = {
1625- let $t05563355736 = calcPutOneTkn(paymentAmountRaw, paymentAssetId, "", "", true)
1626- let lpAmount = $t05563355736._1
1627- let state = $t05563355736._2
1628- let feeAmount = $t05563355736._3
1629- let bonus = $t05563355736._4
1627+ let $t05574855851 = calcPutOneTkn(paymentAmountRaw, paymentAssetId, "", "", true)
1628+ let lpAmount = $t05574855851._1
1629+ let state = $t05574855851._2
1630+ let feeAmount = $t05574855851._3
1631+ let bonus = $t05574855851._4
16301632 $Tuple2(nil, $Tuple3(lpAmount, feeAmount, bonus))
16311633 }
16321634
16341636
16351637 @Callable(i)
16361638 func putOneTknV2WithoutTakeFeeREADONLY (paymentAmountRaw,paymentAssetId) = {
1637- let $t05588455988 = calcPutOneTkn(paymentAmountRaw, paymentAssetId, "", "", false)
1638- let lpAmount = $t05588455988._1
1639- let state = $t05588455988._2
1640- let feeAmount = $t05588455988._3
1641- let bonus = $t05588455988._4
1639+ let $t05599956103 = calcPutOneTkn(paymentAmountRaw, paymentAssetId, "", "", false)
1640+ let lpAmount = $t05599956103._1
1641+ let state = $t05599956103._2
1642+ let feeAmount = $t05599956103._3
1643+ let bonus = $t05599956103._4
16421644 $Tuple2(nil, $Tuple3(lpAmount, feeAmount, bonus))
16431645 }
16441646
17001702 @Callable(i)
17011703 func changeAmp () = {
17021704 let cfg = invoke(fca, "getChangeAmpConfigREADONLY", [toString(this)], nil)
1703- let $t05839758596 = match cfg {
1705+ let $t05851258711 = match cfg {
17041706 case list: List[Any] =>
17051707 $Tuple3({
17061708 let @ = list[0]
17211723 case _ =>
17221724 throwErr("invalid entry type")
17231725 }
1724- let delay = $t05839758596._1
1725- let delta = $t05839758596._2
1726- let target = $t05839758596._3
1726+ let delay = $t05851258711._1
1727+ let delta = $t05851258711._2
1728+ let target = $t05851258711._3
17271729 let curAmp = parseIntValue(getStringValue(amp()))
17281730 let newAmpRaw = (curAmp + delta)
17291731 let newAmp = if ((0 > delta))
17591761 match tx {
17601762 case order: Order =>
17611763 let matcherPub = mp()
1762- let $t05952959646 = if (skipOrderValidation())
1764+ let $t05964459761 = if (skipOrderValidation())
17631765 then $Tuple2(true, "")
17641766 else validateMatcherOrderAllowed(order)
1765- let orderValid = $t05952959646._1
1766- let orderValidInfo = $t05952959646._2
1767+ let orderValid = $t05964459761._1
1768+ let orderValidInfo = $t05964459761._2
17671769 let senderValid = sigVerify(order.bodyBytes, order.proofs[0], order.senderPublicKey)
17681770 let matcherValid = sigVerify(order.bodyBytes, order.proofs[1], matcherPub)
17691771 if (if (if (orderValid)
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let scale8 = 100000000
55
66 let scale8BigInt = toBigInt(100000000)
77
88 let scale18 = toBigInt(1000000000000000000)
99
1010 let zeroBigInt = toBigInt(0)
1111
1212 let big0 = toBigInt(0)
1313
1414 let big1 = toBigInt(1)
1515
1616 let big2 = toBigInt(2)
1717
1818 let big3 = toBigInt(3)
1919
2020 let big4 = toBigInt(4)
2121
2222 let slippage4D = toBigInt((scale8 - ((scale8 * 1) / scale8)))
2323
2424 let wavesString = "WAVES"
2525
2626 let ampInitial = 50
2727
2828 let Amult = "100"
2929
3030 let Dconv = "1"
3131
3232 let SEP = "__"
3333
3434 let EMPTY = ""
3535
3636 let PoolActive = 1
3737
3838 let PoolPutDis = 2
3939
40-let PoolMatcherDis = 3
40+let PoolPutAndMatcherDis = 3
4141
4242 let PoolShutdown = 4
4343
4444 let idxPoolAddress = 1
4545
4646 let idxPoolSt = 2
4747
4848 let idxLPAsId = 3
4949
5050 let idxAmAsId = 4
5151
5252 let idxPrAsId = 5
5353
5454 let idxAmtAsDcm = 6
5555
5656 let idxPriceAsDcm = 7
5757
5858 let idxIAmtAsId = 8
5959
6060 let idxIPriceAsId = 9
6161
6262 let idxFactStakCntr = 1
6363
6464 let idxFactoryRestCntr = 6
6565
6666 let idxFactSlippCntr = 7
6767
6868 let idxFactGwxRewCntr = 10
6969
7070 let feeDefault = fraction(10, scale8, 10000)
7171
7272 func t1 (origVal,origScaleMult) = fraction(toBigInt(origVal), scale18, toBigInt(origScaleMult))
7373
7474
7575 func t1BigInt (origVal,origScaleMult) = fraction(origVal, scale18, origScaleMult)
7676
7777
7878 func f1 (val,resultScaleMult) = toInt(fraction(val, toBigInt(resultScaleMult), scale18))
7979
8080
8181 func fromX18Round (val,resultScaleMult,round) = toInt(fraction(val, toBigInt(resultScaleMult), scale18, round))
8282
8383
8484 func t2 (origVal,origScaleMult) = fraction(origVal, scale18, toBigInt(origScaleMult))
8585
8686
8787 func f2 (val,resultScaleMult) = fraction(val, toBigInt(resultScaleMult), scale18)
8888
8989
9090 func ts (amt,resScale,curScale) = fraction(amt, resScale, curScale)
9191
9292
9393 func abs (val) = if ((zeroBigInt > val))
9494 then -(val)
9595 else val
9696
9797
9898 func absBigInt (val) = if ((zeroBigInt > val))
9999 then -(val)
100100 else val
101101
102102
103103 func fc () = "%s__factoryContract"
104104
105105
106106 func keyManagerPublicKey () = "%s__managerPublicKey"
107107
108108
109109 func keyManagerVaultAddress () = "%s__managerVaultAddress"
110110
111111
112112 func pl () = "%s%s__price__last"
113113
114114
115115 func ph (h,t) = makeString(["%s%s%d%d__price__history", toString(h), toString(t)], SEP)
116116
117117
118118 func pau (ua,txId) = ((("%s%s%s__P__" + ua) + "__") + txId)
119119
120120
121121 func gau (ua,txId) = ((("%s%s%s__G__" + ua) + "__") + txId)
122122
123123
124124 func aa () = "%s__amountAsset"
125125
126126
127127 func pa () = "%s__priceAsset"
128128
129129
130130 func amp () = "%s__amp"
131131
132132
133133 func keyAmpHistory (heightBlocks) = ("%s%d__amp__" + toString(heightBlocks))
134134
135135
136136 func keyChangeAmpLastCall () = "%s__changeAmpLastCall"
137137
138138
139139 let keyFee = "%s__fee"
140140
141141 let fee = valueOrElse(getInteger(this, keyFee), feeDefault)
142142
143143 let keyDLp = makeString(["%s", "dLp"], SEP)
144144
145145 let keyDLpRefreshedHeight = makeString(["%s", "dLpRefreshedHeight"], SEP)
146146
147147 let keyDLpRefreshDelay = makeString(["%s", "refreshDLpDelay"], SEP)
148148
149149 let dLpRefreshDelayDefault = 30
150150
151151 let dLpRefreshDelay = valueOrElse(getInteger(this, keyDLpRefreshDelay), dLpRefreshDelayDefault)
152152
153153 func fcfg () = "%s__factoryConfig"
154154
155155
156156 func mtpk () = "%s%s__matcher__publicKey"
157157
158158
159159 func pc (iAmtAs,iPrAs) = (((("%d%d%s__" + iAmtAs) + "__") + iPrAs) + "__config")
160160
161161
162162 func mba (bAStr) = ("%s%s%s__mappings__baseAsset2internalId__" + bAStr)
163163
164164
165165 func aps () = "%s__shutdown"
166166
167167
168168 func keyAllowedLpStableScriptHash () = "%s__allowedLpStableScriptHash"
169169
170170
171171 func keyFeeCollectorAddress () = "%s__feeCollectorAddress"
172172
173173
174174 func keySkipOrderValidation (poolAddress) = ("%s%s__skipOrderValidation__" + poolAddress)
175175
176176
177177 func throwOrderError (orderValid,orderValidInfo,senderValid,matcherValid) = throw((((((((("order validation failed: orderValid=" + toString(orderValid)) + " (") + orderValidInfo) + ")") + " senderValid=") + toString(senderValid)) + " matcherValid=") + toString(matcherValid)))
178178
179179
180180 func addressFromStringOrThis (addressString) = match addressFromString(addressString) {
181181 case a: Address =>
182182 a
183183 case _ =>
184184 this
185185 }
186186
187187
188188 func getManagerVaultAddressOrThis () = {
189189 let factoryAddress = match getString(fc()) {
190190 case fca: String =>
191191 addressFromStringOrThis(fca)
192192 case _ =>
193193 this
194194 }
195195 match getString(factoryAddress, keyManagerVaultAddress()) {
196196 case s: String =>
197197 addressFromStringOrThis(s)
198198 case _ =>
199199 this
200200 }
201201 }
202202
203203
204204 func strf (addr,key) = valueOrErrorMessage(getString(addr, key), makeString(["mandatory ", toString(addr), ".", key, " not defined"], ""))
205205
206206
207207 func intf (addr,key) = valueOrErrorMessage(getInteger(addr, key), makeString(["mandatory ", toString(addr), ".", key, " not defined"], ""))
208208
209209
210210 func throwErr (msg) = throw(makeString(["lp_stable.ride:", msg], " "))
211211
212212
213213 func fmtErr (msg) = makeString(["lp_stable.ride:", msg], " ")
214214
215215
216216 let fca = addressFromStringValue(strf(this, fc()))
217217
218218 let inFee = {
219219 let @ = invoke(fca, "getInFeeREADONLY", [toString(this)], nil)
220220 if ($isInstanceOf(@, "Int"))
221221 then @
222222 else throw(($getType(@) + " couldn't be cast to Int"))
223223 }
224224
225225 let outFee = {
226226 let @ = invoke(fca, "getOutFeeREADONLY", [toString(this)], nil)
227227 if ($isInstanceOf(@, "Int"))
228228 then @
229229 else throw(($getType(@) + " couldn't be cast to Int"))
230230 }
231231
232232 let A = strf(this, amp())
233233
234234 func igs () = valueOrElse(getBoolean(fca, aps()), false)
235235
236236
237237 func mp () = fromBase58String(strf(fca, mtpk()))
238238
239239
240240 let feeCollectorAddress = addressFromStringValue(strf(fca, keyFeeCollectorAddress()))
241241
242242 func gpc () = {
243243 let amtAs = strf(this, aa())
244244 let priceAs = strf(this, pa())
245245 let iPriceAs = intf(fca, mba(priceAs))
246246 let iAmtAs = intf(fca, mba(amtAs))
247247 split(strf(fca, pc(toString(iAmtAs), toString(iPriceAs))), SEP)
248248 }
249249
250250
251251 func parseAssetId (input) = if ((input == wavesString))
252252 then unit
253253 else fromBase58String(input)
254254
255255
256256 func assetIdToString (input) = if ((input == unit))
257257 then wavesString
258258 else toBase58String(value(input))
259259
260260
261261 func parsePoolConfig (poolConfig) = $Tuple7(addressFromStringValue(poolConfig[idxPoolAddress]), parseIntValue(poolConfig[idxPoolSt]), fromBase58String(poolConfig[idxLPAsId]), parseAssetId(poolConfig[idxAmAsId]), parseAssetId(poolConfig[idxPrAsId]), parseIntValue(poolConfig[idxAmtAsDcm]), parseIntValue(poolConfig[idxPriceAsDcm]))
262262
263263
264264 let poolConfigParsed = parsePoolConfig(gpc())
265265
266-let $t086088794 = poolConfigParsed
266+let $t086168802 = poolConfigParsed
267267
268-let cfgPoolAddress = $t086088794._1
268+let cfgPoolAddress = $t086168802._1
269269
270-let cfgPoolStatus = $t086088794._2
270+let cfgPoolStatus = $t086168802._2
271271
272-let cfgLpAssetId = $t086088794._3
272+let cfgLpAssetId = $t086168802._3
273273
274-let cfgAmountAssetId = $t086088794._4
274+let cfgAmountAssetId = $t086168802._4
275275
276-let cfgPriceAssetId = $t086088794._5
276+let cfgPriceAssetId = $t086168802._5
277277
278-let cfgAmountAssetDecimals = $t086088794._6
278+let cfgAmountAssetDecimals = $t086168802._6
279279
280-let cfgPriceAssetDecimals = $t086088794._7
280+let cfgPriceAssetDecimals = $t086168802._7
281281
282282 func gfc () = split(strf(fca, fcfg()), SEP)
283283
284284
285285 let factoryConfig = gfc()
286286
287287 let stakingContract = valueOrErrorMessage(addressFromString(factoryConfig[idxFactStakCntr]), "Invalid staking contract address")
288288
289289 let slipageContract = valueOrErrorMessage(addressFromString(factoryConfig[idxFactSlippCntr]), "Invalid slipage contract address")
290290
291291 let gwxContract = valueOrErrorMessage(addressFromString(factoryConfig[idxFactGwxRewCntr]), "Invalid gwx contract address")
292292
293293 let restContract = valueOrErrorMessage(addressFromString(factoryConfig[idxFactoryRestCntr]), "Invalid gwx contract address")
294294
295295 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)
296296
297297
298298 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)
299299
300300
301301 func getAccBalance (assetId) = if ((assetId == "WAVES"))
302302 then wavesBalance(this).available
303303 else assetBalance(this, fromBase58String(assetId))
304304
305305
306306 func cpbi (prAmtX18,amAmtX18) = fraction(prAmtX18, scale18, amAmtX18)
307307
308308
309309 func cpbir (prAmtX18,amAmtX18,round) = fraction(prAmtX18, scale18, amAmtX18, round)
310310
311311
312312 func vad (A1,A2,slippage) = {
313313 let diff = fraction((A1 - A2), scale8BigInt, A2)
314314 let pass = ((slippage - abs(diff)) > zeroBigInt)
315315 if (!(pass))
316316 then throw(("Big slpg: " + toString(diff)))
317317 else $Tuple2(pass, min([A1, A2]))
318318 }
319319
320320
321321 func vd (D1,D0,slpg) = {
322322 let diff = fraction(D0, scale8BigInt, D1)
323323 let fail = (slpg > diff)
324324 if (if (fail)
325325 then true
326326 else (D0 > D1))
327327 then throw(((((((toString(D0) + " ") + toString(D1)) + " ") + toString(diff)) + " ") + toString(slpg)))
328328 else fail
329329 }
330330
331331
332332 func pcp (amAssetDcm,prAssetDcm,amAmt,prAmt) = {
333333 let amtAsAmtX18 = t1(amAmt, amAssetDcm)
334334 let prAsAmtX18 = t1(prAmt, prAssetDcm)
335335 cpbi(prAsAmtX18, amtAsAmtX18)
336336 }
337337
338338
339339 func calcPrices (amAmt,prAmt,lpAmt) = {
340340 let amtAsDcm = cfgAmountAssetDecimals
341341 let prAsDcm = cfgPriceAssetDecimals
342342 let priceX18 = pcp(amtAsDcm, prAsDcm, amAmt, prAmt)
343343 let amAmtX18 = t1(amAmt, amtAsDcm)
344344 let prAmtX18 = t1(prAmt, prAsDcm)
345345 let lpAmtX18 = t1(lpAmt, scale8)
346346 let lpPrInAmAsX18 = cpbi(amAmtX18, lpAmtX18)
347347 let lpPrInPrAsX18 = cpbi(prAmtX18, lpAmtX18)
348348 [priceX18, lpPrInAmAsX18, lpPrInPrAsX18]
349349 }
350350
351351
352352 func calculatePrices (amAmt,prAmt,lpAmt) = {
353353 let p = calcPrices(amAmt, prAmt, lpAmt)
354354 [f1(p[0], scale8), f1(p[1], scale8), f1(p[2], scale8)]
355355 }
356356
357357
358358 func takeFee (amount,fee) = {
359359 let feeAmount = if ((fee == 0))
360360 then 0
361361 else fraction(amount, fee, scale8)
362362 $Tuple2((amount - feeAmount), feeAmount)
363363 }
364364
365365
366366 func getD (xp) = {
367367 let xp0 = xp[0]
368368 let xp1 = xp[1]
369369 let s = (xp0 + xp1)
370370 if ((s == big0))
371371 then big0
372372 else {
373373 let a = parseIntValue(A)
374374 let ann = (a * 2)
375375 let p = fraction(xp0, xp1, big1)
376376 let xp0_xp1_n_n = fraction(p, big4, big1)
377377 let ann_s = fraction(toBigInt(ann), s, big1)
378378 let ann_1 = toBigInt((ann - 1))
379379 func calcDNext (d) = {
380380 let dd = fraction(d, d, big1)
381381 let ddd = fraction(dd, d, big1)
382382 let dp = fraction(ddd, big1, xp0_xp1_n_n)
383383 fraction((ann_s + fraction(dp, big2, big1)), d, (fraction(ann_1, d, big1) + fraction(big3, dp, big1)))
384384 }
385385
386386 func calc (acc,i) = if (acc._2)
387387 then acc
388388 else {
389389 let d = acc._1
390390 let dNext = calcDNext(d)
391391 let dDiffRaw = (dNext - value(d))
392392 let dDiff = if ((big0 > dDiffRaw))
393393 then -(dDiffRaw)
394394 else dDiffRaw
395395 if ((big1 >= dDiff))
396396 then $Tuple2(dNext, true)
397397 else $Tuple2(dNext, false)
398398 }
399399
400400 let arr = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16]
401- let $t01329913347 = {
401+ let $t01330713355 = {
402402 let $l = arr
403403 let $s = size($l)
404404 let $acc0 = $Tuple2(s, false)
405405 func $f0_1 ($a,$i) = if (($i >= $s))
406406 then $a
407407 else calc($a, $l[$i])
408408
409409 func $f0_2 ($a,$i) = if (($i >= $s))
410410 then $a
411411 else throw("List size exceeds 17")
412412
413413 $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)
414414 }
415- let d = $t01329913347._1
416- let found = $t01329913347._2
415+ let d = $t01330713355._1
416+ let found = $t01330713355._2
417417 if (found)
418418 then d
419419 else throw(("D calculation error, D = " + toString(d)))
420420 }
421421 }
422422
423423
424424 func ego (txId58,pmtAssetId,pmtLpAmt,userAddress) = {
425425 let lpId = cfgLpAssetId
426426 let amId = toBase58String(value(cfgAmountAssetId))
427427 let prId = toBase58String(value(cfgPriceAssetId))
428428 let amDcm = cfgAmountAssetDecimals
429429 let prDcm = cfgPriceAssetDecimals
430430 let sts = toString(cfgPoolStatus)
431431 let lpEmiss = valueOrErrorMessage(assetInfo(lpId), "Wrong LP id").quantity
432432 if ((toBase58String(lpId) != pmtAssetId))
433433 then throw("Wrong pmt asset")
434434 else {
435435 let amBalance = getAccBalance(amId)
436436 let amBalanceX18 = t1(amBalance, amDcm)
437437 let prBalance = getAccBalance(prId)
438438 let prBalanceX18 = t1(prBalance, prDcm)
439439 let curPriceX18 = cpbi(prBalanceX18, amBalanceX18)
440440 let curPrice = f1(curPriceX18, scale8)
441441 let pmtLpAmtX18 = t1(pmtLpAmt, scale8)
442442 let lpEmissX18 = t1(lpEmiss, scale8)
443443 let outAmAmtX18 = fraction(amBalanceX18, pmtLpAmtX18, lpEmissX18)
444444 let outPrAmtX18 = fraction(prBalanceX18, pmtLpAmtX18, lpEmissX18)
445445 let outAmAmt = fromX18Round(outAmAmtX18, amDcm, FLOOR)
446446 let outPrAmt = fromX18Round(outPrAmtX18, prDcm, FLOOR)
447447 let state = if ((txId58 == ""))
448448 then nil
449449 else [ScriptTransfer(userAddress, outAmAmt, if ((amId == "WAVES"))
450450 then unit
451451 else fromBase58String(amId)), ScriptTransfer(userAddress, outPrAmt, if ((prId == "WAVES"))
452452 then unit
453453 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)]
454454 $Tuple10(outAmAmt, outPrAmt, amId, prId, amBalance, prBalance, lpEmiss, curPriceX18, sts, state)
455455 }
456456 }
457457
458458
459459 func epo (txId58,slippage,inAmAmt,inAmId,inPrAmt,inPrId,userAddress,isEval,emitLp,isOneAsset,validateSlippage,pmtAmt,pmtId) = {
460460 let lpId = cfgLpAssetId
461461 let amIdStr = toBase58String(value(cfgAmountAssetId))
462462 let prIdStr = toBase58String(value(cfgPriceAssetId))
463463 let amtDcm = cfgAmountAssetDecimals
464464 let priceDcm = cfgPriceAssetDecimals
465465 let sts = toString(cfgPoolStatus)
466466 let lpEm = valueOrErrorMessage(assetInfo(lpId), "Wr lp as").quantity
467467 let amBalance = if (isEval)
468468 then getAccBalance(amIdStr)
469469 else if (if (isOneAsset)
470470 then (pmtId == amIdStr)
471471 else false)
472472 then (getAccBalance(amIdStr) - pmtAmt)
473473 else if (isOneAsset)
474474 then getAccBalance(amIdStr)
475475 else (getAccBalance(amIdStr) - inAmAmt)
476476 let prBalance = if (isEval)
477477 then getAccBalance(prIdStr)
478478 else if (if (isOneAsset)
479479 then (pmtId == prIdStr)
480480 else false)
481481 then (getAccBalance(prIdStr) - pmtAmt)
482482 else if (isOneAsset)
483483 then getAccBalance(prIdStr)
484484 else (getAccBalance(prIdStr) - inPrAmt)
485485 let inAmAssetAmtX18 = t1(inAmAmt, amtDcm)
486486 let inPrAssetAmtX18 = t1(inPrAmt, priceDcm)
487487 let userPriceX18 = cpbi(inPrAssetAmtX18, inAmAssetAmtX18)
488488 let amBalanceX18 = t1(amBalance, amtDcm)
489489 let prBalanceX18 = t1(prBalance, priceDcm)
490490 let D0 = getD([amBalanceX18, prBalanceX18])
491491 let r = if ((lpEm == 0))
492492 then {
493493 let D1 = getD([(amBalanceX18 + inAmAssetAmtX18), (prBalanceX18 + inPrAssetAmtX18)])
494494 let checkD = if ((D1 > D0))
495495 then true
496496 else throw("D1 should be greater than D0")
497497 if ((checkD == checkD))
498498 then {
499499 let curPriceX18 = zeroBigInt
500500 let slippageX18 = zeroBigInt
501501 let lpAmtX18 = D1
502502 $Tuple5(f1(lpAmtX18, scale8), f1(inAmAssetAmtX18, amtDcm), f1(inPrAssetAmtX18, priceDcm), cpbi((prBalanceX18 + inPrAssetAmtX18), (amBalanceX18 + inAmAssetAmtX18)), slippageX18)
503503 }
504504 else throw("Strict value is not equal to itself.")
505505 }
506506 else {
507507 let curPriceX18 = cpbi(prBalanceX18, amBalanceX18)
508508 let slippageRealX18 = fraction(abs((curPriceX18 - userPriceX18)), scale18, curPriceX18)
509509 let slippageX18 = t1(slippage, scale8)
510510 if (if (if (validateSlippage)
511511 then (curPriceX18 != zeroBigInt)
512512 else false)
513513 then (slippageRealX18 > slippageX18)
514514 else false)
515515 then throw(((("Price slippage " + toString(slippageRealX18)) + " > ") + toString(slippageX18)))
516516 else {
517517 let lpEmissionX18 = t1(lpEm, scale8)
518518 let prViaAmX18 = fraction(inAmAssetAmtX18, cpbir(prBalanceX18, amBalanceX18, CEILING), scale18, CEILING)
519519 let amViaPrX18 = fraction(inPrAssetAmtX18, scale18, cpbir(prBalanceX18, amBalanceX18, FLOOR), CEILING)
520520 let expectedAmts = if ((prViaAmX18 > inPrAssetAmtX18))
521521 then $Tuple2(amViaPrX18, inPrAssetAmtX18)
522522 else $Tuple2(inAmAssetAmtX18, prViaAmX18)
523523 let expAmtAssetAmtX18 = expectedAmts._1
524524 let expPriceAssetAmtX18 = expectedAmts._2
525525 let D1 = getD([(amBalanceX18 + expAmtAssetAmtX18), (prBalanceX18 + expPriceAssetAmtX18)])
526526 let checkD = if ((D1 > D0))
527527 then true
528528 else throw("D1 should be greater than D0")
529529 if ((checkD == checkD))
530530 then {
531531 let lpAmtX18 = fraction(lpEmissionX18, (D1 - D0), D0)
532532 $Tuple5(fromX18Round(lpAmtX18, scale8, FLOOR), fromX18Round(expAmtAssetAmtX18, amtDcm, CEILING), fromX18Round(expPriceAssetAmtX18, priceDcm, CEILING), curPriceX18, slippageX18)
533533 }
534534 else throw("Strict value is not equal to itself.")
535535 }
536536 }
537537 let calcLpAmt = r._1
538538 let calcAmAssetPmt = r._2
539539 let calcPrAssetPmt = r._3
540540 let curPrice = f1(r._4, scale8)
541541 let slippageCalc = f1(r._5, scale8)
542542 if ((0 >= calcLpAmt))
543543 then throw("LP <= 0")
544544 else {
545545 let emitLpAmt = if (!(emitLp))
546546 then 0
547547 else calcLpAmt
548548 let amDiff = (inAmAmt - calcAmAssetPmt)
549549 let prDiff = (inPrAmt - calcPrAssetPmt)
550- let $t02110921454 = if (if (isOneAsset)
550+ let $t02111721462 = if (if (isOneAsset)
551551 then (pmtId == amIdStr)
552552 else false)
553553 then $Tuple2(pmtAmt, 0)
554554 else if (if (isOneAsset)
555555 then (pmtId == prIdStr)
556556 else false)
557557 then $Tuple2(0, pmtAmt)
558558 else $Tuple2(calcAmAssetPmt, calcPrAssetPmt)
559- let writeAmAmt = $t02110921454._1
560- let writePrAmt = $t02110921454._2
559+ let writeAmAmt = $t02111721462._1
560+ let writePrAmt = $t02111721462._2
561561 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))]
562562 $Tuple13(calcLpAmt, emitLpAmt, curPrice, amBalance, prBalance, lpEm, lpId, sts, commonState, amDiff, prDiff, inAmId, inPrId)
563563 }
564564 }
565565
566566
567567 func getYD (xp,i,D) = {
568568 let n = big2
569569 let x = xp[if ((i == 0))
570570 then 1
571571 else 0]
572572 let aPrecision = parseBigIntValue(Amult)
573573 let a = (parseBigIntValue(A) * aPrecision)
574574 let s = x
575575 let ann = (a * n)
576576 let c = (((((D * D) / (x * n)) * D) * aPrecision) / (ann * n))
577577 let b = ((s + ((D * aPrecision) / ann)) - D)
578578 func calc (acc,cur) = {
579- let $t02264922669 = acc
580- let y = $t02264922669._1
581- let found = $t02264922669._2
579+ let $t02265722677 = acc
580+ let y = $t02265722677._1
581+ let found = $t02265722677._2
582582 if ((found != unit))
583583 then acc
584584 else {
585585 let yNext = (((y * y) + c) / ((big2 * y) + b))
586586 let yDiff = absBigInt((yNext - value(y)))
587587 if ((big1 >= yDiff))
588588 then $Tuple2(yNext, cur)
589589 else $Tuple2(yNext, unit)
590590 }
591591 }
592592
593593 let arr = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
594- let $t02297623023 = {
594+ let $t02298423031 = {
595595 let $l = arr
596596 let $s = size($l)
597597 let $acc0 = $Tuple2(D, unit)
598598 func $f0_1 ($a,$i) = if (($i >= $s))
599599 then $a
600600 else calc($a, $l[$i])
601601
602602 func $f0_2 ($a,$i) = if (($i >= $s))
603603 then $a
604604 else throw("List size exceeds 15")
605605
606606 $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)
607607 }
608- let y = $t02297623023._1
609- let found = $t02297623023._2
608+ let y = $t02298423031._1
609+ let found = $t02298423031._2
610610 if ((found != unit))
611611 then y
612612 else throw(("Y calculation error, Y = " + toString(y)))
613613 }
614614
615615
616616 func calcDLp (amountBalance,priceBalance,lpEmission) = {
617617 let updatedDLp = fraction(getD([t1BigInt(amountBalance, toBigInt(cfgAmountAssetDecimals)), t1BigInt(priceBalance, toBigInt(cfgPriceAssetDecimals))]), scale18, lpEmission)
618618 if ((lpEmission == big0))
619619 then big0
620620 else updatedDLp
621621 }
622622
623623
624624 func calcCurrentDLp (amountAssetDelta,priceAssetDelta,lpAssetEmissionDelta) = {
625625 let amountAssetBalance = (toBigInt(getAccBalance(assetIdToString(cfgAmountAssetId))) - amountAssetDelta)
626626 let priceAssetBalance = (toBigInt(getAccBalance(assetIdToString(cfgPriceAssetId))) - priceAssetDelta)
627627 let lpAssetEmission = (toBigInt(value(assetInfo(cfgLpAssetId)).quantity) - lpAssetEmissionDelta)
628628 let currentDLp = calcDLp(amountAssetBalance, priceAssetBalance, lpAssetEmission)
629629 currentDLp
630630 }
631631
632632
633633 func refreshDLpInternal (amountAssetBalanceDelta,priceAssetBalanceDelta,lpAssetEmissionDelta) = {
634634 let amountAssetBalance = (getAccBalance(assetIdToString(cfgAmountAssetId)) + amountAssetBalanceDelta)
635635 let priceAssetBalance = (getAccBalance(assetIdToString(cfgPriceAssetId)) + priceAssetBalanceDelta)
636636 let lpAssetEmission = (value(assetInfo(cfgLpAssetId)).quantity + lpAssetEmissionDelta)
637637 let updatedDLp = calcDLp(toBigInt(amountAssetBalance), toBigInt(priceAssetBalance), toBigInt(lpAssetEmission))
638638 let actions = [IntegerEntry(keyDLpRefreshedHeight, height), StringEntry(keyDLp, toString(updatedDLp))]
639639 $Tuple2(actions, updatedDLp)
640640 }
641641
642642
643-func validateUpdatedDLp (oldDLp,updatedDLp) = if (if ((updatedDLp == big0))
644- then true
645- else (updatedDLp >= oldDLp))
643+func validateUpdatedDLp (oldDLp,updatedDLp) = if ((updatedDLp >= oldDLp))
646644 then true
647645 else throwErr("updated DLp lower than current DLp")
648646
649647
650648 func validateMatcherOrderAllowed (order) = {
651649 let amountAssetBalance = getAccBalance(assetIdToString(cfgAmountAssetId))
652650 let priceAssetBalance = getAccBalance(assetIdToString(cfgPriceAssetId))
653651 let amountAssetAmount = order.amount
654652 let priceAssetAmount = fraction(order.amount, order.price, scale8, FLOOR)
655- let $t02524325455 = if ((order.orderType == Buy))
653+ let $t02522925441 = if ((order.orderType == Buy))
656654 then $Tuple2(amountAssetAmount, -(priceAssetAmount))
657655 else $Tuple2(-(amountAssetAmount), priceAssetAmount)
658- let amountAssetBalanceDelta = $t02524325455._1
659- let priceAssetBalanceDelta = $t02524325455._2
656+ let amountAssetBalanceDelta = $t02522925441._1
657+ let priceAssetBalanceDelta = $t02522925441._2
660658 if (if (if (igs())
661659 then true
662- else (cfgPoolStatus == PoolMatcherDis))
660+ else (cfgPoolStatus == PoolPutAndMatcherDis))
663661 then true
664662 else (cfgPoolStatus == PoolShutdown))
665663 then throw("Admin blocked")
666664 else if (if ((order.assetPair.amountAsset != cfgAmountAssetId))
667665 then true
668666 else (order.assetPair.priceAsset != cfgPriceAssetId))
669667 then throw("Wr assets")
670668 else {
671669 let dLp = parseBigIntValue(valueOrElse(getString(this, keyDLp), "0"))
672- let $t02579725897 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
673- let unusedActions = $t02579725897._1
674- let dLpNew = $t02579725897._2
670+ let $t02578925889 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
671+ let unusedActions = $t02578925889._1
672+ let dLpNew = $t02578925889._2
675673 let isOrderValid = (dLpNew >= dLp)
676674 let info = makeString(["dLp=", toString(dLp), " dLpNew=", toString(dLpNew), " amountAssetBalance=", toString(amountAssetBalance), " priceAssetBalance=", toString(priceAssetBalance), " amountAssetBalanceDelta=", toString(amountAssetBalanceDelta), " priceAssetBalanceDelta=", toString(priceAssetBalanceDelta), " height=", toString(height)], "")
677675 $Tuple2(isOrderValid, info)
678676 }
679677 }
680678
681679
682680 func cg (i) = if ((size(i.payments) != 1))
683681 then throw("1 pmnt exp")
684682 else {
685683 let pmt = value(i.payments[0])
686684 let pmtAssetId = value(pmt.assetId)
687685 let pmtAmt = pmt.amount
688686 let r = ego(toBase58String(i.transactionId), toBase58String(pmtAssetId), pmtAmt, i.caller)
689687 let outAmAmt = r._1
690688 let outPrAmt = r._2
691689 let sts = parseIntValue(r._9)
692690 let state = r._10
693691 if (if (igs())
694692 then true
695693 else (sts == PoolShutdown))
696694 then throw(("Admin blocked: " + toString(sts)))
697695 else $Tuple5(outAmAmt, outPrAmt, pmtAmt, pmtAssetId, state)
698696 }
699697
700698
701699 func cp (caller,txId,amAsPmt,prAsPmt,slippage,emitLp,isOneAsset,validateSlippage,pmtAmt,pmtId) = {
702700 let r = epo(txId, slippage, value(amAsPmt).amount, value(amAsPmt).assetId, value(prAsPmt).amount, value(prAsPmt).assetId, caller, (txId == ""), emitLp, isOneAsset, validateSlippage, pmtAmt, pmtId)
703701 let sts = parseIntValue(r._8)
704- if (if (if (igs())
702+ if (if (if (if (igs())
705703 then true
706704 else (sts == PoolPutDis))
705+ then true
706+ else (sts == PoolPutAndMatcherDis))
707707 then true
708708 else (sts == PoolShutdown))
709709 then throw(("Blocked:" + toString(sts)))
710710 else r
711711 }
712712
713713
714714 func calcPutOneTkn (pmtAmtRaw,pmtAssetId,userAddress,txId,withTakeFee) = {
715715 let amId = toBase58String(value(cfgAmountAssetId))
716716 let prId = toBase58String(value(cfgPriceAssetId))
717717 let lpId = cfgLpAssetId
718718 let amtDcm = cfgAmountAssetDecimals
719719 let priceDcm = cfgPriceAssetDecimals
720720 let lpAssetEmission = toBigInt(valueOrErrorMessage(assetInfo(lpId), "invalid lp asset").quantity)
721721 let chechEmission = if ((lpAssetEmission > big0))
722722 then true
723723 else throw("initial deposit requires all coins")
724724 if ((chechEmission == chechEmission))
725725 then {
726726 let amBalance = getAccBalance(amId)
727727 let prBalance = getAccBalance(prId)
728- let $t02855329015 = if ((txId == ""))
728+ let $t02860629068 = if ((txId == ""))
729729 then $Tuple2(amBalance, prBalance)
730730 else if ((pmtAssetId == amId))
731731 then if ((pmtAmtRaw > amBalance))
732732 then throw("invalid payment amount")
733733 else $Tuple2((amBalance - pmtAmtRaw), prBalance)
734734 else if ((pmtAssetId == prId))
735735 then if ((pmtAmtRaw > prBalance))
736736 then throw("invalid payment amount")
737737 else $Tuple2(amBalance, (prBalance - pmtAmtRaw))
738738 else throw("wrong pmtAssetId")
739- let amBalanceOld = $t02855329015._1
740- let prBalanceOld = $t02855329015._2
741- let $t02902129197 = if ((pmtAssetId == amId))
739+ let amBalanceOld = $t02860629068._1
740+ let prBalanceOld = $t02860629068._2
741+ let $t02907429250 = if ((pmtAssetId == amId))
742742 then $Tuple2(pmtAmtRaw, 0)
743743 else if ((pmtAssetId == prId))
744744 then $Tuple2(0, pmtAmtRaw)
745745 else throw("invalid payment")
746- let amAmountRaw = $t02902129197._1
747- let prAmountRaw = $t02902129197._2
748- let $t02920129455 = if (withTakeFee)
746+ let amAmountRaw = $t02907429250._1
747+ let prAmountRaw = $t02907429250._2
748+ let $t02925429508 = if (withTakeFee)
749749 then $Tuple3(takeFee(amAmountRaw, inFee)._1, takeFee(prAmountRaw, inFee)._1, takeFee(pmtAmtRaw, inFee)._2)
750750 else $Tuple3(amAmountRaw, prAmountRaw, 0)
751- let amAmount = $t02920129455._1
752- let prAmount = $t02920129455._2
753- let feeAmount = $t02920129455._3
751+ let amAmount = $t02925429508._1
752+ let prAmount = $t02925429508._2
753+ let feeAmount = $t02925429508._3
754754 let amBalanceNew = (amBalanceOld + amAmount)
755755 let prBalanceNew = (prBalanceOld + prAmount)
756756 let D0 = getD([t1(amBalanceOld, cfgAmountAssetDecimals), t1(prBalanceOld, cfgPriceAssetDecimals)])
757757 let D1 = getD([t1(amBalanceNew, cfgAmountAssetDecimals), t1(prBalanceNew, cfgPriceAssetDecimals)])
758758 let checkD = if ((D1 > D0))
759759 then true
760760 else throw()
761761 if ((checkD == checkD))
762762 then {
763763 let lpAmount = fraction(lpAssetEmission, (D1 - D0), D0, FLOOR)
764764 let curPrice = f1(cpbi(t1(prBalanceNew, priceDcm), t1(amBalanceNew, amtDcm)), scale8)
765765 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))]
766766 let poolProportion = fraction(prBalanceOld, scale8, amBalanceOld)
767767 let amountAssetPart = fraction(pmtAmtRaw, scale8, (poolProportion + scale8))
768768 let priceAssetPart = (pmtAmtRaw - amountAssetPart)
769769 let lpAmtBoth = fraction(lpAssetEmission, toBigInt(priceAssetPart), toBigInt(prBalanceOld))
770770 let bonus = toInt(fraction((lpAmount - lpAmtBoth), scale8BigInt, lpAmtBoth))
771771 $Tuple4(toInt(lpAmount), commonState, feeAmount, bonus)
772772 }
773773 else throw("Strict value is not equal to itself.")
774774 }
775775 else throw("Strict value is not equal to itself.")
776776 }
777777
778778
779779 func getOneTknV2Internal (outAssetId,minOutAmount,payments,caller,originCaller,transactionId) = {
780780 let lpId = toBase58String(value(cfgLpAssetId))
781781 let amId = toBase58String(value(cfgAmountAssetId))
782782 let prId = toBase58String(value(cfgPriceAssetId))
783783 let amDecimals = cfgAmountAssetDecimals
784784 let prDecimals = cfgPriceAssetDecimals
785785 let poolStatus = cfgPoolStatus
786786 let userAddress = if ((caller == restContract))
787787 then originCaller
788788 else caller
789789 let pmt = value(payments[0])
790790 let pmtAssetId = value(pmt.assetId)
791791 let pmtAmt = pmt.amount
792792 let currentDLp = calcCurrentDLp(big0, big0, big0)
793793 if ((currentDLp == currentDLp))
794794 then {
795795 let txId58 = toBase58String(transactionId)
796796 if ((lpId != toBase58String(pmtAssetId)))
797797 then throw("Wrong LP")
798798 else {
799799 let amBalance = getAccBalance(amId)
800800 let prBalance = getAccBalance(prId)
801- let $t03156731678 = {
801+ let $t03162031731 = {
802802 let @ = invoke(this, "getOneTknV2READONLY", [outAssetId, pmtAmt], nil)
803803 if ($isInstanceOf(@, "(Int, Int)"))
804804 then @
805805 else throw(($getType(@) + " couldn't be cast to (Int, Int)"))
806806 }
807- if (($t03156731678 == $t03156731678))
807+ if (($t03162031731 == $t03162031731))
808808 then {
809- let feeAmount = $t03156731678._2
810- let totalGet = $t03156731678._1
809+ let feeAmount = $t03162031731._2
810+ let totalGet = $t03162031731._1
811811 let totalAmount = if (if ((minOutAmount > 0))
812812 then (minOutAmount > totalGet)
813813 else false)
814814 then throwErr(makeString(["amount to receive is less than ", toString(minOutAmount)], ""))
815815 else totalGet
816- let $t03186832175 = if ((outAssetId == amId))
816+ let $t03192132228 = if ((outAssetId == amId))
817817 then $Tuple4(totalAmount, 0, ((amBalance - totalAmount) - feeAmount), prBalance)
818818 else if ((outAssetId == prId))
819819 then $Tuple4(0, totalAmount, amBalance, ((prBalance - totalAmount) - feeAmount))
820820 else throw("invalid out asset id")
821- let outAm = $t03186832175._1
822- let outPr = $t03186832175._2
823- let amBalanceNew = $t03186832175._3
824- let prBalanceNew = $t03186832175._4
821+ let outAm = $t03192132228._1
822+ let outPr = $t03192132228._2
823+ let amBalanceNew = $t03192132228._3
824+ let prBalanceNew = $t03192132228._4
825825 let curPrX18 = cpbi(t1(prBalanceNew, prDecimals), t1(amBalanceNew, amDecimals))
826826 let curPr = f1(curPrX18, scale8)
827827 let outAssetIdOrWaves = if ((outAssetId == "WAVES"))
828828 then unit
829829 else fromBase58String(outAssetId)
830830 let sendFeeToMatcher = if ((feeAmount > 0))
831831 then [ScriptTransfer(feeCollectorAddress, feeAmount, outAssetIdOrWaves)]
832832 else nil
833833 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)
834834 if ((state == state))
835835 then {
836836 let burn = invoke(fca, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
837837 if ((burn == burn))
838838 then {
839- let $t03296033310 = {
839+ let $t03301333363 = {
840840 let feeAmountForCalc = if ((this == feeCollectorAddress))
841841 then 0
842842 else feeAmount
843843 let outInAmountAsset = if ((parseAssetId(outAssetId) == cfgAmountAssetId))
844844 then true
845845 else false
846846 if (outInAmountAsset)
847847 then $Tuple2(-((totalGet + feeAmountForCalc)), 0)
848848 else $Tuple2(0, -((totalGet + feeAmountForCalc)))
849849 }
850- let amountAssetBalanceDelta = $t03296033310._1
851- let priceAssetBalanceDelta = $t03296033310._2
852- let $t03331333421 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
853- let refreshDLpActions = $t03331333421._1
854- let updatedDLp = $t03331333421._2
850+ let amountAssetBalanceDelta = $t03301333363._1
851+ let priceAssetBalanceDelta = $t03301333363._2
852+ let $t03336633474 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
853+ let refreshDLpActions = $t03336633474._1
854+ let updatedDLp = $t03336633474._2
855855 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
856856 if ((isUpdatedDLpValid == isUpdatedDLpValid))
857857 then $Tuple2((state ++ refreshDLpActions), totalAmount)
858858 else throw("Strict value is not equal to itself.")
859859 }
860860 else throw("Strict value is not equal to itself.")
861861 }
862862 else throw("Strict value is not equal to itself.")
863863 }
864864 else throw("Strict value is not equal to itself.")
865865 }
866866 }
867867 else throw("Strict value is not equal to itself.")
868868 }
869869
870870
871871 func managerPublicKeyOrUnit () = {
872872 let managerVaultAddress = getManagerVaultAddressOrThis()
873873 match getString(managerVaultAddress, keyManagerPublicKey()) {
874874 case s: String =>
875875 fromBase58String(s)
876876 case _: Unit =>
877877 unit
878878 case _ =>
879879 throw("Match error")
880880 }
881881 }
882882
883883
884884 let pd = throw("Permission denied")
885885
886886 func isManager (i) = match managerPublicKeyOrUnit() {
887887 case pk: ByteVector =>
888888 (i.callerPublicKey == pk)
889889 case _: Unit =>
890890 (i.caller == this)
891891 case _ =>
892892 throw("Match error")
893893 }
894894
895895
896896 func mustManager (i) = match managerPublicKeyOrUnit() {
897897 case pk: ByteVector =>
898898 if ((i.callerPublicKey == pk))
899899 then true
900900 else pd
901901 case _: Unit =>
902902 if ((i.caller == this))
903903 then true
904904 else pd
905905 case _ =>
906906 throw("Match error")
907907 }
908908
909909
910910 func getY (isReverse,D,poolAmountInBalance) = {
911911 let poolConfig = gpc()
912912 let amId = poolConfig[idxAmAsId]
913913 let prId = poolConfig[idxPrAsId]
914914 let n = big2
915915 let aPrecision = parseBigIntValue(Amult)
916916 let a = (parseBigIntValue(A) * aPrecision)
917917 let xp = if ((isReverse == false))
918918 then [(toBigInt(getAccBalance(amId)) + poolAmountInBalance), toBigInt(getAccBalance(prId))]
919919 else [(toBigInt(getAccBalance(prId)) + poolAmountInBalance), toBigInt(getAccBalance(amId))]
920920 let x = xp[0]
921921 let s = x
922922 let ann = (a * n)
923923 let c = (((((D * D) / (x * n)) * D) * aPrecision) / (ann * n))
924924 let b = ((s + ((D * aPrecision) / ann)) - D)
925925 func calc (acc,cur) = {
926- let $t03490834928 = acc
927- let y = $t03490834928._1
928- let found = $t03490834928._2
926+ let $t03496134981 = acc
927+ let y = $t03496134981._1
928+ let found = $t03496134981._2
929929 if ((found != unit))
930930 then acc
931931 else {
932932 let yNext = (((y * y) + c) / ((big2 * y) + b))
933933 let yDiff = absBigInt((yNext - value(y)))
934934 if ((big1 >= yDiff))
935935 then $Tuple2(yNext, cur)
936936 else $Tuple2(yNext, unit)
937937 }
938938 }
939939
940940 let arr = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
941- let $t03525935306 = {
941+ let $t03531235359 = {
942942 let $l = arr
943943 let $s = size($l)
944944 let $acc0 = $Tuple2(D, unit)
945945 func $f0_1 ($a,$i) = if (($i >= $s))
946946 then $a
947947 else calc($a, $l[$i])
948948
949949 func $f0_2 ($a,$i) = if (($i >= $s))
950950 then $a
951951 else throw("List size exceeds 15")
952952
953953 $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)
954954 }
955- let y = $t03525935306._1
956- let found = $t03525935306._2
955+ let y = $t03531235359._1
956+ let found = $t03531235359._2
957957 if ((found != unit))
958958 then y
959959 else throw(("Y calculation error, Y = " + toString(y)))
960960 }
961961
962962
963963 func skipOrderValidation () = valueOrElse(getBoolean(fca, keySkipOrderValidation(toString(this))), false)
964964
965965
966966 @Callable(i)
967967 func calculateAmountOutForSwapREADONLY (cleanAmountIn,isReverse,feePoolAmount) = {
968- let $t03565836082 = if ((isReverse == false))
968+ let $t03571136135 = if ((isReverse == false))
969969 then {
970970 let assetOut = strf(this, pa())
971971 let poolAmountInBalance = (toBigInt(getAccBalance(strf(this, aa()))) + toBigInt(cleanAmountIn))
972972 $Tuple2(assetOut, poolAmountInBalance)
973973 }
974974 else {
975975 let assetOut = strf(this, aa())
976976 let poolAmountInBalance = (toBigInt(getAccBalance(strf(this, pa()))) + toBigInt(cleanAmountIn))
977977 $Tuple2(assetOut, poolAmountInBalance)
978978 }
979- let assetOut = $t03565836082._1
980- let poolAmountInBalance = $t03565836082._2
979+ let assetOut = $t03571136135._1
980+ let poolAmountInBalance = $t03571136135._2
981981 let poolConfig = gpc()
982982 let amId = poolConfig[idxAmAsId]
983983 let prId = poolConfig[idxPrAsId]
984984 let xp = [toBigInt(getAccBalance(amId)), toBigInt(getAccBalance(prId))]
985985 let D = getD(xp)
986986 let y = getY(isReverse, D, toBigInt(cleanAmountIn))
987987 let dy = ((toBigInt(getAccBalance(assetOut)) - y) - toBigInt(1))
988988 let totalGetRaw = max([0, toInt(dy)])
989989 let newXp = if ((isReverse == false))
990990 then [((toBigInt(getAccBalance(amId)) + toBigInt(cleanAmountIn)) + toBigInt(feePoolAmount)), (toBigInt(getAccBalance(prId)) - dy)]
991991 else [(toBigInt(getAccBalance(amId)) - dy), ((toBigInt(getAccBalance(prId)) + toBigInt(cleanAmountIn)) + toBigInt(feePoolAmount))]
992992 let newD = getD(newXp)
993993 let checkD = if ((newD >= D))
994994 then true
995995 else throw(makeString(["new D is fewer error", toString(D), toString(newD)], "__"))
996996 if ((checkD == checkD))
997997 then $Tuple2(nil, totalGetRaw)
998998 else throw("Strict value is not equal to itself.")
999999 }
10001000
10011001
10021002
10031003 @Callable(i)
10041004 func calculateAmountOutForSwapAndSendTokens (cleanAmountIn,isReverse,amountOutMin,addressTo,feePoolAmount) = {
10051005 let swapContact = {
10061006 let @ = invoke(fca, "getSwapContractREADONLY", nil, nil)
10071007 if ($isInstanceOf(@, "String"))
10081008 then @
10091009 else throw(($getType(@) + " couldn't be cast to String"))
10101010 }
10111011 let checks = [if ((value(i.payments[0]).amount >= cleanAmountIn))
10121012 then true
10131013 else throwErr("Wrong amount"), if ((i.caller == addressFromStringValue(swapContact)))
10141014 then true
10151015 else throwErr("Permission denied")]
10161016 if ((checks == checks))
10171017 then {
10181018 let pmt = value(i.payments[0])
10191019 let assetIn = assetIdToString(pmt.assetId)
1020- let $t03751837912 = if ((isReverse == false))
1020+ let $t03757137965 = if ((isReverse == false))
10211021 then {
10221022 let assetOut = strf(this, pa())
10231023 let poolAmountInBalance = (getAccBalance(assetIn) - value(i.payments[0]).amount)
10241024 $Tuple2(assetOut, poolAmountInBalance)
10251025 }
10261026 else {
10271027 let assetOut = strf(this, aa())
10281028 let poolAmountInBalance = (getAccBalance(assetIn) - value(i.payments[0]).amount)
10291029 $Tuple2(assetOut, poolAmountInBalance)
10301030 }
1031- let assetOut = $t03751837912._1
1032- let poolAmountInBalance = $t03751837912._2
1031+ let assetOut = $t03757137965._1
1032+ let poolAmountInBalance = $t03757137965._2
10331033 let poolConfig = gpc()
10341034 let amId = poolConfig[idxAmAsId]
10351035 let prId = poolConfig[idxPrAsId]
10361036 let xp = if ((isReverse == false))
10371037 then [(toBigInt(getAccBalance(amId)) - toBigInt(value(i.payments[0]).amount)), toBigInt(getAccBalance(prId))]
10381038 else [toBigInt(getAccBalance(amId)), (toBigInt(getAccBalance(prId)) - toBigInt(value(i.payments[0]).amount))]
10391039 let D = getD(xp)
10401040 let y = getY(isReverse, D, toBigInt(0))
10411041 let dy = ((toBigInt(getAccBalance(assetOut)) - y) - toBigInt(1))
10421042 let totalGetRaw = max([0, toInt(dy)])
10431043 let checkMin = if ((totalGetRaw >= amountOutMin))
10441044 then true
10451045 else throw("Exchange result is fewer coins than expected")
10461046 if ((checkMin == checkMin))
10471047 then {
10481048 let newXp = if ((isReverse == false))
10491049 then [(toBigInt(getAccBalance(amId)) + toBigInt(feePoolAmount)), (toBigInt(getAccBalance(prId)) - dy)]
10501050 else [(toBigInt(getAccBalance(amId)) - dy), (toBigInt(getAccBalance(prId)) + toBigInt(feePoolAmount))]
10511051 let newD = getD(newXp)
10521052 let checkD = if ((newD >= D))
10531053 then true
10541054 else throw("new D is fewer error")
10551055 if ((checkD == checkD))
10561056 then $Tuple2([ScriptTransfer(addressFromStringValue(addressTo), totalGetRaw, parseAssetId(assetOut))], totalGetRaw)
10571057 else throw("Strict value is not equal to itself.")
10581058 }
10591059 else throw("Strict value is not equal to itself.")
10601060 }
10611061 else throw("Strict value is not equal to itself.")
10621062 }
10631063
10641064
10651065
10661066 @Callable(i)
10671067 func constructor (fc) = {
10681068 let c = mustManager(i)
10691069 if ((c == c))
10701070 then [StringEntry(fc(), fc)]
10711071 else throw("Strict value is not equal to itself.")
10721072 }
10731073
10741074
10751075
10761076 @Callable(i)
10771077 func put (slip,autoStake) = {
10781078 let factCfg = gfc()
10791079 let stakingCntr = valueOrErrorMessage(addressFromString(factCfg[idxFactStakCntr]), "Wr st addr")
10801080 let slipCntr = valueOrErrorMessage(addressFromString(factCfg[idxFactSlippCntr]), "Wr sl addr")
10811081 if ((0 > slip))
10821082 then throw("Wrong slippage")
10831083 else if ((size(i.payments) != 2))
10841084 then throw("2 pmnts expd")
10851085 else {
10861086 let amAssetPmt = toBigInt(value(i.payments[0]).amount)
10871087 let prAssetPmt = toBigInt(value(i.payments[1]).amount)
10881088 let amountAssetBalance = (toBigInt(getAccBalance(assetIdToString(cfgAmountAssetId))) - amAssetPmt)
10891089 if ((amountAssetBalance == amountAssetBalance))
10901090 then {
10911091 let priceAssetBalance = (toBigInt(getAccBalance(assetIdToString(cfgPriceAssetId))) - prAssetPmt)
10921092 if ((priceAssetBalance == priceAssetBalance))
10931093 then {
10941094 let lpAssetEmission = toBigInt(value(assetInfo(cfgLpAssetId)).quantity)
10951095 if ((lpAssetEmission == lpAssetEmission))
10961096 then {
10971097 let currentDLp = calcCurrentDLp(amAssetPmt, prAssetPmt, toBigInt(0))
10981098 if ((currentDLp == currentDLp))
10991099 then {
11001100 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, "")
11011101 let emitLpAmt = e._2
11021102 let lpAssetId = e._7
11031103 let state = e._9
11041104 let amDiff = e._10
11051105 let prDiff = e._11
11061106 let amId = e._12
11071107 let prId = e._13
11081108 let r = invoke(fca, "emit", [emitLpAmt], nil)
11091109 if ((r == r))
11101110 then {
11111111 let el = match r {
11121112 case legacy: Address =>
11131113 invoke(legacy, "emit", [emitLpAmt], nil)
11141114 case _ =>
11151115 unit
11161116 }
11171117 if ((el == el))
11181118 then {
11191119 let sa = if ((amDiff > 0))
11201120 then invoke(slipCntr, "put", nil, [AttachedPayment(amId, amDiff)])
11211121 else nil
11221122 if ((sa == sa))
11231123 then {
11241124 let sp = if ((prDiff > 0))
11251125 then invoke(slipCntr, "put", nil, [AttachedPayment(prId, prDiff)])
11261126 else nil
11271127 if ((sp == sp))
11281128 then {
11291129 let lpTrnsfr = if (autoStake)
11301130 then {
11311131 let ss = invoke(stakingCntr, "stake", nil, [AttachedPayment(lpAssetId, emitLpAmt)])
11321132 if ((ss == ss))
11331133 then nil
11341134 else throw("Strict value is not equal to itself.")
11351135 }
11361136 else [ScriptTransfer(i.caller, emitLpAmt, lpAssetId)]
1137- let $t04205642198 = refreshDLpInternal(0, 0, 0)
1138- let refreshDLpActions = $t04205642198._1
1139- let updatedDLp = $t04205642198._2
1137+ let $t04210942251 = refreshDLpInternal(0, 0, 0)
1138+ let refreshDLpActions = $t04210942251._1
1139+ let updatedDLp = $t04210942251._2
11401140 let check = if ((updatedDLp >= currentDLp))
11411141 then true
11421142 else throwErr(makeString(["updated DLp lower than current DLp", toString(amountAssetBalance), toString(priceAssetBalance), toString(lpAssetEmission), toString(currentDLp), toString(updatedDLp), toString(amDiff), toString(prDiff)], " "))
11431143 if ((check == check))
11441144 then {
11451145 let lpAssetEmissionAfter = value(assetInfo(cfgLpAssetId)).quantity
11461146 if ((lpAssetEmissionAfter == lpAssetEmissionAfter))
11471147 then ((state ++ lpTrnsfr) ++ refreshDLpActions)
11481148 else throw("Strict value is not equal to itself.")
11491149 }
11501150 else throw("Strict value is not equal to itself.")
11511151 }
11521152 else throw("Strict value is not equal to itself.")
11531153 }
11541154 else throw("Strict value is not equal to itself.")
11551155 }
11561156 else throw("Strict value is not equal to itself.")
11571157 }
11581158 else throw("Strict value is not equal to itself.")
11591159 }
11601160 else throw("Strict value is not equal to itself.")
11611161 }
11621162 else throw("Strict value is not equal to itself.")
11631163 }
11641164 else throw("Strict value is not equal to itself.")
11651165 }
11661166 else throw("Strict value is not equal to itself.")
11671167 }
11681168 }
11691169
11701170
11711171
11721172 @Callable(i)
11731173 func putOneTknV2 (minOutAmount,autoStake) = {
11741174 let isPoolOneTokenOperationsDisabled = {
11751175 let @ = invoke(fca, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
11761176 if ($isInstanceOf(@, "Boolean"))
11771177 then @
11781178 else throw(($getType(@) + " couldn't be cast to Boolean"))
11791179 }
1180- let isPutDisabled = if (if (if (igs())
1180+ let isPutDisabled = if (if (if (if (igs())
11811181 then true
11821182 else (cfgPoolStatus == PoolPutDis))
1183+ then true
1184+ else (cfgPoolStatus == PoolPutAndMatcherDis))
11831185 then true
11841186 else (cfgPoolStatus == PoolShutdown))
11851187 then true
11861188 else isPoolOneTokenOperationsDisabled
11871189 let checks = [if (if (!(isPutDisabled))
11881190 then true
11891191 else isManager(i))
11901192 then true
11911193 else throwErr("put operation is blocked by admin"), if ((size(i.payments) == 1))
11921194 then true
11931195 else throwErr("exactly 1 payment are expected")]
11941196 if ((checks == checks))
11951197 then {
11961198 let amId = toBase58String(value(cfgAmountAssetId))
11971199 let prId = toBase58String(value(cfgPriceAssetId))
11981200 let lpId = cfgLpAssetId
11991201 let amDecimals = cfgAmountAssetDecimals
12001202 let prDecimals = cfgPriceAssetDecimals
12011203 let userAddress = if ((i.caller == this))
12021204 then i.originCaller
12031205 else i.caller
12041206 let pmt = value(i.payments[0])
12051207 let pmtAssetId = toBase58String(value(pmt.assetId))
12061208 let pmtAmt = pmt.amount
12071209 let currentDLp = if ((pmt.assetId == cfgAmountAssetId))
12081210 then calcCurrentDLp(toBigInt(pmtAmt), toBigInt(0), toBigInt(0))
12091211 else calcCurrentDLp(toBigInt(0), toBigInt(pmtAmt), toBigInt(0))
12101212 if ((currentDLp == currentDLp))
12111213 then {
1212- let $t04383943997 = calcPutOneTkn(pmtAmt, pmtAssetId, toString(userAddress), toBase58String(i.transactionId), true)
1213- if (($t04383943997 == $t04383943997))
1214+ let $t04395444112 = calcPutOneTkn(pmtAmt, pmtAssetId, toString(userAddress), toBase58String(i.transactionId), true)
1215+ if (($t04395444112 == $t04395444112))
12141216 then {
1215- let feeAmount = $t04383943997._3
1216- let state = $t04383943997._2
1217- let estimLP = $t04383943997._1
1217+ let feeAmount = $t04395444112._3
1218+ let state = $t04395444112._2
1219+ let estimLP = $t04395444112._1
12181220 let emitLpAmt = if (if ((minOutAmount > 0))
12191221 then (minOutAmount > estimLP)
12201222 else false)
12211223 then throwErr(makeString(["amount to receive is less than ", toString(minOutAmount)], ""))
12221224 else estimLP
12231225 let e = invoke(fca, "emit", [emitLpAmt], nil)
12241226 if ((e == e))
12251227 then {
12261228 let el = match e {
12271229 case legacy: Address =>
12281230 invoke(legacy, "emit", [emitLpAmt], nil)
12291231 case _ =>
12301232 unit
12311233 }
12321234 if ((el == el))
12331235 then {
12341236 let lpTrnsfr = if (autoStake)
12351237 then {
12361238 let ss = invoke(stakingContract, "stakeFor", [toString(i.caller)], [AttachedPayment(lpId, emitLpAmt)])
12371239 if ((ss == ss))
12381240 then nil
12391241 else throw("Strict value is not equal to itself.")
12401242 }
12411243 else [ScriptTransfer(i.caller, emitLpAmt, lpId)]
12421244 let sendFeeToMatcher = if ((feeAmount > 0))
12431245 then [ScriptTransfer(feeCollectorAddress, feeAmount, fromBase58String(pmtAssetId))]
12441246 else nil
1245- let $t04488245231 = if ((this == feeCollectorAddress))
1247+ let $t04499745346 = if ((this == feeCollectorAddress))
12461248 then $Tuple2(0, 0)
12471249 else {
12481250 let paymentInAmountAsset = if ((pmt.assetId == cfgAmountAssetId))
12491251 then true
12501252 else false
12511253 if (paymentInAmountAsset)
12521254 then $Tuple2(-(feeAmount), 0)
12531255 else $Tuple2(0, -(feeAmount))
12541256 }
1255- let amountAssetBalanceDelta = $t04488245231._1
1256- let priceAssetBalanceDelta = $t04488245231._2
1257- let $t04523445342 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
1258- let refreshDLpActions = $t04523445342._1
1259- let updatedDLp = $t04523445342._2
1257+ let amountAssetBalanceDelta = $t04499745346._1
1258+ let priceAssetBalanceDelta = $t04499745346._2
1259+ let $t04534945457 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
1260+ let refreshDLpActions = $t04534945457._1
1261+ let updatedDLp = $t04534945457._2
12601262 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
12611263 if ((isUpdatedDLpValid == isUpdatedDLpValid))
12621264 then $Tuple2((((state ++ lpTrnsfr) ++ sendFeeToMatcher) ++ refreshDLpActions), emitLpAmt)
12631265 else throw("Strict value is not equal to itself.")
12641266 }
12651267 else throw("Strict value is not equal to itself.")
12661268 }
12671269 else throw("Strict value is not equal to itself.")
12681270 }
12691271 else throw("Strict value is not equal to itself.")
12701272 }
12711273 else throw("Strict value is not equal to itself.")
12721274 }
12731275 else throw("Strict value is not equal to itself.")
12741276 }
12751277
12761278
12771279
12781280 @Callable(i)
12791281 func putForFree (maxSlpg) = if ((0 > maxSlpg))
12801282 then throw("Wrong slpg")
12811283 else if ((size(i.payments) != 2))
12821284 then throw("2 pmnts expd")
12831285 else {
12841286 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, "")
12851287 let state = estPut._9
12861288 let amAssetPmt = toBigInt(value(i.payments[0]).amount)
12871289 let prAssetPmt = toBigInt(value(i.payments[1]).amount)
12881290 let currentDLp = calcCurrentDLp(amAssetPmt, prAssetPmt, toBigInt(0))
12891291 if ((currentDLp == currentDLp))
12901292 then {
1291- let $t04637246437 = refreshDLpInternal(0, 0, 0)
1292- let refreshDLpActions = $t04637246437._1
1293- let updatedDLp = $t04637246437._2
1293+ let $t04648746552 = refreshDLpInternal(0, 0, 0)
1294+ let refreshDLpActions = $t04648746552._1
1295+ let updatedDLp = $t04648746552._2
12941296 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
12951297 if ((isUpdatedDLpValid == isUpdatedDLpValid))
12961298 then (state ++ refreshDLpActions)
12971299 else throw("Strict value is not equal to itself.")
12981300 }
12991301 else throw("Strict value is not equal to itself.")
13001302 }
13011303
13021304
13031305
13041306 @Callable(i)
13051307 func get () = {
13061308 let currentDLp = calcCurrentDLp(toBigInt(0), toBigInt(0), toBigInt(0))
13071309 if ((currentDLp == currentDLp))
13081310 then {
13091311 let r = cg(i)
13101312 let outAmtAmt = r._1
13111313 let outPrAmt = r._2
13121314 let pmtAmt = r._3
13131315 let pmtAssetId = r._4
13141316 let state = r._5
13151317 let b = invoke(fca, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
13161318 if ((b == b))
13171319 then {
1318- let $t04761047692 = refreshDLpInternal(-(outAmtAmt), -(outPrAmt), 0)
1319- let refreshDLpActions = $t04761047692._1
1320- let updatedDLp = $t04761047692._2
1320+ let $t04772547807 = refreshDLpInternal(-(outAmtAmt), -(outPrAmt), 0)
1321+ let refreshDLpActions = $t04772547807._1
1322+ let updatedDLp = $t04772547807._2
13211323 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
13221324 if ((isUpdatedDLpValid == isUpdatedDLpValid))
13231325 then (state ++ refreshDLpActions)
13241326 else throw("Strict value is not equal to itself.")
13251327 }
13261328 else throw("Strict value is not equal to itself.")
13271329 }
13281330 else throw("Strict value is not equal to itself.")
13291331 }
13301332
13311333
13321334
13331335 @Callable(i)
13341336 func getOneTknV2 (outAssetId,minOutAmount) = {
13351337 let isPoolOneTokenOperationsDisabled = {
13361338 let @ = invoke(fca, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
13371339 if ($isInstanceOf(@, "Boolean"))
13381340 then @
13391341 else throw(($getType(@) + " couldn't be cast to Boolean"))
13401342 }
13411343 let isGetDisabled = if (if (igs())
13421344 then true
13431345 else (cfgPoolStatus == PoolShutdown))
13441346 then true
13451347 else isPoolOneTokenOperationsDisabled
13461348 let checks = [if (if (!(isGetDisabled))
13471349 then true
13481350 else isManager(i))
13491351 then true
13501352 else throwErr("get operation is blocked by admin"), if ((size(i.payments) == 1))
13511353 then true
13521354 else throwErr("exactly 1 payment are expected")]
13531355 if ((checks == checks))
13541356 then {
1355- let $t04831048465 = getOneTknV2Internal(outAssetId, minOutAmount, i.payments, i.caller, i.originCaller, i.transactionId)
1356- let state = $t04831048465._1
1357- let totalAmount = $t04831048465._2
1357+ let $t04842548580 = getOneTknV2Internal(outAssetId, minOutAmount, i.payments, i.caller, i.originCaller, i.transactionId)
1358+ let state = $t04842548580._1
1359+ let totalAmount = $t04842548580._2
13581360 $Tuple2(state, totalAmount)
13591361 }
13601362 else throw("Strict value is not equal to itself.")
13611363 }
13621364
13631365
13641366
13651367 @Callable(i)
13661368 func refreshDLp () = {
13671369 let lastRefreshedBlockHeight = valueOrElse(getInteger(keyDLpRefreshedHeight), 0)
13681370 let checkLastRefreshedBlockHeight = if (((height - lastRefreshedBlockHeight) >= dLpRefreshDelay))
13691371 then unit
13701372 else throwErr(makeString([toString(dLpRefreshDelay), " blocks have not passed since the previous call"], ""))
13711373 if ((checkLastRefreshedBlockHeight == checkLastRefreshedBlockHeight))
13721374 then {
13731375 let dLp = valueOrErrorMessage(parseBigInt(valueOrElse(getString(this, keyDLp), "0")), fmtErr("invalid dLp"))
1374- let $t04898949053 = refreshDLpInternal(0, 0, 0)
1375- let dLpUpdateActions = $t04898949053._1
1376- let updatedDLp = $t04898949053._2
1376+ let $t04910449168 = refreshDLpInternal(0, 0, 0)
1377+ let dLpUpdateActions = $t04910449168._1
1378+ let updatedDLp = $t04910449168._2
13771379 let actions = if ((dLp != updatedDLp))
13781380 then dLpUpdateActions
13791381 else throwErr("nothing to refresh")
13801382 $Tuple2(actions, toString(updatedDLp))
13811383 }
13821384 else throw("Strict value is not equal to itself.")
13831385 }
13841386
13851387
13861388
13871389 @Callable(i)
13881390 func getOneTknV2READONLY (outAssetId,lpAssetAmount) = {
13891391 let amId = toBase58String(value(cfgAmountAssetId))
13901392 let prId = toBase58String(value(cfgPriceAssetId))
13911393 let lpId = toBase58String(value(cfgLpAssetId))
13921394 let xp = [toBigInt(getAccBalance(amId)), toBigInt(getAccBalance(prId))]
13931395 let lpEmission = toBigInt(valueOrErrorMessage(assetInfo(fromBase58String(lpId)), "invalid lp asset").quantity)
13941396 let D0 = getD(xp)
13951397 let D1 = (D0 - fraction(toBigInt(lpAssetAmount), D0, lpEmission))
13961398 let index = if ((outAssetId == amId))
13971399 then 0
13981400 else if ((outAssetId == prId))
13991401 then 1
14001402 else throw("invalid out asset id")
14011403 let newY = getYD(xp, index, D1)
14021404 let dy = (xp[index] - newY)
14031405 let totalGetRaw = max([0, toInt((dy - big1))])
1404- let $t05006350118 = takeFee(totalGetRaw, outFee)
1405- let totalGet = $t05006350118._1
1406- let feeAmount = $t05006350118._2
1406+ let $t05017850233 = takeFee(totalGetRaw, outFee)
1407+ let totalGet = $t05017850233._1
1408+ let feeAmount = $t05017850233._2
14071409 $Tuple2(nil, $Tuple2(totalGet, feeAmount))
14081410 }
14091411
14101412
14111413
14121414 @Callable(i)
14131415 func getOneTknV2WithBonusREADONLY (outAssetId,lpAssetAmount) = {
14141416 let amId = toBase58String(value(cfgAmountAssetId))
14151417 let prId = toBase58String(value(cfgPriceAssetId))
14161418 let lpId = toBase58String(value(cfgLpAssetId))
14171419 let amBalance = getAccBalance(amId)
14181420 let prBalance = getAccBalance(prId)
1419- let $t05049350608 = {
1421+ let $t05060850723 = {
14201422 let @ = invoke(this, "getOneTknV2READONLY", [outAssetId, lpAssetAmount], nil)
14211423 if ($isInstanceOf(@, "(Int, Int)"))
14221424 then @
14231425 else throw(($getType(@) + " couldn't be cast to (Int, Int)"))
14241426 }
1425- let totalGet = $t05049350608._1
1426- let feeAmount = $t05049350608._2
1427+ let totalGet = $t05060850723._1
1428+ let feeAmount = $t05060850723._2
14271429 let r = ego("", lpId, lpAssetAmount, this)
14281430 let outAmAmt = r._1
14291431 let outPrAmt = r._2
14301432 let sumOfGetAssets = (outAmAmt + outPrAmt)
14311433 let bonus = if ((sumOfGetAssets == 0))
14321434 then if ((totalGet == 0))
14331435 then 0
14341436 else throw("bonus calculation error")
14351437 else fraction((totalGet - sumOfGetAssets), scale8, sumOfGetAssets)
14361438 $Tuple2(nil, $Tuple3(totalGet, feeAmount, bonus))
14371439 }
14381440
14391441
14401442
14411443 @Callable(i)
14421444 func getNoLess (noLessThenAmtAsset,noLessThenPriceAsset) = {
14431445 let r = cg(i)
14441446 let outAmAmt = r._1
14451447 let outPrAmt = r._2
14461448 let pmtAmt = r._3
14471449 let pmtAssetId = r._4
14481450 let state = r._5
14491451 if ((noLessThenAmtAsset > outAmAmt))
14501452 then throw(((("Failed: " + toString(outAmAmt)) + " < ") + toString(noLessThenAmtAsset)))
14511453 else if ((noLessThenPriceAsset > outPrAmt))
14521454 then throw(((("Failed: " + toString(outPrAmt)) + " < ") + toString(noLessThenPriceAsset)))
14531455 else {
14541456 let currentDLp = calcCurrentDLp(toBigInt(0), toBigInt(0), toBigInt(0))
14551457 if ((currentDLp == currentDLp))
14561458 then {
14571459 let burnLPAssetOnFactory = invoke(fca, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
14581460 if ((burnLPAssetOnFactory == burnLPAssetOnFactory))
14591461 then {
1460- let $t05177451855 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1461- let refreshDLpActions = $t05177451855._1
1462- let updatedDLp = $t05177451855._2
1462+ let $t05188951970 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1463+ let refreshDLpActions = $t05188951970._1
1464+ let updatedDLp = $t05188951970._2
14631465 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
14641466 if ((isUpdatedDLpValid == isUpdatedDLpValid))
14651467 then (state ++ refreshDLpActions)
14661468 else throw("Strict value is not equal to itself.")
14671469 }
14681470 else throw("Strict value is not equal to itself.")
14691471 }
14701472 else throw("Strict value is not equal to itself.")
14711473 }
14721474 }
14731475
14741476
14751477
14761478 @Callable(i)
14771479 func unstakeAndGet (amount) = {
14781480 let checkPayments = if ((size(i.payments) != 0))
14791481 then throw("No pmnts expd")
14801482 else true
14811483 if ((checkPayments == checkPayments))
14821484 then {
14831485 let factoryCfg = gfc()
14841486 let lpAssetId = cfgLpAssetId
14851487 let staking = valueOrErrorMessage(addressFromString(factoryCfg[idxFactStakCntr]), "Wr st addr")
14861488 let currentDLp = calcCurrentDLp(toBigInt(0), toBigInt(0), toBigInt(0))
14871489 if ((currentDLp == currentDLp))
14881490 then {
14891491 let unstakeInv = invoke(staking, "unstake", [toBase58String(lpAssetId), amount], nil)
14901492 if ((unstakeInv == unstakeInv))
14911493 then {
14921494 let r = ego(toBase58String(i.transactionId), toBase58String(lpAssetId), amount, i.caller)
14931495 let outAmAmt = r._1
14941496 let outPrAmt = r._2
14951497 let sts = parseIntValue(r._9)
14961498 let state = r._10
14971499 let v = if (if (igs())
14981500 then true
14991501 else (sts == PoolShutdown))
15001502 then throw(("Blocked: " + toString(sts)))
15011503 else true
15021504 if ((v == v))
15031505 then {
15041506 let burnA = invoke(fca, "burn", [amount], [AttachedPayment(lpAssetId, amount)])
15051507 if ((burnA == burnA))
15061508 then {
1507- let $t05288252963 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1508- let refreshDLpActions = $t05288252963._1
1509- let updatedDLp = $t05288252963._2
1509+ let $t05299753078 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1510+ let refreshDLpActions = $t05299753078._1
1511+ let updatedDLp = $t05299753078._2
15101512 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
15111513 if ((isUpdatedDLpValid == isUpdatedDLpValid))
15121514 then (state ++ refreshDLpActions)
15131515 else throw("Strict value is not equal to itself.")
15141516 }
15151517 else throw("Strict value is not equal to itself.")
15161518 }
15171519 else throw("Strict value is not equal to itself.")
15181520 }
15191521 else throw("Strict value is not equal to itself.")
15201522 }
15211523 else throw("Strict value is not equal to itself.")
15221524 }
15231525 else throw("Strict value is not equal to itself.")
15241526 }
15251527
15261528
15271529
15281530 @Callable(i)
15291531 func unstakeAndGetNoLess (unstakeAmount,noLessThenAmountAsset,noLessThenPriceAsset) = {
15301532 let isGetDisabled = if (igs())
15311533 then true
15321534 else (cfgPoolStatus == PoolShutdown)
15331535 let checks = [if (!(isGetDisabled))
15341536 then true
15351537 else throw("get operation is blocked by admin"), if ((size(i.payments) == 0))
15361538 then true
15371539 else throw("no payments are expected")]
15381540 if ((checks == checks))
15391541 then {
15401542 let currentDLp = calcCurrentDLp(toBigInt(0), toBigInt(0), toBigInt(0))
15411543 if ((currentDLp == currentDLp))
15421544 then {
15431545 let unstakeInv = invoke(stakingContract, "unstake", [toBase58String(cfgLpAssetId), unstakeAmount], nil)
15441546 if ((unstakeInv == unstakeInv))
15451547 then {
15461548 let res = ego(toBase58String(i.transactionId), toBase58String(cfgLpAssetId), unstakeAmount, i.caller)
15471549 let outAmAmt = res._1
15481550 let outPrAmt = res._2
15491551 let state = res._10
15501552 let checkAmounts = [if ((outAmAmt >= noLessThenAmountAsset))
15511553 then true
15521554 else throw(makeString(["amount asset amount to receive is less than ", toString(noLessThenAmountAsset)], "")), if ((outPrAmt >= noLessThenPriceAsset))
15531555 then true
15541556 else throw(makeString(["price asset amount to receive is less than ", toString(noLessThenPriceAsset)], ""))]
15551557 if ((checkAmounts == checkAmounts))
15561558 then {
15571559 let burnLPAssetOnFactory = invoke(fca, "burn", [unstakeAmount], [AttachedPayment(cfgLpAssetId, unstakeAmount)])
15581560 if ((burnLPAssetOnFactory == burnLPAssetOnFactory))
15591561 then {
1560- let $t05421454295 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1561- let refreshDLpActions = $t05421454295._1
1562- let updatedDLp = $t05421454295._2
1562+ let $t05432954410 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1563+ let refreshDLpActions = $t05432954410._1
1564+ let updatedDLp = $t05432954410._2
15631565 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
15641566 if ((isUpdatedDLpValid == isUpdatedDLpValid))
15651567 then (state ++ refreshDLpActions)
15661568 else throw("Strict value is not equal to itself.")
15671569 }
15681570 else throw("Strict value is not equal to itself.")
15691571 }
15701572 else throw("Strict value is not equal to itself.")
15711573 }
15721574 else throw("Strict value is not equal to itself.")
15731575 }
15741576 else throw("Strict value is not equal to itself.")
15751577 }
15761578 else throw("Strict value is not equal to itself.")
15771579 }
15781580
15791581
15801582
15811583 @Callable(i)
15821584 func unstakeAndGetOneTknV2 (unstakeAmount,outAssetId,minOutAmount) = {
15831585 let isPoolOneTokenOperationsDisabled = {
15841586 let @ = invoke(fca, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
15851587 if ($isInstanceOf(@, "Boolean"))
15861588 then @
15871589 else throw(($getType(@) + " couldn't be cast to Boolean"))
15881590 }
15891591 let isGetDisabled = if (if (igs())
15901592 then true
15911593 else (cfgPoolStatus == PoolShutdown))
15921594 then true
15931595 else isPoolOneTokenOperationsDisabled
15941596 let checks = [if (if (!(isGetDisabled))
15951597 then true
15961598 else isManager(i))
15971599 then true
15981600 else throwErr("get operation is blocked by admin"), if ((size(i.payments) == 0))
15991601 then true
16001602 else throwErr("no payments are expected")]
16011603 if ((checks == checks))
16021604 then {
16031605 let factoryCfg = gfc()
16041606 let lpAssetId = cfgLpAssetId
16051607 let staking = valueOrErrorMessage(addressFromString(factoryCfg[idxFactStakCntr]), "Wr st addr")
16061608 let userAddress = i.caller
16071609 let lpAssetRecipientAddress = this
16081610 let unstakeInv = invoke(staking, "unstakeINTERNAL", [lpAssetId, unstakeAmount, userAddress.bytes, lpAssetRecipientAddress.bytes], nil)
16091611 if ((unstakeInv == unstakeInv))
16101612 then {
1611- let $t05531755505 = getOneTknV2Internal(outAssetId, minOutAmount, [AttachedPayment(lpAssetId, unstakeAmount)], i.caller, i.originCaller, i.transactionId)
1612- let state = $t05531755505._1
1613- let totalAmount = $t05531755505._2
1613+ let $t05543255620 = getOneTknV2Internal(outAssetId, minOutAmount, [AttachedPayment(lpAssetId, unstakeAmount)], i.caller, i.originCaller, i.transactionId)
1614+ let state = $t05543255620._1
1615+ let totalAmount = $t05543255620._2
16141616 $Tuple2(state, totalAmount)
16151617 }
16161618 else throw("Strict value is not equal to itself.")
16171619 }
16181620 else throw("Strict value is not equal to itself.")
16191621 }
16201622
16211623
16221624
16231625 @Callable(i)
16241626 func putOneTknV2WithBonusREADONLY (paymentAmountRaw,paymentAssetId) = {
1625- let $t05563355736 = calcPutOneTkn(paymentAmountRaw, paymentAssetId, "", "", true)
1626- let lpAmount = $t05563355736._1
1627- let state = $t05563355736._2
1628- let feeAmount = $t05563355736._3
1629- let bonus = $t05563355736._4
1627+ let $t05574855851 = calcPutOneTkn(paymentAmountRaw, paymentAssetId, "", "", true)
1628+ let lpAmount = $t05574855851._1
1629+ let state = $t05574855851._2
1630+ let feeAmount = $t05574855851._3
1631+ let bonus = $t05574855851._4
16301632 $Tuple2(nil, $Tuple3(lpAmount, feeAmount, bonus))
16311633 }
16321634
16331635
16341636
16351637 @Callable(i)
16361638 func putOneTknV2WithoutTakeFeeREADONLY (paymentAmountRaw,paymentAssetId) = {
1637- let $t05588455988 = calcPutOneTkn(paymentAmountRaw, paymentAssetId, "", "", false)
1638- let lpAmount = $t05588455988._1
1639- let state = $t05588455988._2
1640- let feeAmount = $t05588455988._3
1641- let bonus = $t05588455988._4
1639+ let $t05599956103 = calcPutOneTkn(paymentAmountRaw, paymentAssetId, "", "", false)
1640+ let lpAmount = $t05599956103._1
1641+ let state = $t05599956103._2
1642+ let feeAmount = $t05599956103._3
1643+ let bonus = $t05599956103._4
16421644 $Tuple2(nil, $Tuple3(lpAmount, feeAmount, bonus))
16431645 }
16441646
16451647
16461648
16471649 @Callable(i)
16481650 func activate (amtAsStr,prAsStr) = if ((toString(i.caller) != toString(fca)))
16491651 then throw("denied")
16501652 else $Tuple2([StringEntry(aa(), amtAsStr), StringEntry(pa(), prAsStr), StringEntry(amp(), toString(ampInitial))], "success")
16511653
16521654
16531655
16541656 @Callable(i)
16551657 func getPoolConfigWrapperREADONLY () = $Tuple2(nil, gpc())
16561658
16571659
16581660
16591661 @Callable(i)
16601662 func getAccBalanceWrapperREADONLY (assetId) = $Tuple2(nil, getAccBalance(assetId))
16611663
16621664
16631665
16641666 @Callable(i)
16651667 func calcPricesWrapperREADONLY (amAmt,prAmt,lpAmt) = {
16661668 let pr = calcPrices(amAmt, prAmt, lpAmt)
16671669 $Tuple2(nil, [toString(pr[0]), toString(pr[1]), toString(pr[2])])
16681670 }
16691671
16701672
16711673
16721674 @Callable(i)
16731675 func fromX18WrapperREADONLY (val,resScaleMult) = $Tuple2(nil, f1(parseBigIntValue(val), resScaleMult))
16741676
16751677
16761678
16771679 @Callable(i)
16781680 func toX18WrapperREADONLY (origVal,origScaleMult) = $Tuple2(nil, toString(t1(origVal, origScaleMult)))
16791681
16801682
16811683
16821684 @Callable(i)
16831685 func calcPriceBigIntWrapperREADONLY (prAmtX18,amAmtX18) = $Tuple2(nil, toString(cpbi(parseBigIntValue(prAmtX18), parseBigIntValue(amAmtX18))))
16841686
16851687
16861688
16871689 @Callable(i)
16881690 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, ""))
16891691
16901692
16911693
16921694 @Callable(i)
16931695 func estimateGetOperationWrapperREADONLY (txId58,pmtAsId,pmtLpAmt,usrAddr) = {
16941696 let r = ego(txId58, pmtAsId, pmtLpAmt, addressFromStringValue(usrAddr))
16951697 $Tuple2(nil, $Tuple10(r._1, r._2, r._3, r._4, r._5, r._6, r._7, toString(r._8), r._9, r._10))
16961698 }
16971699
16981700
16991701
17001702 @Callable(i)
17011703 func changeAmp () = {
17021704 let cfg = invoke(fca, "getChangeAmpConfigREADONLY", [toString(this)], nil)
1703- let $t05839758596 = match cfg {
1705+ let $t05851258711 = match cfg {
17041706 case list: List[Any] =>
17051707 $Tuple3({
17061708 let @ = list[0]
17071709 if ($isInstanceOf(@, "Int"))
17081710 then @
17091711 else throw(($getType(@) + " couldn't be cast to Int"))
17101712 }, {
17111713 let @ = list[1]
17121714 if ($isInstanceOf(@, "Int"))
17131715 then @
17141716 else throw(($getType(@) + " couldn't be cast to Int"))
17151717 }, {
17161718 let @ = list[2]
17171719 if ($isInstanceOf(@, "Int"))
17181720 then @
17191721 else throw(($getType(@) + " couldn't be cast to Int"))
17201722 })
17211723 case _ =>
17221724 throwErr("invalid entry type")
17231725 }
1724- let delay = $t05839758596._1
1725- let delta = $t05839758596._2
1726- let target = $t05839758596._3
1726+ let delay = $t05851258711._1
1727+ let delta = $t05851258711._2
1728+ let target = $t05851258711._3
17271729 let curAmp = parseIntValue(getStringValue(amp()))
17281730 let newAmpRaw = (curAmp + delta)
17291731 let newAmp = if ((0 > delta))
17301732 then if ((target > newAmpRaw))
17311733 then target
17321734 else newAmpRaw
17331735 else if ((newAmpRaw > target))
17341736 then target
17351737 else newAmpRaw
17361738 let lastCall = valueOrElse(getInteger(keyChangeAmpLastCall()), 0)
17371739 let wait = (lastCall + delay)
17381740 let checks = [if ((height > wait))
17391741 then true
17401742 else throwErr("try again in few blocks"), if ((curAmp != newAmp))
17411743 then true
17421744 else throwErr("already reached target")]
17431745 if ((checks == checks))
17441746 then [IntegerEntry(keyChangeAmpLastCall(), height), StringEntry(amp(), toString(newAmp)), StringEntry(keyAmpHistory(height), toString(newAmp))]
17451747 else throw("Strict value is not equal to itself.")
17461748 }
17471749
17481750
17491751 @Verifier(tx)
17501752 func verify () = {
17511753 let targetPublicKey = match managerPublicKeyOrUnit() {
17521754 case pk: ByteVector =>
17531755 pk
17541756 case _: Unit =>
17551757 tx.senderPublicKey
17561758 case _ =>
17571759 throw("Match error")
17581760 }
17591761 match tx {
17601762 case order: Order =>
17611763 let matcherPub = mp()
1762- let $t05952959646 = if (skipOrderValidation())
1764+ let $t05964459761 = if (skipOrderValidation())
17631765 then $Tuple2(true, "")
17641766 else validateMatcherOrderAllowed(order)
1765- let orderValid = $t05952959646._1
1766- let orderValidInfo = $t05952959646._2
1767+ let orderValid = $t05964459761._1
1768+ let orderValidInfo = $t05964459761._2
17671769 let senderValid = sigVerify(order.bodyBytes, order.proofs[0], order.senderPublicKey)
17681770 let matcherValid = sigVerify(order.bodyBytes, order.proofs[1], matcherPub)
17691771 if (if (if (orderValid)
17701772 then senderValid
17711773 else false)
17721774 then matcherValid
17731775 else false)
17741776 then true
17751777 else throwOrderError(orderValid, orderValidInfo, senderValid, matcherValid)
17761778 case s: SetScriptTransaction =>
17771779 if (sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey))
17781780 then true
17791781 else {
17801782 let newHash = blake2b256(value(s.script))
17811783 let allowedHash = fromBase64String(value(getString(fca, keyAllowedLpStableScriptHash())))
17821784 let currentHash = scriptHash(this)
17831785 if ((allowedHash == newHash))
17841786 then (currentHash != newHash)
17851787 else false
17861788 }
17871789 case _ =>
17881790 sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey)
17891791 }
17901792 }
17911793

github/deemru/w8io/026f985 
244.09 ms