tx · ExGc3NgbitCdkWmd3LQDw56uxJcgkdic1PkSm1TXZ8mH

3NAefciWv6f9fWvEXdGgpHfanJFG8HqfjuT:  -0.04100000 Waves

2023.05.02 09:52 [2559808] smart account 3NAefciWv6f9fWvEXdGgpHfanJFG8HqfjuT > SELF 0.00000000 Waves

{ "type": 13, "id": "ExGc3NgbitCdkWmd3LQDw56uxJcgkdic1PkSm1TXZ8mH", "fee": 4100000, "feeAssetId": null, "timestamp": 1683010358922, "version": 2, "chainId": 84, "sender": "3NAefciWv6f9fWvEXdGgpHfanJFG8HqfjuT", "senderPublicKey": "D1BL65meykxFZTCuq7jq9HSGLLnWvQamQPUNrguW5w39", "proofs": [ "5H3sighgHLmHtB6yyGDVeBPbqjNTnikupqgeWU35HDff4Niwu4LyU8neqfDVPCoYowFyzRnATRe8c5u2ANF7cEuD" ], "script": "base64:BgK+LAgCEgUKAwEEARIHCgUBBAEIARIDCgEIEgMKAQgSABIECgIBBBIECgIBBBIDCgEBEgASBAoCCAESABIECgIIARIECgIIARIECgIBARIDCgEBEgUKAwEBARIFCgMBCAESBAoCAQgSBAoCAQgSBAoCCAgSABIDCgEIEgUKAwEBARIECgIIARIECgIBARIECgIICBILCgkIAQECAQIIBAQSBgoECAgBCBIAIgR0ZXN0IgZzY2FsZTgiDHNjYWxlOEJpZ0ludCIHc2NhbGUxOCIKemVyb0JpZ0ludCIEYmlnMCIEYmlnMSIEYmlnMiIEYmlnMyIEYmlnNCIKc2xpcHBhZ2U0RCILd2F2ZXNTdHJpbmciBUFtdWx0IgVEY29udiIDU0VQIgVFTVBUWSIKUG9vbEFjdGl2ZSIKUG9vbFB1dERpcyIOUG9vbE1hdGNoZXJEaXMiDFBvb2xTaHV0ZG93biIOaWR4UG9vbEFkZHJlc3MiCWlkeFBvb2xTdCIJaWR4TFBBc0lkIglpZHhBbUFzSWQiCWlkeFByQXNJZCILaWR4QW10QXNEY20iDWlkeFByaWNlQXNEY20iC2lkeElBbXRBc0lkIg1pZHhJUHJ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rrPNy9SPnyTtYTkFb66Jk4 Diff:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
4+let test = true
5+
46 let scale8 = 100000000
57
68 let scale8BigInt = toBigInt(100000000)
131133 func keyAmpHistory (heightBlocks) = ("%s%d__amp__" + toString(heightBlocks))
132134
133135
134-func ada () = "%s__addonAddr"
135-
136-
137136 func keyChangeAmpLastCall () = "%s__changeAmpLastCall"
138137
139138
240239
241240 let poolConfigParsed = parsePoolConfig(gpc())
242241
243-let $t081948423 = poolConfigParsed
242+let $t081818410 = poolConfigParsed
244243
245-let cfgPoolAddress = $t081948423._1
244+let cfgPoolAddress = $t081818410._1
246245
247-let cfgPoolStatus = $t081948423._2
246+let cfgPoolStatus = $t081818410._2
248247
249-let cfgLpAssetId = $t081948423._3
248+let cfgLpAssetId = $t081818410._3
250249
251-let cfgAmountAssetId = $t081948423._4
250+let cfgAmountAssetId = $t081818410._4
252251
253-let cfgPriceAssetId = $t081948423._5
252+let cfgPriceAssetId = $t081818410._5
254253
255-let cfgAmountAssetDecimals = $t081948423._6
254+let cfgAmountAssetDecimals = $t081818410._6
256255
257-let cfgPriceAssetDecimals = $t081948423._7
256+let cfgPriceAssetDecimals = $t081818410._7
258257
259-let cfgInAmountAssedId = $t081948423._8
258+let cfgInAmountAssedId = $t081818410._8
260259
261-let cfgInPriceAssetId = $t081948423._9
260+let cfgInPriceAssetId = $t081818410._9
262261
263262 func gfc () = split(strf(fca, fcfg()), SEP)
264263
379378 }
380379
381380 let arr = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16]
382- let $t01292812976 = {
381+ let $t01291512963 = {
383382 let $l = arr
384383 let $s = size($l)
385384 let $acc0 = $Tuple2(s, false)
393392
394393 $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)
395394 }
396- let d = $t01292812976._1
397- let found = $t01292812976._2
395+ let d = $t01291512963._1
396+ let found = $t01291512963._2
398397 if (found)
399398 then d
400399 else throw(("D calculation error, D = " + toString(d)))
530529 else calcLpAmt
531530 let amDiff = (inAmAmt - calcAmAssetPmt)
532531 let prDiff = (inPrAmt - calcPrAssetPmt)
533- let $t02081521160 = if (if (isOneAsset)
532+ let $t02080221147 = if (if (isOneAsset)
534533 then (pmtId == amIdStr)
535534 else false)
536535 then $Tuple2(pmtAmt, 0)
539538 else false)
540539 then $Tuple2(0, pmtAmt)
541540 else $Tuple2(calcAmAssetPmt, calcPrAssetPmt)
542- let writeAmAmt = $t02081521160._1
543- let writePrAmt = $t02081521160._2
541+ let writeAmAmt = $t02080221147._1
542+ let writePrAmt = $t02080221147._2
544543 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))]
545544 $Tuple13(calcLpAmt, emitLpAmt, curPrice, amBalance, prBalance, lpEm, lpId, sts, commonState, amDiff, prDiff, inAmId, inPrId)
546545 }
559558 let c = (((((D * D) / (x * n)) * D) * aPrecision) / (ann * n))
560559 let b = ((s + ((D * aPrecision) / ann)) - D)
561560 func calc (acc,cur) = {
562- let $t02235522375 = acc
563- let y = $t02235522375._1
564- let found = $t02235522375._2
561+ let $t02234222362 = acc
562+ let y = $t02234222362._1
563+ let found = $t02234222362._2
565564 if ((found != unit))
566565 then acc
567566 else {
574573 }
575574
576575 let arr = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
577- let $t02268222729 = {
576+ let $t02266922716 = {
578577 let $l = arr
579578 let $s = size($l)
580579 let $acc0 = $Tuple2(D, unit)
588587
589588 $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)
590589 }
591- let y = $t02268222729._1
592- let found = $t02268222729._2
590+ let y = $t02266922716._1
591+ let found = $t02266922716._2
593592 if ((found != unit))
594593 then y
595594 else throw(("Y calculation error, Y = " + toString(y)))
633632 let priceAssetBalance = getAccBalance(assetIdToString(cfgPriceAssetId))
634633 let amountAssetAmount = order.amount
635634 let priceAssetAmount = fraction(order.amount, order.price, scale8, FLOOR)
636- let $t02492725139 = if ((order.orderType == Buy))
635+ let $t02491425126 = if ((order.orderType == Buy))
637636 then $Tuple2(amountAssetAmount, -(priceAssetAmount))
638637 else $Tuple2(-(amountAssetAmount), priceAssetAmount)
639- let amountAssetBalanceDelta = $t02492725139._1
640- let priceAssetBalanceDelta = $t02492725139._2
638+ let amountAssetBalanceDelta = $t02491425126._1
639+ let priceAssetBalanceDelta = $t02491425126._2
641640 if (if (if (igs())
642641 then true
643642 else (cfgPoolStatus == PoolMatcherDis))
650649 then throw("Wr assets")
651650 else {
652651 let dLp = parseBigIntValue(valueOrElse(getString(this, keyDLp), "0"))
653- let $t02548125581 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
654- let unusedActions = $t02548125581._1
655- let dLpNew = $t02548125581._2
652+ let $t02546825568 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
653+ let unusedActions = $t02546825568._1
654+ let dLpNew = $t02546825568._2
656655 let isOrderValid = (dLpNew >= dLp)
657656 let info = makeString(["dLp=", toString(dLp), " dLpNew=", toString(dLpNew), " amountAssetBalance=", toString(amountAssetBalance), " priceAssetBalance=", toString(priceAssetBalance), " amountAssetBalanceDelta=", toString(amountAssetBalanceDelta), " priceAssetBalanceDelta=", toString(priceAssetBalanceDelta), " height=", toString(height)], "")
658657 $Tuple2(isOrderValid, info)
706705 then {
707706 let amBalance = getAccBalance(amId)
708707 let prBalance = getAccBalance(prId)
709- let $t02823728699 = if ((txId == ""))
708+ let $t02822428686 = if ((txId == ""))
710709 then $Tuple2(amBalance, prBalance)
711710 else if ((pmtAssetId == amId))
712711 then if ((pmtAmtRaw > amBalance))
717716 then throw("invalid payment amount")
718717 else $Tuple2(amBalance, (prBalance - pmtAmtRaw))
719718 else throw("wrong pmtAssetId")
720- let amBalanceOld = $t02823728699._1
721- let prBalanceOld = $t02823728699._2
722- let $t02870528881 = if ((pmtAssetId == amId))
719+ let amBalanceOld = $t02822428686._1
720+ let prBalanceOld = $t02822428686._2
721+ let $t02869228868 = if ((pmtAssetId == amId))
723722 then $Tuple2(pmtAmtRaw, 0)
724723 else if ((pmtAssetId == prId))
725724 then $Tuple2(0, pmtAmtRaw)
726725 else throw("invalid payment")
727- let amAmountRaw = $t02870528881._1
728- let prAmountRaw = $t02870528881._2
729- let $t02888529139 = if (withTakeFee)
726+ let amAmountRaw = $t02869228868._1
727+ let prAmountRaw = $t02869228868._2
728+ let $t02887229126 = if (withTakeFee)
730729 then $Tuple3(takeFee(amAmountRaw, inFee)._1, takeFee(prAmountRaw, inFee)._1, takeFee(pmtAmtRaw, inFee)._2)
731730 else $Tuple3(amAmountRaw, prAmountRaw, 0)
732- let amAmount = $t02888529139._1
733- let prAmount = $t02888529139._2
734- let feeAmount = $t02888529139._3
731+ let amAmount = $t02887229126._1
732+ let prAmount = $t02887229126._2
733+ let feeAmount = $t02887229126._3
735734 let amBalanceNew = (amBalanceOld + amAmount)
736735 let prBalanceNew = (prBalanceOld + prAmount)
737736 let D0 = getD([t1(amBalanceOld, cfgAmountAssetDecimals), t1(prBalanceOld, cfgPriceAssetDecimals)])
779778 else {
780779 let amBalance = getAccBalance(amId)
781780 let prBalance = getAccBalance(prId)
782- let $t03125131362 = {
781+ let $t03123831349 = {
783782 let @ = invoke(this, "getOneTknV2READONLY", [outAssetId, pmtAmt], nil)
784783 if ($isInstanceOf(@, "(Int, Int)"))
785784 then @
786785 else throw(($getType(@) + " couldn't be cast to (Int, Int)"))
787786 }
788- if (($t03125131362 == $t03125131362))
787+ if (($t03123831349 == $t03123831349))
789788 then {
790- let feeAmount = $t03125131362._2
791- let totalGet = $t03125131362._1
789+ let feeAmount = $t03123831349._2
790+ let totalGet = $t03123831349._1
792791 let totalAmount = if (if ((minOutAmount > 0))
793792 then (minOutAmount > totalGet)
794793 else false)
795794 then throwErr(makeString(["amount to receive is less than ", toString(minOutAmount)], ""))
796795 else totalGet
797- let $t03155231859 = if ((outAssetId == amId))
796+ let $t03153931846 = if ((outAssetId == amId))
798797 then $Tuple4(totalAmount, 0, ((amBalance - totalAmount) - feeAmount), prBalance)
799798 else if ((outAssetId == prId))
800799 then $Tuple4(0, totalAmount, amBalance, ((prBalance - totalAmount) - feeAmount))
801800 else throw("invalid out asset id")
802- let outAm = $t03155231859._1
803- let outPr = $t03155231859._2
804- let amBalanceNew = $t03155231859._3
805- let prBalanceNew = $t03155231859._4
801+ let outAm = $t03153931846._1
802+ let outPr = $t03153931846._2
803+ let amBalanceNew = $t03153931846._3
804+ let prBalanceNew = $t03153931846._4
806805 let curPrX18 = cpbi(t1(prBalanceNew, prDecimals), t1(amBalanceNew, amDecimals))
807806 let curPr = f1(curPrX18, scale8)
808807 let outAssetIdOrWaves = if ((outAssetId == "WAVES"))
817816 let burn = invoke(fca, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
818817 if ((burn == burn))
819818 then {
820- let $t03264432994 = {
819+ let $t03263132981 = {
821820 let feeAmountForCalc = if ((this == feeCollectorAddress))
822821 then 0
823822 else feeAmount
828827 then $Tuple2(-((totalGet + feeAmountForCalc)), 0)
829828 else $Tuple2(0, -((totalGet + feeAmountForCalc)))
830829 }
831- let amountAssetBalanceDelta = $t03264432994._1
832- let priceAssetBalanceDelta = $t03264432994._2
833- let $t03299733105 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
834- let refreshDLpActions = $t03299733105._1
835- let updatedDLp = $t03299733105._2
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
836835 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
837836 if ((isUpdatedDLpValid == isUpdatedDLpValid))
838837 then $Tuple2((state ++ refreshDLpActions), totalAmount)
911910 let c = (((((D * D) / (x * n)) * D) * aPrecision) / (ann * n))
912911 let b = ((s + ((D * aPrecision) / ann)) - D)
913912 func calc (acc,cur) = {
914- let $t03455234572 = acc
915- let y = $t03455234572._1
916- let found = $t03455234572._2
913+ let $t03453934559 = acc
914+ let y = $t03453934559._1
915+ let found = $t03453934559._2
917916 if ((found != unit))
918917 then acc
919918 else {
926925 }
927926
928927 let arr = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
929- let $t03490334950 = {
928+ let $t03489034937 = {
930929 let $l = arr
931930 let $s = size($l)
932931 let $acc0 = $Tuple2(D, unit)
940939
941940 $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)
942941 }
943- let y = $t03490334950._1
944- let found = $t03490334950._2
942+ let y = $t03489034937._1
943+ let found = $t03489034937._2
945944 if ((found != unit))
946945 then y
947946 else throw(("Y calculation error, Y = " + toString(y)))
953952
954953 @Callable(i)
955954 func calculateAmountOutForSwapREADONLY (cleanAmountIn,isReverse,feePoolAmount) = {
956- let $t03530235726 = if ((isReverse == false))
955+ let $t03528935713 = if ((isReverse == false))
957956 then {
958957 let assetOut = strf(this, pa())
959958 let poolAmountInBalance = (toBigInt(getAccBalance(strf(this, aa()))) + toBigInt(cleanAmountIn))
964963 let poolAmountInBalance = (toBigInt(getAccBalance(strf(this, pa()))) + toBigInt(cleanAmountIn))
965964 $Tuple2(assetOut, poolAmountInBalance)
966965 }
967- let assetOut = $t03530235726._1
968- let poolAmountInBalance = $t03530235726._2
966+ let assetOut = $t03528935713._1
967+ let poolAmountInBalance = $t03528935713._2
969968 let poolConfig = gpc()
970969 let amId = poolConfig[idxAmAsId]
971970 let prId = poolConfig[idxPrAsId]
10051004 then {
10061005 let pmt = value(i.payments[0])
10071006 let assetIn = assetIdToString(pmt.assetId)
1008- let $t03716237556 = if ((isReverse == false))
1007+ let $t03714937543 = if ((isReverse == false))
10091008 then {
10101009 let assetOut = strf(this, pa())
10111010 let poolAmountInBalance = (getAccBalance(assetIn) - value(i.payments[0]).amount)
10161015 let poolAmountInBalance = (getAccBalance(assetIn) - value(i.payments[0]).amount)
10171016 $Tuple2(assetOut, poolAmountInBalance)
10181017 }
1019- let assetOut = $t03716237556._1
1020- let poolAmountInBalance = $t03716237556._2
1018+ let assetOut = $t03714937543._1
1019+ let poolAmountInBalance = $t03714937543._2
10211020 let poolConfig = gpc()
10221021 let amId = poolConfig[idxAmAsId]
10231022 let prId = poolConfig[idxPrAsId]
11571156 else throw("Strict value is not equal to itself.")
11581157 }
11591158 else [ScriptTransfer(i.caller, emitLpAmt, lpAssetId)]
1160- let $t04217542317 = refreshDLpInternal(0, 0, 0)
1161- let refreshDLpActions = $t04217542317._1
1162- let updatedDLp = $t04217542317._2
1159+ let $t04216242304 = refreshDLpInternal(0, 0, 0)
1160+ let refreshDLpActions = $t04216242304._1
1161+ let updatedDLp = $t04216242304._2
11631162 let check = if ((updatedDLp >= currentDLp))
11641163 then true
11651164 else throwErr(makeString(["updated DLp lower than current DLp", toString(amountAssetBalance), toString(priceAssetBalance), toString(lpAssetEmission), toString(currentDLp), toString(updatedDLp), toString(amDiff), toString(prDiff)], " "))
12321231 else calcCurrentDLp(toBigInt(0), toBigInt(pmtAmt), toBigInt(0))
12331232 if ((currentDLp == currentDLp))
12341233 then {
1235- let $t04395844116 = calcPutOneTkn(pmtAmt, pmtAssetId, toString(userAddress), toBase58String(i.transactionId), true)
1236- if (($t04395844116 == $t04395844116))
1234+ let $t04394544103 = calcPutOneTkn(pmtAmt, pmtAssetId, toString(userAddress), toBase58String(i.transactionId), true)
1235+ if (($t04394544103 == $t04394544103))
12371236 then {
1238- let feeAmount = $t04395844116._3
1239- let state = $t04395844116._2
1240- let estimLP = $t04395844116._1
1237+ let feeAmount = $t04394544103._3
1238+ let state = $t04394544103._2
1239+ let estimLP = $t04394544103._1
12411240 let emitLpAmt = if (if ((minOutAmount > 0))
12421241 then (minOutAmount > estimLP)
12431242 else false)
12651264 let sendFeeToMatcher = if ((feeAmount > 0))
12661265 then [ScriptTransfer(feeCollectorAddress, feeAmount, fromBase58String(pmtAssetId))]
12671266 else nil
1268- let $t04500145350 = if ((this == feeCollectorAddress))
1267+ let $t04498845337 = if ((this == feeCollectorAddress))
12691268 then $Tuple2(0, 0)
12701269 else {
12711270 let paymentInAmountAsset = if ((pmt.assetId == cfgAmountAssetId))
12751274 then $Tuple2(-(feeAmount), 0)
12761275 else $Tuple2(0, -(feeAmount))
12771276 }
1278- let amountAssetBalanceDelta = $t04500145350._1
1279- let priceAssetBalanceDelta = $t04500145350._2
1280- let $t04535345461 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
1281- let refreshDLpActions = $t04535345461._1
1282- let updatedDLp = $t04535345461._2
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
12831282 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
12841283 if ((isUpdatedDLpValid == isUpdatedDLpValid))
12851284 then $Tuple2((((state ++ lpTrnsfr) ++ sendFeeToMatcher) ++ refreshDLpActions), emitLpAmt)
13111310 let currentDLp = calcCurrentDLp(amAssetPmt, prAssetPmt, toBigInt(0))
13121311 if ((currentDLp == currentDLp))
13131312 then {
1314- let $t04649146556 = refreshDLpInternal(0, 0, 0)
1315- let refreshDLpActions = $t04649146556._1
1316- let updatedDLp = $t04649146556._2
1313+ let $t04647846543 = refreshDLpInternal(0, 0, 0)
1314+ let refreshDLpActions = $t04647846543._1
1315+ let updatedDLp = $t04647846543._2
13171316 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
13181317 if ((isUpdatedDLpValid == isUpdatedDLpValid))
13191318 then (state ++ refreshDLpActions)
13381337 let b = invoke(fca, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
13391338 if ((b == b))
13401339 then {
1341- let $t04772947811 = refreshDLpInternal(-(outAmtAmt), -(outPrAmt), 0)
1342- let refreshDLpActions = $t04772947811._1
1343- let updatedDLp = $t04772947811._2
1340+ let $t04771647798 = refreshDLpInternal(-(outAmtAmt), -(outPrAmt), 0)
1341+ let refreshDLpActions = $t04771647798._1
1342+ let updatedDLp = $t04771647798._2
13441343 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
13451344 if ((isUpdatedDLpValid == isUpdatedDLpValid))
13461345 then (state ++ refreshDLpActions)
13751374 else throwErr("exactly 1 payment are expected")]
13761375 if ((checks == checks))
13771376 then {
1378- let $t04842948584 = getOneTknV2Internal(outAssetId, minOutAmount, i.payments, i.caller, i.originCaller, i.transactionId)
1379- let state = $t04842948584._1
1380- let totalAmount = $t04842948584._2
1377+ let $t04841648571 = getOneTknV2Internal(outAssetId, minOutAmount, i.payments, i.caller, i.originCaller, i.transactionId)
1378+ let state = $t04841648571._1
1379+ let totalAmount = $t04841648571._2
13811380 $Tuple2(state, totalAmount)
13821381 }
13831382 else throw("Strict value is not equal to itself.")
13941393 if ((checkLastRefreshedBlockHeight == checkLastRefreshedBlockHeight))
13951394 then {
13961395 let dLp = valueOrErrorMessage(parseBigInt(valueOrElse(getString(this, keyDLp), "0")), fmtErr("invalid dLp"))
1397- let $t04910849172 = refreshDLpInternal(0, 0, 0)
1398- let dLpUpdateActions = $t04910849172._1
1399- let updatedDLp = $t04910849172._2
1396+ let $t04909549159 = refreshDLpInternal(0, 0, 0)
1397+ let dLpUpdateActions = $t04909549159._1
1398+ let updatedDLp = $t04909549159._2
14001399 let actions = if ((dLp != updatedDLp))
14011400 then dLpUpdateActions
14021401 else throwErr("nothing to refresh")
14241423 let newY = getYD(xp, index, D1)
14251424 let dy = (xp[index] - newY)
14261425 let totalGetRaw = max([0, toInt((dy - big1))])
1427- let $t05018250237 = takeFee(totalGetRaw, outFee)
1428- let totalGet = $t05018250237._1
1429- let feeAmount = $t05018250237._2
1426+ let $t05016950224 = takeFee(totalGetRaw, outFee)
1427+ let totalGet = $t05016950224._1
1428+ let feeAmount = $t05016950224._2
14301429 $Tuple2(nil, $Tuple2(totalGet, feeAmount))
14311430 }
14321431
14391438 let lpId = toBase58String(value(cfgLpAssetId))
14401439 let amBalance = getAccBalance(amId)
14411440 let prBalance = getAccBalance(prId)
1442- let $t05061250727 = {
1441+ let $t05059950714 = {
14431442 let @ = invoke(this, "getOneTknV2READONLY", [outAssetId, lpAssetAmount], nil)
14441443 if ($isInstanceOf(@, "(Int, Int)"))
14451444 then @
14461445 else throw(($getType(@) + " couldn't be cast to (Int, Int)"))
14471446 }
1448- let totalGet = $t05061250727._1
1449- let feeAmount = $t05061250727._2
1447+ let totalGet = $t05059950714._1
1448+ let feeAmount = $t05059950714._2
14501449 let r = ego("", lpId, lpAssetAmount, this)
14511450 let outAmAmt = r._1
14521451 let outPrAmt = r._2
14801479 let burnLPAssetOnFactory = invoke(fca, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
14811480 if ((burnLPAssetOnFactory == burnLPAssetOnFactory))
14821481 then {
1483- let $t05189351974 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1484- let refreshDLpActions = $t05189351974._1
1485- let updatedDLp = $t05189351974._2
1482+ let $t05188051961 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1483+ let refreshDLpActions = $t05188051961._1
1484+ let updatedDLp = $t05188051961._2
14861485 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
14871486 if ((isUpdatedDLpValid == isUpdatedDLpValid))
14881487 then (state ++ refreshDLpActions)
15271526 let burnA = invoke(fca, "burn", [amount], [AttachedPayment(lpAssetId, amount)])
15281527 if ((burnA == burnA))
15291528 then {
1530- let $t05300153082 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1531- let refreshDLpActions = $t05300153082._1
1532- let updatedDLp = $t05300153082._2
1529+ let $t05298853069 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1530+ let refreshDLpActions = $t05298853069._1
1531+ let updatedDLp = $t05298853069._2
15331532 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
15341533 if ((isUpdatedDLpValid == isUpdatedDLpValid))
15351534 then (state ++ refreshDLpActions)
15801579 let burnLPAssetOnFactory = invoke(fca, "burn", [unstakeAmount], [AttachedPayment(cfgLpAssetId, unstakeAmount)])
15811580 if ((burnLPAssetOnFactory == burnLPAssetOnFactory))
15821581 then {
1583- let $t05433354414 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1584- let refreshDLpActions = $t05433354414._1
1585- let updatedDLp = $t05433354414._2
1582+ let $t05432054401 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1583+ let refreshDLpActions = $t05432054401._1
1584+ let updatedDLp = $t05432054401._2
15861585 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
15871586 if ((isUpdatedDLpValid == isUpdatedDLpValid))
15881587 then (state ++ refreshDLpActions)
16311630 let unstakeInv = invoke(staking, "unstakeINTERNAL", [lpAssetId, unstakeAmount, userAddress.bytes, lpAssetRecipientAddress.bytes], nil)
16321631 if ((unstakeInv == unstakeInv))
16331632 then {
1634- let $t05543655624 = getOneTknV2Internal(outAssetId, minOutAmount, [AttachedPayment(lpAssetId, unstakeAmount)], i.caller, i.originCaller, i.transactionId)
1635- let state = $t05543655624._1
1636- let totalAmount = $t05543655624._2
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
16371636 $Tuple2(state, totalAmount)
16381637 }
16391638 else throw("Strict value is not equal to itself.")
16451644
16461645 @Callable(i)
16471646 func putOneTknV2WithBonusREADONLY (paymentAmountRaw,paymentAssetId) = {
1648- let $t05575255855 = calcPutOneTkn(paymentAmountRaw, paymentAssetId, "", "", true)
1649- let lpAmount = $t05575255855._1
1650- let state = $t05575255855._2
1651- let feeAmount = $t05575255855._3
1652- let bonus = $t05575255855._4
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
16531652 $Tuple2(nil, $Tuple3(lpAmount, feeAmount, bonus))
16541653 }
16551654
16571656
16581657 @Callable(i)
16591658 func putOneTknV2WithoutTakeFeeREADONLY (paymentAmountRaw,paymentAssetId) = {
1660- let $t05600356107 = calcPutOneTkn(paymentAmountRaw, paymentAssetId, "", "", false)
1661- let lpAmount = $t05600356107._1
1662- let state = $t05600356107._2
1663- let feeAmount = $t05600356107._3
1664- let bonus = $t05600356107._4
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
16651664 $Tuple2(nil, $Tuple3(lpAmount, feeAmount, bonus))
16661665 }
16671666
16711670 func activate (amtAsStr,prAsStr) = if ((toString(i.caller) != toString(fca)))
16721671 then throw("denied")
16731672 else $Tuple2([StringEntry(aa(), amtAsStr), StringEntry(pa(), prAsStr)], "success")
1674-
1675-
1676-
1677-@Callable(i)
1678-func setS (k,v) = if ((toString(i.caller) != strf(this, ada())))
1679- then pd
1680- else [StringEntry(k, v)]
1681-
1682-
1683-
1684-@Callable(i)
1685-func setI (k,v) = if ((toString(i.caller) != strf(this, ada())))
1686- then pd
1687- else [IntegerEntry(k, v)]
16881673
16891674
16901675
17371722 @Callable(i)
17381723 func changeAmp () = {
17391724 let cfg = invoke(fca, "getChangeAmpConfigREADONLY", [toString(this)], nil)
1740- let $t05879458993 = match cfg {
1725+ let $t05844858647 = match cfg {
17411726 case list: List[Any] =>
17421727 $Tuple3({
17431728 let @ = list[0]
17581743 case _ =>
17591744 throwErr("invalid entry type")
17601745 }
1761- let delay = $t05879458993._1
1762- let delta = $t05879458993._2
1763- let target = $t05879458993._3
1746+ let delay = $t05844858647._1
1747+ let delta = $t05844858647._2
1748+ let target = $t05844858647._3
17641749 let curAmp = parseIntValue(getStringValue(amp()))
17651750 let newAmpRaw = (curAmp + delta)
17661751 let newAmp = if ((0 > delta))
17961781 match tx {
17971782 case order: Order =>
17981783 let matcherPub = mp()
1799- let $t05990560022 = if (skipOrderValidation())
1784+ let $t05955959676 = if (skipOrderValidation())
18001785 then $Tuple2(true, "")
18011786 else validateMatcherOrderAllowed(order)
1802- let orderValid = $t05990560022._1
1803- let orderValidInfo = $t05990560022._2
1787+ let orderValid = $t05955959676._1
1788+ let orderValidInfo = $t05955959676._2
18041789 let senderValid = sigVerify(order.bodyBytes, order.proofs[0], order.senderPublicKey)
18051790 let matcherValid = sigVerify(order.bodyBytes, order.proofs[1], matcherPub)
18061791 if (if (if (orderValid)
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
4+let test = true
5+
46 let scale8 = 100000000
57
68 let scale8BigInt = toBigInt(100000000)
79
810 let scale18 = toBigInt(1000000000000000000)
911
1012 let zeroBigInt = toBigInt(0)
1113
1214 let big0 = toBigInt(0)
1315
1416 let big1 = toBigInt(1)
1517
1618 let big2 = toBigInt(2)
1719
1820 let big3 = toBigInt(3)
1921
2022 let big4 = toBigInt(4)
2123
2224 let slippage4D = toBigInt((scale8 - ((scale8 * 1) / scale8)))
2325
2426 let wavesString = "WAVES"
2527
2628 let Amult = "100"
2729
2830 let Dconv = "1"
2931
3032 let SEP = "__"
3133
3234 let EMPTY = ""
3335
3436 let PoolActive = 1
3537
3638 let PoolPutDis = 2
3739
3840 let PoolMatcherDis = 3
3941
4042 let PoolShutdown = 4
4143
4244 let idxPoolAddress = 1
4345
4446 let idxPoolSt = 2
4547
4648 let idxLPAsId = 3
4749
4850 let idxAmAsId = 4
4951
5052 let idxPrAsId = 5
5153
5254 let idxAmtAsDcm = 6
5355
5456 let idxPriceAsDcm = 7
5557
5658 let idxIAmtAsId = 8
5759
5860 let idxIPriceAsId = 9
5961
6062 let idxFactStakCntr = 1
6163
6264 let idxFactoryRestCntr = 6
6365
6466 let idxFactSlippCntr = 7
6567
6668 let idxFactGwxRewCntr = 10
6769
6870 let feeDefault = fraction(10, scale8, 10000)
6971
7072 func t1 (origVal,origScaleMult) = fraction(toBigInt(origVal), scale18, toBigInt(origScaleMult))
7173
7274
7375 func t1BigInt (origVal,origScaleMult) = fraction(origVal, scale18, origScaleMult)
7476
7577
7678 func f1 (val,resultScaleMult) = toInt(fraction(val, toBigInt(resultScaleMult), scale18))
7779
7880
7981 func fromX18Round (val,resultScaleMult,round) = toInt(fraction(val, toBigInt(resultScaleMult), scale18, round))
8082
8183
8284 func t2 (origVal,origScaleMult) = fraction(origVal, scale18, toBigInt(origScaleMult))
8385
8486
8587 func f2 (val,resultScaleMult) = fraction(val, toBigInt(resultScaleMult), scale18)
8688
8789
8890 func ts (amt,resScale,curScale) = fraction(amt, resScale, curScale)
8991
9092
9193 func abs (val) = if ((zeroBigInt > val))
9294 then -(val)
9395 else val
9496
9597
9698 func absBigInt (val) = if ((zeroBigInt > val))
9799 then -(val)
98100 else val
99101
100102
101103 func fc () = "%s__factoryContract"
102104
103105
104106 func mpk () = "%s__managerPublicKey"
105107
106108
107109 func pmpk () = "%s__pendingManagerPublicKey"
108110
109111
110112 func pl () = "%s%s__price__last"
111113
112114
113115 func ph (h,t) = makeString(["%s%s%d%d__price__history", toString(h), toString(t)], SEP)
114116
115117
116118 func pau (ua,txId) = ((("%s%s%s__P__" + ua) + "__") + txId)
117119
118120
119121 func gau (ua,txId) = ((("%s%s%s__G__" + ua) + "__") + txId)
120122
121123
122124 func aa () = "%s__amountAsset"
123125
124126
125127 func pa () = "%s__priceAsset"
126128
127129
128130 func amp () = "%s__amp"
129131
130132
131133 func keyAmpHistory (heightBlocks) = ("%s%d__amp__" + toString(heightBlocks))
132134
133135
134-func ada () = "%s__addonAddr"
135-
136-
137136 func keyChangeAmpLastCall () = "%s__changeAmpLastCall"
138137
139138
140139 let keyFee = "%s__fee"
141140
142141 let fee = valueOrElse(getInteger(this, keyFee), feeDefault)
143142
144143 let keyDLp = makeString(["%s", "dLp"], SEP)
145144
146145 let keyDLpRefreshedHeight = makeString(["%s", "dLpRefreshedHeight"], SEP)
147146
148147 let keyDLpRefreshDelay = makeString(["%s", "refreshDLpDelay"], SEP)
149148
150149 let dLpRefreshDelayDefault = 30
151150
152151 let dLpRefreshDelay = valueOrElse(getInteger(this, keyDLpRefreshDelay), dLpRefreshDelayDefault)
153152
154153 func fcfg () = "%s__factoryConfig"
155154
156155
157156 func mtpk () = "%s%s__matcher__publicKey"
158157
159158
160159 func pc (iAmtAs,iPrAs) = (((("%d%d%s__" + iAmtAs) + "__") + iPrAs) + "__config")
161160
162161
163162 func mba (bAStr) = ("%s%s%s__mappings__baseAsset2internalId__" + bAStr)
164163
165164
166165 func aps () = "%s__shutdown"
167166
168167
169168 func keyAllowedLpStableScriptHash () = "%s__allowedLpStableScriptHash"
170169
171170
172171 func keyFeeCollectorAddress () = "%s__feeCollectorAddress"
173172
174173
175174 func keySkipOrderValidation (poolAddress) = ("%s%s__skipOrderValidation__" + poolAddress)
176175
177176
178177 func throwOrderError (orderValid,orderValidInfo,senderValid,matcherValid) = throw((((((((("order validation failed: orderValid=" + toString(orderValid)) + " (") + orderValidInfo) + ")") + " senderValid=") + toString(senderValid)) + " matcherValid=") + toString(matcherValid)))
179178
180179
181180 func strf (addr,key) = valueOrErrorMessage(getString(addr, key), makeString(["mandatory ", toString(addr), ".", key, " not defined"], ""))
182181
183182
184183 func intf (addr,key) = valueOrErrorMessage(getInteger(addr, key), makeString(["mandatory ", toString(addr), ".", key, " not defined"], ""))
185184
186185
187186 func throwErr (msg) = throw(makeString(["lp_stable.ride:", msg], " "))
188187
189188
190189 func fmtErr (msg) = makeString(["lp_stable.ride:", msg], " ")
191190
192191
193192 let fca = addressFromStringValue(strf(this, fc()))
194193
195194 let inFee = {
196195 let @ = invoke(fca, "getInFeeREADONLY", [toString(this)], nil)
197196 if ($isInstanceOf(@, "Int"))
198197 then @
199198 else throw(($getType(@) + " couldn't be cast to Int"))
200199 }
201200
202201 let outFee = {
203202 let @ = invoke(fca, "getOutFeeREADONLY", [toString(this)], nil)
204203 if ($isInstanceOf(@, "Int"))
205204 then @
206205 else throw(($getType(@) + " couldn't be cast to Int"))
207206 }
208207
209208 let A = strf(this, amp())
210209
211210 func igs () = valueOrElse(getBoolean(fca, aps()), false)
212211
213212
214213 func mp () = fromBase58String(strf(fca, mtpk()))
215214
216215
217216 let feeCollectorAddress = addressFromStringValue(strf(fca, keyFeeCollectorAddress()))
218217
219218 func gpc () = {
220219 let amtAs = strf(this, aa())
221220 let priceAs = strf(this, pa())
222221 let iPriceAs = intf(fca, mba(priceAs))
223222 let iAmtAs = intf(fca, mba(amtAs))
224223 split(strf(fca, pc(toString(iAmtAs), toString(iPriceAs))), SEP)
225224 }
226225
227226
228227 func parseAssetId (input) = if ((input == wavesString))
229228 then unit
230229 else fromBase58String(input)
231230
232231
233232 func assetIdToString (input) = if ((input == unit))
234233 then wavesString
235234 else toBase58String(value(input))
236235
237236
238237 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]))
239238
240239
241240 let poolConfigParsed = parsePoolConfig(gpc())
242241
243-let $t081948423 = poolConfigParsed
242+let $t081818410 = poolConfigParsed
244243
245-let cfgPoolAddress = $t081948423._1
244+let cfgPoolAddress = $t081818410._1
246245
247-let cfgPoolStatus = $t081948423._2
246+let cfgPoolStatus = $t081818410._2
248247
249-let cfgLpAssetId = $t081948423._3
248+let cfgLpAssetId = $t081818410._3
250249
251-let cfgAmountAssetId = $t081948423._4
250+let cfgAmountAssetId = $t081818410._4
252251
253-let cfgPriceAssetId = $t081948423._5
252+let cfgPriceAssetId = $t081818410._5
254253
255-let cfgAmountAssetDecimals = $t081948423._6
254+let cfgAmountAssetDecimals = $t081818410._6
256255
257-let cfgPriceAssetDecimals = $t081948423._7
256+let cfgPriceAssetDecimals = $t081818410._7
258257
259-let cfgInAmountAssedId = $t081948423._8
258+let cfgInAmountAssedId = $t081818410._8
260259
261-let cfgInPriceAssetId = $t081948423._9
260+let cfgInPriceAssetId = $t081818410._9
262261
263262 func gfc () = split(strf(fca, fcfg()), SEP)
264263
265264
266265 let factoryConfig = gfc()
267266
268267 let stakingContract = valueOrErrorMessage(addressFromString(factoryConfig[idxFactStakCntr]), "Invalid staking contract address")
269268
270269 let slipageContract = valueOrErrorMessage(addressFromString(factoryConfig[idxFactSlippCntr]), "Invalid slipage contract address")
271270
272271 let gwxContract = valueOrErrorMessage(addressFromString(factoryConfig[idxFactGwxRewCntr]), "Invalid gwx contract address")
273272
274273 let restContract = valueOrErrorMessage(addressFromString(factoryConfig[idxFactoryRestCntr]), "Invalid gwx contract address")
275274
276275 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)
277276
278277
279278 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)
280279
281280
282281 func getAccBalance (assetId) = if ((assetId == "WAVES"))
283282 then wavesBalance(this).available
284283 else assetBalance(this, fromBase58String(assetId))
285284
286285
287286 func cpbi (prAmtX18,amAmtX18) = fraction(prAmtX18, scale18, amAmtX18)
288287
289288
290289 func cpbir (prAmtX18,amAmtX18,round) = fraction(prAmtX18, scale18, amAmtX18, round)
291290
292291
293292 func vad (A1,A2,slippage) = {
294293 let diff = fraction((A1 - A2), scale8BigInt, A2)
295294 let pass = ((slippage - abs(diff)) > zeroBigInt)
296295 if (!(pass))
297296 then throw(("Big slpg: " + toString(diff)))
298297 else $Tuple2(pass, min([A1, A2]))
299298 }
300299
301300
302301 func vd (D1,D0,slpg) = {
303302 let diff = fraction(D0, scale8BigInt, D1)
304303 let fail = (slpg > diff)
305304 if (if (fail)
306305 then true
307306 else (D0 > D1))
308307 then throw(((((((toString(D0) + " ") + toString(D1)) + " ") + toString(diff)) + " ") + toString(slpg)))
309308 else fail
310309 }
311310
312311
313312 func pcp (amAssetDcm,prAssetDcm,amAmt,prAmt) = {
314313 let amtAsAmtX18 = t1(amAmt, amAssetDcm)
315314 let prAsAmtX18 = t1(prAmt, prAssetDcm)
316315 cpbi(prAsAmtX18, amtAsAmtX18)
317316 }
318317
319318
320319 func calcPrices (amAmt,prAmt,lpAmt) = {
321320 let amtAsDcm = cfgAmountAssetDecimals
322321 let prAsDcm = cfgPriceAssetDecimals
323322 let priceX18 = pcp(amtAsDcm, prAsDcm, amAmt, prAmt)
324323 let amAmtX18 = t1(amAmt, amtAsDcm)
325324 let prAmtX18 = t1(prAmt, prAsDcm)
326325 let lpAmtX18 = t1(lpAmt, scale8)
327326 let lpPrInAmAsX18 = cpbi(amAmtX18, lpAmtX18)
328327 let lpPrInPrAsX18 = cpbi(prAmtX18, lpAmtX18)
329328 [priceX18, lpPrInAmAsX18, lpPrInPrAsX18]
330329 }
331330
332331
333332 func calculatePrices (amAmt,prAmt,lpAmt) = {
334333 let p = calcPrices(amAmt, prAmt, lpAmt)
335334 [f1(p[0], scale8), f1(p[1], scale8), f1(p[2], scale8)]
336335 }
337336
338337
339338 func takeFee (amount,fee) = {
340339 let feeAmount = if ((fee == 0))
341340 then 0
342341 else fraction(amount, fee, scale8)
343342 $Tuple2((amount - feeAmount), feeAmount)
344343 }
345344
346345
347346 func getD (xp) = {
348347 let xp0 = xp[0]
349348 let xp1 = xp[1]
350349 let s = (xp0 + xp1)
351350 if ((s == big0))
352351 then big0
353352 else {
354353 let a = parseIntValue(A)
355354 let ann = (a * 2)
356355 let p = fraction(xp0, xp1, big1)
357356 let xp0_xp1_n_n = fraction(p, big4, big1)
358357 let ann_s = fraction(toBigInt(ann), s, big1)
359358 let ann_1 = toBigInt((ann - 1))
360359 func calcDNext (d) = {
361360 let dd = fraction(d, d, big1)
362361 let ddd = fraction(dd, d, big1)
363362 let dp = fraction(ddd, big1, xp0_xp1_n_n)
364363 fraction((ann_s + fraction(dp, big2, big1)), d, (fraction(ann_1, d, big1) + fraction(big3, dp, big1)))
365364 }
366365
367366 func calc (acc,i) = if (acc._2)
368367 then acc
369368 else {
370369 let d = acc._1
371370 let dNext = calcDNext(d)
372371 let dDiffRaw = (dNext - value(d))
373372 let dDiff = if ((big0 > dDiffRaw))
374373 then -(dDiffRaw)
375374 else dDiffRaw
376375 if ((big1 >= dDiff))
377376 then $Tuple2(dNext, true)
378377 else $Tuple2(dNext, false)
379378 }
380379
381380 let arr = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16]
382- let $t01292812976 = {
381+ let $t01291512963 = {
383382 let $l = arr
384383 let $s = size($l)
385384 let $acc0 = $Tuple2(s, false)
386385 func $f0_1 ($a,$i) = if (($i >= $s))
387386 then $a
388387 else calc($a, $l[$i])
389388
390389 func $f0_2 ($a,$i) = if (($i >= $s))
391390 then $a
392391 else throw("List size exceeds 17")
393392
394393 $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)
395394 }
396- let d = $t01292812976._1
397- let found = $t01292812976._2
395+ let d = $t01291512963._1
396+ let found = $t01291512963._2
398397 if (found)
399398 then d
400399 else throw(("D calculation error, D = " + toString(d)))
401400 }
402401 }
403402
404403
405404 func ego (txId58,pmtAssetId,pmtLpAmt,userAddress) = {
406405 let lpId = cfgLpAssetId
407406 let amId = toBase58String(value(cfgAmountAssetId))
408407 let prId = toBase58String(value(cfgPriceAssetId))
409408 let amDcm = cfgAmountAssetDecimals
410409 let prDcm = cfgPriceAssetDecimals
411410 let sts = toString(cfgPoolStatus)
412411 let lpEmiss = valueOrErrorMessage(assetInfo(lpId), "Wrong LP id").quantity
413412 if ((toBase58String(lpId) != pmtAssetId))
414413 then throw("Wrong pmt asset")
415414 else {
416415 let amBalance = getAccBalance(amId)
417416 let amBalanceX18 = t1(amBalance, amDcm)
418417 let prBalance = getAccBalance(prId)
419418 let prBalanceX18 = t1(prBalance, prDcm)
420419 let curPriceX18 = cpbi(prBalanceX18, amBalanceX18)
421420 let curPrice = f1(curPriceX18, scale8)
422421 let pmtLpAmtX18 = t1(pmtLpAmt, scale8)
423422 let lpEmissX18 = t1(lpEmiss, scale8)
424423 let outAmAmtX18 = fraction(amBalanceX18, pmtLpAmtX18, lpEmissX18)
425424 let outPrAmtX18 = fraction(prBalanceX18, pmtLpAmtX18, lpEmissX18)
426425 let outAmAmt = fromX18Round(outAmAmtX18, amDcm, FLOOR)
427426 let outPrAmt = fromX18Round(outPrAmtX18, prDcm, FLOOR)
428427 let state = if ((txId58 == ""))
429428 then nil
430429 else [ScriptTransfer(userAddress, outAmAmt, if ((amId == "WAVES"))
431430 then unit
432431 else fromBase58String(amId)), ScriptTransfer(userAddress, outPrAmt, if ((prId == "WAVES"))
433432 then unit
434433 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)]
435434 $Tuple10(outAmAmt, outPrAmt, amId, prId, amBalance, prBalance, lpEmiss, curPriceX18, sts, state)
436435 }
437436 }
438437
439438
440439 func epo (txId58,slippage,inAmAmt,inAmId,inPrAmt,inPrId,userAddress,isEval,emitLp,isOneAsset,validateSlippage,pmtAmt,pmtId) = {
441440 let lpId = cfgLpAssetId
442441 let amIdStr = toBase58String(value(cfgAmountAssetId))
443442 let prIdStr = toBase58String(value(cfgPriceAssetId))
444443 let inAmIdStr = cfgInAmountAssedId
445444 let inPrIdStr = cfgInPriceAssetId
446445 let amtDcm = cfgAmountAssetDecimals
447446 let priceDcm = cfgPriceAssetDecimals
448447 let sts = toString(cfgPoolStatus)
449448 let lpEm = valueOrErrorMessage(assetInfo(lpId), "Wr lp as").quantity
450449 let amBalance = if (isEval)
451450 then getAccBalance(amIdStr)
452451 else if (if (isOneAsset)
453452 then (pmtId == amIdStr)
454453 else false)
455454 then (getAccBalance(amIdStr) - pmtAmt)
456455 else if (isOneAsset)
457456 then getAccBalance(amIdStr)
458457 else (getAccBalance(amIdStr) - inAmAmt)
459458 let prBalance = if (isEval)
460459 then getAccBalance(prIdStr)
461460 else if (if (isOneAsset)
462461 then (pmtId == prIdStr)
463462 else false)
464463 then (getAccBalance(prIdStr) - pmtAmt)
465464 else if (isOneAsset)
466465 then getAccBalance(prIdStr)
467466 else (getAccBalance(prIdStr) - inPrAmt)
468467 let inAmAssetAmtX18 = t1(inAmAmt, amtDcm)
469468 let inPrAssetAmtX18 = t1(inPrAmt, priceDcm)
470469 let userPriceX18 = cpbi(inPrAssetAmtX18, inAmAssetAmtX18)
471470 let amBalanceX18 = t1(amBalance, amtDcm)
472471 let prBalanceX18 = t1(prBalance, priceDcm)
473472 let D0 = getD([amBalanceX18, prBalanceX18])
474473 let r = if ((lpEm == 0))
475474 then {
476475 let D1 = getD([(amBalanceX18 + inAmAssetAmtX18), (prBalanceX18 + inPrAssetAmtX18)])
477476 let checkD = if ((D1 > D0))
478477 then true
479478 else throw("D1 should be greater than D0")
480479 if ((checkD == checkD))
481480 then {
482481 let curPriceX18 = zeroBigInt
483482 let slippageX18 = zeroBigInt
484483 let lpAmtX18 = D1
485484 $Tuple5(f1(lpAmtX18, scale8), f1(inAmAssetAmtX18, amtDcm), f1(inPrAssetAmtX18, priceDcm), cpbi((prBalanceX18 + inPrAssetAmtX18), (amBalanceX18 + inAmAssetAmtX18)), slippageX18)
486485 }
487486 else throw("Strict value is not equal to itself.")
488487 }
489488 else {
490489 let curPriceX18 = cpbi(prBalanceX18, amBalanceX18)
491490 let slippageRealX18 = fraction(abs((curPriceX18 - userPriceX18)), scale18, curPriceX18)
492491 let slippageX18 = t1(slippage, scale8)
493492 if (if (if (validateSlippage)
494493 then (curPriceX18 != zeroBigInt)
495494 else false)
496495 then (slippageRealX18 > slippageX18)
497496 else false)
498497 then throw(((("Price slippage " + toString(slippageRealX18)) + " > ") + toString(slippageX18)))
499498 else {
500499 let lpEmissionX18 = t1(lpEm, scale8)
501500 let prViaAmX18 = fraction(inAmAssetAmtX18, cpbir(prBalanceX18, amBalanceX18, CEILING), scale18, CEILING)
502501 let amViaPrX18 = fraction(inPrAssetAmtX18, scale18, cpbir(prBalanceX18, amBalanceX18, FLOOR), CEILING)
503502 let expectedAmts = if ((prViaAmX18 > inPrAssetAmtX18))
504503 then $Tuple2(amViaPrX18, inPrAssetAmtX18)
505504 else $Tuple2(inAmAssetAmtX18, prViaAmX18)
506505 let expAmtAssetAmtX18 = expectedAmts._1
507506 let expPriceAssetAmtX18 = expectedAmts._2
508507 let D1 = getD([(amBalanceX18 + expAmtAssetAmtX18), (prBalanceX18 + expPriceAssetAmtX18)])
509508 let checkD = if ((D1 > D0))
510509 then true
511510 else throw("D1 should be greater than D0")
512511 if ((checkD == checkD))
513512 then {
514513 let lpAmtX18 = fraction(lpEmissionX18, (D1 - D0), D0)
515514 $Tuple5(fromX18Round(lpAmtX18, scale8, FLOOR), fromX18Round(expAmtAssetAmtX18, amtDcm, CEILING), fromX18Round(expPriceAssetAmtX18, priceDcm, CEILING), curPriceX18, slippageX18)
516515 }
517516 else throw("Strict value is not equal to itself.")
518517 }
519518 }
520519 let calcLpAmt = r._1
521520 let calcAmAssetPmt = r._2
522521 let calcPrAssetPmt = r._3
523522 let curPrice = f1(r._4, scale8)
524523 let slippageCalc = f1(r._5, scale8)
525524 if ((0 >= calcLpAmt))
526525 then throw("LP <= 0")
527526 else {
528527 let emitLpAmt = if (!(emitLp))
529528 then 0
530529 else calcLpAmt
531530 let amDiff = (inAmAmt - calcAmAssetPmt)
532531 let prDiff = (inPrAmt - calcPrAssetPmt)
533- let $t02081521160 = if (if (isOneAsset)
532+ let $t02080221147 = if (if (isOneAsset)
534533 then (pmtId == amIdStr)
535534 else false)
536535 then $Tuple2(pmtAmt, 0)
537536 else if (if (isOneAsset)
538537 then (pmtId == prIdStr)
539538 else false)
540539 then $Tuple2(0, pmtAmt)
541540 else $Tuple2(calcAmAssetPmt, calcPrAssetPmt)
542- let writeAmAmt = $t02081521160._1
543- let writePrAmt = $t02081521160._2
541+ let writeAmAmt = $t02080221147._1
542+ let writePrAmt = $t02080221147._2
544543 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))]
545544 $Tuple13(calcLpAmt, emitLpAmt, curPrice, amBalance, prBalance, lpEm, lpId, sts, commonState, amDiff, prDiff, inAmId, inPrId)
546545 }
547546 }
548547
549548
550549 func getYD (xp,i,D) = {
551550 let n = big2
552551 let x = xp[if ((i == 0))
553552 then 1
554553 else 0]
555554 let aPrecision = parseBigIntValue(Amult)
556555 let a = (parseBigIntValue(A) * aPrecision)
557556 let s = x
558557 let ann = (a * n)
559558 let c = (((((D * D) / (x * n)) * D) * aPrecision) / (ann * n))
560559 let b = ((s + ((D * aPrecision) / ann)) - D)
561560 func calc (acc,cur) = {
562- let $t02235522375 = acc
563- let y = $t02235522375._1
564- let found = $t02235522375._2
561+ let $t02234222362 = acc
562+ let y = $t02234222362._1
563+ let found = $t02234222362._2
565564 if ((found != unit))
566565 then acc
567566 else {
568567 let yNext = (((y * y) + c) / ((big2 * y) + b))
569568 let yDiff = absBigInt((yNext - value(y)))
570569 if ((big1 >= yDiff))
571570 then $Tuple2(yNext, cur)
572571 else $Tuple2(yNext, unit)
573572 }
574573 }
575574
576575 let arr = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
577- let $t02268222729 = {
576+ let $t02266922716 = {
578577 let $l = arr
579578 let $s = size($l)
580579 let $acc0 = $Tuple2(D, unit)
581580 func $f0_1 ($a,$i) = if (($i >= $s))
582581 then $a
583582 else calc($a, $l[$i])
584583
585584 func $f0_2 ($a,$i) = if (($i >= $s))
586585 then $a
587586 else throw("List size exceeds 15")
588587
589588 $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)
590589 }
591- let y = $t02268222729._1
592- let found = $t02268222729._2
590+ let y = $t02266922716._1
591+ let found = $t02266922716._2
593592 if ((found != unit))
594593 then y
595594 else throw(("Y calculation error, Y = " + toString(y)))
596595 }
597596
598597
599598 func calcDLp (amountBalance,priceBalance,lpEmission) = {
600599 let updatedDLp = fraction(getD([t1BigInt(amountBalance, toBigInt(cfgAmountAssetDecimals)), t1BigInt(priceBalance, toBigInt(cfgPriceAssetDecimals))]), scale18, lpEmission)
601600 if ((lpEmission == big0))
602601 then big0
603602 else updatedDLp
604603 }
605604
606605
607606 func calcCurrentDLp (amountAssetDelta,priceAssetDelta,lpAssetEmissionDelta) = {
608607 let amountAssetBalance = (toBigInt(getAccBalance(assetIdToString(cfgAmountAssetId))) - amountAssetDelta)
609608 let priceAssetBalance = (toBigInt(getAccBalance(assetIdToString(cfgPriceAssetId))) - priceAssetDelta)
610609 let lpAssetEmission = (toBigInt(value(assetInfo(cfgLpAssetId)).quantity) - lpAssetEmissionDelta)
611610 let currentDLp = calcDLp(amountAssetBalance, priceAssetBalance, lpAssetEmission)
612611 currentDLp
613612 }
614613
615614
616615 func refreshDLpInternal (amountAssetBalanceDelta,priceAssetBalanceDelta,lpAssetEmissionDelta) = {
617616 let amountAssetBalance = (getAccBalance(assetIdToString(cfgAmountAssetId)) + amountAssetBalanceDelta)
618617 let priceAssetBalance = (getAccBalance(assetIdToString(cfgPriceAssetId)) + priceAssetBalanceDelta)
619618 let lpAssetEmission = (value(assetInfo(cfgLpAssetId)).quantity + lpAssetEmissionDelta)
620619 let updatedDLp = calcDLp(toBigInt(amountAssetBalance), toBigInt(priceAssetBalance), toBigInt(lpAssetEmission))
621620 let actions = [IntegerEntry(keyDLpRefreshedHeight, height), StringEntry(keyDLp, toString(updatedDLp))]
622621 $Tuple2(actions, updatedDLp)
623622 }
624623
625624
626625 func validateUpdatedDLp (oldDLp,updatedDLp) = if ((updatedDLp >= oldDLp))
627626 then true
628627 else throwErr("updated DLp lower than current DLp")
629628
630629
631630 func validateMatcherOrderAllowed (order) = {
632631 let amountAssetBalance = getAccBalance(assetIdToString(cfgAmountAssetId))
633632 let priceAssetBalance = getAccBalance(assetIdToString(cfgPriceAssetId))
634633 let amountAssetAmount = order.amount
635634 let priceAssetAmount = fraction(order.amount, order.price, scale8, FLOOR)
636- let $t02492725139 = if ((order.orderType == Buy))
635+ let $t02491425126 = if ((order.orderType == Buy))
637636 then $Tuple2(amountAssetAmount, -(priceAssetAmount))
638637 else $Tuple2(-(amountAssetAmount), priceAssetAmount)
639- let amountAssetBalanceDelta = $t02492725139._1
640- let priceAssetBalanceDelta = $t02492725139._2
638+ let amountAssetBalanceDelta = $t02491425126._1
639+ let priceAssetBalanceDelta = $t02491425126._2
641640 if (if (if (igs())
642641 then true
643642 else (cfgPoolStatus == PoolMatcherDis))
644643 then true
645644 else (cfgPoolStatus == PoolShutdown))
646645 then throw("Admin blocked")
647646 else if (if ((order.assetPair.amountAsset != cfgAmountAssetId))
648647 then true
649648 else (order.assetPair.priceAsset != cfgPriceAssetId))
650649 then throw("Wr assets")
651650 else {
652651 let dLp = parseBigIntValue(valueOrElse(getString(this, keyDLp), "0"))
653- let $t02548125581 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
654- let unusedActions = $t02548125581._1
655- let dLpNew = $t02548125581._2
652+ let $t02546825568 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
653+ let unusedActions = $t02546825568._1
654+ let dLpNew = $t02546825568._2
656655 let isOrderValid = (dLpNew >= dLp)
657656 let info = makeString(["dLp=", toString(dLp), " dLpNew=", toString(dLpNew), " amountAssetBalance=", toString(amountAssetBalance), " priceAssetBalance=", toString(priceAssetBalance), " amountAssetBalanceDelta=", toString(amountAssetBalanceDelta), " priceAssetBalanceDelta=", toString(priceAssetBalanceDelta), " height=", toString(height)], "")
658657 $Tuple2(isOrderValid, info)
659658 }
660659 }
661660
662661
663662 func cg (i) = if ((size(i.payments) != 1))
664663 then throw("1 pmnt exp")
665664 else {
666665 let pmt = value(i.payments[0])
667666 let pmtAssetId = value(pmt.assetId)
668667 let pmtAmt = pmt.amount
669668 let r = ego(toBase58String(i.transactionId), toBase58String(pmtAssetId), pmtAmt, i.caller)
670669 let outAmAmt = r._1
671670 let outPrAmt = r._2
672671 let sts = parseIntValue(r._9)
673672 let state = r._10
674673 if (if (igs())
675674 then true
676675 else (sts == PoolShutdown))
677676 then throw(("Admin blocked: " + toString(sts)))
678677 else $Tuple5(outAmAmt, outPrAmt, pmtAmt, pmtAssetId, state)
679678 }
680679
681680
682681 func cp (caller,txId,amAsPmt,prAsPmt,slippage,emitLp,isOneAsset,validateSlippage,pmtAmt,pmtId) = {
683682 let r = epo(txId, slippage, value(amAsPmt).amount, value(amAsPmt).assetId, value(prAsPmt).amount, value(prAsPmt).assetId, caller, (txId == ""), emitLp, isOneAsset, validateSlippage, pmtAmt, pmtId)
684683 let sts = parseIntValue(r._8)
685684 if (if (if (igs())
686685 then true
687686 else (sts == PoolPutDis))
688687 then true
689688 else (sts == PoolShutdown))
690689 then throw(("Blocked:" + toString(sts)))
691690 else r
692691 }
693692
694693
695694 func calcPutOneTkn (pmtAmtRaw,pmtAssetId,userAddress,txId,withTakeFee) = {
696695 let amId = toBase58String(value(cfgAmountAssetId))
697696 let prId = toBase58String(value(cfgPriceAssetId))
698697 let lpId = cfgLpAssetId
699698 let amtDcm = cfgAmountAssetDecimals
700699 let priceDcm = cfgPriceAssetDecimals
701700 let lpAssetEmission = toBigInt(valueOrErrorMessage(assetInfo(lpId), "invalid lp asset").quantity)
702701 let chechEmission = if ((lpAssetEmission > big0))
703702 then true
704703 else throw("initial deposit requires all coins")
705704 if ((chechEmission == chechEmission))
706705 then {
707706 let amBalance = getAccBalance(amId)
708707 let prBalance = getAccBalance(prId)
709- let $t02823728699 = if ((txId == ""))
708+ let $t02822428686 = if ((txId == ""))
710709 then $Tuple2(amBalance, prBalance)
711710 else if ((pmtAssetId == amId))
712711 then if ((pmtAmtRaw > amBalance))
713712 then throw("invalid payment amount")
714713 else $Tuple2((amBalance - pmtAmtRaw), prBalance)
715714 else if ((pmtAssetId == prId))
716715 then if ((pmtAmtRaw > prBalance))
717716 then throw("invalid payment amount")
718717 else $Tuple2(amBalance, (prBalance - pmtAmtRaw))
719718 else throw("wrong pmtAssetId")
720- let amBalanceOld = $t02823728699._1
721- let prBalanceOld = $t02823728699._2
722- let $t02870528881 = if ((pmtAssetId == amId))
719+ let amBalanceOld = $t02822428686._1
720+ let prBalanceOld = $t02822428686._2
721+ let $t02869228868 = if ((pmtAssetId == amId))
723722 then $Tuple2(pmtAmtRaw, 0)
724723 else if ((pmtAssetId == prId))
725724 then $Tuple2(0, pmtAmtRaw)
726725 else throw("invalid payment")
727- let amAmountRaw = $t02870528881._1
728- let prAmountRaw = $t02870528881._2
729- let $t02888529139 = if (withTakeFee)
726+ let amAmountRaw = $t02869228868._1
727+ let prAmountRaw = $t02869228868._2
728+ let $t02887229126 = if (withTakeFee)
730729 then $Tuple3(takeFee(amAmountRaw, inFee)._1, takeFee(prAmountRaw, inFee)._1, takeFee(pmtAmtRaw, inFee)._2)
731730 else $Tuple3(amAmountRaw, prAmountRaw, 0)
732- let amAmount = $t02888529139._1
733- let prAmount = $t02888529139._2
734- let feeAmount = $t02888529139._3
731+ let amAmount = $t02887229126._1
732+ let prAmount = $t02887229126._2
733+ let feeAmount = $t02887229126._3
735734 let amBalanceNew = (amBalanceOld + amAmount)
736735 let prBalanceNew = (prBalanceOld + prAmount)
737736 let D0 = getD([t1(amBalanceOld, cfgAmountAssetDecimals), t1(prBalanceOld, cfgPriceAssetDecimals)])
738737 let D1 = getD([t1(amBalanceNew, cfgAmountAssetDecimals), t1(prBalanceNew, cfgPriceAssetDecimals)])
739738 let checkD = if ((D1 > D0))
740739 then true
741740 else throw()
742741 if ((checkD == checkD))
743742 then {
744743 let lpAmount = fraction(lpAssetEmission, (D1 - D0), D0, FLOOR)
745744 let curPrice = f1(cpbi(t1(prBalanceNew, priceDcm), t1(amBalanceNew, amtDcm)), scale8)
746745 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))]
747746 let poolProportion = fraction(prBalanceOld, scale8, amBalanceOld)
748747 let amountAssetPart = fraction(pmtAmtRaw, scale8, (poolProportion + scale8))
749748 let priceAssetPart = (pmtAmtRaw - amountAssetPart)
750749 let lpAmtBoth = fraction(lpAssetEmission, toBigInt(priceAssetPart), toBigInt(prBalanceOld))
751750 let bonus = toInt(fraction((lpAmount - lpAmtBoth), scale8BigInt, lpAmtBoth))
752751 $Tuple4(toInt(lpAmount), commonState, feeAmount, bonus)
753752 }
754753 else throw("Strict value is not equal to itself.")
755754 }
756755 else throw("Strict value is not equal to itself.")
757756 }
758757
759758
760759 func getOneTknV2Internal (outAssetId,minOutAmount,payments,caller,originCaller,transactionId) = {
761760 let lpId = toBase58String(value(cfgLpAssetId))
762761 let amId = toBase58String(value(cfgAmountAssetId))
763762 let prId = toBase58String(value(cfgPriceAssetId))
764763 let amDecimals = cfgAmountAssetDecimals
765764 let prDecimals = cfgPriceAssetDecimals
766765 let poolStatus = cfgPoolStatus
767766 let userAddress = if ((caller == restContract))
768767 then originCaller
769768 else caller
770769 let pmt = value(payments[0])
771770 let pmtAssetId = value(pmt.assetId)
772771 let pmtAmt = pmt.amount
773772 let currentDLp = calcCurrentDLp(big0, big0, big0)
774773 if ((currentDLp == currentDLp))
775774 then {
776775 let txId58 = toBase58String(transactionId)
777776 if ((lpId != toBase58String(pmtAssetId)))
778777 then throw("Wrong LP")
779778 else {
780779 let amBalance = getAccBalance(amId)
781780 let prBalance = getAccBalance(prId)
782- let $t03125131362 = {
781+ let $t03123831349 = {
783782 let @ = invoke(this, "getOneTknV2READONLY", [outAssetId, pmtAmt], nil)
784783 if ($isInstanceOf(@, "(Int, Int)"))
785784 then @
786785 else throw(($getType(@) + " couldn't be cast to (Int, Int)"))
787786 }
788- if (($t03125131362 == $t03125131362))
787+ if (($t03123831349 == $t03123831349))
789788 then {
790- let feeAmount = $t03125131362._2
791- let totalGet = $t03125131362._1
789+ let feeAmount = $t03123831349._2
790+ let totalGet = $t03123831349._1
792791 let totalAmount = if (if ((minOutAmount > 0))
793792 then (minOutAmount > totalGet)
794793 else false)
795794 then throwErr(makeString(["amount to receive is less than ", toString(minOutAmount)], ""))
796795 else totalGet
797- let $t03155231859 = if ((outAssetId == amId))
796+ let $t03153931846 = if ((outAssetId == amId))
798797 then $Tuple4(totalAmount, 0, ((amBalance - totalAmount) - feeAmount), prBalance)
799798 else if ((outAssetId == prId))
800799 then $Tuple4(0, totalAmount, amBalance, ((prBalance - totalAmount) - feeAmount))
801800 else throw("invalid out asset id")
802- let outAm = $t03155231859._1
803- let outPr = $t03155231859._2
804- let amBalanceNew = $t03155231859._3
805- let prBalanceNew = $t03155231859._4
801+ let outAm = $t03153931846._1
802+ let outPr = $t03153931846._2
803+ let amBalanceNew = $t03153931846._3
804+ let prBalanceNew = $t03153931846._4
806805 let curPrX18 = cpbi(t1(prBalanceNew, prDecimals), t1(amBalanceNew, amDecimals))
807806 let curPr = f1(curPrX18, scale8)
808807 let outAssetIdOrWaves = if ((outAssetId == "WAVES"))
809808 then unit
810809 else fromBase58String(outAssetId)
811810 let sendFeeToMatcher = if ((feeAmount > 0))
812811 then [ScriptTransfer(feeCollectorAddress, feeAmount, outAssetIdOrWaves)]
813812 else nil
814813 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)
815814 if ((state == state))
816815 then {
817816 let burn = invoke(fca, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
818817 if ((burn == burn))
819818 then {
820- let $t03264432994 = {
819+ let $t03263132981 = {
821820 let feeAmountForCalc = if ((this == feeCollectorAddress))
822821 then 0
823822 else feeAmount
824823 let outInAmountAsset = if ((parseAssetId(outAssetId) == cfgAmountAssetId))
825824 then true
826825 else false
827826 if (outInAmountAsset)
828827 then $Tuple2(-((totalGet + feeAmountForCalc)), 0)
829828 else $Tuple2(0, -((totalGet + feeAmountForCalc)))
830829 }
831- let amountAssetBalanceDelta = $t03264432994._1
832- let priceAssetBalanceDelta = $t03264432994._2
833- let $t03299733105 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
834- let refreshDLpActions = $t03299733105._1
835- let updatedDLp = $t03299733105._2
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
836835 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
837836 if ((isUpdatedDLpValid == isUpdatedDLpValid))
838837 then $Tuple2((state ++ refreshDLpActions), totalAmount)
839838 else throw("Strict value is not equal to itself.")
840839 }
841840 else throw("Strict value is not equal to itself.")
842841 }
843842 else throw("Strict value is not equal to itself.")
844843 }
845844 else throw("Strict value is not equal to itself.")
846845 }
847846 }
848847 else throw("Strict value is not equal to itself.")
849848 }
850849
851850
852851 func m () = match getString(mpk()) {
853852 case s: String =>
854853 fromBase58String(s)
855854 case _: Unit =>
856855 unit
857856 case _ =>
858857 throw("Match error")
859858 }
860859
861860
862861 func pm () = match getString(pmpk()) {
863862 case s: String =>
864863 fromBase58String(s)
865864 case _: Unit =>
866865 unit
867866 case _ =>
868867 throw("Match error")
869868 }
870869
871870
872871 let pd = throw("Permission denied")
873872
874873 func isManager (i) = match m() {
875874 case pk: ByteVector =>
876875 (i.callerPublicKey == pk)
877876 case _: Unit =>
878877 (i.caller == this)
879878 case _ =>
880879 throw("Match error")
881880 }
882881
883882
884883 func mm (i) = match m() {
885884 case pk: ByteVector =>
886885 if ((i.callerPublicKey == pk))
887886 then true
888887 else pd
889888 case _: Unit =>
890889 if ((i.caller == this))
891890 then true
892891 else pd
893892 case _ =>
894893 throw("Match error")
895894 }
896895
897896
898897 func getY (isReverse,D,poolAmountInBalance) = {
899898 let poolConfig = gpc()
900899 let amId = poolConfig[idxAmAsId]
901900 let prId = poolConfig[idxPrAsId]
902901 let n = big2
903902 let aPrecision = parseBigIntValue(Amult)
904903 let a = (parseBigIntValue(A) * aPrecision)
905904 let xp = if ((isReverse == false))
906905 then [(toBigInt(getAccBalance(amId)) + poolAmountInBalance), toBigInt(getAccBalance(prId))]
907906 else [(toBigInt(getAccBalance(prId)) + poolAmountInBalance), toBigInt(getAccBalance(amId))]
908907 let x = xp[0]
909908 let s = x
910909 let ann = (a * n)
911910 let c = (((((D * D) / (x * n)) * D) * aPrecision) / (ann * n))
912911 let b = ((s + ((D * aPrecision) / ann)) - D)
913912 func calc (acc,cur) = {
914- let $t03455234572 = acc
915- let y = $t03455234572._1
916- let found = $t03455234572._2
913+ let $t03453934559 = acc
914+ let y = $t03453934559._1
915+ let found = $t03453934559._2
917916 if ((found != unit))
918917 then acc
919918 else {
920919 let yNext = (((y * y) + c) / ((big2 * y) + b))
921920 let yDiff = absBigInt((yNext - value(y)))
922921 if ((big1 >= yDiff))
923922 then $Tuple2(yNext, cur)
924923 else $Tuple2(yNext, unit)
925924 }
926925 }
927926
928927 let arr = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
929- let $t03490334950 = {
928+ let $t03489034937 = {
930929 let $l = arr
931930 let $s = size($l)
932931 let $acc0 = $Tuple2(D, unit)
933932 func $f0_1 ($a,$i) = if (($i >= $s))
934933 then $a
935934 else calc($a, $l[$i])
936935
937936 func $f0_2 ($a,$i) = if (($i >= $s))
938937 then $a
939938 else throw("List size exceeds 15")
940939
941940 $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)
942941 }
943- let y = $t03490334950._1
944- let found = $t03490334950._2
942+ let y = $t03489034937._1
943+ let found = $t03489034937._2
945944 if ((found != unit))
946945 then y
947946 else throw(("Y calculation error, Y = " + toString(y)))
948947 }
949948
950949
951950 func skipOrderValidation () = valueOrElse(getBoolean(fca, keySkipOrderValidation(toString(this))), false)
952951
953952
954953 @Callable(i)
955954 func calculateAmountOutForSwapREADONLY (cleanAmountIn,isReverse,feePoolAmount) = {
956- let $t03530235726 = if ((isReverse == false))
955+ let $t03528935713 = if ((isReverse == false))
957956 then {
958957 let assetOut = strf(this, pa())
959958 let poolAmountInBalance = (toBigInt(getAccBalance(strf(this, aa()))) + toBigInt(cleanAmountIn))
960959 $Tuple2(assetOut, poolAmountInBalance)
961960 }
962961 else {
963962 let assetOut = strf(this, aa())
964963 let poolAmountInBalance = (toBigInt(getAccBalance(strf(this, pa()))) + toBigInt(cleanAmountIn))
965964 $Tuple2(assetOut, poolAmountInBalance)
966965 }
967- let assetOut = $t03530235726._1
968- let poolAmountInBalance = $t03530235726._2
966+ let assetOut = $t03528935713._1
967+ let poolAmountInBalance = $t03528935713._2
969968 let poolConfig = gpc()
970969 let amId = poolConfig[idxAmAsId]
971970 let prId = poolConfig[idxPrAsId]
972971 let xp = [toBigInt(getAccBalance(amId)), toBigInt(getAccBalance(prId))]
973972 let D = getD(xp)
974973 let y = getY(isReverse, D, toBigInt(cleanAmountIn))
975974 let dy = ((toBigInt(getAccBalance(assetOut)) - y) - toBigInt(1))
976975 let totalGetRaw = max([0, toInt(dy)])
977976 let newXp = if ((isReverse == false))
978977 then [((toBigInt(getAccBalance(amId)) + toBigInt(cleanAmountIn)) + toBigInt(feePoolAmount)), (toBigInt(getAccBalance(prId)) - dy)]
979978 else [(toBigInt(getAccBalance(amId)) - dy), ((toBigInt(getAccBalance(prId)) + toBigInt(cleanAmountIn)) + toBigInt(feePoolAmount))]
980979 let newD = getD(newXp)
981980 let checkD = if ((newD >= D))
982981 then true
983982 else throw(makeString(["new D is fewer error", toString(D), toString(newD)], "__"))
984983 if ((checkD == checkD))
985984 then $Tuple2(nil, totalGetRaw)
986985 else throw("Strict value is not equal to itself.")
987986 }
988987
989988
990989
991990 @Callable(i)
992991 func calculateAmountOutForSwapAndSendTokens (cleanAmountIn,isReverse,amountOutMin,addressTo,feePoolAmount) = {
993992 let swapContact = {
994993 let @ = invoke(fca, "getSwapContractREADONLY", nil, nil)
995994 if ($isInstanceOf(@, "String"))
996995 then @
997996 else throw(($getType(@) + " couldn't be cast to String"))
998997 }
999998 let checks = [if ((value(i.payments[0]).amount >= cleanAmountIn))
1000999 then true
10011000 else throwErr("Wrong amount"), if ((i.caller == addressFromStringValue(swapContact)))
10021001 then true
10031002 else throwErr("Permission denied")]
10041003 if ((checks == checks))
10051004 then {
10061005 let pmt = value(i.payments[0])
10071006 let assetIn = assetIdToString(pmt.assetId)
1008- let $t03716237556 = if ((isReverse == false))
1007+ let $t03714937543 = if ((isReverse == false))
10091008 then {
10101009 let assetOut = strf(this, pa())
10111010 let poolAmountInBalance = (getAccBalance(assetIn) - value(i.payments[0]).amount)
10121011 $Tuple2(assetOut, poolAmountInBalance)
10131012 }
10141013 else {
10151014 let assetOut = strf(this, aa())
10161015 let poolAmountInBalance = (getAccBalance(assetIn) - value(i.payments[0]).amount)
10171016 $Tuple2(assetOut, poolAmountInBalance)
10181017 }
1019- let assetOut = $t03716237556._1
1020- let poolAmountInBalance = $t03716237556._2
1018+ let assetOut = $t03714937543._1
1019+ let poolAmountInBalance = $t03714937543._2
10211020 let poolConfig = gpc()
10221021 let amId = poolConfig[idxAmAsId]
10231022 let prId = poolConfig[idxPrAsId]
10241023 let xp = if ((isReverse == false))
10251024 then [(toBigInt(getAccBalance(amId)) - toBigInt(value(i.payments[0]).amount)), toBigInt(getAccBalance(prId))]
10261025 else [toBigInt(getAccBalance(amId)), (toBigInt(getAccBalance(prId)) - toBigInt(value(i.payments[0]).amount))]
10271026 let D = getD(xp)
10281027 let y = getY(isReverse, D, toBigInt(0))
10291028 let dy = ((toBigInt(getAccBalance(assetOut)) - y) - toBigInt(1))
10301029 let totalGetRaw = max([0, toInt(dy)])
10311030 let checkMin = if ((totalGetRaw >= amountOutMin))
10321031 then true
10331032 else throw("Exchange result is fewer coins than expected")
10341033 if ((checkMin == checkMin))
10351034 then {
10361035 let newXp = if ((isReverse == false))
10371036 then [(toBigInt(getAccBalance(amId)) + toBigInt(feePoolAmount)), (toBigInt(getAccBalance(prId)) - dy)]
10381037 else [(toBigInt(getAccBalance(amId)) - dy), (toBigInt(getAccBalance(prId)) + toBigInt(feePoolAmount))]
10391038 let newD = getD(newXp)
10401039 let checkD = if ((newD >= D))
10411040 then true
10421041 else throw("new D is fewer error")
10431042 if ((checkD == checkD))
10441043 then $Tuple2([ScriptTransfer(addressFromStringValue(addressTo), totalGetRaw, parseAssetId(assetOut))], totalGetRaw)
10451044 else throw("Strict value is not equal to itself.")
10461045 }
10471046 else throw("Strict value is not equal to itself.")
10481047 }
10491048 else throw("Strict value is not equal to itself.")
10501049 }
10511050
10521051
10531052
10541053 @Callable(i)
10551054 func constructor (fc) = {
10561055 let c = mm(i)
10571056 if ((c == c))
10581057 then [StringEntry(fc(), fc)]
10591058 else throw("Strict value is not equal to itself.")
10601059 }
10611060
10621061
10631062
10641063 @Callable(i)
10651064 func setManager (pendingManagerPublicKey) = {
10661065 let c = mm(i)
10671066 if ((c == c))
10681067 then {
10691068 let cm = fromBase58String(pendingManagerPublicKey)
10701069 if ((cm == cm))
10711070 then [StringEntry(pmpk(), pendingManagerPublicKey)]
10721071 else throw("Strict value is not equal to itself.")
10731072 }
10741073 else throw("Strict value is not equal to itself.")
10751074 }
10761075
10771076
10781077
10791078 @Callable(i)
10801079 func confirmManager () = {
10811080 let p = pm()
10821081 let hpm = if (isDefined(p))
10831082 then true
10841083 else throw("No pending manager")
10851084 if ((hpm == hpm))
10861085 then {
10871086 let cpm = if ((i.callerPublicKey == value(p)))
10881087 then true
10891088 else throw("You are not pending manager")
10901089 if ((cpm == cpm))
10911090 then [StringEntry(mpk(), toBase58String(value(p))), DeleteEntry(pmpk())]
10921091 else throw("Strict value is not equal to itself.")
10931092 }
10941093 else throw("Strict value is not equal to itself.")
10951094 }
10961095
10971096
10981097
10991098 @Callable(i)
11001099 func put (slip,autoStake) = {
11011100 let factCfg = gfc()
11021101 let stakingCntr = valueOrErrorMessage(addressFromString(factCfg[idxFactStakCntr]), "Wr st addr")
11031102 let slipCntr = valueOrErrorMessage(addressFromString(factCfg[idxFactSlippCntr]), "Wr sl addr")
11041103 if ((0 > slip))
11051104 then throw("Wrong slippage")
11061105 else if ((size(i.payments) != 2))
11071106 then throw("2 pmnts expd")
11081107 else {
11091108 let amAssetPmt = toBigInt(value(i.payments[0]).amount)
11101109 let prAssetPmt = toBigInt(value(i.payments[1]).amount)
11111110 let amountAssetBalance = (toBigInt(getAccBalance(assetIdToString(cfgAmountAssetId))) - amAssetPmt)
11121111 if ((amountAssetBalance == amountAssetBalance))
11131112 then {
11141113 let priceAssetBalance = (toBigInt(getAccBalance(assetIdToString(cfgPriceAssetId))) - prAssetPmt)
11151114 if ((priceAssetBalance == priceAssetBalance))
11161115 then {
11171116 let lpAssetEmission = toBigInt(value(assetInfo(cfgLpAssetId)).quantity)
11181117 if ((lpAssetEmission == lpAssetEmission))
11191118 then {
11201119 let currentDLp = calcCurrentDLp(amAssetPmt, prAssetPmt, toBigInt(0))
11211120 if ((currentDLp == currentDLp))
11221121 then {
11231122 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, "")
11241123 let emitLpAmt = e._2
11251124 let lpAssetId = e._7
11261125 let state = e._9
11271126 let amDiff = e._10
11281127 let prDiff = e._11
11291128 let amId = e._12
11301129 let prId = e._13
11311130 let r = invoke(fca, "emit", [emitLpAmt], nil)
11321131 if ((r == r))
11331132 then {
11341133 let el = match r {
11351134 case legacy: Address =>
11361135 invoke(legacy, "emit", [emitLpAmt], nil)
11371136 case _ =>
11381137 unit
11391138 }
11401139 if ((el == el))
11411140 then {
11421141 let sa = if ((amDiff > 0))
11431142 then invoke(slipCntr, "put", nil, [AttachedPayment(amId, amDiff)])
11441143 else nil
11451144 if ((sa == sa))
11461145 then {
11471146 let sp = if ((prDiff > 0))
11481147 then invoke(slipCntr, "put", nil, [AttachedPayment(prId, prDiff)])
11491148 else nil
11501149 if ((sp == sp))
11511150 then {
11521151 let lpTrnsfr = if (autoStake)
11531152 then {
11541153 let ss = invoke(stakingCntr, "stake", nil, [AttachedPayment(lpAssetId, emitLpAmt)])
11551154 if ((ss == ss))
11561155 then nil
11571156 else throw("Strict value is not equal to itself.")
11581157 }
11591158 else [ScriptTransfer(i.caller, emitLpAmt, lpAssetId)]
1160- let $t04217542317 = refreshDLpInternal(0, 0, 0)
1161- let refreshDLpActions = $t04217542317._1
1162- let updatedDLp = $t04217542317._2
1159+ let $t04216242304 = refreshDLpInternal(0, 0, 0)
1160+ let refreshDLpActions = $t04216242304._1
1161+ let updatedDLp = $t04216242304._2
11631162 let check = if ((updatedDLp >= currentDLp))
11641163 then true
11651164 else throwErr(makeString(["updated DLp lower than current DLp", toString(amountAssetBalance), toString(priceAssetBalance), toString(lpAssetEmission), toString(currentDLp), toString(updatedDLp), toString(amDiff), toString(prDiff)], " "))
11661165 if ((check == check))
11671166 then {
11681167 let lpAssetEmissionAfter = value(assetInfo(cfgLpAssetId)).quantity
11691168 if ((lpAssetEmissionAfter == lpAssetEmissionAfter))
11701169 then ((state ++ lpTrnsfr) ++ refreshDLpActions)
11711170 else throw("Strict value is not equal to itself.")
11721171 }
11731172 else throw("Strict value is not equal to itself.")
11741173 }
11751174 else throw("Strict value is not equal to itself.")
11761175 }
11771176 else throw("Strict value is not equal to itself.")
11781177 }
11791178 else throw("Strict value is not equal to itself.")
11801179 }
11811180 else throw("Strict value is not equal to itself.")
11821181 }
11831182 else throw("Strict value is not equal to itself.")
11841183 }
11851184 else throw("Strict value is not equal to itself.")
11861185 }
11871186 else throw("Strict value is not equal to itself.")
11881187 }
11891188 else throw("Strict value is not equal to itself.")
11901189 }
11911190 }
11921191
11931192
11941193
11951194 @Callable(i)
11961195 func putOneTknV2 (minOutAmount,autoStake) = {
11971196 let isPoolOneTokenOperationsDisabled = {
11981197 let @ = invoke(fca, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
11991198 if ($isInstanceOf(@, "Boolean"))
12001199 then @
12011200 else throw(($getType(@) + " couldn't be cast to Boolean"))
12021201 }
12031202 let isPutDisabled = if (if (if (igs())
12041203 then true
12051204 else (cfgPoolStatus == PoolPutDis))
12061205 then true
12071206 else (cfgPoolStatus == PoolShutdown))
12081207 then true
12091208 else isPoolOneTokenOperationsDisabled
12101209 let checks = [if (if (!(isPutDisabled))
12111210 then true
12121211 else isManager(i))
12131212 then true
12141213 else throwErr("put operation is blocked by admin"), if ((size(i.payments) == 1))
12151214 then true
12161215 else throwErr("exactly 1 payment are expected")]
12171216 if ((checks == checks))
12181217 then {
12191218 let amId = toBase58String(value(cfgAmountAssetId))
12201219 let prId = toBase58String(value(cfgPriceAssetId))
12211220 let lpId = cfgLpAssetId
12221221 let amDecimals = cfgAmountAssetDecimals
12231222 let prDecimals = cfgPriceAssetDecimals
12241223 let userAddress = if ((i.caller == this))
12251224 then i.originCaller
12261225 else i.caller
12271226 let pmt = value(i.payments[0])
12281227 let pmtAssetId = toBase58String(value(pmt.assetId))
12291228 let pmtAmt = pmt.amount
12301229 let currentDLp = if ((pmt.assetId == cfgAmountAssetId))
12311230 then calcCurrentDLp(toBigInt(pmtAmt), toBigInt(0), toBigInt(0))
12321231 else calcCurrentDLp(toBigInt(0), toBigInt(pmtAmt), toBigInt(0))
12331232 if ((currentDLp == currentDLp))
12341233 then {
1235- let $t04395844116 = calcPutOneTkn(pmtAmt, pmtAssetId, toString(userAddress), toBase58String(i.transactionId), true)
1236- if (($t04395844116 == $t04395844116))
1234+ let $t04394544103 = calcPutOneTkn(pmtAmt, pmtAssetId, toString(userAddress), toBase58String(i.transactionId), true)
1235+ if (($t04394544103 == $t04394544103))
12371236 then {
1238- let feeAmount = $t04395844116._3
1239- let state = $t04395844116._2
1240- let estimLP = $t04395844116._1
1237+ let feeAmount = $t04394544103._3
1238+ let state = $t04394544103._2
1239+ let estimLP = $t04394544103._1
12411240 let emitLpAmt = if (if ((minOutAmount > 0))
12421241 then (minOutAmount > estimLP)
12431242 else false)
12441243 then throwErr(makeString(["amount to receive is less than ", toString(minOutAmount)], ""))
12451244 else estimLP
12461245 let e = invoke(fca, "emit", [emitLpAmt], nil)
12471246 if ((e == e))
12481247 then {
12491248 let el = match e {
12501249 case legacy: Address =>
12511250 invoke(legacy, "emit", [emitLpAmt], nil)
12521251 case _ =>
12531252 unit
12541253 }
12551254 if ((el == el))
12561255 then {
12571256 let lpTrnsfr = if (autoStake)
12581257 then {
12591258 let ss = invoke(stakingContract, "stakeFor", [toString(i.caller)], [AttachedPayment(lpId, emitLpAmt)])
12601259 if ((ss == ss))
12611260 then nil
12621261 else throw("Strict value is not equal to itself.")
12631262 }
12641263 else [ScriptTransfer(i.caller, emitLpAmt, lpId)]
12651264 let sendFeeToMatcher = if ((feeAmount > 0))
12661265 then [ScriptTransfer(feeCollectorAddress, feeAmount, fromBase58String(pmtAssetId))]
12671266 else nil
1268- let $t04500145350 = if ((this == feeCollectorAddress))
1267+ let $t04498845337 = if ((this == feeCollectorAddress))
12691268 then $Tuple2(0, 0)
12701269 else {
12711270 let paymentInAmountAsset = if ((pmt.assetId == cfgAmountAssetId))
12721271 then true
12731272 else false
12741273 if (paymentInAmountAsset)
12751274 then $Tuple2(-(feeAmount), 0)
12761275 else $Tuple2(0, -(feeAmount))
12771276 }
1278- let amountAssetBalanceDelta = $t04500145350._1
1279- let priceAssetBalanceDelta = $t04500145350._2
1280- let $t04535345461 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
1281- let refreshDLpActions = $t04535345461._1
1282- let updatedDLp = $t04535345461._2
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
12831282 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
12841283 if ((isUpdatedDLpValid == isUpdatedDLpValid))
12851284 then $Tuple2((((state ++ lpTrnsfr) ++ sendFeeToMatcher) ++ refreshDLpActions), emitLpAmt)
12861285 else throw("Strict value is not equal to itself.")
12871286 }
12881287 else throw("Strict value is not equal to itself.")
12891288 }
12901289 else throw("Strict value is not equal to itself.")
12911290 }
12921291 else throw("Strict value is not equal to itself.")
12931292 }
12941293 else throw("Strict value is not equal to itself.")
12951294 }
12961295 else throw("Strict value is not equal to itself.")
12971296 }
12981297
12991298
13001299
13011300 @Callable(i)
13021301 func putForFree (maxSlpg) = if ((0 > maxSlpg))
13031302 then throw("Wrong slpg")
13041303 else if ((size(i.payments) != 2))
13051304 then throw("2 pmnts expd")
13061305 else {
13071306 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, "")
13081307 let state = estPut._9
13091308 let amAssetPmt = toBigInt(value(i.payments[0]).amount)
13101309 let prAssetPmt = toBigInt(value(i.payments[1]).amount)
13111310 let currentDLp = calcCurrentDLp(amAssetPmt, prAssetPmt, toBigInt(0))
13121311 if ((currentDLp == currentDLp))
13131312 then {
1314- let $t04649146556 = refreshDLpInternal(0, 0, 0)
1315- let refreshDLpActions = $t04649146556._1
1316- let updatedDLp = $t04649146556._2
1313+ let $t04647846543 = refreshDLpInternal(0, 0, 0)
1314+ let refreshDLpActions = $t04647846543._1
1315+ let updatedDLp = $t04647846543._2
13171316 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
13181317 if ((isUpdatedDLpValid == isUpdatedDLpValid))
13191318 then (state ++ refreshDLpActions)
13201319 else throw("Strict value is not equal to itself.")
13211320 }
13221321 else throw("Strict value is not equal to itself.")
13231322 }
13241323
13251324
13261325
13271326 @Callable(i)
13281327 func get () = {
13291328 let currentDLp = calcCurrentDLp(toBigInt(0), toBigInt(0), toBigInt(0))
13301329 if ((currentDLp == currentDLp))
13311330 then {
13321331 let r = cg(i)
13331332 let outAmtAmt = r._1
13341333 let outPrAmt = r._2
13351334 let pmtAmt = r._3
13361335 let pmtAssetId = r._4
13371336 let state = r._5
13381337 let b = invoke(fca, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
13391338 if ((b == b))
13401339 then {
1341- let $t04772947811 = refreshDLpInternal(-(outAmtAmt), -(outPrAmt), 0)
1342- let refreshDLpActions = $t04772947811._1
1343- let updatedDLp = $t04772947811._2
1340+ let $t04771647798 = refreshDLpInternal(-(outAmtAmt), -(outPrAmt), 0)
1341+ let refreshDLpActions = $t04771647798._1
1342+ let updatedDLp = $t04771647798._2
13441343 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
13451344 if ((isUpdatedDLpValid == isUpdatedDLpValid))
13461345 then (state ++ refreshDLpActions)
13471346 else throw("Strict value is not equal to itself.")
13481347 }
13491348 else throw("Strict value is not equal to itself.")
13501349 }
13511350 else throw("Strict value is not equal to itself.")
13521351 }
13531352
13541353
13551354
13561355 @Callable(i)
13571356 func getOneTknV2 (outAssetId,minOutAmount) = {
13581357 let isPoolOneTokenOperationsDisabled = {
13591358 let @ = invoke(fca, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
13601359 if ($isInstanceOf(@, "Boolean"))
13611360 then @
13621361 else throw(($getType(@) + " couldn't be cast to Boolean"))
13631362 }
13641363 let isGetDisabled = if (if (igs())
13651364 then true
13661365 else (cfgPoolStatus == PoolShutdown))
13671366 then true
13681367 else isPoolOneTokenOperationsDisabled
13691368 let checks = [if (if (!(isGetDisabled))
13701369 then true
13711370 else isManager(i))
13721371 then true
13731372 else throwErr("get operation is blocked by admin"), if ((size(i.payments) == 1))
13741373 then true
13751374 else throwErr("exactly 1 payment are expected")]
13761375 if ((checks == checks))
13771376 then {
1378- let $t04842948584 = getOneTknV2Internal(outAssetId, minOutAmount, i.payments, i.caller, i.originCaller, i.transactionId)
1379- let state = $t04842948584._1
1380- let totalAmount = $t04842948584._2
1377+ let $t04841648571 = getOneTknV2Internal(outAssetId, minOutAmount, i.payments, i.caller, i.originCaller, i.transactionId)
1378+ let state = $t04841648571._1
1379+ let totalAmount = $t04841648571._2
13811380 $Tuple2(state, totalAmount)
13821381 }
13831382 else throw("Strict value is not equal to itself.")
13841383 }
13851384
13861385
13871386
13881387 @Callable(i)
13891388 func refreshDLp () = {
13901389 let lastRefreshedBlockHeight = valueOrElse(getInteger(keyDLpRefreshedHeight), 0)
13911390 let checkLastRefreshedBlockHeight = if (((height - lastRefreshedBlockHeight) >= dLpRefreshDelay))
13921391 then unit
13931392 else throwErr(makeString([toString(dLpRefreshDelay), " blocks have not passed since the previous call"], ""))
13941393 if ((checkLastRefreshedBlockHeight == checkLastRefreshedBlockHeight))
13951394 then {
13961395 let dLp = valueOrErrorMessage(parseBigInt(valueOrElse(getString(this, keyDLp), "0")), fmtErr("invalid dLp"))
1397- let $t04910849172 = refreshDLpInternal(0, 0, 0)
1398- let dLpUpdateActions = $t04910849172._1
1399- let updatedDLp = $t04910849172._2
1396+ let $t04909549159 = refreshDLpInternal(0, 0, 0)
1397+ let dLpUpdateActions = $t04909549159._1
1398+ let updatedDLp = $t04909549159._2
14001399 let actions = if ((dLp != updatedDLp))
14011400 then dLpUpdateActions
14021401 else throwErr("nothing to refresh")
14031402 $Tuple2(actions, toString(updatedDLp))
14041403 }
14051404 else throw("Strict value is not equal to itself.")
14061405 }
14071406
14081407
14091408
14101409 @Callable(i)
14111410 func getOneTknV2READONLY (outAssetId,lpAssetAmount) = {
14121411 let amId = toBase58String(value(cfgAmountAssetId))
14131412 let prId = toBase58String(value(cfgPriceAssetId))
14141413 let lpId = toBase58String(value(cfgLpAssetId))
14151414 let xp = [toBigInt(getAccBalance(amId)), toBigInt(getAccBalance(prId))]
14161415 let lpEmission = toBigInt(valueOrErrorMessage(assetInfo(fromBase58String(lpId)), "invalid lp asset").quantity)
14171416 let D0 = getD(xp)
14181417 let D1 = (D0 - fraction(toBigInt(lpAssetAmount), D0, lpEmission))
14191418 let index = if ((outAssetId == amId))
14201419 then 0
14211420 else if ((outAssetId == prId))
14221421 then 1
14231422 else throw("invalid out asset id")
14241423 let newY = getYD(xp, index, D1)
14251424 let dy = (xp[index] - newY)
14261425 let totalGetRaw = max([0, toInt((dy - big1))])
1427- let $t05018250237 = takeFee(totalGetRaw, outFee)
1428- let totalGet = $t05018250237._1
1429- let feeAmount = $t05018250237._2
1426+ let $t05016950224 = takeFee(totalGetRaw, outFee)
1427+ let totalGet = $t05016950224._1
1428+ let feeAmount = $t05016950224._2
14301429 $Tuple2(nil, $Tuple2(totalGet, feeAmount))
14311430 }
14321431
14331432
14341433
14351434 @Callable(i)
14361435 func getOneTknV2WithBonusREADONLY (outAssetId,lpAssetAmount) = {
14371436 let amId = toBase58String(value(cfgAmountAssetId))
14381437 let prId = toBase58String(value(cfgPriceAssetId))
14391438 let lpId = toBase58String(value(cfgLpAssetId))
14401439 let amBalance = getAccBalance(amId)
14411440 let prBalance = getAccBalance(prId)
1442- let $t05061250727 = {
1441+ let $t05059950714 = {
14431442 let @ = invoke(this, "getOneTknV2READONLY", [outAssetId, lpAssetAmount], nil)
14441443 if ($isInstanceOf(@, "(Int, Int)"))
14451444 then @
14461445 else throw(($getType(@) + " couldn't be cast to (Int, Int)"))
14471446 }
1448- let totalGet = $t05061250727._1
1449- let feeAmount = $t05061250727._2
1447+ let totalGet = $t05059950714._1
1448+ let feeAmount = $t05059950714._2
14501449 let r = ego("", lpId, lpAssetAmount, this)
14511450 let outAmAmt = r._1
14521451 let outPrAmt = r._2
14531452 let sumOfGetAssets = (outAmAmt + outPrAmt)
14541453 let bonus = if ((sumOfGetAssets == 0))
14551454 then if ((totalGet == 0))
14561455 then 0
14571456 else throw("bonus calculation error")
14581457 else fraction((totalGet - sumOfGetAssets), scale8, sumOfGetAssets)
14591458 $Tuple2(nil, $Tuple3(totalGet, feeAmount, bonus))
14601459 }
14611460
14621461
14631462
14641463 @Callable(i)
14651464 func getNoLess (noLessThenAmtAsset,noLessThenPriceAsset) = {
14661465 let r = cg(i)
14671466 let outAmAmt = r._1
14681467 let outPrAmt = r._2
14691468 let pmtAmt = r._3
14701469 let pmtAssetId = r._4
14711470 let state = r._5
14721471 if ((noLessThenAmtAsset > outAmAmt))
14731472 then throw(((("Failed: " + toString(outAmAmt)) + " < ") + toString(noLessThenAmtAsset)))
14741473 else if ((noLessThenPriceAsset > outPrAmt))
14751474 then throw(((("Failed: " + toString(outPrAmt)) + " < ") + toString(noLessThenPriceAsset)))
14761475 else {
14771476 let currentDLp = calcCurrentDLp(toBigInt(0), toBigInt(0), toBigInt(0))
14781477 if ((currentDLp == currentDLp))
14791478 then {
14801479 let burnLPAssetOnFactory = invoke(fca, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
14811480 if ((burnLPAssetOnFactory == burnLPAssetOnFactory))
14821481 then {
1483- let $t05189351974 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1484- let refreshDLpActions = $t05189351974._1
1485- let updatedDLp = $t05189351974._2
1482+ let $t05188051961 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1483+ let refreshDLpActions = $t05188051961._1
1484+ let updatedDLp = $t05188051961._2
14861485 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
14871486 if ((isUpdatedDLpValid == isUpdatedDLpValid))
14881487 then (state ++ refreshDLpActions)
14891488 else throw("Strict value is not equal to itself.")
14901489 }
14911490 else throw("Strict value is not equal to itself.")
14921491 }
14931492 else throw("Strict value is not equal to itself.")
14941493 }
14951494 }
14961495
14971496
14981497
14991498 @Callable(i)
15001499 func unstakeAndGet (amount) = {
15011500 let checkPayments = if ((size(i.payments) != 0))
15021501 then throw("No pmnts expd")
15031502 else true
15041503 if ((checkPayments == checkPayments))
15051504 then {
15061505 let factoryCfg = gfc()
15071506 let lpAssetId = cfgLpAssetId
15081507 let staking = valueOrErrorMessage(addressFromString(factoryCfg[idxFactStakCntr]), "Wr st addr")
15091508 let currentDLp = calcCurrentDLp(toBigInt(0), toBigInt(0), toBigInt(0))
15101509 if ((currentDLp == currentDLp))
15111510 then {
15121511 let unstakeInv = invoke(staking, "unstake", [toBase58String(lpAssetId), amount], nil)
15131512 if ((unstakeInv == unstakeInv))
15141513 then {
15151514 let r = ego(toBase58String(i.transactionId), toBase58String(lpAssetId), amount, i.caller)
15161515 let outAmAmt = r._1
15171516 let outPrAmt = r._2
15181517 let sts = parseIntValue(r._9)
15191518 let state = r._10
15201519 let v = if (if (igs())
15211520 then true
15221521 else (sts == PoolShutdown))
15231522 then throw(("Blocked: " + toString(sts)))
15241523 else true
15251524 if ((v == v))
15261525 then {
15271526 let burnA = invoke(fca, "burn", [amount], [AttachedPayment(lpAssetId, amount)])
15281527 if ((burnA == burnA))
15291528 then {
1530- let $t05300153082 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1531- let refreshDLpActions = $t05300153082._1
1532- let updatedDLp = $t05300153082._2
1529+ let $t05298853069 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1530+ let refreshDLpActions = $t05298853069._1
1531+ let updatedDLp = $t05298853069._2
15331532 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
15341533 if ((isUpdatedDLpValid == isUpdatedDLpValid))
15351534 then (state ++ refreshDLpActions)
15361535 else throw("Strict value is not equal to itself.")
15371536 }
15381537 else throw("Strict value is not equal to itself.")
15391538 }
15401539 else throw("Strict value is not equal to itself.")
15411540 }
15421541 else throw("Strict value is not equal to itself.")
15431542 }
15441543 else throw("Strict value is not equal to itself.")
15451544 }
15461545 else throw("Strict value is not equal to itself.")
15471546 }
15481547
15491548
15501549
15511550 @Callable(i)
15521551 func unstakeAndGetNoLess (unstakeAmount,noLessThenAmountAsset,noLessThenPriceAsset) = {
15531552 let isGetDisabled = if (igs())
15541553 then true
15551554 else (cfgPoolStatus == PoolShutdown)
15561555 let checks = [if (!(isGetDisabled))
15571556 then true
15581557 else throw("get operation is blocked by admin"), if ((size(i.payments) == 0))
15591558 then true
15601559 else throw("no payments are expected")]
15611560 if ((checks == checks))
15621561 then {
15631562 let currentDLp = calcCurrentDLp(toBigInt(0), toBigInt(0), toBigInt(0))
15641563 if ((currentDLp == currentDLp))
15651564 then {
15661565 let unstakeInv = invoke(stakingContract, "unstake", [toBase58String(cfgLpAssetId), unstakeAmount], nil)
15671566 if ((unstakeInv == unstakeInv))
15681567 then {
15691568 let res = ego(toBase58String(i.transactionId), toBase58String(cfgLpAssetId), unstakeAmount, i.caller)
15701569 let outAmAmt = res._1
15711570 let outPrAmt = res._2
15721571 let state = res._10
15731572 let checkAmounts = [if ((outAmAmt >= noLessThenAmountAsset))
15741573 then true
15751574 else throw(makeString(["amount asset amount to receive is less than ", toString(noLessThenAmountAsset)], "")), if ((outPrAmt >= noLessThenPriceAsset))
15761575 then true
15771576 else throw(makeString(["price asset amount to receive is less than ", toString(noLessThenPriceAsset)], ""))]
15781577 if ((checkAmounts == checkAmounts))
15791578 then {
15801579 let burnLPAssetOnFactory = invoke(fca, "burn", [unstakeAmount], [AttachedPayment(cfgLpAssetId, unstakeAmount)])
15811580 if ((burnLPAssetOnFactory == burnLPAssetOnFactory))
15821581 then {
1583- let $t05433354414 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1584- let refreshDLpActions = $t05433354414._1
1585- let updatedDLp = $t05433354414._2
1582+ let $t05432054401 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1583+ let refreshDLpActions = $t05432054401._1
1584+ let updatedDLp = $t05432054401._2
15861585 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
15871586 if ((isUpdatedDLpValid == isUpdatedDLpValid))
15881587 then (state ++ refreshDLpActions)
15891588 else throw("Strict value is not equal to itself.")
15901589 }
15911590 else throw("Strict value is not equal to itself.")
15921591 }
15931592 else throw("Strict value is not equal to itself.")
15941593 }
15951594 else throw("Strict value is not equal to itself.")
15961595 }
15971596 else throw("Strict value is not equal to itself.")
15981597 }
15991598 else throw("Strict value is not equal to itself.")
16001599 }
16011600
16021601
16031602
16041603 @Callable(i)
16051604 func unstakeAndGetOneTknV2 (unstakeAmount,outAssetId,minOutAmount) = {
16061605 let isPoolOneTokenOperationsDisabled = {
16071606 let @ = invoke(fca, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
16081607 if ($isInstanceOf(@, "Boolean"))
16091608 then @
16101609 else throw(($getType(@) + " couldn't be cast to Boolean"))
16111610 }
16121611 let isGetDisabled = if (if (igs())
16131612 then true
16141613 else (cfgPoolStatus == PoolShutdown))
16151614 then true
16161615 else isPoolOneTokenOperationsDisabled
16171616 let checks = [if (if (!(isGetDisabled))
16181617 then true
16191618 else isManager(i))
16201619 then true
16211620 else throwErr("get operation is blocked by admin"), if ((size(i.payments) == 0))
16221621 then true
16231622 else throwErr("no payments are expected")]
16241623 if ((checks == checks))
16251624 then {
16261625 let factoryCfg = gfc()
16271626 let lpAssetId = cfgLpAssetId
16281627 let staking = valueOrErrorMessage(addressFromString(factoryCfg[idxFactStakCntr]), "Wr st addr")
16291628 let userAddress = i.caller
16301629 let lpAssetRecipientAddress = this
16311630 let unstakeInv = invoke(staking, "unstakeINTERNAL", [lpAssetId, unstakeAmount, userAddress.bytes, lpAssetRecipientAddress.bytes], nil)
16321631 if ((unstakeInv == unstakeInv))
16331632 then {
1634- let $t05543655624 = getOneTknV2Internal(outAssetId, minOutAmount, [AttachedPayment(lpAssetId, unstakeAmount)], i.caller, i.originCaller, i.transactionId)
1635- let state = $t05543655624._1
1636- let totalAmount = $t05543655624._2
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
16371636 $Tuple2(state, totalAmount)
16381637 }
16391638 else throw("Strict value is not equal to itself.")
16401639 }
16411640 else throw("Strict value is not equal to itself.")
16421641 }
16431642
16441643
16451644
16461645 @Callable(i)
16471646 func putOneTknV2WithBonusREADONLY (paymentAmountRaw,paymentAssetId) = {
1648- let $t05575255855 = calcPutOneTkn(paymentAmountRaw, paymentAssetId, "", "", true)
1649- let lpAmount = $t05575255855._1
1650- let state = $t05575255855._2
1651- let feeAmount = $t05575255855._3
1652- let bonus = $t05575255855._4
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
16531652 $Tuple2(nil, $Tuple3(lpAmount, feeAmount, bonus))
16541653 }
16551654
16561655
16571656
16581657 @Callable(i)
16591658 func putOneTknV2WithoutTakeFeeREADONLY (paymentAmountRaw,paymentAssetId) = {
1660- let $t05600356107 = calcPutOneTkn(paymentAmountRaw, paymentAssetId, "", "", false)
1661- let lpAmount = $t05600356107._1
1662- let state = $t05600356107._2
1663- let feeAmount = $t05600356107._3
1664- let bonus = $t05600356107._4
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
16651664 $Tuple2(nil, $Tuple3(lpAmount, feeAmount, bonus))
16661665 }
16671666
16681667
16691668
16701669 @Callable(i)
16711670 func activate (amtAsStr,prAsStr) = if ((toString(i.caller) != toString(fca)))
16721671 then throw("denied")
16731672 else $Tuple2([StringEntry(aa(), amtAsStr), StringEntry(pa(), prAsStr)], "success")
1674-
1675-
1676-
1677-@Callable(i)
1678-func setS (k,v) = if ((toString(i.caller) != strf(this, ada())))
1679- then pd
1680- else [StringEntry(k, v)]
1681-
1682-
1683-
1684-@Callable(i)
1685-func setI (k,v) = if ((toString(i.caller) != strf(this, ada())))
1686- then pd
1687- else [IntegerEntry(k, v)]
16881673
16891674
16901675
16911676 @Callable(i)
16921677 func getPoolConfigWrapperREADONLY () = $Tuple2(nil, gpc())
16931678
16941679
16951680
16961681 @Callable(i)
16971682 func getAccBalanceWrapperREADONLY (assetId) = $Tuple2(nil, getAccBalance(assetId))
16981683
16991684
17001685
17011686 @Callable(i)
17021687 func calcPricesWrapperREADONLY (amAmt,prAmt,lpAmt) = {
17031688 let pr = calcPrices(amAmt, prAmt, lpAmt)
17041689 $Tuple2(nil, [toString(pr[0]), toString(pr[1]), toString(pr[2])])
17051690 }
17061691
17071692
17081693
17091694 @Callable(i)
17101695 func fromX18WrapperREADONLY (val,resScaleMult) = $Tuple2(nil, f1(parseBigIntValue(val), resScaleMult))
17111696
17121697
17131698
17141699 @Callable(i)
17151700 func toX18WrapperREADONLY (origVal,origScaleMult) = $Tuple2(nil, toString(t1(origVal, origScaleMult)))
17161701
17171702
17181703
17191704 @Callable(i)
17201705 func calcPriceBigIntWrapperREADONLY (prAmtX18,amAmtX18) = $Tuple2(nil, toString(cpbi(parseBigIntValue(prAmtX18), parseBigIntValue(amAmtX18))))
17211706
17221707
17231708
17241709 @Callable(i)
17251710 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, ""))
17261711
17271712
17281713
17291714 @Callable(i)
17301715 func estimateGetOperationWrapperREADONLY (txId58,pmtAsId,pmtLpAmt,usrAddr) = {
17311716 let r = ego(txId58, pmtAsId, pmtLpAmt, addressFromStringValue(usrAddr))
17321717 $Tuple2(nil, $Tuple10(r._1, r._2, r._3, r._4, r._5, r._6, r._7, toString(r._8), r._9, r._10))
17331718 }
17341719
17351720
17361721
17371722 @Callable(i)
17381723 func changeAmp () = {
17391724 let cfg = invoke(fca, "getChangeAmpConfigREADONLY", [toString(this)], nil)
1740- let $t05879458993 = match cfg {
1725+ let $t05844858647 = match cfg {
17411726 case list: List[Any] =>
17421727 $Tuple3({
17431728 let @ = list[0]
17441729 if ($isInstanceOf(@, "Int"))
17451730 then @
17461731 else throw(($getType(@) + " couldn't be cast to Int"))
17471732 }, {
17481733 let @ = list[1]
17491734 if ($isInstanceOf(@, "Int"))
17501735 then @
17511736 else throw(($getType(@) + " couldn't be cast to Int"))
17521737 }, {
17531738 let @ = list[2]
17541739 if ($isInstanceOf(@, "Int"))
17551740 then @
17561741 else throw(($getType(@) + " couldn't be cast to Int"))
17571742 })
17581743 case _ =>
17591744 throwErr("invalid entry type")
17601745 }
1761- let delay = $t05879458993._1
1762- let delta = $t05879458993._2
1763- let target = $t05879458993._3
1746+ let delay = $t05844858647._1
1747+ let delta = $t05844858647._2
1748+ let target = $t05844858647._3
17641749 let curAmp = parseIntValue(getStringValue(amp()))
17651750 let newAmpRaw = (curAmp + delta)
17661751 let newAmp = if ((0 > delta))
17671752 then if ((target > newAmpRaw))
17681753 then target
17691754 else newAmpRaw
17701755 else if ((newAmpRaw > target))
17711756 then target
17721757 else newAmpRaw
17731758 let lastCall = valueOrElse(getInteger(keyChangeAmpLastCall()), 0)
17741759 let wait = (lastCall + delay)
17751760 let checks = [if ((height > wait))
17761761 then true
17771762 else throwErr("try again in few blocks"), if ((curAmp != newAmp))
17781763 then true
17791764 else throwErr("already reached target")]
17801765 if ((checks == checks))
17811766 then [IntegerEntry(keyChangeAmpLastCall(), height), StringEntry(amp(), toString(newAmp)), StringEntry(keyAmpHistory(height), toString(newAmp))]
17821767 else throw("Strict value is not equal to itself.")
17831768 }
17841769
17851770
17861771 @Verifier(tx)
17871772 func verify () = {
17881773 let targetPublicKey = match m() {
17891774 case pk: ByteVector =>
17901775 pk
17911776 case _: Unit =>
17921777 tx.senderPublicKey
17931778 case _ =>
17941779 throw("Match error")
17951780 }
17961781 match tx {
17971782 case order: Order =>
17981783 let matcherPub = mp()
1799- let $t05990560022 = if (skipOrderValidation())
1784+ let $t05955959676 = if (skipOrderValidation())
18001785 then $Tuple2(true, "")
18011786 else validateMatcherOrderAllowed(order)
1802- let orderValid = $t05990560022._1
1803- let orderValidInfo = $t05990560022._2
1787+ let orderValid = $t05955959676._1
1788+ let orderValidInfo = $t05955959676._2
18041789 let senderValid = sigVerify(order.bodyBytes, order.proofs[0], order.senderPublicKey)
18051790 let matcherValid = sigVerify(order.bodyBytes, order.proofs[1], matcherPub)
18061791 if (if (if (orderValid)
18071792 then senderValid
18081793 else false)
18091794 then matcherValid
18101795 else false)
18111796 then true
18121797 else throwOrderError(orderValid, orderValidInfo, senderValid, matcherValid)
18131798 case s: SetScriptTransaction =>
18141799 if (sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey))
18151800 then true
18161801 else {
18171802 let newHash = blake2b256(value(s.script))
18181803 let allowedHash = fromBase64String(value(getString(fca, keyAllowedLpStableScriptHash())))
18191804 let currentHash = scriptHash(this)
18201805 if ((allowedHash == newHash))
18211806 then (currentHash != newHash)
18221807 else false
18231808 }
18241809 case _ =>
18251810 sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey)
18261811 }
18271812 }
18281813

github/deemru/w8io/169f3d6 
284.40 ms