tx · 4NLcA3oeRiKPnhYjWAupGhstGp4CtsGsvUX6bcv2gNSq

3NAefciWv6f9fWvEXdGgpHfanJFG8HqfjuT:  -0.04100000 Waves

2023.05.10 14:12 [2571711] smart account 3NAefciWv6f9fWvEXdGgpHfanJFG8HqfjuT > SELF 0.00000000 Waves

{ "type": 13, "id": "4NLcA3oeRiKPnhYjWAupGhstGp4CtsGsvUX6bcv2gNSq", "fee": 4100000, "feeAssetId": null, "timestamp": 1683717122302, "version": 2, "chainId": 84, "sender": "3NAefciWv6f9fWvEXdGgpHfanJFG8HqfjuT", "senderPublicKey": "D1BL65meykxFZTCuq7jq9HSGLLnWvQamQPUNrguW5w39", "proofs": [ "26wyZNzMr58TFEk5a5uU7nGCbuMxRiBKruKnnTrh8BU4JX8h3Jk3kiLgqjkRjm15efbEYxazejWyRGXw86JDNHno" ], "script": "base64:BgKxLQgCEgUKAwEEARIHCgUBBAEIARIDCgEIEgQKAgEEEgQKAgEEEgMKAQESABIECgIIARIAEgQKAggBEgQKAggBEgQKAgEBEgMKAQESBQoDAQEBEgUKAwEIARIECgIBCBIECgIBCBIECgIICBIAEgMKAQgSBQoDAQEBEgQKAggBEgQKAgEBEgQKAggIEgsKCQgBAQIBAggEBBIGCgQICAEIEgAiBnNjYWxlOCIMc2NhbGU4QmlnSW50IgdzY2FsZTE4Igp6ZXJvQmlnSW50IgRiaWcwIgRiaWcxIgRiaWcyIgRiaWczIgRiaWc0IgpzbGlwcGFnZTREIgt3YXZlc1N0cmluZyIFQW11bHQiBURjb252IgNTRVAiBUVNUFRZIgpQb29sQWN0aXZlIgpQb29sUHV0RGlzIg5Qb29sTWF0Y2hlckRpcyIMUG9vbFNodXRkb3duIg5pZHhQb29sQWRkcmVzcyIJaWR4UG9vbFN0IglpZHhMUEFzSWQiCWlkeEFtQXNJZCIJaWR4UHJBc0lkIgtpZHhBbXRBc0RjbSINaWR4UHJpY2VBc0RjbSILaWR4SUFtdEFzSWQiDWlkeElQcmljZUFzSWQiD2l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FQAgpCeXRlVmVjdG9yBAJneAUCYVAFAmd4AwkAAQIFAmFQAgRVbml0CAUCaXgPc2VuZGVyUHVibGljS2V5CQACAQILTWF0Y2ggZXJyb3IEAmFQBQJpeAMJAAECBQJhUAIFT3JkZXIEAmZpBQJhUAQCaUEJAQJiaAAEAmlCAwkBAmdFAAkAlAoCBgIACQECZmgBBQJmaQQCYUoIBQJpQgJfMQQCYUsIBQJpQgJfMgQCYUwJAPQDAwgFAmZpCWJvZHlCeXRlcwkAkQMCCAUCZmkGcHJvb2ZzAAAIBQJmaQ9zZW5kZXJQdWJsaWNLZXkEAmFNCQD0AwMIBQJmaQlib2R5Qnl0ZXMJAJEDAggFAmZpBnByb29mcwABBQJpQQMDAwUCYUoFAmFMBwUCYU0HBgkBAmFJBAUCYUoFAmFLBQJhTAUCYU0DCQABAgUCYVACFFNldFNjcmlwdFRyYW5zYWN0aW9uBAJhVQUCYVADCQD0AwMIBQJpeAlib2R5Qnl0ZXMJAJEDAggFAml4BnByb29mcwAABQJpegYEAmlDCQD2AwEJAQV2YWx1ZQEIBQJhVQZzY3JpcHQEAmlECQDbBAEJAQV2YWx1ZQEJAJ0IAgUCYVQJAQJhRQAEAmlFCQDxBwEFBHRoaXMDCQAAAgUCaUQFAmlDCQECIT0CBQJpRQUCaUMHCQD0AwMIBQJpeAlib2R5Qnl0ZXMJAJEDAggFAml4BnByb29mcwAABQJpek7bkhU=", "height": 2571711, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 7BJiHH1qQiA4gD1dkNzJsk8Pavkw6FnSDgPHVhNoX5Mx Next: 6M83SbtA3zqQtFyUkYp84rEcE5XJHKaE1zgvEcAe9n7m Diff:
OldNewDifferences
184184
185185
186186 func getManagerVaultAddressOrThis () = {
187- let factoryAddress = match addressFromStringOrThis(fc()) {
188- case fca: Address =>
189- fca
187+ let factoryAddress = match getString(fc()) {
188+ case fca: String =>
189+ addressFromStringOrThis(fca)
190190 case _ =>
191191 this
192192 }
261261
262262 let poolConfigParsed = parsePoolConfig(gpc())
263263
264-let $t086768905 = poolConfigParsed
264+let $t086868915 = poolConfigParsed
265265
266-let cfgPoolAddress = $t086768905._1
266+let cfgPoolAddress = $t086868915._1
267267
268-let cfgPoolStatus = $t086768905._2
268+let cfgPoolStatus = $t086868915._2
269269
270-let cfgLpAssetId = $t086768905._3
270+let cfgLpAssetId = $t086868915._3
271271
272-let cfgAmountAssetId = $t086768905._4
272+let cfgAmountAssetId = $t086868915._4
273273
274-let cfgPriceAssetId = $t086768905._5
274+let cfgPriceAssetId = $t086868915._5
275275
276-let cfgAmountAssetDecimals = $t086768905._6
276+let cfgAmountAssetDecimals = $t086868915._6
277277
278-let cfgPriceAssetDecimals = $t086768905._7
278+let cfgPriceAssetDecimals = $t086868915._7
279279
280-let cfgInAmountAssedId = $t086768905._8
280+let cfgInAmountAssedId = $t086868915._8
281281
282-let cfgInPriceAssetId = $t086768905._9
282+let cfgInPriceAssetId = $t086868915._9
283283
284284 func gfc () = split(strf(fca, fcfg()), SEP)
285285
400400 }
401401
402402 let arr = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16]
403- let $t01341013458 = {
403+ let $t01342013468 = {
404404 let $l = arr
405405 let $s = size($l)
406406 let $acc0 = $Tuple2(s, false)
414414
415415 $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)
416416 }
417- let d = $t01341013458._1
418- let found = $t01341013458._2
417+ let d = $t01342013468._1
418+ let found = $t01342013468._2
419419 if (found)
420420 then d
421421 else throw(("D calculation error, D = " + toString(d)))
551551 else calcLpAmt
552552 let amDiff = (inAmAmt - calcAmAssetPmt)
553553 let prDiff = (inPrAmt - calcPrAssetPmt)
554- let $t02129721642 = if (if (isOneAsset)
554+ let $t02130721652 = if (if (isOneAsset)
555555 then (pmtId == amIdStr)
556556 else false)
557557 then $Tuple2(pmtAmt, 0)
560560 else false)
561561 then $Tuple2(0, pmtAmt)
562562 else $Tuple2(calcAmAssetPmt, calcPrAssetPmt)
563- let writeAmAmt = $t02129721642._1
564- let writePrAmt = $t02129721642._2
563+ let writeAmAmt = $t02130721652._1
564+ let writePrAmt = $t02130721652._2
565565 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))]
566566 $Tuple13(calcLpAmt, emitLpAmt, curPrice, amBalance, prBalance, lpEm, lpId, sts, commonState, amDiff, prDiff, inAmId, inPrId)
567567 }
580580 let c = (((((D * D) / (x * n)) * D) * aPrecision) / (ann * n))
581581 let b = ((s + ((D * aPrecision) / ann)) - D)
582582 func calc (acc,cur) = {
583- let $t02283722857 = acc
584- let y = $t02283722857._1
585- let found = $t02283722857._2
583+ let $t02284722867 = acc
584+ let y = $t02284722867._1
585+ let found = $t02284722867._2
586586 if ((found != unit))
587587 then acc
588588 else {
595595 }
596596
597597 let arr = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
598- let $t02316423211 = {
598+ let $t02317423221 = {
599599 let $l = arr
600600 let $s = size($l)
601601 let $acc0 = $Tuple2(D, unit)
609609
610610 $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)
611611 }
612- let y = $t02316423211._1
613- let found = $t02316423211._2
612+ let y = $t02317423221._1
613+ let found = $t02317423221._2
614614 if ((found != unit))
615615 then y
616616 else throw(("Y calculation error, Y = " + toString(y)))
654654 let priceAssetBalance = getAccBalance(assetIdToString(cfgPriceAssetId))
655655 let amountAssetAmount = order.amount
656656 let priceAssetAmount = fraction(order.amount, order.price, scale8, FLOOR)
657- let $t02540925621 = if ((order.orderType == Buy))
657+ let $t02541925631 = if ((order.orderType == Buy))
658658 then $Tuple2(amountAssetAmount, -(priceAssetAmount))
659659 else $Tuple2(-(amountAssetAmount), priceAssetAmount)
660- let amountAssetBalanceDelta = $t02540925621._1
661- let priceAssetBalanceDelta = $t02540925621._2
660+ let amountAssetBalanceDelta = $t02541925631._1
661+ let priceAssetBalanceDelta = $t02541925631._2
662662 if (if (if (igs())
663663 then true
664664 else (cfgPoolStatus == PoolMatcherDis))
671671 then throw("Wr assets")
672672 else {
673673 let dLp = parseBigIntValue(valueOrElse(getString(this, keyDLp), "0"))
674- let $t02596326063 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
675- let unusedActions = $t02596326063._1
676- let dLpNew = $t02596326063._2
674+ let $t02597326073 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
675+ let unusedActions = $t02597326073._1
676+ let dLpNew = $t02597326073._2
677677 let isOrderValid = (dLpNew >= dLp)
678678 let info = makeString(["dLp=", toString(dLp), " dLpNew=", toString(dLpNew), " amountAssetBalance=", toString(amountAssetBalance), " priceAssetBalance=", toString(priceAssetBalance), " amountAssetBalanceDelta=", toString(amountAssetBalanceDelta), " priceAssetBalanceDelta=", toString(priceAssetBalanceDelta), " height=", toString(height)], "")
679679 $Tuple2(isOrderValid, info)
727727 then {
728728 let amBalance = getAccBalance(amId)
729729 let prBalance = getAccBalance(prId)
730- let $t02871929181 = if ((txId == ""))
730+ let $t02872929191 = if ((txId == ""))
731731 then $Tuple2(amBalance, prBalance)
732732 else if ((pmtAssetId == amId))
733733 then if ((pmtAmtRaw > amBalance))
738738 then throw("invalid payment amount")
739739 else $Tuple2(amBalance, (prBalance - pmtAmtRaw))
740740 else throw("wrong pmtAssetId")
741- let amBalanceOld = $t02871929181._1
742- let prBalanceOld = $t02871929181._2
743- let $t02918729363 = if ((pmtAssetId == amId))
741+ let amBalanceOld = $t02872929191._1
742+ let prBalanceOld = $t02872929191._2
743+ let $t02919729373 = if ((pmtAssetId == amId))
744744 then $Tuple2(pmtAmtRaw, 0)
745745 else if ((pmtAssetId == prId))
746746 then $Tuple2(0, pmtAmtRaw)
747747 else throw("invalid payment")
748- let amAmountRaw = $t02918729363._1
749- let prAmountRaw = $t02918729363._2
750- let $t02936729621 = if (withTakeFee)
748+ let amAmountRaw = $t02919729373._1
749+ let prAmountRaw = $t02919729373._2
750+ let $t02937729631 = if (withTakeFee)
751751 then $Tuple3(takeFee(amAmountRaw, inFee)._1, takeFee(prAmountRaw, inFee)._1, takeFee(pmtAmtRaw, inFee)._2)
752752 else $Tuple3(amAmountRaw, prAmountRaw, 0)
753- let amAmount = $t02936729621._1
754- let prAmount = $t02936729621._2
755- let feeAmount = $t02936729621._3
753+ let amAmount = $t02937729631._1
754+ let prAmount = $t02937729631._2
755+ let feeAmount = $t02937729631._3
756756 let amBalanceNew = (amBalanceOld + amAmount)
757757 let prBalanceNew = (prBalanceOld + prAmount)
758758 let D0 = getD([t1(amBalanceOld, cfgAmountAssetDecimals), t1(prBalanceOld, cfgPriceAssetDecimals)])
800800 else {
801801 let amBalance = getAccBalance(amId)
802802 let prBalance = getAccBalance(prId)
803- let $t03173331844 = {
803+ let $t03174331854 = {
804804 let @ = invoke(this, "getOneTknV2READONLY", [outAssetId, pmtAmt], nil)
805805 if ($isInstanceOf(@, "(Int, Int)"))
806806 then @
807807 else throw(($getType(@) + " couldn't be cast to (Int, Int)"))
808808 }
809- if (($t03173331844 == $t03173331844))
809+ if (($t03174331854 == $t03174331854))
810810 then {
811- let feeAmount = $t03173331844._2
812- let totalGet = $t03173331844._1
811+ let feeAmount = $t03174331854._2
812+ let totalGet = $t03174331854._1
813813 let totalAmount = if (if ((minOutAmount > 0))
814814 then (minOutAmount > totalGet)
815815 else false)
816816 then throwErr(makeString(["amount to receive is less than ", toString(minOutAmount)], ""))
817817 else totalGet
818- let $t03203432341 = if ((outAssetId == amId))
818+ let $t03204432351 = if ((outAssetId == amId))
819819 then $Tuple4(totalAmount, 0, ((amBalance - totalAmount) - feeAmount), prBalance)
820820 else if ((outAssetId == prId))
821821 then $Tuple4(0, totalAmount, amBalance, ((prBalance - totalAmount) - feeAmount))
822822 else throw("invalid out asset id")
823- let outAm = $t03203432341._1
824- let outPr = $t03203432341._2
825- let amBalanceNew = $t03203432341._3
826- let prBalanceNew = $t03203432341._4
823+ let outAm = $t03204432351._1
824+ let outPr = $t03204432351._2
825+ let amBalanceNew = $t03204432351._3
826+ let prBalanceNew = $t03204432351._4
827827 let curPrX18 = cpbi(t1(prBalanceNew, prDecimals), t1(amBalanceNew, amDecimals))
828828 let curPr = f1(curPrX18, scale8)
829829 let outAssetIdOrWaves = if ((outAssetId == "WAVES"))
838838 let burn = invoke(fca, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
839839 if ((burn == burn))
840840 then {
841- let $t03312633476 = {
841+ let $t03313633486 = {
842842 let feeAmountForCalc = if ((this == feeCollectorAddress))
843843 then 0
844844 else feeAmount
849849 then $Tuple2(-((totalGet + feeAmountForCalc)), 0)
850850 else $Tuple2(0, -((totalGet + feeAmountForCalc)))
851851 }
852- let amountAssetBalanceDelta = $t03312633476._1
853- let priceAssetBalanceDelta = $t03312633476._2
854- let $t03347933587 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
855- let refreshDLpActions = $t03347933587._1
856- let updatedDLp = $t03347933587._2
852+ let amountAssetBalanceDelta = $t03313633486._1
853+ let priceAssetBalanceDelta = $t03313633486._2
854+ let $t03348933597 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
855+ let refreshDLpActions = $t03348933597._1
856+ let updatedDLp = $t03348933597._2
857857 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
858858 if ((isUpdatedDLpValid == isUpdatedDLpValid))
859859 then $Tuple2((state ++ refreshDLpActions), totalAmount)
925925 let c = (((((D * D) / (x * n)) * D) * aPrecision) / (ann * n))
926926 let b = ((s + ((D * aPrecision) / ann)) - D)
927927 func calc (acc,cur) = {
928- let $t03507435094 = acc
929- let y = $t03507435094._1
930- let found = $t03507435094._2
928+ let $t03508435104 = acc
929+ let y = $t03508435104._1
930+ let found = $t03508435104._2
931931 if ((found != unit))
932932 then acc
933933 else {
940940 }
941941
942942 let arr = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
943- let $t03542535472 = {
943+ let $t03543535482 = {
944944 let $l = arr
945945 let $s = size($l)
946946 let $acc0 = $Tuple2(D, unit)
954954
955955 $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)
956956 }
957- let y = $t03542535472._1
958- let found = $t03542535472._2
957+ let y = $t03543535482._1
958+ let found = $t03543535482._2
959959 if ((found != unit))
960960 then y
961961 else throw(("Y calculation error, Y = " + toString(y)))
967967
968968 @Callable(i)
969969 func calculateAmountOutForSwapREADONLY (cleanAmountIn,isReverse,feePoolAmount) = {
970- let $t03582436248 = if ((isReverse == false))
970+ let $t03583436258 = if ((isReverse == false))
971971 then {
972972 let assetOut = strf(this, pa())
973973 let poolAmountInBalance = (toBigInt(getAccBalance(strf(this, aa()))) + toBigInt(cleanAmountIn))
978978 let poolAmountInBalance = (toBigInt(getAccBalance(strf(this, pa()))) + toBigInt(cleanAmountIn))
979979 $Tuple2(assetOut, poolAmountInBalance)
980980 }
981- let assetOut = $t03582436248._1
982- let poolAmountInBalance = $t03582436248._2
981+ let assetOut = $t03583436258._1
982+ let poolAmountInBalance = $t03583436258._2
983983 let poolConfig = gpc()
984984 let amId = poolConfig[idxAmAsId]
985985 let prId = poolConfig[idxPrAsId]
10191019 then {
10201020 let pmt = value(i.payments[0])
10211021 let assetIn = assetIdToString(pmt.assetId)
1022- let $t03768438078 = if ((isReverse == false))
1022+ let $t03769438088 = if ((isReverse == false))
10231023 then {
10241024 let assetOut = strf(this, pa())
10251025 let poolAmountInBalance = (getAccBalance(assetIn) - value(i.payments[0]).amount)
10301030 let poolAmountInBalance = (getAccBalance(assetIn) - value(i.payments[0]).amount)
10311031 $Tuple2(assetOut, poolAmountInBalance)
10321032 }
1033- let assetOut = $t03768438078._1
1034- let poolAmountInBalance = $t03768438078._2
1033+ let assetOut = $t03769438088._1
1034+ let poolAmountInBalance = $t03769438088._2
10351035 let poolConfig = gpc()
10361036 let amId = poolConfig[idxAmAsId]
10371037 let prId = poolConfig[idxPrAsId]
11361136 else throw("Strict value is not equal to itself.")
11371137 }
11381138 else [ScriptTransfer(i.caller, emitLpAmt, lpAssetId)]
1139- let $t04222242364 = refreshDLpInternal(0, 0, 0)
1140- let refreshDLpActions = $t04222242364._1
1141- let updatedDLp = $t04222242364._2
1139+ let $t04223242374 = refreshDLpInternal(0, 0, 0)
1140+ let refreshDLpActions = $t04223242374._1
1141+ let updatedDLp = $t04223242374._2
11421142 let check = if ((updatedDLp >= currentDLp))
11431143 then true
11441144 else throwErr(makeString(["updated DLp lower than current DLp", toString(amountAssetBalance), toString(priceAssetBalance), toString(lpAssetEmission), toString(currentDLp), toString(updatedDLp), toString(amDiff), toString(prDiff)], " "))
12111211 else calcCurrentDLp(toBigInt(0), toBigInt(pmtAmt), toBigInt(0))
12121212 if ((currentDLp == currentDLp))
12131213 then {
1214- let $t04400544163 = calcPutOneTkn(pmtAmt, pmtAssetId, toString(userAddress), toBase58String(i.transactionId), true)
1215- if (($t04400544163 == $t04400544163))
1214+ let $t04401544173 = calcPutOneTkn(pmtAmt, pmtAssetId, toString(userAddress), toBase58String(i.transactionId), true)
1215+ if (($t04401544173 == $t04401544173))
12161216 then {
1217- let feeAmount = $t04400544163._3
1218- let state = $t04400544163._2
1219- let estimLP = $t04400544163._1
1217+ let feeAmount = $t04401544173._3
1218+ let state = $t04401544173._2
1219+ let estimLP = $t04401544173._1
12201220 let emitLpAmt = if (if ((minOutAmount > 0))
12211221 then (minOutAmount > estimLP)
12221222 else false)
12441244 let sendFeeToMatcher = if ((feeAmount > 0))
12451245 then [ScriptTransfer(feeCollectorAddress, feeAmount, fromBase58String(pmtAssetId))]
12461246 else nil
1247- let $t04504845397 = if ((this == feeCollectorAddress))
1247+ let $t04505845407 = if ((this == feeCollectorAddress))
12481248 then $Tuple2(0, 0)
12491249 else {
12501250 let paymentInAmountAsset = if ((pmt.assetId == cfgAmountAssetId))
12541254 then $Tuple2(-(feeAmount), 0)
12551255 else $Tuple2(0, -(feeAmount))
12561256 }
1257- let amountAssetBalanceDelta = $t04504845397._1
1258- let priceAssetBalanceDelta = $t04504845397._2
1259- let $t04540045508 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
1260- let refreshDLpActions = $t04540045508._1
1261- let updatedDLp = $t04540045508._2
1257+ let amountAssetBalanceDelta = $t04505845407._1
1258+ let priceAssetBalanceDelta = $t04505845407._2
1259+ let $t04541045518 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
1260+ let refreshDLpActions = $t04541045518._1
1261+ let updatedDLp = $t04541045518._2
12621262 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
12631263 if ((isUpdatedDLpValid == isUpdatedDLpValid))
12641264 then $Tuple2((((state ++ lpTrnsfr) ++ sendFeeToMatcher) ++ refreshDLpActions), emitLpAmt)
12901290 let currentDLp = calcCurrentDLp(amAssetPmt, prAssetPmt, toBigInt(0))
12911291 if ((currentDLp == currentDLp))
12921292 then {
1293- let $t04653846603 = refreshDLpInternal(0, 0, 0)
1294- let refreshDLpActions = $t04653846603._1
1295- let updatedDLp = $t04653846603._2
1293+ let $t04654846613 = refreshDLpInternal(0, 0, 0)
1294+ let refreshDLpActions = $t04654846613._1
1295+ let updatedDLp = $t04654846613._2
12961296 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
12971297 if ((isUpdatedDLpValid == isUpdatedDLpValid))
12981298 then (state ++ refreshDLpActions)
13171317 let b = invoke(fca, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
13181318 if ((b == b))
13191319 then {
1320- let $t04777647858 = refreshDLpInternal(-(outAmtAmt), -(outPrAmt), 0)
1321- let refreshDLpActions = $t04777647858._1
1322- let updatedDLp = $t04777647858._2
1320+ let $t04778647868 = refreshDLpInternal(-(outAmtAmt), -(outPrAmt), 0)
1321+ let refreshDLpActions = $t04778647868._1
1322+ let updatedDLp = $t04778647868._2
13231323 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
13241324 if ((isUpdatedDLpValid == isUpdatedDLpValid))
13251325 then (state ++ refreshDLpActions)
13541354 else throwErr("exactly 1 payment are expected")]
13551355 if ((checks == checks))
13561356 then {
1357- let $t04847648631 = getOneTknV2Internal(outAssetId, minOutAmount, i.payments, i.caller, i.originCaller, i.transactionId)
1358- let state = $t04847648631._1
1359- let totalAmount = $t04847648631._2
1357+ let $t04848648641 = getOneTknV2Internal(outAssetId, minOutAmount, i.payments, i.caller, i.originCaller, i.transactionId)
1358+ let state = $t04848648641._1
1359+ let totalAmount = $t04848648641._2
13601360 $Tuple2(state, totalAmount)
13611361 }
13621362 else throw("Strict value is not equal to itself.")
13731373 if ((checkLastRefreshedBlockHeight == checkLastRefreshedBlockHeight))
13741374 then {
13751375 let dLp = valueOrErrorMessage(parseBigInt(valueOrElse(getString(this, keyDLp), "0")), fmtErr("invalid dLp"))
1376- let $t04915549219 = refreshDLpInternal(0, 0, 0)
1377- let dLpUpdateActions = $t04915549219._1
1378- let updatedDLp = $t04915549219._2
1376+ let $t04916549229 = refreshDLpInternal(0, 0, 0)
1377+ let dLpUpdateActions = $t04916549229._1
1378+ let updatedDLp = $t04916549229._2
13791379 let actions = if ((dLp != updatedDLp))
13801380 then dLpUpdateActions
13811381 else throwErr("nothing to refresh")
14031403 let newY = getYD(xp, index, D1)
14041404 let dy = (xp[index] - newY)
14051405 let totalGetRaw = max([0, toInt((dy - big1))])
1406- let $t05022950284 = takeFee(totalGetRaw, outFee)
1407- let totalGet = $t05022950284._1
1408- let feeAmount = $t05022950284._2
1406+ let $t05023950294 = takeFee(totalGetRaw, outFee)
1407+ let totalGet = $t05023950294._1
1408+ let feeAmount = $t05023950294._2
14091409 $Tuple2(nil, $Tuple2(totalGet, feeAmount))
14101410 }
14111411
14181418 let lpId = toBase58String(value(cfgLpAssetId))
14191419 let amBalance = getAccBalance(amId)
14201420 let prBalance = getAccBalance(prId)
1421- let $t05065950774 = {
1421+ let $t05066950784 = {
14221422 let @ = invoke(this, "getOneTknV2READONLY", [outAssetId, lpAssetAmount], nil)
14231423 if ($isInstanceOf(@, "(Int, Int)"))
14241424 then @
14251425 else throw(($getType(@) + " couldn't be cast to (Int, Int)"))
14261426 }
1427- let totalGet = $t05065950774._1
1428- let feeAmount = $t05065950774._2
1427+ let totalGet = $t05066950784._1
1428+ let feeAmount = $t05066950784._2
14291429 let r = ego("", lpId, lpAssetAmount, this)
14301430 let outAmAmt = r._1
14311431 let outPrAmt = r._2
14591459 let burnLPAssetOnFactory = invoke(fca, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
14601460 if ((burnLPAssetOnFactory == burnLPAssetOnFactory))
14611461 then {
1462- let $t05194052021 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1463- let refreshDLpActions = $t05194052021._1
1464- let updatedDLp = $t05194052021._2
1462+ let $t05195052031 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1463+ let refreshDLpActions = $t05195052031._1
1464+ let updatedDLp = $t05195052031._2
14651465 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
14661466 if ((isUpdatedDLpValid == isUpdatedDLpValid))
14671467 then (state ++ refreshDLpActions)
15061506 let burnA = invoke(fca, "burn", [amount], [AttachedPayment(lpAssetId, amount)])
15071507 if ((burnA == burnA))
15081508 then {
1509- let $t05304853129 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1510- let refreshDLpActions = $t05304853129._1
1511- let updatedDLp = $t05304853129._2
1509+ let $t05305853139 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1510+ let refreshDLpActions = $t05305853139._1
1511+ let updatedDLp = $t05305853139._2
15121512 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
15131513 if ((isUpdatedDLpValid == isUpdatedDLpValid))
15141514 then (state ++ refreshDLpActions)
15591559 let burnLPAssetOnFactory = invoke(fca, "burn", [unstakeAmount], [AttachedPayment(cfgLpAssetId, unstakeAmount)])
15601560 if ((burnLPAssetOnFactory == burnLPAssetOnFactory))
15611561 then {
1562- let $t05438054461 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1563- let refreshDLpActions = $t05438054461._1
1564- let updatedDLp = $t05438054461._2
1562+ let $t05439054471 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1563+ let refreshDLpActions = $t05439054471._1
1564+ let updatedDLp = $t05439054471._2
15651565 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
15661566 if ((isUpdatedDLpValid == isUpdatedDLpValid))
15671567 then (state ++ refreshDLpActions)
16101610 let unstakeInv = invoke(staking, "unstakeINTERNAL", [lpAssetId, unstakeAmount, userAddress.bytes, lpAssetRecipientAddress.bytes], nil)
16111611 if ((unstakeInv == unstakeInv))
16121612 then {
1613- let $t05548355671 = getOneTknV2Internal(outAssetId, minOutAmount, [AttachedPayment(lpAssetId, unstakeAmount)], i.caller, i.originCaller, i.transactionId)
1614- let state = $t05548355671._1
1615- let totalAmount = $t05548355671._2
1613+ let $t05549355681 = getOneTknV2Internal(outAssetId, minOutAmount, [AttachedPayment(lpAssetId, unstakeAmount)], i.caller, i.originCaller, i.transactionId)
1614+ let state = $t05549355681._1
1615+ let totalAmount = $t05549355681._2
16161616 $Tuple2(state, totalAmount)
16171617 }
16181618 else throw("Strict value is not equal to itself.")
16241624
16251625 @Callable(i)
16261626 func putOneTknV2WithBonusREADONLY (paymentAmountRaw,paymentAssetId) = {
1627- let $t05579955902 = calcPutOneTkn(paymentAmountRaw, paymentAssetId, "", "", true)
1628- let lpAmount = $t05579955902._1
1629- let state = $t05579955902._2
1630- let feeAmount = $t05579955902._3
1631- let bonus = $t05579955902._4
1627+ let $t05580955912 = calcPutOneTkn(paymentAmountRaw, paymentAssetId, "", "", true)
1628+ let lpAmount = $t05580955912._1
1629+ let state = $t05580955912._2
1630+ let feeAmount = $t05580955912._3
1631+ let bonus = $t05580955912._4
16321632 $Tuple2(nil, $Tuple3(lpAmount, feeAmount, bonus))
16331633 }
16341634
16361636
16371637 @Callable(i)
16381638 func putOneTknV2WithoutTakeFeeREADONLY (paymentAmountRaw,paymentAssetId) = {
1639- let $t05605056154 = calcPutOneTkn(paymentAmountRaw, paymentAssetId, "", "", false)
1640- let lpAmount = $t05605056154._1
1641- let state = $t05605056154._2
1642- let feeAmount = $t05605056154._3
1643- let bonus = $t05605056154._4
1639+ let $t05606056164 = calcPutOneTkn(paymentAmountRaw, paymentAssetId, "", "", false)
1640+ let lpAmount = $t05606056164._1
1641+ let state = $t05606056164._2
1642+ let feeAmount = $t05606056164._3
1643+ let bonus = $t05606056164._4
16441644 $Tuple2(nil, $Tuple3(lpAmount, feeAmount, bonus))
16451645 }
16461646
17021702 @Callable(i)
17031703 func changeAmp () = {
17041704 let cfg = invoke(fca, "getChangeAmpConfigREADONLY", [toString(this)], nil)
1705- let $t05850858707 = match cfg {
1705+ let $t05851858717 = match cfg {
17061706 case list: List[Any] =>
17071707 $Tuple3({
17081708 let @ = list[0]
17231723 case _ =>
17241724 throwErr("invalid entry type")
17251725 }
1726- let delay = $t05850858707._1
1727- let delta = $t05850858707._2
1728- let target = $t05850858707._3
1726+ let delay = $t05851858717._1
1727+ let delta = $t05851858717._2
1728+ let target = $t05851858717._3
17291729 let curAmp = parseIntValue(getStringValue(amp()))
17301730 let newAmpRaw = (curAmp + delta)
17311731 let newAmp = if ((0 > delta))
17611761 match tx {
17621762 case order: Order =>
17631763 let matcherPub = mp()
1764- let $t05964059757 = if (skipOrderValidation())
1764+ let $t05965059767 = if (skipOrderValidation())
17651765 then $Tuple2(true, "")
17661766 else validateMatcherOrderAllowed(order)
1767- let orderValid = $t05964059757._1
1768- let orderValidInfo = $t05964059757._2
1767+ let orderValid = $t05965059767._1
1768+ let orderValidInfo = $t05965059767._2
17691769 let senderValid = sigVerify(order.bodyBytes, order.proofs[0], order.senderPublicKey)
17701770 let matcherValid = sigVerify(order.bodyBytes, order.proofs[1], matcherPub)
17711771 if (if (if (orderValid)
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let scale8 = 100000000
55
66 let scale8BigInt = toBigInt(100000000)
77
88 let scale18 = toBigInt(1000000000000000000)
99
1010 let zeroBigInt = toBigInt(0)
1111
1212 let big0 = toBigInt(0)
1313
1414 let big1 = toBigInt(1)
1515
1616 let big2 = toBigInt(2)
1717
1818 let big3 = toBigInt(3)
1919
2020 let big4 = toBigInt(4)
2121
2222 let slippage4D = toBigInt((scale8 - ((scale8 * 1) / scale8)))
2323
2424 let wavesString = "WAVES"
2525
2626 let Amult = "100"
2727
2828 let Dconv = "1"
2929
3030 let SEP = "__"
3131
3232 let EMPTY = ""
3333
3434 let PoolActive = 1
3535
3636 let PoolPutDis = 2
3737
3838 let PoolMatcherDis = 3
3939
4040 let PoolShutdown = 4
4141
4242 let idxPoolAddress = 1
4343
4444 let idxPoolSt = 2
4545
4646 let idxLPAsId = 3
4747
4848 let idxAmAsId = 4
4949
5050 let idxPrAsId = 5
5151
5252 let idxAmtAsDcm = 6
5353
5454 let idxPriceAsDcm = 7
5555
5656 let idxIAmtAsId = 8
5757
5858 let idxIPriceAsId = 9
5959
6060 let idxFactStakCntr = 1
6161
6262 let idxFactoryRestCntr = 6
6363
6464 let idxFactSlippCntr = 7
6565
6666 let idxFactGwxRewCntr = 10
6767
6868 let feeDefault = fraction(10, scale8, 10000)
6969
7070 func t1 (origVal,origScaleMult) = fraction(toBigInt(origVal), scale18, toBigInt(origScaleMult))
7171
7272
7373 func t1BigInt (origVal,origScaleMult) = fraction(origVal, scale18, origScaleMult)
7474
7575
7676 func f1 (val,resultScaleMult) = toInt(fraction(val, toBigInt(resultScaleMult), scale18))
7777
7878
7979 func fromX18Round (val,resultScaleMult,round) = toInt(fraction(val, toBigInt(resultScaleMult), scale18, round))
8080
8181
8282 func t2 (origVal,origScaleMult) = fraction(origVal, scale18, toBigInt(origScaleMult))
8383
8484
8585 func f2 (val,resultScaleMult) = fraction(val, toBigInt(resultScaleMult), scale18)
8686
8787
8888 func ts (amt,resScale,curScale) = fraction(amt, resScale, curScale)
8989
9090
9191 func abs (val) = if ((zeroBigInt > val))
9292 then -(val)
9393 else val
9494
9595
9696 func absBigInt (val) = if ((zeroBigInt > val))
9797 then -(val)
9898 else val
9999
100100
101101 func fc () = "%s__factoryContract"
102102
103103
104104 func keyManagerPublicKey () = "%s__managerPublicKey"
105105
106106
107107 func keyManagerVaultAddress () = "%s__managerVaultAddress"
108108
109109
110110 func pl () = "%s%s__price__last"
111111
112112
113113 func ph (h,t) = makeString(["%s%s%d%d__price__history", toString(h), toString(t)], SEP)
114114
115115
116116 func pau (ua,txId) = ((("%s%s%s__P__" + ua) + "__") + txId)
117117
118118
119119 func gau (ua,txId) = ((("%s%s%s__G__" + ua) + "__") + txId)
120120
121121
122122 func aa () = "%s__amountAsset"
123123
124124
125125 func pa () = "%s__priceAsset"
126126
127127
128128 func amp () = "%s__amp"
129129
130130
131131 func keyAmpHistory (heightBlocks) = ("%s%d__amp__" + toString(heightBlocks))
132132
133133
134134 func keyChangeAmpLastCall () = "%s__changeAmpLastCall"
135135
136136
137137 let keyFee = "%s__fee"
138138
139139 let fee = valueOrElse(getInteger(this, keyFee), feeDefault)
140140
141141 let keyDLp = makeString(["%s", "dLp"], SEP)
142142
143143 let keyDLpRefreshedHeight = makeString(["%s", "dLpRefreshedHeight"], SEP)
144144
145145 let keyDLpRefreshDelay = makeString(["%s", "refreshDLpDelay"], SEP)
146146
147147 let dLpRefreshDelayDefault = 30
148148
149149 let dLpRefreshDelay = valueOrElse(getInteger(this, keyDLpRefreshDelay), dLpRefreshDelayDefault)
150150
151151 func fcfg () = "%s__factoryConfig"
152152
153153
154154 func mtpk () = "%s%s__matcher__publicKey"
155155
156156
157157 func pc (iAmtAs,iPrAs) = (((("%d%d%s__" + iAmtAs) + "__") + iPrAs) + "__config")
158158
159159
160160 func mba (bAStr) = ("%s%s%s__mappings__baseAsset2internalId__" + bAStr)
161161
162162
163163 func aps () = "%s__shutdown"
164164
165165
166166 func keyAllowedLpStableScriptHash () = "%s__allowedLpStableScriptHash"
167167
168168
169169 func keyFeeCollectorAddress () = "%s__feeCollectorAddress"
170170
171171
172172 func keySkipOrderValidation (poolAddress) = ("%s%s__skipOrderValidation__" + poolAddress)
173173
174174
175175 func throwOrderError (orderValid,orderValidInfo,senderValid,matcherValid) = throw((((((((("order validation failed: orderValid=" + toString(orderValid)) + " (") + orderValidInfo) + ")") + " senderValid=") + toString(senderValid)) + " matcherValid=") + toString(matcherValid)))
176176
177177
178178 func addressFromStringOrThis (addressString) = match addressFromString(addressString) {
179179 case a: Address =>
180180 a
181181 case _ =>
182182 this
183183 }
184184
185185
186186 func getManagerVaultAddressOrThis () = {
187- let factoryAddress = match addressFromStringOrThis(fc()) {
188- case fca: Address =>
189- fca
187+ let factoryAddress = match getString(fc()) {
188+ case fca: String =>
189+ addressFromStringOrThis(fca)
190190 case _ =>
191191 this
192192 }
193193 match getString(factoryAddress, keyManagerVaultAddress()) {
194194 case s: String =>
195195 addressFromStringOrThis(s)
196196 case _ =>
197197 this
198198 }
199199 }
200200
201201
202202 func strf (addr,key) = valueOrErrorMessage(getString(addr, key), makeString(["mandatory ", toString(addr), ".", key, " not defined"], ""))
203203
204204
205205 func intf (addr,key) = valueOrErrorMessage(getInteger(addr, key), makeString(["mandatory ", toString(addr), ".", key, " not defined"], ""))
206206
207207
208208 func throwErr (msg) = throw(makeString(["lp_stable.ride:", msg], " "))
209209
210210
211211 func fmtErr (msg) = makeString(["lp_stable.ride:", msg], " ")
212212
213213
214214 let fca = addressFromStringValue(strf(this, fc()))
215215
216216 let inFee = {
217217 let @ = invoke(fca, "getInFeeREADONLY", [toString(this)], nil)
218218 if ($isInstanceOf(@, "Int"))
219219 then @
220220 else throw(($getType(@) + " couldn't be cast to Int"))
221221 }
222222
223223 let outFee = {
224224 let @ = invoke(fca, "getOutFeeREADONLY", [toString(this)], nil)
225225 if ($isInstanceOf(@, "Int"))
226226 then @
227227 else throw(($getType(@) + " couldn't be cast to Int"))
228228 }
229229
230230 let A = strf(this, amp())
231231
232232 func igs () = valueOrElse(getBoolean(fca, aps()), false)
233233
234234
235235 func mp () = fromBase58String(strf(fca, mtpk()))
236236
237237
238238 let feeCollectorAddress = addressFromStringValue(strf(fca, keyFeeCollectorAddress()))
239239
240240 func gpc () = {
241241 let amtAs = strf(this, aa())
242242 let priceAs = strf(this, pa())
243243 let iPriceAs = intf(fca, mba(priceAs))
244244 let iAmtAs = intf(fca, mba(amtAs))
245245 split(strf(fca, pc(toString(iAmtAs), toString(iPriceAs))), SEP)
246246 }
247247
248248
249249 func parseAssetId (input) = if ((input == wavesString))
250250 then unit
251251 else fromBase58String(input)
252252
253253
254254 func assetIdToString (input) = if ((input == unit))
255255 then wavesString
256256 else toBase58String(value(input))
257257
258258
259259 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]))
260260
261261
262262 let poolConfigParsed = parsePoolConfig(gpc())
263263
264-let $t086768905 = poolConfigParsed
264+let $t086868915 = poolConfigParsed
265265
266-let cfgPoolAddress = $t086768905._1
266+let cfgPoolAddress = $t086868915._1
267267
268-let cfgPoolStatus = $t086768905._2
268+let cfgPoolStatus = $t086868915._2
269269
270-let cfgLpAssetId = $t086768905._3
270+let cfgLpAssetId = $t086868915._3
271271
272-let cfgAmountAssetId = $t086768905._4
272+let cfgAmountAssetId = $t086868915._4
273273
274-let cfgPriceAssetId = $t086768905._5
274+let cfgPriceAssetId = $t086868915._5
275275
276-let cfgAmountAssetDecimals = $t086768905._6
276+let cfgAmountAssetDecimals = $t086868915._6
277277
278-let cfgPriceAssetDecimals = $t086768905._7
278+let cfgPriceAssetDecimals = $t086868915._7
279279
280-let cfgInAmountAssedId = $t086768905._8
280+let cfgInAmountAssedId = $t086868915._8
281281
282-let cfgInPriceAssetId = $t086768905._9
282+let cfgInPriceAssetId = $t086868915._9
283283
284284 func gfc () = split(strf(fca, fcfg()), SEP)
285285
286286
287287 let factoryConfig = gfc()
288288
289289 let stakingContract = valueOrErrorMessage(addressFromString(factoryConfig[idxFactStakCntr]), "Invalid staking contract address")
290290
291291 let slipageContract = valueOrErrorMessage(addressFromString(factoryConfig[idxFactSlippCntr]), "Invalid slipage contract address")
292292
293293 let gwxContract = valueOrErrorMessage(addressFromString(factoryConfig[idxFactGwxRewCntr]), "Invalid gwx contract address")
294294
295295 let restContract = valueOrErrorMessage(addressFromString(factoryConfig[idxFactoryRestCntr]), "Invalid gwx contract address")
296296
297297 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)
298298
299299
300300 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)
301301
302302
303303 func getAccBalance (assetId) = if ((assetId == "WAVES"))
304304 then wavesBalance(this).available
305305 else assetBalance(this, fromBase58String(assetId))
306306
307307
308308 func cpbi (prAmtX18,amAmtX18) = fraction(prAmtX18, scale18, amAmtX18)
309309
310310
311311 func cpbir (prAmtX18,amAmtX18,round) = fraction(prAmtX18, scale18, amAmtX18, round)
312312
313313
314314 func vad (A1,A2,slippage) = {
315315 let diff = fraction((A1 - A2), scale8BigInt, A2)
316316 let pass = ((slippage - abs(diff)) > zeroBigInt)
317317 if (!(pass))
318318 then throw(("Big slpg: " + toString(diff)))
319319 else $Tuple2(pass, min([A1, A2]))
320320 }
321321
322322
323323 func vd (D1,D0,slpg) = {
324324 let diff = fraction(D0, scale8BigInt, D1)
325325 let fail = (slpg > diff)
326326 if (if (fail)
327327 then true
328328 else (D0 > D1))
329329 then throw(((((((toString(D0) + " ") + toString(D1)) + " ") + toString(diff)) + " ") + toString(slpg)))
330330 else fail
331331 }
332332
333333
334334 func pcp (amAssetDcm,prAssetDcm,amAmt,prAmt) = {
335335 let amtAsAmtX18 = t1(amAmt, amAssetDcm)
336336 let prAsAmtX18 = t1(prAmt, prAssetDcm)
337337 cpbi(prAsAmtX18, amtAsAmtX18)
338338 }
339339
340340
341341 func calcPrices (amAmt,prAmt,lpAmt) = {
342342 let amtAsDcm = cfgAmountAssetDecimals
343343 let prAsDcm = cfgPriceAssetDecimals
344344 let priceX18 = pcp(amtAsDcm, prAsDcm, amAmt, prAmt)
345345 let amAmtX18 = t1(amAmt, amtAsDcm)
346346 let prAmtX18 = t1(prAmt, prAsDcm)
347347 let lpAmtX18 = t1(lpAmt, scale8)
348348 let lpPrInAmAsX18 = cpbi(amAmtX18, lpAmtX18)
349349 let lpPrInPrAsX18 = cpbi(prAmtX18, lpAmtX18)
350350 [priceX18, lpPrInAmAsX18, lpPrInPrAsX18]
351351 }
352352
353353
354354 func calculatePrices (amAmt,prAmt,lpAmt) = {
355355 let p = calcPrices(amAmt, prAmt, lpAmt)
356356 [f1(p[0], scale8), f1(p[1], scale8), f1(p[2], scale8)]
357357 }
358358
359359
360360 func takeFee (amount,fee) = {
361361 let feeAmount = if ((fee == 0))
362362 then 0
363363 else fraction(amount, fee, scale8)
364364 $Tuple2((amount - feeAmount), feeAmount)
365365 }
366366
367367
368368 func getD (xp) = {
369369 let xp0 = xp[0]
370370 let xp1 = xp[1]
371371 let s = (xp0 + xp1)
372372 if ((s == big0))
373373 then big0
374374 else {
375375 let a = parseIntValue(A)
376376 let ann = (a * 2)
377377 let p = fraction(xp0, xp1, big1)
378378 let xp0_xp1_n_n = fraction(p, big4, big1)
379379 let ann_s = fraction(toBigInt(ann), s, big1)
380380 let ann_1 = toBigInt((ann - 1))
381381 func calcDNext (d) = {
382382 let dd = fraction(d, d, big1)
383383 let ddd = fraction(dd, d, big1)
384384 let dp = fraction(ddd, big1, xp0_xp1_n_n)
385385 fraction((ann_s + fraction(dp, big2, big1)), d, (fraction(ann_1, d, big1) + fraction(big3, dp, big1)))
386386 }
387387
388388 func calc (acc,i) = if (acc._2)
389389 then acc
390390 else {
391391 let d = acc._1
392392 let dNext = calcDNext(d)
393393 let dDiffRaw = (dNext - value(d))
394394 let dDiff = if ((big0 > dDiffRaw))
395395 then -(dDiffRaw)
396396 else dDiffRaw
397397 if ((big1 >= dDiff))
398398 then $Tuple2(dNext, true)
399399 else $Tuple2(dNext, false)
400400 }
401401
402402 let arr = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16]
403- let $t01341013458 = {
403+ let $t01342013468 = {
404404 let $l = arr
405405 let $s = size($l)
406406 let $acc0 = $Tuple2(s, false)
407407 func $f0_1 ($a,$i) = if (($i >= $s))
408408 then $a
409409 else calc($a, $l[$i])
410410
411411 func $f0_2 ($a,$i) = if (($i >= $s))
412412 then $a
413413 else throw("List size exceeds 17")
414414
415415 $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)
416416 }
417- let d = $t01341013458._1
418- let found = $t01341013458._2
417+ let d = $t01342013468._1
418+ let found = $t01342013468._2
419419 if (found)
420420 then d
421421 else throw(("D calculation error, D = " + toString(d)))
422422 }
423423 }
424424
425425
426426 func ego (txId58,pmtAssetId,pmtLpAmt,userAddress) = {
427427 let lpId = cfgLpAssetId
428428 let amId = toBase58String(value(cfgAmountAssetId))
429429 let prId = toBase58String(value(cfgPriceAssetId))
430430 let amDcm = cfgAmountAssetDecimals
431431 let prDcm = cfgPriceAssetDecimals
432432 let sts = toString(cfgPoolStatus)
433433 let lpEmiss = valueOrErrorMessage(assetInfo(lpId), "Wrong LP id").quantity
434434 if ((toBase58String(lpId) != pmtAssetId))
435435 then throw("Wrong pmt asset")
436436 else {
437437 let amBalance = getAccBalance(amId)
438438 let amBalanceX18 = t1(amBalance, amDcm)
439439 let prBalance = getAccBalance(prId)
440440 let prBalanceX18 = t1(prBalance, prDcm)
441441 let curPriceX18 = cpbi(prBalanceX18, amBalanceX18)
442442 let curPrice = f1(curPriceX18, scale8)
443443 let pmtLpAmtX18 = t1(pmtLpAmt, scale8)
444444 let lpEmissX18 = t1(lpEmiss, scale8)
445445 let outAmAmtX18 = fraction(amBalanceX18, pmtLpAmtX18, lpEmissX18)
446446 let outPrAmtX18 = fraction(prBalanceX18, pmtLpAmtX18, lpEmissX18)
447447 let outAmAmt = fromX18Round(outAmAmtX18, amDcm, FLOOR)
448448 let outPrAmt = fromX18Round(outPrAmtX18, prDcm, FLOOR)
449449 let state = if ((txId58 == ""))
450450 then nil
451451 else [ScriptTransfer(userAddress, outAmAmt, if ((amId == "WAVES"))
452452 then unit
453453 else fromBase58String(amId)), ScriptTransfer(userAddress, outPrAmt, if ((prId == "WAVES"))
454454 then unit
455455 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)]
456456 $Tuple10(outAmAmt, outPrAmt, amId, prId, amBalance, prBalance, lpEmiss, curPriceX18, sts, state)
457457 }
458458 }
459459
460460
461461 func epo (txId58,slippage,inAmAmt,inAmId,inPrAmt,inPrId,userAddress,isEval,emitLp,isOneAsset,validateSlippage,pmtAmt,pmtId) = {
462462 let lpId = cfgLpAssetId
463463 let amIdStr = toBase58String(value(cfgAmountAssetId))
464464 let prIdStr = toBase58String(value(cfgPriceAssetId))
465465 let inAmIdStr = cfgInAmountAssedId
466466 let inPrIdStr = cfgInPriceAssetId
467467 let amtDcm = cfgAmountAssetDecimals
468468 let priceDcm = cfgPriceAssetDecimals
469469 let sts = toString(cfgPoolStatus)
470470 let lpEm = valueOrErrorMessage(assetInfo(lpId), "Wr lp as").quantity
471471 let amBalance = if (isEval)
472472 then getAccBalance(amIdStr)
473473 else if (if (isOneAsset)
474474 then (pmtId == amIdStr)
475475 else false)
476476 then (getAccBalance(amIdStr) - pmtAmt)
477477 else if (isOneAsset)
478478 then getAccBalance(amIdStr)
479479 else (getAccBalance(amIdStr) - inAmAmt)
480480 let prBalance = if (isEval)
481481 then getAccBalance(prIdStr)
482482 else if (if (isOneAsset)
483483 then (pmtId == prIdStr)
484484 else false)
485485 then (getAccBalance(prIdStr) - pmtAmt)
486486 else if (isOneAsset)
487487 then getAccBalance(prIdStr)
488488 else (getAccBalance(prIdStr) - inPrAmt)
489489 let inAmAssetAmtX18 = t1(inAmAmt, amtDcm)
490490 let inPrAssetAmtX18 = t1(inPrAmt, priceDcm)
491491 let userPriceX18 = cpbi(inPrAssetAmtX18, inAmAssetAmtX18)
492492 let amBalanceX18 = t1(amBalance, amtDcm)
493493 let prBalanceX18 = t1(prBalance, priceDcm)
494494 let D0 = getD([amBalanceX18, prBalanceX18])
495495 let r = if ((lpEm == 0))
496496 then {
497497 let D1 = getD([(amBalanceX18 + inAmAssetAmtX18), (prBalanceX18 + inPrAssetAmtX18)])
498498 let checkD = if ((D1 > D0))
499499 then true
500500 else throw("D1 should be greater than D0")
501501 if ((checkD == checkD))
502502 then {
503503 let curPriceX18 = zeroBigInt
504504 let slippageX18 = zeroBigInt
505505 let lpAmtX18 = D1
506506 $Tuple5(f1(lpAmtX18, scale8), f1(inAmAssetAmtX18, amtDcm), f1(inPrAssetAmtX18, priceDcm), cpbi((prBalanceX18 + inPrAssetAmtX18), (amBalanceX18 + inAmAssetAmtX18)), slippageX18)
507507 }
508508 else throw("Strict value is not equal to itself.")
509509 }
510510 else {
511511 let curPriceX18 = cpbi(prBalanceX18, amBalanceX18)
512512 let slippageRealX18 = fraction(abs((curPriceX18 - userPriceX18)), scale18, curPriceX18)
513513 let slippageX18 = t1(slippage, scale8)
514514 if (if (if (validateSlippage)
515515 then (curPriceX18 != zeroBigInt)
516516 else false)
517517 then (slippageRealX18 > slippageX18)
518518 else false)
519519 then throw(((("Price slippage " + toString(slippageRealX18)) + " > ") + toString(slippageX18)))
520520 else {
521521 let lpEmissionX18 = t1(lpEm, scale8)
522522 let prViaAmX18 = fraction(inAmAssetAmtX18, cpbir(prBalanceX18, amBalanceX18, CEILING), scale18, CEILING)
523523 let amViaPrX18 = fraction(inPrAssetAmtX18, scale18, cpbir(prBalanceX18, amBalanceX18, FLOOR), CEILING)
524524 let expectedAmts = if ((prViaAmX18 > inPrAssetAmtX18))
525525 then $Tuple2(amViaPrX18, inPrAssetAmtX18)
526526 else $Tuple2(inAmAssetAmtX18, prViaAmX18)
527527 let expAmtAssetAmtX18 = expectedAmts._1
528528 let expPriceAssetAmtX18 = expectedAmts._2
529529 let D1 = getD([(amBalanceX18 + expAmtAssetAmtX18), (prBalanceX18 + expPriceAssetAmtX18)])
530530 let checkD = if ((D1 > D0))
531531 then true
532532 else throw("D1 should be greater than D0")
533533 if ((checkD == checkD))
534534 then {
535535 let lpAmtX18 = fraction(lpEmissionX18, (D1 - D0), D0)
536536 $Tuple5(fromX18Round(lpAmtX18, scale8, FLOOR), fromX18Round(expAmtAssetAmtX18, amtDcm, CEILING), fromX18Round(expPriceAssetAmtX18, priceDcm, CEILING), curPriceX18, slippageX18)
537537 }
538538 else throw("Strict value is not equal to itself.")
539539 }
540540 }
541541 let calcLpAmt = r._1
542542 let calcAmAssetPmt = r._2
543543 let calcPrAssetPmt = r._3
544544 let curPrice = f1(r._4, scale8)
545545 let slippageCalc = f1(r._5, scale8)
546546 if ((0 >= calcLpAmt))
547547 then throw("LP <= 0")
548548 else {
549549 let emitLpAmt = if (!(emitLp))
550550 then 0
551551 else calcLpAmt
552552 let amDiff = (inAmAmt - calcAmAssetPmt)
553553 let prDiff = (inPrAmt - calcPrAssetPmt)
554- let $t02129721642 = if (if (isOneAsset)
554+ let $t02130721652 = if (if (isOneAsset)
555555 then (pmtId == amIdStr)
556556 else false)
557557 then $Tuple2(pmtAmt, 0)
558558 else if (if (isOneAsset)
559559 then (pmtId == prIdStr)
560560 else false)
561561 then $Tuple2(0, pmtAmt)
562562 else $Tuple2(calcAmAssetPmt, calcPrAssetPmt)
563- let writeAmAmt = $t02129721642._1
564- let writePrAmt = $t02129721642._2
563+ let writeAmAmt = $t02130721652._1
564+ let writePrAmt = $t02130721652._2
565565 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))]
566566 $Tuple13(calcLpAmt, emitLpAmt, curPrice, amBalance, prBalance, lpEm, lpId, sts, commonState, amDiff, prDiff, inAmId, inPrId)
567567 }
568568 }
569569
570570
571571 func getYD (xp,i,D) = {
572572 let n = big2
573573 let x = xp[if ((i == 0))
574574 then 1
575575 else 0]
576576 let aPrecision = parseBigIntValue(Amult)
577577 let a = (parseBigIntValue(A) * aPrecision)
578578 let s = x
579579 let ann = (a * n)
580580 let c = (((((D * D) / (x * n)) * D) * aPrecision) / (ann * n))
581581 let b = ((s + ((D * aPrecision) / ann)) - D)
582582 func calc (acc,cur) = {
583- let $t02283722857 = acc
584- let y = $t02283722857._1
585- let found = $t02283722857._2
583+ let $t02284722867 = acc
584+ let y = $t02284722867._1
585+ let found = $t02284722867._2
586586 if ((found != unit))
587587 then acc
588588 else {
589589 let yNext = (((y * y) + c) / ((big2 * y) + b))
590590 let yDiff = absBigInt((yNext - value(y)))
591591 if ((big1 >= yDiff))
592592 then $Tuple2(yNext, cur)
593593 else $Tuple2(yNext, unit)
594594 }
595595 }
596596
597597 let arr = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
598- let $t02316423211 = {
598+ let $t02317423221 = {
599599 let $l = arr
600600 let $s = size($l)
601601 let $acc0 = $Tuple2(D, unit)
602602 func $f0_1 ($a,$i) = if (($i >= $s))
603603 then $a
604604 else calc($a, $l[$i])
605605
606606 func $f0_2 ($a,$i) = if (($i >= $s))
607607 then $a
608608 else throw("List size exceeds 15")
609609
610610 $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)
611611 }
612- let y = $t02316423211._1
613- let found = $t02316423211._2
612+ let y = $t02317423221._1
613+ let found = $t02317423221._2
614614 if ((found != unit))
615615 then y
616616 else throw(("Y calculation error, Y = " + toString(y)))
617617 }
618618
619619
620620 func calcDLp (amountBalance,priceBalance,lpEmission) = {
621621 let updatedDLp = fraction(getD([t1BigInt(amountBalance, toBigInt(cfgAmountAssetDecimals)), t1BigInt(priceBalance, toBigInt(cfgPriceAssetDecimals))]), scale18, lpEmission)
622622 if ((lpEmission == big0))
623623 then big0
624624 else updatedDLp
625625 }
626626
627627
628628 func calcCurrentDLp (amountAssetDelta,priceAssetDelta,lpAssetEmissionDelta) = {
629629 let amountAssetBalance = (toBigInt(getAccBalance(assetIdToString(cfgAmountAssetId))) - amountAssetDelta)
630630 let priceAssetBalance = (toBigInt(getAccBalance(assetIdToString(cfgPriceAssetId))) - priceAssetDelta)
631631 let lpAssetEmission = (toBigInt(value(assetInfo(cfgLpAssetId)).quantity) - lpAssetEmissionDelta)
632632 let currentDLp = calcDLp(amountAssetBalance, priceAssetBalance, lpAssetEmission)
633633 currentDLp
634634 }
635635
636636
637637 func refreshDLpInternal (amountAssetBalanceDelta,priceAssetBalanceDelta,lpAssetEmissionDelta) = {
638638 let amountAssetBalance = (getAccBalance(assetIdToString(cfgAmountAssetId)) + amountAssetBalanceDelta)
639639 let priceAssetBalance = (getAccBalance(assetIdToString(cfgPriceAssetId)) + priceAssetBalanceDelta)
640640 let lpAssetEmission = (value(assetInfo(cfgLpAssetId)).quantity + lpAssetEmissionDelta)
641641 let updatedDLp = calcDLp(toBigInt(amountAssetBalance), toBigInt(priceAssetBalance), toBigInt(lpAssetEmission))
642642 let actions = [IntegerEntry(keyDLpRefreshedHeight, height), StringEntry(keyDLp, toString(updatedDLp))]
643643 $Tuple2(actions, updatedDLp)
644644 }
645645
646646
647647 func validateUpdatedDLp (oldDLp,updatedDLp) = if ((updatedDLp >= oldDLp))
648648 then true
649649 else throwErr("updated DLp lower than current DLp")
650650
651651
652652 func validateMatcherOrderAllowed (order) = {
653653 let amountAssetBalance = getAccBalance(assetIdToString(cfgAmountAssetId))
654654 let priceAssetBalance = getAccBalance(assetIdToString(cfgPriceAssetId))
655655 let amountAssetAmount = order.amount
656656 let priceAssetAmount = fraction(order.amount, order.price, scale8, FLOOR)
657- let $t02540925621 = if ((order.orderType == Buy))
657+ let $t02541925631 = if ((order.orderType == Buy))
658658 then $Tuple2(amountAssetAmount, -(priceAssetAmount))
659659 else $Tuple2(-(amountAssetAmount), priceAssetAmount)
660- let amountAssetBalanceDelta = $t02540925621._1
661- let priceAssetBalanceDelta = $t02540925621._2
660+ let amountAssetBalanceDelta = $t02541925631._1
661+ let priceAssetBalanceDelta = $t02541925631._2
662662 if (if (if (igs())
663663 then true
664664 else (cfgPoolStatus == PoolMatcherDis))
665665 then true
666666 else (cfgPoolStatus == PoolShutdown))
667667 then throw("Admin blocked")
668668 else if (if ((order.assetPair.amountAsset != cfgAmountAssetId))
669669 then true
670670 else (order.assetPair.priceAsset != cfgPriceAssetId))
671671 then throw("Wr assets")
672672 else {
673673 let dLp = parseBigIntValue(valueOrElse(getString(this, keyDLp), "0"))
674- let $t02596326063 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
675- let unusedActions = $t02596326063._1
676- let dLpNew = $t02596326063._2
674+ let $t02597326073 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
675+ let unusedActions = $t02597326073._1
676+ let dLpNew = $t02597326073._2
677677 let isOrderValid = (dLpNew >= dLp)
678678 let info = makeString(["dLp=", toString(dLp), " dLpNew=", toString(dLpNew), " amountAssetBalance=", toString(amountAssetBalance), " priceAssetBalance=", toString(priceAssetBalance), " amountAssetBalanceDelta=", toString(amountAssetBalanceDelta), " priceAssetBalanceDelta=", toString(priceAssetBalanceDelta), " height=", toString(height)], "")
679679 $Tuple2(isOrderValid, info)
680680 }
681681 }
682682
683683
684684 func cg (i) = if ((size(i.payments) != 1))
685685 then throw("1 pmnt exp")
686686 else {
687687 let pmt = value(i.payments[0])
688688 let pmtAssetId = value(pmt.assetId)
689689 let pmtAmt = pmt.amount
690690 let r = ego(toBase58String(i.transactionId), toBase58String(pmtAssetId), pmtAmt, i.caller)
691691 let outAmAmt = r._1
692692 let outPrAmt = r._2
693693 let sts = parseIntValue(r._9)
694694 let state = r._10
695695 if (if (igs())
696696 then true
697697 else (sts == PoolShutdown))
698698 then throw(("Admin blocked: " + toString(sts)))
699699 else $Tuple5(outAmAmt, outPrAmt, pmtAmt, pmtAssetId, state)
700700 }
701701
702702
703703 func cp (caller,txId,amAsPmt,prAsPmt,slippage,emitLp,isOneAsset,validateSlippage,pmtAmt,pmtId) = {
704704 let r = epo(txId, slippage, value(amAsPmt).amount, value(amAsPmt).assetId, value(prAsPmt).amount, value(prAsPmt).assetId, caller, (txId == ""), emitLp, isOneAsset, validateSlippage, pmtAmt, pmtId)
705705 let sts = parseIntValue(r._8)
706706 if (if (if (igs())
707707 then true
708708 else (sts == PoolPutDis))
709709 then true
710710 else (sts == PoolShutdown))
711711 then throw(("Blocked:" + toString(sts)))
712712 else r
713713 }
714714
715715
716716 func calcPutOneTkn (pmtAmtRaw,pmtAssetId,userAddress,txId,withTakeFee) = {
717717 let amId = toBase58String(value(cfgAmountAssetId))
718718 let prId = toBase58String(value(cfgPriceAssetId))
719719 let lpId = cfgLpAssetId
720720 let amtDcm = cfgAmountAssetDecimals
721721 let priceDcm = cfgPriceAssetDecimals
722722 let lpAssetEmission = toBigInt(valueOrErrorMessage(assetInfo(lpId), "invalid lp asset").quantity)
723723 let chechEmission = if ((lpAssetEmission > big0))
724724 then true
725725 else throw("initial deposit requires all coins")
726726 if ((chechEmission == chechEmission))
727727 then {
728728 let amBalance = getAccBalance(amId)
729729 let prBalance = getAccBalance(prId)
730- let $t02871929181 = if ((txId == ""))
730+ let $t02872929191 = if ((txId == ""))
731731 then $Tuple2(amBalance, prBalance)
732732 else if ((pmtAssetId == amId))
733733 then if ((pmtAmtRaw > amBalance))
734734 then throw("invalid payment amount")
735735 else $Tuple2((amBalance - pmtAmtRaw), prBalance)
736736 else if ((pmtAssetId == prId))
737737 then if ((pmtAmtRaw > prBalance))
738738 then throw("invalid payment amount")
739739 else $Tuple2(amBalance, (prBalance - pmtAmtRaw))
740740 else throw("wrong pmtAssetId")
741- let amBalanceOld = $t02871929181._1
742- let prBalanceOld = $t02871929181._2
743- let $t02918729363 = if ((pmtAssetId == amId))
741+ let amBalanceOld = $t02872929191._1
742+ let prBalanceOld = $t02872929191._2
743+ let $t02919729373 = if ((pmtAssetId == amId))
744744 then $Tuple2(pmtAmtRaw, 0)
745745 else if ((pmtAssetId == prId))
746746 then $Tuple2(0, pmtAmtRaw)
747747 else throw("invalid payment")
748- let amAmountRaw = $t02918729363._1
749- let prAmountRaw = $t02918729363._2
750- let $t02936729621 = if (withTakeFee)
748+ let amAmountRaw = $t02919729373._1
749+ let prAmountRaw = $t02919729373._2
750+ let $t02937729631 = if (withTakeFee)
751751 then $Tuple3(takeFee(amAmountRaw, inFee)._1, takeFee(prAmountRaw, inFee)._1, takeFee(pmtAmtRaw, inFee)._2)
752752 else $Tuple3(amAmountRaw, prAmountRaw, 0)
753- let amAmount = $t02936729621._1
754- let prAmount = $t02936729621._2
755- let feeAmount = $t02936729621._3
753+ let amAmount = $t02937729631._1
754+ let prAmount = $t02937729631._2
755+ let feeAmount = $t02937729631._3
756756 let amBalanceNew = (amBalanceOld + amAmount)
757757 let prBalanceNew = (prBalanceOld + prAmount)
758758 let D0 = getD([t1(amBalanceOld, cfgAmountAssetDecimals), t1(prBalanceOld, cfgPriceAssetDecimals)])
759759 let D1 = getD([t1(amBalanceNew, cfgAmountAssetDecimals), t1(prBalanceNew, cfgPriceAssetDecimals)])
760760 let checkD = if ((D1 > D0))
761761 then true
762762 else throw()
763763 if ((checkD == checkD))
764764 then {
765765 let lpAmount = fraction(lpAssetEmission, (D1 - D0), D0, FLOOR)
766766 let curPrice = f1(cpbi(t1(prBalanceNew, priceDcm), t1(amBalanceNew, amtDcm)), scale8)
767767 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))]
768768 let poolProportion = fraction(prBalanceOld, scale8, amBalanceOld)
769769 let amountAssetPart = fraction(pmtAmtRaw, scale8, (poolProportion + scale8))
770770 let priceAssetPart = (pmtAmtRaw - amountAssetPart)
771771 let lpAmtBoth = fraction(lpAssetEmission, toBigInt(priceAssetPart), toBigInt(prBalanceOld))
772772 let bonus = toInt(fraction((lpAmount - lpAmtBoth), scale8BigInt, lpAmtBoth))
773773 $Tuple4(toInt(lpAmount), commonState, feeAmount, bonus)
774774 }
775775 else throw("Strict value is not equal to itself.")
776776 }
777777 else throw("Strict value is not equal to itself.")
778778 }
779779
780780
781781 func getOneTknV2Internal (outAssetId,minOutAmount,payments,caller,originCaller,transactionId) = {
782782 let lpId = toBase58String(value(cfgLpAssetId))
783783 let amId = toBase58String(value(cfgAmountAssetId))
784784 let prId = toBase58String(value(cfgPriceAssetId))
785785 let amDecimals = cfgAmountAssetDecimals
786786 let prDecimals = cfgPriceAssetDecimals
787787 let poolStatus = cfgPoolStatus
788788 let userAddress = if ((caller == restContract))
789789 then originCaller
790790 else caller
791791 let pmt = value(payments[0])
792792 let pmtAssetId = value(pmt.assetId)
793793 let pmtAmt = pmt.amount
794794 let currentDLp = calcCurrentDLp(big0, big0, big0)
795795 if ((currentDLp == currentDLp))
796796 then {
797797 let txId58 = toBase58String(transactionId)
798798 if ((lpId != toBase58String(pmtAssetId)))
799799 then throw("Wrong LP")
800800 else {
801801 let amBalance = getAccBalance(amId)
802802 let prBalance = getAccBalance(prId)
803- let $t03173331844 = {
803+ let $t03174331854 = {
804804 let @ = invoke(this, "getOneTknV2READONLY", [outAssetId, pmtAmt], nil)
805805 if ($isInstanceOf(@, "(Int, Int)"))
806806 then @
807807 else throw(($getType(@) + " couldn't be cast to (Int, Int)"))
808808 }
809- if (($t03173331844 == $t03173331844))
809+ if (($t03174331854 == $t03174331854))
810810 then {
811- let feeAmount = $t03173331844._2
812- let totalGet = $t03173331844._1
811+ let feeAmount = $t03174331854._2
812+ let totalGet = $t03174331854._1
813813 let totalAmount = if (if ((minOutAmount > 0))
814814 then (minOutAmount > totalGet)
815815 else false)
816816 then throwErr(makeString(["amount to receive is less than ", toString(minOutAmount)], ""))
817817 else totalGet
818- let $t03203432341 = if ((outAssetId == amId))
818+ let $t03204432351 = if ((outAssetId == amId))
819819 then $Tuple4(totalAmount, 0, ((amBalance - totalAmount) - feeAmount), prBalance)
820820 else if ((outAssetId == prId))
821821 then $Tuple4(0, totalAmount, amBalance, ((prBalance - totalAmount) - feeAmount))
822822 else throw("invalid out asset id")
823- let outAm = $t03203432341._1
824- let outPr = $t03203432341._2
825- let amBalanceNew = $t03203432341._3
826- let prBalanceNew = $t03203432341._4
823+ let outAm = $t03204432351._1
824+ let outPr = $t03204432351._2
825+ let amBalanceNew = $t03204432351._3
826+ let prBalanceNew = $t03204432351._4
827827 let curPrX18 = cpbi(t1(prBalanceNew, prDecimals), t1(amBalanceNew, amDecimals))
828828 let curPr = f1(curPrX18, scale8)
829829 let outAssetIdOrWaves = if ((outAssetId == "WAVES"))
830830 then unit
831831 else fromBase58String(outAssetId)
832832 let sendFeeToMatcher = if ((feeAmount > 0))
833833 then [ScriptTransfer(feeCollectorAddress, feeAmount, outAssetIdOrWaves)]
834834 else nil
835835 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)
836836 if ((state == state))
837837 then {
838838 let burn = invoke(fca, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
839839 if ((burn == burn))
840840 then {
841- let $t03312633476 = {
841+ let $t03313633486 = {
842842 let feeAmountForCalc = if ((this == feeCollectorAddress))
843843 then 0
844844 else feeAmount
845845 let outInAmountAsset = if ((parseAssetId(outAssetId) == cfgAmountAssetId))
846846 then true
847847 else false
848848 if (outInAmountAsset)
849849 then $Tuple2(-((totalGet + feeAmountForCalc)), 0)
850850 else $Tuple2(0, -((totalGet + feeAmountForCalc)))
851851 }
852- let amountAssetBalanceDelta = $t03312633476._1
853- let priceAssetBalanceDelta = $t03312633476._2
854- let $t03347933587 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
855- let refreshDLpActions = $t03347933587._1
856- let updatedDLp = $t03347933587._2
852+ let amountAssetBalanceDelta = $t03313633486._1
853+ let priceAssetBalanceDelta = $t03313633486._2
854+ let $t03348933597 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
855+ let refreshDLpActions = $t03348933597._1
856+ let updatedDLp = $t03348933597._2
857857 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
858858 if ((isUpdatedDLpValid == isUpdatedDLpValid))
859859 then $Tuple2((state ++ refreshDLpActions), totalAmount)
860860 else throw("Strict value is not equal to itself.")
861861 }
862862 else throw("Strict value is not equal to itself.")
863863 }
864864 else throw("Strict value is not equal to itself.")
865865 }
866866 else throw("Strict value is not equal to itself.")
867867 }
868868 }
869869 else throw("Strict value is not equal to itself.")
870870 }
871871
872872
873873 func managerPublicKeyOrUnit () = {
874874 let managerVaultAddress = getManagerVaultAddressOrThis()
875875 match getString(managerVaultAddress, keyManagerPublicKey()) {
876876 case s: String =>
877877 fromBase58String(s)
878878 case _: Unit =>
879879 unit
880880 case _ =>
881881 throw("Match error")
882882 }
883883 }
884884
885885
886886 let pd = throw("Permission denied")
887887
888888 func isManager (i) = match managerPublicKeyOrUnit() {
889889 case pk: ByteVector =>
890890 (i.callerPublicKey == pk)
891891 case _: Unit =>
892892 (i.caller == this)
893893 case _ =>
894894 throw("Match error")
895895 }
896896
897897
898898 func mustManager (i) = match managerPublicKeyOrUnit() {
899899 case pk: ByteVector =>
900900 if ((i.callerPublicKey == pk))
901901 then true
902902 else pd
903903 case _: Unit =>
904904 if ((i.caller == this))
905905 then true
906906 else pd
907907 case _ =>
908908 throw("Match error")
909909 }
910910
911911
912912 func getY (isReverse,D,poolAmountInBalance) = {
913913 let poolConfig = gpc()
914914 let amId = poolConfig[idxAmAsId]
915915 let prId = poolConfig[idxPrAsId]
916916 let n = big2
917917 let aPrecision = parseBigIntValue(Amult)
918918 let a = (parseBigIntValue(A) * aPrecision)
919919 let xp = if ((isReverse == false))
920920 then [(toBigInt(getAccBalance(amId)) + poolAmountInBalance), toBigInt(getAccBalance(prId))]
921921 else [(toBigInt(getAccBalance(prId)) + poolAmountInBalance), toBigInt(getAccBalance(amId))]
922922 let x = xp[0]
923923 let s = x
924924 let ann = (a * n)
925925 let c = (((((D * D) / (x * n)) * D) * aPrecision) / (ann * n))
926926 let b = ((s + ((D * aPrecision) / ann)) - D)
927927 func calc (acc,cur) = {
928- let $t03507435094 = acc
929- let y = $t03507435094._1
930- let found = $t03507435094._2
928+ let $t03508435104 = acc
929+ let y = $t03508435104._1
930+ let found = $t03508435104._2
931931 if ((found != unit))
932932 then acc
933933 else {
934934 let yNext = (((y * y) + c) / ((big2 * y) + b))
935935 let yDiff = absBigInt((yNext - value(y)))
936936 if ((big1 >= yDiff))
937937 then $Tuple2(yNext, cur)
938938 else $Tuple2(yNext, unit)
939939 }
940940 }
941941
942942 let arr = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
943- let $t03542535472 = {
943+ let $t03543535482 = {
944944 let $l = arr
945945 let $s = size($l)
946946 let $acc0 = $Tuple2(D, unit)
947947 func $f0_1 ($a,$i) = if (($i >= $s))
948948 then $a
949949 else calc($a, $l[$i])
950950
951951 func $f0_2 ($a,$i) = if (($i >= $s))
952952 then $a
953953 else throw("List size exceeds 15")
954954
955955 $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)
956956 }
957- let y = $t03542535472._1
958- let found = $t03542535472._2
957+ let y = $t03543535482._1
958+ let found = $t03543535482._2
959959 if ((found != unit))
960960 then y
961961 else throw(("Y calculation error, Y = " + toString(y)))
962962 }
963963
964964
965965 func skipOrderValidation () = valueOrElse(getBoolean(fca, keySkipOrderValidation(toString(this))), false)
966966
967967
968968 @Callable(i)
969969 func calculateAmountOutForSwapREADONLY (cleanAmountIn,isReverse,feePoolAmount) = {
970- let $t03582436248 = if ((isReverse == false))
970+ let $t03583436258 = if ((isReverse == false))
971971 then {
972972 let assetOut = strf(this, pa())
973973 let poolAmountInBalance = (toBigInt(getAccBalance(strf(this, aa()))) + toBigInt(cleanAmountIn))
974974 $Tuple2(assetOut, poolAmountInBalance)
975975 }
976976 else {
977977 let assetOut = strf(this, aa())
978978 let poolAmountInBalance = (toBigInt(getAccBalance(strf(this, pa()))) + toBigInt(cleanAmountIn))
979979 $Tuple2(assetOut, poolAmountInBalance)
980980 }
981- let assetOut = $t03582436248._1
982- let poolAmountInBalance = $t03582436248._2
981+ let assetOut = $t03583436258._1
982+ let poolAmountInBalance = $t03583436258._2
983983 let poolConfig = gpc()
984984 let amId = poolConfig[idxAmAsId]
985985 let prId = poolConfig[idxPrAsId]
986986 let xp = [toBigInt(getAccBalance(amId)), toBigInt(getAccBalance(prId))]
987987 let D = getD(xp)
988988 let y = getY(isReverse, D, toBigInt(cleanAmountIn))
989989 let dy = ((toBigInt(getAccBalance(assetOut)) - y) - toBigInt(1))
990990 let totalGetRaw = max([0, toInt(dy)])
991991 let newXp = if ((isReverse == false))
992992 then [((toBigInt(getAccBalance(amId)) + toBigInt(cleanAmountIn)) + toBigInt(feePoolAmount)), (toBigInt(getAccBalance(prId)) - dy)]
993993 else [(toBigInt(getAccBalance(amId)) - dy), ((toBigInt(getAccBalance(prId)) + toBigInt(cleanAmountIn)) + toBigInt(feePoolAmount))]
994994 let newD = getD(newXp)
995995 let checkD = if ((newD >= D))
996996 then true
997997 else throw(makeString(["new D is fewer error", toString(D), toString(newD)], "__"))
998998 if ((checkD == checkD))
999999 then $Tuple2(nil, totalGetRaw)
10001000 else throw("Strict value is not equal to itself.")
10011001 }
10021002
10031003
10041004
10051005 @Callable(i)
10061006 func calculateAmountOutForSwapAndSendTokens (cleanAmountIn,isReverse,amountOutMin,addressTo,feePoolAmount) = {
10071007 let swapContact = {
10081008 let @ = invoke(fca, "getSwapContractREADONLY", nil, nil)
10091009 if ($isInstanceOf(@, "String"))
10101010 then @
10111011 else throw(($getType(@) + " couldn't be cast to String"))
10121012 }
10131013 let checks = [if ((value(i.payments[0]).amount >= cleanAmountIn))
10141014 then true
10151015 else throwErr("Wrong amount"), if ((i.caller == addressFromStringValue(swapContact)))
10161016 then true
10171017 else throwErr("Permission denied")]
10181018 if ((checks == checks))
10191019 then {
10201020 let pmt = value(i.payments[0])
10211021 let assetIn = assetIdToString(pmt.assetId)
1022- let $t03768438078 = if ((isReverse == false))
1022+ let $t03769438088 = if ((isReverse == false))
10231023 then {
10241024 let assetOut = strf(this, pa())
10251025 let poolAmountInBalance = (getAccBalance(assetIn) - value(i.payments[0]).amount)
10261026 $Tuple2(assetOut, poolAmountInBalance)
10271027 }
10281028 else {
10291029 let assetOut = strf(this, aa())
10301030 let poolAmountInBalance = (getAccBalance(assetIn) - value(i.payments[0]).amount)
10311031 $Tuple2(assetOut, poolAmountInBalance)
10321032 }
1033- let assetOut = $t03768438078._1
1034- let poolAmountInBalance = $t03768438078._2
1033+ let assetOut = $t03769438088._1
1034+ let poolAmountInBalance = $t03769438088._2
10351035 let poolConfig = gpc()
10361036 let amId = poolConfig[idxAmAsId]
10371037 let prId = poolConfig[idxPrAsId]
10381038 let xp = if ((isReverse == false))
10391039 then [(toBigInt(getAccBalance(amId)) - toBigInt(value(i.payments[0]).amount)), toBigInt(getAccBalance(prId))]
10401040 else [toBigInt(getAccBalance(amId)), (toBigInt(getAccBalance(prId)) - toBigInt(value(i.payments[0]).amount))]
10411041 let D = getD(xp)
10421042 let y = getY(isReverse, D, toBigInt(0))
10431043 let dy = ((toBigInt(getAccBalance(assetOut)) - y) - toBigInt(1))
10441044 let totalGetRaw = max([0, toInt(dy)])
10451045 let checkMin = if ((totalGetRaw >= amountOutMin))
10461046 then true
10471047 else throw("Exchange result is fewer coins than expected")
10481048 if ((checkMin == checkMin))
10491049 then {
10501050 let newXp = if ((isReverse == false))
10511051 then [(toBigInt(getAccBalance(amId)) + toBigInt(feePoolAmount)), (toBigInt(getAccBalance(prId)) - dy)]
10521052 else [(toBigInt(getAccBalance(amId)) - dy), (toBigInt(getAccBalance(prId)) + toBigInt(feePoolAmount))]
10531053 let newD = getD(newXp)
10541054 let checkD = if ((newD >= D))
10551055 then true
10561056 else throw("new D is fewer error")
10571057 if ((checkD == checkD))
10581058 then $Tuple2([ScriptTransfer(addressFromStringValue(addressTo), totalGetRaw, parseAssetId(assetOut))], totalGetRaw)
10591059 else throw("Strict value is not equal to itself.")
10601060 }
10611061 else throw("Strict value is not equal to itself.")
10621062 }
10631063 else throw("Strict value is not equal to itself.")
10641064 }
10651065
10661066
10671067
10681068 @Callable(i)
10691069 func constructor (fc) = {
10701070 let c = mustManager(i)
10711071 if ((c == c))
10721072 then [StringEntry(fc(), fc)]
10731073 else throw("Strict value is not equal to itself.")
10741074 }
10751075
10761076
10771077
10781078 @Callable(i)
10791079 func put (slip,autoStake) = {
10801080 let factCfg = gfc()
10811081 let stakingCntr = valueOrErrorMessage(addressFromString(factCfg[idxFactStakCntr]), "Wr st addr")
10821082 let slipCntr = valueOrErrorMessage(addressFromString(factCfg[idxFactSlippCntr]), "Wr sl addr")
10831083 if ((0 > slip))
10841084 then throw("Wrong slippage")
10851085 else if ((size(i.payments) != 2))
10861086 then throw("2 pmnts expd")
10871087 else {
10881088 let amAssetPmt = toBigInt(value(i.payments[0]).amount)
10891089 let prAssetPmt = toBigInt(value(i.payments[1]).amount)
10901090 let amountAssetBalance = (toBigInt(getAccBalance(assetIdToString(cfgAmountAssetId))) - amAssetPmt)
10911091 if ((amountAssetBalance == amountAssetBalance))
10921092 then {
10931093 let priceAssetBalance = (toBigInt(getAccBalance(assetIdToString(cfgPriceAssetId))) - prAssetPmt)
10941094 if ((priceAssetBalance == priceAssetBalance))
10951095 then {
10961096 let lpAssetEmission = toBigInt(value(assetInfo(cfgLpAssetId)).quantity)
10971097 if ((lpAssetEmission == lpAssetEmission))
10981098 then {
10991099 let currentDLp = calcCurrentDLp(amAssetPmt, prAssetPmt, toBigInt(0))
11001100 if ((currentDLp == currentDLp))
11011101 then {
11021102 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, "")
11031103 let emitLpAmt = e._2
11041104 let lpAssetId = e._7
11051105 let state = e._9
11061106 let amDiff = e._10
11071107 let prDiff = e._11
11081108 let amId = e._12
11091109 let prId = e._13
11101110 let r = invoke(fca, "emit", [emitLpAmt], nil)
11111111 if ((r == r))
11121112 then {
11131113 let el = match r {
11141114 case legacy: Address =>
11151115 invoke(legacy, "emit", [emitLpAmt], nil)
11161116 case _ =>
11171117 unit
11181118 }
11191119 if ((el == el))
11201120 then {
11211121 let sa = if ((amDiff > 0))
11221122 then invoke(slipCntr, "put", nil, [AttachedPayment(amId, amDiff)])
11231123 else nil
11241124 if ((sa == sa))
11251125 then {
11261126 let sp = if ((prDiff > 0))
11271127 then invoke(slipCntr, "put", nil, [AttachedPayment(prId, prDiff)])
11281128 else nil
11291129 if ((sp == sp))
11301130 then {
11311131 let lpTrnsfr = if (autoStake)
11321132 then {
11331133 let ss = invoke(stakingCntr, "stake", nil, [AttachedPayment(lpAssetId, emitLpAmt)])
11341134 if ((ss == ss))
11351135 then nil
11361136 else throw("Strict value is not equal to itself.")
11371137 }
11381138 else [ScriptTransfer(i.caller, emitLpAmt, lpAssetId)]
1139- let $t04222242364 = refreshDLpInternal(0, 0, 0)
1140- let refreshDLpActions = $t04222242364._1
1141- let updatedDLp = $t04222242364._2
1139+ let $t04223242374 = refreshDLpInternal(0, 0, 0)
1140+ let refreshDLpActions = $t04223242374._1
1141+ let updatedDLp = $t04223242374._2
11421142 let check = if ((updatedDLp >= currentDLp))
11431143 then true
11441144 else throwErr(makeString(["updated DLp lower than current DLp", toString(amountAssetBalance), toString(priceAssetBalance), toString(lpAssetEmission), toString(currentDLp), toString(updatedDLp), toString(amDiff), toString(prDiff)], " "))
11451145 if ((check == check))
11461146 then {
11471147 let lpAssetEmissionAfter = value(assetInfo(cfgLpAssetId)).quantity
11481148 if ((lpAssetEmissionAfter == lpAssetEmissionAfter))
11491149 then ((state ++ lpTrnsfr) ++ refreshDLpActions)
11501150 else throw("Strict value is not equal to itself.")
11511151 }
11521152 else throw("Strict value is not equal to itself.")
11531153 }
11541154 else throw("Strict value is not equal to itself.")
11551155 }
11561156 else throw("Strict value is not equal to itself.")
11571157 }
11581158 else throw("Strict value is not equal to itself.")
11591159 }
11601160 else throw("Strict value is not equal to itself.")
11611161 }
11621162 else throw("Strict value is not equal to itself.")
11631163 }
11641164 else throw("Strict value is not equal to itself.")
11651165 }
11661166 else throw("Strict value is not equal to itself.")
11671167 }
11681168 else throw("Strict value is not equal to itself.")
11691169 }
11701170 }
11711171
11721172
11731173
11741174 @Callable(i)
11751175 func putOneTknV2 (minOutAmount,autoStake) = {
11761176 let isPoolOneTokenOperationsDisabled = {
11771177 let @ = invoke(fca, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
11781178 if ($isInstanceOf(@, "Boolean"))
11791179 then @
11801180 else throw(($getType(@) + " couldn't be cast to Boolean"))
11811181 }
11821182 let isPutDisabled = if (if (if (igs())
11831183 then true
11841184 else (cfgPoolStatus == PoolPutDis))
11851185 then true
11861186 else (cfgPoolStatus == PoolShutdown))
11871187 then true
11881188 else isPoolOneTokenOperationsDisabled
11891189 let checks = [if (if (!(isPutDisabled))
11901190 then true
11911191 else isManager(i))
11921192 then true
11931193 else throwErr("put operation is blocked by admin"), if ((size(i.payments) == 1))
11941194 then true
11951195 else throwErr("exactly 1 payment are expected")]
11961196 if ((checks == checks))
11971197 then {
11981198 let amId = toBase58String(value(cfgAmountAssetId))
11991199 let prId = toBase58String(value(cfgPriceAssetId))
12001200 let lpId = cfgLpAssetId
12011201 let amDecimals = cfgAmountAssetDecimals
12021202 let prDecimals = cfgPriceAssetDecimals
12031203 let userAddress = if ((i.caller == this))
12041204 then i.originCaller
12051205 else i.caller
12061206 let pmt = value(i.payments[0])
12071207 let pmtAssetId = toBase58String(value(pmt.assetId))
12081208 let pmtAmt = pmt.amount
12091209 let currentDLp = if ((pmt.assetId == cfgAmountAssetId))
12101210 then calcCurrentDLp(toBigInt(pmtAmt), toBigInt(0), toBigInt(0))
12111211 else calcCurrentDLp(toBigInt(0), toBigInt(pmtAmt), toBigInt(0))
12121212 if ((currentDLp == currentDLp))
12131213 then {
1214- let $t04400544163 = calcPutOneTkn(pmtAmt, pmtAssetId, toString(userAddress), toBase58String(i.transactionId), true)
1215- if (($t04400544163 == $t04400544163))
1214+ let $t04401544173 = calcPutOneTkn(pmtAmt, pmtAssetId, toString(userAddress), toBase58String(i.transactionId), true)
1215+ if (($t04401544173 == $t04401544173))
12161216 then {
1217- let feeAmount = $t04400544163._3
1218- let state = $t04400544163._2
1219- let estimLP = $t04400544163._1
1217+ let feeAmount = $t04401544173._3
1218+ let state = $t04401544173._2
1219+ let estimLP = $t04401544173._1
12201220 let emitLpAmt = if (if ((minOutAmount > 0))
12211221 then (minOutAmount > estimLP)
12221222 else false)
12231223 then throwErr(makeString(["amount to receive is less than ", toString(minOutAmount)], ""))
12241224 else estimLP
12251225 let e = invoke(fca, "emit", [emitLpAmt], nil)
12261226 if ((e == e))
12271227 then {
12281228 let el = match e {
12291229 case legacy: Address =>
12301230 invoke(legacy, "emit", [emitLpAmt], nil)
12311231 case _ =>
12321232 unit
12331233 }
12341234 if ((el == el))
12351235 then {
12361236 let lpTrnsfr = if (autoStake)
12371237 then {
12381238 let ss = invoke(stakingContract, "stakeFor", [toString(i.caller)], [AttachedPayment(lpId, emitLpAmt)])
12391239 if ((ss == ss))
12401240 then nil
12411241 else throw("Strict value is not equal to itself.")
12421242 }
12431243 else [ScriptTransfer(i.caller, emitLpAmt, lpId)]
12441244 let sendFeeToMatcher = if ((feeAmount > 0))
12451245 then [ScriptTransfer(feeCollectorAddress, feeAmount, fromBase58String(pmtAssetId))]
12461246 else nil
1247- let $t04504845397 = if ((this == feeCollectorAddress))
1247+ let $t04505845407 = if ((this == feeCollectorAddress))
12481248 then $Tuple2(0, 0)
12491249 else {
12501250 let paymentInAmountAsset = if ((pmt.assetId == cfgAmountAssetId))
12511251 then true
12521252 else false
12531253 if (paymentInAmountAsset)
12541254 then $Tuple2(-(feeAmount), 0)
12551255 else $Tuple2(0, -(feeAmount))
12561256 }
1257- let amountAssetBalanceDelta = $t04504845397._1
1258- let priceAssetBalanceDelta = $t04504845397._2
1259- let $t04540045508 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
1260- let refreshDLpActions = $t04540045508._1
1261- let updatedDLp = $t04540045508._2
1257+ let amountAssetBalanceDelta = $t04505845407._1
1258+ let priceAssetBalanceDelta = $t04505845407._2
1259+ let $t04541045518 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
1260+ let refreshDLpActions = $t04541045518._1
1261+ let updatedDLp = $t04541045518._2
12621262 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
12631263 if ((isUpdatedDLpValid == isUpdatedDLpValid))
12641264 then $Tuple2((((state ++ lpTrnsfr) ++ sendFeeToMatcher) ++ refreshDLpActions), emitLpAmt)
12651265 else throw("Strict value is not equal to itself.")
12661266 }
12671267 else throw("Strict value is not equal to itself.")
12681268 }
12691269 else throw("Strict value is not equal to itself.")
12701270 }
12711271 else throw("Strict value is not equal to itself.")
12721272 }
12731273 else throw("Strict value is not equal to itself.")
12741274 }
12751275 else throw("Strict value is not equal to itself.")
12761276 }
12771277
12781278
12791279
12801280 @Callable(i)
12811281 func putForFree (maxSlpg) = if ((0 > maxSlpg))
12821282 then throw("Wrong slpg")
12831283 else if ((size(i.payments) != 2))
12841284 then throw("2 pmnts expd")
12851285 else {
12861286 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, "")
12871287 let state = estPut._9
12881288 let amAssetPmt = toBigInt(value(i.payments[0]).amount)
12891289 let prAssetPmt = toBigInt(value(i.payments[1]).amount)
12901290 let currentDLp = calcCurrentDLp(amAssetPmt, prAssetPmt, toBigInt(0))
12911291 if ((currentDLp == currentDLp))
12921292 then {
1293- let $t04653846603 = refreshDLpInternal(0, 0, 0)
1294- let refreshDLpActions = $t04653846603._1
1295- let updatedDLp = $t04653846603._2
1293+ let $t04654846613 = refreshDLpInternal(0, 0, 0)
1294+ let refreshDLpActions = $t04654846613._1
1295+ let updatedDLp = $t04654846613._2
12961296 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
12971297 if ((isUpdatedDLpValid == isUpdatedDLpValid))
12981298 then (state ++ refreshDLpActions)
12991299 else throw("Strict value is not equal to itself.")
13001300 }
13011301 else throw("Strict value is not equal to itself.")
13021302 }
13031303
13041304
13051305
13061306 @Callable(i)
13071307 func get () = {
13081308 let currentDLp = calcCurrentDLp(toBigInt(0), toBigInt(0), toBigInt(0))
13091309 if ((currentDLp == currentDLp))
13101310 then {
13111311 let r = cg(i)
13121312 let outAmtAmt = r._1
13131313 let outPrAmt = r._2
13141314 let pmtAmt = r._3
13151315 let pmtAssetId = r._4
13161316 let state = r._5
13171317 let b = invoke(fca, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
13181318 if ((b == b))
13191319 then {
1320- let $t04777647858 = refreshDLpInternal(-(outAmtAmt), -(outPrAmt), 0)
1321- let refreshDLpActions = $t04777647858._1
1322- let updatedDLp = $t04777647858._2
1320+ let $t04778647868 = refreshDLpInternal(-(outAmtAmt), -(outPrAmt), 0)
1321+ let refreshDLpActions = $t04778647868._1
1322+ let updatedDLp = $t04778647868._2
13231323 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
13241324 if ((isUpdatedDLpValid == isUpdatedDLpValid))
13251325 then (state ++ refreshDLpActions)
13261326 else throw("Strict value is not equal to itself.")
13271327 }
13281328 else throw("Strict value is not equal to itself.")
13291329 }
13301330 else throw("Strict value is not equal to itself.")
13311331 }
13321332
13331333
13341334
13351335 @Callable(i)
13361336 func getOneTknV2 (outAssetId,minOutAmount) = {
13371337 let isPoolOneTokenOperationsDisabled = {
13381338 let @ = invoke(fca, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
13391339 if ($isInstanceOf(@, "Boolean"))
13401340 then @
13411341 else throw(($getType(@) + " couldn't be cast to Boolean"))
13421342 }
13431343 let isGetDisabled = if (if (igs())
13441344 then true
13451345 else (cfgPoolStatus == PoolShutdown))
13461346 then true
13471347 else isPoolOneTokenOperationsDisabled
13481348 let checks = [if (if (!(isGetDisabled))
13491349 then true
13501350 else isManager(i))
13511351 then true
13521352 else throwErr("get operation is blocked by admin"), if ((size(i.payments) == 1))
13531353 then true
13541354 else throwErr("exactly 1 payment are expected")]
13551355 if ((checks == checks))
13561356 then {
1357- let $t04847648631 = getOneTknV2Internal(outAssetId, minOutAmount, i.payments, i.caller, i.originCaller, i.transactionId)
1358- let state = $t04847648631._1
1359- let totalAmount = $t04847648631._2
1357+ let $t04848648641 = getOneTknV2Internal(outAssetId, minOutAmount, i.payments, i.caller, i.originCaller, i.transactionId)
1358+ let state = $t04848648641._1
1359+ let totalAmount = $t04848648641._2
13601360 $Tuple2(state, totalAmount)
13611361 }
13621362 else throw("Strict value is not equal to itself.")
13631363 }
13641364
13651365
13661366
13671367 @Callable(i)
13681368 func refreshDLp () = {
13691369 let lastRefreshedBlockHeight = valueOrElse(getInteger(keyDLpRefreshedHeight), 0)
13701370 let checkLastRefreshedBlockHeight = if (((height - lastRefreshedBlockHeight) >= dLpRefreshDelay))
13711371 then unit
13721372 else throwErr(makeString([toString(dLpRefreshDelay), " blocks have not passed since the previous call"], ""))
13731373 if ((checkLastRefreshedBlockHeight == checkLastRefreshedBlockHeight))
13741374 then {
13751375 let dLp = valueOrErrorMessage(parseBigInt(valueOrElse(getString(this, keyDLp), "0")), fmtErr("invalid dLp"))
1376- let $t04915549219 = refreshDLpInternal(0, 0, 0)
1377- let dLpUpdateActions = $t04915549219._1
1378- let updatedDLp = $t04915549219._2
1376+ let $t04916549229 = refreshDLpInternal(0, 0, 0)
1377+ let dLpUpdateActions = $t04916549229._1
1378+ let updatedDLp = $t04916549229._2
13791379 let actions = if ((dLp != updatedDLp))
13801380 then dLpUpdateActions
13811381 else throwErr("nothing to refresh")
13821382 $Tuple2(actions, toString(updatedDLp))
13831383 }
13841384 else throw("Strict value is not equal to itself.")
13851385 }
13861386
13871387
13881388
13891389 @Callable(i)
13901390 func getOneTknV2READONLY (outAssetId,lpAssetAmount) = {
13911391 let amId = toBase58String(value(cfgAmountAssetId))
13921392 let prId = toBase58String(value(cfgPriceAssetId))
13931393 let lpId = toBase58String(value(cfgLpAssetId))
13941394 let xp = [toBigInt(getAccBalance(amId)), toBigInt(getAccBalance(prId))]
13951395 let lpEmission = toBigInt(valueOrErrorMessage(assetInfo(fromBase58String(lpId)), "invalid lp asset").quantity)
13961396 let D0 = getD(xp)
13971397 let D1 = (D0 - fraction(toBigInt(lpAssetAmount), D0, lpEmission))
13981398 let index = if ((outAssetId == amId))
13991399 then 0
14001400 else if ((outAssetId == prId))
14011401 then 1
14021402 else throw("invalid out asset id")
14031403 let newY = getYD(xp, index, D1)
14041404 let dy = (xp[index] - newY)
14051405 let totalGetRaw = max([0, toInt((dy - big1))])
1406- let $t05022950284 = takeFee(totalGetRaw, outFee)
1407- let totalGet = $t05022950284._1
1408- let feeAmount = $t05022950284._2
1406+ let $t05023950294 = takeFee(totalGetRaw, outFee)
1407+ let totalGet = $t05023950294._1
1408+ let feeAmount = $t05023950294._2
14091409 $Tuple2(nil, $Tuple2(totalGet, feeAmount))
14101410 }
14111411
14121412
14131413
14141414 @Callable(i)
14151415 func getOneTknV2WithBonusREADONLY (outAssetId,lpAssetAmount) = {
14161416 let amId = toBase58String(value(cfgAmountAssetId))
14171417 let prId = toBase58String(value(cfgPriceAssetId))
14181418 let lpId = toBase58String(value(cfgLpAssetId))
14191419 let amBalance = getAccBalance(amId)
14201420 let prBalance = getAccBalance(prId)
1421- let $t05065950774 = {
1421+ let $t05066950784 = {
14221422 let @ = invoke(this, "getOneTknV2READONLY", [outAssetId, lpAssetAmount], nil)
14231423 if ($isInstanceOf(@, "(Int, Int)"))
14241424 then @
14251425 else throw(($getType(@) + " couldn't be cast to (Int, Int)"))
14261426 }
1427- let totalGet = $t05065950774._1
1428- let feeAmount = $t05065950774._2
1427+ let totalGet = $t05066950784._1
1428+ let feeAmount = $t05066950784._2
14291429 let r = ego("", lpId, lpAssetAmount, this)
14301430 let outAmAmt = r._1
14311431 let outPrAmt = r._2
14321432 let sumOfGetAssets = (outAmAmt + outPrAmt)
14331433 let bonus = if ((sumOfGetAssets == 0))
14341434 then if ((totalGet == 0))
14351435 then 0
14361436 else throw("bonus calculation error")
14371437 else fraction((totalGet - sumOfGetAssets), scale8, sumOfGetAssets)
14381438 $Tuple2(nil, $Tuple3(totalGet, feeAmount, bonus))
14391439 }
14401440
14411441
14421442
14431443 @Callable(i)
14441444 func getNoLess (noLessThenAmtAsset,noLessThenPriceAsset) = {
14451445 let r = cg(i)
14461446 let outAmAmt = r._1
14471447 let outPrAmt = r._2
14481448 let pmtAmt = r._3
14491449 let pmtAssetId = r._4
14501450 let state = r._5
14511451 if ((noLessThenAmtAsset > outAmAmt))
14521452 then throw(((("Failed: " + toString(outAmAmt)) + " < ") + toString(noLessThenAmtAsset)))
14531453 else if ((noLessThenPriceAsset > outPrAmt))
14541454 then throw(((("Failed: " + toString(outPrAmt)) + " < ") + toString(noLessThenPriceAsset)))
14551455 else {
14561456 let currentDLp = calcCurrentDLp(toBigInt(0), toBigInt(0), toBigInt(0))
14571457 if ((currentDLp == currentDLp))
14581458 then {
14591459 let burnLPAssetOnFactory = invoke(fca, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
14601460 if ((burnLPAssetOnFactory == burnLPAssetOnFactory))
14611461 then {
1462- let $t05194052021 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1463- let refreshDLpActions = $t05194052021._1
1464- let updatedDLp = $t05194052021._2
1462+ let $t05195052031 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1463+ let refreshDLpActions = $t05195052031._1
1464+ let updatedDLp = $t05195052031._2
14651465 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
14661466 if ((isUpdatedDLpValid == isUpdatedDLpValid))
14671467 then (state ++ refreshDLpActions)
14681468 else throw("Strict value is not equal to itself.")
14691469 }
14701470 else throw("Strict value is not equal to itself.")
14711471 }
14721472 else throw("Strict value is not equal to itself.")
14731473 }
14741474 }
14751475
14761476
14771477
14781478 @Callable(i)
14791479 func unstakeAndGet (amount) = {
14801480 let checkPayments = if ((size(i.payments) != 0))
14811481 then throw("No pmnts expd")
14821482 else true
14831483 if ((checkPayments == checkPayments))
14841484 then {
14851485 let factoryCfg = gfc()
14861486 let lpAssetId = cfgLpAssetId
14871487 let staking = valueOrErrorMessage(addressFromString(factoryCfg[idxFactStakCntr]), "Wr st addr")
14881488 let currentDLp = calcCurrentDLp(toBigInt(0), toBigInt(0), toBigInt(0))
14891489 if ((currentDLp == currentDLp))
14901490 then {
14911491 let unstakeInv = invoke(staking, "unstake", [toBase58String(lpAssetId), amount], nil)
14921492 if ((unstakeInv == unstakeInv))
14931493 then {
14941494 let r = ego(toBase58String(i.transactionId), toBase58String(lpAssetId), amount, i.caller)
14951495 let outAmAmt = r._1
14961496 let outPrAmt = r._2
14971497 let sts = parseIntValue(r._9)
14981498 let state = r._10
14991499 let v = if (if (igs())
15001500 then true
15011501 else (sts == PoolShutdown))
15021502 then throw(("Blocked: " + toString(sts)))
15031503 else true
15041504 if ((v == v))
15051505 then {
15061506 let burnA = invoke(fca, "burn", [amount], [AttachedPayment(lpAssetId, amount)])
15071507 if ((burnA == burnA))
15081508 then {
1509- let $t05304853129 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1510- let refreshDLpActions = $t05304853129._1
1511- let updatedDLp = $t05304853129._2
1509+ let $t05305853139 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1510+ let refreshDLpActions = $t05305853139._1
1511+ let updatedDLp = $t05305853139._2
15121512 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
15131513 if ((isUpdatedDLpValid == isUpdatedDLpValid))
15141514 then (state ++ refreshDLpActions)
15151515 else throw("Strict value is not equal to itself.")
15161516 }
15171517 else throw("Strict value is not equal to itself.")
15181518 }
15191519 else throw("Strict value is not equal to itself.")
15201520 }
15211521 else throw("Strict value is not equal to itself.")
15221522 }
15231523 else throw("Strict value is not equal to itself.")
15241524 }
15251525 else throw("Strict value is not equal to itself.")
15261526 }
15271527
15281528
15291529
15301530 @Callable(i)
15311531 func unstakeAndGetNoLess (unstakeAmount,noLessThenAmountAsset,noLessThenPriceAsset) = {
15321532 let isGetDisabled = if (igs())
15331533 then true
15341534 else (cfgPoolStatus == PoolShutdown)
15351535 let checks = [if (!(isGetDisabled))
15361536 then true
15371537 else throw("get operation is blocked by admin"), if ((size(i.payments) == 0))
15381538 then true
15391539 else throw("no payments are expected")]
15401540 if ((checks == checks))
15411541 then {
15421542 let currentDLp = calcCurrentDLp(toBigInt(0), toBigInt(0), toBigInt(0))
15431543 if ((currentDLp == currentDLp))
15441544 then {
15451545 let unstakeInv = invoke(stakingContract, "unstake", [toBase58String(cfgLpAssetId), unstakeAmount], nil)
15461546 if ((unstakeInv == unstakeInv))
15471547 then {
15481548 let res = ego(toBase58String(i.transactionId), toBase58String(cfgLpAssetId), unstakeAmount, i.caller)
15491549 let outAmAmt = res._1
15501550 let outPrAmt = res._2
15511551 let state = res._10
15521552 let checkAmounts = [if ((outAmAmt >= noLessThenAmountAsset))
15531553 then true
15541554 else throw(makeString(["amount asset amount to receive is less than ", toString(noLessThenAmountAsset)], "")), if ((outPrAmt >= noLessThenPriceAsset))
15551555 then true
15561556 else throw(makeString(["price asset amount to receive is less than ", toString(noLessThenPriceAsset)], ""))]
15571557 if ((checkAmounts == checkAmounts))
15581558 then {
15591559 let burnLPAssetOnFactory = invoke(fca, "burn", [unstakeAmount], [AttachedPayment(cfgLpAssetId, unstakeAmount)])
15601560 if ((burnLPAssetOnFactory == burnLPAssetOnFactory))
15611561 then {
1562- let $t05438054461 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1563- let refreshDLpActions = $t05438054461._1
1564- let updatedDLp = $t05438054461._2
1562+ let $t05439054471 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1563+ let refreshDLpActions = $t05439054471._1
1564+ let updatedDLp = $t05439054471._2
15651565 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
15661566 if ((isUpdatedDLpValid == isUpdatedDLpValid))
15671567 then (state ++ refreshDLpActions)
15681568 else throw("Strict value is not equal to itself.")
15691569 }
15701570 else throw("Strict value is not equal to itself.")
15711571 }
15721572 else throw("Strict value is not equal to itself.")
15731573 }
15741574 else throw("Strict value is not equal to itself.")
15751575 }
15761576 else throw("Strict value is not equal to itself.")
15771577 }
15781578 else throw("Strict value is not equal to itself.")
15791579 }
15801580
15811581
15821582
15831583 @Callable(i)
15841584 func unstakeAndGetOneTknV2 (unstakeAmount,outAssetId,minOutAmount) = {
15851585 let isPoolOneTokenOperationsDisabled = {
15861586 let @ = invoke(fca, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
15871587 if ($isInstanceOf(@, "Boolean"))
15881588 then @
15891589 else throw(($getType(@) + " couldn't be cast to Boolean"))
15901590 }
15911591 let isGetDisabled = if (if (igs())
15921592 then true
15931593 else (cfgPoolStatus == PoolShutdown))
15941594 then true
15951595 else isPoolOneTokenOperationsDisabled
15961596 let checks = [if (if (!(isGetDisabled))
15971597 then true
15981598 else isManager(i))
15991599 then true
16001600 else throwErr("get operation is blocked by admin"), if ((size(i.payments) == 0))
16011601 then true
16021602 else throwErr("no payments are expected")]
16031603 if ((checks == checks))
16041604 then {
16051605 let factoryCfg = gfc()
16061606 let lpAssetId = cfgLpAssetId
16071607 let staking = valueOrErrorMessage(addressFromString(factoryCfg[idxFactStakCntr]), "Wr st addr")
16081608 let userAddress = i.caller
16091609 let lpAssetRecipientAddress = this
16101610 let unstakeInv = invoke(staking, "unstakeINTERNAL", [lpAssetId, unstakeAmount, userAddress.bytes, lpAssetRecipientAddress.bytes], nil)
16111611 if ((unstakeInv == unstakeInv))
16121612 then {
1613- let $t05548355671 = getOneTknV2Internal(outAssetId, minOutAmount, [AttachedPayment(lpAssetId, unstakeAmount)], i.caller, i.originCaller, i.transactionId)
1614- let state = $t05548355671._1
1615- let totalAmount = $t05548355671._2
1613+ let $t05549355681 = getOneTknV2Internal(outAssetId, minOutAmount, [AttachedPayment(lpAssetId, unstakeAmount)], i.caller, i.originCaller, i.transactionId)
1614+ let state = $t05549355681._1
1615+ let totalAmount = $t05549355681._2
16161616 $Tuple2(state, totalAmount)
16171617 }
16181618 else throw("Strict value is not equal to itself.")
16191619 }
16201620 else throw("Strict value is not equal to itself.")
16211621 }
16221622
16231623
16241624
16251625 @Callable(i)
16261626 func putOneTknV2WithBonusREADONLY (paymentAmountRaw,paymentAssetId) = {
1627- let $t05579955902 = calcPutOneTkn(paymentAmountRaw, paymentAssetId, "", "", true)
1628- let lpAmount = $t05579955902._1
1629- let state = $t05579955902._2
1630- let feeAmount = $t05579955902._3
1631- let bonus = $t05579955902._4
1627+ let $t05580955912 = calcPutOneTkn(paymentAmountRaw, paymentAssetId, "", "", true)
1628+ let lpAmount = $t05580955912._1
1629+ let state = $t05580955912._2
1630+ let feeAmount = $t05580955912._3
1631+ let bonus = $t05580955912._4
16321632 $Tuple2(nil, $Tuple3(lpAmount, feeAmount, bonus))
16331633 }
16341634
16351635
16361636
16371637 @Callable(i)
16381638 func putOneTknV2WithoutTakeFeeREADONLY (paymentAmountRaw,paymentAssetId) = {
1639- let $t05605056154 = calcPutOneTkn(paymentAmountRaw, paymentAssetId, "", "", false)
1640- let lpAmount = $t05605056154._1
1641- let state = $t05605056154._2
1642- let feeAmount = $t05605056154._3
1643- let bonus = $t05605056154._4
1639+ let $t05606056164 = calcPutOneTkn(paymentAmountRaw, paymentAssetId, "", "", false)
1640+ let lpAmount = $t05606056164._1
1641+ let state = $t05606056164._2
1642+ let feeAmount = $t05606056164._3
1643+ let bonus = $t05606056164._4
16441644 $Tuple2(nil, $Tuple3(lpAmount, feeAmount, bonus))
16451645 }
16461646
16471647
16481648
16491649 @Callable(i)
16501650 func activate (amtAsStr,prAsStr) = if ((toString(i.caller) != toString(fca)))
16511651 then throw("denied")
16521652 else $Tuple2([StringEntry(aa(), amtAsStr), StringEntry(pa(), prAsStr)], "success")
16531653
16541654
16551655
16561656 @Callable(i)
16571657 func getPoolConfigWrapperREADONLY () = $Tuple2(nil, gpc())
16581658
16591659
16601660
16611661 @Callable(i)
16621662 func getAccBalanceWrapperREADONLY (assetId) = $Tuple2(nil, getAccBalance(assetId))
16631663
16641664
16651665
16661666 @Callable(i)
16671667 func calcPricesWrapperREADONLY (amAmt,prAmt,lpAmt) = {
16681668 let pr = calcPrices(amAmt, prAmt, lpAmt)
16691669 $Tuple2(nil, [toString(pr[0]), toString(pr[1]), toString(pr[2])])
16701670 }
16711671
16721672
16731673
16741674 @Callable(i)
16751675 func fromX18WrapperREADONLY (val,resScaleMult) = $Tuple2(nil, f1(parseBigIntValue(val), resScaleMult))
16761676
16771677
16781678
16791679 @Callable(i)
16801680 func toX18WrapperREADONLY (origVal,origScaleMult) = $Tuple2(nil, toString(t1(origVal, origScaleMult)))
16811681
16821682
16831683
16841684 @Callable(i)
16851685 func calcPriceBigIntWrapperREADONLY (prAmtX18,amAmtX18) = $Tuple2(nil, toString(cpbi(parseBigIntValue(prAmtX18), parseBigIntValue(amAmtX18))))
16861686
16871687
16881688
16891689 @Callable(i)
16901690 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, ""))
16911691
16921692
16931693
16941694 @Callable(i)
16951695 func estimateGetOperationWrapperREADONLY (txId58,pmtAsId,pmtLpAmt,usrAddr) = {
16961696 let r = ego(txId58, pmtAsId, pmtLpAmt, addressFromStringValue(usrAddr))
16971697 $Tuple2(nil, $Tuple10(r._1, r._2, r._3, r._4, r._5, r._6, r._7, toString(r._8), r._9, r._10))
16981698 }
16991699
17001700
17011701
17021702 @Callable(i)
17031703 func changeAmp () = {
17041704 let cfg = invoke(fca, "getChangeAmpConfigREADONLY", [toString(this)], nil)
1705- let $t05850858707 = match cfg {
1705+ let $t05851858717 = match cfg {
17061706 case list: List[Any] =>
17071707 $Tuple3({
17081708 let @ = list[0]
17091709 if ($isInstanceOf(@, "Int"))
17101710 then @
17111711 else throw(($getType(@) + " couldn't be cast to Int"))
17121712 }, {
17131713 let @ = list[1]
17141714 if ($isInstanceOf(@, "Int"))
17151715 then @
17161716 else throw(($getType(@) + " couldn't be cast to Int"))
17171717 }, {
17181718 let @ = list[2]
17191719 if ($isInstanceOf(@, "Int"))
17201720 then @
17211721 else throw(($getType(@) + " couldn't be cast to Int"))
17221722 })
17231723 case _ =>
17241724 throwErr("invalid entry type")
17251725 }
1726- let delay = $t05850858707._1
1727- let delta = $t05850858707._2
1728- let target = $t05850858707._3
1726+ let delay = $t05851858717._1
1727+ let delta = $t05851858717._2
1728+ let target = $t05851858717._3
17291729 let curAmp = parseIntValue(getStringValue(amp()))
17301730 let newAmpRaw = (curAmp + delta)
17311731 let newAmp = if ((0 > delta))
17321732 then if ((target > newAmpRaw))
17331733 then target
17341734 else newAmpRaw
17351735 else if ((newAmpRaw > target))
17361736 then target
17371737 else newAmpRaw
17381738 let lastCall = valueOrElse(getInteger(keyChangeAmpLastCall()), 0)
17391739 let wait = (lastCall + delay)
17401740 let checks = [if ((height > wait))
17411741 then true
17421742 else throwErr("try again in few blocks"), if ((curAmp != newAmp))
17431743 then true
17441744 else throwErr("already reached target")]
17451745 if ((checks == checks))
17461746 then [IntegerEntry(keyChangeAmpLastCall(), height), StringEntry(amp(), toString(newAmp)), StringEntry(keyAmpHistory(height), toString(newAmp))]
17471747 else throw("Strict value is not equal to itself.")
17481748 }
17491749
17501750
17511751 @Verifier(tx)
17521752 func verify () = {
17531753 let targetPublicKey = match managerPublicKeyOrUnit() {
17541754 case pk: ByteVector =>
17551755 pk
17561756 case _: Unit =>
17571757 tx.senderPublicKey
17581758 case _ =>
17591759 throw("Match error")
17601760 }
17611761 match tx {
17621762 case order: Order =>
17631763 let matcherPub = mp()
1764- let $t05964059757 = if (skipOrderValidation())
1764+ let $t05965059767 = if (skipOrderValidation())
17651765 then $Tuple2(true, "")
17661766 else validateMatcherOrderAllowed(order)
1767- let orderValid = $t05964059757._1
1768- let orderValidInfo = $t05964059757._2
1767+ let orderValid = $t05965059767._1
1768+ let orderValidInfo = $t05965059767._2
17691769 let senderValid = sigVerify(order.bodyBytes, order.proofs[0], order.senderPublicKey)
17701770 let matcherValid = sigVerify(order.bodyBytes, order.proofs[1], matcherPub)
17711771 if (if (if (orderValid)
17721772 then senderValid
17731773 else false)
17741774 then matcherValid
17751775 else false)
17761776 then true
17771777 else throwOrderError(orderValid, orderValidInfo, senderValid, matcherValid)
17781778 case s: SetScriptTransaction =>
17791779 if (sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey))
17801780 then true
17811781 else {
17821782 let newHash = blake2b256(value(s.script))
17831783 let allowedHash = fromBase64String(value(getString(fca, keyAllowedLpStableScriptHash())))
17841784 let currentHash = scriptHash(this)
17851785 if ((allowedHash == newHash))
17861786 then (currentHash != newHash)
17871787 else false
17881788 }
17891789 case _ =>
17901790 sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey)
17911791 }
17921792 }
17931793

github/deemru/w8io/026f985 
262.96 ms