tx · CzYd5gpdUE4aiRggosp9MUzFxZfoKWKSJetmw8n5cq6P

3NAefciWv6f9fWvEXdGgpHfanJFG8HqfjuT:  -0.04100000 Waves

2023.06.01 12:21 [2603410] smart account 3NAefciWv6f9fWvEXdGgpHfanJFG8HqfjuT > SELF 0.00000000 Waves

{ "type": 13, "id": "CzYd5gpdUE4aiRggosp9MUzFxZfoKWKSJetmw8n5cq6P", "fee": 4100000, "feeAssetId": null, "timestamp": 1685611319739, "version": 2, "chainId": 84, "sender": "3NAefciWv6f9fWvEXdGgpHfanJFG8HqfjuT", "senderPublicKey": "D1BL65meykxFZTCuq7jq9HSGLLnWvQamQPUNrguW5w39", "proofs": [ "2jtMdBVjrPgXN48DrgNmq98w5Kr2Aav7j11ukfk21j4xuC82xSyqfcyGdufXbqfQBh4MZXxfryY3ZBmDdpR85aCT" ], "script": "base64:BgKxLQgCEgUKAwEEARIHCgUBBAEIARIDCgEIEgQKAgEEEgQKAgEEEgMKAQESABIECgIIARIAEgQKAggBEgQKAggBEgQKAgEBEgMKAQESBQoDAQEBEgUKAwEIARIECgIBCBIECgIBCBIECgIICBIAEgMKAQgSBQoDAQEBEgQKAggBEgQKAgEBEgQKAggIEgsKCQgBAQIBAggEBBIGCgQICAEIEgAiBnNjYWxlOCIMc2NhbGU4QmlnSW50IgdzY2FsZTE4Igp6ZXJvQmlnSW50IgRiaWcwIgRiaWcxIgRiaWcyIgRiaWczIgRiaWc0IgpzbGlwcGFnZTREIgt3YXZlc1N0cmluZyIFQW11bHQiBURjb252IgNTRVAiBUVNUFRZIgpQb29sQWN0aXZlIgpQb29sUHV0RGlzIg5Qb29sTWF0Y2hlckRpcyIMUG9vbFNodXRkb3duIg5pZHhQb29sQWRkcmVzcyIJaWR4UG9vbFN0IglpZHhMUEFzSWQiCWlkeEFtQXNJZCIJaWR4UHJBc0lkIgtpZHhBbXRBc0RjbSINaWR4UHJpY2VBc0RjbSILaWR4SUFtdEFzSWQiDWlkeElQcmljZUFzSWQiD2lk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QAgpCeXRlVmVjdG9yBAJneAUCYVAFAmd4AwkAAQIFAmFQAgRVbml0CAUCaXgPc2VuZGVyUHVibGljS2V5CQACAQILTWF0Y2ggZXJyb3IEAmFQBQJpeAMJAAECBQJhUAIFT3JkZXIEAmZpBQJhUAQCaUEJAQJiaAAEAmlCAwkBAmdFAAkAlAoCBgIACQECZmgBBQJmaQQCYUoIBQJpQgJfMQQCYUsIBQJpQgJfMgQCYUwJAPQDAwgFAmZpCWJvZHlCeXRlcwkAkQMCCAUCZmkGcHJvb2ZzAAAIBQJmaQ9zZW5kZXJQdWJsaWNLZXkEAmFNCQD0AwMIBQJmaQlib2R5Qnl0ZXMJAJEDAggFAmZpBnByb29mcwABBQJpQQMDAwUCYUoFAmFMBwUCYU0HBgkBAmFJBAUCYUoFAmFLBQJhTAUCYU0DCQABAgUCYVACFFNldFNjcmlwdFRyYW5zYWN0aW9uBAJhVQUCYVADCQD0AwMIBQJpeAlib2R5Qnl0ZXMJAJEDAggFAml4BnByb29mcwAABQJpegYEAmlDCQD2AwEJAQV2YWx1ZQEIBQJhVQZzY3JpcHQEAmlECQDbBAEJAQV2YWx1ZQEJAJ0IAgUCYVQJAQJhRQAEAmlFCQDxBwEFBHRoaXMDCQAAAgUCaUQFAmlDCQECIT0CBQJpRQUCaUMHCQD0AwMIBQJpeAlib2R5Qnl0ZXMJAJEDAggFAml4BnByb29mcwAABQJpek7bkhU=", "height": 2603410, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 6M83SbtA3zqQtFyUkYp84rEcE5XJHKaE1zgvEcAe9n7m Next: 5faL8vCW1iEJYJpK8MHGGuwyWwgN7oPsw5HzGCKQrm3d Diff:
OldNewDifferences
2222 let slippage4D = toBigInt((scale8 - ((scale8 * 1) / scale8)))
2323
2424 let wavesString = "WAVES"
25-
26-let ampInitial = 50
2725
2826 let Amult = "100"
2927
258256 else toBase58String(value(input))
259257
260258
261-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]))
259+func parsePoolConfig (poolConfig) = $Tuple9(addressFromStringValue(poolConfig[idxPoolAddress]), parseIntValue(poolConfig[idxPoolSt]), fromBase58String(poolConfig[idxLPAsId]), parseAssetId(poolConfig[idxAmAsId]), parseAssetId(poolConfig[idxPrAsId]), parseIntValue(poolConfig[idxAmtAsDcm]), parseIntValue(poolConfig[idxPriceAsDcm]), fromBase58String(poolConfig[idxIAmtAsId]), fromBase58String(poolConfig[idxIPriceAsId]))
262260
263261
264262 let poolConfigParsed = parsePoolConfig(gpc())
265263
266-let $t086088794 = poolConfigParsed
264+let $t086868915 = poolConfigParsed
267265
268-let cfgPoolAddress = $t086088794._1
266+let cfgPoolAddress = $t086868915._1
269267
270-let cfgPoolStatus = $t086088794._2
268+let cfgPoolStatus = $t086868915._2
271269
272-let cfgLpAssetId = $t086088794._3
270+let cfgLpAssetId = $t086868915._3
273271
274-let cfgAmountAssetId = $t086088794._4
272+let cfgAmountAssetId = $t086868915._4
275273
276-let cfgPriceAssetId = $t086088794._5
274+let cfgPriceAssetId = $t086868915._5
277275
278-let cfgAmountAssetDecimals = $t086088794._6
276+let cfgAmountAssetDecimals = $t086868915._6
279277
280-let cfgPriceAssetDecimals = $t086088794._7
278+let cfgPriceAssetDecimals = $t086868915._7
279+
280+let cfgInAmountAssedId = $t086868915._8
281+
282+let cfgInPriceAssetId = $t086868915._9
281283
282284 func gfc () = split(strf(fca, fcfg()), SEP)
283285
398400 }
399401
400402 let arr = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16]
401- let $t01329913347 = {
403+ let $t01342013468 = {
402404 let $l = arr
403405 let $s = size($l)
404406 let $acc0 = $Tuple2(s, false)
412414
413415 $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)
414416 }
415- let d = $t01329913347._1
416- let found = $t01329913347._2
417+ let d = $t01342013468._1
418+ let found = $t01342013468._2
417419 if (found)
418420 then d
419421 else throw(("D calculation error, D = " + toString(d)))
460462 let lpId = cfgLpAssetId
461463 let amIdStr = toBase58String(value(cfgAmountAssetId))
462464 let prIdStr = toBase58String(value(cfgPriceAssetId))
465+ let inAmIdStr = cfgInAmountAssedId
466+ let inPrIdStr = cfgInPriceAssetId
463467 let amtDcm = cfgAmountAssetDecimals
464468 let priceDcm = cfgPriceAssetDecimals
465469 let sts = toString(cfgPoolStatus)
547551 else calcLpAmt
548552 let amDiff = (inAmAmt - calcAmAssetPmt)
549553 let prDiff = (inPrAmt - calcPrAssetPmt)
550- let $t02110921454 = if (if (isOneAsset)
554+ let $t02130721652 = if (if (isOneAsset)
551555 then (pmtId == amIdStr)
552556 else false)
553557 then $Tuple2(pmtAmt, 0)
556560 else false)
557561 then $Tuple2(0, pmtAmt)
558562 else $Tuple2(calcAmAssetPmt, calcPrAssetPmt)
559- let writeAmAmt = $t02110921454._1
560- let writePrAmt = $t02110921454._2
563+ let writeAmAmt = $t02130721652._1
564+ let writePrAmt = $t02130721652._2
561565 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))]
562566 $Tuple13(calcLpAmt, emitLpAmt, curPrice, amBalance, prBalance, lpEm, lpId, sts, commonState, amDiff, prDiff, inAmId, inPrId)
563567 }
576580 let c = (((((D * D) / (x * n)) * D) * aPrecision) / (ann * n))
577581 let b = ((s + ((D * aPrecision) / ann)) - D)
578582 func calc (acc,cur) = {
579- let $t02264922669 = acc
580- let y = $t02264922669._1
581- let found = $t02264922669._2
583+ let $t02284722867 = acc
584+ let y = $t02284722867._1
585+ let found = $t02284722867._2
582586 if ((found != unit))
583587 then acc
584588 else {
591595 }
592596
593597 let arr = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
594- let $t02297623023 = {
598+ let $t02317423221 = {
595599 let $l = arr
596600 let $s = size($l)
597601 let $acc0 = $Tuple2(D, unit)
605609
606610 $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)
607611 }
608- let y = $t02297623023._1
609- let found = $t02297623023._2
612+ let y = $t02317423221._1
613+ let found = $t02317423221._2
610614 if ((found != unit))
611615 then y
612616 else throw(("Y calculation error, Y = " + toString(y)))
650654 let priceAssetBalance = getAccBalance(assetIdToString(cfgPriceAssetId))
651655 let amountAssetAmount = order.amount
652656 let priceAssetAmount = fraction(order.amount, order.price, scale8, FLOOR)
653- let $t02522125433 = if ((order.orderType == Buy))
657+ let $t02541925631 = if ((order.orderType == Buy))
654658 then $Tuple2(amountAssetAmount, -(priceAssetAmount))
655659 else $Tuple2(-(amountAssetAmount), priceAssetAmount)
656- let amountAssetBalanceDelta = $t02522125433._1
657- let priceAssetBalanceDelta = $t02522125433._2
660+ let amountAssetBalanceDelta = $t02541925631._1
661+ let priceAssetBalanceDelta = $t02541925631._2
658662 if (if (if (igs())
659663 then true
660664 else (cfgPoolStatus == PoolMatcherDis))
667671 then throw("Wr assets")
668672 else {
669673 let dLp = parseBigIntValue(valueOrElse(getString(this, keyDLp), "0"))
670- let $t02577525875 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
671- let unusedActions = $t02577525875._1
672- let dLpNew = $t02577525875._2
674+ let $t02597326073 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
675+ let unusedActions = $t02597326073._1
676+ let dLpNew = $t02597326073._2
673677 let isOrderValid = (dLpNew >= dLp)
674678 let info = makeString(["dLp=", toString(dLp), " dLpNew=", toString(dLpNew), " amountAssetBalance=", toString(amountAssetBalance), " priceAssetBalance=", toString(priceAssetBalance), " amountAssetBalanceDelta=", toString(amountAssetBalanceDelta), " priceAssetBalanceDelta=", toString(priceAssetBalanceDelta), " height=", toString(height)], "")
675679 $Tuple2(isOrderValid, info)
723727 then {
724728 let amBalance = getAccBalance(amId)
725729 let prBalance = getAccBalance(prId)
726- let $t02853128993 = if ((txId == ""))
730+ let $t02872929191 = if ((txId == ""))
727731 then $Tuple2(amBalance, prBalance)
728732 else if ((pmtAssetId == amId))
729733 then if ((pmtAmtRaw > amBalance))
734738 then throw("invalid payment amount")
735739 else $Tuple2(amBalance, (prBalance - pmtAmtRaw))
736740 else throw("wrong pmtAssetId")
737- let amBalanceOld = $t02853128993._1
738- let prBalanceOld = $t02853128993._2
739- let $t02899929175 = if ((pmtAssetId == amId))
741+ let amBalanceOld = $t02872929191._1
742+ let prBalanceOld = $t02872929191._2
743+ let $t02919729373 = if ((pmtAssetId == amId))
740744 then $Tuple2(pmtAmtRaw, 0)
741745 else if ((pmtAssetId == prId))
742746 then $Tuple2(0, pmtAmtRaw)
743747 else throw("invalid payment")
744- let amAmountRaw = $t02899929175._1
745- let prAmountRaw = $t02899929175._2
746- let $t02917929433 = if (withTakeFee)
748+ let amAmountRaw = $t02919729373._1
749+ let prAmountRaw = $t02919729373._2
750+ let $t02937729631 = if (withTakeFee)
747751 then $Tuple3(takeFee(amAmountRaw, inFee)._1, takeFee(prAmountRaw, inFee)._1, takeFee(pmtAmtRaw, inFee)._2)
748752 else $Tuple3(amAmountRaw, prAmountRaw, 0)
749- let amAmount = $t02917929433._1
750- let prAmount = $t02917929433._2
751- let feeAmount = $t02917929433._3
753+ let amAmount = $t02937729631._1
754+ let prAmount = $t02937729631._2
755+ let feeAmount = $t02937729631._3
752756 let amBalanceNew = (amBalanceOld + amAmount)
753757 let prBalanceNew = (prBalanceOld + prAmount)
754758 let D0 = getD([t1(amBalanceOld, cfgAmountAssetDecimals), t1(prBalanceOld, cfgPriceAssetDecimals)])
796800 else {
797801 let amBalance = getAccBalance(amId)
798802 let prBalance = getAccBalance(prId)
799- let $t03154531656 = {
803+ let $t03174331854 = {
800804 let @ = invoke(this, "getOneTknV2READONLY", [outAssetId, pmtAmt], nil)
801805 if ($isInstanceOf(@, "(Int, Int)"))
802806 then @
803807 else throw(($getType(@) + " couldn't be cast to (Int, Int)"))
804808 }
805- if (($t03154531656 == $t03154531656))
809+ if (($t03174331854 == $t03174331854))
806810 then {
807- let feeAmount = $t03154531656._2
808- let totalGet = $t03154531656._1
811+ let feeAmount = $t03174331854._2
812+ let totalGet = $t03174331854._1
809813 let totalAmount = if (if ((minOutAmount > 0))
810814 then (minOutAmount > totalGet)
811815 else false)
812816 then throwErr(makeString(["amount to receive is less than ", toString(minOutAmount)], ""))
813817 else totalGet
814- let $t03184632153 = if ((outAssetId == amId))
818+ let $t03204432351 = if ((outAssetId == amId))
815819 then $Tuple4(totalAmount, 0, ((amBalance - totalAmount) - feeAmount), prBalance)
816820 else if ((outAssetId == prId))
817821 then $Tuple4(0, totalAmount, amBalance, ((prBalance - totalAmount) - feeAmount))
818822 else throw("invalid out asset id")
819- let outAm = $t03184632153._1
820- let outPr = $t03184632153._2
821- let amBalanceNew = $t03184632153._3
822- let prBalanceNew = $t03184632153._4
823+ let outAm = $t03204432351._1
824+ let outPr = $t03204432351._2
825+ let amBalanceNew = $t03204432351._3
826+ let prBalanceNew = $t03204432351._4
823827 let curPrX18 = cpbi(t1(prBalanceNew, prDecimals), t1(amBalanceNew, amDecimals))
824828 let curPr = f1(curPrX18, scale8)
825829 let outAssetIdOrWaves = if ((outAssetId == "WAVES"))
834838 let burn = invoke(fca, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
835839 if ((burn == burn))
836840 then {
837- let $t03293833288 = {
841+ let $t03313633486 = {
838842 let feeAmountForCalc = if ((this == feeCollectorAddress))
839843 then 0
840844 else feeAmount
845849 then $Tuple2(-((totalGet + feeAmountForCalc)), 0)
846850 else $Tuple2(0, -((totalGet + feeAmountForCalc)))
847851 }
848- let amountAssetBalanceDelta = $t03293833288._1
849- let priceAssetBalanceDelta = $t03293833288._2
850- let $t03329133399 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
851- let refreshDLpActions = $t03329133399._1
852- let updatedDLp = $t03329133399._2
852+ let amountAssetBalanceDelta = $t03313633486._1
853+ let priceAssetBalanceDelta = $t03313633486._2
854+ let $t03348933597 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
855+ let refreshDLpActions = $t03348933597._1
856+ let updatedDLp = $t03348933597._2
853857 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
854858 if ((isUpdatedDLpValid == isUpdatedDLpValid))
855859 then $Tuple2((state ++ refreshDLpActions), totalAmount)
921925 let c = (((((D * D) / (x * n)) * D) * aPrecision) / (ann * n))
922926 let b = ((s + ((D * aPrecision) / ann)) - D)
923927 func calc (acc,cur) = {
924- let $t03488634906 = acc
925- let y = $t03488634906._1
926- let found = $t03488634906._2
928+ let $t03508435104 = acc
929+ let y = $t03508435104._1
930+ let found = $t03508435104._2
927931 if ((found != unit))
928932 then acc
929933 else {
936940 }
937941
938942 let arr = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
939- let $t03523735284 = {
943+ let $t03543535482 = {
940944 let $l = arr
941945 let $s = size($l)
942946 let $acc0 = $Tuple2(D, unit)
950954
951955 $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)
952956 }
953- let y = $t03523735284._1
954- let found = $t03523735284._2
957+ let y = $t03543535482._1
958+ let found = $t03543535482._2
955959 if ((found != unit))
956960 then y
957961 else throw(("Y calculation error, Y = " + toString(y)))
963967
964968 @Callable(i)
965969 func calculateAmountOutForSwapREADONLY (cleanAmountIn,isReverse,feePoolAmount) = {
966- let $t03563636060 = if ((isReverse == false))
970+ let $t03583436258 = if ((isReverse == false))
967971 then {
968972 let assetOut = strf(this, pa())
969973 let poolAmountInBalance = (toBigInt(getAccBalance(strf(this, aa()))) + toBigInt(cleanAmountIn))
974978 let poolAmountInBalance = (toBigInt(getAccBalance(strf(this, pa()))) + toBigInt(cleanAmountIn))
975979 $Tuple2(assetOut, poolAmountInBalance)
976980 }
977- let assetOut = $t03563636060._1
978- let poolAmountInBalance = $t03563636060._2
981+ let assetOut = $t03583436258._1
982+ let poolAmountInBalance = $t03583436258._2
979983 let poolConfig = gpc()
980984 let amId = poolConfig[idxAmAsId]
981985 let prId = poolConfig[idxPrAsId]
10151019 then {
10161020 let pmt = value(i.payments[0])
10171021 let assetIn = assetIdToString(pmt.assetId)
1018- let $t03749637890 = if ((isReverse == false))
1022+ let $t03769438088 = if ((isReverse == false))
10191023 then {
10201024 let assetOut = strf(this, pa())
10211025 let poolAmountInBalance = (getAccBalance(assetIn) - value(i.payments[0]).amount)
10261030 let poolAmountInBalance = (getAccBalance(assetIn) - value(i.payments[0]).amount)
10271031 $Tuple2(assetOut, poolAmountInBalance)
10281032 }
1029- let assetOut = $t03749637890._1
1030- let poolAmountInBalance = $t03749637890._2
1033+ let assetOut = $t03769438088._1
1034+ let poolAmountInBalance = $t03769438088._2
10311035 let poolConfig = gpc()
10321036 let amId = poolConfig[idxAmAsId]
10331037 let prId = poolConfig[idxPrAsId]
11321136 else throw("Strict value is not equal to itself.")
11331137 }
11341138 else [ScriptTransfer(i.caller, emitLpAmt, lpAssetId)]
1135- let $t04203442176 = refreshDLpInternal(0, 0, 0)
1136- let refreshDLpActions = $t04203442176._1
1137- let updatedDLp = $t04203442176._2
1139+ let $t04223242374 = refreshDLpInternal(0, 0, 0)
1140+ let refreshDLpActions = $t04223242374._1
1141+ let updatedDLp = $t04223242374._2
11381142 let check = if ((updatedDLp >= currentDLp))
11391143 then true
11401144 else throwErr(makeString(["updated DLp lower than current DLp", toString(amountAssetBalance), toString(priceAssetBalance), toString(lpAssetEmission), toString(currentDLp), toString(updatedDLp), toString(amDiff), toString(prDiff)], " "))
12071211 else calcCurrentDLp(toBigInt(0), toBigInt(pmtAmt), toBigInt(0))
12081212 if ((currentDLp == currentDLp))
12091213 then {
1210- let $t04381743975 = calcPutOneTkn(pmtAmt, pmtAssetId, toString(userAddress), toBase58String(i.transactionId), true)
1211- if (($t04381743975 == $t04381743975))
1214+ let $t04401544173 = calcPutOneTkn(pmtAmt, pmtAssetId, toString(userAddress), toBase58String(i.transactionId), true)
1215+ if (($t04401544173 == $t04401544173))
12121216 then {
1213- let feeAmount = $t04381743975._3
1214- let state = $t04381743975._2
1215- let estimLP = $t04381743975._1
1217+ let feeAmount = $t04401544173._3
1218+ let state = $t04401544173._2
1219+ let estimLP = $t04401544173._1
12161220 let emitLpAmt = if (if ((minOutAmount > 0))
12171221 then (minOutAmount > estimLP)
12181222 else false)
12401244 let sendFeeToMatcher = if ((feeAmount > 0))
12411245 then [ScriptTransfer(feeCollectorAddress, feeAmount, fromBase58String(pmtAssetId))]
12421246 else nil
1243- let $t04486045209 = if ((this == feeCollectorAddress))
1247+ let $t04505845407 = if ((this == feeCollectorAddress))
12441248 then $Tuple2(0, 0)
12451249 else {
12461250 let paymentInAmountAsset = if ((pmt.assetId == cfgAmountAssetId))
12501254 then $Tuple2(-(feeAmount), 0)
12511255 else $Tuple2(0, -(feeAmount))
12521256 }
1253- let amountAssetBalanceDelta = $t04486045209._1
1254- let priceAssetBalanceDelta = $t04486045209._2
1255- let $t04521245320 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
1256- let refreshDLpActions = $t04521245320._1
1257- let updatedDLp = $t04521245320._2
1257+ let amountAssetBalanceDelta = $t04505845407._1
1258+ let priceAssetBalanceDelta = $t04505845407._2
1259+ let $t04541045518 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
1260+ let refreshDLpActions = $t04541045518._1
1261+ let updatedDLp = $t04541045518._2
12581262 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
12591263 if ((isUpdatedDLpValid == isUpdatedDLpValid))
12601264 then $Tuple2((((state ++ lpTrnsfr) ++ sendFeeToMatcher) ++ refreshDLpActions), emitLpAmt)
12861290 let currentDLp = calcCurrentDLp(amAssetPmt, prAssetPmt, toBigInt(0))
12871291 if ((currentDLp == currentDLp))
12881292 then {
1289- let $t04635046415 = refreshDLpInternal(0, 0, 0)
1290- let refreshDLpActions = $t04635046415._1
1291- let updatedDLp = $t04635046415._2
1293+ let $t04654846613 = refreshDLpInternal(0, 0, 0)
1294+ let refreshDLpActions = $t04654846613._1
1295+ let updatedDLp = $t04654846613._2
12921296 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
12931297 if ((isUpdatedDLpValid == isUpdatedDLpValid))
12941298 then (state ++ refreshDLpActions)
13131317 let b = invoke(fca, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
13141318 if ((b == b))
13151319 then {
1316- let $t04758847670 = refreshDLpInternal(-(outAmtAmt), -(outPrAmt), 0)
1317- let refreshDLpActions = $t04758847670._1
1318- let updatedDLp = $t04758847670._2
1320+ let $t04778647868 = refreshDLpInternal(-(outAmtAmt), -(outPrAmt), 0)
1321+ let refreshDLpActions = $t04778647868._1
1322+ let updatedDLp = $t04778647868._2
13191323 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
13201324 if ((isUpdatedDLpValid == isUpdatedDLpValid))
13211325 then (state ++ refreshDLpActions)
13501354 else throwErr("exactly 1 payment are expected")]
13511355 if ((checks == checks))
13521356 then {
1353- let $t04828848443 = getOneTknV2Internal(outAssetId, minOutAmount, i.payments, i.caller, i.originCaller, i.transactionId)
1354- let state = $t04828848443._1
1355- let totalAmount = $t04828848443._2
1357+ let $t04848648641 = getOneTknV2Internal(outAssetId, minOutAmount, i.payments, i.caller, i.originCaller, i.transactionId)
1358+ let state = $t04848648641._1
1359+ let totalAmount = $t04848648641._2
13561360 $Tuple2(state, totalAmount)
13571361 }
13581362 else throw("Strict value is not equal to itself.")
13691373 if ((checkLastRefreshedBlockHeight == checkLastRefreshedBlockHeight))
13701374 then {
13711375 let dLp = valueOrErrorMessage(parseBigInt(valueOrElse(getString(this, keyDLp), "0")), fmtErr("invalid dLp"))
1372- let $t04896749031 = refreshDLpInternal(0, 0, 0)
1373- let dLpUpdateActions = $t04896749031._1
1374- let updatedDLp = $t04896749031._2
1376+ let $t04916549229 = refreshDLpInternal(0, 0, 0)
1377+ let dLpUpdateActions = $t04916549229._1
1378+ let updatedDLp = $t04916549229._2
13751379 let actions = if ((dLp != updatedDLp))
13761380 then dLpUpdateActions
13771381 else throwErr("nothing to refresh")
13991403 let newY = getYD(xp, index, D1)
14001404 let dy = (xp[index] - newY)
14011405 let totalGetRaw = max([0, toInt((dy - big1))])
1402- let $t05004150096 = takeFee(totalGetRaw, outFee)
1403- let totalGet = $t05004150096._1
1404- let feeAmount = $t05004150096._2
1406+ let $t05023950294 = takeFee(totalGetRaw, outFee)
1407+ let totalGet = $t05023950294._1
1408+ let feeAmount = $t05023950294._2
14051409 $Tuple2(nil, $Tuple2(totalGet, feeAmount))
14061410 }
14071411
14141418 let lpId = toBase58String(value(cfgLpAssetId))
14151419 let amBalance = getAccBalance(amId)
14161420 let prBalance = getAccBalance(prId)
1417- let $t05047150586 = {
1421+ let $t05066950784 = {
14181422 let @ = invoke(this, "getOneTknV2READONLY", [outAssetId, lpAssetAmount], nil)
14191423 if ($isInstanceOf(@, "(Int, Int)"))
14201424 then @
14211425 else throw(($getType(@) + " couldn't be cast to (Int, Int)"))
14221426 }
1423- let totalGet = $t05047150586._1
1424- let feeAmount = $t05047150586._2
1427+ let totalGet = $t05066950784._1
1428+ let feeAmount = $t05066950784._2
14251429 let r = ego("", lpId, lpAssetAmount, this)
14261430 let outAmAmt = r._1
14271431 let outPrAmt = r._2
14551459 let burnLPAssetOnFactory = invoke(fca, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
14561460 if ((burnLPAssetOnFactory == burnLPAssetOnFactory))
14571461 then {
1458- let $t05175251833 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1459- let refreshDLpActions = $t05175251833._1
1460- let updatedDLp = $t05175251833._2
1462+ let $t05195052031 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1463+ let refreshDLpActions = $t05195052031._1
1464+ let updatedDLp = $t05195052031._2
14611465 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
14621466 if ((isUpdatedDLpValid == isUpdatedDLpValid))
14631467 then (state ++ refreshDLpActions)
15021506 let burnA = invoke(fca, "burn", [amount], [AttachedPayment(lpAssetId, amount)])
15031507 if ((burnA == burnA))
15041508 then {
1505- let $t05286052941 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1506- let refreshDLpActions = $t05286052941._1
1507- let updatedDLp = $t05286052941._2
1509+ let $t05305853139 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1510+ let refreshDLpActions = $t05305853139._1
1511+ let updatedDLp = $t05305853139._2
15081512 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
15091513 if ((isUpdatedDLpValid == isUpdatedDLpValid))
15101514 then (state ++ refreshDLpActions)
15551559 let burnLPAssetOnFactory = invoke(fca, "burn", [unstakeAmount], [AttachedPayment(cfgLpAssetId, unstakeAmount)])
15561560 if ((burnLPAssetOnFactory == burnLPAssetOnFactory))
15571561 then {
1558- let $t05419254273 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1559- let refreshDLpActions = $t05419254273._1
1560- let updatedDLp = $t05419254273._2
1562+ let $t05439054471 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1563+ let refreshDLpActions = $t05439054471._1
1564+ let updatedDLp = $t05439054471._2
15611565 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
15621566 if ((isUpdatedDLpValid == isUpdatedDLpValid))
15631567 then (state ++ refreshDLpActions)
16061610 let unstakeInv = invoke(staking, "unstakeINTERNAL", [lpAssetId, unstakeAmount, userAddress.bytes, lpAssetRecipientAddress.bytes], nil)
16071611 if ((unstakeInv == unstakeInv))
16081612 then {
1609- let $t05529555483 = getOneTknV2Internal(outAssetId, minOutAmount, [AttachedPayment(lpAssetId, unstakeAmount)], i.caller, i.originCaller, i.transactionId)
1610- let state = $t05529555483._1
1611- let totalAmount = $t05529555483._2
1613+ let $t05549355681 = getOneTknV2Internal(outAssetId, minOutAmount, [AttachedPayment(lpAssetId, unstakeAmount)], i.caller, i.originCaller, i.transactionId)
1614+ let state = $t05549355681._1
1615+ let totalAmount = $t05549355681._2
16121616 $Tuple2(state, totalAmount)
16131617 }
16141618 else throw("Strict value is not equal to itself.")
16201624
16211625 @Callable(i)
16221626 func putOneTknV2WithBonusREADONLY (paymentAmountRaw,paymentAssetId) = {
1623- let $t05561155714 = calcPutOneTkn(paymentAmountRaw, paymentAssetId, "", "", true)
1624- let lpAmount = $t05561155714._1
1625- let state = $t05561155714._2
1626- let feeAmount = $t05561155714._3
1627- let bonus = $t05561155714._4
1627+ let $t05580955912 = calcPutOneTkn(paymentAmountRaw, paymentAssetId, "", "", true)
1628+ let lpAmount = $t05580955912._1
1629+ let state = $t05580955912._2
1630+ let feeAmount = $t05580955912._3
1631+ let bonus = $t05580955912._4
16281632 $Tuple2(nil, $Tuple3(lpAmount, feeAmount, bonus))
16291633 }
16301634
16321636
16331637 @Callable(i)
16341638 func putOneTknV2WithoutTakeFeeREADONLY (paymentAmountRaw,paymentAssetId) = {
1635- let $t05586255966 = calcPutOneTkn(paymentAmountRaw, paymentAssetId, "", "", false)
1636- let lpAmount = $t05586255966._1
1637- let state = $t05586255966._2
1638- let feeAmount = $t05586255966._3
1639- let bonus = $t05586255966._4
1639+ let $t05606056164 = calcPutOneTkn(paymentAmountRaw, paymentAssetId, "", "", false)
1640+ let lpAmount = $t05606056164._1
1641+ let state = $t05606056164._2
1642+ let feeAmount = $t05606056164._3
1643+ let bonus = $t05606056164._4
16401644 $Tuple2(nil, $Tuple3(lpAmount, feeAmount, bonus))
16411645 }
16421646
16451649 @Callable(i)
16461650 func activate (amtAsStr,prAsStr) = if ((toString(i.caller) != toString(fca)))
16471651 then throw("denied")
1648- else $Tuple2([StringEntry(aa(), amtAsStr), StringEntry(pa(), prAsStr), StringEntry(amp(), toString(ampInitial))], "success")
1652+ else $Tuple2([StringEntry(aa(), amtAsStr), StringEntry(pa(), prAsStr)], "success")
16491653
16501654
16511655
16981702 @Callable(i)
16991703 func changeAmp () = {
17001704 let cfg = invoke(fca, "getChangeAmpConfigREADONLY", [toString(this)], nil)
1701- let $t05837558574 = match cfg {
1705+ let $t05851858717 = match cfg {
17021706 case list: List[Any] =>
17031707 $Tuple3({
17041708 let @ = list[0]
17191723 case _ =>
17201724 throwErr("invalid entry type")
17211725 }
1722- let delay = $t05837558574._1
1723- let delta = $t05837558574._2
1724- let target = $t05837558574._3
1726+ let delay = $t05851858717._1
1727+ let delta = $t05851858717._2
1728+ let target = $t05851858717._3
17251729 let curAmp = parseIntValue(getStringValue(amp()))
17261730 let newAmpRaw = (curAmp + delta)
17271731 let newAmp = if ((0 > delta))
17571761 match tx {
17581762 case order: Order =>
17591763 let matcherPub = mp()
1760- let $t05950759624 = if (skipOrderValidation())
1764+ let $t05965059767 = if (skipOrderValidation())
17611765 then $Tuple2(true, "")
17621766 else validateMatcherOrderAllowed(order)
1763- let orderValid = $t05950759624._1
1764- let orderValidInfo = $t05950759624._2
1767+ let orderValid = $t05965059767._1
1768+ let orderValidInfo = $t05965059767._2
17651769 let senderValid = sigVerify(order.bodyBytes, order.proofs[0], order.senderPublicKey)
17661770 let matcherValid = sigVerify(order.bodyBytes, order.proofs[1], matcherPub)
17671771 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"
25-
26-let ampInitial = 50
2725
2826 let Amult = "100"
2927
3028 let Dconv = "1"
3129
3230 let SEP = "__"
3331
3432 let EMPTY = ""
3533
3634 let PoolActive = 1
3735
3836 let PoolPutDis = 2
3937
4038 let PoolMatcherDis = 3
4139
4240 let PoolShutdown = 4
4341
4442 let idxPoolAddress = 1
4543
4644 let idxPoolSt = 2
4745
4846 let idxLPAsId = 3
4947
5048 let idxAmAsId = 4
5149
5250 let idxPrAsId = 5
5351
5452 let idxAmtAsDcm = 6
5553
5654 let idxPriceAsDcm = 7
5755
5856 let idxIAmtAsId = 8
5957
6058 let idxIPriceAsId = 9
6159
6260 let idxFactStakCntr = 1
6361
6462 let idxFactoryRestCntr = 6
6563
6664 let idxFactSlippCntr = 7
6765
6866 let idxFactGwxRewCntr = 10
6967
7068 let feeDefault = fraction(10, scale8, 10000)
7169
7270 func t1 (origVal,origScaleMult) = fraction(toBigInt(origVal), scale18, toBigInt(origScaleMult))
7371
7472
7573 func t1BigInt (origVal,origScaleMult) = fraction(origVal, scale18, origScaleMult)
7674
7775
7876 func f1 (val,resultScaleMult) = toInt(fraction(val, toBigInt(resultScaleMult), scale18))
7977
8078
8179 func fromX18Round (val,resultScaleMult,round) = toInt(fraction(val, toBigInt(resultScaleMult), scale18, round))
8280
8381
8482 func t2 (origVal,origScaleMult) = fraction(origVal, scale18, toBigInt(origScaleMult))
8583
8684
8785 func f2 (val,resultScaleMult) = fraction(val, toBigInt(resultScaleMult), scale18)
8886
8987
9088 func ts (amt,resScale,curScale) = fraction(amt, resScale, curScale)
9189
9290
9391 func abs (val) = if ((zeroBigInt > val))
9492 then -(val)
9593 else val
9694
9795
9896 func absBigInt (val) = if ((zeroBigInt > val))
9997 then -(val)
10098 else val
10199
102100
103101 func fc () = "%s__factoryContract"
104102
105103
106104 func keyManagerPublicKey () = "%s__managerPublicKey"
107105
108106
109107 func keyManagerVaultAddress () = "%s__managerVaultAddress"
110108
111109
112110 func pl () = "%s%s__price__last"
113111
114112
115113 func ph (h,t) = makeString(["%s%s%d%d__price__history", toString(h), toString(t)], SEP)
116114
117115
118116 func pau (ua,txId) = ((("%s%s%s__P__" + ua) + "__") + txId)
119117
120118
121119 func gau (ua,txId) = ((("%s%s%s__G__" + ua) + "__") + txId)
122120
123121
124122 func aa () = "%s__amountAsset"
125123
126124
127125 func pa () = "%s__priceAsset"
128126
129127
130128 func amp () = "%s__amp"
131129
132130
133131 func keyAmpHistory (heightBlocks) = ("%s%d__amp__" + toString(heightBlocks))
134132
135133
136134 func keyChangeAmpLastCall () = "%s__changeAmpLastCall"
137135
138136
139137 let keyFee = "%s__fee"
140138
141139 let fee = valueOrElse(getInteger(this, keyFee), feeDefault)
142140
143141 let keyDLp = makeString(["%s", "dLp"], SEP)
144142
145143 let keyDLpRefreshedHeight = makeString(["%s", "dLpRefreshedHeight"], SEP)
146144
147145 let keyDLpRefreshDelay = makeString(["%s", "refreshDLpDelay"], SEP)
148146
149147 let dLpRefreshDelayDefault = 30
150148
151149 let dLpRefreshDelay = valueOrElse(getInteger(this, keyDLpRefreshDelay), dLpRefreshDelayDefault)
152150
153151 func fcfg () = "%s__factoryConfig"
154152
155153
156154 func mtpk () = "%s%s__matcher__publicKey"
157155
158156
159157 func pc (iAmtAs,iPrAs) = (((("%d%d%s__" + iAmtAs) + "__") + iPrAs) + "__config")
160158
161159
162160 func mba (bAStr) = ("%s%s%s__mappings__baseAsset2internalId__" + bAStr)
163161
164162
165163 func aps () = "%s__shutdown"
166164
167165
168166 func keyAllowedLpStableScriptHash () = "%s__allowedLpStableScriptHash"
169167
170168
171169 func keyFeeCollectorAddress () = "%s__feeCollectorAddress"
172170
173171
174172 func keySkipOrderValidation (poolAddress) = ("%s%s__skipOrderValidation__" + poolAddress)
175173
176174
177175 func throwOrderError (orderValid,orderValidInfo,senderValid,matcherValid) = throw((((((((("order validation failed: orderValid=" + toString(orderValid)) + " (") + orderValidInfo) + ")") + " senderValid=") + toString(senderValid)) + " matcherValid=") + toString(matcherValid)))
178176
179177
180178 func addressFromStringOrThis (addressString) = match addressFromString(addressString) {
181179 case a: Address =>
182180 a
183181 case _ =>
184182 this
185183 }
186184
187185
188186 func getManagerVaultAddressOrThis () = {
189187 let factoryAddress = match getString(fc()) {
190188 case fca: String =>
191189 addressFromStringOrThis(fca)
192190 case _ =>
193191 this
194192 }
195193 match getString(factoryAddress, keyManagerVaultAddress()) {
196194 case s: String =>
197195 addressFromStringOrThis(s)
198196 case _ =>
199197 this
200198 }
201199 }
202200
203201
204202 func strf (addr,key) = valueOrErrorMessage(getString(addr, key), makeString(["mandatory ", toString(addr), ".", key, " not defined"], ""))
205203
206204
207205 func intf (addr,key) = valueOrErrorMessage(getInteger(addr, key), makeString(["mandatory ", toString(addr), ".", key, " not defined"], ""))
208206
209207
210208 func throwErr (msg) = throw(makeString(["lp_stable.ride:", msg], " "))
211209
212210
213211 func fmtErr (msg) = makeString(["lp_stable.ride:", msg], " ")
214212
215213
216214 let fca = addressFromStringValue(strf(this, fc()))
217215
218216 let inFee = {
219217 let @ = invoke(fca, "getInFeeREADONLY", [toString(this)], nil)
220218 if ($isInstanceOf(@, "Int"))
221219 then @
222220 else throw(($getType(@) + " couldn't be cast to Int"))
223221 }
224222
225223 let outFee = {
226224 let @ = invoke(fca, "getOutFeeREADONLY", [toString(this)], nil)
227225 if ($isInstanceOf(@, "Int"))
228226 then @
229227 else throw(($getType(@) + " couldn't be cast to Int"))
230228 }
231229
232230 let A = strf(this, amp())
233231
234232 func igs () = valueOrElse(getBoolean(fca, aps()), false)
235233
236234
237235 func mp () = fromBase58String(strf(fca, mtpk()))
238236
239237
240238 let feeCollectorAddress = addressFromStringValue(strf(fca, keyFeeCollectorAddress()))
241239
242240 func gpc () = {
243241 let amtAs = strf(this, aa())
244242 let priceAs = strf(this, pa())
245243 let iPriceAs = intf(fca, mba(priceAs))
246244 let iAmtAs = intf(fca, mba(amtAs))
247245 split(strf(fca, pc(toString(iAmtAs), toString(iPriceAs))), SEP)
248246 }
249247
250248
251249 func parseAssetId (input) = if ((input == wavesString))
252250 then unit
253251 else fromBase58String(input)
254252
255253
256254 func assetIdToString (input) = if ((input == unit))
257255 then wavesString
258256 else toBase58String(value(input))
259257
260258
261-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]))
259+func parsePoolConfig (poolConfig) = $Tuple9(addressFromStringValue(poolConfig[idxPoolAddress]), parseIntValue(poolConfig[idxPoolSt]), fromBase58String(poolConfig[idxLPAsId]), parseAssetId(poolConfig[idxAmAsId]), parseAssetId(poolConfig[idxPrAsId]), parseIntValue(poolConfig[idxAmtAsDcm]), parseIntValue(poolConfig[idxPriceAsDcm]), fromBase58String(poolConfig[idxIAmtAsId]), fromBase58String(poolConfig[idxIPriceAsId]))
262260
263261
264262 let poolConfigParsed = parsePoolConfig(gpc())
265263
266-let $t086088794 = poolConfigParsed
264+let $t086868915 = poolConfigParsed
267265
268-let cfgPoolAddress = $t086088794._1
266+let cfgPoolAddress = $t086868915._1
269267
270-let cfgPoolStatus = $t086088794._2
268+let cfgPoolStatus = $t086868915._2
271269
272-let cfgLpAssetId = $t086088794._3
270+let cfgLpAssetId = $t086868915._3
273271
274-let cfgAmountAssetId = $t086088794._4
272+let cfgAmountAssetId = $t086868915._4
275273
276-let cfgPriceAssetId = $t086088794._5
274+let cfgPriceAssetId = $t086868915._5
277275
278-let cfgAmountAssetDecimals = $t086088794._6
276+let cfgAmountAssetDecimals = $t086868915._6
279277
280-let cfgPriceAssetDecimals = $t086088794._7
278+let cfgPriceAssetDecimals = $t086868915._7
279+
280+let cfgInAmountAssedId = $t086868915._8
281+
282+let cfgInPriceAssetId = $t086868915._9
281283
282284 func gfc () = split(strf(fca, fcfg()), SEP)
283285
284286
285287 let factoryConfig = gfc()
286288
287289 let stakingContract = valueOrErrorMessage(addressFromString(factoryConfig[idxFactStakCntr]), "Invalid staking contract address")
288290
289291 let slipageContract = valueOrErrorMessage(addressFromString(factoryConfig[idxFactSlippCntr]), "Invalid slipage contract address")
290292
291293 let gwxContract = valueOrErrorMessage(addressFromString(factoryConfig[idxFactGwxRewCntr]), "Invalid gwx contract address")
292294
293295 let restContract = valueOrErrorMessage(addressFromString(factoryConfig[idxFactoryRestCntr]), "Invalid gwx contract address")
294296
295297 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)
296298
297299
298300 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)
299301
300302
301303 func getAccBalance (assetId) = if ((assetId == "WAVES"))
302304 then wavesBalance(this).available
303305 else assetBalance(this, fromBase58String(assetId))
304306
305307
306308 func cpbi (prAmtX18,amAmtX18) = fraction(prAmtX18, scale18, amAmtX18)
307309
308310
309311 func cpbir (prAmtX18,amAmtX18,round) = fraction(prAmtX18, scale18, amAmtX18, round)
310312
311313
312314 func vad (A1,A2,slippage) = {
313315 let diff = fraction((A1 - A2), scale8BigInt, A2)
314316 let pass = ((slippage - abs(diff)) > zeroBigInt)
315317 if (!(pass))
316318 then throw(("Big slpg: " + toString(diff)))
317319 else $Tuple2(pass, min([A1, A2]))
318320 }
319321
320322
321323 func vd (D1,D0,slpg) = {
322324 let diff = fraction(D0, scale8BigInt, D1)
323325 let fail = (slpg > diff)
324326 if (if (fail)
325327 then true
326328 else (D0 > D1))
327329 then throw(((((((toString(D0) + " ") + toString(D1)) + " ") + toString(diff)) + " ") + toString(slpg)))
328330 else fail
329331 }
330332
331333
332334 func pcp (amAssetDcm,prAssetDcm,amAmt,prAmt) = {
333335 let amtAsAmtX18 = t1(amAmt, amAssetDcm)
334336 let prAsAmtX18 = t1(prAmt, prAssetDcm)
335337 cpbi(prAsAmtX18, amtAsAmtX18)
336338 }
337339
338340
339341 func calcPrices (amAmt,prAmt,lpAmt) = {
340342 let amtAsDcm = cfgAmountAssetDecimals
341343 let prAsDcm = cfgPriceAssetDecimals
342344 let priceX18 = pcp(amtAsDcm, prAsDcm, amAmt, prAmt)
343345 let amAmtX18 = t1(amAmt, amtAsDcm)
344346 let prAmtX18 = t1(prAmt, prAsDcm)
345347 let lpAmtX18 = t1(lpAmt, scale8)
346348 let lpPrInAmAsX18 = cpbi(amAmtX18, lpAmtX18)
347349 let lpPrInPrAsX18 = cpbi(prAmtX18, lpAmtX18)
348350 [priceX18, lpPrInAmAsX18, lpPrInPrAsX18]
349351 }
350352
351353
352354 func calculatePrices (amAmt,prAmt,lpAmt) = {
353355 let p = calcPrices(amAmt, prAmt, lpAmt)
354356 [f1(p[0], scale8), f1(p[1], scale8), f1(p[2], scale8)]
355357 }
356358
357359
358360 func takeFee (amount,fee) = {
359361 let feeAmount = if ((fee == 0))
360362 then 0
361363 else fraction(amount, fee, scale8)
362364 $Tuple2((amount - feeAmount), feeAmount)
363365 }
364366
365367
366368 func getD (xp) = {
367369 let xp0 = xp[0]
368370 let xp1 = xp[1]
369371 let s = (xp0 + xp1)
370372 if ((s == big0))
371373 then big0
372374 else {
373375 let a = parseIntValue(A)
374376 let ann = (a * 2)
375377 let p = fraction(xp0, xp1, big1)
376378 let xp0_xp1_n_n = fraction(p, big4, big1)
377379 let ann_s = fraction(toBigInt(ann), s, big1)
378380 let ann_1 = toBigInt((ann - 1))
379381 func calcDNext (d) = {
380382 let dd = fraction(d, d, big1)
381383 let ddd = fraction(dd, d, big1)
382384 let dp = fraction(ddd, big1, xp0_xp1_n_n)
383385 fraction((ann_s + fraction(dp, big2, big1)), d, (fraction(ann_1, d, big1) + fraction(big3, dp, big1)))
384386 }
385387
386388 func calc (acc,i) = if (acc._2)
387389 then acc
388390 else {
389391 let d = acc._1
390392 let dNext = calcDNext(d)
391393 let dDiffRaw = (dNext - value(d))
392394 let dDiff = if ((big0 > dDiffRaw))
393395 then -(dDiffRaw)
394396 else dDiffRaw
395397 if ((big1 >= dDiff))
396398 then $Tuple2(dNext, true)
397399 else $Tuple2(dNext, false)
398400 }
399401
400402 let arr = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16]
401- let $t01329913347 = {
403+ let $t01342013468 = {
402404 let $l = arr
403405 let $s = size($l)
404406 let $acc0 = $Tuple2(s, false)
405407 func $f0_1 ($a,$i) = if (($i >= $s))
406408 then $a
407409 else calc($a, $l[$i])
408410
409411 func $f0_2 ($a,$i) = if (($i >= $s))
410412 then $a
411413 else throw("List size exceeds 17")
412414
413415 $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)
414416 }
415- let d = $t01329913347._1
416- let found = $t01329913347._2
417+ let d = $t01342013468._1
418+ let found = $t01342013468._2
417419 if (found)
418420 then d
419421 else throw(("D calculation error, D = " + toString(d)))
420422 }
421423 }
422424
423425
424426 func ego (txId58,pmtAssetId,pmtLpAmt,userAddress) = {
425427 let lpId = cfgLpAssetId
426428 let amId = toBase58String(value(cfgAmountAssetId))
427429 let prId = toBase58String(value(cfgPriceAssetId))
428430 let amDcm = cfgAmountAssetDecimals
429431 let prDcm = cfgPriceAssetDecimals
430432 let sts = toString(cfgPoolStatus)
431433 let lpEmiss = valueOrErrorMessage(assetInfo(lpId), "Wrong LP id").quantity
432434 if ((toBase58String(lpId) != pmtAssetId))
433435 then throw("Wrong pmt asset")
434436 else {
435437 let amBalance = getAccBalance(amId)
436438 let amBalanceX18 = t1(amBalance, amDcm)
437439 let prBalance = getAccBalance(prId)
438440 let prBalanceX18 = t1(prBalance, prDcm)
439441 let curPriceX18 = cpbi(prBalanceX18, amBalanceX18)
440442 let curPrice = f1(curPriceX18, scale8)
441443 let pmtLpAmtX18 = t1(pmtLpAmt, scale8)
442444 let lpEmissX18 = t1(lpEmiss, scale8)
443445 let outAmAmtX18 = fraction(amBalanceX18, pmtLpAmtX18, lpEmissX18)
444446 let outPrAmtX18 = fraction(prBalanceX18, pmtLpAmtX18, lpEmissX18)
445447 let outAmAmt = fromX18Round(outAmAmtX18, amDcm, FLOOR)
446448 let outPrAmt = fromX18Round(outPrAmtX18, prDcm, FLOOR)
447449 let state = if ((txId58 == ""))
448450 then nil
449451 else [ScriptTransfer(userAddress, outAmAmt, if ((amId == "WAVES"))
450452 then unit
451453 else fromBase58String(amId)), ScriptTransfer(userAddress, outPrAmt, if ((prId == "WAVES"))
452454 then unit
453455 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)]
454456 $Tuple10(outAmAmt, outPrAmt, amId, prId, amBalance, prBalance, lpEmiss, curPriceX18, sts, state)
455457 }
456458 }
457459
458460
459461 func epo (txId58,slippage,inAmAmt,inAmId,inPrAmt,inPrId,userAddress,isEval,emitLp,isOneAsset,validateSlippage,pmtAmt,pmtId) = {
460462 let lpId = cfgLpAssetId
461463 let amIdStr = toBase58String(value(cfgAmountAssetId))
462464 let prIdStr = toBase58String(value(cfgPriceAssetId))
465+ let inAmIdStr = cfgInAmountAssedId
466+ let inPrIdStr = cfgInPriceAssetId
463467 let amtDcm = cfgAmountAssetDecimals
464468 let priceDcm = cfgPriceAssetDecimals
465469 let sts = toString(cfgPoolStatus)
466470 let lpEm = valueOrErrorMessage(assetInfo(lpId), "Wr lp as").quantity
467471 let amBalance = if (isEval)
468472 then getAccBalance(amIdStr)
469473 else if (if (isOneAsset)
470474 then (pmtId == amIdStr)
471475 else false)
472476 then (getAccBalance(amIdStr) - pmtAmt)
473477 else if (isOneAsset)
474478 then getAccBalance(amIdStr)
475479 else (getAccBalance(amIdStr) - inAmAmt)
476480 let prBalance = if (isEval)
477481 then getAccBalance(prIdStr)
478482 else if (if (isOneAsset)
479483 then (pmtId == prIdStr)
480484 else false)
481485 then (getAccBalance(prIdStr) - pmtAmt)
482486 else if (isOneAsset)
483487 then getAccBalance(prIdStr)
484488 else (getAccBalance(prIdStr) - inPrAmt)
485489 let inAmAssetAmtX18 = t1(inAmAmt, amtDcm)
486490 let inPrAssetAmtX18 = t1(inPrAmt, priceDcm)
487491 let userPriceX18 = cpbi(inPrAssetAmtX18, inAmAssetAmtX18)
488492 let amBalanceX18 = t1(amBalance, amtDcm)
489493 let prBalanceX18 = t1(prBalance, priceDcm)
490494 let D0 = getD([amBalanceX18, prBalanceX18])
491495 let r = if ((lpEm == 0))
492496 then {
493497 let D1 = getD([(amBalanceX18 + inAmAssetAmtX18), (prBalanceX18 + inPrAssetAmtX18)])
494498 let checkD = if ((D1 > D0))
495499 then true
496500 else throw("D1 should be greater than D0")
497501 if ((checkD == checkD))
498502 then {
499503 let curPriceX18 = zeroBigInt
500504 let slippageX18 = zeroBigInt
501505 let lpAmtX18 = D1
502506 $Tuple5(f1(lpAmtX18, scale8), f1(inAmAssetAmtX18, amtDcm), f1(inPrAssetAmtX18, priceDcm), cpbi((prBalanceX18 + inPrAssetAmtX18), (amBalanceX18 + inAmAssetAmtX18)), slippageX18)
503507 }
504508 else throw("Strict value is not equal to itself.")
505509 }
506510 else {
507511 let curPriceX18 = cpbi(prBalanceX18, amBalanceX18)
508512 let slippageRealX18 = fraction(abs((curPriceX18 - userPriceX18)), scale18, curPriceX18)
509513 let slippageX18 = t1(slippage, scale8)
510514 if (if (if (validateSlippage)
511515 then (curPriceX18 != zeroBigInt)
512516 else false)
513517 then (slippageRealX18 > slippageX18)
514518 else false)
515519 then throw(((("Price slippage " + toString(slippageRealX18)) + " > ") + toString(slippageX18)))
516520 else {
517521 let lpEmissionX18 = t1(lpEm, scale8)
518522 let prViaAmX18 = fraction(inAmAssetAmtX18, cpbir(prBalanceX18, amBalanceX18, CEILING), scale18, CEILING)
519523 let amViaPrX18 = fraction(inPrAssetAmtX18, scale18, cpbir(prBalanceX18, amBalanceX18, FLOOR), CEILING)
520524 let expectedAmts = if ((prViaAmX18 > inPrAssetAmtX18))
521525 then $Tuple2(amViaPrX18, inPrAssetAmtX18)
522526 else $Tuple2(inAmAssetAmtX18, prViaAmX18)
523527 let expAmtAssetAmtX18 = expectedAmts._1
524528 let expPriceAssetAmtX18 = expectedAmts._2
525529 let D1 = getD([(amBalanceX18 + expAmtAssetAmtX18), (prBalanceX18 + expPriceAssetAmtX18)])
526530 let checkD = if ((D1 > D0))
527531 then true
528532 else throw("D1 should be greater than D0")
529533 if ((checkD == checkD))
530534 then {
531535 let lpAmtX18 = fraction(lpEmissionX18, (D1 - D0), D0)
532536 $Tuple5(fromX18Round(lpAmtX18, scale8, FLOOR), fromX18Round(expAmtAssetAmtX18, amtDcm, CEILING), fromX18Round(expPriceAssetAmtX18, priceDcm, CEILING), curPriceX18, slippageX18)
533537 }
534538 else throw("Strict value is not equal to itself.")
535539 }
536540 }
537541 let calcLpAmt = r._1
538542 let calcAmAssetPmt = r._2
539543 let calcPrAssetPmt = r._3
540544 let curPrice = f1(r._4, scale8)
541545 let slippageCalc = f1(r._5, scale8)
542546 if ((0 >= calcLpAmt))
543547 then throw("LP <= 0")
544548 else {
545549 let emitLpAmt = if (!(emitLp))
546550 then 0
547551 else calcLpAmt
548552 let amDiff = (inAmAmt - calcAmAssetPmt)
549553 let prDiff = (inPrAmt - calcPrAssetPmt)
550- let $t02110921454 = if (if (isOneAsset)
554+ let $t02130721652 = if (if (isOneAsset)
551555 then (pmtId == amIdStr)
552556 else false)
553557 then $Tuple2(pmtAmt, 0)
554558 else if (if (isOneAsset)
555559 then (pmtId == prIdStr)
556560 else false)
557561 then $Tuple2(0, pmtAmt)
558562 else $Tuple2(calcAmAssetPmt, calcPrAssetPmt)
559- let writeAmAmt = $t02110921454._1
560- let writePrAmt = $t02110921454._2
563+ let writeAmAmt = $t02130721652._1
564+ let writePrAmt = $t02130721652._2
561565 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))]
562566 $Tuple13(calcLpAmt, emitLpAmt, curPrice, amBalance, prBalance, lpEm, lpId, sts, commonState, amDiff, prDiff, inAmId, inPrId)
563567 }
564568 }
565569
566570
567571 func getYD (xp,i,D) = {
568572 let n = big2
569573 let x = xp[if ((i == 0))
570574 then 1
571575 else 0]
572576 let aPrecision = parseBigIntValue(Amult)
573577 let a = (parseBigIntValue(A) * aPrecision)
574578 let s = x
575579 let ann = (a * n)
576580 let c = (((((D * D) / (x * n)) * D) * aPrecision) / (ann * n))
577581 let b = ((s + ((D * aPrecision) / ann)) - D)
578582 func calc (acc,cur) = {
579- let $t02264922669 = acc
580- let y = $t02264922669._1
581- let found = $t02264922669._2
583+ let $t02284722867 = acc
584+ let y = $t02284722867._1
585+ let found = $t02284722867._2
582586 if ((found != unit))
583587 then acc
584588 else {
585589 let yNext = (((y * y) + c) / ((big2 * y) + b))
586590 let yDiff = absBigInt((yNext - value(y)))
587591 if ((big1 >= yDiff))
588592 then $Tuple2(yNext, cur)
589593 else $Tuple2(yNext, unit)
590594 }
591595 }
592596
593597 let arr = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
594- let $t02297623023 = {
598+ let $t02317423221 = {
595599 let $l = arr
596600 let $s = size($l)
597601 let $acc0 = $Tuple2(D, unit)
598602 func $f0_1 ($a,$i) = if (($i >= $s))
599603 then $a
600604 else calc($a, $l[$i])
601605
602606 func $f0_2 ($a,$i) = if (($i >= $s))
603607 then $a
604608 else throw("List size exceeds 15")
605609
606610 $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)
607611 }
608- let y = $t02297623023._1
609- let found = $t02297623023._2
612+ let y = $t02317423221._1
613+ let found = $t02317423221._2
610614 if ((found != unit))
611615 then y
612616 else throw(("Y calculation error, Y = " + toString(y)))
613617 }
614618
615619
616620 func calcDLp (amountBalance,priceBalance,lpEmission) = {
617621 let updatedDLp = fraction(getD([t1BigInt(amountBalance, toBigInt(cfgAmountAssetDecimals)), t1BigInt(priceBalance, toBigInt(cfgPriceAssetDecimals))]), scale18, lpEmission)
618622 if ((lpEmission == big0))
619623 then big0
620624 else updatedDLp
621625 }
622626
623627
624628 func calcCurrentDLp (amountAssetDelta,priceAssetDelta,lpAssetEmissionDelta) = {
625629 let amountAssetBalance = (toBigInt(getAccBalance(assetIdToString(cfgAmountAssetId))) - amountAssetDelta)
626630 let priceAssetBalance = (toBigInt(getAccBalance(assetIdToString(cfgPriceAssetId))) - priceAssetDelta)
627631 let lpAssetEmission = (toBigInt(value(assetInfo(cfgLpAssetId)).quantity) - lpAssetEmissionDelta)
628632 let currentDLp = calcDLp(amountAssetBalance, priceAssetBalance, lpAssetEmission)
629633 currentDLp
630634 }
631635
632636
633637 func refreshDLpInternal (amountAssetBalanceDelta,priceAssetBalanceDelta,lpAssetEmissionDelta) = {
634638 let amountAssetBalance = (getAccBalance(assetIdToString(cfgAmountAssetId)) + amountAssetBalanceDelta)
635639 let priceAssetBalance = (getAccBalance(assetIdToString(cfgPriceAssetId)) + priceAssetBalanceDelta)
636640 let lpAssetEmission = (value(assetInfo(cfgLpAssetId)).quantity + lpAssetEmissionDelta)
637641 let updatedDLp = calcDLp(toBigInt(amountAssetBalance), toBigInt(priceAssetBalance), toBigInt(lpAssetEmission))
638642 let actions = [IntegerEntry(keyDLpRefreshedHeight, height), StringEntry(keyDLp, toString(updatedDLp))]
639643 $Tuple2(actions, updatedDLp)
640644 }
641645
642646
643647 func validateUpdatedDLp (oldDLp,updatedDLp) = if ((updatedDLp >= oldDLp))
644648 then true
645649 else throwErr("updated DLp lower than current DLp")
646650
647651
648652 func validateMatcherOrderAllowed (order) = {
649653 let amountAssetBalance = getAccBalance(assetIdToString(cfgAmountAssetId))
650654 let priceAssetBalance = getAccBalance(assetIdToString(cfgPriceAssetId))
651655 let amountAssetAmount = order.amount
652656 let priceAssetAmount = fraction(order.amount, order.price, scale8, FLOOR)
653- let $t02522125433 = if ((order.orderType == Buy))
657+ let $t02541925631 = if ((order.orderType == Buy))
654658 then $Tuple2(amountAssetAmount, -(priceAssetAmount))
655659 else $Tuple2(-(amountAssetAmount), priceAssetAmount)
656- let amountAssetBalanceDelta = $t02522125433._1
657- let priceAssetBalanceDelta = $t02522125433._2
660+ let amountAssetBalanceDelta = $t02541925631._1
661+ let priceAssetBalanceDelta = $t02541925631._2
658662 if (if (if (igs())
659663 then true
660664 else (cfgPoolStatus == PoolMatcherDis))
661665 then true
662666 else (cfgPoolStatus == PoolShutdown))
663667 then throw("Admin blocked")
664668 else if (if ((order.assetPair.amountAsset != cfgAmountAssetId))
665669 then true
666670 else (order.assetPair.priceAsset != cfgPriceAssetId))
667671 then throw("Wr assets")
668672 else {
669673 let dLp = parseBigIntValue(valueOrElse(getString(this, keyDLp), "0"))
670- let $t02577525875 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
671- let unusedActions = $t02577525875._1
672- let dLpNew = $t02577525875._2
674+ let $t02597326073 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
675+ let unusedActions = $t02597326073._1
676+ let dLpNew = $t02597326073._2
673677 let isOrderValid = (dLpNew >= dLp)
674678 let info = makeString(["dLp=", toString(dLp), " dLpNew=", toString(dLpNew), " amountAssetBalance=", toString(amountAssetBalance), " priceAssetBalance=", toString(priceAssetBalance), " amountAssetBalanceDelta=", toString(amountAssetBalanceDelta), " priceAssetBalanceDelta=", toString(priceAssetBalanceDelta), " height=", toString(height)], "")
675679 $Tuple2(isOrderValid, info)
676680 }
677681 }
678682
679683
680684 func cg (i) = if ((size(i.payments) != 1))
681685 then throw("1 pmnt exp")
682686 else {
683687 let pmt = value(i.payments[0])
684688 let pmtAssetId = value(pmt.assetId)
685689 let pmtAmt = pmt.amount
686690 let r = ego(toBase58String(i.transactionId), toBase58String(pmtAssetId), pmtAmt, i.caller)
687691 let outAmAmt = r._1
688692 let outPrAmt = r._2
689693 let sts = parseIntValue(r._9)
690694 let state = r._10
691695 if (if (igs())
692696 then true
693697 else (sts == PoolShutdown))
694698 then throw(("Admin blocked: " + toString(sts)))
695699 else $Tuple5(outAmAmt, outPrAmt, pmtAmt, pmtAssetId, state)
696700 }
697701
698702
699703 func cp (caller,txId,amAsPmt,prAsPmt,slippage,emitLp,isOneAsset,validateSlippage,pmtAmt,pmtId) = {
700704 let r = epo(txId, slippage, value(amAsPmt).amount, value(amAsPmt).assetId, value(prAsPmt).amount, value(prAsPmt).assetId, caller, (txId == ""), emitLp, isOneAsset, validateSlippage, pmtAmt, pmtId)
701705 let sts = parseIntValue(r._8)
702706 if (if (if (igs())
703707 then true
704708 else (sts == PoolPutDis))
705709 then true
706710 else (sts == PoolShutdown))
707711 then throw(("Blocked:" + toString(sts)))
708712 else r
709713 }
710714
711715
712716 func calcPutOneTkn (pmtAmtRaw,pmtAssetId,userAddress,txId,withTakeFee) = {
713717 let amId = toBase58String(value(cfgAmountAssetId))
714718 let prId = toBase58String(value(cfgPriceAssetId))
715719 let lpId = cfgLpAssetId
716720 let amtDcm = cfgAmountAssetDecimals
717721 let priceDcm = cfgPriceAssetDecimals
718722 let lpAssetEmission = toBigInt(valueOrErrorMessage(assetInfo(lpId), "invalid lp asset").quantity)
719723 let chechEmission = if ((lpAssetEmission > big0))
720724 then true
721725 else throw("initial deposit requires all coins")
722726 if ((chechEmission == chechEmission))
723727 then {
724728 let amBalance = getAccBalance(amId)
725729 let prBalance = getAccBalance(prId)
726- let $t02853128993 = if ((txId == ""))
730+ let $t02872929191 = if ((txId == ""))
727731 then $Tuple2(amBalance, prBalance)
728732 else if ((pmtAssetId == amId))
729733 then if ((pmtAmtRaw > amBalance))
730734 then throw("invalid payment amount")
731735 else $Tuple2((amBalance - pmtAmtRaw), prBalance)
732736 else if ((pmtAssetId == prId))
733737 then if ((pmtAmtRaw > prBalance))
734738 then throw("invalid payment amount")
735739 else $Tuple2(amBalance, (prBalance - pmtAmtRaw))
736740 else throw("wrong pmtAssetId")
737- let amBalanceOld = $t02853128993._1
738- let prBalanceOld = $t02853128993._2
739- let $t02899929175 = if ((pmtAssetId == amId))
741+ let amBalanceOld = $t02872929191._1
742+ let prBalanceOld = $t02872929191._2
743+ let $t02919729373 = if ((pmtAssetId == amId))
740744 then $Tuple2(pmtAmtRaw, 0)
741745 else if ((pmtAssetId == prId))
742746 then $Tuple2(0, pmtAmtRaw)
743747 else throw("invalid payment")
744- let amAmountRaw = $t02899929175._1
745- let prAmountRaw = $t02899929175._2
746- let $t02917929433 = if (withTakeFee)
748+ let amAmountRaw = $t02919729373._1
749+ let prAmountRaw = $t02919729373._2
750+ let $t02937729631 = if (withTakeFee)
747751 then $Tuple3(takeFee(amAmountRaw, inFee)._1, takeFee(prAmountRaw, inFee)._1, takeFee(pmtAmtRaw, inFee)._2)
748752 else $Tuple3(amAmountRaw, prAmountRaw, 0)
749- let amAmount = $t02917929433._1
750- let prAmount = $t02917929433._2
751- let feeAmount = $t02917929433._3
753+ let amAmount = $t02937729631._1
754+ let prAmount = $t02937729631._2
755+ let feeAmount = $t02937729631._3
752756 let amBalanceNew = (amBalanceOld + amAmount)
753757 let prBalanceNew = (prBalanceOld + prAmount)
754758 let D0 = getD([t1(amBalanceOld, cfgAmountAssetDecimals), t1(prBalanceOld, cfgPriceAssetDecimals)])
755759 let D1 = getD([t1(amBalanceNew, cfgAmountAssetDecimals), t1(prBalanceNew, cfgPriceAssetDecimals)])
756760 let checkD = if ((D1 > D0))
757761 then true
758762 else throw()
759763 if ((checkD == checkD))
760764 then {
761765 let lpAmount = fraction(lpAssetEmission, (D1 - D0), D0, FLOOR)
762766 let curPrice = f1(cpbi(t1(prBalanceNew, priceDcm), t1(amBalanceNew, amtDcm)), scale8)
763767 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))]
764768 let poolProportion = fraction(prBalanceOld, scale8, amBalanceOld)
765769 let amountAssetPart = fraction(pmtAmtRaw, scale8, (poolProportion + scale8))
766770 let priceAssetPart = (pmtAmtRaw - amountAssetPart)
767771 let lpAmtBoth = fraction(lpAssetEmission, toBigInt(priceAssetPart), toBigInt(prBalanceOld))
768772 let bonus = toInt(fraction((lpAmount - lpAmtBoth), scale8BigInt, lpAmtBoth))
769773 $Tuple4(toInt(lpAmount), commonState, feeAmount, bonus)
770774 }
771775 else throw("Strict value is not equal to itself.")
772776 }
773777 else throw("Strict value is not equal to itself.")
774778 }
775779
776780
777781 func getOneTknV2Internal (outAssetId,minOutAmount,payments,caller,originCaller,transactionId) = {
778782 let lpId = toBase58String(value(cfgLpAssetId))
779783 let amId = toBase58String(value(cfgAmountAssetId))
780784 let prId = toBase58String(value(cfgPriceAssetId))
781785 let amDecimals = cfgAmountAssetDecimals
782786 let prDecimals = cfgPriceAssetDecimals
783787 let poolStatus = cfgPoolStatus
784788 let userAddress = if ((caller == restContract))
785789 then originCaller
786790 else caller
787791 let pmt = value(payments[0])
788792 let pmtAssetId = value(pmt.assetId)
789793 let pmtAmt = pmt.amount
790794 let currentDLp = calcCurrentDLp(big0, big0, big0)
791795 if ((currentDLp == currentDLp))
792796 then {
793797 let txId58 = toBase58String(transactionId)
794798 if ((lpId != toBase58String(pmtAssetId)))
795799 then throw("Wrong LP")
796800 else {
797801 let amBalance = getAccBalance(amId)
798802 let prBalance = getAccBalance(prId)
799- let $t03154531656 = {
803+ let $t03174331854 = {
800804 let @ = invoke(this, "getOneTknV2READONLY", [outAssetId, pmtAmt], nil)
801805 if ($isInstanceOf(@, "(Int, Int)"))
802806 then @
803807 else throw(($getType(@) + " couldn't be cast to (Int, Int)"))
804808 }
805- if (($t03154531656 == $t03154531656))
809+ if (($t03174331854 == $t03174331854))
806810 then {
807- let feeAmount = $t03154531656._2
808- let totalGet = $t03154531656._1
811+ let feeAmount = $t03174331854._2
812+ let totalGet = $t03174331854._1
809813 let totalAmount = if (if ((minOutAmount > 0))
810814 then (minOutAmount > totalGet)
811815 else false)
812816 then throwErr(makeString(["amount to receive is less than ", toString(minOutAmount)], ""))
813817 else totalGet
814- let $t03184632153 = if ((outAssetId == amId))
818+ let $t03204432351 = if ((outAssetId == amId))
815819 then $Tuple4(totalAmount, 0, ((amBalance - totalAmount) - feeAmount), prBalance)
816820 else if ((outAssetId == prId))
817821 then $Tuple4(0, totalAmount, amBalance, ((prBalance - totalAmount) - feeAmount))
818822 else throw("invalid out asset id")
819- let outAm = $t03184632153._1
820- let outPr = $t03184632153._2
821- let amBalanceNew = $t03184632153._3
822- let prBalanceNew = $t03184632153._4
823+ let outAm = $t03204432351._1
824+ let outPr = $t03204432351._2
825+ let amBalanceNew = $t03204432351._3
826+ let prBalanceNew = $t03204432351._4
823827 let curPrX18 = cpbi(t1(prBalanceNew, prDecimals), t1(amBalanceNew, amDecimals))
824828 let curPr = f1(curPrX18, scale8)
825829 let outAssetIdOrWaves = if ((outAssetId == "WAVES"))
826830 then unit
827831 else fromBase58String(outAssetId)
828832 let sendFeeToMatcher = if ((feeAmount > 0))
829833 then [ScriptTransfer(feeCollectorAddress, feeAmount, outAssetIdOrWaves)]
830834 else nil
831835 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)
832836 if ((state == state))
833837 then {
834838 let burn = invoke(fca, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
835839 if ((burn == burn))
836840 then {
837- let $t03293833288 = {
841+ let $t03313633486 = {
838842 let feeAmountForCalc = if ((this == feeCollectorAddress))
839843 then 0
840844 else feeAmount
841845 let outInAmountAsset = if ((parseAssetId(outAssetId) == cfgAmountAssetId))
842846 then true
843847 else false
844848 if (outInAmountAsset)
845849 then $Tuple2(-((totalGet + feeAmountForCalc)), 0)
846850 else $Tuple2(0, -((totalGet + feeAmountForCalc)))
847851 }
848- let amountAssetBalanceDelta = $t03293833288._1
849- let priceAssetBalanceDelta = $t03293833288._2
850- let $t03329133399 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
851- let refreshDLpActions = $t03329133399._1
852- let updatedDLp = $t03329133399._2
852+ let amountAssetBalanceDelta = $t03313633486._1
853+ let priceAssetBalanceDelta = $t03313633486._2
854+ let $t03348933597 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
855+ let refreshDLpActions = $t03348933597._1
856+ let updatedDLp = $t03348933597._2
853857 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
854858 if ((isUpdatedDLpValid == isUpdatedDLpValid))
855859 then $Tuple2((state ++ refreshDLpActions), totalAmount)
856860 else throw("Strict value is not equal to itself.")
857861 }
858862 else throw("Strict value is not equal to itself.")
859863 }
860864 else throw("Strict value is not equal to itself.")
861865 }
862866 else throw("Strict value is not equal to itself.")
863867 }
864868 }
865869 else throw("Strict value is not equal to itself.")
866870 }
867871
868872
869873 func managerPublicKeyOrUnit () = {
870874 let managerVaultAddress = getManagerVaultAddressOrThis()
871875 match getString(managerVaultAddress, keyManagerPublicKey()) {
872876 case s: String =>
873877 fromBase58String(s)
874878 case _: Unit =>
875879 unit
876880 case _ =>
877881 throw("Match error")
878882 }
879883 }
880884
881885
882886 let pd = throw("Permission denied")
883887
884888 func isManager (i) = match managerPublicKeyOrUnit() {
885889 case pk: ByteVector =>
886890 (i.callerPublicKey == pk)
887891 case _: Unit =>
888892 (i.caller == this)
889893 case _ =>
890894 throw("Match error")
891895 }
892896
893897
894898 func mustManager (i) = match managerPublicKeyOrUnit() {
895899 case pk: ByteVector =>
896900 if ((i.callerPublicKey == pk))
897901 then true
898902 else pd
899903 case _: Unit =>
900904 if ((i.caller == this))
901905 then true
902906 else pd
903907 case _ =>
904908 throw("Match error")
905909 }
906910
907911
908912 func getY (isReverse,D,poolAmountInBalance) = {
909913 let poolConfig = gpc()
910914 let amId = poolConfig[idxAmAsId]
911915 let prId = poolConfig[idxPrAsId]
912916 let n = big2
913917 let aPrecision = parseBigIntValue(Amult)
914918 let a = (parseBigIntValue(A) * aPrecision)
915919 let xp = if ((isReverse == false))
916920 then [(toBigInt(getAccBalance(amId)) + poolAmountInBalance), toBigInt(getAccBalance(prId))]
917921 else [(toBigInt(getAccBalance(prId)) + poolAmountInBalance), toBigInt(getAccBalance(amId))]
918922 let x = xp[0]
919923 let s = x
920924 let ann = (a * n)
921925 let c = (((((D * D) / (x * n)) * D) * aPrecision) / (ann * n))
922926 let b = ((s + ((D * aPrecision) / ann)) - D)
923927 func calc (acc,cur) = {
924- let $t03488634906 = acc
925- let y = $t03488634906._1
926- let found = $t03488634906._2
928+ let $t03508435104 = acc
929+ let y = $t03508435104._1
930+ let found = $t03508435104._2
927931 if ((found != unit))
928932 then acc
929933 else {
930934 let yNext = (((y * y) + c) / ((big2 * y) + b))
931935 let yDiff = absBigInt((yNext - value(y)))
932936 if ((big1 >= yDiff))
933937 then $Tuple2(yNext, cur)
934938 else $Tuple2(yNext, unit)
935939 }
936940 }
937941
938942 let arr = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
939- let $t03523735284 = {
943+ let $t03543535482 = {
940944 let $l = arr
941945 let $s = size($l)
942946 let $acc0 = $Tuple2(D, unit)
943947 func $f0_1 ($a,$i) = if (($i >= $s))
944948 then $a
945949 else calc($a, $l[$i])
946950
947951 func $f0_2 ($a,$i) = if (($i >= $s))
948952 then $a
949953 else throw("List size exceeds 15")
950954
951955 $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)
952956 }
953- let y = $t03523735284._1
954- let found = $t03523735284._2
957+ let y = $t03543535482._1
958+ let found = $t03543535482._2
955959 if ((found != unit))
956960 then y
957961 else throw(("Y calculation error, Y = " + toString(y)))
958962 }
959963
960964
961965 func skipOrderValidation () = valueOrElse(getBoolean(fca, keySkipOrderValidation(toString(this))), false)
962966
963967
964968 @Callable(i)
965969 func calculateAmountOutForSwapREADONLY (cleanAmountIn,isReverse,feePoolAmount) = {
966- let $t03563636060 = if ((isReverse == false))
970+ let $t03583436258 = if ((isReverse == false))
967971 then {
968972 let assetOut = strf(this, pa())
969973 let poolAmountInBalance = (toBigInt(getAccBalance(strf(this, aa()))) + toBigInt(cleanAmountIn))
970974 $Tuple2(assetOut, poolAmountInBalance)
971975 }
972976 else {
973977 let assetOut = strf(this, aa())
974978 let poolAmountInBalance = (toBigInt(getAccBalance(strf(this, pa()))) + toBigInt(cleanAmountIn))
975979 $Tuple2(assetOut, poolAmountInBalance)
976980 }
977- let assetOut = $t03563636060._1
978- let poolAmountInBalance = $t03563636060._2
981+ let assetOut = $t03583436258._1
982+ let poolAmountInBalance = $t03583436258._2
979983 let poolConfig = gpc()
980984 let amId = poolConfig[idxAmAsId]
981985 let prId = poolConfig[idxPrAsId]
982986 let xp = [toBigInt(getAccBalance(amId)), toBigInt(getAccBalance(prId))]
983987 let D = getD(xp)
984988 let y = getY(isReverse, D, toBigInt(cleanAmountIn))
985989 let dy = ((toBigInt(getAccBalance(assetOut)) - y) - toBigInt(1))
986990 let totalGetRaw = max([0, toInt(dy)])
987991 let newXp = if ((isReverse == false))
988992 then [((toBigInt(getAccBalance(amId)) + toBigInt(cleanAmountIn)) + toBigInt(feePoolAmount)), (toBigInt(getAccBalance(prId)) - dy)]
989993 else [(toBigInt(getAccBalance(amId)) - dy), ((toBigInt(getAccBalance(prId)) + toBigInt(cleanAmountIn)) + toBigInt(feePoolAmount))]
990994 let newD = getD(newXp)
991995 let checkD = if ((newD >= D))
992996 then true
993997 else throw(makeString(["new D is fewer error", toString(D), toString(newD)], "__"))
994998 if ((checkD == checkD))
995999 then $Tuple2(nil, totalGetRaw)
9961000 else throw("Strict value is not equal to itself.")
9971001 }
9981002
9991003
10001004
10011005 @Callable(i)
10021006 func calculateAmountOutForSwapAndSendTokens (cleanAmountIn,isReverse,amountOutMin,addressTo,feePoolAmount) = {
10031007 let swapContact = {
10041008 let @ = invoke(fca, "getSwapContractREADONLY", nil, nil)
10051009 if ($isInstanceOf(@, "String"))
10061010 then @
10071011 else throw(($getType(@) + " couldn't be cast to String"))
10081012 }
10091013 let checks = [if ((value(i.payments[0]).amount >= cleanAmountIn))
10101014 then true
10111015 else throwErr("Wrong amount"), if ((i.caller == addressFromStringValue(swapContact)))
10121016 then true
10131017 else throwErr("Permission denied")]
10141018 if ((checks == checks))
10151019 then {
10161020 let pmt = value(i.payments[0])
10171021 let assetIn = assetIdToString(pmt.assetId)
1018- let $t03749637890 = if ((isReverse == false))
1022+ let $t03769438088 = if ((isReverse == false))
10191023 then {
10201024 let assetOut = strf(this, pa())
10211025 let poolAmountInBalance = (getAccBalance(assetIn) - value(i.payments[0]).amount)
10221026 $Tuple2(assetOut, poolAmountInBalance)
10231027 }
10241028 else {
10251029 let assetOut = strf(this, aa())
10261030 let poolAmountInBalance = (getAccBalance(assetIn) - value(i.payments[0]).amount)
10271031 $Tuple2(assetOut, poolAmountInBalance)
10281032 }
1029- let assetOut = $t03749637890._1
1030- let poolAmountInBalance = $t03749637890._2
1033+ let assetOut = $t03769438088._1
1034+ let poolAmountInBalance = $t03769438088._2
10311035 let poolConfig = gpc()
10321036 let amId = poolConfig[idxAmAsId]
10331037 let prId = poolConfig[idxPrAsId]
10341038 let xp = if ((isReverse == false))
10351039 then [(toBigInt(getAccBalance(amId)) - toBigInt(value(i.payments[0]).amount)), toBigInt(getAccBalance(prId))]
10361040 else [toBigInt(getAccBalance(amId)), (toBigInt(getAccBalance(prId)) - toBigInt(value(i.payments[0]).amount))]
10371041 let D = getD(xp)
10381042 let y = getY(isReverse, D, toBigInt(0))
10391043 let dy = ((toBigInt(getAccBalance(assetOut)) - y) - toBigInt(1))
10401044 let totalGetRaw = max([0, toInt(dy)])
10411045 let checkMin = if ((totalGetRaw >= amountOutMin))
10421046 then true
10431047 else throw("Exchange result is fewer coins than expected")
10441048 if ((checkMin == checkMin))
10451049 then {
10461050 let newXp = if ((isReverse == false))
10471051 then [(toBigInt(getAccBalance(amId)) + toBigInt(feePoolAmount)), (toBigInt(getAccBalance(prId)) - dy)]
10481052 else [(toBigInt(getAccBalance(amId)) - dy), (toBigInt(getAccBalance(prId)) + toBigInt(feePoolAmount))]
10491053 let newD = getD(newXp)
10501054 let checkD = if ((newD >= D))
10511055 then true
10521056 else throw("new D is fewer error")
10531057 if ((checkD == checkD))
10541058 then $Tuple2([ScriptTransfer(addressFromStringValue(addressTo), totalGetRaw, parseAssetId(assetOut))], totalGetRaw)
10551059 else throw("Strict value is not equal to itself.")
10561060 }
10571061 else throw("Strict value is not equal to itself.")
10581062 }
10591063 else throw("Strict value is not equal to itself.")
10601064 }
10611065
10621066
10631067
10641068 @Callable(i)
10651069 func constructor (fc) = {
10661070 let c = mustManager(i)
10671071 if ((c == c))
10681072 then [StringEntry(fc(), fc)]
10691073 else throw("Strict value is not equal to itself.")
10701074 }
10711075
10721076
10731077
10741078 @Callable(i)
10751079 func put (slip,autoStake) = {
10761080 let factCfg = gfc()
10771081 let stakingCntr = valueOrErrorMessage(addressFromString(factCfg[idxFactStakCntr]), "Wr st addr")
10781082 let slipCntr = valueOrErrorMessage(addressFromString(factCfg[idxFactSlippCntr]), "Wr sl addr")
10791083 if ((0 > slip))
10801084 then throw("Wrong slippage")
10811085 else if ((size(i.payments) != 2))
10821086 then throw("2 pmnts expd")
10831087 else {
10841088 let amAssetPmt = toBigInt(value(i.payments[0]).amount)
10851089 let prAssetPmt = toBigInt(value(i.payments[1]).amount)
10861090 let amountAssetBalance = (toBigInt(getAccBalance(assetIdToString(cfgAmountAssetId))) - amAssetPmt)
10871091 if ((amountAssetBalance == amountAssetBalance))
10881092 then {
10891093 let priceAssetBalance = (toBigInt(getAccBalance(assetIdToString(cfgPriceAssetId))) - prAssetPmt)
10901094 if ((priceAssetBalance == priceAssetBalance))
10911095 then {
10921096 let lpAssetEmission = toBigInt(value(assetInfo(cfgLpAssetId)).quantity)
10931097 if ((lpAssetEmission == lpAssetEmission))
10941098 then {
10951099 let currentDLp = calcCurrentDLp(amAssetPmt, prAssetPmt, toBigInt(0))
10961100 if ((currentDLp == currentDLp))
10971101 then {
10981102 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, "")
10991103 let emitLpAmt = e._2
11001104 let lpAssetId = e._7
11011105 let state = e._9
11021106 let amDiff = e._10
11031107 let prDiff = e._11
11041108 let amId = e._12
11051109 let prId = e._13
11061110 let r = invoke(fca, "emit", [emitLpAmt], nil)
11071111 if ((r == r))
11081112 then {
11091113 let el = match r {
11101114 case legacy: Address =>
11111115 invoke(legacy, "emit", [emitLpAmt], nil)
11121116 case _ =>
11131117 unit
11141118 }
11151119 if ((el == el))
11161120 then {
11171121 let sa = if ((amDiff > 0))
11181122 then invoke(slipCntr, "put", nil, [AttachedPayment(amId, amDiff)])
11191123 else nil
11201124 if ((sa == sa))
11211125 then {
11221126 let sp = if ((prDiff > 0))
11231127 then invoke(slipCntr, "put", nil, [AttachedPayment(prId, prDiff)])
11241128 else nil
11251129 if ((sp == sp))
11261130 then {
11271131 let lpTrnsfr = if (autoStake)
11281132 then {
11291133 let ss = invoke(stakingCntr, "stake", nil, [AttachedPayment(lpAssetId, emitLpAmt)])
11301134 if ((ss == ss))
11311135 then nil
11321136 else throw("Strict value is not equal to itself.")
11331137 }
11341138 else [ScriptTransfer(i.caller, emitLpAmt, lpAssetId)]
1135- let $t04203442176 = refreshDLpInternal(0, 0, 0)
1136- let refreshDLpActions = $t04203442176._1
1137- let updatedDLp = $t04203442176._2
1139+ let $t04223242374 = refreshDLpInternal(0, 0, 0)
1140+ let refreshDLpActions = $t04223242374._1
1141+ let updatedDLp = $t04223242374._2
11381142 let check = if ((updatedDLp >= currentDLp))
11391143 then true
11401144 else throwErr(makeString(["updated DLp lower than current DLp", toString(amountAssetBalance), toString(priceAssetBalance), toString(lpAssetEmission), toString(currentDLp), toString(updatedDLp), toString(amDiff), toString(prDiff)], " "))
11411145 if ((check == check))
11421146 then {
11431147 let lpAssetEmissionAfter = value(assetInfo(cfgLpAssetId)).quantity
11441148 if ((lpAssetEmissionAfter == lpAssetEmissionAfter))
11451149 then ((state ++ lpTrnsfr) ++ refreshDLpActions)
11461150 else throw("Strict value is not equal to itself.")
11471151 }
11481152 else throw("Strict value is not equal to itself.")
11491153 }
11501154 else throw("Strict value is not equal to itself.")
11511155 }
11521156 else throw("Strict value is not equal to itself.")
11531157 }
11541158 else throw("Strict value is not equal to itself.")
11551159 }
11561160 else throw("Strict value is not equal to itself.")
11571161 }
11581162 else throw("Strict value is not equal to itself.")
11591163 }
11601164 else throw("Strict value is not equal to itself.")
11611165 }
11621166 else throw("Strict value is not equal to itself.")
11631167 }
11641168 else throw("Strict value is not equal to itself.")
11651169 }
11661170 }
11671171
11681172
11691173
11701174 @Callable(i)
11711175 func putOneTknV2 (minOutAmount,autoStake) = {
11721176 let isPoolOneTokenOperationsDisabled = {
11731177 let @ = invoke(fca, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
11741178 if ($isInstanceOf(@, "Boolean"))
11751179 then @
11761180 else throw(($getType(@) + " couldn't be cast to Boolean"))
11771181 }
11781182 let isPutDisabled = if (if (if (igs())
11791183 then true
11801184 else (cfgPoolStatus == PoolPutDis))
11811185 then true
11821186 else (cfgPoolStatus == PoolShutdown))
11831187 then true
11841188 else isPoolOneTokenOperationsDisabled
11851189 let checks = [if (if (!(isPutDisabled))
11861190 then true
11871191 else isManager(i))
11881192 then true
11891193 else throwErr("put operation is blocked by admin"), if ((size(i.payments) == 1))
11901194 then true
11911195 else throwErr("exactly 1 payment are expected")]
11921196 if ((checks == checks))
11931197 then {
11941198 let amId = toBase58String(value(cfgAmountAssetId))
11951199 let prId = toBase58String(value(cfgPriceAssetId))
11961200 let lpId = cfgLpAssetId
11971201 let amDecimals = cfgAmountAssetDecimals
11981202 let prDecimals = cfgPriceAssetDecimals
11991203 let userAddress = if ((i.caller == this))
12001204 then i.originCaller
12011205 else i.caller
12021206 let pmt = value(i.payments[0])
12031207 let pmtAssetId = toBase58String(value(pmt.assetId))
12041208 let pmtAmt = pmt.amount
12051209 let currentDLp = if ((pmt.assetId == cfgAmountAssetId))
12061210 then calcCurrentDLp(toBigInt(pmtAmt), toBigInt(0), toBigInt(0))
12071211 else calcCurrentDLp(toBigInt(0), toBigInt(pmtAmt), toBigInt(0))
12081212 if ((currentDLp == currentDLp))
12091213 then {
1210- let $t04381743975 = calcPutOneTkn(pmtAmt, pmtAssetId, toString(userAddress), toBase58String(i.transactionId), true)
1211- if (($t04381743975 == $t04381743975))
1214+ let $t04401544173 = calcPutOneTkn(pmtAmt, pmtAssetId, toString(userAddress), toBase58String(i.transactionId), true)
1215+ if (($t04401544173 == $t04401544173))
12121216 then {
1213- let feeAmount = $t04381743975._3
1214- let state = $t04381743975._2
1215- let estimLP = $t04381743975._1
1217+ let feeAmount = $t04401544173._3
1218+ let state = $t04401544173._2
1219+ let estimLP = $t04401544173._1
12161220 let emitLpAmt = if (if ((minOutAmount > 0))
12171221 then (minOutAmount > estimLP)
12181222 else false)
12191223 then throwErr(makeString(["amount to receive is less than ", toString(minOutAmount)], ""))
12201224 else estimLP
12211225 let e = invoke(fca, "emit", [emitLpAmt], nil)
12221226 if ((e == e))
12231227 then {
12241228 let el = match e {
12251229 case legacy: Address =>
12261230 invoke(legacy, "emit", [emitLpAmt], nil)
12271231 case _ =>
12281232 unit
12291233 }
12301234 if ((el == el))
12311235 then {
12321236 let lpTrnsfr = if (autoStake)
12331237 then {
12341238 let ss = invoke(stakingContract, "stakeFor", [toString(i.caller)], [AttachedPayment(lpId, emitLpAmt)])
12351239 if ((ss == ss))
12361240 then nil
12371241 else throw("Strict value is not equal to itself.")
12381242 }
12391243 else [ScriptTransfer(i.caller, emitLpAmt, lpId)]
12401244 let sendFeeToMatcher = if ((feeAmount > 0))
12411245 then [ScriptTransfer(feeCollectorAddress, feeAmount, fromBase58String(pmtAssetId))]
12421246 else nil
1243- let $t04486045209 = if ((this == feeCollectorAddress))
1247+ let $t04505845407 = if ((this == feeCollectorAddress))
12441248 then $Tuple2(0, 0)
12451249 else {
12461250 let paymentInAmountAsset = if ((pmt.assetId == cfgAmountAssetId))
12471251 then true
12481252 else false
12491253 if (paymentInAmountAsset)
12501254 then $Tuple2(-(feeAmount), 0)
12511255 else $Tuple2(0, -(feeAmount))
12521256 }
1253- let amountAssetBalanceDelta = $t04486045209._1
1254- let priceAssetBalanceDelta = $t04486045209._2
1255- let $t04521245320 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
1256- let refreshDLpActions = $t04521245320._1
1257- let updatedDLp = $t04521245320._2
1257+ let amountAssetBalanceDelta = $t04505845407._1
1258+ let priceAssetBalanceDelta = $t04505845407._2
1259+ let $t04541045518 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
1260+ let refreshDLpActions = $t04541045518._1
1261+ let updatedDLp = $t04541045518._2
12581262 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
12591263 if ((isUpdatedDLpValid == isUpdatedDLpValid))
12601264 then $Tuple2((((state ++ lpTrnsfr) ++ sendFeeToMatcher) ++ refreshDLpActions), emitLpAmt)
12611265 else throw("Strict value is not equal to itself.")
12621266 }
12631267 else throw("Strict value is not equal to itself.")
12641268 }
12651269 else throw("Strict value is not equal to itself.")
12661270 }
12671271 else throw("Strict value is not equal to itself.")
12681272 }
12691273 else throw("Strict value is not equal to itself.")
12701274 }
12711275 else throw("Strict value is not equal to itself.")
12721276 }
12731277
12741278
12751279
12761280 @Callable(i)
12771281 func putForFree (maxSlpg) = if ((0 > maxSlpg))
12781282 then throw("Wrong slpg")
12791283 else if ((size(i.payments) != 2))
12801284 then throw("2 pmnts expd")
12811285 else {
12821286 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, "")
12831287 let state = estPut._9
12841288 let amAssetPmt = toBigInt(value(i.payments[0]).amount)
12851289 let prAssetPmt = toBigInt(value(i.payments[1]).amount)
12861290 let currentDLp = calcCurrentDLp(amAssetPmt, prAssetPmt, toBigInt(0))
12871291 if ((currentDLp == currentDLp))
12881292 then {
1289- let $t04635046415 = refreshDLpInternal(0, 0, 0)
1290- let refreshDLpActions = $t04635046415._1
1291- let updatedDLp = $t04635046415._2
1293+ let $t04654846613 = refreshDLpInternal(0, 0, 0)
1294+ let refreshDLpActions = $t04654846613._1
1295+ let updatedDLp = $t04654846613._2
12921296 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
12931297 if ((isUpdatedDLpValid == isUpdatedDLpValid))
12941298 then (state ++ refreshDLpActions)
12951299 else throw("Strict value is not equal to itself.")
12961300 }
12971301 else throw("Strict value is not equal to itself.")
12981302 }
12991303
13001304
13011305
13021306 @Callable(i)
13031307 func get () = {
13041308 let currentDLp = calcCurrentDLp(toBigInt(0), toBigInt(0), toBigInt(0))
13051309 if ((currentDLp == currentDLp))
13061310 then {
13071311 let r = cg(i)
13081312 let outAmtAmt = r._1
13091313 let outPrAmt = r._2
13101314 let pmtAmt = r._3
13111315 let pmtAssetId = r._4
13121316 let state = r._5
13131317 let b = invoke(fca, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
13141318 if ((b == b))
13151319 then {
1316- let $t04758847670 = refreshDLpInternal(-(outAmtAmt), -(outPrAmt), 0)
1317- let refreshDLpActions = $t04758847670._1
1318- let updatedDLp = $t04758847670._2
1320+ let $t04778647868 = refreshDLpInternal(-(outAmtAmt), -(outPrAmt), 0)
1321+ let refreshDLpActions = $t04778647868._1
1322+ let updatedDLp = $t04778647868._2
13191323 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
13201324 if ((isUpdatedDLpValid == isUpdatedDLpValid))
13211325 then (state ++ refreshDLpActions)
13221326 else throw("Strict value is not equal to itself.")
13231327 }
13241328 else throw("Strict value is not equal to itself.")
13251329 }
13261330 else throw("Strict value is not equal to itself.")
13271331 }
13281332
13291333
13301334
13311335 @Callable(i)
13321336 func getOneTknV2 (outAssetId,minOutAmount) = {
13331337 let isPoolOneTokenOperationsDisabled = {
13341338 let @ = invoke(fca, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
13351339 if ($isInstanceOf(@, "Boolean"))
13361340 then @
13371341 else throw(($getType(@) + " couldn't be cast to Boolean"))
13381342 }
13391343 let isGetDisabled = if (if (igs())
13401344 then true
13411345 else (cfgPoolStatus == PoolShutdown))
13421346 then true
13431347 else isPoolOneTokenOperationsDisabled
13441348 let checks = [if (if (!(isGetDisabled))
13451349 then true
13461350 else isManager(i))
13471351 then true
13481352 else throwErr("get operation is blocked by admin"), if ((size(i.payments) == 1))
13491353 then true
13501354 else throwErr("exactly 1 payment are expected")]
13511355 if ((checks == checks))
13521356 then {
1353- let $t04828848443 = getOneTknV2Internal(outAssetId, minOutAmount, i.payments, i.caller, i.originCaller, i.transactionId)
1354- let state = $t04828848443._1
1355- let totalAmount = $t04828848443._2
1357+ let $t04848648641 = getOneTknV2Internal(outAssetId, minOutAmount, i.payments, i.caller, i.originCaller, i.transactionId)
1358+ let state = $t04848648641._1
1359+ let totalAmount = $t04848648641._2
13561360 $Tuple2(state, totalAmount)
13571361 }
13581362 else throw("Strict value is not equal to itself.")
13591363 }
13601364
13611365
13621366
13631367 @Callable(i)
13641368 func refreshDLp () = {
13651369 let lastRefreshedBlockHeight = valueOrElse(getInteger(keyDLpRefreshedHeight), 0)
13661370 let checkLastRefreshedBlockHeight = if (((height - lastRefreshedBlockHeight) >= dLpRefreshDelay))
13671371 then unit
13681372 else throwErr(makeString([toString(dLpRefreshDelay), " blocks have not passed since the previous call"], ""))
13691373 if ((checkLastRefreshedBlockHeight == checkLastRefreshedBlockHeight))
13701374 then {
13711375 let dLp = valueOrErrorMessage(parseBigInt(valueOrElse(getString(this, keyDLp), "0")), fmtErr("invalid dLp"))
1372- let $t04896749031 = refreshDLpInternal(0, 0, 0)
1373- let dLpUpdateActions = $t04896749031._1
1374- let updatedDLp = $t04896749031._2
1376+ let $t04916549229 = refreshDLpInternal(0, 0, 0)
1377+ let dLpUpdateActions = $t04916549229._1
1378+ let updatedDLp = $t04916549229._2
13751379 let actions = if ((dLp != updatedDLp))
13761380 then dLpUpdateActions
13771381 else throwErr("nothing to refresh")
13781382 $Tuple2(actions, toString(updatedDLp))
13791383 }
13801384 else throw("Strict value is not equal to itself.")
13811385 }
13821386
13831387
13841388
13851389 @Callable(i)
13861390 func getOneTknV2READONLY (outAssetId,lpAssetAmount) = {
13871391 let amId = toBase58String(value(cfgAmountAssetId))
13881392 let prId = toBase58String(value(cfgPriceAssetId))
13891393 let lpId = toBase58String(value(cfgLpAssetId))
13901394 let xp = [toBigInt(getAccBalance(amId)), toBigInt(getAccBalance(prId))]
13911395 let lpEmission = toBigInt(valueOrErrorMessage(assetInfo(fromBase58String(lpId)), "invalid lp asset").quantity)
13921396 let D0 = getD(xp)
13931397 let D1 = (D0 - fraction(toBigInt(lpAssetAmount), D0, lpEmission))
13941398 let index = if ((outAssetId == amId))
13951399 then 0
13961400 else if ((outAssetId == prId))
13971401 then 1
13981402 else throw("invalid out asset id")
13991403 let newY = getYD(xp, index, D1)
14001404 let dy = (xp[index] - newY)
14011405 let totalGetRaw = max([0, toInt((dy - big1))])
1402- let $t05004150096 = takeFee(totalGetRaw, outFee)
1403- let totalGet = $t05004150096._1
1404- let feeAmount = $t05004150096._2
1406+ let $t05023950294 = takeFee(totalGetRaw, outFee)
1407+ let totalGet = $t05023950294._1
1408+ let feeAmount = $t05023950294._2
14051409 $Tuple2(nil, $Tuple2(totalGet, feeAmount))
14061410 }
14071411
14081412
14091413
14101414 @Callable(i)
14111415 func getOneTknV2WithBonusREADONLY (outAssetId,lpAssetAmount) = {
14121416 let amId = toBase58String(value(cfgAmountAssetId))
14131417 let prId = toBase58String(value(cfgPriceAssetId))
14141418 let lpId = toBase58String(value(cfgLpAssetId))
14151419 let amBalance = getAccBalance(amId)
14161420 let prBalance = getAccBalance(prId)
1417- let $t05047150586 = {
1421+ let $t05066950784 = {
14181422 let @ = invoke(this, "getOneTknV2READONLY", [outAssetId, lpAssetAmount], nil)
14191423 if ($isInstanceOf(@, "(Int, Int)"))
14201424 then @
14211425 else throw(($getType(@) + " couldn't be cast to (Int, Int)"))
14221426 }
1423- let totalGet = $t05047150586._1
1424- let feeAmount = $t05047150586._2
1427+ let totalGet = $t05066950784._1
1428+ let feeAmount = $t05066950784._2
14251429 let r = ego("", lpId, lpAssetAmount, this)
14261430 let outAmAmt = r._1
14271431 let outPrAmt = r._2
14281432 let sumOfGetAssets = (outAmAmt + outPrAmt)
14291433 let bonus = if ((sumOfGetAssets == 0))
14301434 then if ((totalGet == 0))
14311435 then 0
14321436 else throw("bonus calculation error")
14331437 else fraction((totalGet - sumOfGetAssets), scale8, sumOfGetAssets)
14341438 $Tuple2(nil, $Tuple3(totalGet, feeAmount, bonus))
14351439 }
14361440
14371441
14381442
14391443 @Callable(i)
14401444 func getNoLess (noLessThenAmtAsset,noLessThenPriceAsset) = {
14411445 let r = cg(i)
14421446 let outAmAmt = r._1
14431447 let outPrAmt = r._2
14441448 let pmtAmt = r._3
14451449 let pmtAssetId = r._4
14461450 let state = r._5
14471451 if ((noLessThenAmtAsset > outAmAmt))
14481452 then throw(((("Failed: " + toString(outAmAmt)) + " < ") + toString(noLessThenAmtAsset)))
14491453 else if ((noLessThenPriceAsset > outPrAmt))
14501454 then throw(((("Failed: " + toString(outPrAmt)) + " < ") + toString(noLessThenPriceAsset)))
14511455 else {
14521456 let currentDLp = calcCurrentDLp(toBigInt(0), toBigInt(0), toBigInt(0))
14531457 if ((currentDLp == currentDLp))
14541458 then {
14551459 let burnLPAssetOnFactory = invoke(fca, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
14561460 if ((burnLPAssetOnFactory == burnLPAssetOnFactory))
14571461 then {
1458- let $t05175251833 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1459- let refreshDLpActions = $t05175251833._1
1460- let updatedDLp = $t05175251833._2
1462+ let $t05195052031 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1463+ let refreshDLpActions = $t05195052031._1
1464+ let updatedDLp = $t05195052031._2
14611465 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
14621466 if ((isUpdatedDLpValid == isUpdatedDLpValid))
14631467 then (state ++ refreshDLpActions)
14641468 else throw("Strict value is not equal to itself.")
14651469 }
14661470 else throw("Strict value is not equal to itself.")
14671471 }
14681472 else throw("Strict value is not equal to itself.")
14691473 }
14701474 }
14711475
14721476
14731477
14741478 @Callable(i)
14751479 func unstakeAndGet (amount) = {
14761480 let checkPayments = if ((size(i.payments) != 0))
14771481 then throw("No pmnts expd")
14781482 else true
14791483 if ((checkPayments == checkPayments))
14801484 then {
14811485 let factoryCfg = gfc()
14821486 let lpAssetId = cfgLpAssetId
14831487 let staking = valueOrErrorMessage(addressFromString(factoryCfg[idxFactStakCntr]), "Wr st addr")
14841488 let currentDLp = calcCurrentDLp(toBigInt(0), toBigInt(0), toBigInt(0))
14851489 if ((currentDLp == currentDLp))
14861490 then {
14871491 let unstakeInv = invoke(staking, "unstake", [toBase58String(lpAssetId), amount], nil)
14881492 if ((unstakeInv == unstakeInv))
14891493 then {
14901494 let r = ego(toBase58String(i.transactionId), toBase58String(lpAssetId), amount, i.caller)
14911495 let outAmAmt = r._1
14921496 let outPrAmt = r._2
14931497 let sts = parseIntValue(r._9)
14941498 let state = r._10
14951499 let v = if (if (igs())
14961500 then true
14971501 else (sts == PoolShutdown))
14981502 then throw(("Blocked: " + toString(sts)))
14991503 else true
15001504 if ((v == v))
15011505 then {
15021506 let burnA = invoke(fca, "burn", [amount], [AttachedPayment(lpAssetId, amount)])
15031507 if ((burnA == burnA))
15041508 then {
1505- let $t05286052941 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1506- let refreshDLpActions = $t05286052941._1
1507- let updatedDLp = $t05286052941._2
1509+ let $t05305853139 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1510+ let refreshDLpActions = $t05305853139._1
1511+ let updatedDLp = $t05305853139._2
15081512 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
15091513 if ((isUpdatedDLpValid == isUpdatedDLpValid))
15101514 then (state ++ refreshDLpActions)
15111515 else throw("Strict value is not equal to itself.")
15121516 }
15131517 else throw("Strict value is not equal to itself.")
15141518 }
15151519 else throw("Strict value is not equal to itself.")
15161520 }
15171521 else throw("Strict value is not equal to itself.")
15181522 }
15191523 else throw("Strict value is not equal to itself.")
15201524 }
15211525 else throw("Strict value is not equal to itself.")
15221526 }
15231527
15241528
15251529
15261530 @Callable(i)
15271531 func unstakeAndGetNoLess (unstakeAmount,noLessThenAmountAsset,noLessThenPriceAsset) = {
15281532 let isGetDisabled = if (igs())
15291533 then true
15301534 else (cfgPoolStatus == PoolShutdown)
15311535 let checks = [if (!(isGetDisabled))
15321536 then true
15331537 else throw("get operation is blocked by admin"), if ((size(i.payments) == 0))
15341538 then true
15351539 else throw("no payments are expected")]
15361540 if ((checks == checks))
15371541 then {
15381542 let currentDLp = calcCurrentDLp(toBigInt(0), toBigInt(0), toBigInt(0))
15391543 if ((currentDLp == currentDLp))
15401544 then {
15411545 let unstakeInv = invoke(stakingContract, "unstake", [toBase58String(cfgLpAssetId), unstakeAmount], nil)
15421546 if ((unstakeInv == unstakeInv))
15431547 then {
15441548 let res = ego(toBase58String(i.transactionId), toBase58String(cfgLpAssetId), unstakeAmount, i.caller)
15451549 let outAmAmt = res._1
15461550 let outPrAmt = res._2
15471551 let state = res._10
15481552 let checkAmounts = [if ((outAmAmt >= noLessThenAmountAsset))
15491553 then true
15501554 else throw(makeString(["amount asset amount to receive is less than ", toString(noLessThenAmountAsset)], "")), if ((outPrAmt >= noLessThenPriceAsset))
15511555 then true
15521556 else throw(makeString(["price asset amount to receive is less than ", toString(noLessThenPriceAsset)], ""))]
15531557 if ((checkAmounts == checkAmounts))
15541558 then {
15551559 let burnLPAssetOnFactory = invoke(fca, "burn", [unstakeAmount], [AttachedPayment(cfgLpAssetId, unstakeAmount)])
15561560 if ((burnLPAssetOnFactory == burnLPAssetOnFactory))
15571561 then {
1558- let $t05419254273 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1559- let refreshDLpActions = $t05419254273._1
1560- let updatedDLp = $t05419254273._2
1562+ let $t05439054471 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1563+ let refreshDLpActions = $t05439054471._1
1564+ let updatedDLp = $t05439054471._2
15611565 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
15621566 if ((isUpdatedDLpValid == isUpdatedDLpValid))
15631567 then (state ++ refreshDLpActions)
15641568 else throw("Strict value is not equal to itself.")
15651569 }
15661570 else throw("Strict value is not equal to itself.")
15671571 }
15681572 else throw("Strict value is not equal to itself.")
15691573 }
15701574 else throw("Strict value is not equal to itself.")
15711575 }
15721576 else throw("Strict value is not equal to itself.")
15731577 }
15741578 else throw("Strict value is not equal to itself.")
15751579 }
15761580
15771581
15781582
15791583 @Callable(i)
15801584 func unstakeAndGetOneTknV2 (unstakeAmount,outAssetId,minOutAmount) = {
15811585 let isPoolOneTokenOperationsDisabled = {
15821586 let @ = invoke(fca, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
15831587 if ($isInstanceOf(@, "Boolean"))
15841588 then @
15851589 else throw(($getType(@) + " couldn't be cast to Boolean"))
15861590 }
15871591 let isGetDisabled = if (if (igs())
15881592 then true
15891593 else (cfgPoolStatus == PoolShutdown))
15901594 then true
15911595 else isPoolOneTokenOperationsDisabled
15921596 let checks = [if (if (!(isGetDisabled))
15931597 then true
15941598 else isManager(i))
15951599 then true
15961600 else throwErr("get operation is blocked by admin"), if ((size(i.payments) == 0))
15971601 then true
15981602 else throwErr("no payments are expected")]
15991603 if ((checks == checks))
16001604 then {
16011605 let factoryCfg = gfc()
16021606 let lpAssetId = cfgLpAssetId
16031607 let staking = valueOrErrorMessage(addressFromString(factoryCfg[idxFactStakCntr]), "Wr st addr")
16041608 let userAddress = i.caller
16051609 let lpAssetRecipientAddress = this
16061610 let unstakeInv = invoke(staking, "unstakeINTERNAL", [lpAssetId, unstakeAmount, userAddress.bytes, lpAssetRecipientAddress.bytes], nil)
16071611 if ((unstakeInv == unstakeInv))
16081612 then {
1609- let $t05529555483 = getOneTknV2Internal(outAssetId, minOutAmount, [AttachedPayment(lpAssetId, unstakeAmount)], i.caller, i.originCaller, i.transactionId)
1610- let state = $t05529555483._1
1611- let totalAmount = $t05529555483._2
1613+ let $t05549355681 = getOneTknV2Internal(outAssetId, minOutAmount, [AttachedPayment(lpAssetId, unstakeAmount)], i.caller, i.originCaller, i.transactionId)
1614+ let state = $t05549355681._1
1615+ let totalAmount = $t05549355681._2
16121616 $Tuple2(state, totalAmount)
16131617 }
16141618 else throw("Strict value is not equal to itself.")
16151619 }
16161620 else throw("Strict value is not equal to itself.")
16171621 }
16181622
16191623
16201624
16211625 @Callable(i)
16221626 func putOneTknV2WithBonusREADONLY (paymentAmountRaw,paymentAssetId) = {
1623- let $t05561155714 = calcPutOneTkn(paymentAmountRaw, paymentAssetId, "", "", true)
1624- let lpAmount = $t05561155714._1
1625- let state = $t05561155714._2
1626- let feeAmount = $t05561155714._3
1627- let bonus = $t05561155714._4
1627+ let $t05580955912 = calcPutOneTkn(paymentAmountRaw, paymentAssetId, "", "", true)
1628+ let lpAmount = $t05580955912._1
1629+ let state = $t05580955912._2
1630+ let feeAmount = $t05580955912._3
1631+ let bonus = $t05580955912._4
16281632 $Tuple2(nil, $Tuple3(lpAmount, feeAmount, bonus))
16291633 }
16301634
16311635
16321636
16331637 @Callable(i)
16341638 func putOneTknV2WithoutTakeFeeREADONLY (paymentAmountRaw,paymentAssetId) = {
1635- let $t05586255966 = calcPutOneTkn(paymentAmountRaw, paymentAssetId, "", "", false)
1636- let lpAmount = $t05586255966._1
1637- let state = $t05586255966._2
1638- let feeAmount = $t05586255966._3
1639- let bonus = $t05586255966._4
1639+ let $t05606056164 = calcPutOneTkn(paymentAmountRaw, paymentAssetId, "", "", false)
1640+ let lpAmount = $t05606056164._1
1641+ let state = $t05606056164._2
1642+ let feeAmount = $t05606056164._3
1643+ let bonus = $t05606056164._4
16401644 $Tuple2(nil, $Tuple3(lpAmount, feeAmount, bonus))
16411645 }
16421646
16431647
16441648
16451649 @Callable(i)
16461650 func activate (amtAsStr,prAsStr) = if ((toString(i.caller) != toString(fca)))
16471651 then throw("denied")
1648- else $Tuple2([StringEntry(aa(), amtAsStr), StringEntry(pa(), prAsStr), StringEntry(amp(), toString(ampInitial))], "success")
1652+ else $Tuple2([StringEntry(aa(), amtAsStr), StringEntry(pa(), prAsStr)], "success")
16491653
16501654
16511655
16521656 @Callable(i)
16531657 func getPoolConfigWrapperREADONLY () = $Tuple2(nil, gpc())
16541658
16551659
16561660
16571661 @Callable(i)
16581662 func getAccBalanceWrapperREADONLY (assetId) = $Tuple2(nil, getAccBalance(assetId))
16591663
16601664
16611665
16621666 @Callable(i)
16631667 func calcPricesWrapperREADONLY (amAmt,prAmt,lpAmt) = {
16641668 let pr = calcPrices(amAmt, prAmt, lpAmt)
16651669 $Tuple2(nil, [toString(pr[0]), toString(pr[1]), toString(pr[2])])
16661670 }
16671671
16681672
16691673
16701674 @Callable(i)
16711675 func fromX18WrapperREADONLY (val,resScaleMult) = $Tuple2(nil, f1(parseBigIntValue(val), resScaleMult))
16721676
16731677
16741678
16751679 @Callable(i)
16761680 func toX18WrapperREADONLY (origVal,origScaleMult) = $Tuple2(nil, toString(t1(origVal, origScaleMult)))
16771681
16781682
16791683
16801684 @Callable(i)
16811685 func calcPriceBigIntWrapperREADONLY (prAmtX18,amAmtX18) = $Tuple2(nil, toString(cpbi(parseBigIntValue(prAmtX18), parseBigIntValue(amAmtX18))))
16821686
16831687
16841688
16851689 @Callable(i)
16861690 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, ""))
16871691
16881692
16891693
16901694 @Callable(i)
16911695 func estimateGetOperationWrapperREADONLY (txId58,pmtAsId,pmtLpAmt,usrAddr) = {
16921696 let r = ego(txId58, pmtAsId, pmtLpAmt, addressFromStringValue(usrAddr))
16931697 $Tuple2(nil, $Tuple10(r._1, r._2, r._3, r._4, r._5, r._6, r._7, toString(r._8), r._9, r._10))
16941698 }
16951699
16961700
16971701
16981702 @Callable(i)
16991703 func changeAmp () = {
17001704 let cfg = invoke(fca, "getChangeAmpConfigREADONLY", [toString(this)], nil)
1701- let $t05837558574 = match cfg {
1705+ let $t05851858717 = match cfg {
17021706 case list: List[Any] =>
17031707 $Tuple3({
17041708 let @ = list[0]
17051709 if ($isInstanceOf(@, "Int"))
17061710 then @
17071711 else throw(($getType(@) + " couldn't be cast to Int"))
17081712 }, {
17091713 let @ = list[1]
17101714 if ($isInstanceOf(@, "Int"))
17111715 then @
17121716 else throw(($getType(@) + " couldn't be cast to Int"))
17131717 }, {
17141718 let @ = list[2]
17151719 if ($isInstanceOf(@, "Int"))
17161720 then @
17171721 else throw(($getType(@) + " couldn't be cast to Int"))
17181722 })
17191723 case _ =>
17201724 throwErr("invalid entry type")
17211725 }
1722- let delay = $t05837558574._1
1723- let delta = $t05837558574._2
1724- let target = $t05837558574._3
1726+ let delay = $t05851858717._1
1727+ let delta = $t05851858717._2
1728+ let target = $t05851858717._3
17251729 let curAmp = parseIntValue(getStringValue(amp()))
17261730 let newAmpRaw = (curAmp + delta)
17271731 let newAmp = if ((0 > delta))
17281732 then if ((target > newAmpRaw))
17291733 then target
17301734 else newAmpRaw
17311735 else if ((newAmpRaw > target))
17321736 then target
17331737 else newAmpRaw
17341738 let lastCall = valueOrElse(getInteger(keyChangeAmpLastCall()), 0)
17351739 let wait = (lastCall + delay)
17361740 let checks = [if ((height > wait))
17371741 then true
17381742 else throwErr("try again in few blocks"), if ((curAmp != newAmp))
17391743 then true
17401744 else throwErr("already reached target")]
17411745 if ((checks == checks))
17421746 then [IntegerEntry(keyChangeAmpLastCall(), height), StringEntry(amp(), toString(newAmp)), StringEntry(keyAmpHistory(height), toString(newAmp))]
17431747 else throw("Strict value is not equal to itself.")
17441748 }
17451749
17461750
17471751 @Verifier(tx)
17481752 func verify () = {
17491753 let targetPublicKey = match managerPublicKeyOrUnit() {
17501754 case pk: ByteVector =>
17511755 pk
17521756 case _: Unit =>
17531757 tx.senderPublicKey
17541758 case _ =>
17551759 throw("Match error")
17561760 }
17571761 match tx {
17581762 case order: Order =>
17591763 let matcherPub = mp()
1760- let $t05950759624 = if (skipOrderValidation())
1764+ let $t05965059767 = if (skipOrderValidation())
17611765 then $Tuple2(true, "")
17621766 else validateMatcherOrderAllowed(order)
1763- let orderValid = $t05950759624._1
1764- let orderValidInfo = $t05950759624._2
1767+ let orderValid = $t05965059767._1
1768+ let orderValidInfo = $t05965059767._2
17651769 let senderValid = sigVerify(order.bodyBytes, order.proofs[0], order.senderPublicKey)
17661770 let matcherValid = sigVerify(order.bodyBytes, order.proofs[1], matcherPub)
17671771 if (if (if (orderValid)
17681772 then senderValid
17691773 else false)
17701774 then matcherValid
17711775 else false)
17721776 then true
17731777 else throwOrderError(orderValid, orderValidInfo, senderValid, matcherValid)
17741778 case s: SetScriptTransaction =>
17751779 if (sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey))
17761780 then true
17771781 else {
17781782 let newHash = blake2b256(value(s.script))
17791783 let allowedHash = fromBase64String(value(getString(fca, keyAllowedLpStableScriptHash())))
17801784 let currentHash = scriptHash(this)
17811785 if ((allowedHash == newHash))
17821786 then (currentHash != newHash)
17831787 else false
17841788 }
17851789 case _ =>
17861790 sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey)
17871791 }
17881792 }
17891793

github/deemru/w8io/026f985 
247.57 ms