tx · CJASj7QXvp6QQUVdoaVjmEpTFAcPkCXUabAvTkycPBWr

3NAefciWv6f9fWvEXdGgpHfanJFG8HqfjuT:  -0.04200000 Waves

2023.05.04 12:23 [2562827] smart account 3NAefciWv6f9fWvEXdGgpHfanJFG8HqfjuT > SELF 0.00000000 Waves

{ "type": 13, "id": "CJASj7QXvp6QQUVdoaVjmEpTFAcPkCXUabAvTkycPBWr", "fee": 4200000, "feeAssetId": null, "timestamp": 1683192230271, "version": 2, "chainId": 84, "sender": "3NAefciWv6f9fWvEXdGgpHfanJFG8HqfjuT", "senderPublicKey": "D1BL65meykxFZTCuq7jq9HSGLLnWvQamQPUNrguW5w39", "proofs": [ "5Z8bWH19n8PyPYjU5LMMqXi8DpZ7ia7TwT5EQgjdwTLUaqM5sncTcqDHz9PFcmnPAp6eY7xdBwP7RqnzUFeszLhk" ], "script": "base64:BgLELAgCEgUKAwEEARIHCgUBBAEIARIDCgEIEgMKAQgSABIECgIBBBIECgIBBBIDCgEBEgASBAoCCAESABIECgIIARIECgIIARIECgIBARIDCgEBEgUKAwEBARIFCgMBCAESBAoCAQgSBAoCAQgSBAoCCAgSABIDCgEIEgUKAwEBARIECgIIARIECgIBARIECgIICBILCgkIAQECAQIIBAQSBgoECAgBCBIAIgZzY2FsZTgiDHNjYWxlOEJpZ0ludCIHc2NhbGUxOCIKemVyb0JpZ0ludCIEYmlnMCIEYmlnMSIEYmlnMiIEYmlnMyIEYmlnNCIKc2xpcHBhZ2U0RCILd2F2ZXNTdHJpbmciCmFtcEluaXRpYWwiBUFtdWx0IgVEY29udiIDU0VQIgVFTVBUWSIKUG9vbEFjdGl2ZSIKUG9vbFB1dERpcyIOUG9vbE1hdGNoZXJEaXMiDFBvb2xTaHV0ZG93biIOaWR4UG9vbEFkZHJlc3MiCWlkeFBvb2xTdCIJaWR4TFBBc0lkIglpZHhBbUFzSWQiCWlkeFByQXNJZCILaWR4QW10QXNEY20iDWlkeFByaWNlQXNEY20iC2lkeElBbXRBc0lk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b29mcwAABQJpQUYtd+g=", "height": 2562827, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: HEzWfHE964PR9sRh4xkjy6rrPNy9SPnyTtYTkFb66Jk4 Next: 2fALsp4rWUCvM7PUj4qiFBKW564nDE9M8sgt55Wyk1XV Diff:
OldNewDifferences
2222 let slippage4D = toBigInt((scale8 - ((scale8 * 1) / scale8)))
2323
2424 let wavesString = "WAVES"
25+
26+let ampInitial = 50
2527
2628 let Amult = "100"
2729
237239
238240 let poolConfigParsed = parsePoolConfig(gpc())
239241
240-let $t081658394 = poolConfigParsed
242+let $t081858414 = poolConfigParsed
241243
242-let cfgPoolAddress = $t081658394._1
244+let cfgPoolAddress = $t081858414._1
243245
244-let cfgPoolStatus = $t081658394._2
246+let cfgPoolStatus = $t081858414._2
245247
246-let cfgLpAssetId = $t081658394._3
248+let cfgLpAssetId = $t081858414._3
247249
248-let cfgAmountAssetId = $t081658394._4
250+let cfgAmountAssetId = $t081858414._4
249251
250-let cfgPriceAssetId = $t081658394._5
252+let cfgPriceAssetId = $t081858414._5
251253
252-let cfgAmountAssetDecimals = $t081658394._6
254+let cfgAmountAssetDecimals = $t081858414._6
253255
254-let cfgPriceAssetDecimals = $t081658394._7
256+let cfgPriceAssetDecimals = $t081858414._7
255257
256-let cfgInAmountAssedId = $t081658394._8
258+let cfgInAmountAssedId = $t081858414._8
257259
258-let cfgInPriceAssetId = $t081658394._9
260+let cfgInPriceAssetId = $t081858414._9
259261
260262 func gfc () = split(strf(fca, fcfg()), SEP)
261263
376378 }
377379
378380 let arr = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16]
379- let $t01289912947 = {
381+ let $t01291912967 = {
380382 let $l = arr
381383 let $s = size($l)
382384 let $acc0 = $Tuple2(s, false)
390392
391393 $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)
392394 }
393- let d = $t01289912947._1
394- let found = $t01289912947._2
395+ let d = $t01291912967._1
396+ let found = $t01291912967._2
395397 if (found)
396398 then d
397399 else throw(("D calculation error, D = " + toString(d)))
527529 else calcLpAmt
528530 let amDiff = (inAmAmt - calcAmAssetPmt)
529531 let prDiff = (inPrAmt - calcPrAssetPmt)
530- let $t02078621131 = if (if (isOneAsset)
532+ let $t02080621151 = if (if (isOneAsset)
531533 then (pmtId == amIdStr)
532534 else false)
533535 then $Tuple2(pmtAmt, 0)
536538 else false)
537539 then $Tuple2(0, pmtAmt)
538540 else $Tuple2(calcAmAssetPmt, calcPrAssetPmt)
539- let writeAmAmt = $t02078621131._1
540- let writePrAmt = $t02078621131._2
541+ let writeAmAmt = $t02080621151._1
542+ let writePrAmt = $t02080621151._2
541543 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))]
542544 $Tuple13(calcLpAmt, emitLpAmt, curPrice, amBalance, prBalance, lpEm, lpId, sts, commonState, amDiff, prDiff, inAmId, inPrId)
543545 }
556558 let c = (((((D * D) / (x * n)) * D) * aPrecision) / (ann * n))
557559 let b = ((s + ((D * aPrecision) / ann)) - D)
558560 func calc (acc,cur) = {
559- let $t02232622346 = acc
560- let y = $t02232622346._1
561- let found = $t02232622346._2
561+ let $t02234622366 = acc
562+ let y = $t02234622366._1
563+ let found = $t02234622366._2
562564 if ((found != unit))
563565 then acc
564566 else {
571573 }
572574
573575 let arr = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
574- let $t02265322700 = {
576+ let $t02267322720 = {
575577 let $l = arr
576578 let $s = size($l)
577579 let $acc0 = $Tuple2(D, unit)
585587
586588 $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)
587589 }
588- let y = $t02265322700._1
589- let found = $t02265322700._2
590+ let y = $t02267322720._1
591+ let found = $t02267322720._2
590592 if ((found != unit))
591593 then y
592594 else throw(("Y calculation error, Y = " + toString(y)))
630632 let priceAssetBalance = getAccBalance(assetIdToString(cfgPriceAssetId))
631633 let amountAssetAmount = order.amount
632634 let priceAssetAmount = fraction(order.amount, order.price, scale8, FLOOR)
633- let $t02489825110 = if ((order.orderType == Buy))
635+ let $t02491825130 = if ((order.orderType == Buy))
634636 then $Tuple2(amountAssetAmount, -(priceAssetAmount))
635637 else $Tuple2(-(amountAssetAmount), priceAssetAmount)
636- let amountAssetBalanceDelta = $t02489825110._1
637- let priceAssetBalanceDelta = $t02489825110._2
638+ let amountAssetBalanceDelta = $t02491825130._1
639+ let priceAssetBalanceDelta = $t02491825130._2
638640 if (if (if (igs())
639641 then true
640642 else (cfgPoolStatus == PoolMatcherDis))
647649 then throw("Wr assets")
648650 else {
649651 let dLp = parseBigIntValue(valueOrElse(getString(this, keyDLp), "0"))
650- let $t02545225552 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
651- let unusedActions = $t02545225552._1
652- let dLpNew = $t02545225552._2
652+ let $t02547225572 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
653+ let unusedActions = $t02547225572._1
654+ let dLpNew = $t02547225572._2
653655 let isOrderValid = (dLpNew >= dLp)
654656 let info = makeString(["dLp=", toString(dLp), " dLpNew=", toString(dLpNew), " amountAssetBalance=", toString(amountAssetBalance), " priceAssetBalance=", toString(priceAssetBalance), " amountAssetBalanceDelta=", toString(amountAssetBalanceDelta), " priceAssetBalanceDelta=", toString(priceAssetBalanceDelta), " height=", toString(height)], "")
655657 $Tuple2(isOrderValid, info)
703705 then {
704706 let amBalance = getAccBalance(amId)
705707 let prBalance = getAccBalance(prId)
706- let $t02820828670 = if ((txId == ""))
708+ let $t02822828690 = if ((txId == ""))
707709 then $Tuple2(amBalance, prBalance)
708710 else if ((pmtAssetId == amId))
709711 then if ((pmtAmtRaw > amBalance))
714716 then throw("invalid payment amount")
715717 else $Tuple2(amBalance, (prBalance - pmtAmtRaw))
716718 else throw("wrong pmtAssetId")
717- let amBalanceOld = $t02820828670._1
718- let prBalanceOld = $t02820828670._2
719- let $t02867628852 = if ((pmtAssetId == amId))
719+ let amBalanceOld = $t02822828690._1
720+ let prBalanceOld = $t02822828690._2
721+ let $t02869628872 = if ((pmtAssetId == amId))
720722 then $Tuple2(pmtAmtRaw, 0)
721723 else if ((pmtAssetId == prId))
722724 then $Tuple2(0, pmtAmtRaw)
723725 else throw("invalid payment")
724- let amAmountRaw = $t02867628852._1
725- let prAmountRaw = $t02867628852._2
726- let $t02885629110 = if (withTakeFee)
726+ let amAmountRaw = $t02869628872._1
727+ let prAmountRaw = $t02869628872._2
728+ let $t02887629130 = if (withTakeFee)
727729 then $Tuple3(takeFee(amAmountRaw, inFee)._1, takeFee(prAmountRaw, inFee)._1, takeFee(pmtAmtRaw, inFee)._2)
728730 else $Tuple3(amAmountRaw, prAmountRaw, 0)
729- let amAmount = $t02885629110._1
730- let prAmount = $t02885629110._2
731- let feeAmount = $t02885629110._3
731+ let amAmount = $t02887629130._1
732+ let prAmount = $t02887629130._2
733+ let feeAmount = $t02887629130._3
732734 let amBalanceNew = (amBalanceOld + amAmount)
733735 let prBalanceNew = (prBalanceOld + prAmount)
734736 let D0 = getD([t1(amBalanceOld, cfgAmountAssetDecimals), t1(prBalanceOld, cfgPriceAssetDecimals)])
776778 else {
777779 let amBalance = getAccBalance(amId)
778780 let prBalance = getAccBalance(prId)
779- let $t03122231333 = {
781+ let $t03124231353 = {
780782 let @ = invoke(this, "getOneTknV2READONLY", [outAssetId, pmtAmt], nil)
781783 if ($isInstanceOf(@, "(Int, Int)"))
782784 then @
783785 else throw(($getType(@) + " couldn't be cast to (Int, Int)"))
784786 }
785- if (($t03122231333 == $t03122231333))
787+ if (($t03124231353 == $t03124231353))
786788 then {
787- let feeAmount = $t03122231333._2
788- let totalGet = $t03122231333._1
789+ let feeAmount = $t03124231353._2
790+ let totalGet = $t03124231353._1
789791 let totalAmount = if (if ((minOutAmount > 0))
790792 then (minOutAmount > totalGet)
791793 else false)
792794 then throwErr(makeString(["amount to receive is less than ", toString(minOutAmount)], ""))
793795 else totalGet
794- let $t03152331830 = if ((outAssetId == amId))
796+ let $t03154331850 = if ((outAssetId == amId))
795797 then $Tuple4(totalAmount, 0, ((amBalance - totalAmount) - feeAmount), prBalance)
796798 else if ((outAssetId == prId))
797799 then $Tuple4(0, totalAmount, amBalance, ((prBalance - totalAmount) - feeAmount))
798800 else throw("invalid out asset id")
799- let outAm = $t03152331830._1
800- let outPr = $t03152331830._2
801- let amBalanceNew = $t03152331830._3
802- let prBalanceNew = $t03152331830._4
801+ let outAm = $t03154331850._1
802+ let outPr = $t03154331850._2
803+ let amBalanceNew = $t03154331850._3
804+ let prBalanceNew = $t03154331850._4
803805 let curPrX18 = cpbi(t1(prBalanceNew, prDecimals), t1(amBalanceNew, amDecimals))
804806 let curPr = f1(curPrX18, scale8)
805807 let outAssetIdOrWaves = if ((outAssetId == "WAVES"))
814816 let burn = invoke(fca, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
815817 if ((burn == burn))
816818 then {
817- let $t03261532965 = {
819+ let $t03263532985 = {
818820 let feeAmountForCalc = if ((this == feeCollectorAddress))
819821 then 0
820822 else feeAmount
825827 then $Tuple2(-((totalGet + feeAmountForCalc)), 0)
826828 else $Tuple2(0, -((totalGet + feeAmountForCalc)))
827829 }
828- let amountAssetBalanceDelta = $t03261532965._1
829- let priceAssetBalanceDelta = $t03261532965._2
830- let $t03296833076 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
831- let refreshDLpActions = $t03296833076._1
832- let updatedDLp = $t03296833076._2
830+ let amountAssetBalanceDelta = $t03263532985._1
831+ let priceAssetBalanceDelta = $t03263532985._2
832+ let $t03298833096 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
833+ let refreshDLpActions = $t03298833096._1
834+ let updatedDLp = $t03298833096._2
833835 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
834836 if ((isUpdatedDLpValid == isUpdatedDLpValid))
835837 then $Tuple2((state ++ refreshDLpActions), totalAmount)
908910 let c = (((((D * D) / (x * n)) * D) * aPrecision) / (ann * n))
909911 let b = ((s + ((D * aPrecision) / ann)) - D)
910912 func calc (acc,cur) = {
911- let $t03452334543 = acc
912- let y = $t03452334543._1
913- let found = $t03452334543._2
913+ let $t03454334563 = acc
914+ let y = $t03454334563._1
915+ let found = $t03454334563._2
914916 if ((found != unit))
915917 then acc
916918 else {
923925 }
924926
925927 let arr = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
926- let $t03487434921 = {
928+ let $t03489434941 = {
927929 let $l = arr
928930 let $s = size($l)
929931 let $acc0 = $Tuple2(D, unit)
937939
938940 $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)
939941 }
940- let y = $t03487434921._1
941- let found = $t03487434921._2
942+ let y = $t03489434941._1
943+ let found = $t03489434941._2
942944 if ((found != unit))
943945 then y
944946 else throw(("Y calculation error, Y = " + toString(y)))
950952
951953 @Callable(i)
952954 func calculateAmountOutForSwapREADONLY (cleanAmountIn,isReverse,feePoolAmount) = {
953- let $t03527335697 = if ((isReverse == false))
955+ let $t03529335717 = if ((isReverse == false))
954956 then {
955957 let assetOut = strf(this, pa())
956958 let poolAmountInBalance = (toBigInt(getAccBalance(strf(this, aa()))) + toBigInt(cleanAmountIn))
961963 let poolAmountInBalance = (toBigInt(getAccBalance(strf(this, pa()))) + toBigInt(cleanAmountIn))
962964 $Tuple2(assetOut, poolAmountInBalance)
963965 }
964- let assetOut = $t03527335697._1
965- let poolAmountInBalance = $t03527335697._2
966+ let assetOut = $t03529335717._1
967+ let poolAmountInBalance = $t03529335717._2
966968 let poolConfig = gpc()
967969 let amId = poolConfig[idxAmAsId]
968970 let prId = poolConfig[idxPrAsId]
10021004 then {
10031005 let pmt = value(i.payments[0])
10041006 let assetIn = assetIdToString(pmt.assetId)
1005- let $t03713337527 = if ((isReverse == false))
1007+ let $t03715337547 = if ((isReverse == false))
10061008 then {
10071009 let assetOut = strf(this, pa())
10081010 let poolAmountInBalance = (getAccBalance(assetIn) - value(i.payments[0]).amount)
10131015 let poolAmountInBalance = (getAccBalance(assetIn) - value(i.payments[0]).amount)
10141016 $Tuple2(assetOut, poolAmountInBalance)
10151017 }
1016- let assetOut = $t03713337527._1
1017- let poolAmountInBalance = $t03713337527._2
1018+ let assetOut = $t03715337547._1
1019+ let poolAmountInBalance = $t03715337547._2
10181020 let poolConfig = gpc()
10191021 let amId = poolConfig[idxAmAsId]
10201022 let prId = poolConfig[idxPrAsId]
11541156 else throw("Strict value is not equal to itself.")
11551157 }
11561158 else [ScriptTransfer(i.caller, emitLpAmt, lpAssetId)]
1157- let $t04214642288 = refreshDLpInternal(0, 0, 0)
1158- let refreshDLpActions = $t04214642288._1
1159- let updatedDLp = $t04214642288._2
1159+ let $t04216642308 = refreshDLpInternal(0, 0, 0)
1160+ let refreshDLpActions = $t04216642308._1
1161+ let updatedDLp = $t04216642308._2
11601162 let check = if ((updatedDLp >= currentDLp))
11611163 then true
11621164 else throwErr(makeString(["updated DLp lower than current DLp", toString(amountAssetBalance), toString(priceAssetBalance), toString(lpAssetEmission), toString(currentDLp), toString(updatedDLp), toString(amDiff), toString(prDiff)], " "))
12291231 else calcCurrentDLp(toBigInt(0), toBigInt(pmtAmt), toBigInt(0))
12301232 if ((currentDLp == currentDLp))
12311233 then {
1232- let $t04392944087 = calcPutOneTkn(pmtAmt, pmtAssetId, toString(userAddress), toBase58String(i.transactionId), true)
1233- if (($t04392944087 == $t04392944087))
1234+ let $t04394944107 = calcPutOneTkn(pmtAmt, pmtAssetId, toString(userAddress), toBase58String(i.transactionId), true)
1235+ if (($t04394944107 == $t04394944107))
12341236 then {
1235- let feeAmount = $t04392944087._3
1236- let state = $t04392944087._2
1237- let estimLP = $t04392944087._1
1237+ let feeAmount = $t04394944107._3
1238+ let state = $t04394944107._2
1239+ let estimLP = $t04394944107._1
12381240 let emitLpAmt = if (if ((minOutAmount > 0))
12391241 then (minOutAmount > estimLP)
12401242 else false)
12621264 let sendFeeToMatcher = if ((feeAmount > 0))
12631265 then [ScriptTransfer(feeCollectorAddress, feeAmount, fromBase58String(pmtAssetId))]
12641266 else nil
1265- let $t04497245321 = if ((this == feeCollectorAddress))
1267+ let $t04499245341 = if ((this == feeCollectorAddress))
12661268 then $Tuple2(0, 0)
12671269 else {
12681270 let paymentInAmountAsset = if ((pmt.assetId == cfgAmountAssetId))
12721274 then $Tuple2(-(feeAmount), 0)
12731275 else $Tuple2(0, -(feeAmount))
12741276 }
1275- let amountAssetBalanceDelta = $t04497245321._1
1276- let priceAssetBalanceDelta = $t04497245321._2
1277- let $t04532445432 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
1278- let refreshDLpActions = $t04532445432._1
1279- let updatedDLp = $t04532445432._2
1277+ let amountAssetBalanceDelta = $t04499245341._1
1278+ let priceAssetBalanceDelta = $t04499245341._2
1279+ let $t04534445452 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
1280+ let refreshDLpActions = $t04534445452._1
1281+ let updatedDLp = $t04534445452._2
12801282 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
12811283 if ((isUpdatedDLpValid == isUpdatedDLpValid))
12821284 then $Tuple2((((state ++ lpTrnsfr) ++ sendFeeToMatcher) ++ refreshDLpActions), emitLpAmt)
13081310 let currentDLp = calcCurrentDLp(amAssetPmt, prAssetPmt, toBigInt(0))
13091311 if ((currentDLp == currentDLp))
13101312 then {
1311- let $t04646246527 = refreshDLpInternal(0, 0, 0)
1312- let refreshDLpActions = $t04646246527._1
1313- let updatedDLp = $t04646246527._2
1313+ let $t04648246547 = refreshDLpInternal(0, 0, 0)
1314+ let refreshDLpActions = $t04648246547._1
1315+ let updatedDLp = $t04648246547._2
13141316 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
13151317 if ((isUpdatedDLpValid == isUpdatedDLpValid))
13161318 then (state ++ refreshDLpActions)
13351337 let b = invoke(fca, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
13361338 if ((b == b))
13371339 then {
1338- let $t04770047782 = refreshDLpInternal(-(outAmtAmt), -(outPrAmt), 0)
1339- let refreshDLpActions = $t04770047782._1
1340- let updatedDLp = $t04770047782._2
1340+ let $t04772047802 = refreshDLpInternal(-(outAmtAmt), -(outPrAmt), 0)
1341+ let refreshDLpActions = $t04772047802._1
1342+ let updatedDLp = $t04772047802._2
13411343 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
13421344 if ((isUpdatedDLpValid == isUpdatedDLpValid))
13431345 then (state ++ refreshDLpActions)
13721374 else throwErr("exactly 1 payment are expected")]
13731375 if ((checks == checks))
13741376 then {
1375- let $t04840048555 = getOneTknV2Internal(outAssetId, minOutAmount, i.payments, i.caller, i.originCaller, i.transactionId)
1376- let state = $t04840048555._1
1377- let totalAmount = $t04840048555._2
1377+ let $t04842048575 = getOneTknV2Internal(outAssetId, minOutAmount, i.payments, i.caller, i.originCaller, i.transactionId)
1378+ let state = $t04842048575._1
1379+ let totalAmount = $t04842048575._2
13781380 $Tuple2(state, totalAmount)
13791381 }
13801382 else throw("Strict value is not equal to itself.")
13911393 if ((checkLastRefreshedBlockHeight == checkLastRefreshedBlockHeight))
13921394 then {
13931395 let dLp = valueOrErrorMessage(parseBigInt(valueOrElse(getString(this, keyDLp), "0")), fmtErr("invalid dLp"))
1394- let $t04907949143 = refreshDLpInternal(0, 0, 0)
1395- let dLpUpdateActions = $t04907949143._1
1396- let updatedDLp = $t04907949143._2
1396+ let $t04909949163 = refreshDLpInternal(0, 0, 0)
1397+ let dLpUpdateActions = $t04909949163._1
1398+ let updatedDLp = $t04909949163._2
13971399 let actions = if ((dLp != updatedDLp))
13981400 then dLpUpdateActions
13991401 else throwErr("nothing to refresh")
14211423 let newY = getYD(xp, index, D1)
14221424 let dy = (xp[index] - newY)
14231425 let totalGetRaw = max([0, toInt((dy - big1))])
1424- let $t05015350208 = takeFee(totalGetRaw, outFee)
1425- let totalGet = $t05015350208._1
1426- let feeAmount = $t05015350208._2
1426+ let $t05017350228 = takeFee(totalGetRaw, outFee)
1427+ let totalGet = $t05017350228._1
1428+ let feeAmount = $t05017350228._2
14271429 $Tuple2(nil, $Tuple2(totalGet, feeAmount))
14281430 }
14291431
14361438 let lpId = toBase58String(value(cfgLpAssetId))
14371439 let amBalance = getAccBalance(amId)
14381440 let prBalance = getAccBalance(prId)
1439- let $t05058350698 = {
1441+ let $t05060350718 = {
14401442 let @ = invoke(this, "getOneTknV2READONLY", [outAssetId, lpAssetAmount], nil)
14411443 if ($isInstanceOf(@, "(Int, Int)"))
14421444 then @
14431445 else throw(($getType(@) + " couldn't be cast to (Int, Int)"))
14441446 }
1445- let totalGet = $t05058350698._1
1446- let feeAmount = $t05058350698._2
1447+ let totalGet = $t05060350718._1
1448+ let feeAmount = $t05060350718._2
14471449 let r = ego("", lpId, lpAssetAmount, this)
14481450 let outAmAmt = r._1
14491451 let outPrAmt = r._2
14771479 let burnLPAssetOnFactory = invoke(fca, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
14781480 if ((burnLPAssetOnFactory == burnLPAssetOnFactory))
14791481 then {
1480- let $t05186451945 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1481- let refreshDLpActions = $t05186451945._1
1482- let updatedDLp = $t05186451945._2
1482+ let $t05188451965 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1483+ let refreshDLpActions = $t05188451965._1
1484+ let updatedDLp = $t05188451965._2
14831485 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
14841486 if ((isUpdatedDLpValid == isUpdatedDLpValid))
14851487 then (state ++ refreshDLpActions)
15241526 let burnA = invoke(fca, "burn", [amount], [AttachedPayment(lpAssetId, amount)])
15251527 if ((burnA == burnA))
15261528 then {
1527- let $t05297253053 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1528- let refreshDLpActions = $t05297253053._1
1529- let updatedDLp = $t05297253053._2
1529+ let $t05299253073 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1530+ let refreshDLpActions = $t05299253073._1
1531+ let updatedDLp = $t05299253073._2
15301532 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
15311533 if ((isUpdatedDLpValid == isUpdatedDLpValid))
15321534 then (state ++ refreshDLpActions)
15771579 let burnLPAssetOnFactory = invoke(fca, "burn", [unstakeAmount], [AttachedPayment(cfgLpAssetId, unstakeAmount)])
15781580 if ((burnLPAssetOnFactory == burnLPAssetOnFactory))
15791581 then {
1580- let $t05430454385 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1581- let refreshDLpActions = $t05430454385._1
1582- let updatedDLp = $t05430454385._2
1582+ let $t05432454405 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1583+ let refreshDLpActions = $t05432454405._1
1584+ let updatedDLp = $t05432454405._2
15831585 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
15841586 if ((isUpdatedDLpValid == isUpdatedDLpValid))
15851587 then (state ++ refreshDLpActions)
16281630 let unstakeInv = invoke(staking, "unstakeINTERNAL", [lpAssetId, unstakeAmount, userAddress.bytes, lpAssetRecipientAddress.bytes], nil)
16291631 if ((unstakeInv == unstakeInv))
16301632 then {
1631- let $t05540755595 = getOneTknV2Internal(outAssetId, minOutAmount, [AttachedPayment(lpAssetId, unstakeAmount)], i.caller, i.originCaller, i.transactionId)
1632- let state = $t05540755595._1
1633- let totalAmount = $t05540755595._2
1633+ let $t05542755615 = getOneTknV2Internal(outAssetId, minOutAmount, [AttachedPayment(lpAssetId, unstakeAmount)], i.caller, i.originCaller, i.transactionId)
1634+ let state = $t05542755615._1
1635+ let totalAmount = $t05542755615._2
16341636 $Tuple2(state, totalAmount)
16351637 }
16361638 else throw("Strict value is not equal to itself.")
16421644
16431645 @Callable(i)
16441646 func putOneTknV2WithBonusREADONLY (paymentAmountRaw,paymentAssetId) = {
1645- let $t05572355826 = calcPutOneTkn(paymentAmountRaw, paymentAssetId, "", "", true)
1646- let lpAmount = $t05572355826._1
1647- let state = $t05572355826._2
1648- let feeAmount = $t05572355826._3
1649- let bonus = $t05572355826._4
1647+ let $t05574355846 = calcPutOneTkn(paymentAmountRaw, paymentAssetId, "", "", true)
1648+ let lpAmount = $t05574355846._1
1649+ let state = $t05574355846._2
1650+ let feeAmount = $t05574355846._3
1651+ let bonus = $t05574355846._4
16501652 $Tuple2(nil, $Tuple3(lpAmount, feeAmount, bonus))
16511653 }
16521654
16541656
16551657 @Callable(i)
16561658 func putOneTknV2WithoutTakeFeeREADONLY (paymentAmountRaw,paymentAssetId) = {
1657- let $t05597456078 = calcPutOneTkn(paymentAmountRaw, paymentAssetId, "", "", false)
1658- let lpAmount = $t05597456078._1
1659- let state = $t05597456078._2
1660- let feeAmount = $t05597456078._3
1661- let bonus = $t05597456078._4
1659+ let $t05599456098 = calcPutOneTkn(paymentAmountRaw, paymentAssetId, "", "", false)
1660+ let lpAmount = $t05599456098._1
1661+ let state = $t05599456098._2
1662+ let feeAmount = $t05599456098._3
1663+ let bonus = $t05599456098._4
16621664 $Tuple2(nil, $Tuple3(lpAmount, feeAmount, bonus))
16631665 }
16641666
16671669 @Callable(i)
16681670 func activate (amtAsStr,prAsStr) = if ((toString(i.caller) != toString(fca)))
16691671 then throw("denied")
1670- else $Tuple2([StringEntry(aa(), amtAsStr), StringEntry(pa(), prAsStr)], "success")
1672+ else $Tuple2([StringEntry(aa(), amtAsStr), StringEntry(pa(), prAsStr), StringEntry(amp(), toString(ampInitial))], "success")
16711673
16721674
16731675
17201722 @Callable(i)
17211723 func changeAmp () = {
17221724 let cfg = invoke(fca, "getChangeAmpConfigREADONLY", [toString(this)], nil)
1723- let $t05843258631 = match cfg {
1725+ let $t05850758706 = match cfg {
17241726 case list: List[Any] =>
17251727 $Tuple3({
17261728 let @ = list[0]
17411743 case _ =>
17421744 throwErr("invalid entry type")
17431745 }
1744- let delay = $t05843258631._1
1745- let delta = $t05843258631._2
1746- let target = $t05843258631._3
1746+ let delay = $t05850758706._1
1747+ let delta = $t05850758706._2
1748+ let target = $t05850758706._3
17471749 let curAmp = parseIntValue(getStringValue(amp()))
17481750 let newAmpRaw = (curAmp + delta)
17491751 let newAmp = if ((0 > delta))
17791781 match tx {
17801782 case order: Order =>
17811783 let matcherPub = mp()
1782- let $t05954359660 = if (skipOrderValidation())
1784+ let $t05961859735 = if (skipOrderValidation())
17831785 then $Tuple2(true, "")
17841786 else validateMatcherOrderAllowed(order)
1785- let orderValid = $t05954359660._1
1786- let orderValidInfo = $t05954359660._2
1787+ let orderValid = $t05961859735._1
1788+ let orderValidInfo = $t05961859735._2
17871789 let senderValid = sigVerify(order.bodyBytes, order.proofs[0], order.senderPublicKey)
17881790 let matcherValid = sigVerify(order.bodyBytes, order.proofs[1], matcherPub)
17891791 if (if (if (orderValid)
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let scale8 = 100000000
55
66 let scale8BigInt = toBigInt(100000000)
77
88 let scale18 = toBigInt(1000000000000000000)
99
1010 let zeroBigInt = toBigInt(0)
1111
1212 let big0 = toBigInt(0)
1313
1414 let big1 = toBigInt(1)
1515
1616 let big2 = toBigInt(2)
1717
1818 let big3 = toBigInt(3)
1919
2020 let big4 = toBigInt(4)
2121
2222 let slippage4D = toBigInt((scale8 - ((scale8 * 1) / scale8)))
2323
2424 let wavesString = "WAVES"
25+
26+let ampInitial = 50
2527
2628 let Amult = "100"
2729
2830 let Dconv = "1"
2931
3032 let SEP = "__"
3133
3234 let EMPTY = ""
3335
3436 let PoolActive = 1
3537
3638 let PoolPutDis = 2
3739
3840 let PoolMatcherDis = 3
3941
4042 let PoolShutdown = 4
4143
4244 let idxPoolAddress = 1
4345
4446 let idxPoolSt = 2
4547
4648 let idxLPAsId = 3
4749
4850 let idxAmAsId = 4
4951
5052 let idxPrAsId = 5
5153
5254 let idxAmtAsDcm = 6
5355
5456 let idxPriceAsDcm = 7
5557
5658 let idxIAmtAsId = 8
5759
5860 let idxIPriceAsId = 9
5961
6062 let idxFactStakCntr = 1
6163
6264 let idxFactoryRestCntr = 6
6365
6466 let idxFactSlippCntr = 7
6567
6668 let idxFactGwxRewCntr = 10
6769
6870 let feeDefault = fraction(10, scale8, 10000)
6971
7072 func t1 (origVal,origScaleMult) = fraction(toBigInt(origVal), scale18, toBigInt(origScaleMult))
7173
7274
7375 func t1BigInt (origVal,origScaleMult) = fraction(origVal, scale18, origScaleMult)
7476
7577
7678 func f1 (val,resultScaleMult) = toInt(fraction(val, toBigInt(resultScaleMult), scale18))
7779
7880
7981 func fromX18Round (val,resultScaleMult,round) = toInt(fraction(val, toBigInt(resultScaleMult), scale18, round))
8082
8183
8284 func t2 (origVal,origScaleMult) = fraction(origVal, scale18, toBigInt(origScaleMult))
8385
8486
8587 func f2 (val,resultScaleMult) = fraction(val, toBigInt(resultScaleMult), scale18)
8688
8789
8890 func ts (amt,resScale,curScale) = fraction(amt, resScale, curScale)
8991
9092
9193 func abs (val) = if ((zeroBigInt > val))
9294 then -(val)
9395 else val
9496
9597
9698 func absBigInt (val) = if ((zeroBigInt > val))
9799 then -(val)
98100 else val
99101
100102
101103 func fc () = "%s__factoryContract"
102104
103105
104106 func mpk () = "%s__managerPublicKey"
105107
106108
107109 func pmpk () = "%s__pendingManagerPublicKey"
108110
109111
110112 func pl () = "%s%s__price__last"
111113
112114
113115 func ph (h,t) = makeString(["%s%s%d%d__price__history", toString(h), toString(t)], SEP)
114116
115117
116118 func pau (ua,txId) = ((("%s%s%s__P__" + ua) + "__") + txId)
117119
118120
119121 func gau (ua,txId) = ((("%s%s%s__G__" + ua) + "__") + txId)
120122
121123
122124 func aa () = "%s__amountAsset"
123125
124126
125127 func pa () = "%s__priceAsset"
126128
127129
128130 func amp () = "%s__amp"
129131
130132
131133 func keyAmpHistory (heightBlocks) = ("%s%d__amp__" + toString(heightBlocks))
132134
133135
134136 func keyChangeAmpLastCall () = "%s__changeAmpLastCall"
135137
136138
137139 let keyFee = "%s__fee"
138140
139141 let fee = valueOrElse(getInteger(this, keyFee), feeDefault)
140142
141143 let keyDLp = makeString(["%s", "dLp"], SEP)
142144
143145 let keyDLpRefreshedHeight = makeString(["%s", "dLpRefreshedHeight"], SEP)
144146
145147 let keyDLpRefreshDelay = makeString(["%s", "refreshDLpDelay"], SEP)
146148
147149 let dLpRefreshDelayDefault = 30
148150
149151 let dLpRefreshDelay = valueOrElse(getInteger(this, keyDLpRefreshDelay), dLpRefreshDelayDefault)
150152
151153 func fcfg () = "%s__factoryConfig"
152154
153155
154156 func mtpk () = "%s%s__matcher__publicKey"
155157
156158
157159 func pc (iAmtAs,iPrAs) = (((("%d%d%s__" + iAmtAs) + "__") + iPrAs) + "__config")
158160
159161
160162 func mba (bAStr) = ("%s%s%s__mappings__baseAsset2internalId__" + bAStr)
161163
162164
163165 func aps () = "%s__shutdown"
164166
165167
166168 func keyAllowedLpStableScriptHash () = "%s__allowedLpStableScriptHash"
167169
168170
169171 func keyFeeCollectorAddress () = "%s__feeCollectorAddress"
170172
171173
172174 func keySkipOrderValidation (poolAddress) = ("%s%s__skipOrderValidation__" + poolAddress)
173175
174176
175177 func throwOrderError (orderValid,orderValidInfo,senderValid,matcherValid) = throw((((((((("order validation failed: orderValid=" + toString(orderValid)) + " (") + orderValidInfo) + ")") + " senderValid=") + toString(senderValid)) + " matcherValid=") + toString(matcherValid)))
176178
177179
178180 func strf (addr,key) = valueOrErrorMessage(getString(addr, key), makeString(["mandatory ", toString(addr), ".", key, " not defined"], ""))
179181
180182
181183 func intf (addr,key) = valueOrErrorMessage(getInteger(addr, key), makeString(["mandatory ", toString(addr), ".", key, " not defined"], ""))
182184
183185
184186 func throwErr (msg) = throw(makeString(["lp_stable.ride:", msg], " "))
185187
186188
187189 func fmtErr (msg) = makeString(["lp_stable.ride:", msg], " ")
188190
189191
190192 let fca = addressFromStringValue(strf(this, fc()))
191193
192194 let inFee = {
193195 let @ = invoke(fca, "getInFeeREADONLY", [toString(this)], nil)
194196 if ($isInstanceOf(@, "Int"))
195197 then @
196198 else throw(($getType(@) + " couldn't be cast to Int"))
197199 }
198200
199201 let outFee = {
200202 let @ = invoke(fca, "getOutFeeREADONLY", [toString(this)], nil)
201203 if ($isInstanceOf(@, "Int"))
202204 then @
203205 else throw(($getType(@) + " couldn't be cast to Int"))
204206 }
205207
206208 let A = strf(this, amp())
207209
208210 func igs () = valueOrElse(getBoolean(fca, aps()), false)
209211
210212
211213 func mp () = fromBase58String(strf(fca, mtpk()))
212214
213215
214216 let feeCollectorAddress = addressFromStringValue(strf(fca, keyFeeCollectorAddress()))
215217
216218 func gpc () = {
217219 let amtAs = strf(this, aa())
218220 let priceAs = strf(this, pa())
219221 let iPriceAs = intf(fca, mba(priceAs))
220222 let iAmtAs = intf(fca, mba(amtAs))
221223 split(strf(fca, pc(toString(iAmtAs), toString(iPriceAs))), SEP)
222224 }
223225
224226
225227 func parseAssetId (input) = if ((input == wavesString))
226228 then unit
227229 else fromBase58String(input)
228230
229231
230232 func assetIdToString (input) = if ((input == unit))
231233 then wavesString
232234 else toBase58String(value(input))
233235
234236
235237 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]))
236238
237239
238240 let poolConfigParsed = parsePoolConfig(gpc())
239241
240-let $t081658394 = poolConfigParsed
242+let $t081858414 = poolConfigParsed
241243
242-let cfgPoolAddress = $t081658394._1
244+let cfgPoolAddress = $t081858414._1
243245
244-let cfgPoolStatus = $t081658394._2
246+let cfgPoolStatus = $t081858414._2
245247
246-let cfgLpAssetId = $t081658394._3
248+let cfgLpAssetId = $t081858414._3
247249
248-let cfgAmountAssetId = $t081658394._4
250+let cfgAmountAssetId = $t081858414._4
249251
250-let cfgPriceAssetId = $t081658394._5
252+let cfgPriceAssetId = $t081858414._5
251253
252-let cfgAmountAssetDecimals = $t081658394._6
254+let cfgAmountAssetDecimals = $t081858414._6
253255
254-let cfgPriceAssetDecimals = $t081658394._7
256+let cfgPriceAssetDecimals = $t081858414._7
255257
256-let cfgInAmountAssedId = $t081658394._8
258+let cfgInAmountAssedId = $t081858414._8
257259
258-let cfgInPriceAssetId = $t081658394._9
260+let cfgInPriceAssetId = $t081858414._9
259261
260262 func gfc () = split(strf(fca, fcfg()), SEP)
261263
262264
263265 let factoryConfig = gfc()
264266
265267 let stakingContract = valueOrErrorMessage(addressFromString(factoryConfig[idxFactStakCntr]), "Invalid staking contract address")
266268
267269 let slipageContract = valueOrErrorMessage(addressFromString(factoryConfig[idxFactSlippCntr]), "Invalid slipage contract address")
268270
269271 let gwxContract = valueOrErrorMessage(addressFromString(factoryConfig[idxFactGwxRewCntr]), "Invalid gwx contract address")
270272
271273 let restContract = valueOrErrorMessage(addressFromString(factoryConfig[idxFactoryRestCntr]), "Invalid gwx contract address")
272274
273275 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)
274276
275277
276278 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)
277279
278280
279281 func getAccBalance (assetId) = if ((assetId == "WAVES"))
280282 then wavesBalance(this).available
281283 else assetBalance(this, fromBase58String(assetId))
282284
283285
284286 func cpbi (prAmtX18,amAmtX18) = fraction(prAmtX18, scale18, amAmtX18)
285287
286288
287289 func cpbir (prAmtX18,amAmtX18,round) = fraction(prAmtX18, scale18, amAmtX18, round)
288290
289291
290292 func vad (A1,A2,slippage) = {
291293 let diff = fraction((A1 - A2), scale8BigInt, A2)
292294 let pass = ((slippage - abs(diff)) > zeroBigInt)
293295 if (!(pass))
294296 then throw(("Big slpg: " + toString(diff)))
295297 else $Tuple2(pass, min([A1, A2]))
296298 }
297299
298300
299301 func vd (D1,D0,slpg) = {
300302 let diff = fraction(D0, scale8BigInt, D1)
301303 let fail = (slpg > diff)
302304 if (if (fail)
303305 then true
304306 else (D0 > D1))
305307 then throw(((((((toString(D0) + " ") + toString(D1)) + " ") + toString(diff)) + " ") + toString(slpg)))
306308 else fail
307309 }
308310
309311
310312 func pcp (amAssetDcm,prAssetDcm,amAmt,prAmt) = {
311313 let amtAsAmtX18 = t1(amAmt, amAssetDcm)
312314 let prAsAmtX18 = t1(prAmt, prAssetDcm)
313315 cpbi(prAsAmtX18, amtAsAmtX18)
314316 }
315317
316318
317319 func calcPrices (amAmt,prAmt,lpAmt) = {
318320 let amtAsDcm = cfgAmountAssetDecimals
319321 let prAsDcm = cfgPriceAssetDecimals
320322 let priceX18 = pcp(amtAsDcm, prAsDcm, amAmt, prAmt)
321323 let amAmtX18 = t1(amAmt, amtAsDcm)
322324 let prAmtX18 = t1(prAmt, prAsDcm)
323325 let lpAmtX18 = t1(lpAmt, scale8)
324326 let lpPrInAmAsX18 = cpbi(amAmtX18, lpAmtX18)
325327 let lpPrInPrAsX18 = cpbi(prAmtX18, lpAmtX18)
326328 [priceX18, lpPrInAmAsX18, lpPrInPrAsX18]
327329 }
328330
329331
330332 func calculatePrices (amAmt,prAmt,lpAmt) = {
331333 let p = calcPrices(amAmt, prAmt, lpAmt)
332334 [f1(p[0], scale8), f1(p[1], scale8), f1(p[2], scale8)]
333335 }
334336
335337
336338 func takeFee (amount,fee) = {
337339 let feeAmount = if ((fee == 0))
338340 then 0
339341 else fraction(amount, fee, scale8)
340342 $Tuple2((amount - feeAmount), feeAmount)
341343 }
342344
343345
344346 func getD (xp) = {
345347 let xp0 = xp[0]
346348 let xp1 = xp[1]
347349 let s = (xp0 + xp1)
348350 if ((s == big0))
349351 then big0
350352 else {
351353 let a = parseIntValue(A)
352354 let ann = (a * 2)
353355 let p = fraction(xp0, xp1, big1)
354356 let xp0_xp1_n_n = fraction(p, big4, big1)
355357 let ann_s = fraction(toBigInt(ann), s, big1)
356358 let ann_1 = toBigInt((ann - 1))
357359 func calcDNext (d) = {
358360 let dd = fraction(d, d, big1)
359361 let ddd = fraction(dd, d, big1)
360362 let dp = fraction(ddd, big1, xp0_xp1_n_n)
361363 fraction((ann_s + fraction(dp, big2, big1)), d, (fraction(ann_1, d, big1) + fraction(big3, dp, big1)))
362364 }
363365
364366 func calc (acc,i) = if (acc._2)
365367 then acc
366368 else {
367369 let d = acc._1
368370 let dNext = calcDNext(d)
369371 let dDiffRaw = (dNext - value(d))
370372 let dDiff = if ((big0 > dDiffRaw))
371373 then -(dDiffRaw)
372374 else dDiffRaw
373375 if ((big1 >= dDiff))
374376 then $Tuple2(dNext, true)
375377 else $Tuple2(dNext, false)
376378 }
377379
378380 let arr = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16]
379- let $t01289912947 = {
381+ let $t01291912967 = {
380382 let $l = arr
381383 let $s = size($l)
382384 let $acc0 = $Tuple2(s, false)
383385 func $f0_1 ($a,$i) = if (($i >= $s))
384386 then $a
385387 else calc($a, $l[$i])
386388
387389 func $f0_2 ($a,$i) = if (($i >= $s))
388390 then $a
389391 else throw("List size exceeds 17")
390392
391393 $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)
392394 }
393- let d = $t01289912947._1
394- let found = $t01289912947._2
395+ let d = $t01291912967._1
396+ let found = $t01291912967._2
395397 if (found)
396398 then d
397399 else throw(("D calculation error, D = " + toString(d)))
398400 }
399401 }
400402
401403
402404 func ego (txId58,pmtAssetId,pmtLpAmt,userAddress) = {
403405 let lpId = cfgLpAssetId
404406 let amId = toBase58String(value(cfgAmountAssetId))
405407 let prId = toBase58String(value(cfgPriceAssetId))
406408 let amDcm = cfgAmountAssetDecimals
407409 let prDcm = cfgPriceAssetDecimals
408410 let sts = toString(cfgPoolStatus)
409411 let lpEmiss = valueOrErrorMessage(assetInfo(lpId), "Wrong LP id").quantity
410412 if ((toBase58String(lpId) != pmtAssetId))
411413 then throw("Wrong pmt asset")
412414 else {
413415 let amBalance = getAccBalance(amId)
414416 let amBalanceX18 = t1(amBalance, amDcm)
415417 let prBalance = getAccBalance(prId)
416418 let prBalanceX18 = t1(prBalance, prDcm)
417419 let curPriceX18 = cpbi(prBalanceX18, amBalanceX18)
418420 let curPrice = f1(curPriceX18, scale8)
419421 let pmtLpAmtX18 = t1(pmtLpAmt, scale8)
420422 let lpEmissX18 = t1(lpEmiss, scale8)
421423 let outAmAmtX18 = fraction(amBalanceX18, pmtLpAmtX18, lpEmissX18)
422424 let outPrAmtX18 = fraction(prBalanceX18, pmtLpAmtX18, lpEmissX18)
423425 let outAmAmt = fromX18Round(outAmAmtX18, amDcm, FLOOR)
424426 let outPrAmt = fromX18Round(outPrAmtX18, prDcm, FLOOR)
425427 let state = if ((txId58 == ""))
426428 then nil
427429 else [ScriptTransfer(userAddress, outAmAmt, if ((amId == "WAVES"))
428430 then unit
429431 else fromBase58String(amId)), ScriptTransfer(userAddress, outPrAmt, if ((prId == "WAVES"))
430432 then unit
431433 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)]
432434 $Tuple10(outAmAmt, outPrAmt, amId, prId, amBalance, prBalance, lpEmiss, curPriceX18, sts, state)
433435 }
434436 }
435437
436438
437439 func epo (txId58,slippage,inAmAmt,inAmId,inPrAmt,inPrId,userAddress,isEval,emitLp,isOneAsset,validateSlippage,pmtAmt,pmtId) = {
438440 let lpId = cfgLpAssetId
439441 let amIdStr = toBase58String(value(cfgAmountAssetId))
440442 let prIdStr = toBase58String(value(cfgPriceAssetId))
441443 let inAmIdStr = cfgInAmountAssedId
442444 let inPrIdStr = cfgInPriceAssetId
443445 let amtDcm = cfgAmountAssetDecimals
444446 let priceDcm = cfgPriceAssetDecimals
445447 let sts = toString(cfgPoolStatus)
446448 let lpEm = valueOrErrorMessage(assetInfo(lpId), "Wr lp as").quantity
447449 let amBalance = if (isEval)
448450 then getAccBalance(amIdStr)
449451 else if (if (isOneAsset)
450452 then (pmtId == amIdStr)
451453 else false)
452454 then (getAccBalance(amIdStr) - pmtAmt)
453455 else if (isOneAsset)
454456 then getAccBalance(amIdStr)
455457 else (getAccBalance(amIdStr) - inAmAmt)
456458 let prBalance = if (isEval)
457459 then getAccBalance(prIdStr)
458460 else if (if (isOneAsset)
459461 then (pmtId == prIdStr)
460462 else false)
461463 then (getAccBalance(prIdStr) - pmtAmt)
462464 else if (isOneAsset)
463465 then getAccBalance(prIdStr)
464466 else (getAccBalance(prIdStr) - inPrAmt)
465467 let inAmAssetAmtX18 = t1(inAmAmt, amtDcm)
466468 let inPrAssetAmtX18 = t1(inPrAmt, priceDcm)
467469 let userPriceX18 = cpbi(inPrAssetAmtX18, inAmAssetAmtX18)
468470 let amBalanceX18 = t1(amBalance, amtDcm)
469471 let prBalanceX18 = t1(prBalance, priceDcm)
470472 let D0 = getD([amBalanceX18, prBalanceX18])
471473 let r = if ((lpEm == 0))
472474 then {
473475 let D1 = getD([(amBalanceX18 + inAmAssetAmtX18), (prBalanceX18 + inPrAssetAmtX18)])
474476 let checkD = if ((D1 > D0))
475477 then true
476478 else throw("D1 should be greater than D0")
477479 if ((checkD == checkD))
478480 then {
479481 let curPriceX18 = zeroBigInt
480482 let slippageX18 = zeroBigInt
481483 let lpAmtX18 = D1
482484 $Tuple5(f1(lpAmtX18, scale8), f1(inAmAssetAmtX18, amtDcm), f1(inPrAssetAmtX18, priceDcm), cpbi((prBalanceX18 + inPrAssetAmtX18), (amBalanceX18 + inAmAssetAmtX18)), slippageX18)
483485 }
484486 else throw("Strict value is not equal to itself.")
485487 }
486488 else {
487489 let curPriceX18 = cpbi(prBalanceX18, amBalanceX18)
488490 let slippageRealX18 = fraction(abs((curPriceX18 - userPriceX18)), scale18, curPriceX18)
489491 let slippageX18 = t1(slippage, scale8)
490492 if (if (if (validateSlippage)
491493 then (curPriceX18 != zeroBigInt)
492494 else false)
493495 then (slippageRealX18 > slippageX18)
494496 else false)
495497 then throw(((("Price slippage " + toString(slippageRealX18)) + " > ") + toString(slippageX18)))
496498 else {
497499 let lpEmissionX18 = t1(lpEm, scale8)
498500 let prViaAmX18 = fraction(inAmAssetAmtX18, cpbir(prBalanceX18, amBalanceX18, CEILING), scale18, CEILING)
499501 let amViaPrX18 = fraction(inPrAssetAmtX18, scale18, cpbir(prBalanceX18, amBalanceX18, FLOOR), CEILING)
500502 let expectedAmts = if ((prViaAmX18 > inPrAssetAmtX18))
501503 then $Tuple2(amViaPrX18, inPrAssetAmtX18)
502504 else $Tuple2(inAmAssetAmtX18, prViaAmX18)
503505 let expAmtAssetAmtX18 = expectedAmts._1
504506 let expPriceAssetAmtX18 = expectedAmts._2
505507 let D1 = getD([(amBalanceX18 + expAmtAssetAmtX18), (prBalanceX18 + expPriceAssetAmtX18)])
506508 let checkD = if ((D1 > D0))
507509 then true
508510 else throw("D1 should be greater than D0")
509511 if ((checkD == checkD))
510512 then {
511513 let lpAmtX18 = fraction(lpEmissionX18, (D1 - D0), D0)
512514 $Tuple5(fromX18Round(lpAmtX18, scale8, FLOOR), fromX18Round(expAmtAssetAmtX18, amtDcm, CEILING), fromX18Round(expPriceAssetAmtX18, priceDcm, CEILING), curPriceX18, slippageX18)
513515 }
514516 else throw("Strict value is not equal to itself.")
515517 }
516518 }
517519 let calcLpAmt = r._1
518520 let calcAmAssetPmt = r._2
519521 let calcPrAssetPmt = r._3
520522 let curPrice = f1(r._4, scale8)
521523 let slippageCalc = f1(r._5, scale8)
522524 if ((0 >= calcLpAmt))
523525 then throw("LP <= 0")
524526 else {
525527 let emitLpAmt = if (!(emitLp))
526528 then 0
527529 else calcLpAmt
528530 let amDiff = (inAmAmt - calcAmAssetPmt)
529531 let prDiff = (inPrAmt - calcPrAssetPmt)
530- let $t02078621131 = if (if (isOneAsset)
532+ let $t02080621151 = if (if (isOneAsset)
531533 then (pmtId == amIdStr)
532534 else false)
533535 then $Tuple2(pmtAmt, 0)
534536 else if (if (isOneAsset)
535537 then (pmtId == prIdStr)
536538 else false)
537539 then $Tuple2(0, pmtAmt)
538540 else $Tuple2(calcAmAssetPmt, calcPrAssetPmt)
539- let writeAmAmt = $t02078621131._1
540- let writePrAmt = $t02078621131._2
541+ let writeAmAmt = $t02080621151._1
542+ let writePrAmt = $t02080621151._2
541543 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))]
542544 $Tuple13(calcLpAmt, emitLpAmt, curPrice, amBalance, prBalance, lpEm, lpId, sts, commonState, amDiff, prDiff, inAmId, inPrId)
543545 }
544546 }
545547
546548
547549 func getYD (xp,i,D) = {
548550 let n = big2
549551 let x = xp[if ((i == 0))
550552 then 1
551553 else 0]
552554 let aPrecision = parseBigIntValue(Amult)
553555 let a = (parseBigIntValue(A) * aPrecision)
554556 let s = x
555557 let ann = (a * n)
556558 let c = (((((D * D) / (x * n)) * D) * aPrecision) / (ann * n))
557559 let b = ((s + ((D * aPrecision) / ann)) - D)
558560 func calc (acc,cur) = {
559- let $t02232622346 = acc
560- let y = $t02232622346._1
561- let found = $t02232622346._2
561+ let $t02234622366 = acc
562+ let y = $t02234622366._1
563+ let found = $t02234622366._2
562564 if ((found != unit))
563565 then acc
564566 else {
565567 let yNext = (((y * y) + c) / ((big2 * y) + b))
566568 let yDiff = absBigInt((yNext - value(y)))
567569 if ((big1 >= yDiff))
568570 then $Tuple2(yNext, cur)
569571 else $Tuple2(yNext, unit)
570572 }
571573 }
572574
573575 let arr = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
574- let $t02265322700 = {
576+ let $t02267322720 = {
575577 let $l = arr
576578 let $s = size($l)
577579 let $acc0 = $Tuple2(D, unit)
578580 func $f0_1 ($a,$i) = if (($i >= $s))
579581 then $a
580582 else calc($a, $l[$i])
581583
582584 func $f0_2 ($a,$i) = if (($i >= $s))
583585 then $a
584586 else throw("List size exceeds 15")
585587
586588 $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)
587589 }
588- let y = $t02265322700._1
589- let found = $t02265322700._2
590+ let y = $t02267322720._1
591+ let found = $t02267322720._2
590592 if ((found != unit))
591593 then y
592594 else throw(("Y calculation error, Y = " + toString(y)))
593595 }
594596
595597
596598 func calcDLp (amountBalance,priceBalance,lpEmission) = {
597599 let updatedDLp = fraction(getD([t1BigInt(amountBalance, toBigInt(cfgAmountAssetDecimals)), t1BigInt(priceBalance, toBigInt(cfgPriceAssetDecimals))]), scale18, lpEmission)
598600 if ((lpEmission == big0))
599601 then big0
600602 else updatedDLp
601603 }
602604
603605
604606 func calcCurrentDLp (amountAssetDelta,priceAssetDelta,lpAssetEmissionDelta) = {
605607 let amountAssetBalance = (toBigInt(getAccBalance(assetIdToString(cfgAmountAssetId))) - amountAssetDelta)
606608 let priceAssetBalance = (toBigInt(getAccBalance(assetIdToString(cfgPriceAssetId))) - priceAssetDelta)
607609 let lpAssetEmission = (toBigInt(value(assetInfo(cfgLpAssetId)).quantity) - lpAssetEmissionDelta)
608610 let currentDLp = calcDLp(amountAssetBalance, priceAssetBalance, lpAssetEmission)
609611 currentDLp
610612 }
611613
612614
613615 func refreshDLpInternal (amountAssetBalanceDelta,priceAssetBalanceDelta,lpAssetEmissionDelta) = {
614616 let amountAssetBalance = (getAccBalance(assetIdToString(cfgAmountAssetId)) + amountAssetBalanceDelta)
615617 let priceAssetBalance = (getAccBalance(assetIdToString(cfgPriceAssetId)) + priceAssetBalanceDelta)
616618 let lpAssetEmission = (value(assetInfo(cfgLpAssetId)).quantity + lpAssetEmissionDelta)
617619 let updatedDLp = calcDLp(toBigInt(amountAssetBalance), toBigInt(priceAssetBalance), toBigInt(lpAssetEmission))
618620 let actions = [IntegerEntry(keyDLpRefreshedHeight, height), StringEntry(keyDLp, toString(updatedDLp))]
619621 $Tuple2(actions, updatedDLp)
620622 }
621623
622624
623625 func validateUpdatedDLp (oldDLp,updatedDLp) = if ((updatedDLp >= oldDLp))
624626 then true
625627 else throwErr("updated DLp lower than current DLp")
626628
627629
628630 func validateMatcherOrderAllowed (order) = {
629631 let amountAssetBalance = getAccBalance(assetIdToString(cfgAmountAssetId))
630632 let priceAssetBalance = getAccBalance(assetIdToString(cfgPriceAssetId))
631633 let amountAssetAmount = order.amount
632634 let priceAssetAmount = fraction(order.amount, order.price, scale8, FLOOR)
633- let $t02489825110 = if ((order.orderType == Buy))
635+ let $t02491825130 = if ((order.orderType == Buy))
634636 then $Tuple2(amountAssetAmount, -(priceAssetAmount))
635637 else $Tuple2(-(amountAssetAmount), priceAssetAmount)
636- let amountAssetBalanceDelta = $t02489825110._1
637- let priceAssetBalanceDelta = $t02489825110._2
638+ let amountAssetBalanceDelta = $t02491825130._1
639+ let priceAssetBalanceDelta = $t02491825130._2
638640 if (if (if (igs())
639641 then true
640642 else (cfgPoolStatus == PoolMatcherDis))
641643 then true
642644 else (cfgPoolStatus == PoolShutdown))
643645 then throw("Admin blocked")
644646 else if (if ((order.assetPair.amountAsset != cfgAmountAssetId))
645647 then true
646648 else (order.assetPair.priceAsset != cfgPriceAssetId))
647649 then throw("Wr assets")
648650 else {
649651 let dLp = parseBigIntValue(valueOrElse(getString(this, keyDLp), "0"))
650- let $t02545225552 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
651- let unusedActions = $t02545225552._1
652- let dLpNew = $t02545225552._2
652+ let $t02547225572 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
653+ let unusedActions = $t02547225572._1
654+ let dLpNew = $t02547225572._2
653655 let isOrderValid = (dLpNew >= dLp)
654656 let info = makeString(["dLp=", toString(dLp), " dLpNew=", toString(dLpNew), " amountAssetBalance=", toString(amountAssetBalance), " priceAssetBalance=", toString(priceAssetBalance), " amountAssetBalanceDelta=", toString(amountAssetBalanceDelta), " priceAssetBalanceDelta=", toString(priceAssetBalanceDelta), " height=", toString(height)], "")
655657 $Tuple2(isOrderValid, info)
656658 }
657659 }
658660
659661
660662 func cg (i) = if ((size(i.payments) != 1))
661663 then throw("1 pmnt exp")
662664 else {
663665 let pmt = value(i.payments[0])
664666 let pmtAssetId = value(pmt.assetId)
665667 let pmtAmt = pmt.amount
666668 let r = ego(toBase58String(i.transactionId), toBase58String(pmtAssetId), pmtAmt, i.caller)
667669 let outAmAmt = r._1
668670 let outPrAmt = r._2
669671 let sts = parseIntValue(r._9)
670672 let state = r._10
671673 if (if (igs())
672674 then true
673675 else (sts == PoolShutdown))
674676 then throw(("Admin blocked: " + toString(sts)))
675677 else $Tuple5(outAmAmt, outPrAmt, pmtAmt, pmtAssetId, state)
676678 }
677679
678680
679681 func cp (caller,txId,amAsPmt,prAsPmt,slippage,emitLp,isOneAsset,validateSlippage,pmtAmt,pmtId) = {
680682 let r = epo(txId, slippage, value(amAsPmt).amount, value(amAsPmt).assetId, value(prAsPmt).amount, value(prAsPmt).assetId, caller, (txId == ""), emitLp, isOneAsset, validateSlippage, pmtAmt, pmtId)
681683 let sts = parseIntValue(r._8)
682684 if (if (if (igs())
683685 then true
684686 else (sts == PoolPutDis))
685687 then true
686688 else (sts == PoolShutdown))
687689 then throw(("Blocked:" + toString(sts)))
688690 else r
689691 }
690692
691693
692694 func calcPutOneTkn (pmtAmtRaw,pmtAssetId,userAddress,txId,withTakeFee) = {
693695 let amId = toBase58String(value(cfgAmountAssetId))
694696 let prId = toBase58String(value(cfgPriceAssetId))
695697 let lpId = cfgLpAssetId
696698 let amtDcm = cfgAmountAssetDecimals
697699 let priceDcm = cfgPriceAssetDecimals
698700 let lpAssetEmission = toBigInt(valueOrErrorMessage(assetInfo(lpId), "invalid lp asset").quantity)
699701 let chechEmission = if ((lpAssetEmission > big0))
700702 then true
701703 else throw("initial deposit requires all coins")
702704 if ((chechEmission == chechEmission))
703705 then {
704706 let amBalance = getAccBalance(amId)
705707 let prBalance = getAccBalance(prId)
706- let $t02820828670 = if ((txId == ""))
708+ let $t02822828690 = if ((txId == ""))
707709 then $Tuple2(amBalance, prBalance)
708710 else if ((pmtAssetId == amId))
709711 then if ((pmtAmtRaw > amBalance))
710712 then throw("invalid payment amount")
711713 else $Tuple2((amBalance - pmtAmtRaw), prBalance)
712714 else if ((pmtAssetId == prId))
713715 then if ((pmtAmtRaw > prBalance))
714716 then throw("invalid payment amount")
715717 else $Tuple2(amBalance, (prBalance - pmtAmtRaw))
716718 else throw("wrong pmtAssetId")
717- let amBalanceOld = $t02820828670._1
718- let prBalanceOld = $t02820828670._2
719- let $t02867628852 = if ((pmtAssetId == amId))
719+ let amBalanceOld = $t02822828690._1
720+ let prBalanceOld = $t02822828690._2
721+ let $t02869628872 = if ((pmtAssetId == amId))
720722 then $Tuple2(pmtAmtRaw, 0)
721723 else if ((pmtAssetId == prId))
722724 then $Tuple2(0, pmtAmtRaw)
723725 else throw("invalid payment")
724- let amAmountRaw = $t02867628852._1
725- let prAmountRaw = $t02867628852._2
726- let $t02885629110 = if (withTakeFee)
726+ let amAmountRaw = $t02869628872._1
727+ let prAmountRaw = $t02869628872._2
728+ let $t02887629130 = if (withTakeFee)
727729 then $Tuple3(takeFee(amAmountRaw, inFee)._1, takeFee(prAmountRaw, inFee)._1, takeFee(pmtAmtRaw, inFee)._2)
728730 else $Tuple3(amAmountRaw, prAmountRaw, 0)
729- let amAmount = $t02885629110._1
730- let prAmount = $t02885629110._2
731- let feeAmount = $t02885629110._3
731+ let amAmount = $t02887629130._1
732+ let prAmount = $t02887629130._2
733+ let feeAmount = $t02887629130._3
732734 let amBalanceNew = (amBalanceOld + amAmount)
733735 let prBalanceNew = (prBalanceOld + prAmount)
734736 let D0 = getD([t1(amBalanceOld, cfgAmountAssetDecimals), t1(prBalanceOld, cfgPriceAssetDecimals)])
735737 let D1 = getD([t1(amBalanceNew, cfgAmountAssetDecimals), t1(prBalanceNew, cfgPriceAssetDecimals)])
736738 let checkD = if ((D1 > D0))
737739 then true
738740 else throw()
739741 if ((checkD == checkD))
740742 then {
741743 let lpAmount = fraction(lpAssetEmission, (D1 - D0), D0, FLOOR)
742744 let curPrice = f1(cpbi(t1(prBalanceNew, priceDcm), t1(amBalanceNew, amtDcm)), scale8)
743745 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))]
744746 let poolProportion = fraction(prBalanceOld, scale8, amBalanceOld)
745747 let amountAssetPart = fraction(pmtAmtRaw, scale8, (poolProportion + scale8))
746748 let priceAssetPart = (pmtAmtRaw - amountAssetPart)
747749 let lpAmtBoth = fraction(lpAssetEmission, toBigInt(priceAssetPart), toBigInt(prBalanceOld))
748750 let bonus = toInt(fraction((lpAmount - lpAmtBoth), scale8BigInt, lpAmtBoth))
749751 $Tuple4(toInt(lpAmount), commonState, feeAmount, bonus)
750752 }
751753 else throw("Strict value is not equal to itself.")
752754 }
753755 else throw("Strict value is not equal to itself.")
754756 }
755757
756758
757759 func getOneTknV2Internal (outAssetId,minOutAmount,payments,caller,originCaller,transactionId) = {
758760 let lpId = toBase58String(value(cfgLpAssetId))
759761 let amId = toBase58String(value(cfgAmountAssetId))
760762 let prId = toBase58String(value(cfgPriceAssetId))
761763 let amDecimals = cfgAmountAssetDecimals
762764 let prDecimals = cfgPriceAssetDecimals
763765 let poolStatus = cfgPoolStatus
764766 let userAddress = if ((caller == restContract))
765767 then originCaller
766768 else caller
767769 let pmt = value(payments[0])
768770 let pmtAssetId = value(pmt.assetId)
769771 let pmtAmt = pmt.amount
770772 let currentDLp = calcCurrentDLp(big0, big0, big0)
771773 if ((currentDLp == currentDLp))
772774 then {
773775 let txId58 = toBase58String(transactionId)
774776 if ((lpId != toBase58String(pmtAssetId)))
775777 then throw("Wrong LP")
776778 else {
777779 let amBalance = getAccBalance(amId)
778780 let prBalance = getAccBalance(prId)
779- let $t03122231333 = {
781+ let $t03124231353 = {
780782 let @ = invoke(this, "getOneTknV2READONLY", [outAssetId, pmtAmt], nil)
781783 if ($isInstanceOf(@, "(Int, Int)"))
782784 then @
783785 else throw(($getType(@) + " couldn't be cast to (Int, Int)"))
784786 }
785- if (($t03122231333 == $t03122231333))
787+ if (($t03124231353 == $t03124231353))
786788 then {
787- let feeAmount = $t03122231333._2
788- let totalGet = $t03122231333._1
789+ let feeAmount = $t03124231353._2
790+ let totalGet = $t03124231353._1
789791 let totalAmount = if (if ((minOutAmount > 0))
790792 then (minOutAmount > totalGet)
791793 else false)
792794 then throwErr(makeString(["amount to receive is less than ", toString(minOutAmount)], ""))
793795 else totalGet
794- let $t03152331830 = if ((outAssetId == amId))
796+ let $t03154331850 = if ((outAssetId == amId))
795797 then $Tuple4(totalAmount, 0, ((amBalance - totalAmount) - feeAmount), prBalance)
796798 else if ((outAssetId == prId))
797799 then $Tuple4(0, totalAmount, amBalance, ((prBalance - totalAmount) - feeAmount))
798800 else throw("invalid out asset id")
799- let outAm = $t03152331830._1
800- let outPr = $t03152331830._2
801- let amBalanceNew = $t03152331830._3
802- let prBalanceNew = $t03152331830._4
801+ let outAm = $t03154331850._1
802+ let outPr = $t03154331850._2
803+ let amBalanceNew = $t03154331850._3
804+ let prBalanceNew = $t03154331850._4
803805 let curPrX18 = cpbi(t1(prBalanceNew, prDecimals), t1(amBalanceNew, amDecimals))
804806 let curPr = f1(curPrX18, scale8)
805807 let outAssetIdOrWaves = if ((outAssetId == "WAVES"))
806808 then unit
807809 else fromBase58String(outAssetId)
808810 let sendFeeToMatcher = if ((feeAmount > 0))
809811 then [ScriptTransfer(feeCollectorAddress, feeAmount, outAssetIdOrWaves)]
810812 else nil
811813 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)
812814 if ((state == state))
813815 then {
814816 let burn = invoke(fca, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
815817 if ((burn == burn))
816818 then {
817- let $t03261532965 = {
819+ let $t03263532985 = {
818820 let feeAmountForCalc = if ((this == feeCollectorAddress))
819821 then 0
820822 else feeAmount
821823 let outInAmountAsset = if ((parseAssetId(outAssetId) == cfgAmountAssetId))
822824 then true
823825 else false
824826 if (outInAmountAsset)
825827 then $Tuple2(-((totalGet + feeAmountForCalc)), 0)
826828 else $Tuple2(0, -((totalGet + feeAmountForCalc)))
827829 }
828- let amountAssetBalanceDelta = $t03261532965._1
829- let priceAssetBalanceDelta = $t03261532965._2
830- let $t03296833076 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
831- let refreshDLpActions = $t03296833076._1
832- let updatedDLp = $t03296833076._2
830+ let amountAssetBalanceDelta = $t03263532985._1
831+ let priceAssetBalanceDelta = $t03263532985._2
832+ let $t03298833096 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
833+ let refreshDLpActions = $t03298833096._1
834+ let updatedDLp = $t03298833096._2
833835 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
834836 if ((isUpdatedDLpValid == isUpdatedDLpValid))
835837 then $Tuple2((state ++ refreshDLpActions), totalAmount)
836838 else throw("Strict value is not equal to itself.")
837839 }
838840 else throw("Strict value is not equal to itself.")
839841 }
840842 else throw("Strict value is not equal to itself.")
841843 }
842844 else throw("Strict value is not equal to itself.")
843845 }
844846 }
845847 else throw("Strict value is not equal to itself.")
846848 }
847849
848850
849851 func m () = match getString(mpk()) {
850852 case s: String =>
851853 fromBase58String(s)
852854 case _: Unit =>
853855 unit
854856 case _ =>
855857 throw("Match error")
856858 }
857859
858860
859861 func pm () = match getString(pmpk()) {
860862 case s: String =>
861863 fromBase58String(s)
862864 case _: Unit =>
863865 unit
864866 case _ =>
865867 throw("Match error")
866868 }
867869
868870
869871 let pd = throw("Permission denied")
870872
871873 func isManager (i) = match m() {
872874 case pk: ByteVector =>
873875 (i.callerPublicKey == pk)
874876 case _: Unit =>
875877 (i.caller == this)
876878 case _ =>
877879 throw("Match error")
878880 }
879881
880882
881883 func mm (i) = match m() {
882884 case pk: ByteVector =>
883885 if ((i.callerPublicKey == pk))
884886 then true
885887 else pd
886888 case _: Unit =>
887889 if ((i.caller == this))
888890 then true
889891 else pd
890892 case _ =>
891893 throw("Match error")
892894 }
893895
894896
895897 func getY (isReverse,D,poolAmountInBalance) = {
896898 let poolConfig = gpc()
897899 let amId = poolConfig[idxAmAsId]
898900 let prId = poolConfig[idxPrAsId]
899901 let n = big2
900902 let aPrecision = parseBigIntValue(Amult)
901903 let a = (parseBigIntValue(A) * aPrecision)
902904 let xp = if ((isReverse == false))
903905 then [(toBigInt(getAccBalance(amId)) + poolAmountInBalance), toBigInt(getAccBalance(prId))]
904906 else [(toBigInt(getAccBalance(prId)) + poolAmountInBalance), toBigInt(getAccBalance(amId))]
905907 let x = xp[0]
906908 let s = x
907909 let ann = (a * n)
908910 let c = (((((D * D) / (x * n)) * D) * aPrecision) / (ann * n))
909911 let b = ((s + ((D * aPrecision) / ann)) - D)
910912 func calc (acc,cur) = {
911- let $t03452334543 = acc
912- let y = $t03452334543._1
913- let found = $t03452334543._2
913+ let $t03454334563 = acc
914+ let y = $t03454334563._1
915+ let found = $t03454334563._2
914916 if ((found != unit))
915917 then acc
916918 else {
917919 let yNext = (((y * y) + c) / ((big2 * y) + b))
918920 let yDiff = absBigInt((yNext - value(y)))
919921 if ((big1 >= yDiff))
920922 then $Tuple2(yNext, cur)
921923 else $Tuple2(yNext, unit)
922924 }
923925 }
924926
925927 let arr = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
926- let $t03487434921 = {
928+ let $t03489434941 = {
927929 let $l = arr
928930 let $s = size($l)
929931 let $acc0 = $Tuple2(D, unit)
930932 func $f0_1 ($a,$i) = if (($i >= $s))
931933 then $a
932934 else calc($a, $l[$i])
933935
934936 func $f0_2 ($a,$i) = if (($i >= $s))
935937 then $a
936938 else throw("List size exceeds 15")
937939
938940 $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)
939941 }
940- let y = $t03487434921._1
941- let found = $t03487434921._2
942+ let y = $t03489434941._1
943+ let found = $t03489434941._2
942944 if ((found != unit))
943945 then y
944946 else throw(("Y calculation error, Y = " + toString(y)))
945947 }
946948
947949
948950 func skipOrderValidation () = valueOrElse(getBoolean(fca, keySkipOrderValidation(toString(this))), false)
949951
950952
951953 @Callable(i)
952954 func calculateAmountOutForSwapREADONLY (cleanAmountIn,isReverse,feePoolAmount) = {
953- let $t03527335697 = if ((isReverse == false))
955+ let $t03529335717 = if ((isReverse == false))
954956 then {
955957 let assetOut = strf(this, pa())
956958 let poolAmountInBalance = (toBigInt(getAccBalance(strf(this, aa()))) + toBigInt(cleanAmountIn))
957959 $Tuple2(assetOut, poolAmountInBalance)
958960 }
959961 else {
960962 let assetOut = strf(this, aa())
961963 let poolAmountInBalance = (toBigInt(getAccBalance(strf(this, pa()))) + toBigInt(cleanAmountIn))
962964 $Tuple2(assetOut, poolAmountInBalance)
963965 }
964- let assetOut = $t03527335697._1
965- let poolAmountInBalance = $t03527335697._2
966+ let assetOut = $t03529335717._1
967+ let poolAmountInBalance = $t03529335717._2
966968 let poolConfig = gpc()
967969 let amId = poolConfig[idxAmAsId]
968970 let prId = poolConfig[idxPrAsId]
969971 let xp = [toBigInt(getAccBalance(amId)), toBigInt(getAccBalance(prId))]
970972 let D = getD(xp)
971973 let y = getY(isReverse, D, toBigInt(cleanAmountIn))
972974 let dy = ((toBigInt(getAccBalance(assetOut)) - y) - toBigInt(1))
973975 let totalGetRaw = max([0, toInt(dy)])
974976 let newXp = if ((isReverse == false))
975977 then [((toBigInt(getAccBalance(amId)) + toBigInt(cleanAmountIn)) + toBigInt(feePoolAmount)), (toBigInt(getAccBalance(prId)) - dy)]
976978 else [(toBigInt(getAccBalance(amId)) - dy), ((toBigInt(getAccBalance(prId)) + toBigInt(cleanAmountIn)) + toBigInt(feePoolAmount))]
977979 let newD = getD(newXp)
978980 let checkD = if ((newD >= D))
979981 then true
980982 else throw(makeString(["new D is fewer error", toString(D), toString(newD)], "__"))
981983 if ((checkD == checkD))
982984 then $Tuple2(nil, totalGetRaw)
983985 else throw("Strict value is not equal to itself.")
984986 }
985987
986988
987989
988990 @Callable(i)
989991 func calculateAmountOutForSwapAndSendTokens (cleanAmountIn,isReverse,amountOutMin,addressTo,feePoolAmount) = {
990992 let swapContact = {
991993 let @ = invoke(fca, "getSwapContractREADONLY", nil, nil)
992994 if ($isInstanceOf(@, "String"))
993995 then @
994996 else throw(($getType(@) + " couldn't be cast to String"))
995997 }
996998 let checks = [if ((value(i.payments[0]).amount >= cleanAmountIn))
997999 then true
9981000 else throwErr("Wrong amount"), if ((i.caller == addressFromStringValue(swapContact)))
9991001 then true
10001002 else throwErr("Permission denied")]
10011003 if ((checks == checks))
10021004 then {
10031005 let pmt = value(i.payments[0])
10041006 let assetIn = assetIdToString(pmt.assetId)
1005- let $t03713337527 = if ((isReverse == false))
1007+ let $t03715337547 = if ((isReverse == false))
10061008 then {
10071009 let assetOut = strf(this, pa())
10081010 let poolAmountInBalance = (getAccBalance(assetIn) - value(i.payments[0]).amount)
10091011 $Tuple2(assetOut, poolAmountInBalance)
10101012 }
10111013 else {
10121014 let assetOut = strf(this, aa())
10131015 let poolAmountInBalance = (getAccBalance(assetIn) - value(i.payments[0]).amount)
10141016 $Tuple2(assetOut, poolAmountInBalance)
10151017 }
1016- let assetOut = $t03713337527._1
1017- let poolAmountInBalance = $t03713337527._2
1018+ let assetOut = $t03715337547._1
1019+ let poolAmountInBalance = $t03715337547._2
10181020 let poolConfig = gpc()
10191021 let amId = poolConfig[idxAmAsId]
10201022 let prId = poolConfig[idxPrAsId]
10211023 let xp = if ((isReverse == false))
10221024 then [(toBigInt(getAccBalance(amId)) - toBigInt(value(i.payments[0]).amount)), toBigInt(getAccBalance(prId))]
10231025 else [toBigInt(getAccBalance(amId)), (toBigInt(getAccBalance(prId)) - toBigInt(value(i.payments[0]).amount))]
10241026 let D = getD(xp)
10251027 let y = getY(isReverse, D, toBigInt(0))
10261028 let dy = ((toBigInt(getAccBalance(assetOut)) - y) - toBigInt(1))
10271029 let totalGetRaw = max([0, toInt(dy)])
10281030 let checkMin = if ((totalGetRaw >= amountOutMin))
10291031 then true
10301032 else throw("Exchange result is fewer coins than expected")
10311033 if ((checkMin == checkMin))
10321034 then {
10331035 let newXp = if ((isReverse == false))
10341036 then [(toBigInt(getAccBalance(amId)) + toBigInt(feePoolAmount)), (toBigInt(getAccBalance(prId)) - dy)]
10351037 else [(toBigInt(getAccBalance(amId)) - dy), (toBigInt(getAccBalance(prId)) + toBigInt(feePoolAmount))]
10361038 let newD = getD(newXp)
10371039 let checkD = if ((newD >= D))
10381040 then true
10391041 else throw("new D is fewer error")
10401042 if ((checkD == checkD))
10411043 then $Tuple2([ScriptTransfer(addressFromStringValue(addressTo), totalGetRaw, parseAssetId(assetOut))], totalGetRaw)
10421044 else throw("Strict value is not equal to itself.")
10431045 }
10441046 else throw("Strict value is not equal to itself.")
10451047 }
10461048 else throw("Strict value is not equal to itself.")
10471049 }
10481050
10491051
10501052
10511053 @Callable(i)
10521054 func constructor (fc) = {
10531055 let c = mm(i)
10541056 if ((c == c))
10551057 then [StringEntry(fc(), fc)]
10561058 else throw("Strict value is not equal to itself.")
10571059 }
10581060
10591061
10601062
10611063 @Callable(i)
10621064 func setManager (pendingManagerPublicKey) = {
10631065 let c = mm(i)
10641066 if ((c == c))
10651067 then {
10661068 let cm = fromBase58String(pendingManagerPublicKey)
10671069 if ((cm == cm))
10681070 then [StringEntry(pmpk(), pendingManagerPublicKey)]
10691071 else throw("Strict value is not equal to itself.")
10701072 }
10711073 else throw("Strict value is not equal to itself.")
10721074 }
10731075
10741076
10751077
10761078 @Callable(i)
10771079 func confirmManager () = {
10781080 let p = pm()
10791081 let hpm = if (isDefined(p))
10801082 then true
10811083 else throw("No pending manager")
10821084 if ((hpm == hpm))
10831085 then {
10841086 let cpm = if ((i.callerPublicKey == value(p)))
10851087 then true
10861088 else throw("You are not pending manager")
10871089 if ((cpm == cpm))
10881090 then [StringEntry(mpk(), toBase58String(value(p))), DeleteEntry(pmpk())]
10891091 else throw("Strict value is not equal to itself.")
10901092 }
10911093 else throw("Strict value is not equal to itself.")
10921094 }
10931095
10941096
10951097
10961098 @Callable(i)
10971099 func put (slip,autoStake) = {
10981100 let factCfg = gfc()
10991101 let stakingCntr = valueOrErrorMessage(addressFromString(factCfg[idxFactStakCntr]), "Wr st addr")
11001102 let slipCntr = valueOrErrorMessage(addressFromString(factCfg[idxFactSlippCntr]), "Wr sl addr")
11011103 if ((0 > slip))
11021104 then throw("Wrong slippage")
11031105 else if ((size(i.payments) != 2))
11041106 then throw("2 pmnts expd")
11051107 else {
11061108 let amAssetPmt = toBigInt(value(i.payments[0]).amount)
11071109 let prAssetPmt = toBigInt(value(i.payments[1]).amount)
11081110 let amountAssetBalance = (toBigInt(getAccBalance(assetIdToString(cfgAmountAssetId))) - amAssetPmt)
11091111 if ((amountAssetBalance == amountAssetBalance))
11101112 then {
11111113 let priceAssetBalance = (toBigInt(getAccBalance(assetIdToString(cfgPriceAssetId))) - prAssetPmt)
11121114 if ((priceAssetBalance == priceAssetBalance))
11131115 then {
11141116 let lpAssetEmission = toBigInt(value(assetInfo(cfgLpAssetId)).quantity)
11151117 if ((lpAssetEmission == lpAssetEmission))
11161118 then {
11171119 let currentDLp = calcCurrentDLp(amAssetPmt, prAssetPmt, toBigInt(0))
11181120 if ((currentDLp == currentDLp))
11191121 then {
11201122 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, "")
11211123 let emitLpAmt = e._2
11221124 let lpAssetId = e._7
11231125 let state = e._9
11241126 let amDiff = e._10
11251127 let prDiff = e._11
11261128 let amId = e._12
11271129 let prId = e._13
11281130 let r = invoke(fca, "emit", [emitLpAmt], nil)
11291131 if ((r == r))
11301132 then {
11311133 let el = match r {
11321134 case legacy: Address =>
11331135 invoke(legacy, "emit", [emitLpAmt], nil)
11341136 case _ =>
11351137 unit
11361138 }
11371139 if ((el == el))
11381140 then {
11391141 let sa = if ((amDiff > 0))
11401142 then invoke(slipCntr, "put", nil, [AttachedPayment(amId, amDiff)])
11411143 else nil
11421144 if ((sa == sa))
11431145 then {
11441146 let sp = if ((prDiff > 0))
11451147 then invoke(slipCntr, "put", nil, [AttachedPayment(prId, prDiff)])
11461148 else nil
11471149 if ((sp == sp))
11481150 then {
11491151 let lpTrnsfr = if (autoStake)
11501152 then {
11511153 let ss = invoke(stakingCntr, "stake", nil, [AttachedPayment(lpAssetId, emitLpAmt)])
11521154 if ((ss == ss))
11531155 then nil
11541156 else throw("Strict value is not equal to itself.")
11551157 }
11561158 else [ScriptTransfer(i.caller, emitLpAmt, lpAssetId)]
1157- let $t04214642288 = refreshDLpInternal(0, 0, 0)
1158- let refreshDLpActions = $t04214642288._1
1159- let updatedDLp = $t04214642288._2
1159+ let $t04216642308 = refreshDLpInternal(0, 0, 0)
1160+ let refreshDLpActions = $t04216642308._1
1161+ let updatedDLp = $t04216642308._2
11601162 let check = if ((updatedDLp >= currentDLp))
11611163 then true
11621164 else throwErr(makeString(["updated DLp lower than current DLp", toString(amountAssetBalance), toString(priceAssetBalance), toString(lpAssetEmission), toString(currentDLp), toString(updatedDLp), toString(amDiff), toString(prDiff)], " "))
11631165 if ((check == check))
11641166 then {
11651167 let lpAssetEmissionAfter = value(assetInfo(cfgLpAssetId)).quantity
11661168 if ((lpAssetEmissionAfter == lpAssetEmissionAfter))
11671169 then ((state ++ lpTrnsfr) ++ refreshDLpActions)
11681170 else throw("Strict value is not equal to itself.")
11691171 }
11701172 else throw("Strict value is not equal to itself.")
11711173 }
11721174 else throw("Strict value is not equal to itself.")
11731175 }
11741176 else throw("Strict value is not equal to itself.")
11751177 }
11761178 else throw("Strict value is not equal to itself.")
11771179 }
11781180 else throw("Strict value is not equal to itself.")
11791181 }
11801182 else throw("Strict value is not equal to itself.")
11811183 }
11821184 else throw("Strict value is not equal to itself.")
11831185 }
11841186 else throw("Strict value is not equal to itself.")
11851187 }
11861188 else throw("Strict value is not equal to itself.")
11871189 }
11881190 }
11891191
11901192
11911193
11921194 @Callable(i)
11931195 func putOneTknV2 (minOutAmount,autoStake) = {
11941196 let isPoolOneTokenOperationsDisabled = {
11951197 let @ = invoke(fca, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
11961198 if ($isInstanceOf(@, "Boolean"))
11971199 then @
11981200 else throw(($getType(@) + " couldn't be cast to Boolean"))
11991201 }
12001202 let isPutDisabled = if (if (if (igs())
12011203 then true
12021204 else (cfgPoolStatus == PoolPutDis))
12031205 then true
12041206 else (cfgPoolStatus == PoolShutdown))
12051207 then true
12061208 else isPoolOneTokenOperationsDisabled
12071209 let checks = [if (if (!(isPutDisabled))
12081210 then true
12091211 else isManager(i))
12101212 then true
12111213 else throwErr("put operation is blocked by admin"), if ((size(i.payments) == 1))
12121214 then true
12131215 else throwErr("exactly 1 payment are expected")]
12141216 if ((checks == checks))
12151217 then {
12161218 let amId = toBase58String(value(cfgAmountAssetId))
12171219 let prId = toBase58String(value(cfgPriceAssetId))
12181220 let lpId = cfgLpAssetId
12191221 let amDecimals = cfgAmountAssetDecimals
12201222 let prDecimals = cfgPriceAssetDecimals
12211223 let userAddress = if ((i.caller == this))
12221224 then i.originCaller
12231225 else i.caller
12241226 let pmt = value(i.payments[0])
12251227 let pmtAssetId = toBase58String(value(pmt.assetId))
12261228 let pmtAmt = pmt.amount
12271229 let currentDLp = if ((pmt.assetId == cfgAmountAssetId))
12281230 then calcCurrentDLp(toBigInt(pmtAmt), toBigInt(0), toBigInt(0))
12291231 else calcCurrentDLp(toBigInt(0), toBigInt(pmtAmt), toBigInt(0))
12301232 if ((currentDLp == currentDLp))
12311233 then {
1232- let $t04392944087 = calcPutOneTkn(pmtAmt, pmtAssetId, toString(userAddress), toBase58String(i.transactionId), true)
1233- if (($t04392944087 == $t04392944087))
1234+ let $t04394944107 = calcPutOneTkn(pmtAmt, pmtAssetId, toString(userAddress), toBase58String(i.transactionId), true)
1235+ if (($t04394944107 == $t04394944107))
12341236 then {
1235- let feeAmount = $t04392944087._3
1236- let state = $t04392944087._2
1237- let estimLP = $t04392944087._1
1237+ let feeAmount = $t04394944107._3
1238+ let state = $t04394944107._2
1239+ let estimLP = $t04394944107._1
12381240 let emitLpAmt = if (if ((minOutAmount > 0))
12391241 then (minOutAmount > estimLP)
12401242 else false)
12411243 then throwErr(makeString(["amount to receive is less than ", toString(minOutAmount)], ""))
12421244 else estimLP
12431245 let e = invoke(fca, "emit", [emitLpAmt], nil)
12441246 if ((e == e))
12451247 then {
12461248 let el = match e {
12471249 case legacy: Address =>
12481250 invoke(legacy, "emit", [emitLpAmt], nil)
12491251 case _ =>
12501252 unit
12511253 }
12521254 if ((el == el))
12531255 then {
12541256 let lpTrnsfr = if (autoStake)
12551257 then {
12561258 let ss = invoke(stakingContract, "stakeFor", [toString(i.caller)], [AttachedPayment(lpId, emitLpAmt)])
12571259 if ((ss == ss))
12581260 then nil
12591261 else throw("Strict value is not equal to itself.")
12601262 }
12611263 else [ScriptTransfer(i.caller, emitLpAmt, lpId)]
12621264 let sendFeeToMatcher = if ((feeAmount > 0))
12631265 then [ScriptTransfer(feeCollectorAddress, feeAmount, fromBase58String(pmtAssetId))]
12641266 else nil
1265- let $t04497245321 = if ((this == feeCollectorAddress))
1267+ let $t04499245341 = if ((this == feeCollectorAddress))
12661268 then $Tuple2(0, 0)
12671269 else {
12681270 let paymentInAmountAsset = if ((pmt.assetId == cfgAmountAssetId))
12691271 then true
12701272 else false
12711273 if (paymentInAmountAsset)
12721274 then $Tuple2(-(feeAmount), 0)
12731275 else $Tuple2(0, -(feeAmount))
12741276 }
1275- let amountAssetBalanceDelta = $t04497245321._1
1276- let priceAssetBalanceDelta = $t04497245321._2
1277- let $t04532445432 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
1278- let refreshDLpActions = $t04532445432._1
1279- let updatedDLp = $t04532445432._2
1277+ let amountAssetBalanceDelta = $t04499245341._1
1278+ let priceAssetBalanceDelta = $t04499245341._2
1279+ let $t04534445452 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
1280+ let refreshDLpActions = $t04534445452._1
1281+ let updatedDLp = $t04534445452._2
12801282 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
12811283 if ((isUpdatedDLpValid == isUpdatedDLpValid))
12821284 then $Tuple2((((state ++ lpTrnsfr) ++ sendFeeToMatcher) ++ refreshDLpActions), emitLpAmt)
12831285 else throw("Strict value is not equal to itself.")
12841286 }
12851287 else throw("Strict value is not equal to itself.")
12861288 }
12871289 else throw("Strict value is not equal to itself.")
12881290 }
12891291 else throw("Strict value is not equal to itself.")
12901292 }
12911293 else throw("Strict value is not equal to itself.")
12921294 }
12931295 else throw("Strict value is not equal to itself.")
12941296 }
12951297
12961298
12971299
12981300 @Callable(i)
12991301 func putForFree (maxSlpg) = if ((0 > maxSlpg))
13001302 then throw("Wrong slpg")
13011303 else if ((size(i.payments) != 2))
13021304 then throw("2 pmnts expd")
13031305 else {
13041306 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, "")
13051307 let state = estPut._9
13061308 let amAssetPmt = toBigInt(value(i.payments[0]).amount)
13071309 let prAssetPmt = toBigInt(value(i.payments[1]).amount)
13081310 let currentDLp = calcCurrentDLp(amAssetPmt, prAssetPmt, toBigInt(0))
13091311 if ((currentDLp == currentDLp))
13101312 then {
1311- let $t04646246527 = refreshDLpInternal(0, 0, 0)
1312- let refreshDLpActions = $t04646246527._1
1313- let updatedDLp = $t04646246527._2
1313+ let $t04648246547 = refreshDLpInternal(0, 0, 0)
1314+ let refreshDLpActions = $t04648246547._1
1315+ let updatedDLp = $t04648246547._2
13141316 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
13151317 if ((isUpdatedDLpValid == isUpdatedDLpValid))
13161318 then (state ++ refreshDLpActions)
13171319 else throw("Strict value is not equal to itself.")
13181320 }
13191321 else throw("Strict value is not equal to itself.")
13201322 }
13211323
13221324
13231325
13241326 @Callable(i)
13251327 func get () = {
13261328 let currentDLp = calcCurrentDLp(toBigInt(0), toBigInt(0), toBigInt(0))
13271329 if ((currentDLp == currentDLp))
13281330 then {
13291331 let r = cg(i)
13301332 let outAmtAmt = r._1
13311333 let outPrAmt = r._2
13321334 let pmtAmt = r._3
13331335 let pmtAssetId = r._4
13341336 let state = r._5
13351337 let b = invoke(fca, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
13361338 if ((b == b))
13371339 then {
1338- let $t04770047782 = refreshDLpInternal(-(outAmtAmt), -(outPrAmt), 0)
1339- let refreshDLpActions = $t04770047782._1
1340- let updatedDLp = $t04770047782._2
1340+ let $t04772047802 = refreshDLpInternal(-(outAmtAmt), -(outPrAmt), 0)
1341+ let refreshDLpActions = $t04772047802._1
1342+ let updatedDLp = $t04772047802._2
13411343 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
13421344 if ((isUpdatedDLpValid == isUpdatedDLpValid))
13431345 then (state ++ refreshDLpActions)
13441346 else throw("Strict value is not equal to itself.")
13451347 }
13461348 else throw("Strict value is not equal to itself.")
13471349 }
13481350 else throw("Strict value is not equal to itself.")
13491351 }
13501352
13511353
13521354
13531355 @Callable(i)
13541356 func getOneTknV2 (outAssetId,minOutAmount) = {
13551357 let isPoolOneTokenOperationsDisabled = {
13561358 let @ = invoke(fca, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
13571359 if ($isInstanceOf(@, "Boolean"))
13581360 then @
13591361 else throw(($getType(@) + " couldn't be cast to Boolean"))
13601362 }
13611363 let isGetDisabled = if (if (igs())
13621364 then true
13631365 else (cfgPoolStatus == PoolShutdown))
13641366 then true
13651367 else isPoolOneTokenOperationsDisabled
13661368 let checks = [if (if (!(isGetDisabled))
13671369 then true
13681370 else isManager(i))
13691371 then true
13701372 else throwErr("get operation is blocked by admin"), if ((size(i.payments) == 1))
13711373 then true
13721374 else throwErr("exactly 1 payment are expected")]
13731375 if ((checks == checks))
13741376 then {
1375- let $t04840048555 = getOneTknV2Internal(outAssetId, minOutAmount, i.payments, i.caller, i.originCaller, i.transactionId)
1376- let state = $t04840048555._1
1377- let totalAmount = $t04840048555._2
1377+ let $t04842048575 = getOneTknV2Internal(outAssetId, minOutAmount, i.payments, i.caller, i.originCaller, i.transactionId)
1378+ let state = $t04842048575._1
1379+ let totalAmount = $t04842048575._2
13781380 $Tuple2(state, totalAmount)
13791381 }
13801382 else throw("Strict value is not equal to itself.")
13811383 }
13821384
13831385
13841386
13851387 @Callable(i)
13861388 func refreshDLp () = {
13871389 let lastRefreshedBlockHeight = valueOrElse(getInteger(keyDLpRefreshedHeight), 0)
13881390 let checkLastRefreshedBlockHeight = if (((height - lastRefreshedBlockHeight) >= dLpRefreshDelay))
13891391 then unit
13901392 else throwErr(makeString([toString(dLpRefreshDelay), " blocks have not passed since the previous call"], ""))
13911393 if ((checkLastRefreshedBlockHeight == checkLastRefreshedBlockHeight))
13921394 then {
13931395 let dLp = valueOrErrorMessage(parseBigInt(valueOrElse(getString(this, keyDLp), "0")), fmtErr("invalid dLp"))
1394- let $t04907949143 = refreshDLpInternal(0, 0, 0)
1395- let dLpUpdateActions = $t04907949143._1
1396- let updatedDLp = $t04907949143._2
1396+ let $t04909949163 = refreshDLpInternal(0, 0, 0)
1397+ let dLpUpdateActions = $t04909949163._1
1398+ let updatedDLp = $t04909949163._2
13971399 let actions = if ((dLp != updatedDLp))
13981400 then dLpUpdateActions
13991401 else throwErr("nothing to refresh")
14001402 $Tuple2(actions, toString(updatedDLp))
14011403 }
14021404 else throw("Strict value is not equal to itself.")
14031405 }
14041406
14051407
14061408
14071409 @Callable(i)
14081410 func getOneTknV2READONLY (outAssetId,lpAssetAmount) = {
14091411 let amId = toBase58String(value(cfgAmountAssetId))
14101412 let prId = toBase58String(value(cfgPriceAssetId))
14111413 let lpId = toBase58String(value(cfgLpAssetId))
14121414 let xp = [toBigInt(getAccBalance(amId)), toBigInt(getAccBalance(prId))]
14131415 let lpEmission = toBigInt(valueOrErrorMessage(assetInfo(fromBase58String(lpId)), "invalid lp asset").quantity)
14141416 let D0 = getD(xp)
14151417 let D1 = (D0 - fraction(toBigInt(lpAssetAmount), D0, lpEmission))
14161418 let index = if ((outAssetId == amId))
14171419 then 0
14181420 else if ((outAssetId == prId))
14191421 then 1
14201422 else throw("invalid out asset id")
14211423 let newY = getYD(xp, index, D1)
14221424 let dy = (xp[index] - newY)
14231425 let totalGetRaw = max([0, toInt((dy - big1))])
1424- let $t05015350208 = takeFee(totalGetRaw, outFee)
1425- let totalGet = $t05015350208._1
1426- let feeAmount = $t05015350208._2
1426+ let $t05017350228 = takeFee(totalGetRaw, outFee)
1427+ let totalGet = $t05017350228._1
1428+ let feeAmount = $t05017350228._2
14271429 $Tuple2(nil, $Tuple2(totalGet, feeAmount))
14281430 }
14291431
14301432
14311433
14321434 @Callable(i)
14331435 func getOneTknV2WithBonusREADONLY (outAssetId,lpAssetAmount) = {
14341436 let amId = toBase58String(value(cfgAmountAssetId))
14351437 let prId = toBase58String(value(cfgPriceAssetId))
14361438 let lpId = toBase58String(value(cfgLpAssetId))
14371439 let amBalance = getAccBalance(amId)
14381440 let prBalance = getAccBalance(prId)
1439- let $t05058350698 = {
1441+ let $t05060350718 = {
14401442 let @ = invoke(this, "getOneTknV2READONLY", [outAssetId, lpAssetAmount], nil)
14411443 if ($isInstanceOf(@, "(Int, Int)"))
14421444 then @
14431445 else throw(($getType(@) + " couldn't be cast to (Int, Int)"))
14441446 }
1445- let totalGet = $t05058350698._1
1446- let feeAmount = $t05058350698._2
1447+ let totalGet = $t05060350718._1
1448+ let feeAmount = $t05060350718._2
14471449 let r = ego("", lpId, lpAssetAmount, this)
14481450 let outAmAmt = r._1
14491451 let outPrAmt = r._2
14501452 let sumOfGetAssets = (outAmAmt + outPrAmt)
14511453 let bonus = if ((sumOfGetAssets == 0))
14521454 then if ((totalGet == 0))
14531455 then 0
14541456 else throw("bonus calculation error")
14551457 else fraction((totalGet - sumOfGetAssets), scale8, sumOfGetAssets)
14561458 $Tuple2(nil, $Tuple3(totalGet, feeAmount, bonus))
14571459 }
14581460
14591461
14601462
14611463 @Callable(i)
14621464 func getNoLess (noLessThenAmtAsset,noLessThenPriceAsset) = {
14631465 let r = cg(i)
14641466 let outAmAmt = r._1
14651467 let outPrAmt = r._2
14661468 let pmtAmt = r._3
14671469 let pmtAssetId = r._4
14681470 let state = r._5
14691471 if ((noLessThenAmtAsset > outAmAmt))
14701472 then throw(((("Failed: " + toString(outAmAmt)) + " < ") + toString(noLessThenAmtAsset)))
14711473 else if ((noLessThenPriceAsset > outPrAmt))
14721474 then throw(((("Failed: " + toString(outPrAmt)) + " < ") + toString(noLessThenPriceAsset)))
14731475 else {
14741476 let currentDLp = calcCurrentDLp(toBigInt(0), toBigInt(0), toBigInt(0))
14751477 if ((currentDLp == currentDLp))
14761478 then {
14771479 let burnLPAssetOnFactory = invoke(fca, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
14781480 if ((burnLPAssetOnFactory == burnLPAssetOnFactory))
14791481 then {
1480- let $t05186451945 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1481- let refreshDLpActions = $t05186451945._1
1482- let updatedDLp = $t05186451945._2
1482+ let $t05188451965 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1483+ let refreshDLpActions = $t05188451965._1
1484+ let updatedDLp = $t05188451965._2
14831485 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
14841486 if ((isUpdatedDLpValid == isUpdatedDLpValid))
14851487 then (state ++ refreshDLpActions)
14861488 else throw("Strict value is not equal to itself.")
14871489 }
14881490 else throw("Strict value is not equal to itself.")
14891491 }
14901492 else throw("Strict value is not equal to itself.")
14911493 }
14921494 }
14931495
14941496
14951497
14961498 @Callable(i)
14971499 func unstakeAndGet (amount) = {
14981500 let checkPayments = if ((size(i.payments) != 0))
14991501 then throw("No pmnts expd")
15001502 else true
15011503 if ((checkPayments == checkPayments))
15021504 then {
15031505 let factoryCfg = gfc()
15041506 let lpAssetId = cfgLpAssetId
15051507 let staking = valueOrErrorMessage(addressFromString(factoryCfg[idxFactStakCntr]), "Wr st addr")
15061508 let currentDLp = calcCurrentDLp(toBigInt(0), toBigInt(0), toBigInt(0))
15071509 if ((currentDLp == currentDLp))
15081510 then {
15091511 let unstakeInv = invoke(staking, "unstake", [toBase58String(lpAssetId), amount], nil)
15101512 if ((unstakeInv == unstakeInv))
15111513 then {
15121514 let r = ego(toBase58String(i.transactionId), toBase58String(lpAssetId), amount, i.caller)
15131515 let outAmAmt = r._1
15141516 let outPrAmt = r._2
15151517 let sts = parseIntValue(r._9)
15161518 let state = r._10
15171519 let v = if (if (igs())
15181520 then true
15191521 else (sts == PoolShutdown))
15201522 then throw(("Blocked: " + toString(sts)))
15211523 else true
15221524 if ((v == v))
15231525 then {
15241526 let burnA = invoke(fca, "burn", [amount], [AttachedPayment(lpAssetId, amount)])
15251527 if ((burnA == burnA))
15261528 then {
1527- let $t05297253053 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1528- let refreshDLpActions = $t05297253053._1
1529- let updatedDLp = $t05297253053._2
1529+ let $t05299253073 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1530+ let refreshDLpActions = $t05299253073._1
1531+ let updatedDLp = $t05299253073._2
15301532 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
15311533 if ((isUpdatedDLpValid == isUpdatedDLpValid))
15321534 then (state ++ refreshDLpActions)
15331535 else throw("Strict value is not equal to itself.")
15341536 }
15351537 else throw("Strict value is not equal to itself.")
15361538 }
15371539 else throw("Strict value is not equal to itself.")
15381540 }
15391541 else throw("Strict value is not equal to itself.")
15401542 }
15411543 else throw("Strict value is not equal to itself.")
15421544 }
15431545 else throw("Strict value is not equal to itself.")
15441546 }
15451547
15461548
15471549
15481550 @Callable(i)
15491551 func unstakeAndGetNoLess (unstakeAmount,noLessThenAmountAsset,noLessThenPriceAsset) = {
15501552 let isGetDisabled = if (igs())
15511553 then true
15521554 else (cfgPoolStatus == PoolShutdown)
15531555 let checks = [if (!(isGetDisabled))
15541556 then true
15551557 else throw("get operation is blocked by admin"), if ((size(i.payments) == 0))
15561558 then true
15571559 else throw("no payments are expected")]
15581560 if ((checks == checks))
15591561 then {
15601562 let currentDLp = calcCurrentDLp(toBigInt(0), toBigInt(0), toBigInt(0))
15611563 if ((currentDLp == currentDLp))
15621564 then {
15631565 let unstakeInv = invoke(stakingContract, "unstake", [toBase58String(cfgLpAssetId), unstakeAmount], nil)
15641566 if ((unstakeInv == unstakeInv))
15651567 then {
15661568 let res = ego(toBase58String(i.transactionId), toBase58String(cfgLpAssetId), unstakeAmount, i.caller)
15671569 let outAmAmt = res._1
15681570 let outPrAmt = res._2
15691571 let state = res._10
15701572 let checkAmounts = [if ((outAmAmt >= noLessThenAmountAsset))
15711573 then true
15721574 else throw(makeString(["amount asset amount to receive is less than ", toString(noLessThenAmountAsset)], "")), if ((outPrAmt >= noLessThenPriceAsset))
15731575 then true
15741576 else throw(makeString(["price asset amount to receive is less than ", toString(noLessThenPriceAsset)], ""))]
15751577 if ((checkAmounts == checkAmounts))
15761578 then {
15771579 let burnLPAssetOnFactory = invoke(fca, "burn", [unstakeAmount], [AttachedPayment(cfgLpAssetId, unstakeAmount)])
15781580 if ((burnLPAssetOnFactory == burnLPAssetOnFactory))
15791581 then {
1580- let $t05430454385 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1581- let refreshDLpActions = $t05430454385._1
1582- let updatedDLp = $t05430454385._2
1582+ let $t05432454405 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1583+ let refreshDLpActions = $t05432454405._1
1584+ let updatedDLp = $t05432454405._2
15831585 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
15841586 if ((isUpdatedDLpValid == isUpdatedDLpValid))
15851587 then (state ++ refreshDLpActions)
15861588 else throw("Strict value is not equal to itself.")
15871589 }
15881590 else throw("Strict value is not equal to itself.")
15891591 }
15901592 else throw("Strict value is not equal to itself.")
15911593 }
15921594 else throw("Strict value is not equal to itself.")
15931595 }
15941596 else throw("Strict value is not equal to itself.")
15951597 }
15961598 else throw("Strict value is not equal to itself.")
15971599 }
15981600
15991601
16001602
16011603 @Callable(i)
16021604 func unstakeAndGetOneTknV2 (unstakeAmount,outAssetId,minOutAmount) = {
16031605 let isPoolOneTokenOperationsDisabled = {
16041606 let @ = invoke(fca, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
16051607 if ($isInstanceOf(@, "Boolean"))
16061608 then @
16071609 else throw(($getType(@) + " couldn't be cast to Boolean"))
16081610 }
16091611 let isGetDisabled = if (if (igs())
16101612 then true
16111613 else (cfgPoolStatus == PoolShutdown))
16121614 then true
16131615 else isPoolOneTokenOperationsDisabled
16141616 let checks = [if (if (!(isGetDisabled))
16151617 then true
16161618 else isManager(i))
16171619 then true
16181620 else throwErr("get operation is blocked by admin"), if ((size(i.payments) == 0))
16191621 then true
16201622 else throwErr("no payments are expected")]
16211623 if ((checks == checks))
16221624 then {
16231625 let factoryCfg = gfc()
16241626 let lpAssetId = cfgLpAssetId
16251627 let staking = valueOrErrorMessage(addressFromString(factoryCfg[idxFactStakCntr]), "Wr st addr")
16261628 let userAddress = i.caller
16271629 let lpAssetRecipientAddress = this
16281630 let unstakeInv = invoke(staking, "unstakeINTERNAL", [lpAssetId, unstakeAmount, userAddress.bytes, lpAssetRecipientAddress.bytes], nil)
16291631 if ((unstakeInv == unstakeInv))
16301632 then {
1631- let $t05540755595 = getOneTknV2Internal(outAssetId, minOutAmount, [AttachedPayment(lpAssetId, unstakeAmount)], i.caller, i.originCaller, i.transactionId)
1632- let state = $t05540755595._1
1633- let totalAmount = $t05540755595._2
1633+ let $t05542755615 = getOneTknV2Internal(outAssetId, minOutAmount, [AttachedPayment(lpAssetId, unstakeAmount)], i.caller, i.originCaller, i.transactionId)
1634+ let state = $t05542755615._1
1635+ let totalAmount = $t05542755615._2
16341636 $Tuple2(state, totalAmount)
16351637 }
16361638 else throw("Strict value is not equal to itself.")
16371639 }
16381640 else throw("Strict value is not equal to itself.")
16391641 }
16401642
16411643
16421644
16431645 @Callable(i)
16441646 func putOneTknV2WithBonusREADONLY (paymentAmountRaw,paymentAssetId) = {
1645- let $t05572355826 = calcPutOneTkn(paymentAmountRaw, paymentAssetId, "", "", true)
1646- let lpAmount = $t05572355826._1
1647- let state = $t05572355826._2
1648- let feeAmount = $t05572355826._3
1649- let bonus = $t05572355826._4
1647+ let $t05574355846 = calcPutOneTkn(paymentAmountRaw, paymentAssetId, "", "", true)
1648+ let lpAmount = $t05574355846._1
1649+ let state = $t05574355846._2
1650+ let feeAmount = $t05574355846._3
1651+ let bonus = $t05574355846._4
16501652 $Tuple2(nil, $Tuple3(lpAmount, feeAmount, bonus))
16511653 }
16521654
16531655
16541656
16551657 @Callable(i)
16561658 func putOneTknV2WithoutTakeFeeREADONLY (paymentAmountRaw,paymentAssetId) = {
1657- let $t05597456078 = calcPutOneTkn(paymentAmountRaw, paymentAssetId, "", "", false)
1658- let lpAmount = $t05597456078._1
1659- let state = $t05597456078._2
1660- let feeAmount = $t05597456078._3
1661- let bonus = $t05597456078._4
1659+ let $t05599456098 = calcPutOneTkn(paymentAmountRaw, paymentAssetId, "", "", false)
1660+ let lpAmount = $t05599456098._1
1661+ let state = $t05599456098._2
1662+ let feeAmount = $t05599456098._3
1663+ let bonus = $t05599456098._4
16621664 $Tuple2(nil, $Tuple3(lpAmount, feeAmount, bonus))
16631665 }
16641666
16651667
16661668
16671669 @Callable(i)
16681670 func activate (amtAsStr,prAsStr) = if ((toString(i.caller) != toString(fca)))
16691671 then throw("denied")
1670- else $Tuple2([StringEntry(aa(), amtAsStr), StringEntry(pa(), prAsStr)], "success")
1672+ else $Tuple2([StringEntry(aa(), amtAsStr), StringEntry(pa(), prAsStr), StringEntry(amp(), toString(ampInitial))], "success")
16711673
16721674
16731675
16741676 @Callable(i)
16751677 func getPoolConfigWrapperREADONLY () = $Tuple2(nil, gpc())
16761678
16771679
16781680
16791681 @Callable(i)
16801682 func getAccBalanceWrapperREADONLY (assetId) = $Tuple2(nil, getAccBalance(assetId))
16811683
16821684
16831685
16841686 @Callable(i)
16851687 func calcPricesWrapperREADONLY (amAmt,prAmt,lpAmt) = {
16861688 let pr = calcPrices(amAmt, prAmt, lpAmt)
16871689 $Tuple2(nil, [toString(pr[0]), toString(pr[1]), toString(pr[2])])
16881690 }
16891691
16901692
16911693
16921694 @Callable(i)
16931695 func fromX18WrapperREADONLY (val,resScaleMult) = $Tuple2(nil, f1(parseBigIntValue(val), resScaleMult))
16941696
16951697
16961698
16971699 @Callable(i)
16981700 func toX18WrapperREADONLY (origVal,origScaleMult) = $Tuple2(nil, toString(t1(origVal, origScaleMult)))
16991701
17001702
17011703
17021704 @Callable(i)
17031705 func calcPriceBigIntWrapperREADONLY (prAmtX18,amAmtX18) = $Tuple2(nil, toString(cpbi(parseBigIntValue(prAmtX18), parseBigIntValue(amAmtX18))))
17041706
17051707
17061708
17071709 @Callable(i)
17081710 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, ""))
17091711
17101712
17111713
17121714 @Callable(i)
17131715 func estimateGetOperationWrapperREADONLY (txId58,pmtAsId,pmtLpAmt,usrAddr) = {
17141716 let r = ego(txId58, pmtAsId, pmtLpAmt, addressFromStringValue(usrAddr))
17151717 $Tuple2(nil, $Tuple10(r._1, r._2, r._3, r._4, r._5, r._6, r._7, toString(r._8), r._9, r._10))
17161718 }
17171719
17181720
17191721
17201722 @Callable(i)
17211723 func changeAmp () = {
17221724 let cfg = invoke(fca, "getChangeAmpConfigREADONLY", [toString(this)], nil)
1723- let $t05843258631 = match cfg {
1725+ let $t05850758706 = match cfg {
17241726 case list: List[Any] =>
17251727 $Tuple3({
17261728 let @ = list[0]
17271729 if ($isInstanceOf(@, "Int"))
17281730 then @
17291731 else throw(($getType(@) + " couldn't be cast to Int"))
17301732 }, {
17311733 let @ = list[1]
17321734 if ($isInstanceOf(@, "Int"))
17331735 then @
17341736 else throw(($getType(@) + " couldn't be cast to Int"))
17351737 }, {
17361738 let @ = list[2]
17371739 if ($isInstanceOf(@, "Int"))
17381740 then @
17391741 else throw(($getType(@) + " couldn't be cast to Int"))
17401742 })
17411743 case _ =>
17421744 throwErr("invalid entry type")
17431745 }
1744- let delay = $t05843258631._1
1745- let delta = $t05843258631._2
1746- let target = $t05843258631._3
1746+ let delay = $t05850758706._1
1747+ let delta = $t05850758706._2
1748+ let target = $t05850758706._3
17471749 let curAmp = parseIntValue(getStringValue(amp()))
17481750 let newAmpRaw = (curAmp + delta)
17491751 let newAmp = if ((0 > delta))
17501752 then if ((target > newAmpRaw))
17511753 then target
17521754 else newAmpRaw
17531755 else if ((newAmpRaw > target))
17541756 then target
17551757 else newAmpRaw
17561758 let lastCall = valueOrElse(getInteger(keyChangeAmpLastCall()), 0)
17571759 let wait = (lastCall + delay)
17581760 let checks = [if ((height > wait))
17591761 then true
17601762 else throwErr("try again in few blocks"), if ((curAmp != newAmp))
17611763 then true
17621764 else throwErr("already reached target")]
17631765 if ((checks == checks))
17641766 then [IntegerEntry(keyChangeAmpLastCall(), height), StringEntry(amp(), toString(newAmp)), StringEntry(keyAmpHistory(height), toString(newAmp))]
17651767 else throw("Strict value is not equal to itself.")
17661768 }
17671769
17681770
17691771 @Verifier(tx)
17701772 func verify () = {
17711773 let targetPublicKey = match m() {
17721774 case pk: ByteVector =>
17731775 pk
17741776 case _: Unit =>
17751777 tx.senderPublicKey
17761778 case _ =>
17771779 throw("Match error")
17781780 }
17791781 match tx {
17801782 case order: Order =>
17811783 let matcherPub = mp()
1782- let $t05954359660 = if (skipOrderValidation())
1784+ let $t05961859735 = if (skipOrderValidation())
17831785 then $Tuple2(true, "")
17841786 else validateMatcherOrderAllowed(order)
1785- let orderValid = $t05954359660._1
1786- let orderValidInfo = $t05954359660._2
1787+ let orderValid = $t05961859735._1
1788+ let orderValidInfo = $t05961859735._2
17871789 let senderValid = sigVerify(order.bodyBytes, order.proofs[0], order.senderPublicKey)
17881790 let matcherValid = sigVerify(order.bodyBytes, order.proofs[1], matcherPub)
17891791 if (if (if (orderValid)
17901792 then senderValid
17911793 else false)
17921794 then matcherValid
17931795 else false)
17941796 then true
17951797 else throwOrderError(orderValid, orderValidInfo, senderValid, matcherValid)
17961798 case s: SetScriptTransaction =>
17971799 if (sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey))
17981800 then true
17991801 else {
18001802 let newHash = blake2b256(value(s.script))
18011803 let allowedHash = fromBase64String(value(getString(fca, keyAllowedLpStableScriptHash())))
18021804 let currentHash = scriptHash(this)
18031805 if ((allowedHash == newHash))
18041806 then (currentHash != newHash)
18051807 else false
18061808 }
18071809 case _ =>
18081810 sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey)
18091811 }
18101812 }
18111813

github/deemru/w8io/169f3d6 
249.39 ms