tx · HEzWfHE964PR9sRh4xkjy6rrPNy9SPnyTtYTkFb66Jk4

3NAefciWv6f9fWvEXdGgpHfanJFG8HqfjuT:  -0.04100000 Waves

2023.05.02 09:59 [2559815] smart account 3NAefciWv6f9fWvEXdGgpHfanJFG8HqfjuT > SELF 0.00000000 Waves

{ "type": 13, "id": "HEzWfHE964PR9sRh4xkjy6rrPNy9SPnyTtYTkFb66Jk4", "fee": 4100000, "feeAssetId": null, "timestamp": 1683010755058, "version": 2, "chainId": 84, "sender": "3NAefciWv6f9fWvEXdGgpHfanJFG8HqfjuT", "senderPublicKey": "D1BL65meykxFZTCuq7jq9HSGLLnWvQamQPUNrguW5w39", "proofs": [ "FH6W62kHoKaq1Laeh9znA5JiBpQD7RdjooWbUgn3DFxkb2CS5EEMCHcsr5wdF18twUVa7WWug3T1JcefiMWPm9G" ], "script": "base64:BgK4LAgCEgUKAwEEARIHCgUBBAEIARIDCgEIEgMKAQgSABIECgIBBBIECgIBBBIDCgEBEgASBAoCCAESABIECgIIARIECgIIARIECgIBARIDCgEBEgUKAwEBARIFCgMBCAESBAoCAQgSBAoCAQgSBAoCCAgSABIDCgEIEgUKAwEBARIECgIIARIECgIBARIECgIICBILCgkIAQECAQIIBAQSBgoECAgBCBIAIgZzY2FsZTgiDHNjYWxlOEJpZ0ludCIHc2NhbGUxOCIKemVyb0JpZ0ludCIEYmlnMCIEYmlnMSIEYmlnMiIEYmlnMyIEYmlnNCIKc2xpcHBhZ2U0RCILd2F2ZXNTdHJpbmciBUFtdWx0IgVEY29udiIDU0VQIgVFTVBUWSIKUG9vbEFjdGl2ZSIKUG9vbFB1dERpcyIOUG9vbE1hdGNoZXJEaXMiDFBvb2xTaHV0ZG93biIOaWR4UG9vbEFkZHJlc3MiCWlkeFBvb2xTdCIJaWR4TFBBc0lkIglpZHhBbUFzSWQiCWlkeFByQXNJZCILaWR4QW10QXNEY20iDWlkeFByaWNlQXNEY20iC2lkeElBbXRBc0lkIg1pZHhJUHJpY2VBc0l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aHQJAMwIAgkBC1N0cmluZ0VudHJ5AgkBAmFsAAkApAMBBQJpdQkAzAgCCQELU3RyaW5nRW50cnkCCQECYW0BBQZoZWlnaHQJAKQDAQUCaXUFA25pbAkAAgECJFN0cmljdCB2YWx1ZSBpcyBub3QgZXF1YWwgdG8gaXRzZWxmLgECaXgBAml5AAQCaXoEAmdwCQECZ28AAwkAAQIFAmdwAgpCeXRlVmVjdG9yBAJndAUCZ3AFAmd0AwkAAQIFAmdwAgRVbml0CAUCaXgPc2VuZGVyUHVibGljS2V5CQACAQILTWF0Y2ggZXJyb3IEAmdwBQJpeAMJAAECBQJncAIFT3JkZXIEAmZkBQJncAQCaUEJAQJiYQAEAmlCAwkBAmdBAAkAlAoCBgIACQECZmMBBQJmZAQCYUoIBQJpQgJfMQQCYUsIBQJpQgJfMgQCYUwJAPQDAwgFAmZkCWJvZHlCeXRlcwkAkQMCCAUCZmQGcHJvb2ZzAAAIBQJmZA9zZW5kZXJQdWJsaWNLZXkEAmFNCQD0AwMIBQJmZAlib2R5Qnl0ZXMJAJEDAggFAmZkBnByb29mcwABBQJpQQMDAwUCYUoFAmFMBwUCYU0HBgkBAmFJBAUCYUoFAmFLBQJhTAUCYU0DCQABAgUCZ3ACFFNldFNjcmlwdFRyYW5zYWN0aW9uBAJjRwUCZ3ADCQD0AwMIBQJpeAlib2R5Qnl0ZXMJAJEDAggFAml4BnByb29mcwAABQJpegYEAmlDCQD2AwEJAQV2YWx1ZQEIBQJjRwZzY3JpcHQEAmlECQDbBAEJAQV2YWx1ZQEJAJ0IAgUCYVUJAQJhRQAEAmlFCQDxBwEFBHRoaXMDCQAAAgUCaUQFAmlDCQECIT0CBQJpRQUCaUMHCQD0AwMIBQJpeAlib2R5Qnl0ZXMJAJEDAggFAml4BnByb29mcwAABQJpeigbTyU=", "height": 2559815, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: ExGc3NgbitCdkWmd3LQDw56uxJcgkdic1PkSm1TXZ8mH Next: CJASj7QXvp6QQUVdoaVjmEpTFAcPkCXUabAvTkycPBWr Diff:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
4-let test = true
5-
64 let scale8 = 100000000
75
86 let scale8BigInt = toBigInt(100000000)
239237
240238 let poolConfigParsed = parsePoolConfig(gpc())
241239
242-let $t081818410 = poolConfigParsed
240+let $t081658394 = poolConfigParsed
243241
244-let cfgPoolAddress = $t081818410._1
242+let cfgPoolAddress = $t081658394._1
245243
246-let cfgPoolStatus = $t081818410._2
244+let cfgPoolStatus = $t081658394._2
247245
248-let cfgLpAssetId = $t081818410._3
246+let cfgLpAssetId = $t081658394._3
249247
250-let cfgAmountAssetId = $t081818410._4
248+let cfgAmountAssetId = $t081658394._4
251249
252-let cfgPriceAssetId = $t081818410._5
250+let cfgPriceAssetId = $t081658394._5
253251
254-let cfgAmountAssetDecimals = $t081818410._6
252+let cfgAmountAssetDecimals = $t081658394._6
255253
256-let cfgPriceAssetDecimals = $t081818410._7
254+let cfgPriceAssetDecimals = $t081658394._7
257255
258-let cfgInAmountAssedId = $t081818410._8
256+let cfgInAmountAssedId = $t081658394._8
259257
260-let cfgInPriceAssetId = $t081818410._9
258+let cfgInPriceAssetId = $t081658394._9
261259
262260 func gfc () = split(strf(fca, fcfg()), SEP)
263261
378376 }
379377
380378 let arr = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16]
381- let $t01291512963 = {
379+ let $t01289912947 = {
382380 let $l = arr
383381 let $s = size($l)
384382 let $acc0 = $Tuple2(s, false)
392390
393391 $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)
394392 }
395- let d = $t01291512963._1
396- let found = $t01291512963._2
393+ let d = $t01289912947._1
394+ let found = $t01289912947._2
397395 if (found)
398396 then d
399397 else throw(("D calculation error, D = " + toString(d)))
529527 else calcLpAmt
530528 let amDiff = (inAmAmt - calcAmAssetPmt)
531529 let prDiff = (inPrAmt - calcPrAssetPmt)
532- let $t02080221147 = if (if (isOneAsset)
530+ let $t02078621131 = if (if (isOneAsset)
533531 then (pmtId == amIdStr)
534532 else false)
535533 then $Tuple2(pmtAmt, 0)
538536 else false)
539537 then $Tuple2(0, pmtAmt)
540538 else $Tuple2(calcAmAssetPmt, calcPrAssetPmt)
541- let writeAmAmt = $t02080221147._1
542- let writePrAmt = $t02080221147._2
539+ let writeAmAmt = $t02078621131._1
540+ let writePrAmt = $t02078621131._2
543541 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))]
544542 $Tuple13(calcLpAmt, emitLpAmt, curPrice, amBalance, prBalance, lpEm, lpId, sts, commonState, amDiff, prDiff, inAmId, inPrId)
545543 }
558556 let c = (((((D * D) / (x * n)) * D) * aPrecision) / (ann * n))
559557 let b = ((s + ((D * aPrecision) / ann)) - D)
560558 func calc (acc,cur) = {
561- let $t02234222362 = acc
562- let y = $t02234222362._1
563- let found = $t02234222362._2
559+ let $t02232622346 = acc
560+ let y = $t02232622346._1
561+ let found = $t02232622346._2
564562 if ((found != unit))
565563 then acc
566564 else {
573571 }
574572
575573 let arr = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
576- let $t02266922716 = {
574+ let $t02265322700 = {
577575 let $l = arr
578576 let $s = size($l)
579577 let $acc0 = $Tuple2(D, unit)
587585
588586 $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)
589587 }
590- let y = $t02266922716._1
591- let found = $t02266922716._2
588+ let y = $t02265322700._1
589+ let found = $t02265322700._2
592590 if ((found != unit))
593591 then y
594592 else throw(("Y calculation error, Y = " + toString(y)))
632630 let priceAssetBalance = getAccBalance(assetIdToString(cfgPriceAssetId))
633631 let amountAssetAmount = order.amount
634632 let priceAssetAmount = fraction(order.amount, order.price, scale8, FLOOR)
635- let $t02491425126 = if ((order.orderType == Buy))
633+ let $t02489825110 = if ((order.orderType == Buy))
636634 then $Tuple2(amountAssetAmount, -(priceAssetAmount))
637635 else $Tuple2(-(amountAssetAmount), priceAssetAmount)
638- let amountAssetBalanceDelta = $t02491425126._1
639- let priceAssetBalanceDelta = $t02491425126._2
636+ let amountAssetBalanceDelta = $t02489825110._1
637+ let priceAssetBalanceDelta = $t02489825110._2
640638 if (if (if (igs())
641639 then true
642640 else (cfgPoolStatus == PoolMatcherDis))
649647 then throw("Wr assets")
650648 else {
651649 let dLp = parseBigIntValue(valueOrElse(getString(this, keyDLp), "0"))
652- let $t02546825568 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
653- let unusedActions = $t02546825568._1
654- let dLpNew = $t02546825568._2
650+ let $t02545225552 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
651+ let unusedActions = $t02545225552._1
652+ let dLpNew = $t02545225552._2
655653 let isOrderValid = (dLpNew >= dLp)
656654 let info = makeString(["dLp=", toString(dLp), " dLpNew=", toString(dLpNew), " amountAssetBalance=", toString(amountAssetBalance), " priceAssetBalance=", toString(priceAssetBalance), " amountAssetBalanceDelta=", toString(amountAssetBalanceDelta), " priceAssetBalanceDelta=", toString(priceAssetBalanceDelta), " height=", toString(height)], "")
657655 $Tuple2(isOrderValid, info)
705703 then {
706704 let amBalance = getAccBalance(amId)
707705 let prBalance = getAccBalance(prId)
708- let $t02822428686 = if ((txId == ""))
706+ let $t02820828670 = if ((txId == ""))
709707 then $Tuple2(amBalance, prBalance)
710708 else if ((pmtAssetId == amId))
711709 then if ((pmtAmtRaw > amBalance))
716714 then throw("invalid payment amount")
717715 else $Tuple2(amBalance, (prBalance - pmtAmtRaw))
718716 else throw("wrong pmtAssetId")
719- let amBalanceOld = $t02822428686._1
720- let prBalanceOld = $t02822428686._2
721- let $t02869228868 = if ((pmtAssetId == amId))
717+ let amBalanceOld = $t02820828670._1
718+ let prBalanceOld = $t02820828670._2
719+ let $t02867628852 = if ((pmtAssetId == amId))
722720 then $Tuple2(pmtAmtRaw, 0)
723721 else if ((pmtAssetId == prId))
724722 then $Tuple2(0, pmtAmtRaw)
725723 else throw("invalid payment")
726- let amAmountRaw = $t02869228868._1
727- let prAmountRaw = $t02869228868._2
728- let $t02887229126 = if (withTakeFee)
724+ let amAmountRaw = $t02867628852._1
725+ let prAmountRaw = $t02867628852._2
726+ let $t02885629110 = if (withTakeFee)
729727 then $Tuple3(takeFee(amAmountRaw, inFee)._1, takeFee(prAmountRaw, inFee)._1, takeFee(pmtAmtRaw, inFee)._2)
730728 else $Tuple3(amAmountRaw, prAmountRaw, 0)
731- let amAmount = $t02887229126._1
732- let prAmount = $t02887229126._2
733- let feeAmount = $t02887229126._3
729+ let amAmount = $t02885629110._1
730+ let prAmount = $t02885629110._2
731+ let feeAmount = $t02885629110._3
734732 let amBalanceNew = (amBalanceOld + amAmount)
735733 let prBalanceNew = (prBalanceOld + prAmount)
736734 let D0 = getD([t1(amBalanceOld, cfgAmountAssetDecimals), t1(prBalanceOld, cfgPriceAssetDecimals)])
778776 else {
779777 let amBalance = getAccBalance(amId)
780778 let prBalance = getAccBalance(prId)
781- let $t03123831349 = {
779+ let $t03122231333 = {
782780 let @ = invoke(this, "getOneTknV2READONLY", [outAssetId, pmtAmt], nil)
783781 if ($isInstanceOf(@, "(Int, Int)"))
784782 then @
785783 else throw(($getType(@) + " couldn't be cast to (Int, Int)"))
786784 }
787- if (($t03123831349 == $t03123831349))
785+ if (($t03122231333 == $t03122231333))
788786 then {
789- let feeAmount = $t03123831349._2
790- let totalGet = $t03123831349._1
787+ let feeAmount = $t03122231333._2
788+ let totalGet = $t03122231333._1
791789 let totalAmount = if (if ((minOutAmount > 0))
792790 then (minOutAmount > totalGet)
793791 else false)
794792 then throwErr(makeString(["amount to receive is less than ", toString(minOutAmount)], ""))
795793 else totalGet
796- let $t03153931846 = if ((outAssetId == amId))
794+ let $t03152331830 = if ((outAssetId == amId))
797795 then $Tuple4(totalAmount, 0, ((amBalance - totalAmount) - feeAmount), prBalance)
798796 else if ((outAssetId == prId))
799797 then $Tuple4(0, totalAmount, amBalance, ((prBalance - totalAmount) - feeAmount))
800798 else throw("invalid out asset id")
801- let outAm = $t03153931846._1
802- let outPr = $t03153931846._2
803- let amBalanceNew = $t03153931846._3
804- let prBalanceNew = $t03153931846._4
799+ let outAm = $t03152331830._1
800+ let outPr = $t03152331830._2
801+ let amBalanceNew = $t03152331830._3
802+ let prBalanceNew = $t03152331830._4
805803 let curPrX18 = cpbi(t1(prBalanceNew, prDecimals), t1(amBalanceNew, amDecimals))
806804 let curPr = f1(curPrX18, scale8)
807805 let outAssetIdOrWaves = if ((outAssetId == "WAVES"))
816814 let burn = invoke(fca, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
817815 if ((burn == burn))
818816 then {
819- let $t03263132981 = {
817+ let $t03261532965 = {
820818 let feeAmountForCalc = if ((this == feeCollectorAddress))
821819 then 0
822820 else feeAmount
827825 then $Tuple2(-((totalGet + feeAmountForCalc)), 0)
828826 else $Tuple2(0, -((totalGet + feeAmountForCalc)))
829827 }
830- let amountAssetBalanceDelta = $t03263132981._1
831- let priceAssetBalanceDelta = $t03263132981._2
832- let $t03298433092 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
833- let refreshDLpActions = $t03298433092._1
834- let updatedDLp = $t03298433092._2
828+ let amountAssetBalanceDelta = $t03261532965._1
829+ let priceAssetBalanceDelta = $t03261532965._2
830+ let $t03296833076 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
831+ let refreshDLpActions = $t03296833076._1
832+ let updatedDLp = $t03296833076._2
835833 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
836834 if ((isUpdatedDLpValid == isUpdatedDLpValid))
837835 then $Tuple2((state ++ refreshDLpActions), totalAmount)
910908 let c = (((((D * D) / (x * n)) * D) * aPrecision) / (ann * n))
911909 let b = ((s + ((D * aPrecision) / ann)) - D)
912910 func calc (acc,cur) = {
913- let $t03453934559 = acc
914- let y = $t03453934559._1
915- let found = $t03453934559._2
911+ let $t03452334543 = acc
912+ let y = $t03452334543._1
913+ let found = $t03452334543._2
916914 if ((found != unit))
917915 then acc
918916 else {
925923 }
926924
927925 let arr = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
928- let $t03489034937 = {
926+ let $t03487434921 = {
929927 let $l = arr
930928 let $s = size($l)
931929 let $acc0 = $Tuple2(D, unit)
939937
940938 $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)
941939 }
942- let y = $t03489034937._1
943- let found = $t03489034937._2
940+ let y = $t03487434921._1
941+ let found = $t03487434921._2
944942 if ((found != unit))
945943 then y
946944 else throw(("Y calculation error, Y = " + toString(y)))
952950
953951 @Callable(i)
954952 func calculateAmountOutForSwapREADONLY (cleanAmountIn,isReverse,feePoolAmount) = {
955- let $t03528935713 = if ((isReverse == false))
953+ let $t03527335697 = if ((isReverse == false))
956954 then {
957955 let assetOut = strf(this, pa())
958956 let poolAmountInBalance = (toBigInt(getAccBalance(strf(this, aa()))) + toBigInt(cleanAmountIn))
963961 let poolAmountInBalance = (toBigInt(getAccBalance(strf(this, pa()))) + toBigInt(cleanAmountIn))
964962 $Tuple2(assetOut, poolAmountInBalance)
965963 }
966- let assetOut = $t03528935713._1
967- let poolAmountInBalance = $t03528935713._2
964+ let assetOut = $t03527335697._1
965+ let poolAmountInBalance = $t03527335697._2
968966 let poolConfig = gpc()
969967 let amId = poolConfig[idxAmAsId]
970968 let prId = poolConfig[idxPrAsId]
10041002 then {
10051003 let pmt = value(i.payments[0])
10061004 let assetIn = assetIdToString(pmt.assetId)
1007- let $t03714937543 = if ((isReverse == false))
1005+ let $t03713337527 = if ((isReverse == false))
10081006 then {
10091007 let assetOut = strf(this, pa())
10101008 let poolAmountInBalance = (getAccBalance(assetIn) - value(i.payments[0]).amount)
10151013 let poolAmountInBalance = (getAccBalance(assetIn) - value(i.payments[0]).amount)
10161014 $Tuple2(assetOut, poolAmountInBalance)
10171015 }
1018- let assetOut = $t03714937543._1
1019- let poolAmountInBalance = $t03714937543._2
1016+ let assetOut = $t03713337527._1
1017+ let poolAmountInBalance = $t03713337527._2
10201018 let poolConfig = gpc()
10211019 let amId = poolConfig[idxAmAsId]
10221020 let prId = poolConfig[idxPrAsId]
11561154 else throw("Strict value is not equal to itself.")
11571155 }
11581156 else [ScriptTransfer(i.caller, emitLpAmt, lpAssetId)]
1159- let $t04216242304 = refreshDLpInternal(0, 0, 0)
1160- let refreshDLpActions = $t04216242304._1
1161- let updatedDLp = $t04216242304._2
1157+ let $t04214642288 = refreshDLpInternal(0, 0, 0)
1158+ let refreshDLpActions = $t04214642288._1
1159+ let updatedDLp = $t04214642288._2
11621160 let check = if ((updatedDLp >= currentDLp))
11631161 then true
11641162 else throwErr(makeString(["updated DLp lower than current DLp", toString(amountAssetBalance), toString(priceAssetBalance), toString(lpAssetEmission), toString(currentDLp), toString(updatedDLp), toString(amDiff), toString(prDiff)], " "))
12311229 else calcCurrentDLp(toBigInt(0), toBigInt(pmtAmt), toBigInt(0))
12321230 if ((currentDLp == currentDLp))
12331231 then {
1234- let $t04394544103 = calcPutOneTkn(pmtAmt, pmtAssetId, toString(userAddress), toBase58String(i.transactionId), true)
1235- if (($t04394544103 == $t04394544103))
1232+ let $t04392944087 = calcPutOneTkn(pmtAmt, pmtAssetId, toString(userAddress), toBase58String(i.transactionId), true)
1233+ if (($t04392944087 == $t04392944087))
12361234 then {
1237- let feeAmount = $t04394544103._3
1238- let state = $t04394544103._2
1239- let estimLP = $t04394544103._1
1235+ let feeAmount = $t04392944087._3
1236+ let state = $t04392944087._2
1237+ let estimLP = $t04392944087._1
12401238 let emitLpAmt = if (if ((minOutAmount > 0))
12411239 then (minOutAmount > estimLP)
12421240 else false)
12641262 let sendFeeToMatcher = if ((feeAmount > 0))
12651263 then [ScriptTransfer(feeCollectorAddress, feeAmount, fromBase58String(pmtAssetId))]
12661264 else nil
1267- let $t04498845337 = if ((this == feeCollectorAddress))
1265+ let $t04497245321 = if ((this == feeCollectorAddress))
12681266 then $Tuple2(0, 0)
12691267 else {
12701268 let paymentInAmountAsset = if ((pmt.assetId == cfgAmountAssetId))
12741272 then $Tuple2(-(feeAmount), 0)
12751273 else $Tuple2(0, -(feeAmount))
12761274 }
1277- let amountAssetBalanceDelta = $t04498845337._1
1278- let priceAssetBalanceDelta = $t04498845337._2
1279- let $t04534045448 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
1280- let refreshDLpActions = $t04534045448._1
1281- let updatedDLp = $t04534045448._2
1275+ let amountAssetBalanceDelta = $t04497245321._1
1276+ let priceAssetBalanceDelta = $t04497245321._2
1277+ let $t04532445432 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
1278+ let refreshDLpActions = $t04532445432._1
1279+ let updatedDLp = $t04532445432._2
12821280 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
12831281 if ((isUpdatedDLpValid == isUpdatedDLpValid))
12841282 then $Tuple2((((state ++ lpTrnsfr) ++ sendFeeToMatcher) ++ refreshDLpActions), emitLpAmt)
13101308 let currentDLp = calcCurrentDLp(amAssetPmt, prAssetPmt, toBigInt(0))
13111309 if ((currentDLp == currentDLp))
13121310 then {
1313- let $t04647846543 = refreshDLpInternal(0, 0, 0)
1314- let refreshDLpActions = $t04647846543._1
1315- let updatedDLp = $t04647846543._2
1311+ let $t04646246527 = refreshDLpInternal(0, 0, 0)
1312+ let refreshDLpActions = $t04646246527._1
1313+ let updatedDLp = $t04646246527._2
13161314 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
13171315 if ((isUpdatedDLpValid == isUpdatedDLpValid))
13181316 then (state ++ refreshDLpActions)
13371335 let b = invoke(fca, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
13381336 if ((b == b))
13391337 then {
1340- let $t04771647798 = refreshDLpInternal(-(outAmtAmt), -(outPrAmt), 0)
1341- let refreshDLpActions = $t04771647798._1
1342- let updatedDLp = $t04771647798._2
1338+ let $t04770047782 = refreshDLpInternal(-(outAmtAmt), -(outPrAmt), 0)
1339+ let refreshDLpActions = $t04770047782._1
1340+ let updatedDLp = $t04770047782._2
13431341 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
13441342 if ((isUpdatedDLpValid == isUpdatedDLpValid))
13451343 then (state ++ refreshDLpActions)
13741372 else throwErr("exactly 1 payment are expected")]
13751373 if ((checks == checks))
13761374 then {
1377- let $t04841648571 = getOneTknV2Internal(outAssetId, minOutAmount, i.payments, i.caller, i.originCaller, i.transactionId)
1378- let state = $t04841648571._1
1379- let totalAmount = $t04841648571._2
1375+ let $t04840048555 = getOneTknV2Internal(outAssetId, minOutAmount, i.payments, i.caller, i.originCaller, i.transactionId)
1376+ let state = $t04840048555._1
1377+ let totalAmount = $t04840048555._2
13801378 $Tuple2(state, totalAmount)
13811379 }
13821380 else throw("Strict value is not equal to itself.")
13931391 if ((checkLastRefreshedBlockHeight == checkLastRefreshedBlockHeight))
13941392 then {
13951393 let dLp = valueOrErrorMessage(parseBigInt(valueOrElse(getString(this, keyDLp), "0")), fmtErr("invalid dLp"))
1396- let $t04909549159 = refreshDLpInternal(0, 0, 0)
1397- let dLpUpdateActions = $t04909549159._1
1398- let updatedDLp = $t04909549159._2
1394+ let $t04907949143 = refreshDLpInternal(0, 0, 0)
1395+ let dLpUpdateActions = $t04907949143._1
1396+ let updatedDLp = $t04907949143._2
13991397 let actions = if ((dLp != updatedDLp))
14001398 then dLpUpdateActions
14011399 else throwErr("nothing to refresh")
14231421 let newY = getYD(xp, index, D1)
14241422 let dy = (xp[index] - newY)
14251423 let totalGetRaw = max([0, toInt((dy - big1))])
1426- let $t05016950224 = takeFee(totalGetRaw, outFee)
1427- let totalGet = $t05016950224._1
1428- let feeAmount = $t05016950224._2
1424+ let $t05015350208 = takeFee(totalGetRaw, outFee)
1425+ let totalGet = $t05015350208._1
1426+ let feeAmount = $t05015350208._2
14291427 $Tuple2(nil, $Tuple2(totalGet, feeAmount))
14301428 }
14311429
14381436 let lpId = toBase58String(value(cfgLpAssetId))
14391437 let amBalance = getAccBalance(amId)
14401438 let prBalance = getAccBalance(prId)
1441- let $t05059950714 = {
1439+ let $t05058350698 = {
14421440 let @ = invoke(this, "getOneTknV2READONLY", [outAssetId, lpAssetAmount], nil)
14431441 if ($isInstanceOf(@, "(Int, Int)"))
14441442 then @
14451443 else throw(($getType(@) + " couldn't be cast to (Int, Int)"))
14461444 }
1447- let totalGet = $t05059950714._1
1448- let feeAmount = $t05059950714._2
1445+ let totalGet = $t05058350698._1
1446+ let feeAmount = $t05058350698._2
14491447 let r = ego("", lpId, lpAssetAmount, this)
14501448 let outAmAmt = r._1
14511449 let outPrAmt = r._2
14791477 let burnLPAssetOnFactory = invoke(fca, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
14801478 if ((burnLPAssetOnFactory == burnLPAssetOnFactory))
14811479 then {
1482- let $t05188051961 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1483- let refreshDLpActions = $t05188051961._1
1484- let updatedDLp = $t05188051961._2
1480+ let $t05186451945 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1481+ let refreshDLpActions = $t05186451945._1
1482+ let updatedDLp = $t05186451945._2
14851483 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
14861484 if ((isUpdatedDLpValid == isUpdatedDLpValid))
14871485 then (state ++ refreshDLpActions)
15261524 let burnA = invoke(fca, "burn", [amount], [AttachedPayment(lpAssetId, amount)])
15271525 if ((burnA == burnA))
15281526 then {
1529- let $t05298853069 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1530- let refreshDLpActions = $t05298853069._1
1531- let updatedDLp = $t05298853069._2
1527+ let $t05297253053 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1528+ let refreshDLpActions = $t05297253053._1
1529+ let updatedDLp = $t05297253053._2
15321530 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
15331531 if ((isUpdatedDLpValid == isUpdatedDLpValid))
15341532 then (state ++ refreshDLpActions)
15791577 let burnLPAssetOnFactory = invoke(fca, "burn", [unstakeAmount], [AttachedPayment(cfgLpAssetId, unstakeAmount)])
15801578 if ((burnLPAssetOnFactory == burnLPAssetOnFactory))
15811579 then {
1582- let $t05432054401 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1583- let refreshDLpActions = $t05432054401._1
1584- let updatedDLp = $t05432054401._2
1580+ let $t05430454385 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1581+ let refreshDLpActions = $t05430454385._1
1582+ let updatedDLp = $t05430454385._2
15851583 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
15861584 if ((isUpdatedDLpValid == isUpdatedDLpValid))
15871585 then (state ++ refreshDLpActions)
16301628 let unstakeInv = invoke(staking, "unstakeINTERNAL", [lpAssetId, unstakeAmount, userAddress.bytes, lpAssetRecipientAddress.bytes], nil)
16311629 if ((unstakeInv == unstakeInv))
16321630 then {
1633- let $t05542355611 = getOneTknV2Internal(outAssetId, minOutAmount, [AttachedPayment(lpAssetId, unstakeAmount)], i.caller, i.originCaller, i.transactionId)
1634- let state = $t05542355611._1
1635- let totalAmount = $t05542355611._2
1631+ let $t05540755595 = getOneTknV2Internal(outAssetId, minOutAmount, [AttachedPayment(lpAssetId, unstakeAmount)], i.caller, i.originCaller, i.transactionId)
1632+ let state = $t05540755595._1
1633+ let totalAmount = $t05540755595._2
16361634 $Tuple2(state, totalAmount)
16371635 }
16381636 else throw("Strict value is not equal to itself.")
16441642
16451643 @Callable(i)
16461644 func putOneTknV2WithBonusREADONLY (paymentAmountRaw,paymentAssetId) = {
1647- let $t05573955842 = calcPutOneTkn(paymentAmountRaw, paymentAssetId, "", "", true)
1648- let lpAmount = $t05573955842._1
1649- let state = $t05573955842._2
1650- let feeAmount = $t05573955842._3
1651- let bonus = $t05573955842._4
1645+ let $t05572355826 = calcPutOneTkn(paymentAmountRaw, paymentAssetId, "", "", true)
1646+ let lpAmount = $t05572355826._1
1647+ let state = $t05572355826._2
1648+ let feeAmount = $t05572355826._3
1649+ let bonus = $t05572355826._4
16521650 $Tuple2(nil, $Tuple3(lpAmount, feeAmount, bonus))
16531651 }
16541652
16561654
16571655 @Callable(i)
16581656 func putOneTknV2WithoutTakeFeeREADONLY (paymentAmountRaw,paymentAssetId) = {
1659- let $t05599056094 = calcPutOneTkn(paymentAmountRaw, paymentAssetId, "", "", false)
1660- let lpAmount = $t05599056094._1
1661- let state = $t05599056094._2
1662- let feeAmount = $t05599056094._3
1663- let bonus = $t05599056094._4
1657+ let $t05597456078 = calcPutOneTkn(paymentAmountRaw, paymentAssetId, "", "", false)
1658+ let lpAmount = $t05597456078._1
1659+ let state = $t05597456078._2
1660+ let feeAmount = $t05597456078._3
1661+ let bonus = $t05597456078._4
16641662 $Tuple2(nil, $Tuple3(lpAmount, feeAmount, bonus))
16651663 }
16661664
17221720 @Callable(i)
17231721 func changeAmp () = {
17241722 let cfg = invoke(fca, "getChangeAmpConfigREADONLY", [toString(this)], nil)
1725- let $t05844858647 = match cfg {
1723+ let $t05843258631 = match cfg {
17261724 case list: List[Any] =>
17271725 $Tuple3({
17281726 let @ = list[0]
17431741 case _ =>
17441742 throwErr("invalid entry type")
17451743 }
1746- let delay = $t05844858647._1
1747- let delta = $t05844858647._2
1748- let target = $t05844858647._3
1744+ let delay = $t05843258631._1
1745+ let delta = $t05843258631._2
1746+ let target = $t05843258631._3
17491747 let curAmp = parseIntValue(getStringValue(amp()))
17501748 let newAmpRaw = (curAmp + delta)
17511749 let newAmp = if ((0 > delta))
17811779 match tx {
17821780 case order: Order =>
17831781 let matcherPub = mp()
1784- let $t05955959676 = if (skipOrderValidation())
1782+ let $t05954359660 = if (skipOrderValidation())
17851783 then $Tuple2(true, "")
17861784 else validateMatcherOrderAllowed(order)
1787- let orderValid = $t05955959676._1
1788- let orderValidInfo = $t05955959676._2
1785+ let orderValid = $t05954359660._1
1786+ let orderValidInfo = $t05954359660._2
17891787 let senderValid = sigVerify(order.bodyBytes, order.proofs[0], order.senderPublicKey)
17901788 let matcherValid = sigVerify(order.bodyBytes, order.proofs[1], matcherPub)
17911789 if (if (if (orderValid)
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
4-let test = true
5-
64 let scale8 = 100000000
75
86 let scale8BigInt = toBigInt(100000000)
97
108 let scale18 = toBigInt(1000000000000000000)
119
1210 let zeroBigInt = toBigInt(0)
1311
1412 let big0 = toBigInt(0)
1513
1614 let big1 = toBigInt(1)
1715
1816 let big2 = toBigInt(2)
1917
2018 let big3 = toBigInt(3)
2119
2220 let big4 = toBigInt(4)
2321
2422 let slippage4D = toBigInt((scale8 - ((scale8 * 1) / scale8)))
2523
2624 let wavesString = "WAVES"
2725
2826 let Amult = "100"
2927
3028 let Dconv = "1"
3129
3230 let SEP = "__"
3331
3432 let EMPTY = ""
3533
3634 let PoolActive = 1
3735
3836 let PoolPutDis = 2
3937
4038 let PoolMatcherDis = 3
4139
4240 let PoolShutdown = 4
4341
4442 let idxPoolAddress = 1
4543
4644 let idxPoolSt = 2
4745
4846 let idxLPAsId = 3
4947
5048 let idxAmAsId = 4
5149
5250 let idxPrAsId = 5
5351
5452 let idxAmtAsDcm = 6
5553
5654 let idxPriceAsDcm = 7
5755
5856 let idxIAmtAsId = 8
5957
6058 let idxIPriceAsId = 9
6159
6260 let idxFactStakCntr = 1
6361
6462 let idxFactoryRestCntr = 6
6563
6664 let idxFactSlippCntr = 7
6765
6866 let idxFactGwxRewCntr = 10
6967
7068 let feeDefault = fraction(10, scale8, 10000)
7169
7270 func t1 (origVal,origScaleMult) = fraction(toBigInt(origVal), scale18, toBigInt(origScaleMult))
7371
7472
7573 func t1BigInt (origVal,origScaleMult) = fraction(origVal, scale18, origScaleMult)
7674
7775
7876 func f1 (val,resultScaleMult) = toInt(fraction(val, toBigInt(resultScaleMult), scale18))
7977
8078
8179 func fromX18Round (val,resultScaleMult,round) = toInt(fraction(val, toBigInt(resultScaleMult), scale18, round))
8280
8381
8482 func t2 (origVal,origScaleMult) = fraction(origVal, scale18, toBigInt(origScaleMult))
8583
8684
8785 func f2 (val,resultScaleMult) = fraction(val, toBigInt(resultScaleMult), scale18)
8886
8987
9088 func ts (amt,resScale,curScale) = fraction(amt, resScale, curScale)
9189
9290
9391 func abs (val) = if ((zeroBigInt > val))
9492 then -(val)
9593 else val
9694
9795
9896 func absBigInt (val) = if ((zeroBigInt > val))
9997 then -(val)
10098 else val
10199
102100
103101 func fc () = "%s__factoryContract"
104102
105103
106104 func mpk () = "%s__managerPublicKey"
107105
108106
109107 func pmpk () = "%s__pendingManagerPublicKey"
110108
111109
112110 func pl () = "%s%s__price__last"
113111
114112
115113 func ph (h,t) = makeString(["%s%s%d%d__price__history", toString(h), toString(t)], SEP)
116114
117115
118116 func pau (ua,txId) = ((("%s%s%s__P__" + ua) + "__") + txId)
119117
120118
121119 func gau (ua,txId) = ((("%s%s%s__G__" + ua) + "__") + txId)
122120
123121
124122 func aa () = "%s__amountAsset"
125123
126124
127125 func pa () = "%s__priceAsset"
128126
129127
130128 func amp () = "%s__amp"
131129
132130
133131 func keyAmpHistory (heightBlocks) = ("%s%d__amp__" + toString(heightBlocks))
134132
135133
136134 func keyChangeAmpLastCall () = "%s__changeAmpLastCall"
137135
138136
139137 let keyFee = "%s__fee"
140138
141139 let fee = valueOrElse(getInteger(this, keyFee), feeDefault)
142140
143141 let keyDLp = makeString(["%s", "dLp"], SEP)
144142
145143 let keyDLpRefreshedHeight = makeString(["%s", "dLpRefreshedHeight"], SEP)
146144
147145 let keyDLpRefreshDelay = makeString(["%s", "refreshDLpDelay"], SEP)
148146
149147 let dLpRefreshDelayDefault = 30
150148
151149 let dLpRefreshDelay = valueOrElse(getInteger(this, keyDLpRefreshDelay), dLpRefreshDelayDefault)
152150
153151 func fcfg () = "%s__factoryConfig"
154152
155153
156154 func mtpk () = "%s%s__matcher__publicKey"
157155
158156
159157 func pc (iAmtAs,iPrAs) = (((("%d%d%s__" + iAmtAs) + "__") + iPrAs) + "__config")
160158
161159
162160 func mba (bAStr) = ("%s%s%s__mappings__baseAsset2internalId__" + bAStr)
163161
164162
165163 func aps () = "%s__shutdown"
166164
167165
168166 func keyAllowedLpStableScriptHash () = "%s__allowedLpStableScriptHash"
169167
170168
171169 func keyFeeCollectorAddress () = "%s__feeCollectorAddress"
172170
173171
174172 func keySkipOrderValidation (poolAddress) = ("%s%s__skipOrderValidation__" + poolAddress)
175173
176174
177175 func throwOrderError (orderValid,orderValidInfo,senderValid,matcherValid) = throw((((((((("order validation failed: orderValid=" + toString(orderValid)) + " (") + orderValidInfo) + ")") + " senderValid=") + toString(senderValid)) + " matcherValid=") + toString(matcherValid)))
178176
179177
180178 func strf (addr,key) = valueOrErrorMessage(getString(addr, key), makeString(["mandatory ", toString(addr), ".", key, " not defined"], ""))
181179
182180
183181 func intf (addr,key) = valueOrErrorMessage(getInteger(addr, key), makeString(["mandatory ", toString(addr), ".", key, " not defined"], ""))
184182
185183
186184 func throwErr (msg) = throw(makeString(["lp_stable.ride:", msg], " "))
187185
188186
189187 func fmtErr (msg) = makeString(["lp_stable.ride:", msg], " ")
190188
191189
192190 let fca = addressFromStringValue(strf(this, fc()))
193191
194192 let inFee = {
195193 let @ = invoke(fca, "getInFeeREADONLY", [toString(this)], nil)
196194 if ($isInstanceOf(@, "Int"))
197195 then @
198196 else throw(($getType(@) + " couldn't be cast to Int"))
199197 }
200198
201199 let outFee = {
202200 let @ = invoke(fca, "getOutFeeREADONLY", [toString(this)], nil)
203201 if ($isInstanceOf(@, "Int"))
204202 then @
205203 else throw(($getType(@) + " couldn't be cast to Int"))
206204 }
207205
208206 let A = strf(this, amp())
209207
210208 func igs () = valueOrElse(getBoolean(fca, aps()), false)
211209
212210
213211 func mp () = fromBase58String(strf(fca, mtpk()))
214212
215213
216214 let feeCollectorAddress = addressFromStringValue(strf(fca, keyFeeCollectorAddress()))
217215
218216 func gpc () = {
219217 let amtAs = strf(this, aa())
220218 let priceAs = strf(this, pa())
221219 let iPriceAs = intf(fca, mba(priceAs))
222220 let iAmtAs = intf(fca, mba(amtAs))
223221 split(strf(fca, pc(toString(iAmtAs), toString(iPriceAs))), SEP)
224222 }
225223
226224
227225 func parseAssetId (input) = if ((input == wavesString))
228226 then unit
229227 else fromBase58String(input)
230228
231229
232230 func assetIdToString (input) = if ((input == unit))
233231 then wavesString
234232 else toBase58String(value(input))
235233
236234
237235 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]))
238236
239237
240238 let poolConfigParsed = parsePoolConfig(gpc())
241239
242-let $t081818410 = poolConfigParsed
240+let $t081658394 = poolConfigParsed
243241
244-let cfgPoolAddress = $t081818410._1
242+let cfgPoolAddress = $t081658394._1
245243
246-let cfgPoolStatus = $t081818410._2
244+let cfgPoolStatus = $t081658394._2
247245
248-let cfgLpAssetId = $t081818410._3
246+let cfgLpAssetId = $t081658394._3
249247
250-let cfgAmountAssetId = $t081818410._4
248+let cfgAmountAssetId = $t081658394._4
251249
252-let cfgPriceAssetId = $t081818410._5
250+let cfgPriceAssetId = $t081658394._5
253251
254-let cfgAmountAssetDecimals = $t081818410._6
252+let cfgAmountAssetDecimals = $t081658394._6
255253
256-let cfgPriceAssetDecimals = $t081818410._7
254+let cfgPriceAssetDecimals = $t081658394._7
257255
258-let cfgInAmountAssedId = $t081818410._8
256+let cfgInAmountAssedId = $t081658394._8
259257
260-let cfgInPriceAssetId = $t081818410._9
258+let cfgInPriceAssetId = $t081658394._9
261259
262260 func gfc () = split(strf(fca, fcfg()), SEP)
263261
264262
265263 let factoryConfig = gfc()
266264
267265 let stakingContract = valueOrErrorMessage(addressFromString(factoryConfig[idxFactStakCntr]), "Invalid staking contract address")
268266
269267 let slipageContract = valueOrErrorMessage(addressFromString(factoryConfig[idxFactSlippCntr]), "Invalid slipage contract address")
270268
271269 let gwxContract = valueOrErrorMessage(addressFromString(factoryConfig[idxFactGwxRewCntr]), "Invalid gwx contract address")
272270
273271 let restContract = valueOrErrorMessage(addressFromString(factoryConfig[idxFactoryRestCntr]), "Invalid gwx contract address")
274272
275273 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)
276274
277275
278276 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)
279277
280278
281279 func getAccBalance (assetId) = if ((assetId == "WAVES"))
282280 then wavesBalance(this).available
283281 else assetBalance(this, fromBase58String(assetId))
284282
285283
286284 func cpbi (prAmtX18,amAmtX18) = fraction(prAmtX18, scale18, amAmtX18)
287285
288286
289287 func cpbir (prAmtX18,amAmtX18,round) = fraction(prAmtX18, scale18, amAmtX18, round)
290288
291289
292290 func vad (A1,A2,slippage) = {
293291 let diff = fraction((A1 - A2), scale8BigInt, A2)
294292 let pass = ((slippage - abs(diff)) > zeroBigInt)
295293 if (!(pass))
296294 then throw(("Big slpg: " + toString(diff)))
297295 else $Tuple2(pass, min([A1, A2]))
298296 }
299297
300298
301299 func vd (D1,D0,slpg) = {
302300 let diff = fraction(D0, scale8BigInt, D1)
303301 let fail = (slpg > diff)
304302 if (if (fail)
305303 then true
306304 else (D0 > D1))
307305 then throw(((((((toString(D0) + " ") + toString(D1)) + " ") + toString(diff)) + " ") + toString(slpg)))
308306 else fail
309307 }
310308
311309
312310 func pcp (amAssetDcm,prAssetDcm,amAmt,prAmt) = {
313311 let amtAsAmtX18 = t1(amAmt, amAssetDcm)
314312 let prAsAmtX18 = t1(prAmt, prAssetDcm)
315313 cpbi(prAsAmtX18, amtAsAmtX18)
316314 }
317315
318316
319317 func calcPrices (amAmt,prAmt,lpAmt) = {
320318 let amtAsDcm = cfgAmountAssetDecimals
321319 let prAsDcm = cfgPriceAssetDecimals
322320 let priceX18 = pcp(amtAsDcm, prAsDcm, amAmt, prAmt)
323321 let amAmtX18 = t1(amAmt, amtAsDcm)
324322 let prAmtX18 = t1(prAmt, prAsDcm)
325323 let lpAmtX18 = t1(lpAmt, scale8)
326324 let lpPrInAmAsX18 = cpbi(amAmtX18, lpAmtX18)
327325 let lpPrInPrAsX18 = cpbi(prAmtX18, lpAmtX18)
328326 [priceX18, lpPrInAmAsX18, lpPrInPrAsX18]
329327 }
330328
331329
332330 func calculatePrices (amAmt,prAmt,lpAmt) = {
333331 let p = calcPrices(amAmt, prAmt, lpAmt)
334332 [f1(p[0], scale8), f1(p[1], scale8), f1(p[2], scale8)]
335333 }
336334
337335
338336 func takeFee (amount,fee) = {
339337 let feeAmount = if ((fee == 0))
340338 then 0
341339 else fraction(amount, fee, scale8)
342340 $Tuple2((amount - feeAmount), feeAmount)
343341 }
344342
345343
346344 func getD (xp) = {
347345 let xp0 = xp[0]
348346 let xp1 = xp[1]
349347 let s = (xp0 + xp1)
350348 if ((s == big0))
351349 then big0
352350 else {
353351 let a = parseIntValue(A)
354352 let ann = (a * 2)
355353 let p = fraction(xp0, xp1, big1)
356354 let xp0_xp1_n_n = fraction(p, big4, big1)
357355 let ann_s = fraction(toBigInt(ann), s, big1)
358356 let ann_1 = toBigInt((ann - 1))
359357 func calcDNext (d) = {
360358 let dd = fraction(d, d, big1)
361359 let ddd = fraction(dd, d, big1)
362360 let dp = fraction(ddd, big1, xp0_xp1_n_n)
363361 fraction((ann_s + fraction(dp, big2, big1)), d, (fraction(ann_1, d, big1) + fraction(big3, dp, big1)))
364362 }
365363
366364 func calc (acc,i) = if (acc._2)
367365 then acc
368366 else {
369367 let d = acc._1
370368 let dNext = calcDNext(d)
371369 let dDiffRaw = (dNext - value(d))
372370 let dDiff = if ((big0 > dDiffRaw))
373371 then -(dDiffRaw)
374372 else dDiffRaw
375373 if ((big1 >= dDiff))
376374 then $Tuple2(dNext, true)
377375 else $Tuple2(dNext, false)
378376 }
379377
380378 let arr = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16]
381- let $t01291512963 = {
379+ let $t01289912947 = {
382380 let $l = arr
383381 let $s = size($l)
384382 let $acc0 = $Tuple2(s, false)
385383 func $f0_1 ($a,$i) = if (($i >= $s))
386384 then $a
387385 else calc($a, $l[$i])
388386
389387 func $f0_2 ($a,$i) = if (($i >= $s))
390388 then $a
391389 else throw("List size exceeds 17")
392390
393391 $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)
394392 }
395- let d = $t01291512963._1
396- let found = $t01291512963._2
393+ let d = $t01289912947._1
394+ let found = $t01289912947._2
397395 if (found)
398396 then d
399397 else throw(("D calculation error, D = " + toString(d)))
400398 }
401399 }
402400
403401
404402 func ego (txId58,pmtAssetId,pmtLpAmt,userAddress) = {
405403 let lpId = cfgLpAssetId
406404 let amId = toBase58String(value(cfgAmountAssetId))
407405 let prId = toBase58String(value(cfgPriceAssetId))
408406 let amDcm = cfgAmountAssetDecimals
409407 let prDcm = cfgPriceAssetDecimals
410408 let sts = toString(cfgPoolStatus)
411409 let lpEmiss = valueOrErrorMessage(assetInfo(lpId), "Wrong LP id").quantity
412410 if ((toBase58String(lpId) != pmtAssetId))
413411 then throw("Wrong pmt asset")
414412 else {
415413 let amBalance = getAccBalance(amId)
416414 let amBalanceX18 = t1(amBalance, amDcm)
417415 let prBalance = getAccBalance(prId)
418416 let prBalanceX18 = t1(prBalance, prDcm)
419417 let curPriceX18 = cpbi(prBalanceX18, amBalanceX18)
420418 let curPrice = f1(curPriceX18, scale8)
421419 let pmtLpAmtX18 = t1(pmtLpAmt, scale8)
422420 let lpEmissX18 = t1(lpEmiss, scale8)
423421 let outAmAmtX18 = fraction(amBalanceX18, pmtLpAmtX18, lpEmissX18)
424422 let outPrAmtX18 = fraction(prBalanceX18, pmtLpAmtX18, lpEmissX18)
425423 let outAmAmt = fromX18Round(outAmAmtX18, amDcm, FLOOR)
426424 let outPrAmt = fromX18Round(outPrAmtX18, prDcm, FLOOR)
427425 let state = if ((txId58 == ""))
428426 then nil
429427 else [ScriptTransfer(userAddress, outAmAmt, if ((amId == "WAVES"))
430428 then unit
431429 else fromBase58String(amId)), ScriptTransfer(userAddress, outPrAmt, if ((prId == "WAVES"))
432430 then unit
433431 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)]
434432 $Tuple10(outAmAmt, outPrAmt, amId, prId, amBalance, prBalance, lpEmiss, curPriceX18, sts, state)
435433 }
436434 }
437435
438436
439437 func epo (txId58,slippage,inAmAmt,inAmId,inPrAmt,inPrId,userAddress,isEval,emitLp,isOneAsset,validateSlippage,pmtAmt,pmtId) = {
440438 let lpId = cfgLpAssetId
441439 let amIdStr = toBase58String(value(cfgAmountAssetId))
442440 let prIdStr = toBase58String(value(cfgPriceAssetId))
443441 let inAmIdStr = cfgInAmountAssedId
444442 let inPrIdStr = cfgInPriceAssetId
445443 let amtDcm = cfgAmountAssetDecimals
446444 let priceDcm = cfgPriceAssetDecimals
447445 let sts = toString(cfgPoolStatus)
448446 let lpEm = valueOrErrorMessage(assetInfo(lpId), "Wr lp as").quantity
449447 let amBalance = if (isEval)
450448 then getAccBalance(amIdStr)
451449 else if (if (isOneAsset)
452450 then (pmtId == amIdStr)
453451 else false)
454452 then (getAccBalance(amIdStr) - pmtAmt)
455453 else if (isOneAsset)
456454 then getAccBalance(amIdStr)
457455 else (getAccBalance(amIdStr) - inAmAmt)
458456 let prBalance = if (isEval)
459457 then getAccBalance(prIdStr)
460458 else if (if (isOneAsset)
461459 then (pmtId == prIdStr)
462460 else false)
463461 then (getAccBalance(prIdStr) - pmtAmt)
464462 else if (isOneAsset)
465463 then getAccBalance(prIdStr)
466464 else (getAccBalance(prIdStr) - inPrAmt)
467465 let inAmAssetAmtX18 = t1(inAmAmt, amtDcm)
468466 let inPrAssetAmtX18 = t1(inPrAmt, priceDcm)
469467 let userPriceX18 = cpbi(inPrAssetAmtX18, inAmAssetAmtX18)
470468 let amBalanceX18 = t1(amBalance, amtDcm)
471469 let prBalanceX18 = t1(prBalance, priceDcm)
472470 let D0 = getD([amBalanceX18, prBalanceX18])
473471 let r = if ((lpEm == 0))
474472 then {
475473 let D1 = getD([(amBalanceX18 + inAmAssetAmtX18), (prBalanceX18 + inPrAssetAmtX18)])
476474 let checkD = if ((D1 > D0))
477475 then true
478476 else throw("D1 should be greater than D0")
479477 if ((checkD == checkD))
480478 then {
481479 let curPriceX18 = zeroBigInt
482480 let slippageX18 = zeroBigInt
483481 let lpAmtX18 = D1
484482 $Tuple5(f1(lpAmtX18, scale8), f1(inAmAssetAmtX18, amtDcm), f1(inPrAssetAmtX18, priceDcm), cpbi((prBalanceX18 + inPrAssetAmtX18), (amBalanceX18 + inAmAssetAmtX18)), slippageX18)
485483 }
486484 else throw("Strict value is not equal to itself.")
487485 }
488486 else {
489487 let curPriceX18 = cpbi(prBalanceX18, amBalanceX18)
490488 let slippageRealX18 = fraction(abs((curPriceX18 - userPriceX18)), scale18, curPriceX18)
491489 let slippageX18 = t1(slippage, scale8)
492490 if (if (if (validateSlippage)
493491 then (curPriceX18 != zeroBigInt)
494492 else false)
495493 then (slippageRealX18 > slippageX18)
496494 else false)
497495 then throw(((("Price slippage " + toString(slippageRealX18)) + " > ") + toString(slippageX18)))
498496 else {
499497 let lpEmissionX18 = t1(lpEm, scale8)
500498 let prViaAmX18 = fraction(inAmAssetAmtX18, cpbir(prBalanceX18, amBalanceX18, CEILING), scale18, CEILING)
501499 let amViaPrX18 = fraction(inPrAssetAmtX18, scale18, cpbir(prBalanceX18, amBalanceX18, FLOOR), CEILING)
502500 let expectedAmts = if ((prViaAmX18 > inPrAssetAmtX18))
503501 then $Tuple2(amViaPrX18, inPrAssetAmtX18)
504502 else $Tuple2(inAmAssetAmtX18, prViaAmX18)
505503 let expAmtAssetAmtX18 = expectedAmts._1
506504 let expPriceAssetAmtX18 = expectedAmts._2
507505 let D1 = getD([(amBalanceX18 + expAmtAssetAmtX18), (prBalanceX18 + expPriceAssetAmtX18)])
508506 let checkD = if ((D1 > D0))
509507 then true
510508 else throw("D1 should be greater than D0")
511509 if ((checkD == checkD))
512510 then {
513511 let lpAmtX18 = fraction(lpEmissionX18, (D1 - D0), D0)
514512 $Tuple5(fromX18Round(lpAmtX18, scale8, FLOOR), fromX18Round(expAmtAssetAmtX18, amtDcm, CEILING), fromX18Round(expPriceAssetAmtX18, priceDcm, CEILING), curPriceX18, slippageX18)
515513 }
516514 else throw("Strict value is not equal to itself.")
517515 }
518516 }
519517 let calcLpAmt = r._1
520518 let calcAmAssetPmt = r._2
521519 let calcPrAssetPmt = r._3
522520 let curPrice = f1(r._4, scale8)
523521 let slippageCalc = f1(r._5, scale8)
524522 if ((0 >= calcLpAmt))
525523 then throw("LP <= 0")
526524 else {
527525 let emitLpAmt = if (!(emitLp))
528526 then 0
529527 else calcLpAmt
530528 let amDiff = (inAmAmt - calcAmAssetPmt)
531529 let prDiff = (inPrAmt - calcPrAssetPmt)
532- let $t02080221147 = if (if (isOneAsset)
530+ let $t02078621131 = if (if (isOneAsset)
533531 then (pmtId == amIdStr)
534532 else false)
535533 then $Tuple2(pmtAmt, 0)
536534 else if (if (isOneAsset)
537535 then (pmtId == prIdStr)
538536 else false)
539537 then $Tuple2(0, pmtAmt)
540538 else $Tuple2(calcAmAssetPmt, calcPrAssetPmt)
541- let writeAmAmt = $t02080221147._1
542- let writePrAmt = $t02080221147._2
539+ let writeAmAmt = $t02078621131._1
540+ let writePrAmt = $t02078621131._2
543541 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))]
544542 $Tuple13(calcLpAmt, emitLpAmt, curPrice, amBalance, prBalance, lpEm, lpId, sts, commonState, amDiff, prDiff, inAmId, inPrId)
545543 }
546544 }
547545
548546
549547 func getYD (xp,i,D) = {
550548 let n = big2
551549 let x = xp[if ((i == 0))
552550 then 1
553551 else 0]
554552 let aPrecision = parseBigIntValue(Amult)
555553 let a = (parseBigIntValue(A) * aPrecision)
556554 let s = x
557555 let ann = (a * n)
558556 let c = (((((D * D) / (x * n)) * D) * aPrecision) / (ann * n))
559557 let b = ((s + ((D * aPrecision) / ann)) - D)
560558 func calc (acc,cur) = {
561- let $t02234222362 = acc
562- let y = $t02234222362._1
563- let found = $t02234222362._2
559+ let $t02232622346 = acc
560+ let y = $t02232622346._1
561+ let found = $t02232622346._2
564562 if ((found != unit))
565563 then acc
566564 else {
567565 let yNext = (((y * y) + c) / ((big2 * y) + b))
568566 let yDiff = absBigInt((yNext - value(y)))
569567 if ((big1 >= yDiff))
570568 then $Tuple2(yNext, cur)
571569 else $Tuple2(yNext, unit)
572570 }
573571 }
574572
575573 let arr = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
576- let $t02266922716 = {
574+ let $t02265322700 = {
577575 let $l = arr
578576 let $s = size($l)
579577 let $acc0 = $Tuple2(D, unit)
580578 func $f0_1 ($a,$i) = if (($i >= $s))
581579 then $a
582580 else calc($a, $l[$i])
583581
584582 func $f0_2 ($a,$i) = if (($i >= $s))
585583 then $a
586584 else throw("List size exceeds 15")
587585
588586 $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)
589587 }
590- let y = $t02266922716._1
591- let found = $t02266922716._2
588+ let y = $t02265322700._1
589+ let found = $t02265322700._2
592590 if ((found != unit))
593591 then y
594592 else throw(("Y calculation error, Y = " + toString(y)))
595593 }
596594
597595
598596 func calcDLp (amountBalance,priceBalance,lpEmission) = {
599597 let updatedDLp = fraction(getD([t1BigInt(amountBalance, toBigInt(cfgAmountAssetDecimals)), t1BigInt(priceBalance, toBigInt(cfgPriceAssetDecimals))]), scale18, lpEmission)
600598 if ((lpEmission == big0))
601599 then big0
602600 else updatedDLp
603601 }
604602
605603
606604 func calcCurrentDLp (amountAssetDelta,priceAssetDelta,lpAssetEmissionDelta) = {
607605 let amountAssetBalance = (toBigInt(getAccBalance(assetIdToString(cfgAmountAssetId))) - amountAssetDelta)
608606 let priceAssetBalance = (toBigInt(getAccBalance(assetIdToString(cfgPriceAssetId))) - priceAssetDelta)
609607 let lpAssetEmission = (toBigInt(value(assetInfo(cfgLpAssetId)).quantity) - lpAssetEmissionDelta)
610608 let currentDLp = calcDLp(amountAssetBalance, priceAssetBalance, lpAssetEmission)
611609 currentDLp
612610 }
613611
614612
615613 func refreshDLpInternal (amountAssetBalanceDelta,priceAssetBalanceDelta,lpAssetEmissionDelta) = {
616614 let amountAssetBalance = (getAccBalance(assetIdToString(cfgAmountAssetId)) + amountAssetBalanceDelta)
617615 let priceAssetBalance = (getAccBalance(assetIdToString(cfgPriceAssetId)) + priceAssetBalanceDelta)
618616 let lpAssetEmission = (value(assetInfo(cfgLpAssetId)).quantity + lpAssetEmissionDelta)
619617 let updatedDLp = calcDLp(toBigInt(amountAssetBalance), toBigInt(priceAssetBalance), toBigInt(lpAssetEmission))
620618 let actions = [IntegerEntry(keyDLpRefreshedHeight, height), StringEntry(keyDLp, toString(updatedDLp))]
621619 $Tuple2(actions, updatedDLp)
622620 }
623621
624622
625623 func validateUpdatedDLp (oldDLp,updatedDLp) = if ((updatedDLp >= oldDLp))
626624 then true
627625 else throwErr("updated DLp lower than current DLp")
628626
629627
630628 func validateMatcherOrderAllowed (order) = {
631629 let amountAssetBalance = getAccBalance(assetIdToString(cfgAmountAssetId))
632630 let priceAssetBalance = getAccBalance(assetIdToString(cfgPriceAssetId))
633631 let amountAssetAmount = order.amount
634632 let priceAssetAmount = fraction(order.amount, order.price, scale8, FLOOR)
635- let $t02491425126 = if ((order.orderType == Buy))
633+ let $t02489825110 = if ((order.orderType == Buy))
636634 then $Tuple2(amountAssetAmount, -(priceAssetAmount))
637635 else $Tuple2(-(amountAssetAmount), priceAssetAmount)
638- let amountAssetBalanceDelta = $t02491425126._1
639- let priceAssetBalanceDelta = $t02491425126._2
636+ let amountAssetBalanceDelta = $t02489825110._1
637+ let priceAssetBalanceDelta = $t02489825110._2
640638 if (if (if (igs())
641639 then true
642640 else (cfgPoolStatus == PoolMatcherDis))
643641 then true
644642 else (cfgPoolStatus == PoolShutdown))
645643 then throw("Admin blocked")
646644 else if (if ((order.assetPair.amountAsset != cfgAmountAssetId))
647645 then true
648646 else (order.assetPair.priceAsset != cfgPriceAssetId))
649647 then throw("Wr assets")
650648 else {
651649 let dLp = parseBigIntValue(valueOrElse(getString(this, keyDLp), "0"))
652- let $t02546825568 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
653- let unusedActions = $t02546825568._1
654- let dLpNew = $t02546825568._2
650+ let $t02545225552 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
651+ let unusedActions = $t02545225552._1
652+ let dLpNew = $t02545225552._2
655653 let isOrderValid = (dLpNew >= dLp)
656654 let info = makeString(["dLp=", toString(dLp), " dLpNew=", toString(dLpNew), " amountAssetBalance=", toString(amountAssetBalance), " priceAssetBalance=", toString(priceAssetBalance), " amountAssetBalanceDelta=", toString(amountAssetBalanceDelta), " priceAssetBalanceDelta=", toString(priceAssetBalanceDelta), " height=", toString(height)], "")
657655 $Tuple2(isOrderValid, info)
658656 }
659657 }
660658
661659
662660 func cg (i) = if ((size(i.payments) != 1))
663661 then throw("1 pmnt exp")
664662 else {
665663 let pmt = value(i.payments[0])
666664 let pmtAssetId = value(pmt.assetId)
667665 let pmtAmt = pmt.amount
668666 let r = ego(toBase58String(i.transactionId), toBase58String(pmtAssetId), pmtAmt, i.caller)
669667 let outAmAmt = r._1
670668 let outPrAmt = r._2
671669 let sts = parseIntValue(r._9)
672670 let state = r._10
673671 if (if (igs())
674672 then true
675673 else (sts == PoolShutdown))
676674 then throw(("Admin blocked: " + toString(sts)))
677675 else $Tuple5(outAmAmt, outPrAmt, pmtAmt, pmtAssetId, state)
678676 }
679677
680678
681679 func cp (caller,txId,amAsPmt,prAsPmt,slippage,emitLp,isOneAsset,validateSlippage,pmtAmt,pmtId) = {
682680 let r = epo(txId, slippage, value(amAsPmt).amount, value(amAsPmt).assetId, value(prAsPmt).amount, value(prAsPmt).assetId, caller, (txId == ""), emitLp, isOneAsset, validateSlippage, pmtAmt, pmtId)
683681 let sts = parseIntValue(r._8)
684682 if (if (if (igs())
685683 then true
686684 else (sts == PoolPutDis))
687685 then true
688686 else (sts == PoolShutdown))
689687 then throw(("Blocked:" + toString(sts)))
690688 else r
691689 }
692690
693691
694692 func calcPutOneTkn (pmtAmtRaw,pmtAssetId,userAddress,txId,withTakeFee) = {
695693 let amId = toBase58String(value(cfgAmountAssetId))
696694 let prId = toBase58String(value(cfgPriceAssetId))
697695 let lpId = cfgLpAssetId
698696 let amtDcm = cfgAmountAssetDecimals
699697 let priceDcm = cfgPriceAssetDecimals
700698 let lpAssetEmission = toBigInt(valueOrErrorMessage(assetInfo(lpId), "invalid lp asset").quantity)
701699 let chechEmission = if ((lpAssetEmission > big0))
702700 then true
703701 else throw("initial deposit requires all coins")
704702 if ((chechEmission == chechEmission))
705703 then {
706704 let amBalance = getAccBalance(amId)
707705 let prBalance = getAccBalance(prId)
708- let $t02822428686 = if ((txId == ""))
706+ let $t02820828670 = if ((txId == ""))
709707 then $Tuple2(amBalance, prBalance)
710708 else if ((pmtAssetId == amId))
711709 then if ((pmtAmtRaw > amBalance))
712710 then throw("invalid payment amount")
713711 else $Tuple2((amBalance - pmtAmtRaw), prBalance)
714712 else if ((pmtAssetId == prId))
715713 then if ((pmtAmtRaw > prBalance))
716714 then throw("invalid payment amount")
717715 else $Tuple2(amBalance, (prBalance - pmtAmtRaw))
718716 else throw("wrong pmtAssetId")
719- let amBalanceOld = $t02822428686._1
720- let prBalanceOld = $t02822428686._2
721- let $t02869228868 = if ((pmtAssetId == amId))
717+ let amBalanceOld = $t02820828670._1
718+ let prBalanceOld = $t02820828670._2
719+ let $t02867628852 = if ((pmtAssetId == amId))
722720 then $Tuple2(pmtAmtRaw, 0)
723721 else if ((pmtAssetId == prId))
724722 then $Tuple2(0, pmtAmtRaw)
725723 else throw("invalid payment")
726- let amAmountRaw = $t02869228868._1
727- let prAmountRaw = $t02869228868._2
728- let $t02887229126 = if (withTakeFee)
724+ let amAmountRaw = $t02867628852._1
725+ let prAmountRaw = $t02867628852._2
726+ let $t02885629110 = if (withTakeFee)
729727 then $Tuple3(takeFee(amAmountRaw, inFee)._1, takeFee(prAmountRaw, inFee)._1, takeFee(pmtAmtRaw, inFee)._2)
730728 else $Tuple3(amAmountRaw, prAmountRaw, 0)
731- let amAmount = $t02887229126._1
732- let prAmount = $t02887229126._2
733- let feeAmount = $t02887229126._3
729+ let amAmount = $t02885629110._1
730+ let prAmount = $t02885629110._2
731+ let feeAmount = $t02885629110._3
734732 let amBalanceNew = (amBalanceOld + amAmount)
735733 let prBalanceNew = (prBalanceOld + prAmount)
736734 let D0 = getD([t1(amBalanceOld, cfgAmountAssetDecimals), t1(prBalanceOld, cfgPriceAssetDecimals)])
737735 let D1 = getD([t1(amBalanceNew, cfgAmountAssetDecimals), t1(prBalanceNew, cfgPriceAssetDecimals)])
738736 let checkD = if ((D1 > D0))
739737 then true
740738 else throw()
741739 if ((checkD == checkD))
742740 then {
743741 let lpAmount = fraction(lpAssetEmission, (D1 - D0), D0, FLOOR)
744742 let curPrice = f1(cpbi(t1(prBalanceNew, priceDcm), t1(amBalanceNew, amtDcm)), scale8)
745743 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))]
746744 let poolProportion = fraction(prBalanceOld, scale8, amBalanceOld)
747745 let amountAssetPart = fraction(pmtAmtRaw, scale8, (poolProportion + scale8))
748746 let priceAssetPart = (pmtAmtRaw - amountAssetPart)
749747 let lpAmtBoth = fraction(lpAssetEmission, toBigInt(priceAssetPart), toBigInt(prBalanceOld))
750748 let bonus = toInt(fraction((lpAmount - lpAmtBoth), scale8BigInt, lpAmtBoth))
751749 $Tuple4(toInt(lpAmount), commonState, feeAmount, bonus)
752750 }
753751 else throw("Strict value is not equal to itself.")
754752 }
755753 else throw("Strict value is not equal to itself.")
756754 }
757755
758756
759757 func getOneTknV2Internal (outAssetId,minOutAmount,payments,caller,originCaller,transactionId) = {
760758 let lpId = toBase58String(value(cfgLpAssetId))
761759 let amId = toBase58String(value(cfgAmountAssetId))
762760 let prId = toBase58String(value(cfgPriceAssetId))
763761 let amDecimals = cfgAmountAssetDecimals
764762 let prDecimals = cfgPriceAssetDecimals
765763 let poolStatus = cfgPoolStatus
766764 let userAddress = if ((caller == restContract))
767765 then originCaller
768766 else caller
769767 let pmt = value(payments[0])
770768 let pmtAssetId = value(pmt.assetId)
771769 let pmtAmt = pmt.amount
772770 let currentDLp = calcCurrentDLp(big0, big0, big0)
773771 if ((currentDLp == currentDLp))
774772 then {
775773 let txId58 = toBase58String(transactionId)
776774 if ((lpId != toBase58String(pmtAssetId)))
777775 then throw("Wrong LP")
778776 else {
779777 let amBalance = getAccBalance(amId)
780778 let prBalance = getAccBalance(prId)
781- let $t03123831349 = {
779+ let $t03122231333 = {
782780 let @ = invoke(this, "getOneTknV2READONLY", [outAssetId, pmtAmt], nil)
783781 if ($isInstanceOf(@, "(Int, Int)"))
784782 then @
785783 else throw(($getType(@) + " couldn't be cast to (Int, Int)"))
786784 }
787- if (($t03123831349 == $t03123831349))
785+ if (($t03122231333 == $t03122231333))
788786 then {
789- let feeAmount = $t03123831349._2
790- let totalGet = $t03123831349._1
787+ let feeAmount = $t03122231333._2
788+ let totalGet = $t03122231333._1
791789 let totalAmount = if (if ((minOutAmount > 0))
792790 then (minOutAmount > totalGet)
793791 else false)
794792 then throwErr(makeString(["amount to receive is less than ", toString(minOutAmount)], ""))
795793 else totalGet
796- let $t03153931846 = if ((outAssetId == amId))
794+ let $t03152331830 = if ((outAssetId == amId))
797795 then $Tuple4(totalAmount, 0, ((amBalance - totalAmount) - feeAmount), prBalance)
798796 else if ((outAssetId == prId))
799797 then $Tuple4(0, totalAmount, amBalance, ((prBalance - totalAmount) - feeAmount))
800798 else throw("invalid out asset id")
801- let outAm = $t03153931846._1
802- let outPr = $t03153931846._2
803- let amBalanceNew = $t03153931846._3
804- let prBalanceNew = $t03153931846._4
799+ let outAm = $t03152331830._1
800+ let outPr = $t03152331830._2
801+ let amBalanceNew = $t03152331830._3
802+ let prBalanceNew = $t03152331830._4
805803 let curPrX18 = cpbi(t1(prBalanceNew, prDecimals), t1(amBalanceNew, amDecimals))
806804 let curPr = f1(curPrX18, scale8)
807805 let outAssetIdOrWaves = if ((outAssetId == "WAVES"))
808806 then unit
809807 else fromBase58String(outAssetId)
810808 let sendFeeToMatcher = if ((feeAmount > 0))
811809 then [ScriptTransfer(feeCollectorAddress, feeAmount, outAssetIdOrWaves)]
812810 else nil
813811 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)
814812 if ((state == state))
815813 then {
816814 let burn = invoke(fca, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
817815 if ((burn == burn))
818816 then {
819- let $t03263132981 = {
817+ let $t03261532965 = {
820818 let feeAmountForCalc = if ((this == feeCollectorAddress))
821819 then 0
822820 else feeAmount
823821 let outInAmountAsset = if ((parseAssetId(outAssetId) == cfgAmountAssetId))
824822 then true
825823 else false
826824 if (outInAmountAsset)
827825 then $Tuple2(-((totalGet + feeAmountForCalc)), 0)
828826 else $Tuple2(0, -((totalGet + feeAmountForCalc)))
829827 }
830- let amountAssetBalanceDelta = $t03263132981._1
831- let priceAssetBalanceDelta = $t03263132981._2
832- let $t03298433092 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
833- let refreshDLpActions = $t03298433092._1
834- let updatedDLp = $t03298433092._2
828+ let amountAssetBalanceDelta = $t03261532965._1
829+ let priceAssetBalanceDelta = $t03261532965._2
830+ let $t03296833076 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
831+ let refreshDLpActions = $t03296833076._1
832+ let updatedDLp = $t03296833076._2
835833 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
836834 if ((isUpdatedDLpValid == isUpdatedDLpValid))
837835 then $Tuple2((state ++ refreshDLpActions), totalAmount)
838836 else throw("Strict value is not equal to itself.")
839837 }
840838 else throw("Strict value is not equal to itself.")
841839 }
842840 else throw("Strict value is not equal to itself.")
843841 }
844842 else throw("Strict value is not equal to itself.")
845843 }
846844 }
847845 else throw("Strict value is not equal to itself.")
848846 }
849847
850848
851849 func m () = match getString(mpk()) {
852850 case s: String =>
853851 fromBase58String(s)
854852 case _: Unit =>
855853 unit
856854 case _ =>
857855 throw("Match error")
858856 }
859857
860858
861859 func pm () = match getString(pmpk()) {
862860 case s: String =>
863861 fromBase58String(s)
864862 case _: Unit =>
865863 unit
866864 case _ =>
867865 throw("Match error")
868866 }
869867
870868
871869 let pd = throw("Permission denied")
872870
873871 func isManager (i) = match m() {
874872 case pk: ByteVector =>
875873 (i.callerPublicKey == pk)
876874 case _: Unit =>
877875 (i.caller == this)
878876 case _ =>
879877 throw("Match error")
880878 }
881879
882880
883881 func mm (i) = match m() {
884882 case pk: ByteVector =>
885883 if ((i.callerPublicKey == pk))
886884 then true
887885 else pd
888886 case _: Unit =>
889887 if ((i.caller == this))
890888 then true
891889 else pd
892890 case _ =>
893891 throw("Match error")
894892 }
895893
896894
897895 func getY (isReverse,D,poolAmountInBalance) = {
898896 let poolConfig = gpc()
899897 let amId = poolConfig[idxAmAsId]
900898 let prId = poolConfig[idxPrAsId]
901899 let n = big2
902900 let aPrecision = parseBigIntValue(Amult)
903901 let a = (parseBigIntValue(A) * aPrecision)
904902 let xp = if ((isReverse == false))
905903 then [(toBigInt(getAccBalance(amId)) + poolAmountInBalance), toBigInt(getAccBalance(prId))]
906904 else [(toBigInt(getAccBalance(prId)) + poolAmountInBalance), toBigInt(getAccBalance(amId))]
907905 let x = xp[0]
908906 let s = x
909907 let ann = (a * n)
910908 let c = (((((D * D) / (x * n)) * D) * aPrecision) / (ann * n))
911909 let b = ((s + ((D * aPrecision) / ann)) - D)
912910 func calc (acc,cur) = {
913- let $t03453934559 = acc
914- let y = $t03453934559._1
915- let found = $t03453934559._2
911+ let $t03452334543 = acc
912+ let y = $t03452334543._1
913+ let found = $t03452334543._2
916914 if ((found != unit))
917915 then acc
918916 else {
919917 let yNext = (((y * y) + c) / ((big2 * y) + b))
920918 let yDiff = absBigInt((yNext - value(y)))
921919 if ((big1 >= yDiff))
922920 then $Tuple2(yNext, cur)
923921 else $Tuple2(yNext, unit)
924922 }
925923 }
926924
927925 let arr = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
928- let $t03489034937 = {
926+ let $t03487434921 = {
929927 let $l = arr
930928 let $s = size($l)
931929 let $acc0 = $Tuple2(D, unit)
932930 func $f0_1 ($a,$i) = if (($i >= $s))
933931 then $a
934932 else calc($a, $l[$i])
935933
936934 func $f0_2 ($a,$i) = if (($i >= $s))
937935 then $a
938936 else throw("List size exceeds 15")
939937
940938 $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)
941939 }
942- let y = $t03489034937._1
943- let found = $t03489034937._2
940+ let y = $t03487434921._1
941+ let found = $t03487434921._2
944942 if ((found != unit))
945943 then y
946944 else throw(("Y calculation error, Y = " + toString(y)))
947945 }
948946
949947
950948 func skipOrderValidation () = valueOrElse(getBoolean(fca, keySkipOrderValidation(toString(this))), false)
951949
952950
953951 @Callable(i)
954952 func calculateAmountOutForSwapREADONLY (cleanAmountIn,isReverse,feePoolAmount) = {
955- let $t03528935713 = if ((isReverse == false))
953+ let $t03527335697 = if ((isReverse == false))
956954 then {
957955 let assetOut = strf(this, pa())
958956 let poolAmountInBalance = (toBigInt(getAccBalance(strf(this, aa()))) + toBigInt(cleanAmountIn))
959957 $Tuple2(assetOut, poolAmountInBalance)
960958 }
961959 else {
962960 let assetOut = strf(this, aa())
963961 let poolAmountInBalance = (toBigInt(getAccBalance(strf(this, pa()))) + toBigInt(cleanAmountIn))
964962 $Tuple2(assetOut, poolAmountInBalance)
965963 }
966- let assetOut = $t03528935713._1
967- let poolAmountInBalance = $t03528935713._2
964+ let assetOut = $t03527335697._1
965+ let poolAmountInBalance = $t03527335697._2
968966 let poolConfig = gpc()
969967 let amId = poolConfig[idxAmAsId]
970968 let prId = poolConfig[idxPrAsId]
971969 let xp = [toBigInt(getAccBalance(amId)), toBigInt(getAccBalance(prId))]
972970 let D = getD(xp)
973971 let y = getY(isReverse, D, toBigInt(cleanAmountIn))
974972 let dy = ((toBigInt(getAccBalance(assetOut)) - y) - toBigInt(1))
975973 let totalGetRaw = max([0, toInt(dy)])
976974 let newXp = if ((isReverse == false))
977975 then [((toBigInt(getAccBalance(amId)) + toBigInt(cleanAmountIn)) + toBigInt(feePoolAmount)), (toBigInt(getAccBalance(prId)) - dy)]
978976 else [(toBigInt(getAccBalance(amId)) - dy), ((toBigInt(getAccBalance(prId)) + toBigInt(cleanAmountIn)) + toBigInt(feePoolAmount))]
979977 let newD = getD(newXp)
980978 let checkD = if ((newD >= D))
981979 then true
982980 else throw(makeString(["new D is fewer error", toString(D), toString(newD)], "__"))
983981 if ((checkD == checkD))
984982 then $Tuple2(nil, totalGetRaw)
985983 else throw("Strict value is not equal to itself.")
986984 }
987985
988986
989987
990988 @Callable(i)
991989 func calculateAmountOutForSwapAndSendTokens (cleanAmountIn,isReverse,amountOutMin,addressTo,feePoolAmount) = {
992990 let swapContact = {
993991 let @ = invoke(fca, "getSwapContractREADONLY", nil, nil)
994992 if ($isInstanceOf(@, "String"))
995993 then @
996994 else throw(($getType(@) + " couldn't be cast to String"))
997995 }
998996 let checks = [if ((value(i.payments[0]).amount >= cleanAmountIn))
999997 then true
1000998 else throwErr("Wrong amount"), if ((i.caller == addressFromStringValue(swapContact)))
1001999 then true
10021000 else throwErr("Permission denied")]
10031001 if ((checks == checks))
10041002 then {
10051003 let pmt = value(i.payments[0])
10061004 let assetIn = assetIdToString(pmt.assetId)
1007- let $t03714937543 = if ((isReverse == false))
1005+ let $t03713337527 = if ((isReverse == false))
10081006 then {
10091007 let assetOut = strf(this, pa())
10101008 let poolAmountInBalance = (getAccBalance(assetIn) - value(i.payments[0]).amount)
10111009 $Tuple2(assetOut, poolAmountInBalance)
10121010 }
10131011 else {
10141012 let assetOut = strf(this, aa())
10151013 let poolAmountInBalance = (getAccBalance(assetIn) - value(i.payments[0]).amount)
10161014 $Tuple2(assetOut, poolAmountInBalance)
10171015 }
1018- let assetOut = $t03714937543._1
1019- let poolAmountInBalance = $t03714937543._2
1016+ let assetOut = $t03713337527._1
1017+ let poolAmountInBalance = $t03713337527._2
10201018 let poolConfig = gpc()
10211019 let amId = poolConfig[idxAmAsId]
10221020 let prId = poolConfig[idxPrAsId]
10231021 let xp = if ((isReverse == false))
10241022 then [(toBigInt(getAccBalance(amId)) - toBigInt(value(i.payments[0]).amount)), toBigInt(getAccBalance(prId))]
10251023 else [toBigInt(getAccBalance(amId)), (toBigInt(getAccBalance(prId)) - toBigInt(value(i.payments[0]).amount))]
10261024 let D = getD(xp)
10271025 let y = getY(isReverse, D, toBigInt(0))
10281026 let dy = ((toBigInt(getAccBalance(assetOut)) - y) - toBigInt(1))
10291027 let totalGetRaw = max([0, toInt(dy)])
10301028 let checkMin = if ((totalGetRaw >= amountOutMin))
10311029 then true
10321030 else throw("Exchange result is fewer coins than expected")
10331031 if ((checkMin == checkMin))
10341032 then {
10351033 let newXp = if ((isReverse == false))
10361034 then [(toBigInt(getAccBalance(amId)) + toBigInt(feePoolAmount)), (toBigInt(getAccBalance(prId)) - dy)]
10371035 else [(toBigInt(getAccBalance(amId)) - dy), (toBigInt(getAccBalance(prId)) + toBigInt(feePoolAmount))]
10381036 let newD = getD(newXp)
10391037 let checkD = if ((newD >= D))
10401038 then true
10411039 else throw("new D is fewer error")
10421040 if ((checkD == checkD))
10431041 then $Tuple2([ScriptTransfer(addressFromStringValue(addressTo), totalGetRaw, parseAssetId(assetOut))], totalGetRaw)
10441042 else throw("Strict value is not equal to itself.")
10451043 }
10461044 else throw("Strict value is not equal to itself.")
10471045 }
10481046 else throw("Strict value is not equal to itself.")
10491047 }
10501048
10511049
10521050
10531051 @Callable(i)
10541052 func constructor (fc) = {
10551053 let c = mm(i)
10561054 if ((c == c))
10571055 then [StringEntry(fc(), fc)]
10581056 else throw("Strict value is not equal to itself.")
10591057 }
10601058
10611059
10621060
10631061 @Callable(i)
10641062 func setManager (pendingManagerPublicKey) = {
10651063 let c = mm(i)
10661064 if ((c == c))
10671065 then {
10681066 let cm = fromBase58String(pendingManagerPublicKey)
10691067 if ((cm == cm))
10701068 then [StringEntry(pmpk(), pendingManagerPublicKey)]
10711069 else throw("Strict value is not equal to itself.")
10721070 }
10731071 else throw("Strict value is not equal to itself.")
10741072 }
10751073
10761074
10771075
10781076 @Callable(i)
10791077 func confirmManager () = {
10801078 let p = pm()
10811079 let hpm = if (isDefined(p))
10821080 then true
10831081 else throw("No pending manager")
10841082 if ((hpm == hpm))
10851083 then {
10861084 let cpm = if ((i.callerPublicKey == value(p)))
10871085 then true
10881086 else throw("You are not pending manager")
10891087 if ((cpm == cpm))
10901088 then [StringEntry(mpk(), toBase58String(value(p))), DeleteEntry(pmpk())]
10911089 else throw("Strict value is not equal to itself.")
10921090 }
10931091 else throw("Strict value is not equal to itself.")
10941092 }
10951093
10961094
10971095
10981096 @Callable(i)
10991097 func put (slip,autoStake) = {
11001098 let factCfg = gfc()
11011099 let stakingCntr = valueOrErrorMessage(addressFromString(factCfg[idxFactStakCntr]), "Wr st addr")
11021100 let slipCntr = valueOrErrorMessage(addressFromString(factCfg[idxFactSlippCntr]), "Wr sl addr")
11031101 if ((0 > slip))
11041102 then throw("Wrong slippage")
11051103 else if ((size(i.payments) != 2))
11061104 then throw("2 pmnts expd")
11071105 else {
11081106 let amAssetPmt = toBigInt(value(i.payments[0]).amount)
11091107 let prAssetPmt = toBigInt(value(i.payments[1]).amount)
11101108 let amountAssetBalance = (toBigInt(getAccBalance(assetIdToString(cfgAmountAssetId))) - amAssetPmt)
11111109 if ((amountAssetBalance == amountAssetBalance))
11121110 then {
11131111 let priceAssetBalance = (toBigInt(getAccBalance(assetIdToString(cfgPriceAssetId))) - prAssetPmt)
11141112 if ((priceAssetBalance == priceAssetBalance))
11151113 then {
11161114 let lpAssetEmission = toBigInt(value(assetInfo(cfgLpAssetId)).quantity)
11171115 if ((lpAssetEmission == lpAssetEmission))
11181116 then {
11191117 let currentDLp = calcCurrentDLp(amAssetPmt, prAssetPmt, toBigInt(0))
11201118 if ((currentDLp == currentDLp))
11211119 then {
11221120 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, "")
11231121 let emitLpAmt = e._2
11241122 let lpAssetId = e._7
11251123 let state = e._9
11261124 let amDiff = e._10
11271125 let prDiff = e._11
11281126 let amId = e._12
11291127 let prId = e._13
11301128 let r = invoke(fca, "emit", [emitLpAmt], nil)
11311129 if ((r == r))
11321130 then {
11331131 let el = match r {
11341132 case legacy: Address =>
11351133 invoke(legacy, "emit", [emitLpAmt], nil)
11361134 case _ =>
11371135 unit
11381136 }
11391137 if ((el == el))
11401138 then {
11411139 let sa = if ((amDiff > 0))
11421140 then invoke(slipCntr, "put", nil, [AttachedPayment(amId, amDiff)])
11431141 else nil
11441142 if ((sa == sa))
11451143 then {
11461144 let sp = if ((prDiff > 0))
11471145 then invoke(slipCntr, "put", nil, [AttachedPayment(prId, prDiff)])
11481146 else nil
11491147 if ((sp == sp))
11501148 then {
11511149 let lpTrnsfr = if (autoStake)
11521150 then {
11531151 let ss = invoke(stakingCntr, "stake", nil, [AttachedPayment(lpAssetId, emitLpAmt)])
11541152 if ((ss == ss))
11551153 then nil
11561154 else throw("Strict value is not equal to itself.")
11571155 }
11581156 else [ScriptTransfer(i.caller, emitLpAmt, lpAssetId)]
1159- let $t04216242304 = refreshDLpInternal(0, 0, 0)
1160- let refreshDLpActions = $t04216242304._1
1161- let updatedDLp = $t04216242304._2
1157+ let $t04214642288 = refreshDLpInternal(0, 0, 0)
1158+ let refreshDLpActions = $t04214642288._1
1159+ let updatedDLp = $t04214642288._2
11621160 let check = if ((updatedDLp >= currentDLp))
11631161 then true
11641162 else throwErr(makeString(["updated DLp lower than current DLp", toString(amountAssetBalance), toString(priceAssetBalance), toString(lpAssetEmission), toString(currentDLp), toString(updatedDLp), toString(amDiff), toString(prDiff)], " "))
11651163 if ((check == check))
11661164 then {
11671165 let lpAssetEmissionAfter = value(assetInfo(cfgLpAssetId)).quantity
11681166 if ((lpAssetEmissionAfter == lpAssetEmissionAfter))
11691167 then ((state ++ lpTrnsfr) ++ refreshDLpActions)
11701168 else throw("Strict value is not equal to itself.")
11711169 }
11721170 else throw("Strict value is not equal to itself.")
11731171 }
11741172 else throw("Strict value is not equal to itself.")
11751173 }
11761174 else throw("Strict value is not equal to itself.")
11771175 }
11781176 else throw("Strict value is not equal to itself.")
11791177 }
11801178 else throw("Strict value is not equal to itself.")
11811179 }
11821180 else throw("Strict value is not equal to itself.")
11831181 }
11841182 else throw("Strict value is not equal to itself.")
11851183 }
11861184 else throw("Strict value is not equal to itself.")
11871185 }
11881186 else throw("Strict value is not equal to itself.")
11891187 }
11901188 }
11911189
11921190
11931191
11941192 @Callable(i)
11951193 func putOneTknV2 (minOutAmount,autoStake) = {
11961194 let isPoolOneTokenOperationsDisabled = {
11971195 let @ = invoke(fca, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
11981196 if ($isInstanceOf(@, "Boolean"))
11991197 then @
12001198 else throw(($getType(@) + " couldn't be cast to Boolean"))
12011199 }
12021200 let isPutDisabled = if (if (if (igs())
12031201 then true
12041202 else (cfgPoolStatus == PoolPutDis))
12051203 then true
12061204 else (cfgPoolStatus == PoolShutdown))
12071205 then true
12081206 else isPoolOneTokenOperationsDisabled
12091207 let checks = [if (if (!(isPutDisabled))
12101208 then true
12111209 else isManager(i))
12121210 then true
12131211 else throwErr("put operation is blocked by admin"), if ((size(i.payments) == 1))
12141212 then true
12151213 else throwErr("exactly 1 payment are expected")]
12161214 if ((checks == checks))
12171215 then {
12181216 let amId = toBase58String(value(cfgAmountAssetId))
12191217 let prId = toBase58String(value(cfgPriceAssetId))
12201218 let lpId = cfgLpAssetId
12211219 let amDecimals = cfgAmountAssetDecimals
12221220 let prDecimals = cfgPriceAssetDecimals
12231221 let userAddress = if ((i.caller == this))
12241222 then i.originCaller
12251223 else i.caller
12261224 let pmt = value(i.payments[0])
12271225 let pmtAssetId = toBase58String(value(pmt.assetId))
12281226 let pmtAmt = pmt.amount
12291227 let currentDLp = if ((pmt.assetId == cfgAmountAssetId))
12301228 then calcCurrentDLp(toBigInt(pmtAmt), toBigInt(0), toBigInt(0))
12311229 else calcCurrentDLp(toBigInt(0), toBigInt(pmtAmt), toBigInt(0))
12321230 if ((currentDLp == currentDLp))
12331231 then {
1234- let $t04394544103 = calcPutOneTkn(pmtAmt, pmtAssetId, toString(userAddress), toBase58String(i.transactionId), true)
1235- if (($t04394544103 == $t04394544103))
1232+ let $t04392944087 = calcPutOneTkn(pmtAmt, pmtAssetId, toString(userAddress), toBase58String(i.transactionId), true)
1233+ if (($t04392944087 == $t04392944087))
12361234 then {
1237- let feeAmount = $t04394544103._3
1238- let state = $t04394544103._2
1239- let estimLP = $t04394544103._1
1235+ let feeAmount = $t04392944087._3
1236+ let state = $t04392944087._2
1237+ let estimLP = $t04392944087._1
12401238 let emitLpAmt = if (if ((minOutAmount > 0))
12411239 then (minOutAmount > estimLP)
12421240 else false)
12431241 then throwErr(makeString(["amount to receive is less than ", toString(minOutAmount)], ""))
12441242 else estimLP
12451243 let e = invoke(fca, "emit", [emitLpAmt], nil)
12461244 if ((e == e))
12471245 then {
12481246 let el = match e {
12491247 case legacy: Address =>
12501248 invoke(legacy, "emit", [emitLpAmt], nil)
12511249 case _ =>
12521250 unit
12531251 }
12541252 if ((el == el))
12551253 then {
12561254 let lpTrnsfr = if (autoStake)
12571255 then {
12581256 let ss = invoke(stakingContract, "stakeFor", [toString(i.caller)], [AttachedPayment(lpId, emitLpAmt)])
12591257 if ((ss == ss))
12601258 then nil
12611259 else throw("Strict value is not equal to itself.")
12621260 }
12631261 else [ScriptTransfer(i.caller, emitLpAmt, lpId)]
12641262 let sendFeeToMatcher = if ((feeAmount > 0))
12651263 then [ScriptTransfer(feeCollectorAddress, feeAmount, fromBase58String(pmtAssetId))]
12661264 else nil
1267- let $t04498845337 = if ((this == feeCollectorAddress))
1265+ let $t04497245321 = if ((this == feeCollectorAddress))
12681266 then $Tuple2(0, 0)
12691267 else {
12701268 let paymentInAmountAsset = if ((pmt.assetId == cfgAmountAssetId))
12711269 then true
12721270 else false
12731271 if (paymentInAmountAsset)
12741272 then $Tuple2(-(feeAmount), 0)
12751273 else $Tuple2(0, -(feeAmount))
12761274 }
1277- let amountAssetBalanceDelta = $t04498845337._1
1278- let priceAssetBalanceDelta = $t04498845337._2
1279- let $t04534045448 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
1280- let refreshDLpActions = $t04534045448._1
1281- let updatedDLp = $t04534045448._2
1275+ let amountAssetBalanceDelta = $t04497245321._1
1276+ let priceAssetBalanceDelta = $t04497245321._2
1277+ let $t04532445432 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
1278+ let refreshDLpActions = $t04532445432._1
1279+ let updatedDLp = $t04532445432._2
12821280 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
12831281 if ((isUpdatedDLpValid == isUpdatedDLpValid))
12841282 then $Tuple2((((state ++ lpTrnsfr) ++ sendFeeToMatcher) ++ refreshDLpActions), emitLpAmt)
12851283 else throw("Strict value is not equal to itself.")
12861284 }
12871285 else throw("Strict value is not equal to itself.")
12881286 }
12891287 else throw("Strict value is not equal to itself.")
12901288 }
12911289 else throw("Strict value is not equal to itself.")
12921290 }
12931291 else throw("Strict value is not equal to itself.")
12941292 }
12951293 else throw("Strict value is not equal to itself.")
12961294 }
12971295
12981296
12991297
13001298 @Callable(i)
13011299 func putForFree (maxSlpg) = if ((0 > maxSlpg))
13021300 then throw("Wrong slpg")
13031301 else if ((size(i.payments) != 2))
13041302 then throw("2 pmnts expd")
13051303 else {
13061304 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, "")
13071305 let state = estPut._9
13081306 let amAssetPmt = toBigInt(value(i.payments[0]).amount)
13091307 let prAssetPmt = toBigInt(value(i.payments[1]).amount)
13101308 let currentDLp = calcCurrentDLp(amAssetPmt, prAssetPmt, toBigInt(0))
13111309 if ((currentDLp == currentDLp))
13121310 then {
1313- let $t04647846543 = refreshDLpInternal(0, 0, 0)
1314- let refreshDLpActions = $t04647846543._1
1315- let updatedDLp = $t04647846543._2
1311+ let $t04646246527 = refreshDLpInternal(0, 0, 0)
1312+ let refreshDLpActions = $t04646246527._1
1313+ let updatedDLp = $t04646246527._2
13161314 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
13171315 if ((isUpdatedDLpValid == isUpdatedDLpValid))
13181316 then (state ++ refreshDLpActions)
13191317 else throw("Strict value is not equal to itself.")
13201318 }
13211319 else throw("Strict value is not equal to itself.")
13221320 }
13231321
13241322
13251323
13261324 @Callable(i)
13271325 func get () = {
13281326 let currentDLp = calcCurrentDLp(toBigInt(0), toBigInt(0), toBigInt(0))
13291327 if ((currentDLp == currentDLp))
13301328 then {
13311329 let r = cg(i)
13321330 let outAmtAmt = r._1
13331331 let outPrAmt = r._2
13341332 let pmtAmt = r._3
13351333 let pmtAssetId = r._4
13361334 let state = r._5
13371335 let b = invoke(fca, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
13381336 if ((b == b))
13391337 then {
1340- let $t04771647798 = refreshDLpInternal(-(outAmtAmt), -(outPrAmt), 0)
1341- let refreshDLpActions = $t04771647798._1
1342- let updatedDLp = $t04771647798._2
1338+ let $t04770047782 = refreshDLpInternal(-(outAmtAmt), -(outPrAmt), 0)
1339+ let refreshDLpActions = $t04770047782._1
1340+ let updatedDLp = $t04770047782._2
13431341 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
13441342 if ((isUpdatedDLpValid == isUpdatedDLpValid))
13451343 then (state ++ refreshDLpActions)
13461344 else throw("Strict value is not equal to itself.")
13471345 }
13481346 else throw("Strict value is not equal to itself.")
13491347 }
13501348 else throw("Strict value is not equal to itself.")
13511349 }
13521350
13531351
13541352
13551353 @Callable(i)
13561354 func getOneTknV2 (outAssetId,minOutAmount) = {
13571355 let isPoolOneTokenOperationsDisabled = {
13581356 let @ = invoke(fca, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
13591357 if ($isInstanceOf(@, "Boolean"))
13601358 then @
13611359 else throw(($getType(@) + " couldn't be cast to Boolean"))
13621360 }
13631361 let isGetDisabled = if (if (igs())
13641362 then true
13651363 else (cfgPoolStatus == PoolShutdown))
13661364 then true
13671365 else isPoolOneTokenOperationsDisabled
13681366 let checks = [if (if (!(isGetDisabled))
13691367 then true
13701368 else isManager(i))
13711369 then true
13721370 else throwErr("get operation is blocked by admin"), if ((size(i.payments) == 1))
13731371 then true
13741372 else throwErr("exactly 1 payment are expected")]
13751373 if ((checks == checks))
13761374 then {
1377- let $t04841648571 = getOneTknV2Internal(outAssetId, minOutAmount, i.payments, i.caller, i.originCaller, i.transactionId)
1378- let state = $t04841648571._1
1379- let totalAmount = $t04841648571._2
1375+ let $t04840048555 = getOneTknV2Internal(outAssetId, minOutAmount, i.payments, i.caller, i.originCaller, i.transactionId)
1376+ let state = $t04840048555._1
1377+ let totalAmount = $t04840048555._2
13801378 $Tuple2(state, totalAmount)
13811379 }
13821380 else throw("Strict value is not equal to itself.")
13831381 }
13841382
13851383
13861384
13871385 @Callable(i)
13881386 func refreshDLp () = {
13891387 let lastRefreshedBlockHeight = valueOrElse(getInteger(keyDLpRefreshedHeight), 0)
13901388 let checkLastRefreshedBlockHeight = if (((height - lastRefreshedBlockHeight) >= dLpRefreshDelay))
13911389 then unit
13921390 else throwErr(makeString([toString(dLpRefreshDelay), " blocks have not passed since the previous call"], ""))
13931391 if ((checkLastRefreshedBlockHeight == checkLastRefreshedBlockHeight))
13941392 then {
13951393 let dLp = valueOrErrorMessage(parseBigInt(valueOrElse(getString(this, keyDLp), "0")), fmtErr("invalid dLp"))
1396- let $t04909549159 = refreshDLpInternal(0, 0, 0)
1397- let dLpUpdateActions = $t04909549159._1
1398- let updatedDLp = $t04909549159._2
1394+ let $t04907949143 = refreshDLpInternal(0, 0, 0)
1395+ let dLpUpdateActions = $t04907949143._1
1396+ let updatedDLp = $t04907949143._2
13991397 let actions = if ((dLp != updatedDLp))
14001398 then dLpUpdateActions
14011399 else throwErr("nothing to refresh")
14021400 $Tuple2(actions, toString(updatedDLp))
14031401 }
14041402 else throw("Strict value is not equal to itself.")
14051403 }
14061404
14071405
14081406
14091407 @Callable(i)
14101408 func getOneTknV2READONLY (outAssetId,lpAssetAmount) = {
14111409 let amId = toBase58String(value(cfgAmountAssetId))
14121410 let prId = toBase58String(value(cfgPriceAssetId))
14131411 let lpId = toBase58String(value(cfgLpAssetId))
14141412 let xp = [toBigInt(getAccBalance(amId)), toBigInt(getAccBalance(prId))]
14151413 let lpEmission = toBigInt(valueOrErrorMessage(assetInfo(fromBase58String(lpId)), "invalid lp asset").quantity)
14161414 let D0 = getD(xp)
14171415 let D1 = (D0 - fraction(toBigInt(lpAssetAmount), D0, lpEmission))
14181416 let index = if ((outAssetId == amId))
14191417 then 0
14201418 else if ((outAssetId == prId))
14211419 then 1
14221420 else throw("invalid out asset id")
14231421 let newY = getYD(xp, index, D1)
14241422 let dy = (xp[index] - newY)
14251423 let totalGetRaw = max([0, toInt((dy - big1))])
1426- let $t05016950224 = takeFee(totalGetRaw, outFee)
1427- let totalGet = $t05016950224._1
1428- let feeAmount = $t05016950224._2
1424+ let $t05015350208 = takeFee(totalGetRaw, outFee)
1425+ let totalGet = $t05015350208._1
1426+ let feeAmount = $t05015350208._2
14291427 $Tuple2(nil, $Tuple2(totalGet, feeAmount))
14301428 }
14311429
14321430
14331431
14341432 @Callable(i)
14351433 func getOneTknV2WithBonusREADONLY (outAssetId,lpAssetAmount) = {
14361434 let amId = toBase58String(value(cfgAmountAssetId))
14371435 let prId = toBase58String(value(cfgPriceAssetId))
14381436 let lpId = toBase58String(value(cfgLpAssetId))
14391437 let amBalance = getAccBalance(amId)
14401438 let prBalance = getAccBalance(prId)
1441- let $t05059950714 = {
1439+ let $t05058350698 = {
14421440 let @ = invoke(this, "getOneTknV2READONLY", [outAssetId, lpAssetAmount], nil)
14431441 if ($isInstanceOf(@, "(Int, Int)"))
14441442 then @
14451443 else throw(($getType(@) + " couldn't be cast to (Int, Int)"))
14461444 }
1447- let totalGet = $t05059950714._1
1448- let feeAmount = $t05059950714._2
1445+ let totalGet = $t05058350698._1
1446+ let feeAmount = $t05058350698._2
14491447 let r = ego("", lpId, lpAssetAmount, this)
14501448 let outAmAmt = r._1
14511449 let outPrAmt = r._2
14521450 let sumOfGetAssets = (outAmAmt + outPrAmt)
14531451 let bonus = if ((sumOfGetAssets == 0))
14541452 then if ((totalGet == 0))
14551453 then 0
14561454 else throw("bonus calculation error")
14571455 else fraction((totalGet - sumOfGetAssets), scale8, sumOfGetAssets)
14581456 $Tuple2(nil, $Tuple3(totalGet, feeAmount, bonus))
14591457 }
14601458
14611459
14621460
14631461 @Callable(i)
14641462 func getNoLess (noLessThenAmtAsset,noLessThenPriceAsset) = {
14651463 let r = cg(i)
14661464 let outAmAmt = r._1
14671465 let outPrAmt = r._2
14681466 let pmtAmt = r._3
14691467 let pmtAssetId = r._4
14701468 let state = r._5
14711469 if ((noLessThenAmtAsset > outAmAmt))
14721470 then throw(((("Failed: " + toString(outAmAmt)) + " < ") + toString(noLessThenAmtAsset)))
14731471 else if ((noLessThenPriceAsset > outPrAmt))
14741472 then throw(((("Failed: " + toString(outPrAmt)) + " < ") + toString(noLessThenPriceAsset)))
14751473 else {
14761474 let currentDLp = calcCurrentDLp(toBigInt(0), toBigInt(0), toBigInt(0))
14771475 if ((currentDLp == currentDLp))
14781476 then {
14791477 let burnLPAssetOnFactory = invoke(fca, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
14801478 if ((burnLPAssetOnFactory == burnLPAssetOnFactory))
14811479 then {
1482- let $t05188051961 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1483- let refreshDLpActions = $t05188051961._1
1484- let updatedDLp = $t05188051961._2
1480+ let $t05186451945 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1481+ let refreshDLpActions = $t05186451945._1
1482+ let updatedDLp = $t05186451945._2
14851483 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
14861484 if ((isUpdatedDLpValid == isUpdatedDLpValid))
14871485 then (state ++ refreshDLpActions)
14881486 else throw("Strict value is not equal to itself.")
14891487 }
14901488 else throw("Strict value is not equal to itself.")
14911489 }
14921490 else throw("Strict value is not equal to itself.")
14931491 }
14941492 }
14951493
14961494
14971495
14981496 @Callable(i)
14991497 func unstakeAndGet (amount) = {
15001498 let checkPayments = if ((size(i.payments) != 0))
15011499 then throw("No pmnts expd")
15021500 else true
15031501 if ((checkPayments == checkPayments))
15041502 then {
15051503 let factoryCfg = gfc()
15061504 let lpAssetId = cfgLpAssetId
15071505 let staking = valueOrErrorMessage(addressFromString(factoryCfg[idxFactStakCntr]), "Wr st addr")
15081506 let currentDLp = calcCurrentDLp(toBigInt(0), toBigInt(0), toBigInt(0))
15091507 if ((currentDLp == currentDLp))
15101508 then {
15111509 let unstakeInv = invoke(staking, "unstake", [toBase58String(lpAssetId), amount], nil)
15121510 if ((unstakeInv == unstakeInv))
15131511 then {
15141512 let r = ego(toBase58String(i.transactionId), toBase58String(lpAssetId), amount, i.caller)
15151513 let outAmAmt = r._1
15161514 let outPrAmt = r._2
15171515 let sts = parseIntValue(r._9)
15181516 let state = r._10
15191517 let v = if (if (igs())
15201518 then true
15211519 else (sts == PoolShutdown))
15221520 then throw(("Blocked: " + toString(sts)))
15231521 else true
15241522 if ((v == v))
15251523 then {
15261524 let burnA = invoke(fca, "burn", [amount], [AttachedPayment(lpAssetId, amount)])
15271525 if ((burnA == burnA))
15281526 then {
1529- let $t05298853069 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1530- let refreshDLpActions = $t05298853069._1
1531- let updatedDLp = $t05298853069._2
1527+ let $t05297253053 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1528+ let refreshDLpActions = $t05297253053._1
1529+ let updatedDLp = $t05297253053._2
15321530 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
15331531 if ((isUpdatedDLpValid == isUpdatedDLpValid))
15341532 then (state ++ refreshDLpActions)
15351533 else throw("Strict value is not equal to itself.")
15361534 }
15371535 else throw("Strict value is not equal to itself.")
15381536 }
15391537 else throw("Strict value is not equal to itself.")
15401538 }
15411539 else throw("Strict value is not equal to itself.")
15421540 }
15431541 else throw("Strict value is not equal to itself.")
15441542 }
15451543 else throw("Strict value is not equal to itself.")
15461544 }
15471545
15481546
15491547
15501548 @Callable(i)
15511549 func unstakeAndGetNoLess (unstakeAmount,noLessThenAmountAsset,noLessThenPriceAsset) = {
15521550 let isGetDisabled = if (igs())
15531551 then true
15541552 else (cfgPoolStatus == PoolShutdown)
15551553 let checks = [if (!(isGetDisabled))
15561554 then true
15571555 else throw("get operation is blocked by admin"), if ((size(i.payments) == 0))
15581556 then true
15591557 else throw("no payments are expected")]
15601558 if ((checks == checks))
15611559 then {
15621560 let currentDLp = calcCurrentDLp(toBigInt(0), toBigInt(0), toBigInt(0))
15631561 if ((currentDLp == currentDLp))
15641562 then {
15651563 let unstakeInv = invoke(stakingContract, "unstake", [toBase58String(cfgLpAssetId), unstakeAmount], nil)
15661564 if ((unstakeInv == unstakeInv))
15671565 then {
15681566 let res = ego(toBase58String(i.transactionId), toBase58String(cfgLpAssetId), unstakeAmount, i.caller)
15691567 let outAmAmt = res._1
15701568 let outPrAmt = res._2
15711569 let state = res._10
15721570 let checkAmounts = [if ((outAmAmt >= noLessThenAmountAsset))
15731571 then true
15741572 else throw(makeString(["amount asset amount to receive is less than ", toString(noLessThenAmountAsset)], "")), if ((outPrAmt >= noLessThenPriceAsset))
15751573 then true
15761574 else throw(makeString(["price asset amount to receive is less than ", toString(noLessThenPriceAsset)], ""))]
15771575 if ((checkAmounts == checkAmounts))
15781576 then {
15791577 let burnLPAssetOnFactory = invoke(fca, "burn", [unstakeAmount], [AttachedPayment(cfgLpAssetId, unstakeAmount)])
15801578 if ((burnLPAssetOnFactory == burnLPAssetOnFactory))
15811579 then {
1582- let $t05432054401 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1583- let refreshDLpActions = $t05432054401._1
1584- let updatedDLp = $t05432054401._2
1580+ let $t05430454385 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1581+ let refreshDLpActions = $t05430454385._1
1582+ let updatedDLp = $t05430454385._2
15851583 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
15861584 if ((isUpdatedDLpValid == isUpdatedDLpValid))
15871585 then (state ++ refreshDLpActions)
15881586 else throw("Strict value is not equal to itself.")
15891587 }
15901588 else throw("Strict value is not equal to itself.")
15911589 }
15921590 else throw("Strict value is not equal to itself.")
15931591 }
15941592 else throw("Strict value is not equal to itself.")
15951593 }
15961594 else throw("Strict value is not equal to itself.")
15971595 }
15981596 else throw("Strict value is not equal to itself.")
15991597 }
16001598
16011599
16021600
16031601 @Callable(i)
16041602 func unstakeAndGetOneTknV2 (unstakeAmount,outAssetId,minOutAmount) = {
16051603 let isPoolOneTokenOperationsDisabled = {
16061604 let @ = invoke(fca, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
16071605 if ($isInstanceOf(@, "Boolean"))
16081606 then @
16091607 else throw(($getType(@) + " couldn't be cast to Boolean"))
16101608 }
16111609 let isGetDisabled = if (if (igs())
16121610 then true
16131611 else (cfgPoolStatus == PoolShutdown))
16141612 then true
16151613 else isPoolOneTokenOperationsDisabled
16161614 let checks = [if (if (!(isGetDisabled))
16171615 then true
16181616 else isManager(i))
16191617 then true
16201618 else throwErr("get operation is blocked by admin"), if ((size(i.payments) == 0))
16211619 then true
16221620 else throwErr("no payments are expected")]
16231621 if ((checks == checks))
16241622 then {
16251623 let factoryCfg = gfc()
16261624 let lpAssetId = cfgLpAssetId
16271625 let staking = valueOrErrorMessage(addressFromString(factoryCfg[idxFactStakCntr]), "Wr st addr")
16281626 let userAddress = i.caller
16291627 let lpAssetRecipientAddress = this
16301628 let unstakeInv = invoke(staking, "unstakeINTERNAL", [lpAssetId, unstakeAmount, userAddress.bytes, lpAssetRecipientAddress.bytes], nil)
16311629 if ((unstakeInv == unstakeInv))
16321630 then {
1633- let $t05542355611 = getOneTknV2Internal(outAssetId, minOutAmount, [AttachedPayment(lpAssetId, unstakeAmount)], i.caller, i.originCaller, i.transactionId)
1634- let state = $t05542355611._1
1635- let totalAmount = $t05542355611._2
1631+ let $t05540755595 = getOneTknV2Internal(outAssetId, minOutAmount, [AttachedPayment(lpAssetId, unstakeAmount)], i.caller, i.originCaller, i.transactionId)
1632+ let state = $t05540755595._1
1633+ let totalAmount = $t05540755595._2
16361634 $Tuple2(state, totalAmount)
16371635 }
16381636 else throw("Strict value is not equal to itself.")
16391637 }
16401638 else throw("Strict value is not equal to itself.")
16411639 }
16421640
16431641
16441642
16451643 @Callable(i)
16461644 func putOneTknV2WithBonusREADONLY (paymentAmountRaw,paymentAssetId) = {
1647- let $t05573955842 = calcPutOneTkn(paymentAmountRaw, paymentAssetId, "", "", true)
1648- let lpAmount = $t05573955842._1
1649- let state = $t05573955842._2
1650- let feeAmount = $t05573955842._3
1651- let bonus = $t05573955842._4
1645+ let $t05572355826 = calcPutOneTkn(paymentAmountRaw, paymentAssetId, "", "", true)
1646+ let lpAmount = $t05572355826._1
1647+ let state = $t05572355826._2
1648+ let feeAmount = $t05572355826._3
1649+ let bonus = $t05572355826._4
16521650 $Tuple2(nil, $Tuple3(lpAmount, feeAmount, bonus))
16531651 }
16541652
16551653
16561654
16571655 @Callable(i)
16581656 func putOneTknV2WithoutTakeFeeREADONLY (paymentAmountRaw,paymentAssetId) = {
1659- let $t05599056094 = calcPutOneTkn(paymentAmountRaw, paymentAssetId, "", "", false)
1660- let lpAmount = $t05599056094._1
1661- let state = $t05599056094._2
1662- let feeAmount = $t05599056094._3
1663- let bonus = $t05599056094._4
1657+ let $t05597456078 = calcPutOneTkn(paymentAmountRaw, paymentAssetId, "", "", false)
1658+ let lpAmount = $t05597456078._1
1659+ let state = $t05597456078._2
1660+ let feeAmount = $t05597456078._3
1661+ let bonus = $t05597456078._4
16641662 $Tuple2(nil, $Tuple3(lpAmount, feeAmount, bonus))
16651663 }
16661664
16671665
16681666
16691667 @Callable(i)
16701668 func activate (amtAsStr,prAsStr) = if ((toString(i.caller) != toString(fca)))
16711669 then throw("denied")
16721670 else $Tuple2([StringEntry(aa(), amtAsStr), StringEntry(pa(), prAsStr)], "success")
16731671
16741672
16751673
16761674 @Callable(i)
16771675 func getPoolConfigWrapperREADONLY () = $Tuple2(nil, gpc())
16781676
16791677
16801678
16811679 @Callable(i)
16821680 func getAccBalanceWrapperREADONLY (assetId) = $Tuple2(nil, getAccBalance(assetId))
16831681
16841682
16851683
16861684 @Callable(i)
16871685 func calcPricesWrapperREADONLY (amAmt,prAmt,lpAmt) = {
16881686 let pr = calcPrices(amAmt, prAmt, lpAmt)
16891687 $Tuple2(nil, [toString(pr[0]), toString(pr[1]), toString(pr[2])])
16901688 }
16911689
16921690
16931691
16941692 @Callable(i)
16951693 func fromX18WrapperREADONLY (val,resScaleMult) = $Tuple2(nil, f1(parseBigIntValue(val), resScaleMult))
16961694
16971695
16981696
16991697 @Callable(i)
17001698 func toX18WrapperREADONLY (origVal,origScaleMult) = $Tuple2(nil, toString(t1(origVal, origScaleMult)))
17011699
17021700
17031701
17041702 @Callable(i)
17051703 func calcPriceBigIntWrapperREADONLY (prAmtX18,amAmtX18) = $Tuple2(nil, toString(cpbi(parseBigIntValue(prAmtX18), parseBigIntValue(amAmtX18))))
17061704
17071705
17081706
17091707 @Callable(i)
17101708 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, ""))
17111709
17121710
17131711
17141712 @Callable(i)
17151713 func estimateGetOperationWrapperREADONLY (txId58,pmtAsId,pmtLpAmt,usrAddr) = {
17161714 let r = ego(txId58, pmtAsId, pmtLpAmt, addressFromStringValue(usrAddr))
17171715 $Tuple2(nil, $Tuple10(r._1, r._2, r._3, r._4, r._5, r._6, r._7, toString(r._8), r._9, r._10))
17181716 }
17191717
17201718
17211719
17221720 @Callable(i)
17231721 func changeAmp () = {
17241722 let cfg = invoke(fca, "getChangeAmpConfigREADONLY", [toString(this)], nil)
1725- let $t05844858647 = match cfg {
1723+ let $t05843258631 = match cfg {
17261724 case list: List[Any] =>
17271725 $Tuple3({
17281726 let @ = list[0]
17291727 if ($isInstanceOf(@, "Int"))
17301728 then @
17311729 else throw(($getType(@) + " couldn't be cast to Int"))
17321730 }, {
17331731 let @ = list[1]
17341732 if ($isInstanceOf(@, "Int"))
17351733 then @
17361734 else throw(($getType(@) + " couldn't be cast to Int"))
17371735 }, {
17381736 let @ = list[2]
17391737 if ($isInstanceOf(@, "Int"))
17401738 then @
17411739 else throw(($getType(@) + " couldn't be cast to Int"))
17421740 })
17431741 case _ =>
17441742 throwErr("invalid entry type")
17451743 }
1746- let delay = $t05844858647._1
1747- let delta = $t05844858647._2
1748- let target = $t05844858647._3
1744+ let delay = $t05843258631._1
1745+ let delta = $t05843258631._2
1746+ let target = $t05843258631._3
17491747 let curAmp = parseIntValue(getStringValue(amp()))
17501748 let newAmpRaw = (curAmp + delta)
17511749 let newAmp = if ((0 > delta))
17521750 then if ((target > newAmpRaw))
17531751 then target
17541752 else newAmpRaw
17551753 else if ((newAmpRaw > target))
17561754 then target
17571755 else newAmpRaw
17581756 let lastCall = valueOrElse(getInteger(keyChangeAmpLastCall()), 0)
17591757 let wait = (lastCall + delay)
17601758 let checks = [if ((height > wait))
17611759 then true
17621760 else throwErr("try again in few blocks"), if ((curAmp != newAmp))
17631761 then true
17641762 else throwErr("already reached target")]
17651763 if ((checks == checks))
17661764 then [IntegerEntry(keyChangeAmpLastCall(), height), StringEntry(amp(), toString(newAmp)), StringEntry(keyAmpHistory(height), toString(newAmp))]
17671765 else throw("Strict value is not equal to itself.")
17681766 }
17691767
17701768
17711769 @Verifier(tx)
17721770 func verify () = {
17731771 let targetPublicKey = match m() {
17741772 case pk: ByteVector =>
17751773 pk
17761774 case _: Unit =>
17771775 tx.senderPublicKey
17781776 case _ =>
17791777 throw("Match error")
17801778 }
17811779 match tx {
17821780 case order: Order =>
17831781 let matcherPub = mp()
1784- let $t05955959676 = if (skipOrderValidation())
1782+ let $t05954359660 = if (skipOrderValidation())
17851783 then $Tuple2(true, "")
17861784 else validateMatcherOrderAllowed(order)
1787- let orderValid = $t05955959676._1
1788- let orderValidInfo = $t05955959676._2
1785+ let orderValid = $t05954359660._1
1786+ let orderValidInfo = $t05954359660._2
17891787 let senderValid = sigVerify(order.bodyBytes, order.proofs[0], order.senderPublicKey)
17901788 let matcherValid = sigVerify(order.bodyBytes, order.proofs[1], matcherPub)
17911789 if (if (if (orderValid)
17921790 then senderValid
17931791 else false)
17941792 then matcherValid
17951793 else false)
17961794 then true
17971795 else throwOrderError(orderValid, orderValidInfo, senderValid, matcherValid)
17981796 case s: SetScriptTransaction =>
17991797 if (sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey))
18001798 then true
18011799 else {
18021800 let newHash = blake2b256(value(s.script))
18031801 let allowedHash = fromBase64String(value(getString(fca, keyAllowedLpStableScriptHash())))
18041802 let currentHash = scriptHash(this)
18051803 if ((allowedHash == newHash))
18061804 then (currentHash != newHash)
18071805 else false
18081806 }
18091807 case _ =>
18101808 sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey)
18111809 }
18121810 }
18131811

github/deemru/w8io/026f985 
250.64 ms