tx · 7xjRCq6tA67ij6rhbffPeWTXPaxKGVRDrurNNGzb9Xyu

3NAefciWv6f9fWvEXdGgpHfanJFG8HqfjuT:  -0.04200000 Waves

2023.03.22 19:29 [2501456] smart account 3NAefciWv6f9fWvEXdGgpHfanJFG8HqfjuT > SELF 0.00000000 Waves

{ "type": 13, "id": "7xjRCq6tA67ij6rhbffPeWTXPaxKGVRDrurNNGzb9Xyu", "fee": 4200000, "feeAssetId": null, "timestamp": 1679502623247, "version": 2, "chainId": 84, "sender": "3NAefciWv6f9fWvEXdGgpHfanJFG8HqfjuT", "senderPublicKey": "D1BL65meykxFZTCuq7jq9HSGLLnWvQamQPUNrguW5w39", "proofs": [ "51bEWqfds3gy9RhNvaX8XtK7oqLygEvUkdSigvoiJgCuvmG7CdqVcbyZUtyExBMvNDBDaYmyDC3Za7ithGebpvAq" ], "script": "base64:BgLRLAgCEgUKAwEEARIHCgUBBAEIARIDCgEIEgMKAQgSABIECgIBBBIECgIBBBIDCgEBEgASBAoCCAESABIECgIIARIECgIIARIECgIBARIDCgEBEgUKAwEBARIFCgMBCAESBAoCAQgSBAoCAQgSBAoCCAgSBAoCCAgSBAoCCAESABIDCgEIEgUKAwEBARIECgIIARIECgIBARIECgIICBILCgkIAQECAQIIBAQSBgoECAgBCBIAIgZzY2FsZTgiDHNjYWxlOEJpZ0ludCIHc2NhbGUxOCIKemVyb0JpZ0ludCIEYmlnMCIEYmlnMSIEYmlnMiIEYmlnMyIEYmlnNCIKc2xpcHBhZ2U0RCILd2F2ZXNTdHJpbmciBUFtdWx0IgVEY29udiIDU0VQIgVFTVBUWSIKUG9vbEFjdGl2ZSIKUG9vbFB1dERpcyIOUG9vbE1hdGNoZXJEaXMiDFBvb2xTaHV0ZG93biIOaWR4UG9vbEFkZHJlc3MiCWlkeFBvb2xTdCIJaWR4TFBBc0lkIglpZHhBbUFzSWQiCWlkeFByQXNJZCILaWR4QW10QXNEY20iDWlkeFByaWNlQXNEY20iC2lkeElBbXRBc0lkIg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kBBXZhbHVlAQkAnQgCBQJhVgkBAmFGAAQCaUgJAPEHAQUEdGhpcwMJAAACBQJpRwUCaUYJAQIhPQIFAmlIBQJpRgcJAPQDAwgFAmlBCWJvZHlCeXRlcwkAkQMCCAUCaUEGcHJvb2ZzAAAFAmlDSavHcA==", "height": 2501456, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 78sF22HDQSaejqeCtJFsnmG11Vhon742DZkMwBfJMnse Next: 3azmmVnXKB5938sxa1QspqXg8GAmc4bTbrUKxQ9icSVL Diff:
OldNewDifferences
128128 func amp () = "%s__amp"
129129
130130
131-func keyAmpHistory (height) = ("%s%d__amp__" + toString(height))
131+func keyAmpHistory (heightBlocks) = ("%s%d__amp__" + toString(heightBlocks))
132132
133133
134134 func ada () = "%s__addonAddr"
240240
241241 let poolConfigParsed = parsePoolConfig(gpc())
242242
243-let $t081818392 = poolConfigParsed
243+let $t081938404 = poolConfigParsed
244244
245-let cfgPoolAddress = $t081818392._1
245+let cfgPoolAddress = $t081938404._1
246246
247-let cfgPoolStatus = $t081818392._2
247+let cfgPoolStatus = $t081938404._2
248248
249-let cfgLpAssetId = $t081818392._3
249+let cfgLpAssetId = $t081938404._3
250250
251-let cfgAmountAssetId = $t081818392._4
251+let cfgAmountAssetId = $t081938404._4
252252
253-let cfgPriceAssetId = $t081818392._5
253+let cfgPriceAssetId = $t081938404._5
254254
255-let cfgAmountAssetDecimals = $t081818392._6
255+let cfgAmountAssetDecimals = $t081938404._6
256256
257-let cfgPriceAssetDecimals = $t081818392._7
257+let cfgPriceAssetDecimals = $t081938404._7
258258
259-let cfgInAmountAssedId = $t081818392._8
259+let cfgInAmountAssedId = $t081938404._8
260260
261-let cfgInPriceAssetId = $t081818392._9
261+let cfgInPriceAssetId = $t081938404._9
262262
263263 func gfc () = split(strf(fca, fcfg()), SEP)
264264
379379 }
380380
381381 let arr = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16]
382- let $t01287912927 = {
382+ let $t01289112939 = {
383383 let $l = arr
384384 let $s = size($l)
385385 let $acc0 = $Tuple2(s, false)
393393
394394 $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)
395395 }
396- let d = $t01287912927._1
397- let found = $t01287912927._2
396+ let d = $t01289112939._1
397+ let found = $t01289112939._2
398398 if (found)
399399 then d
400400 else throw(("D calculation error, D = " + toString(d)))
431431 then unit
432432 else fromBase58String(amId)), ScriptTransfer(userAddress, outPrAmt, if ((prId == "WAVES"))
433433 then unit
434- else fromBase58String(prId)), StringEntry(gau(toString(userAddress), txId58), dataGetActionInfo(outAmAmt, outPrAmt, pmtLpAmt, curPrice, an, lastBlock.timestamp)), IntegerEntry(pl(), curPrice), IntegerEntry(ph(an, lastBlock.timestamp), curPrice)]
434+ 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)]
435435 $Tuple10(outAmAmt, outPrAmt, amId, prId, amBalance, prBalance, lpEmiss, curPriceX18, sts, state)
436436 }
437437 }
530530 else calcLpAmt
531531 let amDiff = (inAmAmt - calcAmAssetPmt)
532532 let prDiff = (inPrAmt - calcPrAssetPmt)
533- let $t01991220105 = if (if (isOneAsset)
533+ let $t01992420117 = if (if (isOneAsset)
534534 then (pmtId == amIdStr)
535535 else false)
536536 then $Tuple2(pmtAmt, 0)
539539 else false)
540540 then $Tuple2(0, pmtAmt)
541541 else $Tuple2(calcAmAssetPmt, calcPrAssetPmt)
542- let writeAmAmt = $t01991220105._1
543- let writePrAmt = $t01991220105._2
544- let commonState = [IntegerEntry(pl(), curPrice), IntegerEntry(ph(an, lastBlock.timestamp), curPrice), StringEntry(pau(userAddress, txId58), dataPutActionInfo(writeAmAmt, writePrAmt, emitLpAmt, curPrice, slippage, slippageCalc, an, lastBlock.timestamp, amDiff, prDiff))]
542+ let writeAmAmt = $t01992420117._1
543+ let writePrAmt = $t01992420117._2
544+ 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))]
545545 $Tuple13(calcLpAmt, emitLpAmt, curPrice, amBalance, prBalance, lpEm, lpId, sts, commonState, amDiff, prDiff, inAmId, inPrId)
546546 }
547547 }
559559 let c = (((((D * D) / (x * n)) * D) * aPrecision) / (ann * n))
560560 let b = ((s + ((D * aPrecision) / ann)) - D)
561561 func calc (acc,cur) = {
562- let $t02129621316 = acc
563- let y = $t02129621316._1
564- let found = $t02129621316._2
562+ let $t02130821328 = acc
563+ let y = $t02130821328._1
564+ let found = $t02130821328._2
565565 if ((found != unit))
566566 then acc
567567 else {
574574 }
575575
576576 let arr = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
577- let $t02162321670 = {
577+ let $t02163521682 = {
578578 let $l = arr
579579 let $s = size($l)
580580 let $acc0 = $Tuple2(D, unit)
588588
589589 $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)
590590 }
591- let y = $t02162321670._1
592- let found = $t02162321670._2
591+ let y = $t02163521682._1
592+ let found = $t02163521682._2
593593 if ((found != unit))
594594 then y
595595 else throw(("Y calculation error, Y = " + toString(y)))
618618 let priceAssetBalance = (getAccBalance(assetIdToString(cfgPriceAssetId)) + priceAssetBalanceDelta)
619619 let lpAssetEmission = (value(assetInfo(cfgLpAssetId)).quantity + lpAssetEmissionDelta)
620620 let updatedDLp = calcDLp(toBigInt(amountAssetBalance), toBigInt(priceAssetBalance), toBigInt(lpAssetEmission))
621- let actions = [IntegerEntry(keyDLpRefreshedHeight, an), StringEntry(keyDLp, toString(updatedDLp))]
621+ let actions = [IntegerEntry(keyDLpRefreshedHeight, height), StringEntry(keyDLp, toString(updatedDLp))]
622622 $Tuple2(actions, updatedDLp)
623623 }
624624
633633 let priceAssetBalance = getAccBalance(assetIdToString(cfgPriceAssetId))
634634 let amountAssetAmount = order.amount
635635 let priceAssetAmount = fraction(order.amount, order.price, scale8, FLOOR)
636- let $t02386824080 = if ((order.orderType == Buy))
636+ let $t02388024092 = if ((order.orderType == Buy))
637637 then $Tuple2(amountAssetAmount, -(priceAssetAmount))
638638 else $Tuple2(-(amountAssetAmount), priceAssetAmount)
639- let amountAssetBalanceDelta = $t02386824080._1
640- let priceAssetBalanceDelta = $t02386824080._2
639+ let amountAssetBalanceDelta = $t02388024092._1
640+ let priceAssetBalanceDelta = $t02388024092._2
641641 if (if (if (igs())
642642 then true
643643 else (cfgPoolStatus == PoolMatcherDis))
650650 then throw("Wr assets")
651651 else {
652652 let dLp = parseBigIntValue(valueOrElse(getString(this, keyDLp), "0"))
653- let $t02442624526 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
654- let unusedActions = $t02442624526._1
655- let dLpNew = $t02442624526._2
653+ let $t02443824538 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
654+ let unusedActions = $t02443824538._1
655+ let dLpNew = $t02443824538._2
656656 let isOrderValid = (dLpNew >= dLp)
657- let info = makeString(["dLp=", toString(dLp), " dLpNew=", toString(dLpNew), " amountAssetBalance=", toString(amountAssetBalance), " priceAssetBalance=", toString(priceAssetBalance), " amountAssetBalanceDelta=", toString(amountAssetBalanceDelta), " priceAssetBalanceDelta=", toString(priceAssetBalanceDelta), " height=", toString(an)], "")
657+ let info = makeString(["dLp=", toString(dLp), " dLpNew=", toString(dLpNew), " amountAssetBalance=", toString(amountAssetBalance), " priceAssetBalance=", toString(priceAssetBalance), " amountAssetBalanceDelta=", toString(amountAssetBalanceDelta), " priceAssetBalanceDelta=", toString(priceAssetBalanceDelta), " height=", toString(height)], "")
658658 $Tuple2(isOrderValid, info)
659659 }
660660 }
706706 then {
707707 let amBalance = getAccBalance(amId)
708708 let prBalance = getAccBalance(prId)
709- let $t02687427318 = if ((txId == ""))
709+ let $t02688627330 = if ((txId == ""))
710710 then $Tuple2(amBalance, prBalance)
711711 else if ((pmtAssetId == amId))
712712 then if ((pmtAmtRaw > amBalance))
717717 then throw("invalid payment amount")
718718 else $Tuple2(amBalance, (prBalance - pmtAmtRaw))
719719 else throw("wrong pmtAssetId")
720- let amBalanceOld = $t02687427318._1
721- let prBalanceOld = $t02687427318._2
722- let $t02732227498 = if ((pmtAssetId == amId))
720+ let amBalanceOld = $t02688627330._1
721+ let prBalanceOld = $t02688627330._2
722+ let $t02733427510 = if ((pmtAssetId == amId))
723723 then $Tuple2(pmtAmtRaw, 0)
724724 else if ((pmtAssetId == prId))
725725 then $Tuple2(0, pmtAmtRaw)
726726 else throw("invalid payment")
727- let amAmountRaw = $t02732227498._1
728- let prAmountRaw = $t02732227498._2
729- let $t02750227756 = if (withTakeFee)
727+ let amAmountRaw = $t02733427510._1
728+ let prAmountRaw = $t02733427510._2
729+ let $t02751427768 = if (withTakeFee)
730730 then $Tuple3(takeFee(amAmountRaw, inFee)._1, takeFee(prAmountRaw, inFee)._1, takeFee(pmtAmtRaw, inFee)._2)
731731 else $Tuple3(amAmountRaw, prAmountRaw, 0)
732- let amAmount = $t02750227756._1
733- let prAmount = $t02750227756._2
734- let feeAmount = $t02750227756._3
732+ let amAmount = $t02751427768._1
733+ let prAmount = $t02751427768._2
734+ let feeAmount = $t02751427768._3
735735 let amBalanceNew = (amBalanceOld + amAmount)
736736 let prBalanceNew = (prBalanceOld + prAmount)
737737 let D0 = getD([t1(amBalanceOld, cfgAmountAssetDecimals), t1(prBalanceOld, cfgPriceAssetDecimals)])
743743 then {
744744 let lpAmount = fraction(lpAssetEmission, (D1 - D0), D0, FLOOR)
745745 let curPrice = f1(cpbi(t1(prBalanceNew, priceDcm), t1(amBalanceNew, amtDcm)), scale8)
746- let commonState = [IntegerEntry(pl(), curPrice), IntegerEntry(ph(an, lastBlock.timestamp), curPrice), StringEntry(pau(userAddress, txId), dataPutActionInfo(amAmountRaw, prAmountRaw, toInt(lpAmount), curPrice, 0, 0, an, lastBlock.timestamp, 0, 0))]
746+ 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))]
747747 let poolProportion = fraction(prBalanceOld, scale8, amBalanceOld)
748748 let amountAssetPart = fraction(pmtAmtRaw, scale8, (poolProportion + scale8))
749749 let priceAssetPart = (pmtAmtRaw - amountAssetPart)
779779 else {
780780 let amBalance = getAccBalance(amId)
781781 let prBalance = getAccBalance(prId)
782- let $t02987229983 = {
782+ let $t02988429995 = {
783783 let @ = invoke(this, "getOneTknV2READONLY", [outAssetId, pmtAmt], nil)
784784 if ($isInstanceOf(@, "(Int, Int)"))
785785 then @
786786 else throw(($getType(@) + " couldn't be cast to (Int, Int)"))
787787 }
788- if (($t02987229983 == $t02987229983))
788+ if (($t02988429995 == $t02988429995))
789789 then {
790- let feeAmount = $t02987229983._2
791- let totalGet = $t02987229983._1
790+ let feeAmount = $t02988429995._2
791+ let totalGet = $t02988429995._1
792792 let totalAmount = if (if ((minOutAmount > 0))
793793 then (minOutAmount > totalGet)
794794 else false)
795795 then throwErr(makeString(["amount to receive is less than ", toString(minOutAmount)], ""))
796796 else totalGet
797- let $t03018130500 = if ((outAssetId == amId))
797+ let $t03019330512 = if ((outAssetId == amId))
798798 then $Tuple4(totalAmount, 0, ((amBalance - totalAmount) - feeAmount), prBalance)
799799 else if ((outAssetId == prId))
800800 then $Tuple4(0, totalAmount, amBalance, ((prBalance - totalAmount) - feeAmount))
801801 else throw("invalid out asset id")
802- let outAm = $t03018130500._1
803- let outPr = $t03018130500._2
804- let amBalanceNew = $t03018130500._3
805- let prBalanceNew = $t03018130500._4
802+ let outAm = $t03019330512._1
803+ let outPr = $t03019330512._2
804+ let amBalanceNew = $t03019330512._3
805+ let prBalanceNew = $t03019330512._4
806806 let curPrX18 = cpbi(t1(prBalanceNew, prDecimals), t1(amBalanceNew, amDecimals))
807807 let curPr = f1(curPrX18, scale8)
808808 let outAssetIdOrWaves = if ((outAssetId == "WAVES"))
811811 let sendFeeToMatcher = if ((feeAmount > 0))
812812 then [ScriptTransfer(feeCollectorAddress, feeAmount, outAssetIdOrWaves)]
813813 else nil
814- let state = ([ScriptTransfer(userAddress, totalAmount, outAssetIdOrWaves), StringEntry(gau(toString(userAddress), txId58), dataGetActionInfo(outAm, outPr, pmtAmt, curPr, an, lastBlock.timestamp)), IntegerEntry(pl(), curPr), IntegerEntry(ph(an, lastBlock.timestamp), curPr)] ++ sendFeeToMatcher)
814+ 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)
815815 if ((state == state))
816816 then {
817817 let burn = invoke(fca, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
818818 if ((burn == burn))
819819 then {
820- let $t03131531673 = {
820+ let $t03132731685 = {
821821 let feeAmountForCalc = if ((this == feeCollectorAddress))
822822 then 0
823823 else feeAmount
828828 then $Tuple2(-((totalGet + feeAmountForCalc)), 0)
829829 else $Tuple2(0, -((totalGet + feeAmountForCalc)))
830830 }
831- let amountAssetBalanceDelta = $t03131531673._1
832- let priceAssetBalanceDelta = $t03131531673._2
833- let $t03167831786 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
834- let refreshDLpActions = $t03167831786._1
835- let updatedDLp = $t03167831786._2
831+ let amountAssetBalanceDelta = $t03132731685._1
832+ let priceAssetBalanceDelta = $t03132731685._2
833+ let $t03169031798 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
834+ let refreshDLpActions = $t03169031798._1
835+ let updatedDLp = $t03169031798._2
836836 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
837837 if ((isUpdatedDLpValid == isUpdatedDLpValid))
838838 then $Tuple2((state ++ refreshDLpActions), totalAmount)
911911 let c = (((((D * D) / (x * n)) * D) * aPrecision) / (ann * n))
912912 let b = ((s + ((D * aPrecision) / ann)) - D)
913913 func calc (acc,cur) = {
914- let $t03323433254 = acc
915- let y = $t03323433254._1
916- let found = $t03323433254._2
914+ let $t03324633266 = acc
915+ let y = $t03324633266._1
916+ let found = $t03324633266._2
917917 if ((found != unit))
918918 then acc
919919 else {
926926 }
927927
928928 let arr = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
929- let $t03356133608 = {
929+ let $t03357333620 = {
930930 let $l = arr
931931 let $s = size($l)
932932 let $acc0 = $Tuple2(D, unit)
940940
941941 $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)
942942 }
943- let y = $t03356133608._1
944- let found = $t03356133608._2
943+ let y = $t03357333620._1
944+ let found = $t03357333620._2
945945 if ((found != unit))
946946 then y
947947 else throw(("Y calculation error, Y = " + toString(y)))
953953
954954 @Callable(i)
955955 func calculateAmountOutForSwapREADONLY (cleanAmountIn,isReverse,feePoolAmount) = {
956- let $t03394934372 = if ((isReverse == false))
956+ let $t03396134384 = if ((isReverse == false))
957957 then {
958958 let assetOut = strf(this, pa())
959959 let poolAmountInBalance = (toBigInt(getAccBalance(strf(this, aa()))) + toBigInt(cleanAmountIn))
964964 let poolAmountInBalance = (toBigInt(getAccBalance(strf(this, pa()))) + toBigInt(cleanAmountIn))
965965 $Tuple2(assetOut, poolAmountInBalance)
966966 }
967- let assetOut = $t03394934372._1
968- let poolAmountInBalance = $t03394934372._2
967+ let assetOut = $t03396134384._1
968+ let poolAmountInBalance = $t03396134384._2
969969 let poolConfig = gpc()
970970 let amId = poolConfig[idxAmAsId]
971971 let prId = poolConfig[idxPrAsId]
10051005 then {
10061006 let pmt = value(i.payments[0])
10071007 let assetIn = assetIdToString(pmt.assetId)
1008- let $t03580136194 = if ((isReverse == false))
1008+ let $t03581336206 = if ((isReverse == false))
10091009 then {
10101010 let assetOut = strf(this, pa())
10111011 let poolAmountInBalance = (getAccBalance(assetIn) - value(i.payments[0]).amount)
10161016 let poolAmountInBalance = (getAccBalance(assetIn) - value(i.payments[0]).amount)
10171017 $Tuple2(assetOut, poolAmountInBalance)
10181018 }
1019- let assetOut = $t03580136194._1
1020- let poolAmountInBalance = $t03580136194._2
1019+ let assetOut = $t03581336206._1
1020+ let poolAmountInBalance = $t03581336206._2
10211021 let poolConfig = gpc()
10221022 let amId = poolConfig[idxAmAsId]
10231023 let prId = poolConfig[idxPrAsId]
11571157 else throw("Strict value is not equal to itself.")
11581158 }
11591159 else [ScriptTransfer(i.caller, emitLpAmt, lpAssetId)]
1160- let $t04059340735 = refreshDLpInternal(0, 0, 0)
1161- let refreshDLpActions = $t04059340735._1
1162- let updatedDLp = $t04059340735._2
1160+ let $t04060540747 = refreshDLpInternal(0, 0, 0)
1161+ let refreshDLpActions = $t04060540747._1
1162+ let updatedDLp = $t04060540747._2
11631163 let check = if ((updatedDLp >= currentDLp))
11641164 then true
11651165 else throwErr(makeString(["updated DLp lower than current DLp", toString(amountAssetBalance), toString(priceAssetBalance), toString(lpAssetEmission), toString(currentDLp), toString(updatedDLp), toString(amDiff), toString(prDiff)], " "))
12321232 else calcCurrentDLp(toBigInt(0), toBigInt(pmtAmt), toBigInt(0))
12331233 if ((currentDLp == currentDLp))
12341234 then {
1235- let $t04237642534 = calcPutOneTkn(pmtAmt, pmtAssetId, toString(userAddress), toBase58String(i.transactionId), true)
1236- if (($t04237642534 == $t04237642534))
1235+ let $t04238842546 = calcPutOneTkn(pmtAmt, pmtAssetId, toString(userAddress), toBase58String(i.transactionId), true)
1236+ if (($t04238842546 == $t04238842546))
12371237 then {
1238- let feeAmount = $t04237642534._3
1239- let state = $t04237642534._2
1240- let estimLP = $t04237642534._1
1238+ let feeAmount = $t04238842546._3
1239+ let state = $t04238842546._2
1240+ let estimLP = $t04238842546._1
12411241 let emitLpAmt = if (if ((minOutAmount > 0))
12421242 then (minOutAmount > estimLP)
12431243 else false)
12651265 let sendFeeToMatcher = if ((feeAmount > 0))
12661266 then [ScriptTransfer(feeCollectorAddress, feeAmount, fromBase58String(pmtAssetId))]
12671267 else nil
1268- let $t04340343750 = if ((this == feeCollectorAddress))
1268+ let $t04341543762 = if ((this == feeCollectorAddress))
12691269 then $Tuple2(0, 0)
12701270 else {
12711271 let paymentInAmountAsset = if ((pmt.assetId == cfgAmountAssetId))
12751275 then $Tuple2(-(feeAmount), 0)
12761276 else $Tuple2(0, -(feeAmount))
12771277 }
1278- let amountAssetBalanceDelta = $t04340343750._1
1279- let priceAssetBalanceDelta = $t04340343750._2
1280- let $t04375343861 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
1281- let refreshDLpActions = $t04375343861._1
1282- let updatedDLp = $t04375343861._2
1278+ let amountAssetBalanceDelta = $t04341543762._1
1279+ let priceAssetBalanceDelta = $t04341543762._2
1280+ let $t04376543873 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
1281+ let refreshDLpActions = $t04376543873._1
1282+ let updatedDLp = $t04376543873._2
12831283 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
12841284 if ((isUpdatedDLpValid == isUpdatedDLpValid))
12851285 then $Tuple2((((state ++ lpTrnsfr) ++ sendFeeToMatcher) ++ refreshDLpActions), emitLpAmt)
13111311 let currentDLp = calcCurrentDLp(amAssetPmt, prAssetPmt, toBigInt(0))
13121312 if ((currentDLp == currentDLp))
13131313 then {
1314- let $t04469344758 = refreshDLpInternal(0, 0, 0)
1315- let refreshDLpActions = $t04469344758._1
1316- let updatedDLp = $t04469344758._2
1314+ let $t04470544770 = refreshDLpInternal(0, 0, 0)
1315+ let refreshDLpActions = $t04470544770._1
1316+ let updatedDLp = $t04470544770._2
13171317 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
13181318 if ((isUpdatedDLpValid == isUpdatedDLpValid))
13191319 then (state ++ refreshDLpActions)
13381338 let b = invoke(fca, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
13391339 if ((b == b))
13401340 then {
1341- let $t04586145943 = refreshDLpInternal(-(outAmtAmt), -(outPrAmt), 0)
1342- let refreshDLpActions = $t04586145943._1
1343- let updatedDLp = $t04586145943._2
1341+ let $t04587345955 = refreshDLpInternal(-(outAmtAmt), -(outPrAmt), 0)
1342+ let refreshDLpActions = $t04587345955._1
1343+ let updatedDLp = $t04587345955._2
13441344 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
13451345 if ((isUpdatedDLpValid == isUpdatedDLpValid))
13461346 then (state ++ refreshDLpActions)
13751375 else throwErr("exactly 1 payment are expected")]
13761376 if ((checks == checks))
13771377 then {
1378- let $t04656146716 = getOneTknV2Internal(outAssetId, minOutAmount, i.payments, i.caller, i.originCaller, i.transactionId)
1379- let state = $t04656146716._1
1380- let totalAmount = $t04656146716._2
1378+ let $t04657346728 = getOneTknV2Internal(outAssetId, minOutAmount, i.payments, i.caller, i.originCaller, i.transactionId)
1379+ let state = $t04657346728._1
1380+ let totalAmount = $t04657346728._2
13811381 $Tuple2(state, totalAmount)
13821382 }
13831383 else throw("Strict value is not equal to itself.")
13881388 @Callable(i)
13891389 func refreshDLp () = {
13901390 let lastRefreshedBlockHeight = valueOrElse(getInteger(keyDLpRefreshedHeight), 0)
1391- let checkLastRefreshedBlockHeight = if (((an - lastRefreshedBlockHeight) >= dLpRefreshDelay))
1391+ let checkLastRefreshedBlockHeight = if (((height - lastRefreshedBlockHeight) >= dLpRefreshDelay))
13921392 then unit
13931393 else throwErr(makeString([toString(dLpRefreshDelay), " blocks have not passed since the previous call"], ""))
13941394 if ((checkLastRefreshedBlockHeight == checkLastRefreshedBlockHeight))
13951395 then {
13961396 let dLp = valueOrErrorMessage(parseBigInt(valueOrElse(getString(this, keyDLp), "0")), fmtErr("invalid dLp"))
1397- let $t04723447298 = refreshDLpInternal(0, 0, 0)
1398- let dLpUpdateActions = $t04723447298._1
1399- let updatedDLp = $t04723447298._2
1397+ let $t04724647310 = refreshDLpInternal(0, 0, 0)
1398+ let dLpUpdateActions = $t04724647310._1
1399+ let updatedDLp = $t04724647310._2
14001400 let actions = if ((dLp != updatedDLp))
14011401 then dLpUpdateActions
14021402 else throwErr("nothing to refresh")
14241424 let newY = getYD(xp, index, D1)
14251425 let dy = (xp[index] - newY)
14261426 let totalGetRaw = max([0, toInt((dy - big1))])
1427- let $t04830848363 = takeFee(totalGetRaw, outFee)
1428- let totalGet = $t04830848363._1
1429- let feeAmount = $t04830848363._2
1427+ let $t04832048375 = takeFee(totalGetRaw, outFee)
1428+ let totalGet = $t04832048375._1
1429+ let feeAmount = $t04832048375._2
14301430 $Tuple2(nil, $Tuple2(totalGet, feeAmount))
14311431 }
14321432
14391439 let lpId = toBase58String(value(cfgLpAssetId))
14401440 let amBalance = getAccBalance(amId)
14411441 let prBalance = getAccBalance(prId)
1442- let $t04873848853 = {
1442+ let $t04875048865 = {
14431443 let @ = invoke(this, "getOneTknV2READONLY", [outAssetId, lpAssetAmount], nil)
14441444 if ($isInstanceOf(@, "(Int, Int)"))
14451445 then @
14461446 else throw(($getType(@) + " couldn't be cast to (Int, Int)"))
14471447 }
1448- let totalGet = $t04873848853._1
1449- let feeAmount = $t04873848853._2
1448+ let totalGet = $t04875048865._1
1449+ let feeAmount = $t04875048865._2
14501450 let r = ego("", lpId, lpAssetAmount, this)
14511451 let outAmAmt = r._1
14521452 let outPrAmt = r._2
14801480 let burnLPAssetOnFactory = invoke(fca, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
14811481 if ((burnLPAssetOnFactory == burnLPAssetOnFactory))
14821482 then {
1483- let $t04993350014 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1484- let refreshDLpActions = $t04993350014._1
1485- let updatedDLp = $t04993350014._2
1483+ let $t04994550026 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1484+ let refreshDLpActions = $t04994550026._1
1485+ let updatedDLp = $t04994550026._2
14861486 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
14871487 if ((isUpdatedDLpValid == isUpdatedDLpValid))
14881488 then (state ++ refreshDLpActions)
15271527 let burnA = invoke(fca, "burn", [amount], [AttachedPayment(lpAssetId, amount)])
15281528 if ((burnA == burnA))
15291529 then {
1530- let $t05104551126 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1531- let refreshDLpActions = $t05104551126._1
1532- let updatedDLp = $t05104551126._2
1530+ let $t05105751138 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1531+ let refreshDLpActions = $t05105751138._1
1532+ let updatedDLp = $t05105751138._2
15331533 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
15341534 if ((isUpdatedDLpValid == isUpdatedDLpValid))
15351535 then (state ++ refreshDLpActions)
15801580 let burnLPAssetOnFactory = invoke(fca, "burn", [unstakeAmount], [AttachedPayment(cfgLpAssetId, unstakeAmount)])
15811581 if ((burnLPAssetOnFactory == burnLPAssetOnFactory))
15821582 then {
1583- let $t05237752458 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1584- let refreshDLpActions = $t05237752458._1
1585- let updatedDLp = $t05237752458._2
1583+ let $t05238952470 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1584+ let refreshDLpActions = $t05238952470._1
1585+ let updatedDLp = $t05238952470._2
15861586 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
15871587 if ((isUpdatedDLpValid == isUpdatedDLpValid))
15881588 then (state ++ refreshDLpActions)
16311631 let unstakeInv = invoke(staking, "unstakeINTERNAL", [lpAssetId, unstakeAmount, userAddress.bytes, lpAssetRecipientAddress.bytes], nil)
16321632 if ((unstakeInv == unstakeInv))
16331633 then {
1634- let $t05348053668 = getOneTknV2Internal(outAssetId, minOutAmount, [AttachedPayment(lpAssetId, unstakeAmount)], i.caller, i.originCaller, i.transactionId)
1635- let state = $t05348053668._1
1636- let totalAmount = $t05348053668._2
1634+ let $t05349253680 = getOneTknV2Internal(outAssetId, minOutAmount, [AttachedPayment(lpAssetId, unstakeAmount)], i.caller, i.originCaller, i.transactionId)
1635+ let state = $t05349253680._1
1636+ let totalAmount = $t05349253680._2
16371637 $Tuple2(state, totalAmount)
16381638 }
16391639 else throw("Strict value is not equal to itself.")
16451645
16461646 @Callable(i)
16471647 func putOneTknV2WithBonusREADONLY (paymentAmountRaw,paymentAssetId) = {
1648- let $t05379653899 = calcPutOneTkn(paymentAmountRaw, paymentAssetId, "", "", true)
1649- let lpAmount = $t05379653899._1
1650- let state = $t05379653899._2
1651- let feeAmount = $t05379653899._3
1652- let bonus = $t05379653899._4
1648+ let $t05380853911 = calcPutOneTkn(paymentAmountRaw, paymentAssetId, "", "", true)
1649+ let lpAmount = $t05380853911._1
1650+ let state = $t05380853911._2
1651+ let feeAmount = $t05380853911._3
1652+ let bonus = $t05380853911._4
16531653 $Tuple2(nil, $Tuple3(lpAmount, feeAmount, bonus))
16541654 }
16551655
16571657
16581658 @Callable(i)
16591659 func putOneTknV2WithoutTakeFeeREADONLY (paymentAmountRaw,paymentAssetId) = {
1660- let $t05404754151 = calcPutOneTkn(paymentAmountRaw, paymentAssetId, "", "", false)
1661- let lpAmount = $t05404754151._1
1662- let state = $t05404754151._2
1663- let feeAmount = $t05404754151._3
1664- let bonus = $t05404754151._4
1660+ let $t05405954163 = calcPutOneTkn(paymentAmountRaw, paymentAssetId, "", "", false)
1661+ let lpAmount = $t05405954163._1
1662+ let state = $t05405954163._2
1663+ let feeAmount = $t05405954163._3
1664+ let bonus = $t05405954163._4
16651665 $Tuple2(nil, $Tuple3(lpAmount, feeAmount, bonus))
16661666 }
16671667
17371737 @Callable(i)
17381738 func changeAmp () = {
17391739 let cfg = invoke(fca, "getChangeAmpConfigREADONLY", [toString(this)], nil)
1740- let $t05681857051 = match cfg {
1740+ let $t05683057063 = match cfg {
17411741 case str: String =>
17421742 let list = split(str, SEP)
17431743 $Tuple3(parseIntValue(list[0]), parseIntValue(list[1]), parseIntValue(list[2]))
17441744 case _ =>
17451745 throw("invalid entry type")
17461746 }
1747- let delay = $t05681857051._1
1748- let delta = $t05681857051._2
1749- let target = $t05681857051._3
1747+ let delay = $t05683057063._1
1748+ let delta = $t05683057063._2
1749+ let target = $t05683057063._3
17501750 let curAmp = parseIntValue(getStringValue(amp()))
17511751 let newAmpRaw = (curAmp + delta)
17521752 let newAmp = if ((0 > delta))
17601760 then {
17611761 let lastCall = valueOrElse(getInteger(keyChangeAmpLastCall()), 0)
17621762 let wait = (lastCall + delay)
1763- let checks = [if ((1000000000 > wait))
1763+ let checks = [if ((height > wait))
17641764 then true
17651765 else throwErr("try again in few blocks"), if ((curAmp != newAmp))
17661766 then true
17671767 else throwErr("already reached target")]
17681768 if ((checks == checks))
1769- then [IntegerEntry(keyChangeAmpLastCall(), an), StringEntry(amp(), toString(newAmp)), StringEntry(keyAmpHistory(an), toString(newAmp))]
1769+ then [IntegerEntry(keyChangeAmpLastCall(), height), StringEntry(amp(), toString(newAmp)), StringEntry(keyAmpHistory(height), toString(newAmp))]
17701770 else throw("Strict value is not equal to itself.")
17711771 }
17721772 else throw("Strict value is not equal to itself.")
17861786 match tx {
17871787 case order: Order =>
17881788 let matcherPub = mp()
1789- let $t05797058087 = if (skipOrderValidation())
1789+ let $t05797858095 = if (skipOrderValidation())
17901790 then $Tuple2(true, "")
17911791 else validateMatcherOrderAllowed(order)
1792- let orderValid = $t05797058087._1
1793- let orderValidInfo = $t05797058087._2
1792+ let orderValid = $t05797858095._1
1793+ let orderValidInfo = $t05797858095._2
17941794 let senderValid = sigVerify(order.bodyBytes, order.proofs[0], order.senderPublicKey)
17951795 let matcherValid = sigVerify(order.bodyBytes, order.proofs[1], matcherPub)
17961796 if (if (if (orderValid)
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let scale8 = 100000000
55
66 let scale8BigInt = toBigInt(100000000)
77
88 let scale18 = toBigInt(1000000000000000000)
99
1010 let zeroBigInt = toBigInt(0)
1111
1212 let big0 = toBigInt(0)
1313
1414 let big1 = toBigInt(1)
1515
1616 let big2 = toBigInt(2)
1717
1818 let big3 = toBigInt(3)
1919
2020 let big4 = toBigInt(4)
2121
2222 let slippage4D = toBigInt((scale8 - ((scale8 * 1) / scale8)))
2323
2424 let wavesString = "WAVES"
2525
2626 let Amult = "100"
2727
2828 let Dconv = "1"
2929
3030 let SEP = "__"
3131
3232 let EMPTY = ""
3333
3434 let PoolActive = 1
3535
3636 let PoolPutDis = 2
3737
3838 let PoolMatcherDis = 3
3939
4040 let PoolShutdown = 4
4141
4242 let idxPoolAddress = 1
4343
4444 let idxPoolSt = 2
4545
4646 let idxLPAsId = 3
4747
4848 let idxAmAsId = 4
4949
5050 let idxPrAsId = 5
5151
5252 let idxAmtAsDcm = 6
5353
5454 let idxPriceAsDcm = 7
5555
5656 let idxIAmtAsId = 8
5757
5858 let idxIPriceAsId = 9
5959
6060 let idxFactStakCntr = 1
6161
6262 let idxFactoryRestCntr = 6
6363
6464 let idxFactSlippCntr = 7
6565
6666 let idxFactGwxRewCntr = 10
6767
6868 let feeDefault = fraction(10, scale8, 10000)
6969
7070 func t1 (origVal,origScaleMult) = fraction(toBigInt(origVal), scale18, toBigInt(origScaleMult))
7171
7272
7373 func t1BigInt (origVal,origScaleMult) = fraction(origVal, scale18, origScaleMult)
7474
7575
7676 func f1 (val,resultScaleMult) = toInt(fraction(val, toBigInt(resultScaleMult), scale18))
7777
7878
7979 func fromX18Round (val,resultScaleMult,round) = toInt(fraction(val, toBigInt(resultScaleMult), scale18, round))
8080
8181
8282 func t2 (origVal,origScaleMult) = fraction(origVal, scale18, toBigInt(origScaleMult))
8383
8484
8585 func f2 (val,resultScaleMult) = fraction(val, toBigInt(resultScaleMult), scale18)
8686
8787
8888 func ts (amt,resScale,curScale) = fraction(amt, resScale, curScale)
8989
9090
9191 func abs (val) = if ((zeroBigInt > val))
9292 then -(val)
9393 else val
9494
9595
9696 func absBigInt (val) = if ((zeroBigInt > val))
9797 then -(val)
9898 else val
9999
100100
101101 func fc () = "%s__factoryContract"
102102
103103
104104 func mpk () = "%s__managerPublicKey"
105105
106106
107107 func pmpk () = "%s__pendingManagerPublicKey"
108108
109109
110110 func pl () = "%s%s__price__last"
111111
112112
113113 func ph (h,t) = makeString(["%s%s%d%d__price__history", toString(h), toString(t)], SEP)
114114
115115
116116 func pau (ua,txId) = ((("%s%s%s__P__" + ua) + "__") + txId)
117117
118118
119119 func gau (ua,txId) = ((("%s%s%s__G__" + ua) + "__") + txId)
120120
121121
122122 func aa () = "%s__amountAsset"
123123
124124
125125 func pa () = "%s__priceAsset"
126126
127127
128128 func amp () = "%s__amp"
129129
130130
131-func keyAmpHistory (height) = ("%s%d__amp__" + toString(height))
131+func keyAmpHistory (heightBlocks) = ("%s%d__amp__" + toString(heightBlocks))
132132
133133
134134 func ada () = "%s__addonAddr"
135135
136136
137137 func keyChangeAmpLastCall () = "%s__changeAmpLastCall"
138138
139139
140140 let keyFee = "%s__fee"
141141
142142 let fee = valueOrElse(getInteger(this, keyFee), feeDefault)
143143
144144 let keyDLp = makeString(["%s", "dLp"], SEP)
145145
146146 let keyDLpRefreshedHeight = makeString(["%s", "dLpRefreshedHeight"], SEP)
147147
148148 let keyDLpRefreshDelay = makeString(["%s", "refreshDLpDelay"], SEP)
149149
150150 let dLpRefreshDelayDefault = 30
151151
152152 let dLpRefreshDelay = valueOrElse(getInteger(this, keyDLpRefreshDelay), dLpRefreshDelayDefault)
153153
154154 func fcfg () = "%s__factoryConfig"
155155
156156
157157 func mtpk () = "%s%s__matcher__publicKey"
158158
159159
160160 func pc (iAmtAs,iPrAs) = (((("%d%d%s__" + iAmtAs) + "__") + iPrAs) + "__config")
161161
162162
163163 func mba (bAStr) = ("%s%s%s__mappings__baseAsset2internalId__" + bAStr)
164164
165165
166166 func aps () = "%s__shutdown"
167167
168168
169169 func keyAllowedLpStableScriptHash () = "%s__allowedLpStableScriptHash"
170170
171171
172172 func keyFeeCollectorAddress () = "%s__feeCollectorAddress"
173173
174174
175175 func keySkipOrderValidation (poolAddress) = ("%s%s__skipOrderValidation__" + poolAddress)
176176
177177
178178 func throwOrderError (orderValid,orderValidInfo,senderValid,matcherValid) = throw((((((((("order validation failed: orderValid=" + toString(orderValid)) + " (") + orderValidInfo) + ")") + " senderValid=") + toString(senderValid)) + " matcherValid=") + toString(matcherValid)))
179179
180180
181181 func strf (addr,key) = valueOrErrorMessage(getString(addr, key), makeString(["mandatory ", toString(addr), ".", key, " not defined"], ""))
182182
183183
184184 func intf (addr,key) = valueOrErrorMessage(getInteger(addr, key), makeString(["mandatory ", toString(addr), ".", key, " not defined"], ""))
185185
186186
187187 func throwErr (msg) = throw(makeString(["lp_stable.ride:", msg], " "))
188188
189189
190190 func fmtErr (msg) = makeString(["lp_stable.ride:", msg], " ")
191191
192192
193193 let fca = addressFromStringValue(strf(this, fc()))
194194
195195 let inFee = {
196196 let @ = invoke(fca, "getInFeeREADONLY", [toString(this)], nil)
197197 if ($isInstanceOf(@, "Int"))
198198 then @
199199 else throw(($getType(@) + " couldn't be cast to Int"))
200200 }
201201
202202 let outFee = {
203203 let @ = invoke(fca, "getOutFeeREADONLY", [toString(this)], nil)
204204 if ($isInstanceOf(@, "Int"))
205205 then @
206206 else throw(($getType(@) + " couldn't be cast to Int"))
207207 }
208208
209209 let A = strf(this, amp())
210210
211211 func igs () = valueOrElse(getBoolean(fca, aps()), false)
212212
213213
214214 func mp () = fromBase58String(strf(fca, mtpk()))
215215
216216
217217 let feeCollectorAddress = addressFromStringValue(strf(fca, keyFeeCollectorAddress()))
218218
219219 func gpc () = {
220220 let amtAs = strf(this, aa())
221221 let priceAs = strf(this, pa())
222222 let iPriceAs = intf(fca, mba(priceAs))
223223 let iAmtAs = intf(fca, mba(amtAs))
224224 split(strf(fca, pc(toString(iAmtAs), toString(iPriceAs))), SEP)
225225 }
226226
227227
228228 func parseAssetId (input) = if ((input == wavesString))
229229 then unit
230230 else fromBase58String(input)
231231
232232
233233 func assetIdToString (input) = if ((input == unit))
234234 then wavesString
235235 else toBase58String(value(input))
236236
237237
238238 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]))
239239
240240
241241 let poolConfigParsed = parsePoolConfig(gpc())
242242
243-let $t081818392 = poolConfigParsed
243+let $t081938404 = poolConfigParsed
244244
245-let cfgPoolAddress = $t081818392._1
245+let cfgPoolAddress = $t081938404._1
246246
247-let cfgPoolStatus = $t081818392._2
247+let cfgPoolStatus = $t081938404._2
248248
249-let cfgLpAssetId = $t081818392._3
249+let cfgLpAssetId = $t081938404._3
250250
251-let cfgAmountAssetId = $t081818392._4
251+let cfgAmountAssetId = $t081938404._4
252252
253-let cfgPriceAssetId = $t081818392._5
253+let cfgPriceAssetId = $t081938404._5
254254
255-let cfgAmountAssetDecimals = $t081818392._6
255+let cfgAmountAssetDecimals = $t081938404._6
256256
257-let cfgPriceAssetDecimals = $t081818392._7
257+let cfgPriceAssetDecimals = $t081938404._7
258258
259-let cfgInAmountAssedId = $t081818392._8
259+let cfgInAmountAssedId = $t081938404._8
260260
261-let cfgInPriceAssetId = $t081818392._9
261+let cfgInPriceAssetId = $t081938404._9
262262
263263 func gfc () = split(strf(fca, fcfg()), SEP)
264264
265265
266266 let factoryConfig = gfc()
267267
268268 let stakingContract = valueOrErrorMessage(addressFromString(factoryConfig[idxFactStakCntr]), "Invalid staking contract address")
269269
270270 let slipageContract = valueOrErrorMessage(addressFromString(factoryConfig[idxFactSlippCntr]), "Invalid slipage contract address")
271271
272272 let gwxContract = valueOrErrorMessage(addressFromString(factoryConfig[idxFactGwxRewCntr]), "Invalid gwx contract address")
273273
274274 let restContract = valueOrErrorMessage(addressFromString(factoryConfig[idxFactoryRestCntr]), "Invalid gwx contract address")
275275
276276 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)
277277
278278
279279 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)
280280
281281
282282 func getAccBalance (assetId) = if ((assetId == "WAVES"))
283283 then wavesBalance(this).available
284284 else assetBalance(this, fromBase58String(assetId))
285285
286286
287287 func cpbi (prAmtX18,amAmtX18) = fraction(prAmtX18, scale18, amAmtX18)
288288
289289
290290 func cpbir (prAmtX18,amAmtX18,round) = fraction(prAmtX18, scale18, amAmtX18, round)
291291
292292
293293 func vad (A1,A2,slippage) = {
294294 let diff = fraction((A1 - A2), scale8BigInt, A2)
295295 let pass = ((slippage - abs(diff)) > zeroBigInt)
296296 if (!(pass))
297297 then throw(("Big slpg: " + toString(diff)))
298298 else $Tuple2(pass, min([A1, A2]))
299299 }
300300
301301
302302 func vd (D1,D0,slpg) = {
303303 let diff = fraction(D0, scale8BigInt, D1)
304304 let fail = (slpg > diff)
305305 if (if (fail)
306306 then true
307307 else (D0 > D1))
308308 then throw(((((((toString(D0) + " ") + toString(D1)) + " ") + toString(diff)) + " ") + toString(slpg)))
309309 else fail
310310 }
311311
312312
313313 func pcp (amAssetDcm,prAssetDcm,amAmt,prAmt) = {
314314 let amtAsAmtX18 = t1(amAmt, amAssetDcm)
315315 let prAsAmtX18 = t1(prAmt, prAssetDcm)
316316 cpbi(prAsAmtX18, amtAsAmtX18)
317317 }
318318
319319
320320 func calcPrices (amAmt,prAmt,lpAmt) = {
321321 let amtAsDcm = cfgAmountAssetDecimals
322322 let prAsDcm = cfgPriceAssetDecimals
323323 let priceX18 = pcp(amtAsDcm, prAsDcm, amAmt, prAmt)
324324 let amAmtX18 = t1(amAmt, amtAsDcm)
325325 let prAmtX18 = t1(prAmt, prAsDcm)
326326 let lpAmtX18 = t1(lpAmt, scale8)
327327 let lpPrInAmAsX18 = cpbi(amAmtX18, lpAmtX18)
328328 let lpPrInPrAsX18 = cpbi(prAmtX18, lpAmtX18)
329329 [priceX18, lpPrInAmAsX18, lpPrInPrAsX18]
330330 }
331331
332332
333333 func calculatePrices (amAmt,prAmt,lpAmt) = {
334334 let p = calcPrices(amAmt, prAmt, lpAmt)
335335 [f1(p[0], scale8), f1(p[1], scale8), f1(p[2], scale8)]
336336 }
337337
338338
339339 func takeFee (amount,fee) = {
340340 let feeAmount = if ((fee == 0))
341341 then 0
342342 else fraction(amount, fee, scale8)
343343 $Tuple2((amount - feeAmount), feeAmount)
344344 }
345345
346346
347347 func getD (xp) = {
348348 let xp0 = xp[0]
349349 let xp1 = xp[1]
350350 let s = (xp0 + xp1)
351351 if ((s == big0))
352352 then big0
353353 else {
354354 let a = parseIntValue(A)
355355 let ann = (a * 2)
356356 let p = fraction(xp0, xp1, big1)
357357 let xp0_xp1_n_n = fraction(p, big4, big1)
358358 let ann_s = fraction(toBigInt(ann), s, big1)
359359 let ann_1 = toBigInt((ann - 1))
360360 func calcDNext (d) = {
361361 let dd = fraction(d, d, big1)
362362 let ddd = fraction(dd, d, big1)
363363 let dp = fraction(ddd, big1, xp0_xp1_n_n)
364364 fraction((ann_s + fraction(dp, big2, big1)), d, (fraction(ann_1, d, big1) + fraction(big3, dp, big1)))
365365 }
366366
367367 func calc (acc,i) = if (acc._2)
368368 then acc
369369 else {
370370 let d = acc._1
371371 let dNext = calcDNext(d)
372372 let dDiffRaw = (dNext - value(d))
373373 let dDiff = if ((big0 > dDiffRaw))
374374 then -(dDiffRaw)
375375 else dDiffRaw
376376 if ((big1 >= dDiff))
377377 then $Tuple2(dNext, true)
378378 else $Tuple2(dNext, false)
379379 }
380380
381381 let arr = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16]
382- let $t01287912927 = {
382+ let $t01289112939 = {
383383 let $l = arr
384384 let $s = size($l)
385385 let $acc0 = $Tuple2(s, false)
386386 func $f0_1 ($a,$i) = if (($i >= $s))
387387 then $a
388388 else calc($a, $l[$i])
389389
390390 func $f0_2 ($a,$i) = if (($i >= $s))
391391 then $a
392392 else throw("List size exceeds 17")
393393
394394 $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)
395395 }
396- let d = $t01287912927._1
397- let found = $t01287912927._2
396+ let d = $t01289112939._1
397+ let found = $t01289112939._2
398398 if (found)
399399 then d
400400 else throw(("D calculation error, D = " + toString(d)))
401401 }
402402 }
403403
404404
405405 func ego (txId58,pmtAssetId,pmtLpAmt,userAddress) = {
406406 let lpId = cfgLpAssetId
407407 let amId = toBase58String(value(cfgAmountAssetId))
408408 let prId = toBase58String(value(cfgPriceAssetId))
409409 let amDcm = cfgAmountAssetDecimals
410410 let prDcm = cfgPriceAssetDecimals
411411 let sts = toString(cfgPoolStatus)
412412 let lpEmiss = valueOrErrorMessage(assetInfo(lpId), "Wrong LP id").quantity
413413 if ((toBase58String(lpId) != pmtAssetId))
414414 then throw("Wrong pmt asset")
415415 else {
416416 let amBalance = getAccBalance(amId)
417417 let amBalanceX18 = t1(amBalance, amDcm)
418418 let prBalance = getAccBalance(prId)
419419 let prBalanceX18 = t1(prBalance, prDcm)
420420 let curPriceX18 = cpbi(prBalanceX18, amBalanceX18)
421421 let curPrice = f1(curPriceX18, scale8)
422422 let pmtLpAmtX18 = t1(pmtLpAmt, scale8)
423423 let lpEmissX18 = t1(lpEmiss, scale8)
424424 let outAmAmtX18 = fraction(amBalanceX18, pmtLpAmtX18, lpEmissX18)
425425 let outPrAmtX18 = fraction(prBalanceX18, pmtLpAmtX18, lpEmissX18)
426426 let outAmAmt = fromX18Round(outAmAmtX18, amDcm, FLOOR)
427427 let outPrAmt = fromX18Round(outPrAmtX18, prDcm, FLOOR)
428428 let state = if ((txId58 == ""))
429429 then nil
430430 else [ScriptTransfer(userAddress, outAmAmt, if ((amId == "WAVES"))
431431 then unit
432432 else fromBase58String(amId)), ScriptTransfer(userAddress, outPrAmt, if ((prId == "WAVES"))
433433 then unit
434- else fromBase58String(prId)), StringEntry(gau(toString(userAddress), txId58), dataGetActionInfo(outAmAmt, outPrAmt, pmtLpAmt, curPrice, an, lastBlock.timestamp)), IntegerEntry(pl(), curPrice), IntegerEntry(ph(an, lastBlock.timestamp), curPrice)]
434+ 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)]
435435 $Tuple10(outAmAmt, outPrAmt, amId, prId, amBalance, prBalance, lpEmiss, curPriceX18, sts, state)
436436 }
437437 }
438438
439439
440440 func epo (txId58,slippage,inAmAmt,inAmId,inPrAmt,inPrId,userAddress,isEval,emitLp,isOneAsset,validateSlippage,pmtAmt,pmtId) = {
441441 let lpId = cfgLpAssetId
442442 let amIdStr = toBase58String(value(cfgAmountAssetId))
443443 let prIdStr = toBase58String(value(cfgPriceAssetId))
444444 let inAmIdStr = cfgInAmountAssedId
445445 let inPrIdStr = cfgInPriceAssetId
446446 let amtDcm = cfgAmountAssetDecimals
447447 let priceDcm = cfgPriceAssetDecimals
448448 let sts = toString(cfgPoolStatus)
449449 let lpEm = valueOrErrorMessage(assetInfo(lpId), "Wr lp as").quantity
450450 let amBalance = if (isEval)
451451 then getAccBalance(amIdStr)
452452 else if (if (isOneAsset)
453453 then (pmtId == amIdStr)
454454 else false)
455455 then (getAccBalance(amIdStr) - pmtAmt)
456456 else if (isOneAsset)
457457 then getAccBalance(amIdStr)
458458 else (getAccBalance(amIdStr) - inAmAmt)
459459 let prBalance = if (isEval)
460460 then getAccBalance(prIdStr)
461461 else if (if (isOneAsset)
462462 then (pmtId == prIdStr)
463463 else false)
464464 then (getAccBalance(prIdStr) - pmtAmt)
465465 else if (isOneAsset)
466466 then getAccBalance(prIdStr)
467467 else (getAccBalance(prIdStr) - inPrAmt)
468468 let inAmAssetAmtX18 = t1(inAmAmt, amtDcm)
469469 let inPrAssetAmtX18 = t1(inPrAmt, priceDcm)
470470 let userPriceX18 = cpbi(inPrAssetAmtX18, inAmAssetAmtX18)
471471 let amBalanceX18 = t1(amBalance, amtDcm)
472472 let prBalanceX18 = t1(prBalance, priceDcm)
473473 let D0 = getD([amBalanceX18, prBalanceX18])
474474 let r = if ((lpEm == 0))
475475 then {
476476 let D1 = getD([(amBalanceX18 + inAmAssetAmtX18), (prBalanceX18 + inPrAssetAmtX18)])
477477 let checkD = if ((D1 > D0))
478478 then true
479479 else throw("D1 should be greater than D0")
480480 if ((checkD == checkD))
481481 then {
482482 let curPriceX18 = zeroBigInt
483483 let slippageX18 = zeroBigInt
484484 let lpAmtX18 = D1
485485 $Tuple5(f1(lpAmtX18, scale8), f1(inAmAssetAmtX18, amtDcm), f1(inPrAssetAmtX18, priceDcm), cpbi((prBalanceX18 + inPrAssetAmtX18), (amBalanceX18 + inAmAssetAmtX18)), slippageX18)
486486 }
487487 else throw("Strict value is not equal to itself.")
488488 }
489489 else {
490490 let curPriceX18 = cpbi(prBalanceX18, amBalanceX18)
491491 let slippageRealX18 = fraction(abs((curPriceX18 - userPriceX18)), scale18, curPriceX18)
492492 let slippageX18 = t1(slippage, scale8)
493493 if (if (if (validateSlippage)
494494 then (curPriceX18 != zeroBigInt)
495495 else false)
496496 then (slippageRealX18 > slippageX18)
497497 else false)
498498 then throw(((("Price slippage " + toString(slippageRealX18)) + " > ") + toString(slippageX18)))
499499 else {
500500 let lpEmissionX18 = t1(lpEm, scale8)
501501 let prViaAmX18 = fraction(inAmAssetAmtX18, cpbir(prBalanceX18, amBalanceX18, CEILING), scale18, CEILING)
502502 let amViaPrX18 = fraction(inPrAssetAmtX18, scale18, cpbir(prBalanceX18, amBalanceX18, FLOOR), CEILING)
503503 let expectedAmts = if ((prViaAmX18 > inPrAssetAmtX18))
504504 then $Tuple2(amViaPrX18, inPrAssetAmtX18)
505505 else $Tuple2(inAmAssetAmtX18, prViaAmX18)
506506 let expAmtAssetAmtX18 = expectedAmts._1
507507 let expPriceAssetAmtX18 = expectedAmts._2
508508 let D1 = getD([(amBalanceX18 + expAmtAssetAmtX18), (prBalanceX18 + expPriceAssetAmtX18)])
509509 let checkD = if ((D1 > D0))
510510 then true
511511 else throw("D1 should be greater than D0")
512512 if ((checkD == checkD))
513513 then {
514514 let lpAmtX18 = fraction(lpEmissionX18, (D1 - D0), D0)
515515 $Tuple5(fromX18Round(lpAmtX18, scale8, FLOOR), fromX18Round(expAmtAssetAmtX18, amtDcm, CEILING), fromX18Round(expPriceAssetAmtX18, priceDcm, CEILING), curPriceX18, slippageX18)
516516 }
517517 else throw("Strict value is not equal to itself.")
518518 }
519519 }
520520 let calcLpAmt = r._1
521521 let calcAmAssetPmt = r._2
522522 let calcPrAssetPmt = r._3
523523 let curPrice = f1(r._4, scale8)
524524 let slippageCalc = f1(r._5, scale8)
525525 if ((0 >= calcLpAmt))
526526 then throw("LP <= 0")
527527 else {
528528 let emitLpAmt = if (!(emitLp))
529529 then 0
530530 else calcLpAmt
531531 let amDiff = (inAmAmt - calcAmAssetPmt)
532532 let prDiff = (inPrAmt - calcPrAssetPmt)
533- let $t01991220105 = if (if (isOneAsset)
533+ let $t01992420117 = if (if (isOneAsset)
534534 then (pmtId == amIdStr)
535535 else false)
536536 then $Tuple2(pmtAmt, 0)
537537 else if (if (isOneAsset)
538538 then (pmtId == prIdStr)
539539 else false)
540540 then $Tuple2(0, pmtAmt)
541541 else $Tuple2(calcAmAssetPmt, calcPrAssetPmt)
542- let writeAmAmt = $t01991220105._1
543- let writePrAmt = $t01991220105._2
544- let commonState = [IntegerEntry(pl(), curPrice), IntegerEntry(ph(an, lastBlock.timestamp), curPrice), StringEntry(pau(userAddress, txId58), dataPutActionInfo(writeAmAmt, writePrAmt, emitLpAmt, curPrice, slippage, slippageCalc, an, lastBlock.timestamp, amDiff, prDiff))]
542+ let writeAmAmt = $t01992420117._1
543+ let writePrAmt = $t01992420117._2
544+ 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))]
545545 $Tuple13(calcLpAmt, emitLpAmt, curPrice, amBalance, prBalance, lpEm, lpId, sts, commonState, amDiff, prDiff, inAmId, inPrId)
546546 }
547547 }
548548
549549
550550 func getYD (xp,i,D) = {
551551 let n = big2
552552 let x = xp[if ((i == 0))
553553 then 1
554554 else 0]
555555 let aPrecision = parseBigIntValue(Amult)
556556 let a = (parseBigIntValue(A) * aPrecision)
557557 let s = x
558558 let ann = (a * n)
559559 let c = (((((D * D) / (x * n)) * D) * aPrecision) / (ann * n))
560560 let b = ((s + ((D * aPrecision) / ann)) - D)
561561 func calc (acc,cur) = {
562- let $t02129621316 = acc
563- let y = $t02129621316._1
564- let found = $t02129621316._2
562+ let $t02130821328 = acc
563+ let y = $t02130821328._1
564+ let found = $t02130821328._2
565565 if ((found != unit))
566566 then acc
567567 else {
568568 let yNext = (((y * y) + c) / ((big2 * y) + b))
569569 let yDiff = absBigInt((yNext - value(y)))
570570 if ((big1 >= yDiff))
571571 then $Tuple2(yNext, cur)
572572 else $Tuple2(yNext, unit)
573573 }
574574 }
575575
576576 let arr = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
577- let $t02162321670 = {
577+ let $t02163521682 = {
578578 let $l = arr
579579 let $s = size($l)
580580 let $acc0 = $Tuple2(D, unit)
581581 func $f0_1 ($a,$i) = if (($i >= $s))
582582 then $a
583583 else calc($a, $l[$i])
584584
585585 func $f0_2 ($a,$i) = if (($i >= $s))
586586 then $a
587587 else throw("List size exceeds 15")
588588
589589 $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)
590590 }
591- let y = $t02162321670._1
592- let found = $t02162321670._2
591+ let y = $t02163521682._1
592+ let found = $t02163521682._2
593593 if ((found != unit))
594594 then y
595595 else throw(("Y calculation error, Y = " + toString(y)))
596596 }
597597
598598
599599 func calcDLp (amountBalance,priceBalance,lpEmission) = {
600600 let updatedDLp = fraction(getD([t1BigInt(amountBalance, toBigInt(cfgAmountAssetDecimals)), t1BigInt(priceBalance, toBigInt(cfgPriceAssetDecimals))]), scale18, lpEmission)
601601 if ((lpEmission == big0))
602602 then big0
603603 else updatedDLp
604604 }
605605
606606
607607 func calcCurrentDLp (amountAssetDelta,priceAssetDelta,lpAssetEmissionDelta) = {
608608 let amountAssetBalance = (toBigInt(getAccBalance(assetIdToString(cfgAmountAssetId))) - amountAssetDelta)
609609 let priceAssetBalance = (toBigInt(getAccBalance(assetIdToString(cfgPriceAssetId))) - priceAssetDelta)
610610 let lpAssetEmission = (toBigInt(value(assetInfo(cfgLpAssetId)).quantity) - lpAssetEmissionDelta)
611611 let currentDLp = calcDLp(amountAssetBalance, priceAssetBalance, lpAssetEmission)
612612 currentDLp
613613 }
614614
615615
616616 func refreshDLpInternal (amountAssetBalanceDelta,priceAssetBalanceDelta,lpAssetEmissionDelta) = {
617617 let amountAssetBalance = (getAccBalance(assetIdToString(cfgAmountAssetId)) + amountAssetBalanceDelta)
618618 let priceAssetBalance = (getAccBalance(assetIdToString(cfgPriceAssetId)) + priceAssetBalanceDelta)
619619 let lpAssetEmission = (value(assetInfo(cfgLpAssetId)).quantity + lpAssetEmissionDelta)
620620 let updatedDLp = calcDLp(toBigInt(amountAssetBalance), toBigInt(priceAssetBalance), toBigInt(lpAssetEmission))
621- let actions = [IntegerEntry(keyDLpRefreshedHeight, an), StringEntry(keyDLp, toString(updatedDLp))]
621+ let actions = [IntegerEntry(keyDLpRefreshedHeight, height), StringEntry(keyDLp, toString(updatedDLp))]
622622 $Tuple2(actions, updatedDLp)
623623 }
624624
625625
626626 func validateUpdatedDLp (oldDLp,updatedDLp) = if ((updatedDLp >= oldDLp))
627627 then true
628628 else throwErr("updated DLp lower than current DLp")
629629
630630
631631 func validateMatcherOrderAllowed (order) = {
632632 let amountAssetBalance = getAccBalance(assetIdToString(cfgAmountAssetId))
633633 let priceAssetBalance = getAccBalance(assetIdToString(cfgPriceAssetId))
634634 let amountAssetAmount = order.amount
635635 let priceAssetAmount = fraction(order.amount, order.price, scale8, FLOOR)
636- let $t02386824080 = if ((order.orderType == Buy))
636+ let $t02388024092 = if ((order.orderType == Buy))
637637 then $Tuple2(amountAssetAmount, -(priceAssetAmount))
638638 else $Tuple2(-(amountAssetAmount), priceAssetAmount)
639- let amountAssetBalanceDelta = $t02386824080._1
640- let priceAssetBalanceDelta = $t02386824080._2
639+ let amountAssetBalanceDelta = $t02388024092._1
640+ let priceAssetBalanceDelta = $t02388024092._2
641641 if (if (if (igs())
642642 then true
643643 else (cfgPoolStatus == PoolMatcherDis))
644644 then true
645645 else (cfgPoolStatus == PoolShutdown))
646646 then throw("Admin blocked")
647647 else if (if ((order.assetPair.amountAsset != cfgAmountAssetId))
648648 then true
649649 else (order.assetPair.priceAsset != cfgPriceAssetId))
650650 then throw("Wr assets")
651651 else {
652652 let dLp = parseBigIntValue(valueOrElse(getString(this, keyDLp), "0"))
653- let $t02442624526 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
654- let unusedActions = $t02442624526._1
655- let dLpNew = $t02442624526._2
653+ let $t02443824538 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
654+ let unusedActions = $t02443824538._1
655+ let dLpNew = $t02443824538._2
656656 let isOrderValid = (dLpNew >= dLp)
657- let info = makeString(["dLp=", toString(dLp), " dLpNew=", toString(dLpNew), " amountAssetBalance=", toString(amountAssetBalance), " priceAssetBalance=", toString(priceAssetBalance), " amountAssetBalanceDelta=", toString(amountAssetBalanceDelta), " priceAssetBalanceDelta=", toString(priceAssetBalanceDelta), " height=", toString(an)], "")
657+ let info = makeString(["dLp=", toString(dLp), " dLpNew=", toString(dLpNew), " amountAssetBalance=", toString(amountAssetBalance), " priceAssetBalance=", toString(priceAssetBalance), " amountAssetBalanceDelta=", toString(amountAssetBalanceDelta), " priceAssetBalanceDelta=", toString(priceAssetBalanceDelta), " height=", toString(height)], "")
658658 $Tuple2(isOrderValid, info)
659659 }
660660 }
661661
662662
663663 func cg (i) = if ((size(i.payments) != 1))
664664 then throw("1 pmnt exp")
665665 else {
666666 let pmt = value(i.payments[0])
667667 let pmtAssetId = value(pmt.assetId)
668668 let pmtAmt = pmt.amount
669669 let r = ego(toBase58String(i.transactionId), toBase58String(pmtAssetId), pmtAmt, i.caller)
670670 let outAmAmt = r._1
671671 let outPrAmt = r._2
672672 let sts = parseIntValue(r._9)
673673 let state = r._10
674674 if (if (igs())
675675 then true
676676 else (sts == PoolShutdown))
677677 then throw(("Admin blocked: " + toString(sts)))
678678 else $Tuple5(outAmAmt, outPrAmt, pmtAmt, pmtAssetId, state)
679679 }
680680
681681
682682 func cp (caller,txId,amAsPmt,prAsPmt,slippage,emitLp,isOneAsset,validateSlippage,pmtAmt,pmtId) = {
683683 let r = epo(txId, slippage, value(amAsPmt).amount, value(amAsPmt).assetId, value(prAsPmt).amount, value(prAsPmt).assetId, caller, (txId == ""), emitLp, isOneAsset, validateSlippage, pmtAmt, pmtId)
684684 let sts = parseIntValue(r._8)
685685 if (if (if (igs())
686686 then true
687687 else (sts == PoolPutDis))
688688 then true
689689 else (sts == PoolShutdown))
690690 then throw(("Blocked:" + toString(sts)))
691691 else r
692692 }
693693
694694
695695 func calcPutOneTkn (pmtAmtRaw,pmtAssetId,userAddress,txId,withTakeFee) = {
696696 let amId = toBase58String(value(cfgAmountAssetId))
697697 let prId = toBase58String(value(cfgPriceAssetId))
698698 let lpId = cfgLpAssetId
699699 let amtDcm = cfgAmountAssetDecimals
700700 let priceDcm = cfgPriceAssetDecimals
701701 let lpAssetEmission = toBigInt(valueOrErrorMessage(assetInfo(lpId), "invalid lp asset").quantity)
702702 let chechEmission = if ((lpAssetEmission > big0))
703703 then true
704704 else throw("initial deposit requires all coins")
705705 if ((chechEmission == chechEmission))
706706 then {
707707 let amBalance = getAccBalance(amId)
708708 let prBalance = getAccBalance(prId)
709- let $t02687427318 = if ((txId == ""))
709+ let $t02688627330 = if ((txId == ""))
710710 then $Tuple2(amBalance, prBalance)
711711 else if ((pmtAssetId == amId))
712712 then if ((pmtAmtRaw > amBalance))
713713 then throw("invalid payment amount")
714714 else $Tuple2((amBalance - pmtAmtRaw), prBalance)
715715 else if ((pmtAssetId == prId))
716716 then if ((pmtAmtRaw > prBalance))
717717 then throw("invalid payment amount")
718718 else $Tuple2(amBalance, (prBalance - pmtAmtRaw))
719719 else throw("wrong pmtAssetId")
720- let amBalanceOld = $t02687427318._1
721- let prBalanceOld = $t02687427318._2
722- let $t02732227498 = if ((pmtAssetId == amId))
720+ let amBalanceOld = $t02688627330._1
721+ let prBalanceOld = $t02688627330._2
722+ let $t02733427510 = if ((pmtAssetId == amId))
723723 then $Tuple2(pmtAmtRaw, 0)
724724 else if ((pmtAssetId == prId))
725725 then $Tuple2(0, pmtAmtRaw)
726726 else throw("invalid payment")
727- let amAmountRaw = $t02732227498._1
728- let prAmountRaw = $t02732227498._2
729- let $t02750227756 = if (withTakeFee)
727+ let amAmountRaw = $t02733427510._1
728+ let prAmountRaw = $t02733427510._2
729+ let $t02751427768 = if (withTakeFee)
730730 then $Tuple3(takeFee(amAmountRaw, inFee)._1, takeFee(prAmountRaw, inFee)._1, takeFee(pmtAmtRaw, inFee)._2)
731731 else $Tuple3(amAmountRaw, prAmountRaw, 0)
732- let amAmount = $t02750227756._1
733- let prAmount = $t02750227756._2
734- let feeAmount = $t02750227756._3
732+ let amAmount = $t02751427768._1
733+ let prAmount = $t02751427768._2
734+ let feeAmount = $t02751427768._3
735735 let amBalanceNew = (amBalanceOld + amAmount)
736736 let prBalanceNew = (prBalanceOld + prAmount)
737737 let D0 = getD([t1(amBalanceOld, cfgAmountAssetDecimals), t1(prBalanceOld, cfgPriceAssetDecimals)])
738738 let D1 = getD([t1(amBalanceNew, cfgAmountAssetDecimals), t1(prBalanceNew, cfgPriceAssetDecimals)])
739739 let checkD = if ((D1 > D0))
740740 then true
741741 else throw()
742742 if ((checkD == checkD))
743743 then {
744744 let lpAmount = fraction(lpAssetEmission, (D1 - D0), D0, FLOOR)
745745 let curPrice = f1(cpbi(t1(prBalanceNew, priceDcm), t1(amBalanceNew, amtDcm)), scale8)
746- let commonState = [IntegerEntry(pl(), curPrice), IntegerEntry(ph(an, lastBlock.timestamp), curPrice), StringEntry(pau(userAddress, txId), dataPutActionInfo(amAmountRaw, prAmountRaw, toInt(lpAmount), curPrice, 0, 0, an, lastBlock.timestamp, 0, 0))]
746+ 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))]
747747 let poolProportion = fraction(prBalanceOld, scale8, amBalanceOld)
748748 let amountAssetPart = fraction(pmtAmtRaw, scale8, (poolProportion + scale8))
749749 let priceAssetPart = (pmtAmtRaw - amountAssetPart)
750750 let lpAmtBoth = fraction(lpAssetEmission, toBigInt(priceAssetPart), toBigInt(prBalanceOld))
751751 let bonus = toInt(fraction((lpAmount - lpAmtBoth), scale8BigInt, lpAmtBoth))
752752 $Tuple4(toInt(lpAmount), commonState, feeAmount, bonus)
753753 }
754754 else throw("Strict value is not equal to itself.")
755755 }
756756 else throw("Strict value is not equal to itself.")
757757 }
758758
759759
760760 func getOneTknV2Internal (outAssetId,minOutAmount,payments,caller,originCaller,transactionId) = {
761761 let lpId = toBase58String(value(cfgLpAssetId))
762762 let amId = toBase58String(value(cfgAmountAssetId))
763763 let prId = toBase58String(value(cfgPriceAssetId))
764764 let amDecimals = cfgAmountAssetDecimals
765765 let prDecimals = cfgPriceAssetDecimals
766766 let poolStatus = cfgPoolStatus
767767 let userAddress = if ((caller == restContract))
768768 then originCaller
769769 else caller
770770 let pmt = value(payments[0])
771771 let pmtAssetId = value(pmt.assetId)
772772 let pmtAmt = pmt.amount
773773 let currentDLp = calcCurrentDLp(big0, big0, big0)
774774 if ((currentDLp == currentDLp))
775775 then {
776776 let txId58 = toBase58String(transactionId)
777777 if ((lpId != toBase58String(pmtAssetId)))
778778 then throw("Wrong LP")
779779 else {
780780 let amBalance = getAccBalance(amId)
781781 let prBalance = getAccBalance(prId)
782- let $t02987229983 = {
782+ let $t02988429995 = {
783783 let @ = invoke(this, "getOneTknV2READONLY", [outAssetId, pmtAmt], nil)
784784 if ($isInstanceOf(@, "(Int, Int)"))
785785 then @
786786 else throw(($getType(@) + " couldn't be cast to (Int, Int)"))
787787 }
788- if (($t02987229983 == $t02987229983))
788+ if (($t02988429995 == $t02988429995))
789789 then {
790- let feeAmount = $t02987229983._2
791- let totalGet = $t02987229983._1
790+ let feeAmount = $t02988429995._2
791+ let totalGet = $t02988429995._1
792792 let totalAmount = if (if ((minOutAmount > 0))
793793 then (minOutAmount > totalGet)
794794 else false)
795795 then throwErr(makeString(["amount to receive is less than ", toString(minOutAmount)], ""))
796796 else totalGet
797- let $t03018130500 = if ((outAssetId == amId))
797+ let $t03019330512 = if ((outAssetId == amId))
798798 then $Tuple4(totalAmount, 0, ((amBalance - totalAmount) - feeAmount), prBalance)
799799 else if ((outAssetId == prId))
800800 then $Tuple4(0, totalAmount, amBalance, ((prBalance - totalAmount) - feeAmount))
801801 else throw("invalid out asset id")
802- let outAm = $t03018130500._1
803- let outPr = $t03018130500._2
804- let amBalanceNew = $t03018130500._3
805- let prBalanceNew = $t03018130500._4
802+ let outAm = $t03019330512._1
803+ let outPr = $t03019330512._2
804+ let amBalanceNew = $t03019330512._3
805+ let prBalanceNew = $t03019330512._4
806806 let curPrX18 = cpbi(t1(prBalanceNew, prDecimals), t1(amBalanceNew, amDecimals))
807807 let curPr = f1(curPrX18, scale8)
808808 let outAssetIdOrWaves = if ((outAssetId == "WAVES"))
809809 then unit
810810 else fromBase58String(outAssetId)
811811 let sendFeeToMatcher = if ((feeAmount > 0))
812812 then [ScriptTransfer(feeCollectorAddress, feeAmount, outAssetIdOrWaves)]
813813 else nil
814- let state = ([ScriptTransfer(userAddress, totalAmount, outAssetIdOrWaves), StringEntry(gau(toString(userAddress), txId58), dataGetActionInfo(outAm, outPr, pmtAmt, curPr, an, lastBlock.timestamp)), IntegerEntry(pl(), curPr), IntegerEntry(ph(an, lastBlock.timestamp), curPr)] ++ sendFeeToMatcher)
814+ 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)
815815 if ((state == state))
816816 then {
817817 let burn = invoke(fca, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
818818 if ((burn == burn))
819819 then {
820- let $t03131531673 = {
820+ let $t03132731685 = {
821821 let feeAmountForCalc = if ((this == feeCollectorAddress))
822822 then 0
823823 else feeAmount
824824 let outInAmountAsset = if ((parseAssetId(outAssetId) == cfgAmountAssetId))
825825 then true
826826 else false
827827 if (outInAmountAsset)
828828 then $Tuple2(-((totalGet + feeAmountForCalc)), 0)
829829 else $Tuple2(0, -((totalGet + feeAmountForCalc)))
830830 }
831- let amountAssetBalanceDelta = $t03131531673._1
832- let priceAssetBalanceDelta = $t03131531673._2
833- let $t03167831786 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
834- let refreshDLpActions = $t03167831786._1
835- let updatedDLp = $t03167831786._2
831+ let amountAssetBalanceDelta = $t03132731685._1
832+ let priceAssetBalanceDelta = $t03132731685._2
833+ let $t03169031798 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
834+ let refreshDLpActions = $t03169031798._1
835+ let updatedDLp = $t03169031798._2
836836 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
837837 if ((isUpdatedDLpValid == isUpdatedDLpValid))
838838 then $Tuple2((state ++ refreshDLpActions), totalAmount)
839839 else throw("Strict value is not equal to itself.")
840840 }
841841 else throw("Strict value is not equal to itself.")
842842 }
843843 else throw("Strict value is not equal to itself.")
844844 }
845845 else throw("Strict value is not equal to itself.")
846846 }
847847 }
848848 else throw("Strict value is not equal to itself.")
849849 }
850850
851851
852852 func m () = match getString(mpk()) {
853853 case s: String =>
854854 fromBase58String(s)
855855 case _: Unit =>
856856 unit
857857 case _ =>
858858 throw("Match error")
859859 }
860860
861861
862862 func pm () = match getString(pmpk()) {
863863 case s: String =>
864864 fromBase58String(s)
865865 case _: Unit =>
866866 unit
867867 case _ =>
868868 throw("Match error")
869869 }
870870
871871
872872 let pd = throw("Permission denied")
873873
874874 func isManager (i) = match m() {
875875 case pk: ByteVector =>
876876 (i.callerPublicKey == pk)
877877 case _: Unit =>
878878 (i.caller == this)
879879 case _ =>
880880 throw("Match error")
881881 }
882882
883883
884884 func mm (i) = match m() {
885885 case pk: ByteVector =>
886886 if ((i.callerPublicKey == pk))
887887 then true
888888 else pd
889889 case _: Unit =>
890890 if ((i.caller == this))
891891 then true
892892 else pd
893893 case _ =>
894894 throw("Match error")
895895 }
896896
897897
898898 func getY (isReverse,D,poolAmountInBalance) = {
899899 let poolConfig = gpc()
900900 let amId = poolConfig[idxAmAsId]
901901 let prId = poolConfig[idxPrAsId]
902902 let n = big2
903903 let aPrecision = parseBigIntValue(Amult)
904904 let a = (parseBigIntValue(A) * aPrecision)
905905 let xp = if ((isReverse == false))
906906 then [(toBigInt(getAccBalance(amId)) + poolAmountInBalance), toBigInt(getAccBalance(prId))]
907907 else [(toBigInt(getAccBalance(prId)) + poolAmountInBalance), toBigInt(getAccBalance(amId))]
908908 let x = xp[0]
909909 let s = x
910910 let ann = (a * n)
911911 let c = (((((D * D) / (x * n)) * D) * aPrecision) / (ann * n))
912912 let b = ((s + ((D * aPrecision) / ann)) - D)
913913 func calc (acc,cur) = {
914- let $t03323433254 = acc
915- let y = $t03323433254._1
916- let found = $t03323433254._2
914+ let $t03324633266 = acc
915+ let y = $t03324633266._1
916+ let found = $t03324633266._2
917917 if ((found != unit))
918918 then acc
919919 else {
920920 let yNext = (((y * y) + c) / ((big2 * y) + b))
921921 let yDiff = absBigInt((yNext - value(y)))
922922 if ((big1 >= yDiff))
923923 then $Tuple2(yNext, cur)
924924 else $Tuple2(yNext, unit)
925925 }
926926 }
927927
928928 let arr = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
929- let $t03356133608 = {
929+ let $t03357333620 = {
930930 let $l = arr
931931 let $s = size($l)
932932 let $acc0 = $Tuple2(D, unit)
933933 func $f0_1 ($a,$i) = if (($i >= $s))
934934 then $a
935935 else calc($a, $l[$i])
936936
937937 func $f0_2 ($a,$i) = if (($i >= $s))
938938 then $a
939939 else throw("List size exceeds 15")
940940
941941 $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)
942942 }
943- let y = $t03356133608._1
944- let found = $t03356133608._2
943+ let y = $t03357333620._1
944+ let found = $t03357333620._2
945945 if ((found != unit))
946946 then y
947947 else throw(("Y calculation error, Y = " + toString(y)))
948948 }
949949
950950
951951 func skipOrderValidation () = valueOrElse(getBoolean(fca, keySkipOrderValidation(toString(this))), false)
952952
953953
954954 @Callable(i)
955955 func calculateAmountOutForSwapREADONLY (cleanAmountIn,isReverse,feePoolAmount) = {
956- let $t03394934372 = if ((isReverse == false))
956+ let $t03396134384 = if ((isReverse == false))
957957 then {
958958 let assetOut = strf(this, pa())
959959 let poolAmountInBalance = (toBigInt(getAccBalance(strf(this, aa()))) + toBigInt(cleanAmountIn))
960960 $Tuple2(assetOut, poolAmountInBalance)
961961 }
962962 else {
963963 let assetOut = strf(this, aa())
964964 let poolAmountInBalance = (toBigInt(getAccBalance(strf(this, pa()))) + toBigInt(cleanAmountIn))
965965 $Tuple2(assetOut, poolAmountInBalance)
966966 }
967- let assetOut = $t03394934372._1
968- let poolAmountInBalance = $t03394934372._2
967+ let assetOut = $t03396134384._1
968+ let poolAmountInBalance = $t03396134384._2
969969 let poolConfig = gpc()
970970 let amId = poolConfig[idxAmAsId]
971971 let prId = poolConfig[idxPrAsId]
972972 let xp = [toBigInt(getAccBalance(amId)), toBigInt(getAccBalance(prId))]
973973 let D = getD(xp)
974974 let y = getY(isReverse, D, toBigInt(cleanAmountIn))
975975 let dy = ((toBigInt(getAccBalance(assetOut)) - y) - toBigInt(1))
976976 let totalGetRaw = max([0, toInt(dy)])
977977 let newXp = if ((isReverse == false))
978978 then [((toBigInt(getAccBalance(amId)) + toBigInt(cleanAmountIn)) + toBigInt(feePoolAmount)), (toBigInt(getAccBalance(prId)) - dy)]
979979 else [(toBigInt(getAccBalance(amId)) - dy), ((toBigInt(getAccBalance(prId)) + toBigInt(cleanAmountIn)) + toBigInt(feePoolAmount))]
980980 let newD = getD(newXp)
981981 let checkD = if ((newD >= D))
982982 then true
983983 else throw(makeString(["new D is fewer error", toString(D), toString(newD)], "__"))
984984 if ((checkD == checkD))
985985 then $Tuple2(nil, totalGetRaw)
986986 else throw("Strict value is not equal to itself.")
987987 }
988988
989989
990990
991991 @Callable(i)
992992 func calculateAmountOutForSwapAndSendTokens (cleanAmountIn,isReverse,amountOutMin,addressTo,feePoolAmount) = {
993993 let swapContact = {
994994 let @ = invoke(fca, "getSwapContractREADONLY", nil, nil)
995995 if ($isInstanceOf(@, "String"))
996996 then @
997997 else throw(($getType(@) + " couldn't be cast to String"))
998998 }
999999 let checks = [if ((value(i.payments[0]).amount >= cleanAmountIn))
10001000 then true
10011001 else throwErr("Wrong amount"), if ((i.caller == addressFromStringValue(swapContact)))
10021002 then true
10031003 else throwErr("Permission denied")]
10041004 if ((checks == checks))
10051005 then {
10061006 let pmt = value(i.payments[0])
10071007 let assetIn = assetIdToString(pmt.assetId)
1008- let $t03580136194 = if ((isReverse == false))
1008+ let $t03581336206 = if ((isReverse == false))
10091009 then {
10101010 let assetOut = strf(this, pa())
10111011 let poolAmountInBalance = (getAccBalance(assetIn) - value(i.payments[0]).amount)
10121012 $Tuple2(assetOut, poolAmountInBalance)
10131013 }
10141014 else {
10151015 let assetOut = strf(this, aa())
10161016 let poolAmountInBalance = (getAccBalance(assetIn) - value(i.payments[0]).amount)
10171017 $Tuple2(assetOut, poolAmountInBalance)
10181018 }
1019- let assetOut = $t03580136194._1
1020- let poolAmountInBalance = $t03580136194._2
1019+ let assetOut = $t03581336206._1
1020+ let poolAmountInBalance = $t03581336206._2
10211021 let poolConfig = gpc()
10221022 let amId = poolConfig[idxAmAsId]
10231023 let prId = poolConfig[idxPrAsId]
10241024 let xp = if ((isReverse == false))
10251025 then [(toBigInt(getAccBalance(amId)) - toBigInt(value(i.payments[0]).amount)), toBigInt(getAccBalance(prId))]
10261026 else [toBigInt(getAccBalance(amId)), (toBigInt(getAccBalance(prId)) - toBigInt(value(i.payments[0]).amount))]
10271027 let D = getD(xp)
10281028 let y = getY(isReverse, D, toBigInt(0))
10291029 let dy = ((toBigInt(getAccBalance(assetOut)) - y) - toBigInt(1))
10301030 let totalGetRaw = max([0, toInt(dy)])
10311031 let checkMin = if ((totalGetRaw >= amountOutMin))
10321032 then true
10331033 else throw("Exchange result is fewer coins than expected")
10341034 if ((checkMin == checkMin))
10351035 then {
10361036 let newXp = if ((isReverse == false))
10371037 then [(toBigInt(getAccBalance(amId)) + toBigInt(feePoolAmount)), (toBigInt(getAccBalance(prId)) - dy)]
10381038 else [(toBigInt(getAccBalance(amId)) - dy), (toBigInt(getAccBalance(prId)) + toBigInt(feePoolAmount))]
10391039 let newD = getD(newXp)
10401040 let checkD = if ((newD >= D))
10411041 then true
10421042 else throw("new D is fewer error")
10431043 if ((checkD == checkD))
10441044 then $Tuple2([ScriptTransfer(addressFromStringValue(addressTo), totalGetRaw, parseAssetId(assetOut))], totalGetRaw)
10451045 else throw("Strict value is not equal to itself.")
10461046 }
10471047 else throw("Strict value is not equal to itself.")
10481048 }
10491049 else throw("Strict value is not equal to itself.")
10501050 }
10511051
10521052
10531053
10541054 @Callable(i)
10551055 func constructor (fc) = {
10561056 let c = mm(i)
10571057 if ((c == c))
10581058 then [StringEntry(fc(), fc)]
10591059 else throw("Strict value is not equal to itself.")
10601060 }
10611061
10621062
10631063
10641064 @Callable(i)
10651065 func setManager (pendingManagerPublicKey) = {
10661066 let c = mm(i)
10671067 if ((c == c))
10681068 then {
10691069 let cm = fromBase58String(pendingManagerPublicKey)
10701070 if ((cm == cm))
10711071 then [StringEntry(pmpk(), pendingManagerPublicKey)]
10721072 else throw("Strict value is not equal to itself.")
10731073 }
10741074 else throw("Strict value is not equal to itself.")
10751075 }
10761076
10771077
10781078
10791079 @Callable(i)
10801080 func confirmManager () = {
10811081 let p = pm()
10821082 let hpm = if (isDefined(p))
10831083 then true
10841084 else throw("No pending manager")
10851085 if ((hpm == hpm))
10861086 then {
10871087 let cpm = if ((i.callerPublicKey == value(p)))
10881088 then true
10891089 else throw("You are not pending manager")
10901090 if ((cpm == cpm))
10911091 then [StringEntry(mpk(), toBase58String(value(p))), DeleteEntry(pmpk())]
10921092 else throw("Strict value is not equal to itself.")
10931093 }
10941094 else throw("Strict value is not equal to itself.")
10951095 }
10961096
10971097
10981098
10991099 @Callable(i)
11001100 func put (slip,autoStake) = {
11011101 let factCfg = gfc()
11021102 let stakingCntr = valueOrErrorMessage(addressFromString(factCfg[idxFactStakCntr]), "Wr st addr")
11031103 let slipCntr = valueOrErrorMessage(addressFromString(factCfg[idxFactSlippCntr]), "Wr sl addr")
11041104 if ((0 > slip))
11051105 then throw("Wrong slippage")
11061106 else if ((size(i.payments) != 2))
11071107 then throw("2 pmnts expd")
11081108 else {
11091109 let amAssetPmt = toBigInt(value(i.payments[0]).amount)
11101110 let prAssetPmt = toBigInt(value(i.payments[1]).amount)
11111111 let amountAssetBalance = (toBigInt(getAccBalance(assetIdToString(cfgAmountAssetId))) - amAssetPmt)
11121112 if ((amountAssetBalance == amountAssetBalance))
11131113 then {
11141114 let priceAssetBalance = (toBigInt(getAccBalance(assetIdToString(cfgPriceAssetId))) - prAssetPmt)
11151115 if ((priceAssetBalance == priceAssetBalance))
11161116 then {
11171117 let lpAssetEmission = toBigInt(value(assetInfo(cfgLpAssetId)).quantity)
11181118 if ((lpAssetEmission == lpAssetEmission))
11191119 then {
11201120 let currentDLp = calcCurrentDLp(amAssetPmt, prAssetPmt, toBigInt(0))
11211121 if ((currentDLp == currentDLp))
11221122 then {
11231123 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, "")
11241124 let emitLpAmt = e._2
11251125 let lpAssetId = e._7
11261126 let state = e._9
11271127 let amDiff = e._10
11281128 let prDiff = e._11
11291129 let amId = e._12
11301130 let prId = e._13
11311131 let r = invoke(fca, "emit", [emitLpAmt], nil)
11321132 if ((r == r))
11331133 then {
11341134 let el = match r {
11351135 case legacy: Address =>
11361136 invoke(legacy, "emit", [emitLpAmt], nil)
11371137 case _ =>
11381138 unit
11391139 }
11401140 if ((el == el))
11411141 then {
11421142 let sa = if ((amDiff > 0))
11431143 then invoke(slipCntr, "put", nil, [AttachedPayment(amId, amDiff)])
11441144 else nil
11451145 if ((sa == sa))
11461146 then {
11471147 let sp = if ((prDiff > 0))
11481148 then invoke(slipCntr, "put", nil, [AttachedPayment(prId, prDiff)])
11491149 else nil
11501150 if ((sp == sp))
11511151 then {
11521152 let lpTrnsfr = if (autoStake)
11531153 then {
11541154 let ss = invoke(stakingCntr, "stake", nil, [AttachedPayment(lpAssetId, emitLpAmt)])
11551155 if ((ss == ss))
11561156 then nil
11571157 else throw("Strict value is not equal to itself.")
11581158 }
11591159 else [ScriptTransfer(i.caller, emitLpAmt, lpAssetId)]
1160- let $t04059340735 = refreshDLpInternal(0, 0, 0)
1161- let refreshDLpActions = $t04059340735._1
1162- let updatedDLp = $t04059340735._2
1160+ let $t04060540747 = refreshDLpInternal(0, 0, 0)
1161+ let refreshDLpActions = $t04060540747._1
1162+ let updatedDLp = $t04060540747._2
11631163 let check = if ((updatedDLp >= currentDLp))
11641164 then true
11651165 else throwErr(makeString(["updated DLp lower than current DLp", toString(amountAssetBalance), toString(priceAssetBalance), toString(lpAssetEmission), toString(currentDLp), toString(updatedDLp), toString(amDiff), toString(prDiff)], " "))
11661166 if ((check == check))
11671167 then {
11681168 let lpAssetEmissionAfter = value(assetInfo(cfgLpAssetId)).quantity
11691169 if ((lpAssetEmissionAfter == lpAssetEmissionAfter))
11701170 then ((state ++ lpTrnsfr) ++ refreshDLpActions)
11711171 else throw("Strict value is not equal to itself.")
11721172 }
11731173 else throw("Strict value is not equal to itself.")
11741174 }
11751175 else throw("Strict value is not equal to itself.")
11761176 }
11771177 else throw("Strict value is not equal to itself.")
11781178 }
11791179 else throw("Strict value is not equal to itself.")
11801180 }
11811181 else throw("Strict value is not equal to itself.")
11821182 }
11831183 else throw("Strict value is not equal to itself.")
11841184 }
11851185 else throw("Strict value is not equal to itself.")
11861186 }
11871187 else throw("Strict value is not equal to itself.")
11881188 }
11891189 else throw("Strict value is not equal to itself.")
11901190 }
11911191 }
11921192
11931193
11941194
11951195 @Callable(i)
11961196 func putOneTknV2 (minOutAmount,autoStake) = {
11971197 let isPoolOneTokenOperationsDisabled = {
11981198 let @ = invoke(fca, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
11991199 if ($isInstanceOf(@, "Boolean"))
12001200 then @
12011201 else throw(($getType(@) + " couldn't be cast to Boolean"))
12021202 }
12031203 let isPutDisabled = if (if (if (igs())
12041204 then true
12051205 else (cfgPoolStatus == PoolPutDis))
12061206 then true
12071207 else (cfgPoolStatus == PoolShutdown))
12081208 then true
12091209 else isPoolOneTokenOperationsDisabled
12101210 let checks = [if (if (!(isPutDisabled))
12111211 then true
12121212 else isManager(i))
12131213 then true
12141214 else throwErr("put operation is blocked by admin"), if ((size(i.payments) == 1))
12151215 then true
12161216 else throwErr("exactly 1 payment are expected")]
12171217 if ((checks == checks))
12181218 then {
12191219 let amId = toBase58String(value(cfgAmountAssetId))
12201220 let prId = toBase58String(value(cfgPriceAssetId))
12211221 let lpId = cfgLpAssetId
12221222 let amDecimals = cfgAmountAssetDecimals
12231223 let prDecimals = cfgPriceAssetDecimals
12241224 let userAddress = if ((i.caller == this))
12251225 then i.originCaller
12261226 else i.caller
12271227 let pmt = value(i.payments[0])
12281228 let pmtAssetId = toBase58String(value(pmt.assetId))
12291229 let pmtAmt = pmt.amount
12301230 let currentDLp = if ((pmt.assetId == cfgAmountAssetId))
12311231 then calcCurrentDLp(toBigInt(pmtAmt), toBigInt(0), toBigInt(0))
12321232 else calcCurrentDLp(toBigInt(0), toBigInt(pmtAmt), toBigInt(0))
12331233 if ((currentDLp == currentDLp))
12341234 then {
1235- let $t04237642534 = calcPutOneTkn(pmtAmt, pmtAssetId, toString(userAddress), toBase58String(i.transactionId), true)
1236- if (($t04237642534 == $t04237642534))
1235+ let $t04238842546 = calcPutOneTkn(pmtAmt, pmtAssetId, toString(userAddress), toBase58String(i.transactionId), true)
1236+ if (($t04238842546 == $t04238842546))
12371237 then {
1238- let feeAmount = $t04237642534._3
1239- let state = $t04237642534._2
1240- let estimLP = $t04237642534._1
1238+ let feeAmount = $t04238842546._3
1239+ let state = $t04238842546._2
1240+ let estimLP = $t04238842546._1
12411241 let emitLpAmt = if (if ((minOutAmount > 0))
12421242 then (minOutAmount > estimLP)
12431243 else false)
12441244 then throwErr(makeString(["amount to receive is less than ", toString(minOutAmount)], ""))
12451245 else estimLP
12461246 let e = invoke(fca, "emit", [emitLpAmt], nil)
12471247 if ((e == e))
12481248 then {
12491249 let el = match e {
12501250 case legacy: Address =>
12511251 invoke(legacy, "emit", [emitLpAmt], nil)
12521252 case _ =>
12531253 unit
12541254 }
12551255 if ((el == el))
12561256 then {
12571257 let lpTrnsfr = if (autoStake)
12581258 then {
12591259 let ss = invoke(stakingContract, "stakeFor", [toString(i.caller)], [AttachedPayment(lpId, emitLpAmt)])
12601260 if ((ss == ss))
12611261 then nil
12621262 else throw("Strict value is not equal to itself.")
12631263 }
12641264 else [ScriptTransfer(i.caller, emitLpAmt, lpId)]
12651265 let sendFeeToMatcher = if ((feeAmount > 0))
12661266 then [ScriptTransfer(feeCollectorAddress, feeAmount, fromBase58String(pmtAssetId))]
12671267 else nil
1268- let $t04340343750 = if ((this == feeCollectorAddress))
1268+ let $t04341543762 = if ((this == feeCollectorAddress))
12691269 then $Tuple2(0, 0)
12701270 else {
12711271 let paymentInAmountAsset = if ((pmt.assetId == cfgAmountAssetId))
12721272 then true
12731273 else false
12741274 if (paymentInAmountAsset)
12751275 then $Tuple2(-(feeAmount), 0)
12761276 else $Tuple2(0, -(feeAmount))
12771277 }
1278- let amountAssetBalanceDelta = $t04340343750._1
1279- let priceAssetBalanceDelta = $t04340343750._2
1280- let $t04375343861 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
1281- let refreshDLpActions = $t04375343861._1
1282- let updatedDLp = $t04375343861._2
1278+ let amountAssetBalanceDelta = $t04341543762._1
1279+ let priceAssetBalanceDelta = $t04341543762._2
1280+ let $t04376543873 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
1281+ let refreshDLpActions = $t04376543873._1
1282+ let updatedDLp = $t04376543873._2
12831283 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
12841284 if ((isUpdatedDLpValid == isUpdatedDLpValid))
12851285 then $Tuple2((((state ++ lpTrnsfr) ++ sendFeeToMatcher) ++ refreshDLpActions), emitLpAmt)
12861286 else throw("Strict value is not equal to itself.")
12871287 }
12881288 else throw("Strict value is not equal to itself.")
12891289 }
12901290 else throw("Strict value is not equal to itself.")
12911291 }
12921292 else throw("Strict value is not equal to itself.")
12931293 }
12941294 else throw("Strict value is not equal to itself.")
12951295 }
12961296 else throw("Strict value is not equal to itself.")
12971297 }
12981298
12991299
13001300
13011301 @Callable(i)
13021302 func putForFree (maxSlpg) = if ((0 > maxSlpg))
13031303 then throw("Wrong slpg")
13041304 else if ((size(i.payments) != 2))
13051305 then throw("2 pmnts expd")
13061306 else {
13071307 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, "")
13081308 let state = estPut._9
13091309 let amAssetPmt = toBigInt(value(i.payments[0]).amount)
13101310 let prAssetPmt = toBigInt(value(i.payments[1]).amount)
13111311 let currentDLp = calcCurrentDLp(amAssetPmt, prAssetPmt, toBigInt(0))
13121312 if ((currentDLp == currentDLp))
13131313 then {
1314- let $t04469344758 = refreshDLpInternal(0, 0, 0)
1315- let refreshDLpActions = $t04469344758._1
1316- let updatedDLp = $t04469344758._2
1314+ let $t04470544770 = refreshDLpInternal(0, 0, 0)
1315+ let refreshDLpActions = $t04470544770._1
1316+ let updatedDLp = $t04470544770._2
13171317 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
13181318 if ((isUpdatedDLpValid == isUpdatedDLpValid))
13191319 then (state ++ refreshDLpActions)
13201320 else throw("Strict value is not equal to itself.")
13211321 }
13221322 else throw("Strict value is not equal to itself.")
13231323 }
13241324
13251325
13261326
13271327 @Callable(i)
13281328 func get () = {
13291329 let currentDLp = calcCurrentDLp(toBigInt(0), toBigInt(0), toBigInt(0))
13301330 if ((currentDLp == currentDLp))
13311331 then {
13321332 let r = cg(i)
13331333 let outAmtAmt = r._1
13341334 let outPrAmt = r._2
13351335 let pmtAmt = r._3
13361336 let pmtAssetId = r._4
13371337 let state = r._5
13381338 let b = invoke(fca, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
13391339 if ((b == b))
13401340 then {
1341- let $t04586145943 = refreshDLpInternal(-(outAmtAmt), -(outPrAmt), 0)
1342- let refreshDLpActions = $t04586145943._1
1343- let updatedDLp = $t04586145943._2
1341+ let $t04587345955 = refreshDLpInternal(-(outAmtAmt), -(outPrAmt), 0)
1342+ let refreshDLpActions = $t04587345955._1
1343+ let updatedDLp = $t04587345955._2
13441344 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
13451345 if ((isUpdatedDLpValid == isUpdatedDLpValid))
13461346 then (state ++ refreshDLpActions)
13471347 else throw("Strict value is not equal to itself.")
13481348 }
13491349 else throw("Strict value is not equal to itself.")
13501350 }
13511351 else throw("Strict value is not equal to itself.")
13521352 }
13531353
13541354
13551355
13561356 @Callable(i)
13571357 func getOneTknV2 (outAssetId,minOutAmount) = {
13581358 let isPoolOneTokenOperationsDisabled = {
13591359 let @ = invoke(fca, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
13601360 if ($isInstanceOf(@, "Boolean"))
13611361 then @
13621362 else throw(($getType(@) + " couldn't be cast to Boolean"))
13631363 }
13641364 let isGetDisabled = if (if (igs())
13651365 then true
13661366 else (cfgPoolStatus == PoolShutdown))
13671367 then true
13681368 else isPoolOneTokenOperationsDisabled
13691369 let checks = [if (if (!(isGetDisabled))
13701370 then true
13711371 else isManager(i))
13721372 then true
13731373 else throwErr("get operation is blocked by admin"), if ((size(i.payments) == 1))
13741374 then true
13751375 else throwErr("exactly 1 payment are expected")]
13761376 if ((checks == checks))
13771377 then {
1378- let $t04656146716 = getOneTknV2Internal(outAssetId, minOutAmount, i.payments, i.caller, i.originCaller, i.transactionId)
1379- let state = $t04656146716._1
1380- let totalAmount = $t04656146716._2
1378+ let $t04657346728 = getOneTknV2Internal(outAssetId, minOutAmount, i.payments, i.caller, i.originCaller, i.transactionId)
1379+ let state = $t04657346728._1
1380+ let totalAmount = $t04657346728._2
13811381 $Tuple2(state, totalAmount)
13821382 }
13831383 else throw("Strict value is not equal to itself.")
13841384 }
13851385
13861386
13871387
13881388 @Callable(i)
13891389 func refreshDLp () = {
13901390 let lastRefreshedBlockHeight = valueOrElse(getInteger(keyDLpRefreshedHeight), 0)
1391- let checkLastRefreshedBlockHeight = if (((an - lastRefreshedBlockHeight) >= dLpRefreshDelay))
1391+ let checkLastRefreshedBlockHeight = if (((height - lastRefreshedBlockHeight) >= dLpRefreshDelay))
13921392 then unit
13931393 else throwErr(makeString([toString(dLpRefreshDelay), " blocks have not passed since the previous call"], ""))
13941394 if ((checkLastRefreshedBlockHeight == checkLastRefreshedBlockHeight))
13951395 then {
13961396 let dLp = valueOrErrorMessage(parseBigInt(valueOrElse(getString(this, keyDLp), "0")), fmtErr("invalid dLp"))
1397- let $t04723447298 = refreshDLpInternal(0, 0, 0)
1398- let dLpUpdateActions = $t04723447298._1
1399- let updatedDLp = $t04723447298._2
1397+ let $t04724647310 = refreshDLpInternal(0, 0, 0)
1398+ let dLpUpdateActions = $t04724647310._1
1399+ let updatedDLp = $t04724647310._2
14001400 let actions = if ((dLp != updatedDLp))
14011401 then dLpUpdateActions
14021402 else throwErr("nothing to refresh")
14031403 $Tuple2(actions, toString(updatedDLp))
14041404 }
14051405 else throw("Strict value is not equal to itself.")
14061406 }
14071407
14081408
14091409
14101410 @Callable(i)
14111411 func getOneTknV2READONLY (outAssetId,lpAssetAmount) = {
14121412 let amId = toBase58String(value(cfgAmountAssetId))
14131413 let prId = toBase58String(value(cfgPriceAssetId))
14141414 let lpId = toBase58String(value(cfgLpAssetId))
14151415 let xp = [toBigInt(getAccBalance(amId)), toBigInt(getAccBalance(prId))]
14161416 let lpEmission = toBigInt(valueOrErrorMessage(assetInfo(fromBase58String(lpId)), "invalid lp asset").quantity)
14171417 let D0 = getD(xp)
14181418 let D1 = (D0 - fraction(toBigInt(lpAssetAmount), D0, lpEmission))
14191419 let index = if ((outAssetId == amId))
14201420 then 0
14211421 else if ((outAssetId == prId))
14221422 then 1
14231423 else throw("invalid out asset id")
14241424 let newY = getYD(xp, index, D1)
14251425 let dy = (xp[index] - newY)
14261426 let totalGetRaw = max([0, toInt((dy - big1))])
1427- let $t04830848363 = takeFee(totalGetRaw, outFee)
1428- let totalGet = $t04830848363._1
1429- let feeAmount = $t04830848363._2
1427+ let $t04832048375 = takeFee(totalGetRaw, outFee)
1428+ let totalGet = $t04832048375._1
1429+ let feeAmount = $t04832048375._2
14301430 $Tuple2(nil, $Tuple2(totalGet, feeAmount))
14311431 }
14321432
14331433
14341434
14351435 @Callable(i)
14361436 func getOneTknV2WithBonusREADONLY (outAssetId,lpAssetAmount) = {
14371437 let amId = toBase58String(value(cfgAmountAssetId))
14381438 let prId = toBase58String(value(cfgPriceAssetId))
14391439 let lpId = toBase58String(value(cfgLpAssetId))
14401440 let amBalance = getAccBalance(amId)
14411441 let prBalance = getAccBalance(prId)
1442- let $t04873848853 = {
1442+ let $t04875048865 = {
14431443 let @ = invoke(this, "getOneTknV2READONLY", [outAssetId, lpAssetAmount], nil)
14441444 if ($isInstanceOf(@, "(Int, Int)"))
14451445 then @
14461446 else throw(($getType(@) + " couldn't be cast to (Int, Int)"))
14471447 }
1448- let totalGet = $t04873848853._1
1449- let feeAmount = $t04873848853._2
1448+ let totalGet = $t04875048865._1
1449+ let feeAmount = $t04875048865._2
14501450 let r = ego("", lpId, lpAssetAmount, this)
14511451 let outAmAmt = r._1
14521452 let outPrAmt = r._2
14531453 let sumOfGetAssets = (outAmAmt + outPrAmt)
14541454 let bonus = if ((sumOfGetAssets == 0))
14551455 then if ((totalGet == 0))
14561456 then 0
14571457 else throw("bonus calculation error")
14581458 else fraction((totalGet - sumOfGetAssets), scale8, sumOfGetAssets)
14591459 $Tuple2(nil, $Tuple3(totalGet, feeAmount, bonus))
14601460 }
14611461
14621462
14631463
14641464 @Callable(i)
14651465 func getNoLess (noLessThenAmtAsset,noLessThenPriceAsset) = {
14661466 let r = cg(i)
14671467 let outAmAmt = r._1
14681468 let outPrAmt = r._2
14691469 let pmtAmt = r._3
14701470 let pmtAssetId = r._4
14711471 let state = r._5
14721472 if ((noLessThenAmtAsset > outAmAmt))
14731473 then throw(((("Failed: " + toString(outAmAmt)) + " < ") + toString(noLessThenAmtAsset)))
14741474 else if ((noLessThenPriceAsset > outPrAmt))
14751475 then throw(((("Failed: " + toString(outPrAmt)) + " < ") + toString(noLessThenPriceAsset)))
14761476 else {
14771477 let currentDLp = calcCurrentDLp(toBigInt(0), toBigInt(0), toBigInt(0))
14781478 if ((currentDLp == currentDLp))
14791479 then {
14801480 let burnLPAssetOnFactory = invoke(fca, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
14811481 if ((burnLPAssetOnFactory == burnLPAssetOnFactory))
14821482 then {
1483- let $t04993350014 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1484- let refreshDLpActions = $t04993350014._1
1485- let updatedDLp = $t04993350014._2
1483+ let $t04994550026 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1484+ let refreshDLpActions = $t04994550026._1
1485+ let updatedDLp = $t04994550026._2
14861486 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
14871487 if ((isUpdatedDLpValid == isUpdatedDLpValid))
14881488 then (state ++ refreshDLpActions)
14891489 else throw("Strict value is not equal to itself.")
14901490 }
14911491 else throw("Strict value is not equal to itself.")
14921492 }
14931493 else throw("Strict value is not equal to itself.")
14941494 }
14951495 }
14961496
14971497
14981498
14991499 @Callable(i)
15001500 func unstakeAndGet (amount) = {
15011501 let checkPayments = if ((size(i.payments) != 0))
15021502 then throw("No pmnts expd")
15031503 else true
15041504 if ((checkPayments == checkPayments))
15051505 then {
15061506 let factoryCfg = gfc()
15071507 let lpAssetId = cfgLpAssetId
15081508 let staking = valueOrErrorMessage(addressFromString(factoryCfg[idxFactStakCntr]), "Wr st addr")
15091509 let currentDLp = calcCurrentDLp(toBigInt(0), toBigInt(0), toBigInt(0))
15101510 if ((currentDLp == currentDLp))
15111511 then {
15121512 let unstakeInv = invoke(staking, "unstake", [toBase58String(lpAssetId), amount], nil)
15131513 if ((unstakeInv == unstakeInv))
15141514 then {
15151515 let r = ego(toBase58String(i.transactionId), toBase58String(lpAssetId), amount, i.caller)
15161516 let outAmAmt = r._1
15171517 let outPrAmt = r._2
15181518 let sts = parseIntValue(r._9)
15191519 let state = r._10
15201520 let v = if (if (igs())
15211521 then true
15221522 else (sts == PoolShutdown))
15231523 then throw(("Blocked: " + toString(sts)))
15241524 else true
15251525 if ((v == v))
15261526 then {
15271527 let burnA = invoke(fca, "burn", [amount], [AttachedPayment(lpAssetId, amount)])
15281528 if ((burnA == burnA))
15291529 then {
1530- let $t05104551126 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1531- let refreshDLpActions = $t05104551126._1
1532- let updatedDLp = $t05104551126._2
1530+ let $t05105751138 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1531+ let refreshDLpActions = $t05105751138._1
1532+ let updatedDLp = $t05105751138._2
15331533 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
15341534 if ((isUpdatedDLpValid == isUpdatedDLpValid))
15351535 then (state ++ refreshDLpActions)
15361536 else throw("Strict value is not equal to itself.")
15371537 }
15381538 else throw("Strict value is not equal to itself.")
15391539 }
15401540 else throw("Strict value is not equal to itself.")
15411541 }
15421542 else throw("Strict value is not equal to itself.")
15431543 }
15441544 else throw("Strict value is not equal to itself.")
15451545 }
15461546 else throw("Strict value is not equal to itself.")
15471547 }
15481548
15491549
15501550
15511551 @Callable(i)
15521552 func unstakeAndGetNoLess (unstakeAmount,noLessThenAmountAsset,noLessThenPriceAsset) = {
15531553 let isGetDisabled = if (igs())
15541554 then true
15551555 else (cfgPoolStatus == PoolShutdown)
15561556 let checks = [if (!(isGetDisabled))
15571557 then true
15581558 else throw("get operation is blocked by admin"), if ((size(i.payments) == 0))
15591559 then true
15601560 else throw("no payments are expected")]
15611561 if ((checks == checks))
15621562 then {
15631563 let currentDLp = calcCurrentDLp(toBigInt(0), toBigInt(0), toBigInt(0))
15641564 if ((currentDLp == currentDLp))
15651565 then {
15661566 let unstakeInv = invoke(stakingContract, "unstake", [toBase58String(cfgLpAssetId), unstakeAmount], nil)
15671567 if ((unstakeInv == unstakeInv))
15681568 then {
15691569 let res = ego(toBase58String(i.transactionId), toBase58String(cfgLpAssetId), unstakeAmount, i.caller)
15701570 let outAmAmt = res._1
15711571 let outPrAmt = res._2
15721572 let state = res._10
15731573 let checkAmounts = [if ((outAmAmt >= noLessThenAmountAsset))
15741574 then true
15751575 else throw(makeString(["amount asset amount to receive is less than ", toString(noLessThenAmountAsset)], "")), if ((outPrAmt >= noLessThenPriceAsset))
15761576 then true
15771577 else throw(makeString(["price asset amount to receive is less than ", toString(noLessThenPriceAsset)], ""))]
15781578 if ((checkAmounts == checkAmounts))
15791579 then {
15801580 let burnLPAssetOnFactory = invoke(fca, "burn", [unstakeAmount], [AttachedPayment(cfgLpAssetId, unstakeAmount)])
15811581 if ((burnLPAssetOnFactory == burnLPAssetOnFactory))
15821582 then {
1583- let $t05237752458 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1584- let refreshDLpActions = $t05237752458._1
1585- let updatedDLp = $t05237752458._2
1583+ let $t05238952470 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1584+ let refreshDLpActions = $t05238952470._1
1585+ let updatedDLp = $t05238952470._2
15861586 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
15871587 if ((isUpdatedDLpValid == isUpdatedDLpValid))
15881588 then (state ++ refreshDLpActions)
15891589 else throw("Strict value is not equal to itself.")
15901590 }
15911591 else throw("Strict value is not equal to itself.")
15921592 }
15931593 else throw("Strict value is not equal to itself.")
15941594 }
15951595 else throw("Strict value is not equal to itself.")
15961596 }
15971597 else throw("Strict value is not equal to itself.")
15981598 }
15991599 else throw("Strict value is not equal to itself.")
16001600 }
16011601
16021602
16031603
16041604 @Callable(i)
16051605 func unstakeAndGetOneTknV2 (unstakeAmount,outAssetId,minOutAmount) = {
16061606 let isPoolOneTokenOperationsDisabled = {
16071607 let @ = invoke(fca, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
16081608 if ($isInstanceOf(@, "Boolean"))
16091609 then @
16101610 else throw(($getType(@) + " couldn't be cast to Boolean"))
16111611 }
16121612 let isGetDisabled = if (if (igs())
16131613 then true
16141614 else (cfgPoolStatus == PoolShutdown))
16151615 then true
16161616 else isPoolOneTokenOperationsDisabled
16171617 let checks = [if (if (!(isGetDisabled))
16181618 then true
16191619 else isManager(i))
16201620 then true
16211621 else throwErr("get operation is blocked by admin"), if ((size(i.payments) == 0))
16221622 then true
16231623 else throwErr("no payments are expected")]
16241624 if ((checks == checks))
16251625 then {
16261626 let factoryCfg = gfc()
16271627 let lpAssetId = cfgLpAssetId
16281628 let staking = valueOrErrorMessage(addressFromString(factoryCfg[idxFactStakCntr]), "Wr st addr")
16291629 let userAddress = i.caller
16301630 let lpAssetRecipientAddress = this
16311631 let unstakeInv = invoke(staking, "unstakeINTERNAL", [lpAssetId, unstakeAmount, userAddress.bytes, lpAssetRecipientAddress.bytes], nil)
16321632 if ((unstakeInv == unstakeInv))
16331633 then {
1634- let $t05348053668 = getOneTknV2Internal(outAssetId, minOutAmount, [AttachedPayment(lpAssetId, unstakeAmount)], i.caller, i.originCaller, i.transactionId)
1635- let state = $t05348053668._1
1636- let totalAmount = $t05348053668._2
1634+ let $t05349253680 = getOneTknV2Internal(outAssetId, minOutAmount, [AttachedPayment(lpAssetId, unstakeAmount)], i.caller, i.originCaller, i.transactionId)
1635+ let state = $t05349253680._1
1636+ let totalAmount = $t05349253680._2
16371637 $Tuple2(state, totalAmount)
16381638 }
16391639 else throw("Strict value is not equal to itself.")
16401640 }
16411641 else throw("Strict value is not equal to itself.")
16421642 }
16431643
16441644
16451645
16461646 @Callable(i)
16471647 func putOneTknV2WithBonusREADONLY (paymentAmountRaw,paymentAssetId) = {
1648- let $t05379653899 = calcPutOneTkn(paymentAmountRaw, paymentAssetId, "", "", true)
1649- let lpAmount = $t05379653899._1
1650- let state = $t05379653899._2
1651- let feeAmount = $t05379653899._3
1652- let bonus = $t05379653899._4
1648+ let $t05380853911 = calcPutOneTkn(paymentAmountRaw, paymentAssetId, "", "", true)
1649+ let lpAmount = $t05380853911._1
1650+ let state = $t05380853911._2
1651+ let feeAmount = $t05380853911._3
1652+ let bonus = $t05380853911._4
16531653 $Tuple2(nil, $Tuple3(lpAmount, feeAmount, bonus))
16541654 }
16551655
16561656
16571657
16581658 @Callable(i)
16591659 func putOneTknV2WithoutTakeFeeREADONLY (paymentAmountRaw,paymentAssetId) = {
1660- let $t05404754151 = calcPutOneTkn(paymentAmountRaw, paymentAssetId, "", "", false)
1661- let lpAmount = $t05404754151._1
1662- let state = $t05404754151._2
1663- let feeAmount = $t05404754151._3
1664- let bonus = $t05404754151._4
1660+ let $t05405954163 = calcPutOneTkn(paymentAmountRaw, paymentAssetId, "", "", false)
1661+ let lpAmount = $t05405954163._1
1662+ let state = $t05405954163._2
1663+ let feeAmount = $t05405954163._3
1664+ let bonus = $t05405954163._4
16651665 $Tuple2(nil, $Tuple3(lpAmount, feeAmount, bonus))
16661666 }
16671667
16681668
16691669
16701670 @Callable(i)
16711671 func activate (amtAsStr,prAsStr) = if ((toString(i.caller) != toString(fca)))
16721672 then throw("denied")
16731673 else $Tuple2([StringEntry(aa(), amtAsStr), StringEntry(pa(), prAsStr)], "success")
16741674
16751675
16761676
16771677 @Callable(i)
16781678 func setS (k,v) = if ((toString(i.caller) != strf(this, ada())))
16791679 then pd
16801680 else [StringEntry(k, v)]
16811681
16821682
16831683
16841684 @Callable(i)
16851685 func setI (k,v) = if ((toString(i.caller) != strf(this, ada())))
16861686 then pd
16871687 else [IntegerEntry(k, v)]
16881688
16891689
16901690
16911691 @Callable(i)
16921692 func getPoolConfigWrapperREADONLY () = $Tuple2(nil, gpc())
16931693
16941694
16951695
16961696 @Callable(i)
16971697 func getAccBalanceWrapperREADONLY (assetId) = $Tuple2(nil, getAccBalance(assetId))
16981698
16991699
17001700
17011701 @Callable(i)
17021702 func calcPricesWrapperREADONLY (amAmt,prAmt,lpAmt) = {
17031703 let pr = calcPrices(amAmt, prAmt, lpAmt)
17041704 $Tuple2(nil, [toString(pr[0]), toString(pr[1]), toString(pr[2])])
17051705 }
17061706
17071707
17081708
17091709 @Callable(i)
17101710 func fromX18WrapperREADONLY (val,resScaleMult) = $Tuple2(nil, f1(parseBigIntValue(val), resScaleMult))
17111711
17121712
17131713
17141714 @Callable(i)
17151715 func toX18WrapperREADONLY (origVal,origScaleMult) = $Tuple2(nil, toString(t1(origVal, origScaleMult)))
17161716
17171717
17181718
17191719 @Callable(i)
17201720 func calcPriceBigIntWrapperREADONLY (prAmtX18,amAmtX18) = $Tuple2(nil, toString(cpbi(parseBigIntValue(prAmtX18), parseBigIntValue(amAmtX18))))
17211721
17221722
17231723
17241724 @Callable(i)
17251725 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, ""))
17261726
17271727
17281728
17291729 @Callable(i)
17301730 func estimateGetOperationWrapperREADONLY (txId58,pmtAsId,pmtLpAmt,usrAddr) = {
17311731 let r = ego(txId58, pmtAsId, pmtLpAmt, addressFromStringValue(usrAddr))
17321732 $Tuple2(nil, $Tuple10(r._1, r._2, r._3, r._4, r._5, r._6, r._7, toString(r._8), r._9, r._10))
17331733 }
17341734
17351735
17361736
17371737 @Callable(i)
17381738 func changeAmp () = {
17391739 let cfg = invoke(fca, "getChangeAmpConfigREADONLY", [toString(this)], nil)
1740- let $t05681857051 = match cfg {
1740+ let $t05683057063 = match cfg {
17411741 case str: String =>
17421742 let list = split(str, SEP)
17431743 $Tuple3(parseIntValue(list[0]), parseIntValue(list[1]), parseIntValue(list[2]))
17441744 case _ =>
17451745 throw("invalid entry type")
17461746 }
1747- let delay = $t05681857051._1
1748- let delta = $t05681857051._2
1749- let target = $t05681857051._3
1747+ let delay = $t05683057063._1
1748+ let delta = $t05683057063._2
1749+ let target = $t05683057063._3
17501750 let curAmp = parseIntValue(getStringValue(amp()))
17511751 let newAmpRaw = (curAmp + delta)
17521752 let newAmp = if ((0 > delta))
17531753 then if ((target > newAmpRaw))
17541754 then target
17551755 else newAmpRaw
17561756 else if ((newAmpRaw > target))
17571757 then target
17581758 else newAmpRaw
17591759 if ((newAmp == newAmp))
17601760 then {
17611761 let lastCall = valueOrElse(getInteger(keyChangeAmpLastCall()), 0)
17621762 let wait = (lastCall + delay)
1763- let checks = [if ((1000000000 > wait))
1763+ let checks = [if ((height > wait))
17641764 then true
17651765 else throwErr("try again in few blocks"), if ((curAmp != newAmp))
17661766 then true
17671767 else throwErr("already reached target")]
17681768 if ((checks == checks))
1769- then [IntegerEntry(keyChangeAmpLastCall(), an), StringEntry(amp(), toString(newAmp)), StringEntry(keyAmpHistory(an), toString(newAmp))]
1769+ then [IntegerEntry(keyChangeAmpLastCall(), height), StringEntry(amp(), toString(newAmp)), StringEntry(keyAmpHistory(height), toString(newAmp))]
17701770 else throw("Strict value is not equal to itself.")
17711771 }
17721772 else throw("Strict value is not equal to itself.")
17731773 }
17741774
17751775
17761776 @Verifier(tx)
17771777 func verify () = {
17781778 let targetPublicKey = match m() {
17791779 case pk: ByteVector =>
17801780 pk
17811781 case _: Unit =>
17821782 tx.senderPublicKey
17831783 case _ =>
17841784 throw("Match error")
17851785 }
17861786 match tx {
17871787 case order: Order =>
17881788 let matcherPub = mp()
1789- let $t05797058087 = if (skipOrderValidation())
1789+ let $t05797858095 = if (skipOrderValidation())
17901790 then $Tuple2(true, "")
17911791 else validateMatcherOrderAllowed(order)
1792- let orderValid = $t05797058087._1
1793- let orderValidInfo = $t05797058087._2
1792+ let orderValid = $t05797858095._1
1793+ let orderValidInfo = $t05797858095._2
17941794 let senderValid = sigVerify(order.bodyBytes, order.proofs[0], order.senderPublicKey)
17951795 let matcherValid = sigVerify(order.bodyBytes, order.proofs[1], matcherPub)
17961796 if (if (if (orderValid)
17971797 then senderValid
17981798 else false)
17991799 then matcherValid
18001800 else false)
18011801 then true
18021802 else throwOrderError(orderValid, orderValidInfo, senderValid, matcherValid)
18031803 case s: SetScriptTransaction =>
18041804 if (sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey))
18051805 then true
18061806 else {
18071807 let newHash = blake2b256(value(s.script))
18081808 let allowedHash = fromBase64String(value(getString(fca, keyAllowedLpStableScriptHash())))
18091809 let currentHash = scriptHash(this)
18101810 if ((allowedHash == newHash))
18111811 then (currentHash != newHash)
18121812 else false
18131813 }
18141814 case _ =>
18151815 sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey)
18161816 }
18171817 }
18181818

github/deemru/w8io/026f985 
278.64 ms