tx · 2fALsp4rWUCvM7PUj4qiFBKW564nDE9M8sgt55Wyk1XV

3NAefciWv6f9fWvEXdGgpHfanJFG8HqfjuT:  -0.04100000 Waves

2023.05.04 14:16 [2562938] smart account 3NAefciWv6f9fWvEXdGgpHfanJFG8HqfjuT > SELF 0.00000000 Waves

{ "type": 13, "id": "2fALsp4rWUCvM7PUj4qiFBKW564nDE9M8sgt55Wyk1XV", "fee": 4100000, "feeAssetId": null, "timestamp": 1683198991762, "version": 2, "chainId": 84, "sender": "3NAefciWv6f9fWvEXdGgpHfanJFG8HqfjuT", "senderPublicKey": "D1BL65meykxFZTCuq7jq9HSGLLnWvQamQPUNrguW5w39", "proofs": [ "2qrfgnQRTDTj85nmr77WyLHoHCEk6ybynaGrK2u9TnT4VeyDAu812jueqk5N8fdBU7yhmC5YF4239j7zbhhKevap" ], "script": "base64:BgKHLAgCEgUKAwEEARIHCgUBBAEIARIDCgEIEgMKAQgSABIECgIBBBIECgIBBBIDCgEBEgASBAoCCAESABIECgIIARIECgIIARIECgIBARIDCgEBEgUKAwEBARIFCgMBCAESBAoCAQgSBAoCAQgSBAoCCAgSABIDCgEIEgUKAwEBARIECgIIARIECgIBARIECgIICBILCgkIAQECAQIIBAQSBgoECAgBCBIAIgZzY2FsZTgiDHNjYWxlOEJpZ0ludCIHc2NhbGUxOCIKemVyb0JpZ0ludCIEYmlnMCIEYmlnMSIEYmlnMiIEYmlnMyIEYmlnNCIKc2xpcHBhZ2U0RCILd2F2ZXNTdHJpbmciCmFtcEluaXRpYWwiBUFtdWx0IgVEY29udiIDU0VQIgVFTVBUWSIKUG9vbEFjdGl2ZSIKUG9vbFB1dERpcyIOUG9vbE1hdGNoZXJEaXMiDFBvb2xTaHV0ZG93biIOaWR4UG9vbEFkZHJlc3MiCWlkeFBvb2xTdCIJaWR4TFBBc0lkIglpZHhBbUFzSWQiCWlkeFByQXNJZCILaWR4QW10QXNEY20iDWlkeFByaWNlQXNEY20iC2lkeElBbXRBc0lkIg1pZHh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Bub3QgZXF1YWwgdG8gaXRzZWxmLgECaXUBAml2AAQCaXcEAmdtCQECZ2wAAwkAAQIFAmdtAgpCeXRlVmVjdG9yBAJncQUCZ20FAmdxAwkAAQIFAmdtAgRVbml0CAUCaXUPc2VuZGVyUHVibGljS2V5CQACAQILTWF0Y2ggZXJyb3IEAmdtBQJpdQMJAAECBQJnbQIFT3JkZXIEAmZhBQJnbQQCaXgJAQJiYgAEAml5AwkBAmd4AAkAlAoCBgIACQECZVoBBQJmYQQCYUsIBQJpeQJfMQQCYUwIBQJpeQJfMgQCYU0JAPQDAwgFAmZhCWJvZHlCeXRlcwkAkQMCCAUCZmEGcHJvb2ZzAAAIBQJmYQ9zZW5kZXJQdWJsaWNLZXkEAmFOCQD0AwMIBQJmYQlib2R5Qnl0ZXMJAJEDAggFAmZhBnByb29mcwABBQJpeAMDAwUCYUsFAmFNBwUCYU4HBgkBAmFKBAUCYUsFAmFMBQJhTQUCYU4DCQABAgUCZ20CFFNldFNjcmlwdFRyYW5zYWN0aW9uBAJjRgUCZ20DCQD0AwMIBQJpdQlib2R5Qnl0ZXMJAJEDAggFAml1BnByb29mcwAABQJpdwYEAml6CQD2AwEJAQV2YWx1ZQEIBQJjRgZzY3JpcHQEAmlBCQDbBAEJAQV2YWx1ZQEJAJ0IAgUCYVYJAQJhRgAEAmlCCQDxBwEFBHRoaXMDCQAAAgUCaUEFAml6CQECIT0CBQJpQgUCaXoHCQD0AwMIBQJpdQlib2R5Qnl0ZXMJAJEDAggFAml1BnByb29mcwAABQJpd9dYCLA=", "height": 2562938, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: CJASj7QXvp6QQUVdoaVjmEpTFAcPkCXUabAvTkycPBWr Next: 8VC9TU7P6uhQTkta7oti1VYZe7dN5UpBri166An8kncz Diff:
OldNewDifferences
234234 else toBase58String(value(input))
235235
236236
237-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]))
237+func parsePoolConfig (poolConfig) = $Tuple7(addressFromStringValue(poolConfig[idxPoolAddress]), parseIntValue(poolConfig[idxPoolSt]), fromBase58String(poolConfig[idxLPAsId]), parseAssetId(poolConfig[idxAmAsId]), parseAssetId(poolConfig[idxPrAsId]), parseIntValue(poolConfig[idxAmtAsDcm]), parseIntValue(poolConfig[idxPriceAsDcm]))
238238
239239
240240 let poolConfigParsed = parsePoolConfig(gpc())
241241
242-let $t081858414 = poolConfigParsed
242+let $t080878273 = poolConfigParsed
243243
244-let cfgPoolAddress = $t081858414._1
244+let cfgPoolAddress = $t080878273._1
245245
246-let cfgPoolStatus = $t081858414._2
246+let cfgPoolStatus = $t080878273._2
247247
248-let cfgLpAssetId = $t081858414._3
248+let cfgLpAssetId = $t080878273._3
249249
250-let cfgAmountAssetId = $t081858414._4
250+let cfgAmountAssetId = $t080878273._4
251251
252-let cfgPriceAssetId = $t081858414._5
252+let cfgPriceAssetId = $t080878273._5
253253
254-let cfgAmountAssetDecimals = $t081858414._6
254+let cfgAmountAssetDecimals = $t080878273._6
255255
256-let cfgPriceAssetDecimals = $t081858414._7
257-
258-let cfgInAmountAssedId = $t081858414._8
259-
260-let cfgInPriceAssetId = $t081858414._9
256+let cfgPriceAssetDecimals = $t080878273._7
261257
262258 func gfc () = split(strf(fca, fcfg()), SEP)
263259
378374 }
379375
380376 let arr = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16]
381- let $t01291912967 = {
377+ let $t01277812826 = {
382378 let $l = arr
383379 let $s = size($l)
384380 let $acc0 = $Tuple2(s, false)
392388
393389 $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)
394390 }
395- let d = $t01291912967._1
396- let found = $t01291912967._2
391+ let d = $t01277812826._1
392+ let found = $t01277812826._2
397393 if (found)
398394 then d
399395 else throw(("D calculation error, D = " + toString(d)))
440436 let lpId = cfgLpAssetId
441437 let amIdStr = toBase58String(value(cfgAmountAssetId))
442438 let prIdStr = toBase58String(value(cfgPriceAssetId))
443- let inAmIdStr = cfgInAmountAssedId
444- let inPrIdStr = cfgInPriceAssetId
445439 let amtDcm = cfgAmountAssetDecimals
446440 let priceDcm = cfgPriceAssetDecimals
447441 let sts = toString(cfgPoolStatus)
529523 else calcLpAmt
530524 let amDiff = (inAmAmt - calcAmAssetPmt)
531525 let prDiff = (inPrAmt - calcPrAssetPmt)
532- let $t02080621151 = if (if (isOneAsset)
526+ let $t02058820933 = if (if (isOneAsset)
533527 then (pmtId == amIdStr)
534528 else false)
535529 then $Tuple2(pmtAmt, 0)
538532 else false)
539533 then $Tuple2(0, pmtAmt)
540534 else $Tuple2(calcAmAssetPmt, calcPrAssetPmt)
541- let writeAmAmt = $t02080621151._1
542- let writePrAmt = $t02080621151._2
535+ let writeAmAmt = $t02058820933._1
536+ let writePrAmt = $t02058820933._2
543537 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))]
544538 $Tuple13(calcLpAmt, emitLpAmt, curPrice, amBalance, prBalance, lpEm, lpId, sts, commonState, amDiff, prDiff, inAmId, inPrId)
545539 }
558552 let c = (((((D * D) / (x * n)) * D) * aPrecision) / (ann * n))
559553 let b = ((s + ((D * aPrecision) / ann)) - D)
560554 func calc (acc,cur) = {
561- let $t02234622366 = acc
562- let y = $t02234622366._1
563- let found = $t02234622366._2
555+ let $t02212822148 = acc
556+ let y = $t02212822148._1
557+ let found = $t02212822148._2
564558 if ((found != unit))
565559 then acc
566560 else {
573567 }
574568
575569 let arr = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
576- let $t02267322720 = {
570+ let $t02245522502 = {
577571 let $l = arr
578572 let $s = size($l)
579573 let $acc0 = $Tuple2(D, unit)
587581
588582 $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)
589583 }
590- let y = $t02267322720._1
591- let found = $t02267322720._2
584+ let y = $t02245522502._1
585+ let found = $t02245522502._2
592586 if ((found != unit))
593587 then y
594588 else throw(("Y calculation error, Y = " + toString(y)))
632626 let priceAssetBalance = getAccBalance(assetIdToString(cfgPriceAssetId))
633627 let amountAssetAmount = order.amount
634628 let priceAssetAmount = fraction(order.amount, order.price, scale8, FLOOR)
635- let $t02491825130 = if ((order.orderType == Buy))
629+ let $t02470024912 = if ((order.orderType == Buy))
636630 then $Tuple2(amountAssetAmount, -(priceAssetAmount))
637631 else $Tuple2(-(amountAssetAmount), priceAssetAmount)
638- let amountAssetBalanceDelta = $t02491825130._1
639- let priceAssetBalanceDelta = $t02491825130._2
632+ let amountAssetBalanceDelta = $t02470024912._1
633+ let priceAssetBalanceDelta = $t02470024912._2
640634 if (if (if (igs())
641635 then true
642636 else (cfgPoolStatus == PoolMatcherDis))
649643 then throw("Wr assets")
650644 else {
651645 let dLp = parseBigIntValue(valueOrElse(getString(this, keyDLp), "0"))
652- let $t02547225572 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
653- let unusedActions = $t02547225572._1
654- let dLpNew = $t02547225572._2
646+ let $t02525425354 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
647+ let unusedActions = $t02525425354._1
648+ let dLpNew = $t02525425354._2
655649 let isOrderValid = (dLpNew >= dLp)
656650 let info = makeString(["dLp=", toString(dLp), " dLpNew=", toString(dLpNew), " amountAssetBalance=", toString(amountAssetBalance), " priceAssetBalance=", toString(priceAssetBalance), " amountAssetBalanceDelta=", toString(amountAssetBalanceDelta), " priceAssetBalanceDelta=", toString(priceAssetBalanceDelta), " height=", toString(height)], "")
657651 $Tuple2(isOrderValid, info)
705699 then {
706700 let amBalance = getAccBalance(amId)
707701 let prBalance = getAccBalance(prId)
708- let $t02822828690 = if ((txId == ""))
702+ let $t02801028472 = if ((txId == ""))
709703 then $Tuple2(amBalance, prBalance)
710704 else if ((pmtAssetId == amId))
711705 then if ((pmtAmtRaw > amBalance))
716710 then throw("invalid payment amount")
717711 else $Tuple2(amBalance, (prBalance - pmtAmtRaw))
718712 else throw("wrong pmtAssetId")
719- let amBalanceOld = $t02822828690._1
720- let prBalanceOld = $t02822828690._2
721- let $t02869628872 = if ((pmtAssetId == amId))
713+ let amBalanceOld = $t02801028472._1
714+ let prBalanceOld = $t02801028472._2
715+ let $t02847828654 = if ((pmtAssetId == amId))
722716 then $Tuple2(pmtAmtRaw, 0)
723717 else if ((pmtAssetId == prId))
724718 then $Tuple2(0, pmtAmtRaw)
725719 else throw("invalid payment")
726- let amAmountRaw = $t02869628872._1
727- let prAmountRaw = $t02869628872._2
728- let $t02887629130 = if (withTakeFee)
720+ let amAmountRaw = $t02847828654._1
721+ let prAmountRaw = $t02847828654._2
722+ let $t02865828912 = if (withTakeFee)
729723 then $Tuple3(takeFee(amAmountRaw, inFee)._1, takeFee(prAmountRaw, inFee)._1, takeFee(pmtAmtRaw, inFee)._2)
730724 else $Tuple3(amAmountRaw, prAmountRaw, 0)
731- let amAmount = $t02887629130._1
732- let prAmount = $t02887629130._2
733- let feeAmount = $t02887629130._3
725+ let amAmount = $t02865828912._1
726+ let prAmount = $t02865828912._2
727+ let feeAmount = $t02865828912._3
734728 let amBalanceNew = (amBalanceOld + amAmount)
735729 let prBalanceNew = (prBalanceOld + prAmount)
736730 let D0 = getD([t1(amBalanceOld, cfgAmountAssetDecimals), t1(prBalanceOld, cfgPriceAssetDecimals)])
778772 else {
779773 let amBalance = getAccBalance(amId)
780774 let prBalance = getAccBalance(prId)
781- let $t03124231353 = {
775+ let $t03102431135 = {
782776 let @ = invoke(this, "getOneTknV2READONLY", [outAssetId, pmtAmt], nil)
783777 if ($isInstanceOf(@, "(Int, Int)"))
784778 then @
785779 else throw(($getType(@) + " couldn't be cast to (Int, Int)"))
786780 }
787- if (($t03124231353 == $t03124231353))
781+ if (($t03102431135 == $t03102431135))
788782 then {
789- let feeAmount = $t03124231353._2
790- let totalGet = $t03124231353._1
783+ let feeAmount = $t03102431135._2
784+ let totalGet = $t03102431135._1
791785 let totalAmount = if (if ((minOutAmount > 0))
792786 then (minOutAmount > totalGet)
793787 else false)
794788 then throwErr(makeString(["amount to receive is less than ", toString(minOutAmount)], ""))
795789 else totalGet
796- let $t03154331850 = if ((outAssetId == amId))
790+ let $t03132531632 = if ((outAssetId == amId))
797791 then $Tuple4(totalAmount, 0, ((amBalance - totalAmount) - feeAmount), prBalance)
798792 else if ((outAssetId == prId))
799793 then $Tuple4(0, totalAmount, amBalance, ((prBalance - totalAmount) - feeAmount))
800794 else throw("invalid out asset id")
801- let outAm = $t03154331850._1
802- let outPr = $t03154331850._2
803- let amBalanceNew = $t03154331850._3
804- let prBalanceNew = $t03154331850._4
795+ let outAm = $t03132531632._1
796+ let outPr = $t03132531632._2
797+ let amBalanceNew = $t03132531632._3
798+ let prBalanceNew = $t03132531632._4
805799 let curPrX18 = cpbi(t1(prBalanceNew, prDecimals), t1(amBalanceNew, amDecimals))
806800 let curPr = f1(curPrX18, scale8)
807801 let outAssetIdOrWaves = if ((outAssetId == "WAVES"))
816810 let burn = invoke(fca, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
817811 if ((burn == burn))
818812 then {
819- let $t03263532985 = {
813+ let $t03241732767 = {
820814 let feeAmountForCalc = if ((this == feeCollectorAddress))
821815 then 0
822816 else feeAmount
827821 then $Tuple2(-((totalGet + feeAmountForCalc)), 0)
828822 else $Tuple2(0, -((totalGet + feeAmountForCalc)))
829823 }
830- let amountAssetBalanceDelta = $t03263532985._1
831- let priceAssetBalanceDelta = $t03263532985._2
832- let $t03298833096 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
833- let refreshDLpActions = $t03298833096._1
834- let updatedDLp = $t03298833096._2
824+ let amountAssetBalanceDelta = $t03241732767._1
825+ let priceAssetBalanceDelta = $t03241732767._2
826+ let $t03277032878 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
827+ let refreshDLpActions = $t03277032878._1
828+ let updatedDLp = $t03277032878._2
835829 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
836830 if ((isUpdatedDLpValid == isUpdatedDLpValid))
837831 then $Tuple2((state ++ refreshDLpActions), totalAmount)
910904 let c = (((((D * D) / (x * n)) * D) * aPrecision) / (ann * n))
911905 let b = ((s + ((D * aPrecision) / ann)) - D)
912906 func calc (acc,cur) = {
913- let $t03454334563 = acc
914- let y = $t03454334563._1
915- let found = $t03454334563._2
907+ let $t03432534345 = acc
908+ let y = $t03432534345._1
909+ let found = $t03432534345._2
916910 if ((found != unit))
917911 then acc
918912 else {
925919 }
926920
927921 let arr = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
928- let $t03489434941 = {
922+ let $t03467634723 = {
929923 let $l = arr
930924 let $s = size($l)
931925 let $acc0 = $Tuple2(D, unit)
939933
940934 $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)
941935 }
942- let y = $t03489434941._1
943- let found = $t03489434941._2
936+ let y = $t03467634723._1
937+ let found = $t03467634723._2
944938 if ((found != unit))
945939 then y
946940 else throw(("Y calculation error, Y = " + toString(y)))
952946
953947 @Callable(i)
954948 func calculateAmountOutForSwapREADONLY (cleanAmountIn,isReverse,feePoolAmount) = {
955- let $t03529335717 = if ((isReverse == false))
949+ let $t03507535499 = if ((isReverse == false))
956950 then {
957951 let assetOut = strf(this, pa())
958952 let poolAmountInBalance = (toBigInt(getAccBalance(strf(this, aa()))) + toBigInt(cleanAmountIn))
963957 let poolAmountInBalance = (toBigInt(getAccBalance(strf(this, pa()))) + toBigInt(cleanAmountIn))
964958 $Tuple2(assetOut, poolAmountInBalance)
965959 }
966- let assetOut = $t03529335717._1
967- let poolAmountInBalance = $t03529335717._2
960+ let assetOut = $t03507535499._1
961+ let poolAmountInBalance = $t03507535499._2
968962 let poolConfig = gpc()
969963 let amId = poolConfig[idxAmAsId]
970964 let prId = poolConfig[idxPrAsId]
1004998 then {
1005999 let pmt = value(i.payments[0])
10061000 let assetIn = assetIdToString(pmt.assetId)
1007- let $t03715337547 = if ((isReverse == false))
1001+ let $t03693537329 = if ((isReverse == false))
10081002 then {
10091003 let assetOut = strf(this, pa())
10101004 let poolAmountInBalance = (getAccBalance(assetIn) - value(i.payments[0]).amount)
10151009 let poolAmountInBalance = (getAccBalance(assetIn) - value(i.payments[0]).amount)
10161010 $Tuple2(assetOut, poolAmountInBalance)
10171011 }
1018- let assetOut = $t03715337547._1
1019- let poolAmountInBalance = $t03715337547._2
1012+ let assetOut = $t03693537329._1
1013+ let poolAmountInBalance = $t03693537329._2
10201014 let poolConfig = gpc()
10211015 let amId = poolConfig[idxAmAsId]
10221016 let prId = poolConfig[idxPrAsId]
11561150 else throw("Strict value is not equal to itself.")
11571151 }
11581152 else [ScriptTransfer(i.caller, emitLpAmt, lpAssetId)]
1159- let $t04216642308 = refreshDLpInternal(0, 0, 0)
1160- let refreshDLpActions = $t04216642308._1
1161- let updatedDLp = $t04216642308._2
1153+ let $t04194842090 = refreshDLpInternal(0, 0, 0)
1154+ let refreshDLpActions = $t04194842090._1
1155+ let updatedDLp = $t04194842090._2
11621156 let check = if ((updatedDLp >= currentDLp))
11631157 then true
11641158 else throwErr(makeString(["updated DLp lower than current DLp", toString(amountAssetBalance), toString(priceAssetBalance), toString(lpAssetEmission), toString(currentDLp), toString(updatedDLp), toString(amDiff), toString(prDiff)], " "))
12311225 else calcCurrentDLp(toBigInt(0), toBigInt(pmtAmt), toBigInt(0))
12321226 if ((currentDLp == currentDLp))
12331227 then {
1234- let $t04394944107 = calcPutOneTkn(pmtAmt, pmtAssetId, toString(userAddress), toBase58String(i.transactionId), true)
1235- if (($t04394944107 == $t04394944107))
1228+ let $t04373143889 = calcPutOneTkn(pmtAmt, pmtAssetId, toString(userAddress), toBase58String(i.transactionId), true)
1229+ if (($t04373143889 == $t04373143889))
12361230 then {
1237- let feeAmount = $t04394944107._3
1238- let state = $t04394944107._2
1239- let estimLP = $t04394944107._1
1231+ let feeAmount = $t04373143889._3
1232+ let state = $t04373143889._2
1233+ let estimLP = $t04373143889._1
12401234 let emitLpAmt = if (if ((minOutAmount > 0))
12411235 then (minOutAmount > estimLP)
12421236 else false)
12641258 let sendFeeToMatcher = if ((feeAmount > 0))
12651259 then [ScriptTransfer(feeCollectorAddress, feeAmount, fromBase58String(pmtAssetId))]
12661260 else nil
1267- let $t04499245341 = if ((this == feeCollectorAddress))
1261+ let $t04477445123 = if ((this == feeCollectorAddress))
12681262 then $Tuple2(0, 0)
12691263 else {
12701264 let paymentInAmountAsset = if ((pmt.assetId == cfgAmountAssetId))
12741268 then $Tuple2(-(feeAmount), 0)
12751269 else $Tuple2(0, -(feeAmount))
12761270 }
1277- let amountAssetBalanceDelta = $t04499245341._1
1278- let priceAssetBalanceDelta = $t04499245341._2
1279- let $t04534445452 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
1280- let refreshDLpActions = $t04534445452._1
1281- let updatedDLp = $t04534445452._2
1271+ let amountAssetBalanceDelta = $t04477445123._1
1272+ let priceAssetBalanceDelta = $t04477445123._2
1273+ let $t04512645234 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
1274+ let refreshDLpActions = $t04512645234._1
1275+ let updatedDLp = $t04512645234._2
12821276 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
12831277 if ((isUpdatedDLpValid == isUpdatedDLpValid))
12841278 then $Tuple2((((state ++ lpTrnsfr) ++ sendFeeToMatcher) ++ refreshDLpActions), emitLpAmt)
13101304 let currentDLp = calcCurrentDLp(amAssetPmt, prAssetPmt, toBigInt(0))
13111305 if ((currentDLp == currentDLp))
13121306 then {
1313- let $t04648246547 = refreshDLpInternal(0, 0, 0)
1314- let refreshDLpActions = $t04648246547._1
1315- let updatedDLp = $t04648246547._2
1307+ let $t04626446329 = refreshDLpInternal(0, 0, 0)
1308+ let refreshDLpActions = $t04626446329._1
1309+ let updatedDLp = $t04626446329._2
13161310 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
13171311 if ((isUpdatedDLpValid == isUpdatedDLpValid))
13181312 then (state ++ refreshDLpActions)
13371331 let b = invoke(fca, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
13381332 if ((b == b))
13391333 then {
1340- let $t04772047802 = refreshDLpInternal(-(outAmtAmt), -(outPrAmt), 0)
1341- let refreshDLpActions = $t04772047802._1
1342- let updatedDLp = $t04772047802._2
1334+ let $t04750247584 = refreshDLpInternal(-(outAmtAmt), -(outPrAmt), 0)
1335+ let refreshDLpActions = $t04750247584._1
1336+ let updatedDLp = $t04750247584._2
13431337 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
13441338 if ((isUpdatedDLpValid == isUpdatedDLpValid))
13451339 then (state ++ refreshDLpActions)
13741368 else throwErr("exactly 1 payment are expected")]
13751369 if ((checks == checks))
13761370 then {
1377- let $t04842048575 = getOneTknV2Internal(outAssetId, minOutAmount, i.payments, i.caller, i.originCaller, i.transactionId)
1378- let state = $t04842048575._1
1379- let totalAmount = $t04842048575._2
1371+ let $t04820248357 = getOneTknV2Internal(outAssetId, minOutAmount, i.payments, i.caller, i.originCaller, i.transactionId)
1372+ let state = $t04820248357._1
1373+ let totalAmount = $t04820248357._2
13801374 $Tuple2(state, totalAmount)
13811375 }
13821376 else throw("Strict value is not equal to itself.")
13931387 if ((checkLastRefreshedBlockHeight == checkLastRefreshedBlockHeight))
13941388 then {
13951389 let dLp = valueOrErrorMessage(parseBigInt(valueOrElse(getString(this, keyDLp), "0")), fmtErr("invalid dLp"))
1396- let $t04909949163 = refreshDLpInternal(0, 0, 0)
1397- let dLpUpdateActions = $t04909949163._1
1398- let updatedDLp = $t04909949163._2
1390+ let $t04888148945 = refreshDLpInternal(0, 0, 0)
1391+ let dLpUpdateActions = $t04888148945._1
1392+ let updatedDLp = $t04888148945._2
13991393 let actions = if ((dLp != updatedDLp))
14001394 then dLpUpdateActions
14011395 else throwErr("nothing to refresh")
14231417 let newY = getYD(xp, index, D1)
14241418 let dy = (xp[index] - newY)
14251419 let totalGetRaw = max([0, toInt((dy - big1))])
1426- let $t05017350228 = takeFee(totalGetRaw, outFee)
1427- let totalGet = $t05017350228._1
1428- let feeAmount = $t05017350228._2
1420+ let $t04995550010 = takeFee(totalGetRaw, outFee)
1421+ let totalGet = $t04995550010._1
1422+ let feeAmount = $t04995550010._2
14291423 $Tuple2(nil, $Tuple2(totalGet, feeAmount))
14301424 }
14311425
14381432 let lpId = toBase58String(value(cfgLpAssetId))
14391433 let amBalance = getAccBalance(amId)
14401434 let prBalance = getAccBalance(prId)
1441- let $t05060350718 = {
1435+ let $t05038550500 = {
14421436 let @ = invoke(this, "getOneTknV2READONLY", [outAssetId, lpAssetAmount], nil)
14431437 if ($isInstanceOf(@, "(Int, Int)"))
14441438 then @
14451439 else throw(($getType(@) + " couldn't be cast to (Int, Int)"))
14461440 }
1447- let totalGet = $t05060350718._1
1448- let feeAmount = $t05060350718._2
1441+ let totalGet = $t05038550500._1
1442+ let feeAmount = $t05038550500._2
14491443 let r = ego("", lpId, lpAssetAmount, this)
14501444 let outAmAmt = r._1
14511445 let outPrAmt = r._2
14791473 let burnLPAssetOnFactory = invoke(fca, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
14801474 if ((burnLPAssetOnFactory == burnLPAssetOnFactory))
14811475 then {
1482- let $t05188451965 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1483- let refreshDLpActions = $t05188451965._1
1484- let updatedDLp = $t05188451965._2
1476+ let $t05166651747 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1477+ let refreshDLpActions = $t05166651747._1
1478+ let updatedDLp = $t05166651747._2
14851479 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
14861480 if ((isUpdatedDLpValid == isUpdatedDLpValid))
14871481 then (state ++ refreshDLpActions)
15261520 let burnA = invoke(fca, "burn", [amount], [AttachedPayment(lpAssetId, amount)])
15271521 if ((burnA == burnA))
15281522 then {
1529- let $t05299253073 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1530- let refreshDLpActions = $t05299253073._1
1531- let updatedDLp = $t05299253073._2
1523+ let $t05277452855 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1524+ let refreshDLpActions = $t05277452855._1
1525+ let updatedDLp = $t05277452855._2
15321526 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
15331527 if ((isUpdatedDLpValid == isUpdatedDLpValid))
15341528 then (state ++ refreshDLpActions)
15791573 let burnLPAssetOnFactory = invoke(fca, "burn", [unstakeAmount], [AttachedPayment(cfgLpAssetId, unstakeAmount)])
15801574 if ((burnLPAssetOnFactory == burnLPAssetOnFactory))
15811575 then {
1582- let $t05432454405 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1583- let refreshDLpActions = $t05432454405._1
1584- let updatedDLp = $t05432454405._2
1576+ let $t05410654187 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1577+ let refreshDLpActions = $t05410654187._1
1578+ let updatedDLp = $t05410654187._2
15851579 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
15861580 if ((isUpdatedDLpValid == isUpdatedDLpValid))
15871581 then (state ++ refreshDLpActions)
16301624 let unstakeInv = invoke(staking, "unstakeINTERNAL", [lpAssetId, unstakeAmount, userAddress.bytes, lpAssetRecipientAddress.bytes], nil)
16311625 if ((unstakeInv == unstakeInv))
16321626 then {
1633- let $t05542755615 = getOneTknV2Internal(outAssetId, minOutAmount, [AttachedPayment(lpAssetId, unstakeAmount)], i.caller, i.originCaller, i.transactionId)
1634- let state = $t05542755615._1
1635- let totalAmount = $t05542755615._2
1627+ let $t05520955397 = getOneTknV2Internal(outAssetId, minOutAmount, [AttachedPayment(lpAssetId, unstakeAmount)], i.caller, i.originCaller, i.transactionId)
1628+ let state = $t05520955397._1
1629+ let totalAmount = $t05520955397._2
16361630 $Tuple2(state, totalAmount)
16371631 }
16381632 else throw("Strict value is not equal to itself.")
16441638
16451639 @Callable(i)
16461640 func putOneTknV2WithBonusREADONLY (paymentAmountRaw,paymentAssetId) = {
1647- let $t05574355846 = calcPutOneTkn(paymentAmountRaw, paymentAssetId, "", "", true)
1648- let lpAmount = $t05574355846._1
1649- let state = $t05574355846._2
1650- let feeAmount = $t05574355846._3
1651- let bonus = $t05574355846._4
1641+ let $t05552555628 = calcPutOneTkn(paymentAmountRaw, paymentAssetId, "", "", true)
1642+ let lpAmount = $t05552555628._1
1643+ let state = $t05552555628._2
1644+ let feeAmount = $t05552555628._3
1645+ let bonus = $t05552555628._4
16521646 $Tuple2(nil, $Tuple3(lpAmount, feeAmount, bonus))
16531647 }
16541648
16561650
16571651 @Callable(i)
16581652 func putOneTknV2WithoutTakeFeeREADONLY (paymentAmountRaw,paymentAssetId) = {
1659- let $t05599456098 = calcPutOneTkn(paymentAmountRaw, paymentAssetId, "", "", false)
1660- let lpAmount = $t05599456098._1
1661- let state = $t05599456098._2
1662- let feeAmount = $t05599456098._3
1663- let bonus = $t05599456098._4
1653+ let $t05577655880 = calcPutOneTkn(paymentAmountRaw, paymentAssetId, "", "", false)
1654+ let lpAmount = $t05577655880._1
1655+ let state = $t05577655880._2
1656+ let feeAmount = $t05577655880._3
1657+ let bonus = $t05577655880._4
16641658 $Tuple2(nil, $Tuple3(lpAmount, feeAmount, bonus))
16651659 }
16661660
17221716 @Callable(i)
17231717 func changeAmp () = {
17241718 let cfg = invoke(fca, "getChangeAmpConfigREADONLY", [toString(this)], nil)
1725- let $t05850758706 = match cfg {
1719+ let $t05828958488 = match cfg {
17261720 case list: List[Any] =>
17271721 $Tuple3({
17281722 let @ = list[0]
17431737 case _ =>
17441738 throwErr("invalid entry type")
17451739 }
1746- let delay = $t05850758706._1
1747- let delta = $t05850758706._2
1748- let target = $t05850758706._3
1740+ let delay = $t05828958488._1
1741+ let delta = $t05828958488._2
1742+ let target = $t05828958488._3
17491743 let curAmp = parseIntValue(getStringValue(amp()))
17501744 let newAmpRaw = (curAmp + delta)
17511745 let newAmp = if ((0 > delta))
17811775 match tx {
17821776 case order: Order =>
17831777 let matcherPub = mp()
1784- let $t05961859735 = if (skipOrderValidation())
1778+ let $t05940059517 = if (skipOrderValidation())
17851779 then $Tuple2(true, "")
17861780 else validateMatcherOrderAllowed(order)
1787- let orderValid = $t05961859735._1
1788- let orderValidInfo = $t05961859735._2
1781+ let orderValid = $t05940059517._1
1782+ let orderValidInfo = $t05940059517._2
17891783 let senderValid = sigVerify(order.bodyBytes, order.proofs[0], order.senderPublicKey)
17901784 let matcherValid = sigVerify(order.bodyBytes, order.proofs[1], matcherPub)
17911785 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 ampInitial = 50
2727
2828 let Amult = "100"
2929
3030 let Dconv = "1"
3131
3232 let SEP = "__"
3333
3434 let EMPTY = ""
3535
3636 let PoolActive = 1
3737
3838 let PoolPutDis = 2
3939
4040 let PoolMatcherDis = 3
4141
4242 let PoolShutdown = 4
4343
4444 let idxPoolAddress = 1
4545
4646 let idxPoolSt = 2
4747
4848 let idxLPAsId = 3
4949
5050 let idxAmAsId = 4
5151
5252 let idxPrAsId = 5
5353
5454 let idxAmtAsDcm = 6
5555
5656 let idxPriceAsDcm = 7
5757
5858 let idxIAmtAsId = 8
5959
6060 let idxIPriceAsId = 9
6161
6262 let idxFactStakCntr = 1
6363
6464 let idxFactoryRestCntr = 6
6565
6666 let idxFactSlippCntr = 7
6767
6868 let idxFactGwxRewCntr = 10
6969
7070 let feeDefault = fraction(10, scale8, 10000)
7171
7272 func t1 (origVal,origScaleMult) = fraction(toBigInt(origVal), scale18, toBigInt(origScaleMult))
7373
7474
7575 func t1BigInt (origVal,origScaleMult) = fraction(origVal, scale18, origScaleMult)
7676
7777
7878 func f1 (val,resultScaleMult) = toInt(fraction(val, toBigInt(resultScaleMult), scale18))
7979
8080
8181 func fromX18Round (val,resultScaleMult,round) = toInt(fraction(val, toBigInt(resultScaleMult), scale18, round))
8282
8383
8484 func t2 (origVal,origScaleMult) = fraction(origVal, scale18, toBigInt(origScaleMult))
8585
8686
8787 func f2 (val,resultScaleMult) = fraction(val, toBigInt(resultScaleMult), scale18)
8888
8989
9090 func ts (amt,resScale,curScale) = fraction(amt, resScale, curScale)
9191
9292
9393 func abs (val) = if ((zeroBigInt > val))
9494 then -(val)
9595 else val
9696
9797
9898 func absBigInt (val) = if ((zeroBigInt > val))
9999 then -(val)
100100 else val
101101
102102
103103 func fc () = "%s__factoryContract"
104104
105105
106106 func mpk () = "%s__managerPublicKey"
107107
108108
109109 func pmpk () = "%s__pendingManagerPublicKey"
110110
111111
112112 func pl () = "%s%s__price__last"
113113
114114
115115 func ph (h,t) = makeString(["%s%s%d%d__price__history", toString(h), toString(t)], SEP)
116116
117117
118118 func pau (ua,txId) = ((("%s%s%s__P__" + ua) + "__") + txId)
119119
120120
121121 func gau (ua,txId) = ((("%s%s%s__G__" + ua) + "__") + txId)
122122
123123
124124 func aa () = "%s__amountAsset"
125125
126126
127127 func pa () = "%s__priceAsset"
128128
129129
130130 func amp () = "%s__amp"
131131
132132
133133 func keyAmpHistory (heightBlocks) = ("%s%d__amp__" + toString(heightBlocks))
134134
135135
136136 func keyChangeAmpLastCall () = "%s__changeAmpLastCall"
137137
138138
139139 let keyFee = "%s__fee"
140140
141141 let fee = valueOrElse(getInteger(this, keyFee), feeDefault)
142142
143143 let keyDLp = makeString(["%s", "dLp"], SEP)
144144
145145 let keyDLpRefreshedHeight = makeString(["%s", "dLpRefreshedHeight"], SEP)
146146
147147 let keyDLpRefreshDelay = makeString(["%s", "refreshDLpDelay"], SEP)
148148
149149 let dLpRefreshDelayDefault = 30
150150
151151 let dLpRefreshDelay = valueOrElse(getInteger(this, keyDLpRefreshDelay), dLpRefreshDelayDefault)
152152
153153 func fcfg () = "%s__factoryConfig"
154154
155155
156156 func mtpk () = "%s%s__matcher__publicKey"
157157
158158
159159 func pc (iAmtAs,iPrAs) = (((("%d%d%s__" + iAmtAs) + "__") + iPrAs) + "__config")
160160
161161
162162 func mba (bAStr) = ("%s%s%s__mappings__baseAsset2internalId__" + bAStr)
163163
164164
165165 func aps () = "%s__shutdown"
166166
167167
168168 func keyAllowedLpStableScriptHash () = "%s__allowedLpStableScriptHash"
169169
170170
171171 func keyFeeCollectorAddress () = "%s__feeCollectorAddress"
172172
173173
174174 func keySkipOrderValidation (poolAddress) = ("%s%s__skipOrderValidation__" + poolAddress)
175175
176176
177177 func throwOrderError (orderValid,orderValidInfo,senderValid,matcherValid) = throw((((((((("order validation failed: orderValid=" + toString(orderValid)) + " (") + orderValidInfo) + ")") + " senderValid=") + toString(senderValid)) + " matcherValid=") + toString(matcherValid)))
178178
179179
180180 func strf (addr,key) = valueOrErrorMessage(getString(addr, key), makeString(["mandatory ", toString(addr), ".", key, " not defined"], ""))
181181
182182
183183 func intf (addr,key) = valueOrErrorMessage(getInteger(addr, key), makeString(["mandatory ", toString(addr), ".", key, " not defined"], ""))
184184
185185
186186 func throwErr (msg) = throw(makeString(["lp_stable.ride:", msg], " "))
187187
188188
189189 func fmtErr (msg) = makeString(["lp_stable.ride:", msg], " ")
190190
191191
192192 let fca = addressFromStringValue(strf(this, fc()))
193193
194194 let inFee = {
195195 let @ = invoke(fca, "getInFeeREADONLY", [toString(this)], nil)
196196 if ($isInstanceOf(@, "Int"))
197197 then @
198198 else throw(($getType(@) + " couldn't be cast to Int"))
199199 }
200200
201201 let outFee = {
202202 let @ = invoke(fca, "getOutFeeREADONLY", [toString(this)], nil)
203203 if ($isInstanceOf(@, "Int"))
204204 then @
205205 else throw(($getType(@) + " couldn't be cast to Int"))
206206 }
207207
208208 let A = strf(this, amp())
209209
210210 func igs () = valueOrElse(getBoolean(fca, aps()), false)
211211
212212
213213 func mp () = fromBase58String(strf(fca, mtpk()))
214214
215215
216216 let feeCollectorAddress = addressFromStringValue(strf(fca, keyFeeCollectorAddress()))
217217
218218 func gpc () = {
219219 let amtAs = strf(this, aa())
220220 let priceAs = strf(this, pa())
221221 let iPriceAs = intf(fca, mba(priceAs))
222222 let iAmtAs = intf(fca, mba(amtAs))
223223 split(strf(fca, pc(toString(iAmtAs), toString(iPriceAs))), SEP)
224224 }
225225
226226
227227 func parseAssetId (input) = if ((input == wavesString))
228228 then unit
229229 else fromBase58String(input)
230230
231231
232232 func assetIdToString (input) = if ((input == unit))
233233 then wavesString
234234 else toBase58String(value(input))
235235
236236
237-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]))
237+func parsePoolConfig (poolConfig) = $Tuple7(addressFromStringValue(poolConfig[idxPoolAddress]), parseIntValue(poolConfig[idxPoolSt]), fromBase58String(poolConfig[idxLPAsId]), parseAssetId(poolConfig[idxAmAsId]), parseAssetId(poolConfig[idxPrAsId]), parseIntValue(poolConfig[idxAmtAsDcm]), parseIntValue(poolConfig[idxPriceAsDcm]))
238238
239239
240240 let poolConfigParsed = parsePoolConfig(gpc())
241241
242-let $t081858414 = poolConfigParsed
242+let $t080878273 = poolConfigParsed
243243
244-let cfgPoolAddress = $t081858414._1
244+let cfgPoolAddress = $t080878273._1
245245
246-let cfgPoolStatus = $t081858414._2
246+let cfgPoolStatus = $t080878273._2
247247
248-let cfgLpAssetId = $t081858414._3
248+let cfgLpAssetId = $t080878273._3
249249
250-let cfgAmountAssetId = $t081858414._4
250+let cfgAmountAssetId = $t080878273._4
251251
252-let cfgPriceAssetId = $t081858414._5
252+let cfgPriceAssetId = $t080878273._5
253253
254-let cfgAmountAssetDecimals = $t081858414._6
254+let cfgAmountAssetDecimals = $t080878273._6
255255
256-let cfgPriceAssetDecimals = $t081858414._7
257-
258-let cfgInAmountAssedId = $t081858414._8
259-
260-let cfgInPriceAssetId = $t081858414._9
256+let cfgPriceAssetDecimals = $t080878273._7
261257
262258 func gfc () = split(strf(fca, fcfg()), SEP)
263259
264260
265261 let factoryConfig = gfc()
266262
267263 let stakingContract = valueOrErrorMessage(addressFromString(factoryConfig[idxFactStakCntr]), "Invalid staking contract address")
268264
269265 let slipageContract = valueOrErrorMessage(addressFromString(factoryConfig[idxFactSlippCntr]), "Invalid slipage contract address")
270266
271267 let gwxContract = valueOrErrorMessage(addressFromString(factoryConfig[idxFactGwxRewCntr]), "Invalid gwx contract address")
272268
273269 let restContract = valueOrErrorMessage(addressFromString(factoryConfig[idxFactoryRestCntr]), "Invalid gwx contract address")
274270
275271 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)
276272
277273
278274 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)
279275
280276
281277 func getAccBalance (assetId) = if ((assetId == "WAVES"))
282278 then wavesBalance(this).available
283279 else assetBalance(this, fromBase58String(assetId))
284280
285281
286282 func cpbi (prAmtX18,amAmtX18) = fraction(prAmtX18, scale18, amAmtX18)
287283
288284
289285 func cpbir (prAmtX18,amAmtX18,round) = fraction(prAmtX18, scale18, amAmtX18, round)
290286
291287
292288 func vad (A1,A2,slippage) = {
293289 let diff = fraction((A1 - A2), scale8BigInt, A2)
294290 let pass = ((slippage - abs(diff)) > zeroBigInt)
295291 if (!(pass))
296292 then throw(("Big slpg: " + toString(diff)))
297293 else $Tuple2(pass, min([A1, A2]))
298294 }
299295
300296
301297 func vd (D1,D0,slpg) = {
302298 let diff = fraction(D0, scale8BigInt, D1)
303299 let fail = (slpg > diff)
304300 if (if (fail)
305301 then true
306302 else (D0 > D1))
307303 then throw(((((((toString(D0) + " ") + toString(D1)) + " ") + toString(diff)) + " ") + toString(slpg)))
308304 else fail
309305 }
310306
311307
312308 func pcp (amAssetDcm,prAssetDcm,amAmt,prAmt) = {
313309 let amtAsAmtX18 = t1(amAmt, amAssetDcm)
314310 let prAsAmtX18 = t1(prAmt, prAssetDcm)
315311 cpbi(prAsAmtX18, amtAsAmtX18)
316312 }
317313
318314
319315 func calcPrices (amAmt,prAmt,lpAmt) = {
320316 let amtAsDcm = cfgAmountAssetDecimals
321317 let prAsDcm = cfgPriceAssetDecimals
322318 let priceX18 = pcp(amtAsDcm, prAsDcm, amAmt, prAmt)
323319 let amAmtX18 = t1(amAmt, amtAsDcm)
324320 let prAmtX18 = t1(prAmt, prAsDcm)
325321 let lpAmtX18 = t1(lpAmt, scale8)
326322 let lpPrInAmAsX18 = cpbi(amAmtX18, lpAmtX18)
327323 let lpPrInPrAsX18 = cpbi(prAmtX18, lpAmtX18)
328324 [priceX18, lpPrInAmAsX18, lpPrInPrAsX18]
329325 }
330326
331327
332328 func calculatePrices (amAmt,prAmt,lpAmt) = {
333329 let p = calcPrices(amAmt, prAmt, lpAmt)
334330 [f1(p[0], scale8), f1(p[1], scale8), f1(p[2], scale8)]
335331 }
336332
337333
338334 func takeFee (amount,fee) = {
339335 let feeAmount = if ((fee == 0))
340336 then 0
341337 else fraction(amount, fee, scale8)
342338 $Tuple2((amount - feeAmount), feeAmount)
343339 }
344340
345341
346342 func getD (xp) = {
347343 let xp0 = xp[0]
348344 let xp1 = xp[1]
349345 let s = (xp0 + xp1)
350346 if ((s == big0))
351347 then big0
352348 else {
353349 let a = parseIntValue(A)
354350 let ann = (a * 2)
355351 let p = fraction(xp0, xp1, big1)
356352 let xp0_xp1_n_n = fraction(p, big4, big1)
357353 let ann_s = fraction(toBigInt(ann), s, big1)
358354 let ann_1 = toBigInt((ann - 1))
359355 func calcDNext (d) = {
360356 let dd = fraction(d, d, big1)
361357 let ddd = fraction(dd, d, big1)
362358 let dp = fraction(ddd, big1, xp0_xp1_n_n)
363359 fraction((ann_s + fraction(dp, big2, big1)), d, (fraction(ann_1, d, big1) + fraction(big3, dp, big1)))
364360 }
365361
366362 func calc (acc,i) = if (acc._2)
367363 then acc
368364 else {
369365 let d = acc._1
370366 let dNext = calcDNext(d)
371367 let dDiffRaw = (dNext - value(d))
372368 let dDiff = if ((big0 > dDiffRaw))
373369 then -(dDiffRaw)
374370 else dDiffRaw
375371 if ((big1 >= dDiff))
376372 then $Tuple2(dNext, true)
377373 else $Tuple2(dNext, false)
378374 }
379375
380376 let arr = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16]
381- let $t01291912967 = {
377+ let $t01277812826 = {
382378 let $l = arr
383379 let $s = size($l)
384380 let $acc0 = $Tuple2(s, false)
385381 func $f0_1 ($a,$i) = if (($i >= $s))
386382 then $a
387383 else calc($a, $l[$i])
388384
389385 func $f0_2 ($a,$i) = if (($i >= $s))
390386 then $a
391387 else throw("List size exceeds 17")
392388
393389 $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)
394390 }
395- let d = $t01291912967._1
396- let found = $t01291912967._2
391+ let d = $t01277812826._1
392+ let found = $t01277812826._2
397393 if (found)
398394 then d
399395 else throw(("D calculation error, D = " + toString(d)))
400396 }
401397 }
402398
403399
404400 func ego (txId58,pmtAssetId,pmtLpAmt,userAddress) = {
405401 let lpId = cfgLpAssetId
406402 let amId = toBase58String(value(cfgAmountAssetId))
407403 let prId = toBase58String(value(cfgPriceAssetId))
408404 let amDcm = cfgAmountAssetDecimals
409405 let prDcm = cfgPriceAssetDecimals
410406 let sts = toString(cfgPoolStatus)
411407 let lpEmiss = valueOrErrorMessage(assetInfo(lpId), "Wrong LP id").quantity
412408 if ((toBase58String(lpId) != pmtAssetId))
413409 then throw("Wrong pmt asset")
414410 else {
415411 let amBalance = getAccBalance(amId)
416412 let amBalanceX18 = t1(amBalance, amDcm)
417413 let prBalance = getAccBalance(prId)
418414 let prBalanceX18 = t1(prBalance, prDcm)
419415 let curPriceX18 = cpbi(prBalanceX18, amBalanceX18)
420416 let curPrice = f1(curPriceX18, scale8)
421417 let pmtLpAmtX18 = t1(pmtLpAmt, scale8)
422418 let lpEmissX18 = t1(lpEmiss, scale8)
423419 let outAmAmtX18 = fraction(amBalanceX18, pmtLpAmtX18, lpEmissX18)
424420 let outPrAmtX18 = fraction(prBalanceX18, pmtLpAmtX18, lpEmissX18)
425421 let outAmAmt = fromX18Round(outAmAmtX18, amDcm, FLOOR)
426422 let outPrAmt = fromX18Round(outPrAmtX18, prDcm, FLOOR)
427423 let state = if ((txId58 == ""))
428424 then nil
429425 else [ScriptTransfer(userAddress, outAmAmt, if ((amId == "WAVES"))
430426 then unit
431427 else fromBase58String(amId)), ScriptTransfer(userAddress, outPrAmt, if ((prId == "WAVES"))
432428 then unit
433429 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)]
434430 $Tuple10(outAmAmt, outPrAmt, amId, prId, amBalance, prBalance, lpEmiss, curPriceX18, sts, state)
435431 }
436432 }
437433
438434
439435 func epo (txId58,slippage,inAmAmt,inAmId,inPrAmt,inPrId,userAddress,isEval,emitLp,isOneAsset,validateSlippage,pmtAmt,pmtId) = {
440436 let lpId = cfgLpAssetId
441437 let amIdStr = toBase58String(value(cfgAmountAssetId))
442438 let prIdStr = toBase58String(value(cfgPriceAssetId))
443- let inAmIdStr = cfgInAmountAssedId
444- let inPrIdStr = cfgInPriceAssetId
445439 let amtDcm = cfgAmountAssetDecimals
446440 let priceDcm = cfgPriceAssetDecimals
447441 let sts = toString(cfgPoolStatus)
448442 let lpEm = valueOrErrorMessage(assetInfo(lpId), "Wr lp as").quantity
449443 let amBalance = if (isEval)
450444 then getAccBalance(amIdStr)
451445 else if (if (isOneAsset)
452446 then (pmtId == amIdStr)
453447 else false)
454448 then (getAccBalance(amIdStr) - pmtAmt)
455449 else if (isOneAsset)
456450 then getAccBalance(amIdStr)
457451 else (getAccBalance(amIdStr) - inAmAmt)
458452 let prBalance = if (isEval)
459453 then getAccBalance(prIdStr)
460454 else if (if (isOneAsset)
461455 then (pmtId == prIdStr)
462456 else false)
463457 then (getAccBalance(prIdStr) - pmtAmt)
464458 else if (isOneAsset)
465459 then getAccBalance(prIdStr)
466460 else (getAccBalance(prIdStr) - inPrAmt)
467461 let inAmAssetAmtX18 = t1(inAmAmt, amtDcm)
468462 let inPrAssetAmtX18 = t1(inPrAmt, priceDcm)
469463 let userPriceX18 = cpbi(inPrAssetAmtX18, inAmAssetAmtX18)
470464 let amBalanceX18 = t1(amBalance, amtDcm)
471465 let prBalanceX18 = t1(prBalance, priceDcm)
472466 let D0 = getD([amBalanceX18, prBalanceX18])
473467 let r = if ((lpEm == 0))
474468 then {
475469 let D1 = getD([(amBalanceX18 + inAmAssetAmtX18), (prBalanceX18 + inPrAssetAmtX18)])
476470 let checkD = if ((D1 > D0))
477471 then true
478472 else throw("D1 should be greater than D0")
479473 if ((checkD == checkD))
480474 then {
481475 let curPriceX18 = zeroBigInt
482476 let slippageX18 = zeroBigInt
483477 let lpAmtX18 = D1
484478 $Tuple5(f1(lpAmtX18, scale8), f1(inAmAssetAmtX18, amtDcm), f1(inPrAssetAmtX18, priceDcm), cpbi((prBalanceX18 + inPrAssetAmtX18), (amBalanceX18 + inAmAssetAmtX18)), slippageX18)
485479 }
486480 else throw("Strict value is not equal to itself.")
487481 }
488482 else {
489483 let curPriceX18 = cpbi(prBalanceX18, amBalanceX18)
490484 let slippageRealX18 = fraction(abs((curPriceX18 - userPriceX18)), scale18, curPriceX18)
491485 let slippageX18 = t1(slippage, scale8)
492486 if (if (if (validateSlippage)
493487 then (curPriceX18 != zeroBigInt)
494488 else false)
495489 then (slippageRealX18 > slippageX18)
496490 else false)
497491 then throw(((("Price slippage " + toString(slippageRealX18)) + " > ") + toString(slippageX18)))
498492 else {
499493 let lpEmissionX18 = t1(lpEm, scale8)
500494 let prViaAmX18 = fraction(inAmAssetAmtX18, cpbir(prBalanceX18, amBalanceX18, CEILING), scale18, CEILING)
501495 let amViaPrX18 = fraction(inPrAssetAmtX18, scale18, cpbir(prBalanceX18, amBalanceX18, FLOOR), CEILING)
502496 let expectedAmts = if ((prViaAmX18 > inPrAssetAmtX18))
503497 then $Tuple2(amViaPrX18, inPrAssetAmtX18)
504498 else $Tuple2(inAmAssetAmtX18, prViaAmX18)
505499 let expAmtAssetAmtX18 = expectedAmts._1
506500 let expPriceAssetAmtX18 = expectedAmts._2
507501 let D1 = getD([(amBalanceX18 + expAmtAssetAmtX18), (prBalanceX18 + expPriceAssetAmtX18)])
508502 let checkD = if ((D1 > D0))
509503 then true
510504 else throw("D1 should be greater than D0")
511505 if ((checkD == checkD))
512506 then {
513507 let lpAmtX18 = fraction(lpEmissionX18, (D1 - D0), D0)
514508 $Tuple5(fromX18Round(lpAmtX18, scale8, FLOOR), fromX18Round(expAmtAssetAmtX18, amtDcm, CEILING), fromX18Round(expPriceAssetAmtX18, priceDcm, CEILING), curPriceX18, slippageX18)
515509 }
516510 else throw("Strict value is not equal to itself.")
517511 }
518512 }
519513 let calcLpAmt = r._1
520514 let calcAmAssetPmt = r._2
521515 let calcPrAssetPmt = r._3
522516 let curPrice = f1(r._4, scale8)
523517 let slippageCalc = f1(r._5, scale8)
524518 if ((0 >= calcLpAmt))
525519 then throw("LP <= 0")
526520 else {
527521 let emitLpAmt = if (!(emitLp))
528522 then 0
529523 else calcLpAmt
530524 let amDiff = (inAmAmt - calcAmAssetPmt)
531525 let prDiff = (inPrAmt - calcPrAssetPmt)
532- let $t02080621151 = if (if (isOneAsset)
526+ let $t02058820933 = if (if (isOneAsset)
533527 then (pmtId == amIdStr)
534528 else false)
535529 then $Tuple2(pmtAmt, 0)
536530 else if (if (isOneAsset)
537531 then (pmtId == prIdStr)
538532 else false)
539533 then $Tuple2(0, pmtAmt)
540534 else $Tuple2(calcAmAssetPmt, calcPrAssetPmt)
541- let writeAmAmt = $t02080621151._1
542- let writePrAmt = $t02080621151._2
535+ let writeAmAmt = $t02058820933._1
536+ let writePrAmt = $t02058820933._2
543537 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))]
544538 $Tuple13(calcLpAmt, emitLpAmt, curPrice, amBalance, prBalance, lpEm, lpId, sts, commonState, amDiff, prDiff, inAmId, inPrId)
545539 }
546540 }
547541
548542
549543 func getYD (xp,i,D) = {
550544 let n = big2
551545 let x = xp[if ((i == 0))
552546 then 1
553547 else 0]
554548 let aPrecision = parseBigIntValue(Amult)
555549 let a = (parseBigIntValue(A) * aPrecision)
556550 let s = x
557551 let ann = (a * n)
558552 let c = (((((D * D) / (x * n)) * D) * aPrecision) / (ann * n))
559553 let b = ((s + ((D * aPrecision) / ann)) - D)
560554 func calc (acc,cur) = {
561- let $t02234622366 = acc
562- let y = $t02234622366._1
563- let found = $t02234622366._2
555+ let $t02212822148 = acc
556+ let y = $t02212822148._1
557+ let found = $t02212822148._2
564558 if ((found != unit))
565559 then acc
566560 else {
567561 let yNext = (((y * y) + c) / ((big2 * y) + b))
568562 let yDiff = absBigInt((yNext - value(y)))
569563 if ((big1 >= yDiff))
570564 then $Tuple2(yNext, cur)
571565 else $Tuple2(yNext, unit)
572566 }
573567 }
574568
575569 let arr = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
576- let $t02267322720 = {
570+ let $t02245522502 = {
577571 let $l = arr
578572 let $s = size($l)
579573 let $acc0 = $Tuple2(D, unit)
580574 func $f0_1 ($a,$i) = if (($i >= $s))
581575 then $a
582576 else calc($a, $l[$i])
583577
584578 func $f0_2 ($a,$i) = if (($i >= $s))
585579 then $a
586580 else throw("List size exceeds 15")
587581
588582 $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)
589583 }
590- let y = $t02267322720._1
591- let found = $t02267322720._2
584+ let y = $t02245522502._1
585+ let found = $t02245522502._2
592586 if ((found != unit))
593587 then y
594588 else throw(("Y calculation error, Y = " + toString(y)))
595589 }
596590
597591
598592 func calcDLp (amountBalance,priceBalance,lpEmission) = {
599593 let updatedDLp = fraction(getD([t1BigInt(amountBalance, toBigInt(cfgAmountAssetDecimals)), t1BigInt(priceBalance, toBigInt(cfgPriceAssetDecimals))]), scale18, lpEmission)
600594 if ((lpEmission == big0))
601595 then big0
602596 else updatedDLp
603597 }
604598
605599
606600 func calcCurrentDLp (amountAssetDelta,priceAssetDelta,lpAssetEmissionDelta) = {
607601 let amountAssetBalance = (toBigInt(getAccBalance(assetIdToString(cfgAmountAssetId))) - amountAssetDelta)
608602 let priceAssetBalance = (toBigInt(getAccBalance(assetIdToString(cfgPriceAssetId))) - priceAssetDelta)
609603 let lpAssetEmission = (toBigInt(value(assetInfo(cfgLpAssetId)).quantity) - lpAssetEmissionDelta)
610604 let currentDLp = calcDLp(amountAssetBalance, priceAssetBalance, lpAssetEmission)
611605 currentDLp
612606 }
613607
614608
615609 func refreshDLpInternal (amountAssetBalanceDelta,priceAssetBalanceDelta,lpAssetEmissionDelta) = {
616610 let amountAssetBalance = (getAccBalance(assetIdToString(cfgAmountAssetId)) + amountAssetBalanceDelta)
617611 let priceAssetBalance = (getAccBalance(assetIdToString(cfgPriceAssetId)) + priceAssetBalanceDelta)
618612 let lpAssetEmission = (value(assetInfo(cfgLpAssetId)).quantity + lpAssetEmissionDelta)
619613 let updatedDLp = calcDLp(toBigInt(amountAssetBalance), toBigInt(priceAssetBalance), toBigInt(lpAssetEmission))
620614 let actions = [IntegerEntry(keyDLpRefreshedHeight, height), StringEntry(keyDLp, toString(updatedDLp))]
621615 $Tuple2(actions, updatedDLp)
622616 }
623617
624618
625619 func validateUpdatedDLp (oldDLp,updatedDLp) = if ((updatedDLp >= oldDLp))
626620 then true
627621 else throwErr("updated DLp lower than current DLp")
628622
629623
630624 func validateMatcherOrderAllowed (order) = {
631625 let amountAssetBalance = getAccBalance(assetIdToString(cfgAmountAssetId))
632626 let priceAssetBalance = getAccBalance(assetIdToString(cfgPriceAssetId))
633627 let amountAssetAmount = order.amount
634628 let priceAssetAmount = fraction(order.amount, order.price, scale8, FLOOR)
635- let $t02491825130 = if ((order.orderType == Buy))
629+ let $t02470024912 = if ((order.orderType == Buy))
636630 then $Tuple2(amountAssetAmount, -(priceAssetAmount))
637631 else $Tuple2(-(amountAssetAmount), priceAssetAmount)
638- let amountAssetBalanceDelta = $t02491825130._1
639- let priceAssetBalanceDelta = $t02491825130._2
632+ let amountAssetBalanceDelta = $t02470024912._1
633+ let priceAssetBalanceDelta = $t02470024912._2
640634 if (if (if (igs())
641635 then true
642636 else (cfgPoolStatus == PoolMatcherDis))
643637 then true
644638 else (cfgPoolStatus == PoolShutdown))
645639 then throw("Admin blocked")
646640 else if (if ((order.assetPair.amountAsset != cfgAmountAssetId))
647641 then true
648642 else (order.assetPair.priceAsset != cfgPriceAssetId))
649643 then throw("Wr assets")
650644 else {
651645 let dLp = parseBigIntValue(valueOrElse(getString(this, keyDLp), "0"))
652- let $t02547225572 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
653- let unusedActions = $t02547225572._1
654- let dLpNew = $t02547225572._2
646+ let $t02525425354 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
647+ let unusedActions = $t02525425354._1
648+ let dLpNew = $t02525425354._2
655649 let isOrderValid = (dLpNew >= dLp)
656650 let info = makeString(["dLp=", toString(dLp), " dLpNew=", toString(dLpNew), " amountAssetBalance=", toString(amountAssetBalance), " priceAssetBalance=", toString(priceAssetBalance), " amountAssetBalanceDelta=", toString(amountAssetBalanceDelta), " priceAssetBalanceDelta=", toString(priceAssetBalanceDelta), " height=", toString(height)], "")
657651 $Tuple2(isOrderValid, info)
658652 }
659653 }
660654
661655
662656 func cg (i) = if ((size(i.payments) != 1))
663657 then throw("1 pmnt exp")
664658 else {
665659 let pmt = value(i.payments[0])
666660 let pmtAssetId = value(pmt.assetId)
667661 let pmtAmt = pmt.amount
668662 let r = ego(toBase58String(i.transactionId), toBase58String(pmtAssetId), pmtAmt, i.caller)
669663 let outAmAmt = r._1
670664 let outPrAmt = r._2
671665 let sts = parseIntValue(r._9)
672666 let state = r._10
673667 if (if (igs())
674668 then true
675669 else (sts == PoolShutdown))
676670 then throw(("Admin blocked: " + toString(sts)))
677671 else $Tuple5(outAmAmt, outPrAmt, pmtAmt, pmtAssetId, state)
678672 }
679673
680674
681675 func cp (caller,txId,amAsPmt,prAsPmt,slippage,emitLp,isOneAsset,validateSlippage,pmtAmt,pmtId) = {
682676 let r = epo(txId, slippage, value(amAsPmt).amount, value(amAsPmt).assetId, value(prAsPmt).amount, value(prAsPmt).assetId, caller, (txId == ""), emitLp, isOneAsset, validateSlippage, pmtAmt, pmtId)
683677 let sts = parseIntValue(r._8)
684678 if (if (if (igs())
685679 then true
686680 else (sts == PoolPutDis))
687681 then true
688682 else (sts == PoolShutdown))
689683 then throw(("Blocked:" + toString(sts)))
690684 else r
691685 }
692686
693687
694688 func calcPutOneTkn (pmtAmtRaw,pmtAssetId,userAddress,txId,withTakeFee) = {
695689 let amId = toBase58String(value(cfgAmountAssetId))
696690 let prId = toBase58String(value(cfgPriceAssetId))
697691 let lpId = cfgLpAssetId
698692 let amtDcm = cfgAmountAssetDecimals
699693 let priceDcm = cfgPriceAssetDecimals
700694 let lpAssetEmission = toBigInt(valueOrErrorMessage(assetInfo(lpId), "invalid lp asset").quantity)
701695 let chechEmission = if ((lpAssetEmission > big0))
702696 then true
703697 else throw("initial deposit requires all coins")
704698 if ((chechEmission == chechEmission))
705699 then {
706700 let amBalance = getAccBalance(amId)
707701 let prBalance = getAccBalance(prId)
708- let $t02822828690 = if ((txId == ""))
702+ let $t02801028472 = if ((txId == ""))
709703 then $Tuple2(amBalance, prBalance)
710704 else if ((pmtAssetId == amId))
711705 then if ((pmtAmtRaw > amBalance))
712706 then throw("invalid payment amount")
713707 else $Tuple2((amBalance - pmtAmtRaw), prBalance)
714708 else if ((pmtAssetId == prId))
715709 then if ((pmtAmtRaw > prBalance))
716710 then throw("invalid payment amount")
717711 else $Tuple2(amBalance, (prBalance - pmtAmtRaw))
718712 else throw("wrong pmtAssetId")
719- let amBalanceOld = $t02822828690._1
720- let prBalanceOld = $t02822828690._2
721- let $t02869628872 = if ((pmtAssetId == amId))
713+ let amBalanceOld = $t02801028472._1
714+ let prBalanceOld = $t02801028472._2
715+ let $t02847828654 = if ((pmtAssetId == amId))
722716 then $Tuple2(pmtAmtRaw, 0)
723717 else if ((pmtAssetId == prId))
724718 then $Tuple2(0, pmtAmtRaw)
725719 else throw("invalid payment")
726- let amAmountRaw = $t02869628872._1
727- let prAmountRaw = $t02869628872._2
728- let $t02887629130 = if (withTakeFee)
720+ let amAmountRaw = $t02847828654._1
721+ let prAmountRaw = $t02847828654._2
722+ let $t02865828912 = if (withTakeFee)
729723 then $Tuple3(takeFee(amAmountRaw, inFee)._1, takeFee(prAmountRaw, inFee)._1, takeFee(pmtAmtRaw, inFee)._2)
730724 else $Tuple3(amAmountRaw, prAmountRaw, 0)
731- let amAmount = $t02887629130._1
732- let prAmount = $t02887629130._2
733- let feeAmount = $t02887629130._3
725+ let amAmount = $t02865828912._1
726+ let prAmount = $t02865828912._2
727+ let feeAmount = $t02865828912._3
734728 let amBalanceNew = (amBalanceOld + amAmount)
735729 let prBalanceNew = (prBalanceOld + prAmount)
736730 let D0 = getD([t1(amBalanceOld, cfgAmountAssetDecimals), t1(prBalanceOld, cfgPriceAssetDecimals)])
737731 let D1 = getD([t1(amBalanceNew, cfgAmountAssetDecimals), t1(prBalanceNew, cfgPriceAssetDecimals)])
738732 let checkD = if ((D1 > D0))
739733 then true
740734 else throw()
741735 if ((checkD == checkD))
742736 then {
743737 let lpAmount = fraction(lpAssetEmission, (D1 - D0), D0, FLOOR)
744738 let curPrice = f1(cpbi(t1(prBalanceNew, priceDcm), t1(amBalanceNew, amtDcm)), scale8)
745739 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))]
746740 let poolProportion = fraction(prBalanceOld, scale8, amBalanceOld)
747741 let amountAssetPart = fraction(pmtAmtRaw, scale8, (poolProportion + scale8))
748742 let priceAssetPart = (pmtAmtRaw - amountAssetPart)
749743 let lpAmtBoth = fraction(lpAssetEmission, toBigInt(priceAssetPart), toBigInt(prBalanceOld))
750744 let bonus = toInt(fraction((lpAmount - lpAmtBoth), scale8BigInt, lpAmtBoth))
751745 $Tuple4(toInt(lpAmount), commonState, feeAmount, bonus)
752746 }
753747 else throw("Strict value is not equal to itself.")
754748 }
755749 else throw("Strict value is not equal to itself.")
756750 }
757751
758752
759753 func getOneTknV2Internal (outAssetId,minOutAmount,payments,caller,originCaller,transactionId) = {
760754 let lpId = toBase58String(value(cfgLpAssetId))
761755 let amId = toBase58String(value(cfgAmountAssetId))
762756 let prId = toBase58String(value(cfgPriceAssetId))
763757 let amDecimals = cfgAmountAssetDecimals
764758 let prDecimals = cfgPriceAssetDecimals
765759 let poolStatus = cfgPoolStatus
766760 let userAddress = if ((caller == restContract))
767761 then originCaller
768762 else caller
769763 let pmt = value(payments[0])
770764 let pmtAssetId = value(pmt.assetId)
771765 let pmtAmt = pmt.amount
772766 let currentDLp = calcCurrentDLp(big0, big0, big0)
773767 if ((currentDLp == currentDLp))
774768 then {
775769 let txId58 = toBase58String(transactionId)
776770 if ((lpId != toBase58String(pmtAssetId)))
777771 then throw("Wrong LP")
778772 else {
779773 let amBalance = getAccBalance(amId)
780774 let prBalance = getAccBalance(prId)
781- let $t03124231353 = {
775+ let $t03102431135 = {
782776 let @ = invoke(this, "getOneTknV2READONLY", [outAssetId, pmtAmt], nil)
783777 if ($isInstanceOf(@, "(Int, Int)"))
784778 then @
785779 else throw(($getType(@) + " couldn't be cast to (Int, Int)"))
786780 }
787- if (($t03124231353 == $t03124231353))
781+ if (($t03102431135 == $t03102431135))
788782 then {
789- let feeAmount = $t03124231353._2
790- let totalGet = $t03124231353._1
783+ let feeAmount = $t03102431135._2
784+ let totalGet = $t03102431135._1
791785 let totalAmount = if (if ((minOutAmount > 0))
792786 then (minOutAmount > totalGet)
793787 else false)
794788 then throwErr(makeString(["amount to receive is less than ", toString(minOutAmount)], ""))
795789 else totalGet
796- let $t03154331850 = if ((outAssetId == amId))
790+ let $t03132531632 = if ((outAssetId == amId))
797791 then $Tuple4(totalAmount, 0, ((amBalance - totalAmount) - feeAmount), prBalance)
798792 else if ((outAssetId == prId))
799793 then $Tuple4(0, totalAmount, amBalance, ((prBalance - totalAmount) - feeAmount))
800794 else throw("invalid out asset id")
801- let outAm = $t03154331850._1
802- let outPr = $t03154331850._2
803- let amBalanceNew = $t03154331850._3
804- let prBalanceNew = $t03154331850._4
795+ let outAm = $t03132531632._1
796+ let outPr = $t03132531632._2
797+ let amBalanceNew = $t03132531632._3
798+ let prBalanceNew = $t03132531632._4
805799 let curPrX18 = cpbi(t1(prBalanceNew, prDecimals), t1(amBalanceNew, amDecimals))
806800 let curPr = f1(curPrX18, scale8)
807801 let outAssetIdOrWaves = if ((outAssetId == "WAVES"))
808802 then unit
809803 else fromBase58String(outAssetId)
810804 let sendFeeToMatcher = if ((feeAmount > 0))
811805 then [ScriptTransfer(feeCollectorAddress, feeAmount, outAssetIdOrWaves)]
812806 else nil
813807 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)
814808 if ((state == state))
815809 then {
816810 let burn = invoke(fca, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
817811 if ((burn == burn))
818812 then {
819- let $t03263532985 = {
813+ let $t03241732767 = {
820814 let feeAmountForCalc = if ((this == feeCollectorAddress))
821815 then 0
822816 else feeAmount
823817 let outInAmountAsset = if ((parseAssetId(outAssetId) == cfgAmountAssetId))
824818 then true
825819 else false
826820 if (outInAmountAsset)
827821 then $Tuple2(-((totalGet + feeAmountForCalc)), 0)
828822 else $Tuple2(0, -((totalGet + feeAmountForCalc)))
829823 }
830- let amountAssetBalanceDelta = $t03263532985._1
831- let priceAssetBalanceDelta = $t03263532985._2
832- let $t03298833096 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
833- let refreshDLpActions = $t03298833096._1
834- let updatedDLp = $t03298833096._2
824+ let amountAssetBalanceDelta = $t03241732767._1
825+ let priceAssetBalanceDelta = $t03241732767._2
826+ let $t03277032878 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
827+ let refreshDLpActions = $t03277032878._1
828+ let updatedDLp = $t03277032878._2
835829 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
836830 if ((isUpdatedDLpValid == isUpdatedDLpValid))
837831 then $Tuple2((state ++ refreshDLpActions), totalAmount)
838832 else throw("Strict value is not equal to itself.")
839833 }
840834 else throw("Strict value is not equal to itself.")
841835 }
842836 else throw("Strict value is not equal to itself.")
843837 }
844838 else throw("Strict value is not equal to itself.")
845839 }
846840 }
847841 else throw("Strict value is not equal to itself.")
848842 }
849843
850844
851845 func m () = match getString(mpk()) {
852846 case s: String =>
853847 fromBase58String(s)
854848 case _: Unit =>
855849 unit
856850 case _ =>
857851 throw("Match error")
858852 }
859853
860854
861855 func pm () = match getString(pmpk()) {
862856 case s: String =>
863857 fromBase58String(s)
864858 case _: Unit =>
865859 unit
866860 case _ =>
867861 throw("Match error")
868862 }
869863
870864
871865 let pd = throw("Permission denied")
872866
873867 func isManager (i) = match m() {
874868 case pk: ByteVector =>
875869 (i.callerPublicKey == pk)
876870 case _: Unit =>
877871 (i.caller == this)
878872 case _ =>
879873 throw("Match error")
880874 }
881875
882876
883877 func mm (i) = match m() {
884878 case pk: ByteVector =>
885879 if ((i.callerPublicKey == pk))
886880 then true
887881 else pd
888882 case _: Unit =>
889883 if ((i.caller == this))
890884 then true
891885 else pd
892886 case _ =>
893887 throw("Match error")
894888 }
895889
896890
897891 func getY (isReverse,D,poolAmountInBalance) = {
898892 let poolConfig = gpc()
899893 let amId = poolConfig[idxAmAsId]
900894 let prId = poolConfig[idxPrAsId]
901895 let n = big2
902896 let aPrecision = parseBigIntValue(Amult)
903897 let a = (parseBigIntValue(A) * aPrecision)
904898 let xp = if ((isReverse == false))
905899 then [(toBigInt(getAccBalance(amId)) + poolAmountInBalance), toBigInt(getAccBalance(prId))]
906900 else [(toBigInt(getAccBalance(prId)) + poolAmountInBalance), toBigInt(getAccBalance(amId))]
907901 let x = xp[0]
908902 let s = x
909903 let ann = (a * n)
910904 let c = (((((D * D) / (x * n)) * D) * aPrecision) / (ann * n))
911905 let b = ((s + ((D * aPrecision) / ann)) - D)
912906 func calc (acc,cur) = {
913- let $t03454334563 = acc
914- let y = $t03454334563._1
915- let found = $t03454334563._2
907+ let $t03432534345 = acc
908+ let y = $t03432534345._1
909+ let found = $t03432534345._2
916910 if ((found != unit))
917911 then acc
918912 else {
919913 let yNext = (((y * y) + c) / ((big2 * y) + b))
920914 let yDiff = absBigInt((yNext - value(y)))
921915 if ((big1 >= yDiff))
922916 then $Tuple2(yNext, cur)
923917 else $Tuple2(yNext, unit)
924918 }
925919 }
926920
927921 let arr = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
928- let $t03489434941 = {
922+ let $t03467634723 = {
929923 let $l = arr
930924 let $s = size($l)
931925 let $acc0 = $Tuple2(D, unit)
932926 func $f0_1 ($a,$i) = if (($i >= $s))
933927 then $a
934928 else calc($a, $l[$i])
935929
936930 func $f0_2 ($a,$i) = if (($i >= $s))
937931 then $a
938932 else throw("List size exceeds 15")
939933
940934 $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)
941935 }
942- let y = $t03489434941._1
943- let found = $t03489434941._2
936+ let y = $t03467634723._1
937+ let found = $t03467634723._2
944938 if ((found != unit))
945939 then y
946940 else throw(("Y calculation error, Y = " + toString(y)))
947941 }
948942
949943
950944 func skipOrderValidation () = valueOrElse(getBoolean(fca, keySkipOrderValidation(toString(this))), false)
951945
952946
953947 @Callable(i)
954948 func calculateAmountOutForSwapREADONLY (cleanAmountIn,isReverse,feePoolAmount) = {
955- let $t03529335717 = if ((isReverse == false))
949+ let $t03507535499 = if ((isReverse == false))
956950 then {
957951 let assetOut = strf(this, pa())
958952 let poolAmountInBalance = (toBigInt(getAccBalance(strf(this, aa()))) + toBigInt(cleanAmountIn))
959953 $Tuple2(assetOut, poolAmountInBalance)
960954 }
961955 else {
962956 let assetOut = strf(this, aa())
963957 let poolAmountInBalance = (toBigInt(getAccBalance(strf(this, pa()))) + toBigInt(cleanAmountIn))
964958 $Tuple2(assetOut, poolAmountInBalance)
965959 }
966- let assetOut = $t03529335717._1
967- let poolAmountInBalance = $t03529335717._2
960+ let assetOut = $t03507535499._1
961+ let poolAmountInBalance = $t03507535499._2
968962 let poolConfig = gpc()
969963 let amId = poolConfig[idxAmAsId]
970964 let prId = poolConfig[idxPrAsId]
971965 let xp = [toBigInt(getAccBalance(amId)), toBigInt(getAccBalance(prId))]
972966 let D = getD(xp)
973967 let y = getY(isReverse, D, toBigInt(cleanAmountIn))
974968 let dy = ((toBigInt(getAccBalance(assetOut)) - y) - toBigInt(1))
975969 let totalGetRaw = max([0, toInt(dy)])
976970 let newXp = if ((isReverse == false))
977971 then [((toBigInt(getAccBalance(amId)) + toBigInt(cleanAmountIn)) + toBigInt(feePoolAmount)), (toBigInt(getAccBalance(prId)) - dy)]
978972 else [(toBigInt(getAccBalance(amId)) - dy), ((toBigInt(getAccBalance(prId)) + toBigInt(cleanAmountIn)) + toBigInt(feePoolAmount))]
979973 let newD = getD(newXp)
980974 let checkD = if ((newD >= D))
981975 then true
982976 else throw(makeString(["new D is fewer error", toString(D), toString(newD)], "__"))
983977 if ((checkD == checkD))
984978 then $Tuple2(nil, totalGetRaw)
985979 else throw("Strict value is not equal to itself.")
986980 }
987981
988982
989983
990984 @Callable(i)
991985 func calculateAmountOutForSwapAndSendTokens (cleanAmountIn,isReverse,amountOutMin,addressTo,feePoolAmount) = {
992986 let swapContact = {
993987 let @ = invoke(fca, "getSwapContractREADONLY", nil, nil)
994988 if ($isInstanceOf(@, "String"))
995989 then @
996990 else throw(($getType(@) + " couldn't be cast to String"))
997991 }
998992 let checks = [if ((value(i.payments[0]).amount >= cleanAmountIn))
999993 then true
1000994 else throwErr("Wrong amount"), if ((i.caller == addressFromStringValue(swapContact)))
1001995 then true
1002996 else throwErr("Permission denied")]
1003997 if ((checks == checks))
1004998 then {
1005999 let pmt = value(i.payments[0])
10061000 let assetIn = assetIdToString(pmt.assetId)
1007- let $t03715337547 = if ((isReverse == false))
1001+ let $t03693537329 = if ((isReverse == false))
10081002 then {
10091003 let assetOut = strf(this, pa())
10101004 let poolAmountInBalance = (getAccBalance(assetIn) - value(i.payments[0]).amount)
10111005 $Tuple2(assetOut, poolAmountInBalance)
10121006 }
10131007 else {
10141008 let assetOut = strf(this, aa())
10151009 let poolAmountInBalance = (getAccBalance(assetIn) - value(i.payments[0]).amount)
10161010 $Tuple2(assetOut, poolAmountInBalance)
10171011 }
1018- let assetOut = $t03715337547._1
1019- let poolAmountInBalance = $t03715337547._2
1012+ let assetOut = $t03693537329._1
1013+ let poolAmountInBalance = $t03693537329._2
10201014 let poolConfig = gpc()
10211015 let amId = poolConfig[idxAmAsId]
10221016 let prId = poolConfig[idxPrAsId]
10231017 let xp = if ((isReverse == false))
10241018 then [(toBigInt(getAccBalance(amId)) - toBigInt(value(i.payments[0]).amount)), toBigInt(getAccBalance(prId))]
10251019 else [toBigInt(getAccBalance(amId)), (toBigInt(getAccBalance(prId)) - toBigInt(value(i.payments[0]).amount))]
10261020 let D = getD(xp)
10271021 let y = getY(isReverse, D, toBigInt(0))
10281022 let dy = ((toBigInt(getAccBalance(assetOut)) - y) - toBigInt(1))
10291023 let totalGetRaw = max([0, toInt(dy)])
10301024 let checkMin = if ((totalGetRaw >= amountOutMin))
10311025 then true
10321026 else throw("Exchange result is fewer coins than expected")
10331027 if ((checkMin == checkMin))
10341028 then {
10351029 let newXp = if ((isReverse == false))
10361030 then [(toBigInt(getAccBalance(amId)) + toBigInt(feePoolAmount)), (toBigInt(getAccBalance(prId)) - dy)]
10371031 else [(toBigInt(getAccBalance(amId)) - dy), (toBigInt(getAccBalance(prId)) + toBigInt(feePoolAmount))]
10381032 let newD = getD(newXp)
10391033 let checkD = if ((newD >= D))
10401034 then true
10411035 else throw("new D is fewer error")
10421036 if ((checkD == checkD))
10431037 then $Tuple2([ScriptTransfer(addressFromStringValue(addressTo), totalGetRaw, parseAssetId(assetOut))], totalGetRaw)
10441038 else throw("Strict value is not equal to itself.")
10451039 }
10461040 else throw("Strict value is not equal to itself.")
10471041 }
10481042 else throw("Strict value is not equal to itself.")
10491043 }
10501044
10511045
10521046
10531047 @Callable(i)
10541048 func constructor (fc) = {
10551049 let c = mm(i)
10561050 if ((c == c))
10571051 then [StringEntry(fc(), fc)]
10581052 else throw("Strict value is not equal to itself.")
10591053 }
10601054
10611055
10621056
10631057 @Callable(i)
10641058 func setManager (pendingManagerPublicKey) = {
10651059 let c = mm(i)
10661060 if ((c == c))
10671061 then {
10681062 let cm = fromBase58String(pendingManagerPublicKey)
10691063 if ((cm == cm))
10701064 then [StringEntry(pmpk(), pendingManagerPublicKey)]
10711065 else throw("Strict value is not equal to itself.")
10721066 }
10731067 else throw("Strict value is not equal to itself.")
10741068 }
10751069
10761070
10771071
10781072 @Callable(i)
10791073 func confirmManager () = {
10801074 let p = pm()
10811075 let hpm = if (isDefined(p))
10821076 then true
10831077 else throw("No pending manager")
10841078 if ((hpm == hpm))
10851079 then {
10861080 let cpm = if ((i.callerPublicKey == value(p)))
10871081 then true
10881082 else throw("You are not pending manager")
10891083 if ((cpm == cpm))
10901084 then [StringEntry(mpk(), toBase58String(value(p))), DeleteEntry(pmpk())]
10911085 else throw("Strict value is not equal to itself.")
10921086 }
10931087 else throw("Strict value is not equal to itself.")
10941088 }
10951089
10961090
10971091
10981092 @Callable(i)
10991093 func put (slip,autoStake) = {
11001094 let factCfg = gfc()
11011095 let stakingCntr = valueOrErrorMessage(addressFromString(factCfg[idxFactStakCntr]), "Wr st addr")
11021096 let slipCntr = valueOrErrorMessage(addressFromString(factCfg[idxFactSlippCntr]), "Wr sl addr")
11031097 if ((0 > slip))
11041098 then throw("Wrong slippage")
11051099 else if ((size(i.payments) != 2))
11061100 then throw("2 pmnts expd")
11071101 else {
11081102 let amAssetPmt = toBigInt(value(i.payments[0]).amount)
11091103 let prAssetPmt = toBigInt(value(i.payments[1]).amount)
11101104 let amountAssetBalance = (toBigInt(getAccBalance(assetIdToString(cfgAmountAssetId))) - amAssetPmt)
11111105 if ((amountAssetBalance == amountAssetBalance))
11121106 then {
11131107 let priceAssetBalance = (toBigInt(getAccBalance(assetIdToString(cfgPriceAssetId))) - prAssetPmt)
11141108 if ((priceAssetBalance == priceAssetBalance))
11151109 then {
11161110 let lpAssetEmission = toBigInt(value(assetInfo(cfgLpAssetId)).quantity)
11171111 if ((lpAssetEmission == lpAssetEmission))
11181112 then {
11191113 let currentDLp = calcCurrentDLp(amAssetPmt, prAssetPmt, toBigInt(0))
11201114 if ((currentDLp == currentDLp))
11211115 then {
11221116 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, "")
11231117 let emitLpAmt = e._2
11241118 let lpAssetId = e._7
11251119 let state = e._9
11261120 let amDiff = e._10
11271121 let prDiff = e._11
11281122 let amId = e._12
11291123 let prId = e._13
11301124 let r = invoke(fca, "emit", [emitLpAmt], nil)
11311125 if ((r == r))
11321126 then {
11331127 let el = match r {
11341128 case legacy: Address =>
11351129 invoke(legacy, "emit", [emitLpAmt], nil)
11361130 case _ =>
11371131 unit
11381132 }
11391133 if ((el == el))
11401134 then {
11411135 let sa = if ((amDiff > 0))
11421136 then invoke(slipCntr, "put", nil, [AttachedPayment(amId, amDiff)])
11431137 else nil
11441138 if ((sa == sa))
11451139 then {
11461140 let sp = if ((prDiff > 0))
11471141 then invoke(slipCntr, "put", nil, [AttachedPayment(prId, prDiff)])
11481142 else nil
11491143 if ((sp == sp))
11501144 then {
11511145 let lpTrnsfr = if (autoStake)
11521146 then {
11531147 let ss = invoke(stakingCntr, "stake", nil, [AttachedPayment(lpAssetId, emitLpAmt)])
11541148 if ((ss == ss))
11551149 then nil
11561150 else throw("Strict value is not equal to itself.")
11571151 }
11581152 else [ScriptTransfer(i.caller, emitLpAmt, lpAssetId)]
1159- let $t04216642308 = refreshDLpInternal(0, 0, 0)
1160- let refreshDLpActions = $t04216642308._1
1161- let updatedDLp = $t04216642308._2
1153+ let $t04194842090 = refreshDLpInternal(0, 0, 0)
1154+ let refreshDLpActions = $t04194842090._1
1155+ let updatedDLp = $t04194842090._2
11621156 let check = if ((updatedDLp >= currentDLp))
11631157 then true
11641158 else throwErr(makeString(["updated DLp lower than current DLp", toString(amountAssetBalance), toString(priceAssetBalance), toString(lpAssetEmission), toString(currentDLp), toString(updatedDLp), toString(amDiff), toString(prDiff)], " "))
11651159 if ((check == check))
11661160 then {
11671161 let lpAssetEmissionAfter = value(assetInfo(cfgLpAssetId)).quantity
11681162 if ((lpAssetEmissionAfter == lpAssetEmissionAfter))
11691163 then ((state ++ lpTrnsfr) ++ refreshDLpActions)
11701164 else throw("Strict value is not equal to itself.")
11711165 }
11721166 else throw("Strict value is not equal to itself.")
11731167 }
11741168 else throw("Strict value is not equal to itself.")
11751169 }
11761170 else throw("Strict value is not equal to itself.")
11771171 }
11781172 else throw("Strict value is not equal to itself.")
11791173 }
11801174 else throw("Strict value is not equal to itself.")
11811175 }
11821176 else throw("Strict value is not equal to itself.")
11831177 }
11841178 else throw("Strict value is not equal to itself.")
11851179 }
11861180 else throw("Strict value is not equal to itself.")
11871181 }
11881182 else throw("Strict value is not equal to itself.")
11891183 }
11901184 }
11911185
11921186
11931187
11941188 @Callable(i)
11951189 func putOneTknV2 (minOutAmount,autoStake) = {
11961190 let isPoolOneTokenOperationsDisabled = {
11971191 let @ = invoke(fca, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
11981192 if ($isInstanceOf(@, "Boolean"))
11991193 then @
12001194 else throw(($getType(@) + " couldn't be cast to Boolean"))
12011195 }
12021196 let isPutDisabled = if (if (if (igs())
12031197 then true
12041198 else (cfgPoolStatus == PoolPutDis))
12051199 then true
12061200 else (cfgPoolStatus == PoolShutdown))
12071201 then true
12081202 else isPoolOneTokenOperationsDisabled
12091203 let checks = [if (if (!(isPutDisabled))
12101204 then true
12111205 else isManager(i))
12121206 then true
12131207 else throwErr("put operation is blocked by admin"), if ((size(i.payments) == 1))
12141208 then true
12151209 else throwErr("exactly 1 payment are expected")]
12161210 if ((checks == checks))
12171211 then {
12181212 let amId = toBase58String(value(cfgAmountAssetId))
12191213 let prId = toBase58String(value(cfgPriceAssetId))
12201214 let lpId = cfgLpAssetId
12211215 let amDecimals = cfgAmountAssetDecimals
12221216 let prDecimals = cfgPriceAssetDecimals
12231217 let userAddress = if ((i.caller == this))
12241218 then i.originCaller
12251219 else i.caller
12261220 let pmt = value(i.payments[0])
12271221 let pmtAssetId = toBase58String(value(pmt.assetId))
12281222 let pmtAmt = pmt.amount
12291223 let currentDLp = if ((pmt.assetId == cfgAmountAssetId))
12301224 then calcCurrentDLp(toBigInt(pmtAmt), toBigInt(0), toBigInt(0))
12311225 else calcCurrentDLp(toBigInt(0), toBigInt(pmtAmt), toBigInt(0))
12321226 if ((currentDLp == currentDLp))
12331227 then {
1234- let $t04394944107 = calcPutOneTkn(pmtAmt, pmtAssetId, toString(userAddress), toBase58String(i.transactionId), true)
1235- if (($t04394944107 == $t04394944107))
1228+ let $t04373143889 = calcPutOneTkn(pmtAmt, pmtAssetId, toString(userAddress), toBase58String(i.transactionId), true)
1229+ if (($t04373143889 == $t04373143889))
12361230 then {
1237- let feeAmount = $t04394944107._3
1238- let state = $t04394944107._2
1239- let estimLP = $t04394944107._1
1231+ let feeAmount = $t04373143889._3
1232+ let state = $t04373143889._2
1233+ let estimLP = $t04373143889._1
12401234 let emitLpAmt = if (if ((minOutAmount > 0))
12411235 then (minOutAmount > estimLP)
12421236 else false)
12431237 then throwErr(makeString(["amount to receive is less than ", toString(minOutAmount)], ""))
12441238 else estimLP
12451239 let e = invoke(fca, "emit", [emitLpAmt], nil)
12461240 if ((e == e))
12471241 then {
12481242 let el = match e {
12491243 case legacy: Address =>
12501244 invoke(legacy, "emit", [emitLpAmt], nil)
12511245 case _ =>
12521246 unit
12531247 }
12541248 if ((el == el))
12551249 then {
12561250 let lpTrnsfr = if (autoStake)
12571251 then {
12581252 let ss = invoke(stakingContract, "stakeFor", [toString(i.caller)], [AttachedPayment(lpId, emitLpAmt)])
12591253 if ((ss == ss))
12601254 then nil
12611255 else throw("Strict value is not equal to itself.")
12621256 }
12631257 else [ScriptTransfer(i.caller, emitLpAmt, lpId)]
12641258 let sendFeeToMatcher = if ((feeAmount > 0))
12651259 then [ScriptTransfer(feeCollectorAddress, feeAmount, fromBase58String(pmtAssetId))]
12661260 else nil
1267- let $t04499245341 = if ((this == feeCollectorAddress))
1261+ let $t04477445123 = if ((this == feeCollectorAddress))
12681262 then $Tuple2(0, 0)
12691263 else {
12701264 let paymentInAmountAsset = if ((pmt.assetId == cfgAmountAssetId))
12711265 then true
12721266 else false
12731267 if (paymentInAmountAsset)
12741268 then $Tuple2(-(feeAmount), 0)
12751269 else $Tuple2(0, -(feeAmount))
12761270 }
1277- let amountAssetBalanceDelta = $t04499245341._1
1278- let priceAssetBalanceDelta = $t04499245341._2
1279- let $t04534445452 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
1280- let refreshDLpActions = $t04534445452._1
1281- let updatedDLp = $t04534445452._2
1271+ let amountAssetBalanceDelta = $t04477445123._1
1272+ let priceAssetBalanceDelta = $t04477445123._2
1273+ let $t04512645234 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
1274+ let refreshDLpActions = $t04512645234._1
1275+ let updatedDLp = $t04512645234._2
12821276 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
12831277 if ((isUpdatedDLpValid == isUpdatedDLpValid))
12841278 then $Tuple2((((state ++ lpTrnsfr) ++ sendFeeToMatcher) ++ refreshDLpActions), emitLpAmt)
12851279 else throw("Strict value is not equal to itself.")
12861280 }
12871281 else throw("Strict value is not equal to itself.")
12881282 }
12891283 else throw("Strict value is not equal to itself.")
12901284 }
12911285 else throw("Strict value is not equal to itself.")
12921286 }
12931287 else throw("Strict value is not equal to itself.")
12941288 }
12951289 else throw("Strict value is not equal to itself.")
12961290 }
12971291
12981292
12991293
13001294 @Callable(i)
13011295 func putForFree (maxSlpg) = if ((0 > maxSlpg))
13021296 then throw("Wrong slpg")
13031297 else if ((size(i.payments) != 2))
13041298 then throw("2 pmnts expd")
13051299 else {
13061300 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, "")
13071301 let state = estPut._9
13081302 let amAssetPmt = toBigInt(value(i.payments[0]).amount)
13091303 let prAssetPmt = toBigInt(value(i.payments[1]).amount)
13101304 let currentDLp = calcCurrentDLp(amAssetPmt, prAssetPmt, toBigInt(0))
13111305 if ((currentDLp == currentDLp))
13121306 then {
1313- let $t04648246547 = refreshDLpInternal(0, 0, 0)
1314- let refreshDLpActions = $t04648246547._1
1315- let updatedDLp = $t04648246547._2
1307+ let $t04626446329 = refreshDLpInternal(0, 0, 0)
1308+ let refreshDLpActions = $t04626446329._1
1309+ let updatedDLp = $t04626446329._2
13161310 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
13171311 if ((isUpdatedDLpValid == isUpdatedDLpValid))
13181312 then (state ++ refreshDLpActions)
13191313 else throw("Strict value is not equal to itself.")
13201314 }
13211315 else throw("Strict value is not equal to itself.")
13221316 }
13231317
13241318
13251319
13261320 @Callable(i)
13271321 func get () = {
13281322 let currentDLp = calcCurrentDLp(toBigInt(0), toBigInt(0), toBigInt(0))
13291323 if ((currentDLp == currentDLp))
13301324 then {
13311325 let r = cg(i)
13321326 let outAmtAmt = r._1
13331327 let outPrAmt = r._2
13341328 let pmtAmt = r._3
13351329 let pmtAssetId = r._4
13361330 let state = r._5
13371331 let b = invoke(fca, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
13381332 if ((b == b))
13391333 then {
1340- let $t04772047802 = refreshDLpInternal(-(outAmtAmt), -(outPrAmt), 0)
1341- let refreshDLpActions = $t04772047802._1
1342- let updatedDLp = $t04772047802._2
1334+ let $t04750247584 = refreshDLpInternal(-(outAmtAmt), -(outPrAmt), 0)
1335+ let refreshDLpActions = $t04750247584._1
1336+ let updatedDLp = $t04750247584._2
13431337 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
13441338 if ((isUpdatedDLpValid == isUpdatedDLpValid))
13451339 then (state ++ refreshDLpActions)
13461340 else throw("Strict value is not equal to itself.")
13471341 }
13481342 else throw("Strict value is not equal to itself.")
13491343 }
13501344 else throw("Strict value is not equal to itself.")
13511345 }
13521346
13531347
13541348
13551349 @Callable(i)
13561350 func getOneTknV2 (outAssetId,minOutAmount) = {
13571351 let isPoolOneTokenOperationsDisabled = {
13581352 let @ = invoke(fca, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
13591353 if ($isInstanceOf(@, "Boolean"))
13601354 then @
13611355 else throw(($getType(@) + " couldn't be cast to Boolean"))
13621356 }
13631357 let isGetDisabled = if (if (igs())
13641358 then true
13651359 else (cfgPoolStatus == PoolShutdown))
13661360 then true
13671361 else isPoolOneTokenOperationsDisabled
13681362 let checks = [if (if (!(isGetDisabled))
13691363 then true
13701364 else isManager(i))
13711365 then true
13721366 else throwErr("get operation is blocked by admin"), if ((size(i.payments) == 1))
13731367 then true
13741368 else throwErr("exactly 1 payment are expected")]
13751369 if ((checks == checks))
13761370 then {
1377- let $t04842048575 = getOneTknV2Internal(outAssetId, minOutAmount, i.payments, i.caller, i.originCaller, i.transactionId)
1378- let state = $t04842048575._1
1379- let totalAmount = $t04842048575._2
1371+ let $t04820248357 = getOneTknV2Internal(outAssetId, minOutAmount, i.payments, i.caller, i.originCaller, i.transactionId)
1372+ let state = $t04820248357._1
1373+ let totalAmount = $t04820248357._2
13801374 $Tuple2(state, totalAmount)
13811375 }
13821376 else throw("Strict value is not equal to itself.")
13831377 }
13841378
13851379
13861380
13871381 @Callable(i)
13881382 func refreshDLp () = {
13891383 let lastRefreshedBlockHeight = valueOrElse(getInteger(keyDLpRefreshedHeight), 0)
13901384 let checkLastRefreshedBlockHeight = if (((height - lastRefreshedBlockHeight) >= dLpRefreshDelay))
13911385 then unit
13921386 else throwErr(makeString([toString(dLpRefreshDelay), " blocks have not passed since the previous call"], ""))
13931387 if ((checkLastRefreshedBlockHeight == checkLastRefreshedBlockHeight))
13941388 then {
13951389 let dLp = valueOrErrorMessage(parseBigInt(valueOrElse(getString(this, keyDLp), "0")), fmtErr("invalid dLp"))
1396- let $t04909949163 = refreshDLpInternal(0, 0, 0)
1397- let dLpUpdateActions = $t04909949163._1
1398- let updatedDLp = $t04909949163._2
1390+ let $t04888148945 = refreshDLpInternal(0, 0, 0)
1391+ let dLpUpdateActions = $t04888148945._1
1392+ let updatedDLp = $t04888148945._2
13991393 let actions = if ((dLp != updatedDLp))
14001394 then dLpUpdateActions
14011395 else throwErr("nothing to refresh")
14021396 $Tuple2(actions, toString(updatedDLp))
14031397 }
14041398 else throw("Strict value is not equal to itself.")
14051399 }
14061400
14071401
14081402
14091403 @Callable(i)
14101404 func getOneTknV2READONLY (outAssetId,lpAssetAmount) = {
14111405 let amId = toBase58String(value(cfgAmountAssetId))
14121406 let prId = toBase58String(value(cfgPriceAssetId))
14131407 let lpId = toBase58String(value(cfgLpAssetId))
14141408 let xp = [toBigInt(getAccBalance(amId)), toBigInt(getAccBalance(prId))]
14151409 let lpEmission = toBigInt(valueOrErrorMessage(assetInfo(fromBase58String(lpId)), "invalid lp asset").quantity)
14161410 let D0 = getD(xp)
14171411 let D1 = (D0 - fraction(toBigInt(lpAssetAmount), D0, lpEmission))
14181412 let index = if ((outAssetId == amId))
14191413 then 0
14201414 else if ((outAssetId == prId))
14211415 then 1
14221416 else throw("invalid out asset id")
14231417 let newY = getYD(xp, index, D1)
14241418 let dy = (xp[index] - newY)
14251419 let totalGetRaw = max([0, toInt((dy - big1))])
1426- let $t05017350228 = takeFee(totalGetRaw, outFee)
1427- let totalGet = $t05017350228._1
1428- let feeAmount = $t05017350228._2
1420+ let $t04995550010 = takeFee(totalGetRaw, outFee)
1421+ let totalGet = $t04995550010._1
1422+ let feeAmount = $t04995550010._2
14291423 $Tuple2(nil, $Tuple2(totalGet, feeAmount))
14301424 }
14311425
14321426
14331427
14341428 @Callable(i)
14351429 func getOneTknV2WithBonusREADONLY (outAssetId,lpAssetAmount) = {
14361430 let amId = toBase58String(value(cfgAmountAssetId))
14371431 let prId = toBase58String(value(cfgPriceAssetId))
14381432 let lpId = toBase58String(value(cfgLpAssetId))
14391433 let amBalance = getAccBalance(amId)
14401434 let prBalance = getAccBalance(prId)
1441- let $t05060350718 = {
1435+ let $t05038550500 = {
14421436 let @ = invoke(this, "getOneTknV2READONLY", [outAssetId, lpAssetAmount], nil)
14431437 if ($isInstanceOf(@, "(Int, Int)"))
14441438 then @
14451439 else throw(($getType(@) + " couldn't be cast to (Int, Int)"))
14461440 }
1447- let totalGet = $t05060350718._1
1448- let feeAmount = $t05060350718._2
1441+ let totalGet = $t05038550500._1
1442+ let feeAmount = $t05038550500._2
14491443 let r = ego("", lpId, lpAssetAmount, this)
14501444 let outAmAmt = r._1
14511445 let outPrAmt = r._2
14521446 let sumOfGetAssets = (outAmAmt + outPrAmt)
14531447 let bonus = if ((sumOfGetAssets == 0))
14541448 then if ((totalGet == 0))
14551449 then 0
14561450 else throw("bonus calculation error")
14571451 else fraction((totalGet - sumOfGetAssets), scale8, sumOfGetAssets)
14581452 $Tuple2(nil, $Tuple3(totalGet, feeAmount, bonus))
14591453 }
14601454
14611455
14621456
14631457 @Callable(i)
14641458 func getNoLess (noLessThenAmtAsset,noLessThenPriceAsset) = {
14651459 let r = cg(i)
14661460 let outAmAmt = r._1
14671461 let outPrAmt = r._2
14681462 let pmtAmt = r._3
14691463 let pmtAssetId = r._4
14701464 let state = r._5
14711465 if ((noLessThenAmtAsset > outAmAmt))
14721466 then throw(((("Failed: " + toString(outAmAmt)) + " < ") + toString(noLessThenAmtAsset)))
14731467 else if ((noLessThenPriceAsset > outPrAmt))
14741468 then throw(((("Failed: " + toString(outPrAmt)) + " < ") + toString(noLessThenPriceAsset)))
14751469 else {
14761470 let currentDLp = calcCurrentDLp(toBigInt(0), toBigInt(0), toBigInt(0))
14771471 if ((currentDLp == currentDLp))
14781472 then {
14791473 let burnLPAssetOnFactory = invoke(fca, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
14801474 if ((burnLPAssetOnFactory == burnLPAssetOnFactory))
14811475 then {
1482- let $t05188451965 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1483- let refreshDLpActions = $t05188451965._1
1484- let updatedDLp = $t05188451965._2
1476+ let $t05166651747 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1477+ let refreshDLpActions = $t05166651747._1
1478+ let updatedDLp = $t05166651747._2
14851479 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
14861480 if ((isUpdatedDLpValid == isUpdatedDLpValid))
14871481 then (state ++ refreshDLpActions)
14881482 else throw("Strict value is not equal to itself.")
14891483 }
14901484 else throw("Strict value is not equal to itself.")
14911485 }
14921486 else throw("Strict value is not equal to itself.")
14931487 }
14941488 }
14951489
14961490
14971491
14981492 @Callable(i)
14991493 func unstakeAndGet (amount) = {
15001494 let checkPayments = if ((size(i.payments) != 0))
15011495 then throw("No pmnts expd")
15021496 else true
15031497 if ((checkPayments == checkPayments))
15041498 then {
15051499 let factoryCfg = gfc()
15061500 let lpAssetId = cfgLpAssetId
15071501 let staking = valueOrErrorMessage(addressFromString(factoryCfg[idxFactStakCntr]), "Wr st addr")
15081502 let currentDLp = calcCurrentDLp(toBigInt(0), toBigInt(0), toBigInt(0))
15091503 if ((currentDLp == currentDLp))
15101504 then {
15111505 let unstakeInv = invoke(staking, "unstake", [toBase58String(lpAssetId), amount], nil)
15121506 if ((unstakeInv == unstakeInv))
15131507 then {
15141508 let r = ego(toBase58String(i.transactionId), toBase58String(lpAssetId), amount, i.caller)
15151509 let outAmAmt = r._1
15161510 let outPrAmt = r._2
15171511 let sts = parseIntValue(r._9)
15181512 let state = r._10
15191513 let v = if (if (igs())
15201514 then true
15211515 else (sts == PoolShutdown))
15221516 then throw(("Blocked: " + toString(sts)))
15231517 else true
15241518 if ((v == v))
15251519 then {
15261520 let burnA = invoke(fca, "burn", [amount], [AttachedPayment(lpAssetId, amount)])
15271521 if ((burnA == burnA))
15281522 then {
1529- let $t05299253073 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1530- let refreshDLpActions = $t05299253073._1
1531- let updatedDLp = $t05299253073._2
1523+ let $t05277452855 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1524+ let refreshDLpActions = $t05277452855._1
1525+ let updatedDLp = $t05277452855._2
15321526 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
15331527 if ((isUpdatedDLpValid == isUpdatedDLpValid))
15341528 then (state ++ refreshDLpActions)
15351529 else throw("Strict value is not equal to itself.")
15361530 }
15371531 else throw("Strict value is not equal to itself.")
15381532 }
15391533 else throw("Strict value is not equal to itself.")
15401534 }
15411535 else throw("Strict value is not equal to itself.")
15421536 }
15431537 else throw("Strict value is not equal to itself.")
15441538 }
15451539 else throw("Strict value is not equal to itself.")
15461540 }
15471541
15481542
15491543
15501544 @Callable(i)
15511545 func unstakeAndGetNoLess (unstakeAmount,noLessThenAmountAsset,noLessThenPriceAsset) = {
15521546 let isGetDisabled = if (igs())
15531547 then true
15541548 else (cfgPoolStatus == PoolShutdown)
15551549 let checks = [if (!(isGetDisabled))
15561550 then true
15571551 else throw("get operation is blocked by admin"), if ((size(i.payments) == 0))
15581552 then true
15591553 else throw("no payments are expected")]
15601554 if ((checks == checks))
15611555 then {
15621556 let currentDLp = calcCurrentDLp(toBigInt(0), toBigInt(0), toBigInt(0))
15631557 if ((currentDLp == currentDLp))
15641558 then {
15651559 let unstakeInv = invoke(stakingContract, "unstake", [toBase58String(cfgLpAssetId), unstakeAmount], nil)
15661560 if ((unstakeInv == unstakeInv))
15671561 then {
15681562 let res = ego(toBase58String(i.transactionId), toBase58String(cfgLpAssetId), unstakeAmount, i.caller)
15691563 let outAmAmt = res._1
15701564 let outPrAmt = res._2
15711565 let state = res._10
15721566 let checkAmounts = [if ((outAmAmt >= noLessThenAmountAsset))
15731567 then true
15741568 else throw(makeString(["amount asset amount to receive is less than ", toString(noLessThenAmountAsset)], "")), if ((outPrAmt >= noLessThenPriceAsset))
15751569 then true
15761570 else throw(makeString(["price asset amount to receive is less than ", toString(noLessThenPriceAsset)], ""))]
15771571 if ((checkAmounts == checkAmounts))
15781572 then {
15791573 let burnLPAssetOnFactory = invoke(fca, "burn", [unstakeAmount], [AttachedPayment(cfgLpAssetId, unstakeAmount)])
15801574 if ((burnLPAssetOnFactory == burnLPAssetOnFactory))
15811575 then {
1582- let $t05432454405 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1583- let refreshDLpActions = $t05432454405._1
1584- let updatedDLp = $t05432454405._2
1576+ let $t05410654187 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1577+ let refreshDLpActions = $t05410654187._1
1578+ let updatedDLp = $t05410654187._2
15851579 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
15861580 if ((isUpdatedDLpValid == isUpdatedDLpValid))
15871581 then (state ++ refreshDLpActions)
15881582 else throw("Strict value is not equal to itself.")
15891583 }
15901584 else throw("Strict value is not equal to itself.")
15911585 }
15921586 else throw("Strict value is not equal to itself.")
15931587 }
15941588 else throw("Strict value is not equal to itself.")
15951589 }
15961590 else throw("Strict value is not equal to itself.")
15971591 }
15981592 else throw("Strict value is not equal to itself.")
15991593 }
16001594
16011595
16021596
16031597 @Callable(i)
16041598 func unstakeAndGetOneTknV2 (unstakeAmount,outAssetId,minOutAmount) = {
16051599 let isPoolOneTokenOperationsDisabled = {
16061600 let @ = invoke(fca, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
16071601 if ($isInstanceOf(@, "Boolean"))
16081602 then @
16091603 else throw(($getType(@) + " couldn't be cast to Boolean"))
16101604 }
16111605 let isGetDisabled = if (if (igs())
16121606 then true
16131607 else (cfgPoolStatus == PoolShutdown))
16141608 then true
16151609 else isPoolOneTokenOperationsDisabled
16161610 let checks = [if (if (!(isGetDisabled))
16171611 then true
16181612 else isManager(i))
16191613 then true
16201614 else throwErr("get operation is blocked by admin"), if ((size(i.payments) == 0))
16211615 then true
16221616 else throwErr("no payments are expected")]
16231617 if ((checks == checks))
16241618 then {
16251619 let factoryCfg = gfc()
16261620 let lpAssetId = cfgLpAssetId
16271621 let staking = valueOrErrorMessage(addressFromString(factoryCfg[idxFactStakCntr]), "Wr st addr")
16281622 let userAddress = i.caller
16291623 let lpAssetRecipientAddress = this
16301624 let unstakeInv = invoke(staking, "unstakeINTERNAL", [lpAssetId, unstakeAmount, userAddress.bytes, lpAssetRecipientAddress.bytes], nil)
16311625 if ((unstakeInv == unstakeInv))
16321626 then {
1633- let $t05542755615 = getOneTknV2Internal(outAssetId, minOutAmount, [AttachedPayment(lpAssetId, unstakeAmount)], i.caller, i.originCaller, i.transactionId)
1634- let state = $t05542755615._1
1635- let totalAmount = $t05542755615._2
1627+ let $t05520955397 = getOneTknV2Internal(outAssetId, minOutAmount, [AttachedPayment(lpAssetId, unstakeAmount)], i.caller, i.originCaller, i.transactionId)
1628+ let state = $t05520955397._1
1629+ let totalAmount = $t05520955397._2
16361630 $Tuple2(state, totalAmount)
16371631 }
16381632 else throw("Strict value is not equal to itself.")
16391633 }
16401634 else throw("Strict value is not equal to itself.")
16411635 }
16421636
16431637
16441638
16451639 @Callable(i)
16461640 func putOneTknV2WithBonusREADONLY (paymentAmountRaw,paymentAssetId) = {
1647- let $t05574355846 = calcPutOneTkn(paymentAmountRaw, paymentAssetId, "", "", true)
1648- let lpAmount = $t05574355846._1
1649- let state = $t05574355846._2
1650- let feeAmount = $t05574355846._3
1651- let bonus = $t05574355846._4
1641+ let $t05552555628 = calcPutOneTkn(paymentAmountRaw, paymentAssetId, "", "", true)
1642+ let lpAmount = $t05552555628._1
1643+ let state = $t05552555628._2
1644+ let feeAmount = $t05552555628._3
1645+ let bonus = $t05552555628._4
16521646 $Tuple2(nil, $Tuple3(lpAmount, feeAmount, bonus))
16531647 }
16541648
16551649
16561650
16571651 @Callable(i)
16581652 func putOneTknV2WithoutTakeFeeREADONLY (paymentAmountRaw,paymentAssetId) = {
1659- let $t05599456098 = calcPutOneTkn(paymentAmountRaw, paymentAssetId, "", "", false)
1660- let lpAmount = $t05599456098._1
1661- let state = $t05599456098._2
1662- let feeAmount = $t05599456098._3
1663- let bonus = $t05599456098._4
1653+ let $t05577655880 = calcPutOneTkn(paymentAmountRaw, paymentAssetId, "", "", false)
1654+ let lpAmount = $t05577655880._1
1655+ let state = $t05577655880._2
1656+ let feeAmount = $t05577655880._3
1657+ let bonus = $t05577655880._4
16641658 $Tuple2(nil, $Tuple3(lpAmount, feeAmount, bonus))
16651659 }
16661660
16671661
16681662
16691663 @Callable(i)
16701664 func activate (amtAsStr,prAsStr) = if ((toString(i.caller) != toString(fca)))
16711665 then throw("denied")
16721666 else $Tuple2([StringEntry(aa(), amtAsStr), StringEntry(pa(), prAsStr), StringEntry(amp(), toString(ampInitial))], "success")
16731667
16741668
16751669
16761670 @Callable(i)
16771671 func getPoolConfigWrapperREADONLY () = $Tuple2(nil, gpc())
16781672
16791673
16801674
16811675 @Callable(i)
16821676 func getAccBalanceWrapperREADONLY (assetId) = $Tuple2(nil, getAccBalance(assetId))
16831677
16841678
16851679
16861680 @Callable(i)
16871681 func calcPricesWrapperREADONLY (amAmt,prAmt,lpAmt) = {
16881682 let pr = calcPrices(amAmt, prAmt, lpAmt)
16891683 $Tuple2(nil, [toString(pr[0]), toString(pr[1]), toString(pr[2])])
16901684 }
16911685
16921686
16931687
16941688 @Callable(i)
16951689 func fromX18WrapperREADONLY (val,resScaleMult) = $Tuple2(nil, f1(parseBigIntValue(val), resScaleMult))
16961690
16971691
16981692
16991693 @Callable(i)
17001694 func toX18WrapperREADONLY (origVal,origScaleMult) = $Tuple2(nil, toString(t1(origVal, origScaleMult)))
17011695
17021696
17031697
17041698 @Callable(i)
17051699 func calcPriceBigIntWrapperREADONLY (prAmtX18,amAmtX18) = $Tuple2(nil, toString(cpbi(parseBigIntValue(prAmtX18), parseBigIntValue(amAmtX18))))
17061700
17071701
17081702
17091703 @Callable(i)
17101704 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, ""))
17111705
17121706
17131707
17141708 @Callable(i)
17151709 func estimateGetOperationWrapperREADONLY (txId58,pmtAsId,pmtLpAmt,usrAddr) = {
17161710 let r = ego(txId58, pmtAsId, pmtLpAmt, addressFromStringValue(usrAddr))
17171711 $Tuple2(nil, $Tuple10(r._1, r._2, r._3, r._4, r._5, r._6, r._7, toString(r._8), r._9, r._10))
17181712 }
17191713
17201714
17211715
17221716 @Callable(i)
17231717 func changeAmp () = {
17241718 let cfg = invoke(fca, "getChangeAmpConfigREADONLY", [toString(this)], nil)
1725- let $t05850758706 = match cfg {
1719+ let $t05828958488 = match cfg {
17261720 case list: List[Any] =>
17271721 $Tuple3({
17281722 let @ = list[0]
17291723 if ($isInstanceOf(@, "Int"))
17301724 then @
17311725 else throw(($getType(@) + " couldn't be cast to Int"))
17321726 }, {
17331727 let @ = list[1]
17341728 if ($isInstanceOf(@, "Int"))
17351729 then @
17361730 else throw(($getType(@) + " couldn't be cast to Int"))
17371731 }, {
17381732 let @ = list[2]
17391733 if ($isInstanceOf(@, "Int"))
17401734 then @
17411735 else throw(($getType(@) + " couldn't be cast to Int"))
17421736 })
17431737 case _ =>
17441738 throwErr("invalid entry type")
17451739 }
1746- let delay = $t05850758706._1
1747- let delta = $t05850758706._2
1748- let target = $t05850758706._3
1740+ let delay = $t05828958488._1
1741+ let delta = $t05828958488._2
1742+ let target = $t05828958488._3
17491743 let curAmp = parseIntValue(getStringValue(amp()))
17501744 let newAmpRaw = (curAmp + delta)
17511745 let newAmp = if ((0 > delta))
17521746 then if ((target > newAmpRaw))
17531747 then target
17541748 else newAmpRaw
17551749 else if ((newAmpRaw > target))
17561750 then target
17571751 else newAmpRaw
17581752 let lastCall = valueOrElse(getInteger(keyChangeAmpLastCall()), 0)
17591753 let wait = (lastCall + delay)
17601754 let checks = [if ((height > wait))
17611755 then true
17621756 else throwErr("try again in few blocks"), if ((curAmp != newAmp))
17631757 then true
17641758 else throwErr("already reached target")]
17651759 if ((checks == checks))
17661760 then [IntegerEntry(keyChangeAmpLastCall(), height), StringEntry(amp(), toString(newAmp)), StringEntry(keyAmpHistory(height), toString(newAmp))]
17671761 else throw("Strict value is not equal to itself.")
17681762 }
17691763
17701764
17711765 @Verifier(tx)
17721766 func verify () = {
17731767 let targetPublicKey = match m() {
17741768 case pk: ByteVector =>
17751769 pk
17761770 case _: Unit =>
17771771 tx.senderPublicKey
17781772 case _ =>
17791773 throw("Match error")
17801774 }
17811775 match tx {
17821776 case order: Order =>
17831777 let matcherPub = mp()
1784- let $t05961859735 = if (skipOrderValidation())
1778+ let $t05940059517 = if (skipOrderValidation())
17851779 then $Tuple2(true, "")
17861780 else validateMatcherOrderAllowed(order)
1787- let orderValid = $t05961859735._1
1788- let orderValidInfo = $t05961859735._2
1781+ let orderValid = $t05940059517._1
1782+ let orderValidInfo = $t05940059517._2
17891783 let senderValid = sigVerify(order.bodyBytes, order.proofs[0], order.senderPublicKey)
17901784 let matcherValid = sigVerify(order.bodyBytes, order.proofs[1], matcherPub)
17911785 if (if (if (orderValid)
17921786 then senderValid
17931787 else false)
17941788 then matcherValid
17951789 else false)
17961790 then true
17971791 else throwOrderError(orderValid, orderValidInfo, senderValid, matcherValid)
17981792 case s: SetScriptTransaction =>
17991793 if (sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey))
18001794 then true
18011795 else {
18021796 let newHash = blake2b256(value(s.script))
18031797 let allowedHash = fromBase64String(value(getString(fca, keyAllowedLpStableScriptHash())))
18041798 let currentHash = scriptHash(this)
18051799 if ((allowedHash == newHash))
18061800 then (currentHash != newHash)
18071801 else false
18081802 }
18091803 case _ =>
18101804 sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey)
18111805 }
18121806 }
18131807

github/deemru/w8io/026f985 
292.86 ms