tx · 9wxxp9zeii9c6x5mca2jJ9m6mV9Q4nf6xDbbqzqVFSBR

3NAefciWv6f9fWvEXdGgpHfanJFG8HqfjuT:  -0.04200000 Waves

2023.03.24 14:03 [2504002] smart account 3NAefciWv6f9fWvEXdGgpHfanJFG8HqfjuT > SELF 0.00000000 Waves

{ "type": 13, "id": "9wxxp9zeii9c6x5mca2jJ9m6mV9Q4nf6xDbbqzqVFSBR", "fee": 4200000, "feeAssetId": null, "timestamp": 1679655802695, "version": 2, "chainId": 84, "sender": "3NAefciWv6f9fWvEXdGgpHfanJFG8HqfjuT", "senderPublicKey": "D1BL65meykxFZTCuq7jq9HSGLLnWvQamQPUNrguW5w39", "proofs": [ "2JbjDE7ajPvFKiGoxvwp5GbZmrfhihTrvtPu98BMeeLDmpyaHqVq911ixmUMQMNVBEu4xos4YaPNcwtXaNMz8Nd9" ], "script": "base64:BgLMLAgCEgUKAwEEARIHCgUBBAEIARIDCgEIEgMKAQgSABIECgIBBBIECgIBBBIDCgEBEgASBAoCCAESABIECgIIARIECgIIARIECgIBARIDCgEBEgUKAwEBARIFCgMBCAESBAoCAQgSBAoCAQgSBAoCCAgSBAoCCAgSBAoCCAESABIDCgEIEgUKAwEBARIECgIIARIECgIBARIECgIICBILCgkIAQECAQIIBAQSBgoECAgBCBIAIgZzY2FsZTgiDHNjYWxlOEJpZ0ludCIHc2NhbGUxOCIKemVyb0JpZ0ludCIEYmlnMCIEYmlnMSIEYmlnMiIEYmlnMyIEYmlnNCIKc2xpcHBhZ2U0RCILd2F2ZXNTdHJpbmciBUFtdWx0IgVEY29udiIDU0VQIgVFTVBUWSIKUG9vbEFjdGl2ZSIKUG9vbFB1dERpcyIOUG9vbE1hdGNoZXJEaXMiDFBvb2xTaHV0ZG93biIOaWR4UG9vbEFkZHJlc3MiCWlkeFBvb2xTdCIJaWR4TFBBc0lkIglpZHhBbUFzSWQiCWlkeFByQXNJZCILaWR4QW10QXNEY20iDWlkeFByaWNlQXNEY20iC2lkeElBbXR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jSAUCZ3EDCQD0AwMIBQJpeglib2R5Qnl0ZXMJAJEDAggFAml6BnByb29mcwAABQJpQgYEAmlFCQD2AwEJAQV2YWx1ZQEIBQJjSAZzY3JpcHQEAmlGCQDbBAEJAQV2YWx1ZQEJAJ0IAgUCYVYJAQJhRgAEAmlHCQDxBwEFBHRoaXMDCQAAAgUCaUYFAmlFCQECIT0CBQJpRwUCaUUHCQD0AwMIBQJpeglib2R5Qnl0ZXMJAJEDAggFAml6BnByb29mcwAABQJpQpDIMkQ=", "height": 2504002, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: D3zXNhuxNQLwU8LtbrQbEhuME8qYeC1ECv5gCz9up5GD Next: ExGc3NgbitCdkWmd3LQDw56uxJcgkdic1PkSm1TXZ8mH Diff:
OldNewDifferences
128128 func amp () = "%s__amp"
129129
130130
131+func keyAmpHistory (heightBlocks) = ("%s%d__amp__" + toString(heightBlocks))
132+
133+
131134 func ada () = "%s__addonAddr"
135+
136+
137+func keyChangeAmpLastCall () = "%s__changeAmpLastCall"
132138
133139
134140 let keyFee = "%s__fee"
164170
165171
166172 func keyFeeCollectorAddress () = "%s__feeCollectorAddress"
173+
174+
175+func keySkipOrderValidation (poolAddress) = ("%s%s__skipOrderValidation__" + poolAddress)
167176
168177
169178 func throwOrderError (orderValid,orderValidInfo,senderValid,matcherValid) = throw((((((((("order validation failed: orderValid=" + toString(orderValid)) + " (") + orderValidInfo) + ")") + " senderValid=") + toString(senderValid)) + " matcherValid=") + toString(matcherValid)))
231240
232241 let poolConfigParsed = parsePoolConfig(gpc())
233242
234-let $t079658194 = poolConfigParsed
243+let $t081948423 = poolConfigParsed
235244
236-let cfgPoolAddress = $t079658194._1
245+let cfgPoolAddress = $t081948423._1
237246
238-let cfgPoolStatus = $t079658194._2
247+let cfgPoolStatus = $t081948423._2
239248
240-let cfgLpAssetId = $t079658194._3
249+let cfgLpAssetId = $t081948423._3
241250
242-let cfgAmountAssetId = $t079658194._4
251+let cfgAmountAssetId = $t081948423._4
243252
244-let cfgPriceAssetId = $t079658194._5
253+let cfgPriceAssetId = $t081948423._5
245254
246-let cfgAmountAssetDecimals = $t079658194._6
255+let cfgAmountAssetDecimals = $t081948423._6
247256
248-let cfgPriceAssetDecimals = $t079658194._7
257+let cfgPriceAssetDecimals = $t081948423._7
249258
250-let cfgInAmountAssedId = $t079658194._8
259+let cfgInAmountAssedId = $t081948423._8
251260
252-let cfgInPriceAssetId = $t079658194._9
261+let cfgInPriceAssetId = $t081948423._9
253262
254263 func gfc () = split(strf(fca, fcfg()), SEP)
255264
369378 else $Tuple2(dNext, false)
370379 }
371380
372- let arr = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17]
373- let $t01270312751 = {
381+ let arr = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16]
382+ let $t01292812976 = {
374383 let $l = arr
375384 let $s = size($l)
376385 let $acc0 = $Tuple2(s, false)
380389
381390 func $f0_2 ($a,$i) = if (($i >= $s))
382391 then $a
383- else throw("List size exceeds 18")
392+ else throw("List size exceeds 17")
384393
385- $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($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18)
394+ $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)
386395 }
387- let d = $t01270312751._1
388- let found = $t01270312751._2
396+ let d = $t01292812976._1
397+ let found = $t01292812976._2
389398 if (found)
390399 then d
391400 else throw(("D calculation error, D = " + toString(d)))
521530 else calcLpAmt
522531 let amDiff = (inAmAmt - calcAmAssetPmt)
523532 let prDiff = (inPrAmt - calcPrAssetPmt)
524- let $t02059020935 = if (if (isOneAsset)
533+ let $t02081521160 = if (if (isOneAsset)
525534 then (pmtId == amIdStr)
526535 else false)
527536 then $Tuple2(pmtAmt, 0)
530539 else false)
531540 then $Tuple2(0, pmtAmt)
532541 else $Tuple2(calcAmAssetPmt, calcPrAssetPmt)
533- let writeAmAmt = $t02059020935._1
534- let writePrAmt = $t02059020935._2
542+ let writeAmAmt = $t02081521160._1
543+ let writePrAmt = $t02081521160._2
535544 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))]
536545 $Tuple13(calcLpAmt, emitLpAmt, curPrice, amBalance, prBalance, lpEm, lpId, sts, commonState, amDiff, prDiff, inAmId, inPrId)
537546 }
550559 let c = (((((D * D) / (x * n)) * D) * aPrecision) / (ann * n))
551560 let b = ((s + ((D * aPrecision) / ann)) - D)
552561 func calc (acc,cur) = {
553- let $t02213022150 = acc
554- let y = $t02213022150._1
555- let found = $t02213022150._2
562+ let $t02235522375 = acc
563+ let y = $t02235522375._1
564+ let found = $t02235522375._2
556565 if ((found != unit))
557566 then acc
558567 else {
565574 }
566575
567576 let arr = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
568- let $t02245722504 = {
577+ let $t02268222729 = {
569578 let $l = arr
570579 let $s = size($l)
571580 let $acc0 = $Tuple2(D, unit)
579588
580589 $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)
581590 }
582- let y = $t02245722504._1
583- let found = $t02245722504._2
591+ let y = $t02268222729._1
592+ let found = $t02268222729._2
584593 if ((found != unit))
585594 then y
586595 else throw(("Y calculation error, Y = " + toString(y)))
624633 let priceAssetBalance = getAccBalance(assetIdToString(cfgPriceAssetId))
625634 let amountAssetAmount = order.amount
626635 let priceAssetAmount = fraction(order.amount, order.price, scale8, FLOOR)
627- let $t02470224914 = if ((order.orderType == Buy))
636+ let $t02492725139 = if ((order.orderType == Buy))
628637 then $Tuple2(amountAssetAmount, -(priceAssetAmount))
629638 else $Tuple2(-(amountAssetAmount), priceAssetAmount)
630- let amountAssetBalanceDelta = $t02470224914._1
631- let priceAssetBalanceDelta = $t02470224914._2
639+ let amountAssetBalanceDelta = $t02492725139._1
640+ let priceAssetBalanceDelta = $t02492725139._2
632641 if (if (if (igs())
633642 then true
634643 else (cfgPoolStatus == PoolMatcherDis))
641650 then throw("Wr assets")
642651 else {
643652 let dLp = parseBigIntValue(valueOrElse(getString(this, keyDLp), "0"))
644- let $t02525625356 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
645- let unusedActions = $t02525625356._1
646- let dLpNew = $t02525625356._2
653+ let $t02548125581 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
654+ let unusedActions = $t02548125581._1
655+ let dLpNew = $t02548125581._2
647656 let isOrderValid = (dLpNew >= dLp)
648657 let info = makeString(["dLp=", toString(dLp), " dLpNew=", toString(dLpNew), " amountAssetBalance=", toString(amountAssetBalance), " priceAssetBalance=", toString(priceAssetBalance), " amountAssetBalanceDelta=", toString(amountAssetBalanceDelta), " priceAssetBalanceDelta=", toString(priceAssetBalanceDelta), " height=", toString(height)], "")
649658 $Tuple2(isOrderValid, info)
697706 then {
698707 let amBalance = getAccBalance(amId)
699708 let prBalance = getAccBalance(prId)
700- let $t02801228474 = if ((txId == ""))
709+ let $t02823728699 = if ((txId == ""))
701710 then $Tuple2(amBalance, prBalance)
702711 else if ((pmtAssetId == amId))
703712 then if ((pmtAmtRaw > amBalance))
708717 then throw("invalid payment amount")
709718 else $Tuple2(amBalance, (prBalance - pmtAmtRaw))
710719 else throw("wrong pmtAssetId")
711- let amBalanceOld = $t02801228474._1
712- let prBalanceOld = $t02801228474._2
713- let $t02848028656 = if ((pmtAssetId == amId))
720+ let amBalanceOld = $t02823728699._1
721+ let prBalanceOld = $t02823728699._2
722+ let $t02870528881 = if ((pmtAssetId == amId))
714723 then $Tuple2(pmtAmtRaw, 0)
715724 else if ((pmtAssetId == prId))
716725 then $Tuple2(0, pmtAmtRaw)
717726 else throw("invalid payment")
718- let amAmountRaw = $t02848028656._1
719- let prAmountRaw = $t02848028656._2
720- let $t02866028914 = if (withTakeFee)
727+ let amAmountRaw = $t02870528881._1
728+ let prAmountRaw = $t02870528881._2
729+ let $t02888529139 = if (withTakeFee)
721730 then $Tuple3(takeFee(amAmountRaw, inFee)._1, takeFee(prAmountRaw, inFee)._1, takeFee(pmtAmtRaw, inFee)._2)
722731 else $Tuple3(amAmountRaw, prAmountRaw, 0)
723- let amAmount = $t02866028914._1
724- let prAmount = $t02866028914._2
725- let feeAmount = $t02866028914._3
732+ let amAmount = $t02888529139._1
733+ let prAmount = $t02888529139._2
734+ let feeAmount = $t02888529139._3
726735 let amBalanceNew = (amBalanceOld + amAmount)
727736 let prBalanceNew = (prBalanceOld + prAmount)
728737 let D0 = getD([t1(amBalanceOld, cfgAmountAssetDecimals), t1(prBalanceOld, cfgPriceAssetDecimals)])
770779 else {
771780 let amBalance = getAccBalance(amId)
772781 let prBalance = getAccBalance(prId)
773- let $t03102631137 = {
782+ let $t03125131362 = {
774783 let @ = invoke(this, "getOneTknV2READONLY", [outAssetId, pmtAmt], nil)
775784 if ($isInstanceOf(@, "(Int, Int)"))
776785 then @
777786 else throw(($getType(@) + " couldn't be cast to (Int, Int)"))
778787 }
779- if (($t03102631137 == $t03102631137))
788+ if (($t03125131362 == $t03125131362))
780789 then {
781- let feeAmount = $t03102631137._2
782- let totalGet = $t03102631137._1
790+ let feeAmount = $t03125131362._2
791+ let totalGet = $t03125131362._1
783792 let totalAmount = if (if ((minOutAmount > 0))
784793 then (minOutAmount > totalGet)
785794 else false)
786795 then throwErr(makeString(["amount to receive is less than ", toString(minOutAmount)], ""))
787796 else totalGet
788- let $t03132731634 = if ((outAssetId == amId))
797+ let $t03155231859 = if ((outAssetId == amId))
789798 then $Tuple4(totalAmount, 0, ((amBalance - totalAmount) - feeAmount), prBalance)
790799 else if ((outAssetId == prId))
791800 then $Tuple4(0, totalAmount, amBalance, ((prBalance - totalAmount) - feeAmount))
792801 else throw("invalid out asset id")
793- let outAm = $t03132731634._1
794- let outPr = $t03132731634._2
795- let amBalanceNew = $t03132731634._3
796- let prBalanceNew = $t03132731634._4
802+ let outAm = $t03155231859._1
803+ let outPr = $t03155231859._2
804+ let amBalanceNew = $t03155231859._3
805+ let prBalanceNew = $t03155231859._4
797806 let curPrX18 = cpbi(t1(prBalanceNew, prDecimals), t1(amBalanceNew, amDecimals))
798807 let curPr = f1(curPrX18, scale8)
799808 let outAssetIdOrWaves = if ((outAssetId == "WAVES"))
808817 let burn = invoke(fca, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
809818 if ((burn == burn))
810819 then {
811- let $t03241932769 = {
820+ let $t03264432994 = {
812821 let feeAmountForCalc = if ((this == feeCollectorAddress))
813822 then 0
814823 else feeAmount
819828 then $Tuple2(-((totalGet + feeAmountForCalc)), 0)
820829 else $Tuple2(0, -((totalGet + feeAmountForCalc)))
821830 }
822- let amountAssetBalanceDelta = $t03241932769._1
823- let priceAssetBalanceDelta = $t03241932769._2
824- let $t03277232880 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
825- let refreshDLpActions = $t03277232880._1
826- let updatedDLp = $t03277232880._2
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
827836 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
828837 if ((isUpdatedDLpValid == isUpdatedDLpValid))
829838 then $Tuple2((state ++ refreshDLpActions), totalAmount)
902911 let c = (((((D * D) / (x * n)) * D) * aPrecision) / (ann * n))
903912 let b = ((s + ((D * aPrecision) / ann)) - D)
904913 func calc (acc,cur) = {
905- let $t03432734347 = acc
906- let y = $t03432734347._1
907- let found = $t03432734347._2
914+ let $t03455234572 = acc
915+ let y = $t03455234572._1
916+ let found = $t03455234572._2
908917 if ((found != unit))
909918 then acc
910919 else {
917926 }
918927
919928 let arr = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
920- let $t03467834725 = {
929+ let $t03490334950 = {
921930 let $l = arr
922931 let $s = size($l)
923932 let $acc0 = $Tuple2(D, unit)
931940
932941 $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)
933942 }
934- let y = $t03467834725._1
935- let found = $t03467834725._2
943+ let y = $t03490334950._1
944+ let found = $t03490334950._2
936945 if ((found != unit))
937946 then y
938947 else throw(("Y calculation error, Y = " + toString(y)))
939948 }
940949
941950
951+func skipOrderValidation () = valueOrElse(getBoolean(fca, keySkipOrderValidation(toString(this))), false)
952+
953+
942954 @Callable(i)
943955 func calculateAmountOutForSwapREADONLY (cleanAmountIn,isReverse,feePoolAmount) = {
944- let $t03496635390 = if ((isReverse == false))
956+ let $t03530235726 = if ((isReverse == false))
945957 then {
946958 let assetOut = strf(this, pa())
947959 let poolAmountInBalance = (toBigInt(getAccBalance(strf(this, aa()))) + toBigInt(cleanAmountIn))
952964 let poolAmountInBalance = (toBigInt(getAccBalance(strf(this, pa()))) + toBigInt(cleanAmountIn))
953965 $Tuple2(assetOut, poolAmountInBalance)
954966 }
955- let assetOut = $t03496635390._1
956- let poolAmountInBalance = $t03496635390._2
967+ let assetOut = $t03530235726._1
968+ let poolAmountInBalance = $t03530235726._2
957969 let poolConfig = gpc()
958970 let amId = poolConfig[idxAmAsId]
959971 let prId = poolConfig[idxPrAsId]
9931005 then {
9941006 let pmt = value(i.payments[0])
9951007 let assetIn = assetIdToString(pmt.assetId)
996- let $t03682637220 = if ((isReverse == false))
1008+ let $t03716237556 = if ((isReverse == false))
9971009 then {
9981010 let assetOut = strf(this, pa())
9991011 let poolAmountInBalance = (getAccBalance(assetIn) - value(i.payments[0]).amount)
10041016 let poolAmountInBalance = (getAccBalance(assetIn) - value(i.payments[0]).amount)
10051017 $Tuple2(assetOut, poolAmountInBalance)
10061018 }
1007- let assetOut = $t03682637220._1
1008- let poolAmountInBalance = $t03682637220._2
1019+ let assetOut = $t03716237556._1
1020+ let poolAmountInBalance = $t03716237556._2
10091021 let poolConfig = gpc()
10101022 let amId = poolConfig[idxAmAsId]
10111023 let prId = poolConfig[idxPrAsId]
11451157 else throw("Strict value is not equal to itself.")
11461158 }
11471159 else [ScriptTransfer(i.caller, emitLpAmt, lpAssetId)]
1148- let $t04183941981 = refreshDLpInternal(0, 0, 0)
1149- let refreshDLpActions = $t04183941981._1
1150- let updatedDLp = $t04183941981._2
1160+ let $t04217542317 = refreshDLpInternal(0, 0, 0)
1161+ let refreshDLpActions = $t04217542317._1
1162+ let updatedDLp = $t04217542317._2
11511163 let check = if ((updatedDLp >= currentDLp))
11521164 then true
11531165 else throwErr(makeString(["updated DLp lower than current DLp", toString(amountAssetBalance), toString(priceAssetBalance), toString(lpAssetEmission), toString(currentDLp), toString(updatedDLp), toString(amDiff), toString(prDiff)], " "))
12201232 else calcCurrentDLp(toBigInt(0), toBigInt(pmtAmt), toBigInt(0))
12211233 if ((currentDLp == currentDLp))
12221234 then {
1223- let $t04362243780 = calcPutOneTkn(pmtAmt, pmtAssetId, toString(userAddress), toBase58String(i.transactionId), true)
1224- if (($t04362243780 == $t04362243780))
1235+ let $t04395844116 = calcPutOneTkn(pmtAmt, pmtAssetId, toString(userAddress), toBase58String(i.transactionId), true)
1236+ if (($t04395844116 == $t04395844116))
12251237 then {
1226- let feeAmount = $t04362243780._3
1227- let state = $t04362243780._2
1228- let estimLP = $t04362243780._1
1238+ let feeAmount = $t04395844116._3
1239+ let state = $t04395844116._2
1240+ let estimLP = $t04395844116._1
12291241 let emitLpAmt = if (if ((minOutAmount > 0))
12301242 then (minOutAmount > estimLP)
12311243 else false)
12441256 then {
12451257 let lpTrnsfr = if (autoStake)
12461258 then {
1247- let ss = invoke(stakingContract, "stake", nil, [AttachedPayment(lpId, emitLpAmt)])
1259+ let ss = invoke(stakingContract, "stakeFor", [toString(i.caller)], [AttachedPayment(lpId, emitLpAmt)])
12481260 if ((ss == ss))
12491261 then nil
12501262 else throw("Strict value is not equal to itself.")
12531265 let sendFeeToMatcher = if ((feeAmount > 0))
12541266 then [ScriptTransfer(feeCollectorAddress, feeAmount, fromBase58String(pmtAssetId))]
12551267 else nil
1256- let $t04459544944 = if ((this == feeCollectorAddress))
1268+ let $t04500145350 = if ((this == feeCollectorAddress))
12571269 then $Tuple2(0, 0)
12581270 else {
12591271 let paymentInAmountAsset = if ((pmt.assetId == cfgAmountAssetId))
12631275 then $Tuple2(-(feeAmount), 0)
12641276 else $Tuple2(0, -(feeAmount))
12651277 }
1266- let amountAssetBalanceDelta = $t04459544944._1
1267- let priceAssetBalanceDelta = $t04459544944._2
1268- let $t04494745055 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
1269- let refreshDLpActions = $t04494745055._1
1270- let updatedDLp = $t04494745055._2
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
12711283 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
12721284 if ((isUpdatedDLpValid == isUpdatedDLpValid))
12731285 then $Tuple2((((state ++ lpTrnsfr) ++ sendFeeToMatcher) ++ refreshDLpActions), emitLpAmt)
12991311 let currentDLp = calcCurrentDLp(amAssetPmt, prAssetPmt, toBigInt(0))
13001312 if ((currentDLp == currentDLp))
13011313 then {
1302- let $t04608546150 = refreshDLpInternal(0, 0, 0)
1303- let refreshDLpActions = $t04608546150._1
1304- let updatedDLp = $t04608546150._2
1314+ let $t04649146556 = refreshDLpInternal(0, 0, 0)
1315+ let refreshDLpActions = $t04649146556._1
1316+ let updatedDLp = $t04649146556._2
13051317 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
13061318 if ((isUpdatedDLpValid == isUpdatedDLpValid))
13071319 then (state ++ refreshDLpActions)
13261338 let b = invoke(fca, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
13271339 if ((b == b))
13281340 then {
1329- let $t04732347405 = refreshDLpInternal(-(outAmtAmt), -(outPrAmt), 0)
1330- let refreshDLpActions = $t04732347405._1
1331- let updatedDLp = $t04732347405._2
1341+ let $t04772947811 = refreshDLpInternal(-(outAmtAmt), -(outPrAmt), 0)
1342+ let refreshDLpActions = $t04772947811._1
1343+ let updatedDLp = $t04772947811._2
13321344 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
13331345 if ((isUpdatedDLpValid == isUpdatedDLpValid))
13341346 then (state ++ refreshDLpActions)
13631375 else throwErr("exactly 1 payment are expected")]
13641376 if ((checks == checks))
13651377 then {
1366- let $t04802348178 = getOneTknV2Internal(outAssetId, minOutAmount, i.payments, i.caller, i.originCaller, i.transactionId)
1367- let state = $t04802348178._1
1368- let totalAmount = $t04802348178._2
1378+ let $t04842948584 = getOneTknV2Internal(outAssetId, minOutAmount, i.payments, i.caller, i.originCaller, i.transactionId)
1379+ let state = $t04842948584._1
1380+ let totalAmount = $t04842948584._2
13691381 $Tuple2(state, totalAmount)
13701382 }
13711383 else throw("Strict value is not equal to itself.")
13821394 if ((checkLastRefreshedBlockHeight == checkLastRefreshedBlockHeight))
13831395 then {
13841396 let dLp = valueOrErrorMessage(parseBigInt(valueOrElse(getString(this, keyDLp), "0")), fmtErr("invalid dLp"))
1385- let $t04870248766 = refreshDLpInternal(0, 0, 0)
1386- let dLpUpdateActions = $t04870248766._1
1387- let updatedDLp = $t04870248766._2
1397+ let $t04910849172 = refreshDLpInternal(0, 0, 0)
1398+ let dLpUpdateActions = $t04910849172._1
1399+ let updatedDLp = $t04910849172._2
13881400 let actions = if ((dLp != updatedDLp))
13891401 then dLpUpdateActions
13901402 else throwErr("nothing to refresh")
14121424 let newY = getYD(xp, index, D1)
14131425 let dy = (xp[index] - newY)
14141426 let totalGetRaw = max([0, toInt((dy - big1))])
1415- let $t04977649831 = takeFee(totalGetRaw, outFee)
1416- let totalGet = $t04977649831._1
1417- let feeAmount = $t04977649831._2
1427+ let $t05018250237 = takeFee(totalGetRaw, outFee)
1428+ let totalGet = $t05018250237._1
1429+ let feeAmount = $t05018250237._2
14181430 $Tuple2(nil, $Tuple2(totalGet, feeAmount))
14191431 }
14201432
14271439 let lpId = toBase58String(value(cfgLpAssetId))
14281440 let amBalance = getAccBalance(amId)
14291441 let prBalance = getAccBalance(prId)
1430- let $t05020650321 = {
1442+ let $t05061250727 = {
14311443 let @ = invoke(this, "getOneTknV2READONLY", [outAssetId, lpAssetAmount], nil)
14321444 if ($isInstanceOf(@, "(Int, Int)"))
14331445 then @
14341446 else throw(($getType(@) + " couldn't be cast to (Int, Int)"))
14351447 }
1436- let totalGet = $t05020650321._1
1437- let feeAmount = $t05020650321._2
1448+ let totalGet = $t05061250727._1
1449+ let feeAmount = $t05061250727._2
14381450 let r = ego("", lpId, lpAssetAmount, this)
14391451 let outAmAmt = r._1
14401452 let outPrAmt = r._2
14681480 let burnLPAssetOnFactory = invoke(fca, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
14691481 if ((burnLPAssetOnFactory == burnLPAssetOnFactory))
14701482 then {
1471- let $t05148751568 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1472- let refreshDLpActions = $t05148751568._1
1473- let updatedDLp = $t05148751568._2
1483+ let $t05189351974 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1484+ let refreshDLpActions = $t05189351974._1
1485+ let updatedDLp = $t05189351974._2
14741486 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
14751487 if ((isUpdatedDLpValid == isUpdatedDLpValid))
14761488 then (state ++ refreshDLpActions)
15151527 let burnA = invoke(fca, "burn", [amount], [AttachedPayment(lpAssetId, amount)])
15161528 if ((burnA == burnA))
15171529 then {
1518- let $t05259552676 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1519- let refreshDLpActions = $t05259552676._1
1520- let updatedDLp = $t05259552676._2
1530+ let $t05300153082 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1531+ let refreshDLpActions = $t05300153082._1
1532+ let updatedDLp = $t05300153082._2
15211533 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
15221534 if ((isUpdatedDLpValid == isUpdatedDLpValid))
15231535 then (state ++ refreshDLpActions)
15681580 let burnLPAssetOnFactory = invoke(fca, "burn", [unstakeAmount], [AttachedPayment(cfgLpAssetId, unstakeAmount)])
15691581 if ((burnLPAssetOnFactory == burnLPAssetOnFactory))
15701582 then {
1571- let $t05392754008 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1572- let refreshDLpActions = $t05392754008._1
1573- let updatedDLp = $t05392754008._2
1583+ let $t05433354414 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1584+ let refreshDLpActions = $t05433354414._1
1585+ let updatedDLp = $t05433354414._2
15741586 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
15751587 if ((isUpdatedDLpValid == isUpdatedDLpValid))
15761588 then (state ++ refreshDLpActions)
16191631 let unstakeInv = invoke(staking, "unstakeINTERNAL", [lpAssetId, unstakeAmount, userAddress.bytes, lpAssetRecipientAddress.bytes], nil)
16201632 if ((unstakeInv == unstakeInv))
16211633 then {
1622- let $t05503055218 = getOneTknV2Internal(outAssetId, minOutAmount, [AttachedPayment(lpAssetId, unstakeAmount)], i.caller, i.originCaller, i.transactionId)
1623- let state = $t05503055218._1
1624- let totalAmount = $t05503055218._2
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
16251637 $Tuple2(state, totalAmount)
16261638 }
16271639 else throw("Strict value is not equal to itself.")
16331645
16341646 @Callable(i)
16351647 func putOneTknV2WithBonusREADONLY (paymentAmountRaw,paymentAssetId) = {
1636- let $t05534655449 = calcPutOneTkn(paymentAmountRaw, paymentAssetId, "", "", true)
1637- let lpAmount = $t05534655449._1
1638- let state = $t05534655449._2
1639- let feeAmount = $t05534655449._3
1640- let bonus = $t05534655449._4
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
16411653 $Tuple2(nil, $Tuple3(lpAmount, feeAmount, bonus))
16421654 }
16431655
16451657
16461658 @Callable(i)
16471659 func putOneTknV2WithoutTakeFeeREADONLY (paymentAmountRaw,paymentAssetId) = {
1648- let $t05559755701 = calcPutOneTkn(paymentAmountRaw, paymentAssetId, "", "", false)
1649- let lpAmount = $t05559755701._1
1650- let state = $t05559755701._2
1651- let feeAmount = $t05559755701._3
1652- let bonus = $t05559755701._4
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
16531665 $Tuple2(nil, $Tuple3(lpAmount, feeAmount, bonus))
16541666 }
16551667
17211733 }
17221734
17231735
1736+
1737+@Callable(i)
1738+func changeAmp () = {
1739+ let cfg = invoke(fca, "getChangeAmpConfigREADONLY", [toString(this)], nil)
1740+ let $t05879458993 = match cfg {
1741+ case list: List[Any] =>
1742+ $Tuple3({
1743+ let @ = list[0]
1744+ if ($isInstanceOf(@, "Int"))
1745+ then @
1746+ else throw(($getType(@) + " couldn't be cast to Int"))
1747+ }, {
1748+ let @ = list[1]
1749+ if ($isInstanceOf(@, "Int"))
1750+ then @
1751+ else throw(($getType(@) + " couldn't be cast to Int"))
1752+ }, {
1753+ let @ = list[2]
1754+ if ($isInstanceOf(@, "Int"))
1755+ then @
1756+ else throw(($getType(@) + " couldn't be cast to Int"))
1757+ })
1758+ case _ =>
1759+ throwErr("invalid entry type")
1760+ }
1761+ let delay = $t05879458993._1
1762+ let delta = $t05879458993._2
1763+ let target = $t05879458993._3
1764+ let curAmp = parseIntValue(getStringValue(amp()))
1765+ let newAmpRaw = (curAmp + delta)
1766+ let newAmp = if ((0 > delta))
1767+ then if ((target > newAmpRaw))
1768+ then target
1769+ else newAmpRaw
1770+ else if ((newAmpRaw > target))
1771+ then target
1772+ else newAmpRaw
1773+ let lastCall = valueOrElse(getInteger(keyChangeAmpLastCall()), 0)
1774+ let wait = (lastCall + delay)
1775+ let checks = [if ((height > wait))
1776+ then true
1777+ else throwErr("try again in few blocks"), if ((curAmp != newAmp))
1778+ then true
1779+ else throwErr("already reached target")]
1780+ if ((checks == checks))
1781+ then [IntegerEntry(keyChangeAmpLastCall(), height), StringEntry(amp(), toString(newAmp)), StringEntry(keyAmpHistory(height), toString(newAmp))]
1782+ else throw("Strict value is not equal to itself.")
1783+ }
1784+
1785+
17241786 @Verifier(tx)
17251787 func verify () = {
17261788 let targetPublicKey = match m() {
17341796 match tx {
17351797 case order: Order =>
17361798 let matcherPub = mp()
1737- let $t05849358562 = validateMatcherOrderAllowed(order)
1738- let orderValid = $t05849358562._1
1739- let orderValidInfo = $t05849358562._2
1799+ let $t05990560022 = if (skipOrderValidation())
1800+ then $Tuple2(true, "")
1801+ else validateMatcherOrderAllowed(order)
1802+ let orderValid = $t05990560022._1
1803+ let orderValidInfo = $t05990560022._2
17401804 let senderValid = sigVerify(order.bodyBytes, order.proofs[0], order.senderPublicKey)
17411805 let matcherValid = sigVerify(order.bodyBytes, order.proofs[1], matcherPub)
17421806 if (if (if (orderValid)
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let scale8 = 100000000
55
66 let scale8BigInt = toBigInt(100000000)
77
88 let scale18 = toBigInt(1000000000000000000)
99
1010 let zeroBigInt = toBigInt(0)
1111
1212 let big0 = toBigInt(0)
1313
1414 let big1 = toBigInt(1)
1515
1616 let big2 = toBigInt(2)
1717
1818 let big3 = toBigInt(3)
1919
2020 let big4 = toBigInt(4)
2121
2222 let slippage4D = toBigInt((scale8 - ((scale8 * 1) / scale8)))
2323
2424 let wavesString = "WAVES"
2525
2626 let Amult = "100"
2727
2828 let Dconv = "1"
2929
3030 let SEP = "__"
3131
3232 let EMPTY = ""
3333
3434 let PoolActive = 1
3535
3636 let PoolPutDis = 2
3737
3838 let PoolMatcherDis = 3
3939
4040 let PoolShutdown = 4
4141
4242 let idxPoolAddress = 1
4343
4444 let idxPoolSt = 2
4545
4646 let idxLPAsId = 3
4747
4848 let idxAmAsId = 4
4949
5050 let idxPrAsId = 5
5151
5252 let idxAmtAsDcm = 6
5353
5454 let idxPriceAsDcm = 7
5555
5656 let idxIAmtAsId = 8
5757
5858 let idxIPriceAsId = 9
5959
6060 let idxFactStakCntr = 1
6161
6262 let idxFactoryRestCntr = 6
6363
6464 let idxFactSlippCntr = 7
6565
6666 let idxFactGwxRewCntr = 10
6767
6868 let feeDefault = fraction(10, scale8, 10000)
6969
7070 func t1 (origVal,origScaleMult) = fraction(toBigInt(origVal), scale18, toBigInt(origScaleMult))
7171
7272
7373 func t1BigInt (origVal,origScaleMult) = fraction(origVal, scale18, origScaleMult)
7474
7575
7676 func f1 (val,resultScaleMult) = toInt(fraction(val, toBigInt(resultScaleMult), scale18))
7777
7878
7979 func fromX18Round (val,resultScaleMult,round) = toInt(fraction(val, toBigInt(resultScaleMult), scale18, round))
8080
8181
8282 func t2 (origVal,origScaleMult) = fraction(origVal, scale18, toBigInt(origScaleMult))
8383
8484
8585 func f2 (val,resultScaleMult) = fraction(val, toBigInt(resultScaleMult), scale18)
8686
8787
8888 func ts (amt,resScale,curScale) = fraction(amt, resScale, curScale)
8989
9090
9191 func abs (val) = if ((zeroBigInt > val))
9292 then -(val)
9393 else val
9494
9595
9696 func absBigInt (val) = if ((zeroBigInt > val))
9797 then -(val)
9898 else val
9999
100100
101101 func fc () = "%s__factoryContract"
102102
103103
104104 func mpk () = "%s__managerPublicKey"
105105
106106
107107 func pmpk () = "%s__pendingManagerPublicKey"
108108
109109
110110 func pl () = "%s%s__price__last"
111111
112112
113113 func ph (h,t) = makeString(["%s%s%d%d__price__history", toString(h), toString(t)], SEP)
114114
115115
116116 func pau (ua,txId) = ((("%s%s%s__P__" + ua) + "__") + txId)
117117
118118
119119 func gau (ua,txId) = ((("%s%s%s__G__" + ua) + "__") + txId)
120120
121121
122122 func aa () = "%s__amountAsset"
123123
124124
125125 func pa () = "%s__priceAsset"
126126
127127
128128 func amp () = "%s__amp"
129129
130130
131+func keyAmpHistory (heightBlocks) = ("%s%d__amp__" + toString(heightBlocks))
132+
133+
131134 func ada () = "%s__addonAddr"
135+
136+
137+func keyChangeAmpLastCall () = "%s__changeAmpLastCall"
132138
133139
134140 let keyFee = "%s__fee"
135141
136142 let fee = valueOrElse(getInteger(this, keyFee), feeDefault)
137143
138144 let keyDLp = makeString(["%s", "dLp"], SEP)
139145
140146 let keyDLpRefreshedHeight = makeString(["%s", "dLpRefreshedHeight"], SEP)
141147
142148 let keyDLpRefreshDelay = makeString(["%s", "refreshDLpDelay"], SEP)
143149
144150 let dLpRefreshDelayDefault = 30
145151
146152 let dLpRefreshDelay = valueOrElse(getInteger(this, keyDLpRefreshDelay), dLpRefreshDelayDefault)
147153
148154 func fcfg () = "%s__factoryConfig"
149155
150156
151157 func mtpk () = "%s%s__matcher__publicKey"
152158
153159
154160 func pc (iAmtAs,iPrAs) = (((("%d%d%s__" + iAmtAs) + "__") + iPrAs) + "__config")
155161
156162
157163 func mba (bAStr) = ("%s%s%s__mappings__baseAsset2internalId__" + bAStr)
158164
159165
160166 func aps () = "%s__shutdown"
161167
162168
163169 func keyAllowedLpStableScriptHash () = "%s__allowedLpStableScriptHash"
164170
165171
166172 func keyFeeCollectorAddress () = "%s__feeCollectorAddress"
173+
174+
175+func keySkipOrderValidation (poolAddress) = ("%s%s__skipOrderValidation__" + poolAddress)
167176
168177
169178 func throwOrderError (orderValid,orderValidInfo,senderValid,matcherValid) = throw((((((((("order validation failed: orderValid=" + toString(orderValid)) + " (") + orderValidInfo) + ")") + " senderValid=") + toString(senderValid)) + " matcherValid=") + toString(matcherValid)))
170179
171180
172181 func strf (addr,key) = valueOrErrorMessage(getString(addr, key), makeString(["mandatory ", toString(addr), ".", key, " not defined"], ""))
173182
174183
175184 func intf (addr,key) = valueOrErrorMessage(getInteger(addr, key), makeString(["mandatory ", toString(addr), ".", key, " not defined"], ""))
176185
177186
178187 func throwErr (msg) = throw(makeString(["lp_stable.ride:", msg], " "))
179188
180189
181190 func fmtErr (msg) = makeString(["lp_stable.ride:", msg], " ")
182191
183192
184193 let fca = addressFromStringValue(strf(this, fc()))
185194
186195 let inFee = {
187196 let @ = invoke(fca, "getInFeeREADONLY", [toString(this)], nil)
188197 if ($isInstanceOf(@, "Int"))
189198 then @
190199 else throw(($getType(@) + " couldn't be cast to Int"))
191200 }
192201
193202 let outFee = {
194203 let @ = invoke(fca, "getOutFeeREADONLY", [toString(this)], nil)
195204 if ($isInstanceOf(@, "Int"))
196205 then @
197206 else throw(($getType(@) + " couldn't be cast to Int"))
198207 }
199208
200209 let A = strf(this, amp())
201210
202211 func igs () = valueOrElse(getBoolean(fca, aps()), false)
203212
204213
205214 func mp () = fromBase58String(strf(fca, mtpk()))
206215
207216
208217 let feeCollectorAddress = addressFromStringValue(strf(fca, keyFeeCollectorAddress()))
209218
210219 func gpc () = {
211220 let amtAs = strf(this, aa())
212221 let priceAs = strf(this, pa())
213222 let iPriceAs = intf(fca, mba(priceAs))
214223 let iAmtAs = intf(fca, mba(amtAs))
215224 split(strf(fca, pc(toString(iAmtAs), toString(iPriceAs))), SEP)
216225 }
217226
218227
219228 func parseAssetId (input) = if ((input == wavesString))
220229 then unit
221230 else fromBase58String(input)
222231
223232
224233 func assetIdToString (input) = if ((input == unit))
225234 then wavesString
226235 else toBase58String(value(input))
227236
228237
229238 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]))
230239
231240
232241 let poolConfigParsed = parsePoolConfig(gpc())
233242
234-let $t079658194 = poolConfigParsed
243+let $t081948423 = poolConfigParsed
235244
236-let cfgPoolAddress = $t079658194._1
245+let cfgPoolAddress = $t081948423._1
237246
238-let cfgPoolStatus = $t079658194._2
247+let cfgPoolStatus = $t081948423._2
239248
240-let cfgLpAssetId = $t079658194._3
249+let cfgLpAssetId = $t081948423._3
241250
242-let cfgAmountAssetId = $t079658194._4
251+let cfgAmountAssetId = $t081948423._4
243252
244-let cfgPriceAssetId = $t079658194._5
253+let cfgPriceAssetId = $t081948423._5
245254
246-let cfgAmountAssetDecimals = $t079658194._6
255+let cfgAmountAssetDecimals = $t081948423._6
247256
248-let cfgPriceAssetDecimals = $t079658194._7
257+let cfgPriceAssetDecimals = $t081948423._7
249258
250-let cfgInAmountAssedId = $t079658194._8
259+let cfgInAmountAssedId = $t081948423._8
251260
252-let cfgInPriceAssetId = $t079658194._9
261+let cfgInPriceAssetId = $t081948423._9
253262
254263 func gfc () = split(strf(fca, fcfg()), SEP)
255264
256265
257266 let factoryConfig = gfc()
258267
259268 let stakingContract = valueOrErrorMessage(addressFromString(factoryConfig[idxFactStakCntr]), "Invalid staking contract address")
260269
261270 let slipageContract = valueOrErrorMessage(addressFromString(factoryConfig[idxFactSlippCntr]), "Invalid slipage contract address")
262271
263272 let gwxContract = valueOrErrorMessage(addressFromString(factoryConfig[idxFactGwxRewCntr]), "Invalid gwx contract address")
264273
265274 let restContract = valueOrErrorMessage(addressFromString(factoryConfig[idxFactoryRestCntr]), "Invalid gwx contract address")
266275
267276 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)
268277
269278
270279 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)
271280
272281
273282 func getAccBalance (assetId) = if ((assetId == "WAVES"))
274283 then wavesBalance(this).available
275284 else assetBalance(this, fromBase58String(assetId))
276285
277286
278287 func cpbi (prAmtX18,amAmtX18) = fraction(prAmtX18, scale18, amAmtX18)
279288
280289
281290 func cpbir (prAmtX18,amAmtX18,round) = fraction(prAmtX18, scale18, amAmtX18, round)
282291
283292
284293 func vad (A1,A2,slippage) = {
285294 let diff = fraction((A1 - A2), scale8BigInt, A2)
286295 let pass = ((slippage - abs(diff)) > zeroBigInt)
287296 if (!(pass))
288297 then throw(("Big slpg: " + toString(diff)))
289298 else $Tuple2(pass, min([A1, A2]))
290299 }
291300
292301
293302 func vd (D1,D0,slpg) = {
294303 let diff = fraction(D0, scale8BigInt, D1)
295304 let fail = (slpg > diff)
296305 if (if (fail)
297306 then true
298307 else (D0 > D1))
299308 then throw(((((((toString(D0) + " ") + toString(D1)) + " ") + toString(diff)) + " ") + toString(slpg)))
300309 else fail
301310 }
302311
303312
304313 func pcp (amAssetDcm,prAssetDcm,amAmt,prAmt) = {
305314 let amtAsAmtX18 = t1(amAmt, amAssetDcm)
306315 let prAsAmtX18 = t1(prAmt, prAssetDcm)
307316 cpbi(prAsAmtX18, amtAsAmtX18)
308317 }
309318
310319
311320 func calcPrices (amAmt,prAmt,lpAmt) = {
312321 let amtAsDcm = cfgAmountAssetDecimals
313322 let prAsDcm = cfgPriceAssetDecimals
314323 let priceX18 = pcp(amtAsDcm, prAsDcm, amAmt, prAmt)
315324 let amAmtX18 = t1(amAmt, amtAsDcm)
316325 let prAmtX18 = t1(prAmt, prAsDcm)
317326 let lpAmtX18 = t1(lpAmt, scale8)
318327 let lpPrInAmAsX18 = cpbi(amAmtX18, lpAmtX18)
319328 let lpPrInPrAsX18 = cpbi(prAmtX18, lpAmtX18)
320329 [priceX18, lpPrInAmAsX18, lpPrInPrAsX18]
321330 }
322331
323332
324333 func calculatePrices (amAmt,prAmt,lpAmt) = {
325334 let p = calcPrices(amAmt, prAmt, lpAmt)
326335 [f1(p[0], scale8), f1(p[1], scale8), f1(p[2], scale8)]
327336 }
328337
329338
330339 func takeFee (amount,fee) = {
331340 let feeAmount = if ((fee == 0))
332341 then 0
333342 else fraction(amount, fee, scale8)
334343 $Tuple2((amount - feeAmount), feeAmount)
335344 }
336345
337346
338347 func getD (xp) = {
339348 let xp0 = xp[0]
340349 let xp1 = xp[1]
341350 let s = (xp0 + xp1)
342351 if ((s == big0))
343352 then big0
344353 else {
345354 let a = parseIntValue(A)
346355 let ann = (a * 2)
347356 let p = fraction(xp0, xp1, big1)
348357 let xp0_xp1_n_n = fraction(p, big4, big1)
349358 let ann_s = fraction(toBigInt(ann), s, big1)
350359 let ann_1 = toBigInt((ann - 1))
351360 func calcDNext (d) = {
352361 let dd = fraction(d, d, big1)
353362 let ddd = fraction(dd, d, big1)
354363 let dp = fraction(ddd, big1, xp0_xp1_n_n)
355364 fraction((ann_s + fraction(dp, big2, big1)), d, (fraction(ann_1, d, big1) + fraction(big3, dp, big1)))
356365 }
357366
358367 func calc (acc,i) = if (acc._2)
359368 then acc
360369 else {
361370 let d = acc._1
362371 let dNext = calcDNext(d)
363372 let dDiffRaw = (dNext - value(d))
364373 let dDiff = if ((big0 > dDiffRaw))
365374 then -(dDiffRaw)
366375 else dDiffRaw
367376 if ((big1 >= dDiff))
368377 then $Tuple2(dNext, true)
369378 else $Tuple2(dNext, false)
370379 }
371380
372- let arr = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17]
373- let $t01270312751 = {
381+ let arr = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16]
382+ let $t01292812976 = {
374383 let $l = arr
375384 let $s = size($l)
376385 let $acc0 = $Tuple2(s, false)
377386 func $f0_1 ($a,$i) = if (($i >= $s))
378387 then $a
379388 else calc($a, $l[$i])
380389
381390 func $f0_2 ($a,$i) = if (($i >= $s))
382391 then $a
383- else throw("List size exceeds 18")
392+ else throw("List size exceeds 17")
384393
385- $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($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18)
394+ $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)
386395 }
387- let d = $t01270312751._1
388- let found = $t01270312751._2
396+ let d = $t01292812976._1
397+ let found = $t01292812976._2
389398 if (found)
390399 then d
391400 else throw(("D calculation error, D = " + toString(d)))
392401 }
393402 }
394403
395404
396405 func ego (txId58,pmtAssetId,pmtLpAmt,userAddress) = {
397406 let lpId = cfgLpAssetId
398407 let amId = toBase58String(value(cfgAmountAssetId))
399408 let prId = toBase58String(value(cfgPriceAssetId))
400409 let amDcm = cfgAmountAssetDecimals
401410 let prDcm = cfgPriceAssetDecimals
402411 let sts = toString(cfgPoolStatus)
403412 let lpEmiss = valueOrErrorMessage(assetInfo(lpId), "Wrong LP id").quantity
404413 if ((toBase58String(lpId) != pmtAssetId))
405414 then throw("Wrong pmt asset")
406415 else {
407416 let amBalance = getAccBalance(amId)
408417 let amBalanceX18 = t1(amBalance, amDcm)
409418 let prBalance = getAccBalance(prId)
410419 let prBalanceX18 = t1(prBalance, prDcm)
411420 let curPriceX18 = cpbi(prBalanceX18, amBalanceX18)
412421 let curPrice = f1(curPriceX18, scale8)
413422 let pmtLpAmtX18 = t1(pmtLpAmt, scale8)
414423 let lpEmissX18 = t1(lpEmiss, scale8)
415424 let outAmAmtX18 = fraction(amBalanceX18, pmtLpAmtX18, lpEmissX18)
416425 let outPrAmtX18 = fraction(prBalanceX18, pmtLpAmtX18, lpEmissX18)
417426 let outAmAmt = fromX18Round(outAmAmtX18, amDcm, FLOOR)
418427 let outPrAmt = fromX18Round(outPrAmtX18, prDcm, FLOOR)
419428 let state = if ((txId58 == ""))
420429 then nil
421430 else [ScriptTransfer(userAddress, outAmAmt, if ((amId == "WAVES"))
422431 then unit
423432 else fromBase58String(amId)), ScriptTransfer(userAddress, outPrAmt, if ((prId == "WAVES"))
424433 then unit
425434 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)]
426435 $Tuple10(outAmAmt, outPrAmt, amId, prId, amBalance, prBalance, lpEmiss, curPriceX18, sts, state)
427436 }
428437 }
429438
430439
431440 func epo (txId58,slippage,inAmAmt,inAmId,inPrAmt,inPrId,userAddress,isEval,emitLp,isOneAsset,validateSlippage,pmtAmt,pmtId) = {
432441 let lpId = cfgLpAssetId
433442 let amIdStr = toBase58String(value(cfgAmountAssetId))
434443 let prIdStr = toBase58String(value(cfgPriceAssetId))
435444 let inAmIdStr = cfgInAmountAssedId
436445 let inPrIdStr = cfgInPriceAssetId
437446 let amtDcm = cfgAmountAssetDecimals
438447 let priceDcm = cfgPriceAssetDecimals
439448 let sts = toString(cfgPoolStatus)
440449 let lpEm = valueOrErrorMessage(assetInfo(lpId), "Wr lp as").quantity
441450 let amBalance = if (isEval)
442451 then getAccBalance(amIdStr)
443452 else if (if (isOneAsset)
444453 then (pmtId == amIdStr)
445454 else false)
446455 then (getAccBalance(amIdStr) - pmtAmt)
447456 else if (isOneAsset)
448457 then getAccBalance(amIdStr)
449458 else (getAccBalance(amIdStr) - inAmAmt)
450459 let prBalance = if (isEval)
451460 then getAccBalance(prIdStr)
452461 else if (if (isOneAsset)
453462 then (pmtId == prIdStr)
454463 else false)
455464 then (getAccBalance(prIdStr) - pmtAmt)
456465 else if (isOneAsset)
457466 then getAccBalance(prIdStr)
458467 else (getAccBalance(prIdStr) - inPrAmt)
459468 let inAmAssetAmtX18 = t1(inAmAmt, amtDcm)
460469 let inPrAssetAmtX18 = t1(inPrAmt, priceDcm)
461470 let userPriceX18 = cpbi(inPrAssetAmtX18, inAmAssetAmtX18)
462471 let amBalanceX18 = t1(amBalance, amtDcm)
463472 let prBalanceX18 = t1(prBalance, priceDcm)
464473 let D0 = getD([amBalanceX18, prBalanceX18])
465474 let r = if ((lpEm == 0))
466475 then {
467476 let D1 = getD([(amBalanceX18 + inAmAssetAmtX18), (prBalanceX18 + inPrAssetAmtX18)])
468477 let checkD = if ((D1 > D0))
469478 then true
470479 else throw("D1 should be greater than D0")
471480 if ((checkD == checkD))
472481 then {
473482 let curPriceX18 = zeroBigInt
474483 let slippageX18 = zeroBigInt
475484 let lpAmtX18 = D1
476485 $Tuple5(f1(lpAmtX18, scale8), f1(inAmAssetAmtX18, amtDcm), f1(inPrAssetAmtX18, priceDcm), cpbi((prBalanceX18 + inPrAssetAmtX18), (amBalanceX18 + inAmAssetAmtX18)), slippageX18)
477486 }
478487 else throw("Strict value is not equal to itself.")
479488 }
480489 else {
481490 let curPriceX18 = cpbi(prBalanceX18, amBalanceX18)
482491 let slippageRealX18 = fraction(abs((curPriceX18 - userPriceX18)), scale18, curPriceX18)
483492 let slippageX18 = t1(slippage, scale8)
484493 if (if (if (validateSlippage)
485494 then (curPriceX18 != zeroBigInt)
486495 else false)
487496 then (slippageRealX18 > slippageX18)
488497 else false)
489498 then throw(((("Price slippage " + toString(slippageRealX18)) + " > ") + toString(slippageX18)))
490499 else {
491500 let lpEmissionX18 = t1(lpEm, scale8)
492501 let prViaAmX18 = fraction(inAmAssetAmtX18, cpbir(prBalanceX18, amBalanceX18, CEILING), scale18, CEILING)
493502 let amViaPrX18 = fraction(inPrAssetAmtX18, scale18, cpbir(prBalanceX18, amBalanceX18, FLOOR), CEILING)
494503 let expectedAmts = if ((prViaAmX18 > inPrAssetAmtX18))
495504 then $Tuple2(amViaPrX18, inPrAssetAmtX18)
496505 else $Tuple2(inAmAssetAmtX18, prViaAmX18)
497506 let expAmtAssetAmtX18 = expectedAmts._1
498507 let expPriceAssetAmtX18 = expectedAmts._2
499508 let D1 = getD([(amBalanceX18 + expAmtAssetAmtX18), (prBalanceX18 + expPriceAssetAmtX18)])
500509 let checkD = if ((D1 > D0))
501510 then true
502511 else throw("D1 should be greater than D0")
503512 if ((checkD == checkD))
504513 then {
505514 let lpAmtX18 = fraction(lpEmissionX18, (D1 - D0), D0)
506515 $Tuple5(fromX18Round(lpAmtX18, scale8, FLOOR), fromX18Round(expAmtAssetAmtX18, amtDcm, CEILING), fromX18Round(expPriceAssetAmtX18, priceDcm, CEILING), curPriceX18, slippageX18)
507516 }
508517 else throw("Strict value is not equal to itself.")
509518 }
510519 }
511520 let calcLpAmt = r._1
512521 let calcAmAssetPmt = r._2
513522 let calcPrAssetPmt = r._3
514523 let curPrice = f1(r._4, scale8)
515524 let slippageCalc = f1(r._5, scale8)
516525 if ((0 >= calcLpAmt))
517526 then throw("LP <= 0")
518527 else {
519528 let emitLpAmt = if (!(emitLp))
520529 then 0
521530 else calcLpAmt
522531 let amDiff = (inAmAmt - calcAmAssetPmt)
523532 let prDiff = (inPrAmt - calcPrAssetPmt)
524- let $t02059020935 = if (if (isOneAsset)
533+ let $t02081521160 = if (if (isOneAsset)
525534 then (pmtId == amIdStr)
526535 else false)
527536 then $Tuple2(pmtAmt, 0)
528537 else if (if (isOneAsset)
529538 then (pmtId == prIdStr)
530539 else false)
531540 then $Tuple2(0, pmtAmt)
532541 else $Tuple2(calcAmAssetPmt, calcPrAssetPmt)
533- let writeAmAmt = $t02059020935._1
534- let writePrAmt = $t02059020935._2
542+ let writeAmAmt = $t02081521160._1
543+ let writePrAmt = $t02081521160._2
535544 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))]
536545 $Tuple13(calcLpAmt, emitLpAmt, curPrice, amBalance, prBalance, lpEm, lpId, sts, commonState, amDiff, prDiff, inAmId, inPrId)
537546 }
538547 }
539548
540549
541550 func getYD (xp,i,D) = {
542551 let n = big2
543552 let x = xp[if ((i == 0))
544553 then 1
545554 else 0]
546555 let aPrecision = parseBigIntValue(Amult)
547556 let a = (parseBigIntValue(A) * aPrecision)
548557 let s = x
549558 let ann = (a * n)
550559 let c = (((((D * D) / (x * n)) * D) * aPrecision) / (ann * n))
551560 let b = ((s + ((D * aPrecision) / ann)) - D)
552561 func calc (acc,cur) = {
553- let $t02213022150 = acc
554- let y = $t02213022150._1
555- let found = $t02213022150._2
562+ let $t02235522375 = acc
563+ let y = $t02235522375._1
564+ let found = $t02235522375._2
556565 if ((found != unit))
557566 then acc
558567 else {
559568 let yNext = (((y * y) + c) / ((big2 * y) + b))
560569 let yDiff = absBigInt((yNext - value(y)))
561570 if ((big1 >= yDiff))
562571 then $Tuple2(yNext, cur)
563572 else $Tuple2(yNext, unit)
564573 }
565574 }
566575
567576 let arr = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
568- let $t02245722504 = {
577+ let $t02268222729 = {
569578 let $l = arr
570579 let $s = size($l)
571580 let $acc0 = $Tuple2(D, unit)
572581 func $f0_1 ($a,$i) = if (($i >= $s))
573582 then $a
574583 else calc($a, $l[$i])
575584
576585 func $f0_2 ($a,$i) = if (($i >= $s))
577586 then $a
578587 else throw("List size exceeds 15")
579588
580589 $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)
581590 }
582- let y = $t02245722504._1
583- let found = $t02245722504._2
591+ let y = $t02268222729._1
592+ let found = $t02268222729._2
584593 if ((found != unit))
585594 then y
586595 else throw(("Y calculation error, Y = " + toString(y)))
587596 }
588597
589598
590599 func calcDLp (amountBalance,priceBalance,lpEmission) = {
591600 let updatedDLp = fraction(getD([t1BigInt(amountBalance, toBigInt(cfgAmountAssetDecimals)), t1BigInt(priceBalance, toBigInt(cfgPriceAssetDecimals))]), scale18, lpEmission)
592601 if ((lpEmission == big0))
593602 then big0
594603 else updatedDLp
595604 }
596605
597606
598607 func calcCurrentDLp (amountAssetDelta,priceAssetDelta,lpAssetEmissionDelta) = {
599608 let amountAssetBalance = (toBigInt(getAccBalance(assetIdToString(cfgAmountAssetId))) - amountAssetDelta)
600609 let priceAssetBalance = (toBigInt(getAccBalance(assetIdToString(cfgPriceAssetId))) - priceAssetDelta)
601610 let lpAssetEmission = (toBigInt(value(assetInfo(cfgLpAssetId)).quantity) - lpAssetEmissionDelta)
602611 let currentDLp = calcDLp(amountAssetBalance, priceAssetBalance, lpAssetEmission)
603612 currentDLp
604613 }
605614
606615
607616 func refreshDLpInternal (amountAssetBalanceDelta,priceAssetBalanceDelta,lpAssetEmissionDelta) = {
608617 let amountAssetBalance = (getAccBalance(assetIdToString(cfgAmountAssetId)) + amountAssetBalanceDelta)
609618 let priceAssetBalance = (getAccBalance(assetIdToString(cfgPriceAssetId)) + priceAssetBalanceDelta)
610619 let lpAssetEmission = (value(assetInfo(cfgLpAssetId)).quantity + lpAssetEmissionDelta)
611620 let updatedDLp = calcDLp(toBigInt(amountAssetBalance), toBigInt(priceAssetBalance), toBigInt(lpAssetEmission))
612621 let actions = [IntegerEntry(keyDLpRefreshedHeight, height), StringEntry(keyDLp, toString(updatedDLp))]
613622 $Tuple2(actions, updatedDLp)
614623 }
615624
616625
617626 func validateUpdatedDLp (oldDLp,updatedDLp) = if ((updatedDLp >= oldDLp))
618627 then true
619628 else throwErr("updated DLp lower than current DLp")
620629
621630
622631 func validateMatcherOrderAllowed (order) = {
623632 let amountAssetBalance = getAccBalance(assetIdToString(cfgAmountAssetId))
624633 let priceAssetBalance = getAccBalance(assetIdToString(cfgPriceAssetId))
625634 let amountAssetAmount = order.amount
626635 let priceAssetAmount = fraction(order.amount, order.price, scale8, FLOOR)
627- let $t02470224914 = if ((order.orderType == Buy))
636+ let $t02492725139 = if ((order.orderType == Buy))
628637 then $Tuple2(amountAssetAmount, -(priceAssetAmount))
629638 else $Tuple2(-(amountAssetAmount), priceAssetAmount)
630- let amountAssetBalanceDelta = $t02470224914._1
631- let priceAssetBalanceDelta = $t02470224914._2
639+ let amountAssetBalanceDelta = $t02492725139._1
640+ let priceAssetBalanceDelta = $t02492725139._2
632641 if (if (if (igs())
633642 then true
634643 else (cfgPoolStatus == PoolMatcherDis))
635644 then true
636645 else (cfgPoolStatus == PoolShutdown))
637646 then throw("Admin blocked")
638647 else if (if ((order.assetPair.amountAsset != cfgAmountAssetId))
639648 then true
640649 else (order.assetPair.priceAsset != cfgPriceAssetId))
641650 then throw("Wr assets")
642651 else {
643652 let dLp = parseBigIntValue(valueOrElse(getString(this, keyDLp), "0"))
644- let $t02525625356 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
645- let unusedActions = $t02525625356._1
646- let dLpNew = $t02525625356._2
653+ let $t02548125581 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
654+ let unusedActions = $t02548125581._1
655+ let dLpNew = $t02548125581._2
647656 let isOrderValid = (dLpNew >= dLp)
648657 let info = makeString(["dLp=", toString(dLp), " dLpNew=", toString(dLpNew), " amountAssetBalance=", toString(amountAssetBalance), " priceAssetBalance=", toString(priceAssetBalance), " amountAssetBalanceDelta=", toString(amountAssetBalanceDelta), " priceAssetBalanceDelta=", toString(priceAssetBalanceDelta), " height=", toString(height)], "")
649658 $Tuple2(isOrderValid, info)
650659 }
651660 }
652661
653662
654663 func cg (i) = if ((size(i.payments) != 1))
655664 then throw("1 pmnt exp")
656665 else {
657666 let pmt = value(i.payments[0])
658667 let pmtAssetId = value(pmt.assetId)
659668 let pmtAmt = pmt.amount
660669 let r = ego(toBase58String(i.transactionId), toBase58String(pmtAssetId), pmtAmt, i.caller)
661670 let outAmAmt = r._1
662671 let outPrAmt = r._2
663672 let sts = parseIntValue(r._9)
664673 let state = r._10
665674 if (if (igs())
666675 then true
667676 else (sts == PoolShutdown))
668677 then throw(("Admin blocked: " + toString(sts)))
669678 else $Tuple5(outAmAmt, outPrAmt, pmtAmt, pmtAssetId, state)
670679 }
671680
672681
673682 func cp (caller,txId,amAsPmt,prAsPmt,slippage,emitLp,isOneAsset,validateSlippage,pmtAmt,pmtId) = {
674683 let r = epo(txId, slippage, value(amAsPmt).amount, value(amAsPmt).assetId, value(prAsPmt).amount, value(prAsPmt).assetId, caller, (txId == ""), emitLp, isOneAsset, validateSlippage, pmtAmt, pmtId)
675684 let sts = parseIntValue(r._8)
676685 if (if (if (igs())
677686 then true
678687 else (sts == PoolPutDis))
679688 then true
680689 else (sts == PoolShutdown))
681690 then throw(("Blocked:" + toString(sts)))
682691 else r
683692 }
684693
685694
686695 func calcPutOneTkn (pmtAmtRaw,pmtAssetId,userAddress,txId,withTakeFee) = {
687696 let amId = toBase58String(value(cfgAmountAssetId))
688697 let prId = toBase58String(value(cfgPriceAssetId))
689698 let lpId = cfgLpAssetId
690699 let amtDcm = cfgAmountAssetDecimals
691700 let priceDcm = cfgPriceAssetDecimals
692701 let lpAssetEmission = toBigInt(valueOrErrorMessage(assetInfo(lpId), "invalid lp asset").quantity)
693702 let chechEmission = if ((lpAssetEmission > big0))
694703 then true
695704 else throw("initial deposit requires all coins")
696705 if ((chechEmission == chechEmission))
697706 then {
698707 let amBalance = getAccBalance(amId)
699708 let prBalance = getAccBalance(prId)
700- let $t02801228474 = if ((txId == ""))
709+ let $t02823728699 = if ((txId == ""))
701710 then $Tuple2(amBalance, prBalance)
702711 else if ((pmtAssetId == amId))
703712 then if ((pmtAmtRaw > amBalance))
704713 then throw("invalid payment amount")
705714 else $Tuple2((amBalance - pmtAmtRaw), prBalance)
706715 else if ((pmtAssetId == prId))
707716 then if ((pmtAmtRaw > prBalance))
708717 then throw("invalid payment amount")
709718 else $Tuple2(amBalance, (prBalance - pmtAmtRaw))
710719 else throw("wrong pmtAssetId")
711- let amBalanceOld = $t02801228474._1
712- let prBalanceOld = $t02801228474._2
713- let $t02848028656 = if ((pmtAssetId == amId))
720+ let amBalanceOld = $t02823728699._1
721+ let prBalanceOld = $t02823728699._2
722+ let $t02870528881 = if ((pmtAssetId == amId))
714723 then $Tuple2(pmtAmtRaw, 0)
715724 else if ((pmtAssetId == prId))
716725 then $Tuple2(0, pmtAmtRaw)
717726 else throw("invalid payment")
718- let amAmountRaw = $t02848028656._1
719- let prAmountRaw = $t02848028656._2
720- let $t02866028914 = if (withTakeFee)
727+ let amAmountRaw = $t02870528881._1
728+ let prAmountRaw = $t02870528881._2
729+ let $t02888529139 = if (withTakeFee)
721730 then $Tuple3(takeFee(amAmountRaw, inFee)._1, takeFee(prAmountRaw, inFee)._1, takeFee(pmtAmtRaw, inFee)._2)
722731 else $Tuple3(amAmountRaw, prAmountRaw, 0)
723- let amAmount = $t02866028914._1
724- let prAmount = $t02866028914._2
725- let feeAmount = $t02866028914._3
732+ let amAmount = $t02888529139._1
733+ let prAmount = $t02888529139._2
734+ let feeAmount = $t02888529139._3
726735 let amBalanceNew = (amBalanceOld + amAmount)
727736 let prBalanceNew = (prBalanceOld + prAmount)
728737 let D0 = getD([t1(amBalanceOld, cfgAmountAssetDecimals), t1(prBalanceOld, cfgPriceAssetDecimals)])
729738 let D1 = getD([t1(amBalanceNew, cfgAmountAssetDecimals), t1(prBalanceNew, cfgPriceAssetDecimals)])
730739 let checkD = if ((D1 > D0))
731740 then true
732741 else throw()
733742 if ((checkD == checkD))
734743 then {
735744 let lpAmount = fraction(lpAssetEmission, (D1 - D0), D0, FLOOR)
736745 let curPrice = f1(cpbi(t1(prBalanceNew, priceDcm), t1(amBalanceNew, amtDcm)), scale8)
737746 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))]
738747 let poolProportion = fraction(prBalanceOld, scale8, amBalanceOld)
739748 let amountAssetPart = fraction(pmtAmtRaw, scale8, (poolProportion + scale8))
740749 let priceAssetPart = (pmtAmtRaw - amountAssetPart)
741750 let lpAmtBoth = fraction(lpAssetEmission, toBigInt(priceAssetPart), toBigInt(prBalanceOld))
742751 let bonus = toInt(fraction((lpAmount - lpAmtBoth), scale8BigInt, lpAmtBoth))
743752 $Tuple4(toInt(lpAmount), commonState, feeAmount, bonus)
744753 }
745754 else throw("Strict value is not equal to itself.")
746755 }
747756 else throw("Strict value is not equal to itself.")
748757 }
749758
750759
751760 func getOneTknV2Internal (outAssetId,minOutAmount,payments,caller,originCaller,transactionId) = {
752761 let lpId = toBase58String(value(cfgLpAssetId))
753762 let amId = toBase58String(value(cfgAmountAssetId))
754763 let prId = toBase58String(value(cfgPriceAssetId))
755764 let amDecimals = cfgAmountAssetDecimals
756765 let prDecimals = cfgPriceAssetDecimals
757766 let poolStatus = cfgPoolStatus
758767 let userAddress = if ((caller == restContract))
759768 then originCaller
760769 else caller
761770 let pmt = value(payments[0])
762771 let pmtAssetId = value(pmt.assetId)
763772 let pmtAmt = pmt.amount
764773 let currentDLp = calcCurrentDLp(big0, big0, big0)
765774 if ((currentDLp == currentDLp))
766775 then {
767776 let txId58 = toBase58String(transactionId)
768777 if ((lpId != toBase58String(pmtAssetId)))
769778 then throw("Wrong LP")
770779 else {
771780 let amBalance = getAccBalance(amId)
772781 let prBalance = getAccBalance(prId)
773- let $t03102631137 = {
782+ let $t03125131362 = {
774783 let @ = invoke(this, "getOneTknV2READONLY", [outAssetId, pmtAmt], nil)
775784 if ($isInstanceOf(@, "(Int, Int)"))
776785 then @
777786 else throw(($getType(@) + " couldn't be cast to (Int, Int)"))
778787 }
779- if (($t03102631137 == $t03102631137))
788+ if (($t03125131362 == $t03125131362))
780789 then {
781- let feeAmount = $t03102631137._2
782- let totalGet = $t03102631137._1
790+ let feeAmount = $t03125131362._2
791+ let totalGet = $t03125131362._1
783792 let totalAmount = if (if ((minOutAmount > 0))
784793 then (minOutAmount > totalGet)
785794 else false)
786795 then throwErr(makeString(["amount to receive is less than ", toString(minOutAmount)], ""))
787796 else totalGet
788- let $t03132731634 = if ((outAssetId == amId))
797+ let $t03155231859 = if ((outAssetId == amId))
789798 then $Tuple4(totalAmount, 0, ((amBalance - totalAmount) - feeAmount), prBalance)
790799 else if ((outAssetId == prId))
791800 then $Tuple4(0, totalAmount, amBalance, ((prBalance - totalAmount) - feeAmount))
792801 else throw("invalid out asset id")
793- let outAm = $t03132731634._1
794- let outPr = $t03132731634._2
795- let amBalanceNew = $t03132731634._3
796- let prBalanceNew = $t03132731634._4
802+ let outAm = $t03155231859._1
803+ let outPr = $t03155231859._2
804+ let amBalanceNew = $t03155231859._3
805+ let prBalanceNew = $t03155231859._4
797806 let curPrX18 = cpbi(t1(prBalanceNew, prDecimals), t1(amBalanceNew, amDecimals))
798807 let curPr = f1(curPrX18, scale8)
799808 let outAssetIdOrWaves = if ((outAssetId == "WAVES"))
800809 then unit
801810 else fromBase58String(outAssetId)
802811 let sendFeeToMatcher = if ((feeAmount > 0))
803812 then [ScriptTransfer(feeCollectorAddress, feeAmount, outAssetIdOrWaves)]
804813 else nil
805814 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)
806815 if ((state == state))
807816 then {
808817 let burn = invoke(fca, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
809818 if ((burn == burn))
810819 then {
811- let $t03241932769 = {
820+ let $t03264432994 = {
812821 let feeAmountForCalc = if ((this == feeCollectorAddress))
813822 then 0
814823 else feeAmount
815824 let outInAmountAsset = if ((parseAssetId(outAssetId) == cfgAmountAssetId))
816825 then true
817826 else false
818827 if (outInAmountAsset)
819828 then $Tuple2(-((totalGet + feeAmountForCalc)), 0)
820829 else $Tuple2(0, -((totalGet + feeAmountForCalc)))
821830 }
822- let amountAssetBalanceDelta = $t03241932769._1
823- let priceAssetBalanceDelta = $t03241932769._2
824- let $t03277232880 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
825- let refreshDLpActions = $t03277232880._1
826- let updatedDLp = $t03277232880._2
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
827836 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
828837 if ((isUpdatedDLpValid == isUpdatedDLpValid))
829838 then $Tuple2((state ++ refreshDLpActions), totalAmount)
830839 else throw("Strict value is not equal to itself.")
831840 }
832841 else throw("Strict value is not equal to itself.")
833842 }
834843 else throw("Strict value is not equal to itself.")
835844 }
836845 else throw("Strict value is not equal to itself.")
837846 }
838847 }
839848 else throw("Strict value is not equal to itself.")
840849 }
841850
842851
843852 func m () = match getString(mpk()) {
844853 case s: String =>
845854 fromBase58String(s)
846855 case _: Unit =>
847856 unit
848857 case _ =>
849858 throw("Match error")
850859 }
851860
852861
853862 func pm () = match getString(pmpk()) {
854863 case s: String =>
855864 fromBase58String(s)
856865 case _: Unit =>
857866 unit
858867 case _ =>
859868 throw("Match error")
860869 }
861870
862871
863872 let pd = throw("Permission denied")
864873
865874 func isManager (i) = match m() {
866875 case pk: ByteVector =>
867876 (i.callerPublicKey == pk)
868877 case _: Unit =>
869878 (i.caller == this)
870879 case _ =>
871880 throw("Match error")
872881 }
873882
874883
875884 func mm (i) = match m() {
876885 case pk: ByteVector =>
877886 if ((i.callerPublicKey == pk))
878887 then true
879888 else pd
880889 case _: Unit =>
881890 if ((i.caller == this))
882891 then true
883892 else pd
884893 case _ =>
885894 throw("Match error")
886895 }
887896
888897
889898 func getY (isReverse,D,poolAmountInBalance) = {
890899 let poolConfig = gpc()
891900 let amId = poolConfig[idxAmAsId]
892901 let prId = poolConfig[idxPrAsId]
893902 let n = big2
894903 let aPrecision = parseBigIntValue(Amult)
895904 let a = (parseBigIntValue(A) * aPrecision)
896905 let xp = if ((isReverse == false))
897906 then [(toBigInt(getAccBalance(amId)) + poolAmountInBalance), toBigInt(getAccBalance(prId))]
898907 else [(toBigInt(getAccBalance(prId)) + poolAmountInBalance), toBigInt(getAccBalance(amId))]
899908 let x = xp[0]
900909 let s = x
901910 let ann = (a * n)
902911 let c = (((((D * D) / (x * n)) * D) * aPrecision) / (ann * n))
903912 let b = ((s + ((D * aPrecision) / ann)) - D)
904913 func calc (acc,cur) = {
905- let $t03432734347 = acc
906- let y = $t03432734347._1
907- let found = $t03432734347._2
914+ let $t03455234572 = acc
915+ let y = $t03455234572._1
916+ let found = $t03455234572._2
908917 if ((found != unit))
909918 then acc
910919 else {
911920 let yNext = (((y * y) + c) / ((big2 * y) + b))
912921 let yDiff = absBigInt((yNext - value(y)))
913922 if ((big1 >= yDiff))
914923 then $Tuple2(yNext, cur)
915924 else $Tuple2(yNext, unit)
916925 }
917926 }
918927
919928 let arr = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
920- let $t03467834725 = {
929+ let $t03490334950 = {
921930 let $l = arr
922931 let $s = size($l)
923932 let $acc0 = $Tuple2(D, unit)
924933 func $f0_1 ($a,$i) = if (($i >= $s))
925934 then $a
926935 else calc($a, $l[$i])
927936
928937 func $f0_2 ($a,$i) = if (($i >= $s))
929938 then $a
930939 else throw("List size exceeds 15")
931940
932941 $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)
933942 }
934- let y = $t03467834725._1
935- let found = $t03467834725._2
943+ let y = $t03490334950._1
944+ let found = $t03490334950._2
936945 if ((found != unit))
937946 then y
938947 else throw(("Y calculation error, Y = " + toString(y)))
939948 }
940949
941950
951+func skipOrderValidation () = valueOrElse(getBoolean(fca, keySkipOrderValidation(toString(this))), false)
952+
953+
942954 @Callable(i)
943955 func calculateAmountOutForSwapREADONLY (cleanAmountIn,isReverse,feePoolAmount) = {
944- let $t03496635390 = if ((isReverse == false))
956+ let $t03530235726 = if ((isReverse == false))
945957 then {
946958 let assetOut = strf(this, pa())
947959 let poolAmountInBalance = (toBigInt(getAccBalance(strf(this, aa()))) + toBigInt(cleanAmountIn))
948960 $Tuple2(assetOut, poolAmountInBalance)
949961 }
950962 else {
951963 let assetOut = strf(this, aa())
952964 let poolAmountInBalance = (toBigInt(getAccBalance(strf(this, pa()))) + toBigInt(cleanAmountIn))
953965 $Tuple2(assetOut, poolAmountInBalance)
954966 }
955- let assetOut = $t03496635390._1
956- let poolAmountInBalance = $t03496635390._2
967+ let assetOut = $t03530235726._1
968+ let poolAmountInBalance = $t03530235726._2
957969 let poolConfig = gpc()
958970 let amId = poolConfig[idxAmAsId]
959971 let prId = poolConfig[idxPrAsId]
960972 let xp = [toBigInt(getAccBalance(amId)), toBigInt(getAccBalance(prId))]
961973 let D = getD(xp)
962974 let y = getY(isReverse, D, toBigInt(cleanAmountIn))
963975 let dy = ((toBigInt(getAccBalance(assetOut)) - y) - toBigInt(1))
964976 let totalGetRaw = max([0, toInt(dy)])
965977 let newXp = if ((isReverse == false))
966978 then [((toBigInt(getAccBalance(amId)) + toBigInt(cleanAmountIn)) + toBigInt(feePoolAmount)), (toBigInt(getAccBalance(prId)) - dy)]
967979 else [(toBigInt(getAccBalance(amId)) - dy), ((toBigInt(getAccBalance(prId)) + toBigInt(cleanAmountIn)) + toBigInt(feePoolAmount))]
968980 let newD = getD(newXp)
969981 let checkD = if ((newD >= D))
970982 then true
971983 else throw(makeString(["new D is fewer error", toString(D), toString(newD)], "__"))
972984 if ((checkD == checkD))
973985 then $Tuple2(nil, totalGetRaw)
974986 else throw("Strict value is not equal to itself.")
975987 }
976988
977989
978990
979991 @Callable(i)
980992 func calculateAmountOutForSwapAndSendTokens (cleanAmountIn,isReverse,amountOutMin,addressTo,feePoolAmount) = {
981993 let swapContact = {
982994 let @ = invoke(fca, "getSwapContractREADONLY", nil, nil)
983995 if ($isInstanceOf(@, "String"))
984996 then @
985997 else throw(($getType(@) + " couldn't be cast to String"))
986998 }
987999 let checks = [if ((value(i.payments[0]).amount >= cleanAmountIn))
9881000 then true
9891001 else throwErr("Wrong amount"), if ((i.caller == addressFromStringValue(swapContact)))
9901002 then true
9911003 else throwErr("Permission denied")]
9921004 if ((checks == checks))
9931005 then {
9941006 let pmt = value(i.payments[0])
9951007 let assetIn = assetIdToString(pmt.assetId)
996- let $t03682637220 = if ((isReverse == false))
1008+ let $t03716237556 = if ((isReverse == false))
9971009 then {
9981010 let assetOut = strf(this, pa())
9991011 let poolAmountInBalance = (getAccBalance(assetIn) - value(i.payments[0]).amount)
10001012 $Tuple2(assetOut, poolAmountInBalance)
10011013 }
10021014 else {
10031015 let assetOut = strf(this, aa())
10041016 let poolAmountInBalance = (getAccBalance(assetIn) - value(i.payments[0]).amount)
10051017 $Tuple2(assetOut, poolAmountInBalance)
10061018 }
1007- let assetOut = $t03682637220._1
1008- let poolAmountInBalance = $t03682637220._2
1019+ let assetOut = $t03716237556._1
1020+ let poolAmountInBalance = $t03716237556._2
10091021 let poolConfig = gpc()
10101022 let amId = poolConfig[idxAmAsId]
10111023 let prId = poolConfig[idxPrAsId]
10121024 let xp = if ((isReverse == false))
10131025 then [(toBigInt(getAccBalance(amId)) - toBigInt(value(i.payments[0]).amount)), toBigInt(getAccBalance(prId))]
10141026 else [toBigInt(getAccBalance(amId)), (toBigInt(getAccBalance(prId)) - toBigInt(value(i.payments[0]).amount))]
10151027 let D = getD(xp)
10161028 let y = getY(isReverse, D, toBigInt(0))
10171029 let dy = ((toBigInt(getAccBalance(assetOut)) - y) - toBigInt(1))
10181030 let totalGetRaw = max([0, toInt(dy)])
10191031 let checkMin = if ((totalGetRaw >= amountOutMin))
10201032 then true
10211033 else throw("Exchange result is fewer coins than expected")
10221034 if ((checkMin == checkMin))
10231035 then {
10241036 let newXp = if ((isReverse == false))
10251037 then [(toBigInt(getAccBalance(amId)) + toBigInt(feePoolAmount)), (toBigInt(getAccBalance(prId)) - dy)]
10261038 else [(toBigInt(getAccBalance(amId)) - dy), (toBigInt(getAccBalance(prId)) + toBigInt(feePoolAmount))]
10271039 let newD = getD(newXp)
10281040 let checkD = if ((newD >= D))
10291041 then true
10301042 else throw("new D is fewer error")
10311043 if ((checkD == checkD))
10321044 then $Tuple2([ScriptTransfer(addressFromStringValue(addressTo), totalGetRaw, parseAssetId(assetOut))], totalGetRaw)
10331045 else throw("Strict value is not equal to itself.")
10341046 }
10351047 else throw("Strict value is not equal to itself.")
10361048 }
10371049 else throw("Strict value is not equal to itself.")
10381050 }
10391051
10401052
10411053
10421054 @Callable(i)
10431055 func constructor (fc) = {
10441056 let c = mm(i)
10451057 if ((c == c))
10461058 then [StringEntry(fc(), fc)]
10471059 else throw("Strict value is not equal to itself.")
10481060 }
10491061
10501062
10511063
10521064 @Callable(i)
10531065 func setManager (pendingManagerPublicKey) = {
10541066 let c = mm(i)
10551067 if ((c == c))
10561068 then {
10571069 let cm = fromBase58String(pendingManagerPublicKey)
10581070 if ((cm == cm))
10591071 then [StringEntry(pmpk(), pendingManagerPublicKey)]
10601072 else throw("Strict value is not equal to itself.")
10611073 }
10621074 else throw("Strict value is not equal to itself.")
10631075 }
10641076
10651077
10661078
10671079 @Callable(i)
10681080 func confirmManager () = {
10691081 let p = pm()
10701082 let hpm = if (isDefined(p))
10711083 then true
10721084 else throw("No pending manager")
10731085 if ((hpm == hpm))
10741086 then {
10751087 let cpm = if ((i.callerPublicKey == value(p)))
10761088 then true
10771089 else throw("You are not pending manager")
10781090 if ((cpm == cpm))
10791091 then [StringEntry(mpk(), toBase58String(value(p))), DeleteEntry(pmpk())]
10801092 else throw("Strict value is not equal to itself.")
10811093 }
10821094 else throw("Strict value is not equal to itself.")
10831095 }
10841096
10851097
10861098
10871099 @Callable(i)
10881100 func put (slip,autoStake) = {
10891101 let factCfg = gfc()
10901102 let stakingCntr = valueOrErrorMessage(addressFromString(factCfg[idxFactStakCntr]), "Wr st addr")
10911103 let slipCntr = valueOrErrorMessage(addressFromString(factCfg[idxFactSlippCntr]), "Wr sl addr")
10921104 if ((0 > slip))
10931105 then throw("Wrong slippage")
10941106 else if ((size(i.payments) != 2))
10951107 then throw("2 pmnts expd")
10961108 else {
10971109 let amAssetPmt = toBigInt(value(i.payments[0]).amount)
10981110 let prAssetPmt = toBigInt(value(i.payments[1]).amount)
10991111 let amountAssetBalance = (toBigInt(getAccBalance(assetIdToString(cfgAmountAssetId))) - amAssetPmt)
11001112 if ((amountAssetBalance == amountAssetBalance))
11011113 then {
11021114 let priceAssetBalance = (toBigInt(getAccBalance(assetIdToString(cfgPriceAssetId))) - prAssetPmt)
11031115 if ((priceAssetBalance == priceAssetBalance))
11041116 then {
11051117 let lpAssetEmission = toBigInt(value(assetInfo(cfgLpAssetId)).quantity)
11061118 if ((lpAssetEmission == lpAssetEmission))
11071119 then {
11081120 let currentDLp = calcCurrentDLp(amAssetPmt, prAssetPmt, toBigInt(0))
11091121 if ((currentDLp == currentDLp))
11101122 then {
11111123 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, "")
11121124 let emitLpAmt = e._2
11131125 let lpAssetId = e._7
11141126 let state = e._9
11151127 let amDiff = e._10
11161128 let prDiff = e._11
11171129 let amId = e._12
11181130 let prId = e._13
11191131 let r = invoke(fca, "emit", [emitLpAmt], nil)
11201132 if ((r == r))
11211133 then {
11221134 let el = match r {
11231135 case legacy: Address =>
11241136 invoke(legacy, "emit", [emitLpAmt], nil)
11251137 case _ =>
11261138 unit
11271139 }
11281140 if ((el == el))
11291141 then {
11301142 let sa = if ((amDiff > 0))
11311143 then invoke(slipCntr, "put", nil, [AttachedPayment(amId, amDiff)])
11321144 else nil
11331145 if ((sa == sa))
11341146 then {
11351147 let sp = if ((prDiff > 0))
11361148 then invoke(slipCntr, "put", nil, [AttachedPayment(prId, prDiff)])
11371149 else nil
11381150 if ((sp == sp))
11391151 then {
11401152 let lpTrnsfr = if (autoStake)
11411153 then {
11421154 let ss = invoke(stakingCntr, "stake", nil, [AttachedPayment(lpAssetId, emitLpAmt)])
11431155 if ((ss == ss))
11441156 then nil
11451157 else throw("Strict value is not equal to itself.")
11461158 }
11471159 else [ScriptTransfer(i.caller, emitLpAmt, lpAssetId)]
1148- let $t04183941981 = refreshDLpInternal(0, 0, 0)
1149- let refreshDLpActions = $t04183941981._1
1150- let updatedDLp = $t04183941981._2
1160+ let $t04217542317 = refreshDLpInternal(0, 0, 0)
1161+ let refreshDLpActions = $t04217542317._1
1162+ let updatedDLp = $t04217542317._2
11511163 let check = if ((updatedDLp >= currentDLp))
11521164 then true
11531165 else throwErr(makeString(["updated DLp lower than current DLp", toString(amountAssetBalance), toString(priceAssetBalance), toString(lpAssetEmission), toString(currentDLp), toString(updatedDLp), toString(amDiff), toString(prDiff)], " "))
11541166 if ((check == check))
11551167 then {
11561168 let lpAssetEmissionAfter = value(assetInfo(cfgLpAssetId)).quantity
11571169 if ((lpAssetEmissionAfter == lpAssetEmissionAfter))
11581170 then ((state ++ lpTrnsfr) ++ refreshDLpActions)
11591171 else throw("Strict value is not equal to itself.")
11601172 }
11611173 else throw("Strict value is not equal to itself.")
11621174 }
11631175 else throw("Strict value is not equal to itself.")
11641176 }
11651177 else throw("Strict value is not equal to itself.")
11661178 }
11671179 else throw("Strict value is not equal to itself.")
11681180 }
11691181 else throw("Strict value is not equal to itself.")
11701182 }
11711183 else throw("Strict value is not equal to itself.")
11721184 }
11731185 else throw("Strict value is not equal to itself.")
11741186 }
11751187 else throw("Strict value is not equal to itself.")
11761188 }
11771189 else throw("Strict value is not equal to itself.")
11781190 }
11791191 }
11801192
11811193
11821194
11831195 @Callable(i)
11841196 func putOneTknV2 (minOutAmount,autoStake) = {
11851197 let isPoolOneTokenOperationsDisabled = {
11861198 let @ = invoke(fca, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
11871199 if ($isInstanceOf(@, "Boolean"))
11881200 then @
11891201 else throw(($getType(@) + " couldn't be cast to Boolean"))
11901202 }
11911203 let isPutDisabled = if (if (if (igs())
11921204 then true
11931205 else (cfgPoolStatus == PoolPutDis))
11941206 then true
11951207 else (cfgPoolStatus == PoolShutdown))
11961208 then true
11971209 else isPoolOneTokenOperationsDisabled
11981210 let checks = [if (if (!(isPutDisabled))
11991211 then true
12001212 else isManager(i))
12011213 then true
12021214 else throwErr("put operation is blocked by admin"), if ((size(i.payments) == 1))
12031215 then true
12041216 else throwErr("exactly 1 payment are expected")]
12051217 if ((checks == checks))
12061218 then {
12071219 let amId = toBase58String(value(cfgAmountAssetId))
12081220 let prId = toBase58String(value(cfgPriceAssetId))
12091221 let lpId = cfgLpAssetId
12101222 let amDecimals = cfgAmountAssetDecimals
12111223 let prDecimals = cfgPriceAssetDecimals
12121224 let userAddress = if ((i.caller == this))
12131225 then i.originCaller
12141226 else i.caller
12151227 let pmt = value(i.payments[0])
12161228 let pmtAssetId = toBase58String(value(pmt.assetId))
12171229 let pmtAmt = pmt.amount
12181230 let currentDLp = if ((pmt.assetId == cfgAmountAssetId))
12191231 then calcCurrentDLp(toBigInt(pmtAmt), toBigInt(0), toBigInt(0))
12201232 else calcCurrentDLp(toBigInt(0), toBigInt(pmtAmt), toBigInt(0))
12211233 if ((currentDLp == currentDLp))
12221234 then {
1223- let $t04362243780 = calcPutOneTkn(pmtAmt, pmtAssetId, toString(userAddress), toBase58String(i.transactionId), true)
1224- if (($t04362243780 == $t04362243780))
1235+ let $t04395844116 = calcPutOneTkn(pmtAmt, pmtAssetId, toString(userAddress), toBase58String(i.transactionId), true)
1236+ if (($t04395844116 == $t04395844116))
12251237 then {
1226- let feeAmount = $t04362243780._3
1227- let state = $t04362243780._2
1228- let estimLP = $t04362243780._1
1238+ let feeAmount = $t04395844116._3
1239+ let state = $t04395844116._2
1240+ let estimLP = $t04395844116._1
12291241 let emitLpAmt = if (if ((minOutAmount > 0))
12301242 then (minOutAmount > estimLP)
12311243 else false)
12321244 then throwErr(makeString(["amount to receive is less than ", toString(minOutAmount)], ""))
12331245 else estimLP
12341246 let e = invoke(fca, "emit", [emitLpAmt], nil)
12351247 if ((e == e))
12361248 then {
12371249 let el = match e {
12381250 case legacy: Address =>
12391251 invoke(legacy, "emit", [emitLpAmt], nil)
12401252 case _ =>
12411253 unit
12421254 }
12431255 if ((el == el))
12441256 then {
12451257 let lpTrnsfr = if (autoStake)
12461258 then {
1247- let ss = invoke(stakingContract, "stake", nil, [AttachedPayment(lpId, emitLpAmt)])
1259+ let ss = invoke(stakingContract, "stakeFor", [toString(i.caller)], [AttachedPayment(lpId, emitLpAmt)])
12481260 if ((ss == ss))
12491261 then nil
12501262 else throw("Strict value is not equal to itself.")
12511263 }
12521264 else [ScriptTransfer(i.caller, emitLpAmt, lpId)]
12531265 let sendFeeToMatcher = if ((feeAmount > 0))
12541266 then [ScriptTransfer(feeCollectorAddress, feeAmount, fromBase58String(pmtAssetId))]
12551267 else nil
1256- let $t04459544944 = if ((this == feeCollectorAddress))
1268+ let $t04500145350 = if ((this == feeCollectorAddress))
12571269 then $Tuple2(0, 0)
12581270 else {
12591271 let paymentInAmountAsset = if ((pmt.assetId == cfgAmountAssetId))
12601272 then true
12611273 else false
12621274 if (paymentInAmountAsset)
12631275 then $Tuple2(-(feeAmount), 0)
12641276 else $Tuple2(0, -(feeAmount))
12651277 }
1266- let amountAssetBalanceDelta = $t04459544944._1
1267- let priceAssetBalanceDelta = $t04459544944._2
1268- let $t04494745055 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
1269- let refreshDLpActions = $t04494745055._1
1270- let updatedDLp = $t04494745055._2
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
12711283 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
12721284 if ((isUpdatedDLpValid == isUpdatedDLpValid))
12731285 then $Tuple2((((state ++ lpTrnsfr) ++ sendFeeToMatcher) ++ refreshDLpActions), emitLpAmt)
12741286 else throw("Strict value is not equal to itself.")
12751287 }
12761288 else throw("Strict value is not equal to itself.")
12771289 }
12781290 else throw("Strict value is not equal to itself.")
12791291 }
12801292 else throw("Strict value is not equal to itself.")
12811293 }
12821294 else throw("Strict value is not equal to itself.")
12831295 }
12841296 else throw("Strict value is not equal to itself.")
12851297 }
12861298
12871299
12881300
12891301 @Callable(i)
12901302 func putForFree (maxSlpg) = if ((0 > maxSlpg))
12911303 then throw("Wrong slpg")
12921304 else if ((size(i.payments) != 2))
12931305 then throw("2 pmnts expd")
12941306 else {
12951307 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, "")
12961308 let state = estPut._9
12971309 let amAssetPmt = toBigInt(value(i.payments[0]).amount)
12981310 let prAssetPmt = toBigInt(value(i.payments[1]).amount)
12991311 let currentDLp = calcCurrentDLp(amAssetPmt, prAssetPmt, toBigInt(0))
13001312 if ((currentDLp == currentDLp))
13011313 then {
1302- let $t04608546150 = refreshDLpInternal(0, 0, 0)
1303- let refreshDLpActions = $t04608546150._1
1304- let updatedDLp = $t04608546150._2
1314+ let $t04649146556 = refreshDLpInternal(0, 0, 0)
1315+ let refreshDLpActions = $t04649146556._1
1316+ let updatedDLp = $t04649146556._2
13051317 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
13061318 if ((isUpdatedDLpValid == isUpdatedDLpValid))
13071319 then (state ++ refreshDLpActions)
13081320 else throw("Strict value is not equal to itself.")
13091321 }
13101322 else throw("Strict value is not equal to itself.")
13111323 }
13121324
13131325
13141326
13151327 @Callable(i)
13161328 func get () = {
13171329 let currentDLp = calcCurrentDLp(toBigInt(0), toBigInt(0), toBigInt(0))
13181330 if ((currentDLp == currentDLp))
13191331 then {
13201332 let r = cg(i)
13211333 let outAmtAmt = r._1
13221334 let outPrAmt = r._2
13231335 let pmtAmt = r._3
13241336 let pmtAssetId = r._4
13251337 let state = r._5
13261338 let b = invoke(fca, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
13271339 if ((b == b))
13281340 then {
1329- let $t04732347405 = refreshDLpInternal(-(outAmtAmt), -(outPrAmt), 0)
1330- let refreshDLpActions = $t04732347405._1
1331- let updatedDLp = $t04732347405._2
1341+ let $t04772947811 = refreshDLpInternal(-(outAmtAmt), -(outPrAmt), 0)
1342+ let refreshDLpActions = $t04772947811._1
1343+ let updatedDLp = $t04772947811._2
13321344 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
13331345 if ((isUpdatedDLpValid == isUpdatedDLpValid))
13341346 then (state ++ refreshDLpActions)
13351347 else throw("Strict value is not equal to itself.")
13361348 }
13371349 else throw("Strict value is not equal to itself.")
13381350 }
13391351 else throw("Strict value is not equal to itself.")
13401352 }
13411353
13421354
13431355
13441356 @Callable(i)
13451357 func getOneTknV2 (outAssetId,minOutAmount) = {
13461358 let isPoolOneTokenOperationsDisabled = {
13471359 let @ = invoke(fca, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
13481360 if ($isInstanceOf(@, "Boolean"))
13491361 then @
13501362 else throw(($getType(@) + " couldn't be cast to Boolean"))
13511363 }
13521364 let isGetDisabled = if (if (igs())
13531365 then true
13541366 else (cfgPoolStatus == PoolShutdown))
13551367 then true
13561368 else isPoolOneTokenOperationsDisabled
13571369 let checks = [if (if (!(isGetDisabled))
13581370 then true
13591371 else isManager(i))
13601372 then true
13611373 else throwErr("get operation is blocked by admin"), if ((size(i.payments) == 1))
13621374 then true
13631375 else throwErr("exactly 1 payment are expected")]
13641376 if ((checks == checks))
13651377 then {
1366- let $t04802348178 = getOneTknV2Internal(outAssetId, minOutAmount, i.payments, i.caller, i.originCaller, i.transactionId)
1367- let state = $t04802348178._1
1368- let totalAmount = $t04802348178._2
1378+ let $t04842948584 = getOneTknV2Internal(outAssetId, minOutAmount, i.payments, i.caller, i.originCaller, i.transactionId)
1379+ let state = $t04842948584._1
1380+ let totalAmount = $t04842948584._2
13691381 $Tuple2(state, totalAmount)
13701382 }
13711383 else throw("Strict value is not equal to itself.")
13721384 }
13731385
13741386
13751387
13761388 @Callable(i)
13771389 func refreshDLp () = {
13781390 let lastRefreshedBlockHeight = valueOrElse(getInteger(keyDLpRefreshedHeight), 0)
13791391 let checkLastRefreshedBlockHeight = if (((height - lastRefreshedBlockHeight) >= dLpRefreshDelay))
13801392 then unit
13811393 else throwErr(makeString([toString(dLpRefreshDelay), " blocks have not passed since the previous call"], ""))
13821394 if ((checkLastRefreshedBlockHeight == checkLastRefreshedBlockHeight))
13831395 then {
13841396 let dLp = valueOrErrorMessage(parseBigInt(valueOrElse(getString(this, keyDLp), "0")), fmtErr("invalid dLp"))
1385- let $t04870248766 = refreshDLpInternal(0, 0, 0)
1386- let dLpUpdateActions = $t04870248766._1
1387- let updatedDLp = $t04870248766._2
1397+ let $t04910849172 = refreshDLpInternal(0, 0, 0)
1398+ let dLpUpdateActions = $t04910849172._1
1399+ let updatedDLp = $t04910849172._2
13881400 let actions = if ((dLp != updatedDLp))
13891401 then dLpUpdateActions
13901402 else throwErr("nothing to refresh")
13911403 $Tuple2(actions, toString(updatedDLp))
13921404 }
13931405 else throw("Strict value is not equal to itself.")
13941406 }
13951407
13961408
13971409
13981410 @Callable(i)
13991411 func getOneTknV2READONLY (outAssetId,lpAssetAmount) = {
14001412 let amId = toBase58String(value(cfgAmountAssetId))
14011413 let prId = toBase58String(value(cfgPriceAssetId))
14021414 let lpId = toBase58String(value(cfgLpAssetId))
14031415 let xp = [toBigInt(getAccBalance(amId)), toBigInt(getAccBalance(prId))]
14041416 let lpEmission = toBigInt(valueOrErrorMessage(assetInfo(fromBase58String(lpId)), "invalid lp asset").quantity)
14051417 let D0 = getD(xp)
14061418 let D1 = (D0 - fraction(toBigInt(lpAssetAmount), D0, lpEmission))
14071419 let index = if ((outAssetId == amId))
14081420 then 0
14091421 else if ((outAssetId == prId))
14101422 then 1
14111423 else throw("invalid out asset id")
14121424 let newY = getYD(xp, index, D1)
14131425 let dy = (xp[index] - newY)
14141426 let totalGetRaw = max([0, toInt((dy - big1))])
1415- let $t04977649831 = takeFee(totalGetRaw, outFee)
1416- let totalGet = $t04977649831._1
1417- let feeAmount = $t04977649831._2
1427+ let $t05018250237 = takeFee(totalGetRaw, outFee)
1428+ let totalGet = $t05018250237._1
1429+ let feeAmount = $t05018250237._2
14181430 $Tuple2(nil, $Tuple2(totalGet, feeAmount))
14191431 }
14201432
14211433
14221434
14231435 @Callable(i)
14241436 func getOneTknV2WithBonusREADONLY (outAssetId,lpAssetAmount) = {
14251437 let amId = toBase58String(value(cfgAmountAssetId))
14261438 let prId = toBase58String(value(cfgPriceAssetId))
14271439 let lpId = toBase58String(value(cfgLpAssetId))
14281440 let amBalance = getAccBalance(amId)
14291441 let prBalance = getAccBalance(prId)
1430- let $t05020650321 = {
1442+ let $t05061250727 = {
14311443 let @ = invoke(this, "getOneTknV2READONLY", [outAssetId, lpAssetAmount], nil)
14321444 if ($isInstanceOf(@, "(Int, Int)"))
14331445 then @
14341446 else throw(($getType(@) + " couldn't be cast to (Int, Int)"))
14351447 }
1436- let totalGet = $t05020650321._1
1437- let feeAmount = $t05020650321._2
1448+ let totalGet = $t05061250727._1
1449+ let feeAmount = $t05061250727._2
14381450 let r = ego("", lpId, lpAssetAmount, this)
14391451 let outAmAmt = r._1
14401452 let outPrAmt = r._2
14411453 let sumOfGetAssets = (outAmAmt + outPrAmt)
14421454 let bonus = if ((sumOfGetAssets == 0))
14431455 then if ((totalGet == 0))
14441456 then 0
14451457 else throw("bonus calculation error")
14461458 else fraction((totalGet - sumOfGetAssets), scale8, sumOfGetAssets)
14471459 $Tuple2(nil, $Tuple3(totalGet, feeAmount, bonus))
14481460 }
14491461
14501462
14511463
14521464 @Callable(i)
14531465 func getNoLess (noLessThenAmtAsset,noLessThenPriceAsset) = {
14541466 let r = cg(i)
14551467 let outAmAmt = r._1
14561468 let outPrAmt = r._2
14571469 let pmtAmt = r._3
14581470 let pmtAssetId = r._4
14591471 let state = r._5
14601472 if ((noLessThenAmtAsset > outAmAmt))
14611473 then throw(((("Failed: " + toString(outAmAmt)) + " < ") + toString(noLessThenAmtAsset)))
14621474 else if ((noLessThenPriceAsset > outPrAmt))
14631475 then throw(((("Failed: " + toString(outPrAmt)) + " < ") + toString(noLessThenPriceAsset)))
14641476 else {
14651477 let currentDLp = calcCurrentDLp(toBigInt(0), toBigInt(0), toBigInt(0))
14661478 if ((currentDLp == currentDLp))
14671479 then {
14681480 let burnLPAssetOnFactory = invoke(fca, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
14691481 if ((burnLPAssetOnFactory == burnLPAssetOnFactory))
14701482 then {
1471- let $t05148751568 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1472- let refreshDLpActions = $t05148751568._1
1473- let updatedDLp = $t05148751568._2
1483+ let $t05189351974 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1484+ let refreshDLpActions = $t05189351974._1
1485+ let updatedDLp = $t05189351974._2
14741486 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
14751487 if ((isUpdatedDLpValid == isUpdatedDLpValid))
14761488 then (state ++ refreshDLpActions)
14771489 else throw("Strict value is not equal to itself.")
14781490 }
14791491 else throw("Strict value is not equal to itself.")
14801492 }
14811493 else throw("Strict value is not equal to itself.")
14821494 }
14831495 }
14841496
14851497
14861498
14871499 @Callable(i)
14881500 func unstakeAndGet (amount) = {
14891501 let checkPayments = if ((size(i.payments) != 0))
14901502 then throw("No pmnts expd")
14911503 else true
14921504 if ((checkPayments == checkPayments))
14931505 then {
14941506 let factoryCfg = gfc()
14951507 let lpAssetId = cfgLpAssetId
14961508 let staking = valueOrErrorMessage(addressFromString(factoryCfg[idxFactStakCntr]), "Wr st addr")
14971509 let currentDLp = calcCurrentDLp(toBigInt(0), toBigInt(0), toBigInt(0))
14981510 if ((currentDLp == currentDLp))
14991511 then {
15001512 let unstakeInv = invoke(staking, "unstake", [toBase58String(lpAssetId), amount], nil)
15011513 if ((unstakeInv == unstakeInv))
15021514 then {
15031515 let r = ego(toBase58String(i.transactionId), toBase58String(lpAssetId), amount, i.caller)
15041516 let outAmAmt = r._1
15051517 let outPrAmt = r._2
15061518 let sts = parseIntValue(r._9)
15071519 let state = r._10
15081520 let v = if (if (igs())
15091521 then true
15101522 else (sts == PoolShutdown))
15111523 then throw(("Blocked: " + toString(sts)))
15121524 else true
15131525 if ((v == v))
15141526 then {
15151527 let burnA = invoke(fca, "burn", [amount], [AttachedPayment(lpAssetId, amount)])
15161528 if ((burnA == burnA))
15171529 then {
1518- let $t05259552676 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1519- let refreshDLpActions = $t05259552676._1
1520- let updatedDLp = $t05259552676._2
1530+ let $t05300153082 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1531+ let refreshDLpActions = $t05300153082._1
1532+ let updatedDLp = $t05300153082._2
15211533 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
15221534 if ((isUpdatedDLpValid == isUpdatedDLpValid))
15231535 then (state ++ refreshDLpActions)
15241536 else throw("Strict value is not equal to itself.")
15251537 }
15261538 else throw("Strict value is not equal to itself.")
15271539 }
15281540 else throw("Strict value is not equal to itself.")
15291541 }
15301542 else throw("Strict value is not equal to itself.")
15311543 }
15321544 else throw("Strict value is not equal to itself.")
15331545 }
15341546 else throw("Strict value is not equal to itself.")
15351547 }
15361548
15371549
15381550
15391551 @Callable(i)
15401552 func unstakeAndGetNoLess (unstakeAmount,noLessThenAmountAsset,noLessThenPriceAsset) = {
15411553 let isGetDisabled = if (igs())
15421554 then true
15431555 else (cfgPoolStatus == PoolShutdown)
15441556 let checks = [if (!(isGetDisabled))
15451557 then true
15461558 else throw("get operation is blocked by admin"), if ((size(i.payments) == 0))
15471559 then true
15481560 else throw("no payments are expected")]
15491561 if ((checks == checks))
15501562 then {
15511563 let currentDLp = calcCurrentDLp(toBigInt(0), toBigInt(0), toBigInt(0))
15521564 if ((currentDLp == currentDLp))
15531565 then {
15541566 let unstakeInv = invoke(stakingContract, "unstake", [toBase58String(cfgLpAssetId), unstakeAmount], nil)
15551567 if ((unstakeInv == unstakeInv))
15561568 then {
15571569 let res = ego(toBase58String(i.transactionId), toBase58String(cfgLpAssetId), unstakeAmount, i.caller)
15581570 let outAmAmt = res._1
15591571 let outPrAmt = res._2
15601572 let state = res._10
15611573 let checkAmounts = [if ((outAmAmt >= noLessThenAmountAsset))
15621574 then true
15631575 else throw(makeString(["amount asset amount to receive is less than ", toString(noLessThenAmountAsset)], "")), if ((outPrAmt >= noLessThenPriceAsset))
15641576 then true
15651577 else throw(makeString(["price asset amount to receive is less than ", toString(noLessThenPriceAsset)], ""))]
15661578 if ((checkAmounts == checkAmounts))
15671579 then {
15681580 let burnLPAssetOnFactory = invoke(fca, "burn", [unstakeAmount], [AttachedPayment(cfgLpAssetId, unstakeAmount)])
15691581 if ((burnLPAssetOnFactory == burnLPAssetOnFactory))
15701582 then {
1571- let $t05392754008 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1572- let refreshDLpActions = $t05392754008._1
1573- let updatedDLp = $t05392754008._2
1583+ let $t05433354414 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1584+ let refreshDLpActions = $t05433354414._1
1585+ let updatedDLp = $t05433354414._2
15741586 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
15751587 if ((isUpdatedDLpValid == isUpdatedDLpValid))
15761588 then (state ++ refreshDLpActions)
15771589 else throw("Strict value is not equal to itself.")
15781590 }
15791591 else throw("Strict value is not equal to itself.")
15801592 }
15811593 else throw("Strict value is not equal to itself.")
15821594 }
15831595 else throw("Strict value is not equal to itself.")
15841596 }
15851597 else throw("Strict value is not equal to itself.")
15861598 }
15871599 else throw("Strict value is not equal to itself.")
15881600 }
15891601
15901602
15911603
15921604 @Callable(i)
15931605 func unstakeAndGetOneTknV2 (unstakeAmount,outAssetId,minOutAmount) = {
15941606 let isPoolOneTokenOperationsDisabled = {
15951607 let @ = invoke(fca, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
15961608 if ($isInstanceOf(@, "Boolean"))
15971609 then @
15981610 else throw(($getType(@) + " couldn't be cast to Boolean"))
15991611 }
16001612 let isGetDisabled = if (if (igs())
16011613 then true
16021614 else (cfgPoolStatus == PoolShutdown))
16031615 then true
16041616 else isPoolOneTokenOperationsDisabled
16051617 let checks = [if (if (!(isGetDisabled))
16061618 then true
16071619 else isManager(i))
16081620 then true
16091621 else throwErr("get operation is blocked by admin"), if ((size(i.payments) == 0))
16101622 then true
16111623 else throwErr("no payments are expected")]
16121624 if ((checks == checks))
16131625 then {
16141626 let factoryCfg = gfc()
16151627 let lpAssetId = cfgLpAssetId
16161628 let staking = valueOrErrorMessage(addressFromString(factoryCfg[idxFactStakCntr]), "Wr st addr")
16171629 let userAddress = i.caller
16181630 let lpAssetRecipientAddress = this
16191631 let unstakeInv = invoke(staking, "unstakeINTERNAL", [lpAssetId, unstakeAmount, userAddress.bytes, lpAssetRecipientAddress.bytes], nil)
16201632 if ((unstakeInv == unstakeInv))
16211633 then {
1622- let $t05503055218 = getOneTknV2Internal(outAssetId, minOutAmount, [AttachedPayment(lpAssetId, unstakeAmount)], i.caller, i.originCaller, i.transactionId)
1623- let state = $t05503055218._1
1624- let totalAmount = $t05503055218._2
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
16251637 $Tuple2(state, totalAmount)
16261638 }
16271639 else throw("Strict value is not equal to itself.")
16281640 }
16291641 else throw("Strict value is not equal to itself.")
16301642 }
16311643
16321644
16331645
16341646 @Callable(i)
16351647 func putOneTknV2WithBonusREADONLY (paymentAmountRaw,paymentAssetId) = {
1636- let $t05534655449 = calcPutOneTkn(paymentAmountRaw, paymentAssetId, "", "", true)
1637- let lpAmount = $t05534655449._1
1638- let state = $t05534655449._2
1639- let feeAmount = $t05534655449._3
1640- let bonus = $t05534655449._4
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
16411653 $Tuple2(nil, $Tuple3(lpAmount, feeAmount, bonus))
16421654 }
16431655
16441656
16451657
16461658 @Callable(i)
16471659 func putOneTknV2WithoutTakeFeeREADONLY (paymentAmountRaw,paymentAssetId) = {
1648- let $t05559755701 = calcPutOneTkn(paymentAmountRaw, paymentAssetId, "", "", false)
1649- let lpAmount = $t05559755701._1
1650- let state = $t05559755701._2
1651- let feeAmount = $t05559755701._3
1652- let bonus = $t05559755701._4
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
16531665 $Tuple2(nil, $Tuple3(lpAmount, feeAmount, bonus))
16541666 }
16551667
16561668
16571669
16581670 @Callable(i)
16591671 func activate (amtAsStr,prAsStr) = if ((toString(i.caller) != toString(fca)))
16601672 then throw("denied")
16611673 else $Tuple2([StringEntry(aa(), amtAsStr), StringEntry(pa(), prAsStr)], "success")
16621674
16631675
16641676
16651677 @Callable(i)
16661678 func setS (k,v) = if ((toString(i.caller) != strf(this, ada())))
16671679 then pd
16681680 else [StringEntry(k, v)]
16691681
16701682
16711683
16721684 @Callable(i)
16731685 func setI (k,v) = if ((toString(i.caller) != strf(this, ada())))
16741686 then pd
16751687 else [IntegerEntry(k, v)]
16761688
16771689
16781690
16791691 @Callable(i)
16801692 func getPoolConfigWrapperREADONLY () = $Tuple2(nil, gpc())
16811693
16821694
16831695
16841696 @Callable(i)
16851697 func getAccBalanceWrapperREADONLY (assetId) = $Tuple2(nil, getAccBalance(assetId))
16861698
16871699
16881700
16891701 @Callable(i)
16901702 func calcPricesWrapperREADONLY (amAmt,prAmt,lpAmt) = {
16911703 let pr = calcPrices(amAmt, prAmt, lpAmt)
16921704 $Tuple2(nil, [toString(pr[0]), toString(pr[1]), toString(pr[2])])
16931705 }
16941706
16951707
16961708
16971709 @Callable(i)
16981710 func fromX18WrapperREADONLY (val,resScaleMult) = $Tuple2(nil, f1(parseBigIntValue(val), resScaleMult))
16991711
17001712
17011713
17021714 @Callable(i)
17031715 func toX18WrapperREADONLY (origVal,origScaleMult) = $Tuple2(nil, toString(t1(origVal, origScaleMult)))
17041716
17051717
17061718
17071719 @Callable(i)
17081720 func calcPriceBigIntWrapperREADONLY (prAmtX18,amAmtX18) = $Tuple2(nil, toString(cpbi(parseBigIntValue(prAmtX18), parseBigIntValue(amAmtX18))))
17091721
17101722
17111723
17121724 @Callable(i)
17131725 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, ""))
17141726
17151727
17161728
17171729 @Callable(i)
17181730 func estimateGetOperationWrapperREADONLY (txId58,pmtAsId,pmtLpAmt,usrAddr) = {
17191731 let r = ego(txId58, pmtAsId, pmtLpAmt, addressFromStringValue(usrAddr))
17201732 $Tuple2(nil, $Tuple10(r._1, r._2, r._3, r._4, r._5, r._6, r._7, toString(r._8), r._9, r._10))
17211733 }
17221734
17231735
1736+
1737+@Callable(i)
1738+func changeAmp () = {
1739+ let cfg = invoke(fca, "getChangeAmpConfigREADONLY", [toString(this)], nil)
1740+ let $t05879458993 = match cfg {
1741+ case list: List[Any] =>
1742+ $Tuple3({
1743+ let @ = list[0]
1744+ if ($isInstanceOf(@, "Int"))
1745+ then @
1746+ else throw(($getType(@) + " couldn't be cast to Int"))
1747+ }, {
1748+ let @ = list[1]
1749+ if ($isInstanceOf(@, "Int"))
1750+ then @
1751+ else throw(($getType(@) + " couldn't be cast to Int"))
1752+ }, {
1753+ let @ = list[2]
1754+ if ($isInstanceOf(@, "Int"))
1755+ then @
1756+ else throw(($getType(@) + " couldn't be cast to Int"))
1757+ })
1758+ case _ =>
1759+ throwErr("invalid entry type")
1760+ }
1761+ let delay = $t05879458993._1
1762+ let delta = $t05879458993._2
1763+ let target = $t05879458993._3
1764+ let curAmp = parseIntValue(getStringValue(amp()))
1765+ let newAmpRaw = (curAmp + delta)
1766+ let newAmp = if ((0 > delta))
1767+ then if ((target > newAmpRaw))
1768+ then target
1769+ else newAmpRaw
1770+ else if ((newAmpRaw > target))
1771+ then target
1772+ else newAmpRaw
1773+ let lastCall = valueOrElse(getInteger(keyChangeAmpLastCall()), 0)
1774+ let wait = (lastCall + delay)
1775+ let checks = [if ((height > wait))
1776+ then true
1777+ else throwErr("try again in few blocks"), if ((curAmp != newAmp))
1778+ then true
1779+ else throwErr("already reached target")]
1780+ if ((checks == checks))
1781+ then [IntegerEntry(keyChangeAmpLastCall(), height), StringEntry(amp(), toString(newAmp)), StringEntry(keyAmpHistory(height), toString(newAmp))]
1782+ else throw("Strict value is not equal to itself.")
1783+ }
1784+
1785+
17241786 @Verifier(tx)
17251787 func verify () = {
17261788 let targetPublicKey = match m() {
17271789 case pk: ByteVector =>
17281790 pk
17291791 case _: Unit =>
17301792 tx.senderPublicKey
17311793 case _ =>
17321794 throw("Match error")
17331795 }
17341796 match tx {
17351797 case order: Order =>
17361798 let matcherPub = mp()
1737- let $t05849358562 = validateMatcherOrderAllowed(order)
1738- let orderValid = $t05849358562._1
1739- let orderValidInfo = $t05849358562._2
1799+ let $t05990560022 = if (skipOrderValidation())
1800+ then $Tuple2(true, "")
1801+ else validateMatcherOrderAllowed(order)
1802+ let orderValid = $t05990560022._1
1803+ let orderValidInfo = $t05990560022._2
17401804 let senderValid = sigVerify(order.bodyBytes, order.proofs[0], order.senderPublicKey)
17411805 let matcherValid = sigVerify(order.bodyBytes, order.proofs[1], matcherPub)
17421806 if (if (if (orderValid)
17431807 then senderValid
17441808 else false)
17451809 then matcherValid
17461810 else false)
17471811 then true
17481812 else throwOrderError(orderValid, orderValidInfo, senderValid, matcherValid)
17491813 case s: SetScriptTransaction =>
17501814 if (sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey))
17511815 then true
17521816 else {
17531817 let newHash = blake2b256(value(s.script))
17541818 let allowedHash = fromBase64String(value(getString(fca, keyAllowedLpStableScriptHash())))
17551819 let currentHash = scriptHash(this)
17561820 if ((allowedHash == newHash))
17571821 then (currentHash != newHash)
17581822 else false
17591823 }
17601824 case _ =>
17611825 sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey)
17621826 }
17631827 }
17641828

github/deemru/w8io/026f985 
240.48 ms