tx · GrB9HF4txtnu48nFnuU4TLCy7xeHrCwsGSmznH85Rc3i

3NAefciWv6f9fWvEXdGgpHfanJFG8HqfjuT:  -0.03600000 Waves

2023.01.19 15:19 [2411805] smart account 3NAefciWv6f9fWvEXdGgpHfanJFG8HqfjuT > SELF 0.00000000 Waves

{ "type": 13, "id": "GrB9HF4txtnu48nFnuU4TLCy7xeHrCwsGSmznH85Rc3i", "fee": 3600000, "feeAssetId": null, "timestamp": 1674130828039, "version": 1, "sender": "3NAefciWv6f9fWvEXdGgpHfanJFG8HqfjuT", "senderPublicKey": "D1BL65meykxFZTCuq7jq9HSGLLnWvQamQPUNrguW5w39", "proofs": [ "3RMjXtKdCaKqSECNC8W9umkbRdQFN8n5uu9DLFco8tC4c2hQ6A189RWAwrQZNXzWnsZ228Sinop98kq1haudXJqR" ], "script": "base64:BgLtKAgCEgMKAQgSAwoBCBIAEgQKAgEEEgQKAgEEEgMKAQESABIECgIIARIAEgQKAggBEgQKAggBEgQKAgEBEgMKAQESBQoDAQEBEgUKAwEIARIECgIBCBIECgIBCBIECgIICBIECgIICBIECgIIARIAEgMKAQgSBQoDAQEBEgQKAggBEgQKAgEBEgQKAggIEgsKCQgBAQIBAggEBBIGCgQICAEIIgZzY2FsZTgiDHNjYWxlOEJpZ0ludCIHc2NhbGUxOCIKemVyb0JpZ0ludCIEYmlnMCIEYmlnMSIEYmlnMiIEYmlnMyIEYmlnNCIKc2xpcHBhZ2U0RCILd2F2ZXNTdHJpbmciBUFtdWx0IgVEY29udiIDU0VQIgVFTVBUWSIKUG9vbEFjdGl2ZSIKUG9vbFB1dERpcyIOUG9vbE1hdGNoZXJEaXMiDFBvb2xTaHV0ZG93biIOaWR4UG9vbEFkZHJlc3MiCWlkeFBvb2xTdCIJaWR4TFBBc0lkIglpZHhBbUFzSWQiCWlkeFByQXNJZCILaWR4QW10QXNEY20iDWlkeFByaWNlQXNEY20iC2lkeElBbXRBc0lkIg1pZHhJUHJpY2VBc0lkIg9pZHhGYWN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IBQJoTwlib2R5Qnl0ZXMJAJEDAggFAmhPBnByb29mcwAABQJoUSCO5YE=", "chainId": 84, "height": 2411805, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: D8UgC2wdNZzaYcHUd3GyamxS1Ri4DMEKwuQR2LFP8inf Next: 3NFLG7ZXqRTmbnjJrWXKV1np4uQ7nKDmuwPcY4bpHQmi Diff:
OldNewDifferences
6868 let feeDefault = fraction(10, scale8, 10000)
6969
7070 func t1 (origVal,origScaleMult) = fraction(toBigInt(origVal), scale18, toBigInt(origScaleMult))
71+
72+
73+func t1BigInt (origVal,origScaleMult) = fraction(origVal, scale18, origScaleMult)
7174
7275
7376 func f1 (val,resultScaleMult) = toInt(fraction(val, toBigInt(resultScaleMult), scale18))
228231
229232 let poolConfigParsed = parsePoolConfig(gpc())
230233
231-let $t077427971 = poolConfigParsed
234+let $t078478076 = poolConfigParsed
232235
233-let cfgPoolAddress = $t077427971._1
236+let cfgPoolAddress = $t078478076._1
234237
235-let cfgPoolStatus = $t077427971._2
238+let cfgPoolStatus = $t078478076._2
236239
237-let cfgLpAssetId = $t077427971._3
240+let cfgLpAssetId = $t078478076._3
238241
239-let cfgAmountAssetId = $t077427971._4
242+let cfgAmountAssetId = $t078478076._4
240243
241-let cfgPriceAssetId = $t077427971._5
244+let cfgPriceAssetId = $t078478076._5
242245
243-let cfgAmountAssetDecimals = $t077427971._6
246+let cfgAmountAssetDecimals = $t078478076._6
244247
245-let cfgPriceAssetDecimals = $t077427971._7
248+let cfgPriceAssetDecimals = $t078478076._7
246249
247-let cfgInAmountAssedId = $t077427971._8
250+let cfgInAmountAssedId = $t078478076._8
248251
249-let cfgInPriceAssetId = $t077427971._9
252+let cfgInPriceAssetId = $t078478076._9
250253
251254 func gfc () = split(strf(fca, fcfg()), SEP)
252255
443446 else calcLpAmt
444447 let amDiff = (inAmAmt - calcAmAssetPmt)
445448 let prDiff = (inPrAmt - calcPrAssetPmt)
446- let $t01862118966 = if (if (isOneAsset)
449+ let $t01872619071 = if (if (isOneAsset)
447450 then (pmtId == amIdStr)
448451 else false)
449452 then $Tuple2(pmtAmt, 0)
452455 else false)
453456 then $Tuple2(0, pmtAmt)
454457 else $Tuple2(calcAmAssetPmt, calcPrAssetPmt)
455- let writeAmAmt = $t01862118966._1
456- let writePrAmt = $t01862118966._2
458+ let writeAmAmt = $t01872619071._1
459+ let writePrAmt = $t01872619071._2
457460 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))]
458461 $Tuple13(calcLpAmt, emitLpAmt, curPrice, amBalance, prBalance, lpEm, lpId, sts, commonState, amDiff, prDiff, inAmId, inPrId)
459462 }
477480 let dd = fraction(d, d, big1)
478481 let ddd = fraction(dd, d, big1)
479482 let dp = fraction(ddd, big1, xp0_xp1_n_n)
480- fraction((ann_s + fraction(dp, big2, big1)), d, (fraction(ann_1, d, big1) + fraction(big3, dp, big1)), CEILING)
483+ fraction((ann_s + fraction(dp, big2, big1)), d, (fraction(ann_1, d, big1) + fraction(big3, dp, big1)))
481484 }
482485
483486 func calc (acc,i) = if (acc._2)
495498 }
496499
497500 let arr = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
498- let $t02089020938 = {
501+ let $t02097821026 = {
499502 let $l = arr
500503 let $s = size($l)
501504 let $acc0 = $Tuple2(s, false)
509512
510513 $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)
511514 }
512- let d = $t02089020938._1
513- let found = $t02089020938._2
515+ let d = $t02097821026._1
516+ let found = $t02097821026._2
514517 if (found)
515- then d
516- else throw(("D calculation error, D = " + toString(d)))
517- }
518- }
519-
520-
521-func getDOld (xp) = {
522- let n = big2
523- let xp0 = xp[0]
524- let xp1 = xp[1]
525- let aPrecision = parseBigIntValue(Amult)
526- let a = (parseBigIntValue(A) * aPrecision)
527- let s = (xp0 + xp1)
528- if ((s == big0))
529- then big0
530- else {
531- let ann = (a * n)
532- let xp0_xp1_n_n = (((xp0 * xp1) * n) * n)
533- let ann_s_aPrecision = ((ann * s) / aPrecision)
534- let ann_aPrecision = (ann - aPrecision)
535- let n1 = (n + big1)
536- func calc (acc,cur) = {
537- let $t02156721587 = acc
538- let d = $t02156721587._1
539- let found = $t02156721587._2
540- if ((found != unit))
541- then acc
542- else {
543- let dp = (((d * d) * d) / xp0_xp1_n_n)
544- let dNext = (((ann_s_aPrecision + (dp * n)) * d) / (((ann_aPrecision * d) / aPrecision) + (n1 * dp)))
545- let dDiff = absBigInt((dNext - value(d)))
546- if ((big1 >= dDiff))
547- then $Tuple2(dNext, cur)
548- else $Tuple2(dNext, unit)
549- }
550- }
551-
552- let arr = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
553- let $t02200822055 = {
554- let $l = arr
555- let $s = size($l)
556- let $acc0 = $Tuple2(s, unit)
557- func $f0_1 ($a,$i) = if (($i >= $s))
558- then $a
559- else calc($a, $l[$i])
560-
561- func $f0_2 ($a,$i) = if (($i >= $s))
562- then $a
563- else throw("List size exceeds 15")
564-
565- $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)
566- }
567- let d = $t02200822055._1
568- let found = $t02200822055._2
569- if ((found != unit))
570518 then d
571519 else throw(("D calculation error, D = " + toString(d)))
572520 }
585533 let c = (((((D * D) / (x * n)) * D) * aPrecision) / (ann * n))
586534 let b = ((s + ((D * aPrecision) / ann)) - D)
587535 func calc (acc,cur) = {
588- let $t02255522575 = acc
589- let y = $t02255522575._1
590- let found = $t02255522575._2
536+ let $t02151821538 = acc
537+ let y = $t02151821538._1
538+ let found = $t02151821538._2
591539 if ((found != unit))
592540 then acc
593541 else {
600548 }
601549
602550 let arr = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
603- let $t02288222929 = {
551+ let $t02184521892 = {
604552 let $l = arr
605553 let $s = size($l)
606554 let $acc0 = $Tuple2(D, unit)
614562
615563 $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)
616564 }
617- let y = $t02288222929._1
618- let found = $t02288222929._2
565+ let y = $t02184521892._1
566+ let found = $t02184521892._2
619567 if ((found != unit))
620568 then y
621569 else throw(("Y calculation error, Y = " + toString(y)))
623571
624572
625573 func calcDLp (amountBalance,priceBalance,lpEmission) = {
626- let updatedDLp = fraction(getD([t1(toInt(amountBalance), cfgAmountAssetDecimals), t1(toInt(priceBalance), cfgPriceAssetDecimals)]), big1, lpEmission)
574+ let updatedDLp = fraction(getD([t1BigInt(amountBalance, toBigInt(cfgAmountAssetDecimals)), t1BigInt(priceBalance, toBigInt(cfgPriceAssetDecimals))]), big1, lpEmission)
627575 if ((lpEmission == big0))
628576 then big0
629577 else updatedDLp
657605 func validateMatcherOrderAllowed (order) = {
658606 let amountAssetAmount = order.amount
659607 let priceAssetAmount = fraction(order.amount, order.price, scale8, FLOOR)
660- let $t02495225164 = if ((order.orderType == Buy))
608+ let $t02393324145 = if ((order.orderType == Buy))
661609 then $Tuple2(amountAssetAmount, -(priceAssetAmount))
662610 else $Tuple2(-(amountAssetAmount), priceAssetAmount)
663- let amountAssetBalanceDelta = $t02495225164._1
664- let priceAssetBalanceDelta = $t02495225164._2
611+ let amountAssetBalanceDelta = $t02393324145._1
612+ let priceAssetBalanceDelta = $t02393324145._2
665613 if (if (if (igs())
666614 then true
667615 else (cfgPoolStatus == PoolMatcherDis))
674622 then throw("Wr assets")
675623 else {
676624 let dLp = parseBigIntValue(getStringValue(this, keyDLp))
677- let $t02549425594 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
678- let unusedActions = $t02549425594._1
679- let dLpNew = $t02549425594._2
625+ let $t02447524575 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
626+ let unusedActions = $t02447524575._1
627+ let dLpNew = $t02447524575._2
680628 let isOrderValid = (dLpNew >= dLp)
681629 isOrderValid
682630 }
729677 then {
730678 let amBalance = getAccBalance(amId)
731679 let prBalance = getAccBalance(prId)
732- let $t02786028322 = if ((txId == ""))
680+ let $t02684127303 = if ((txId == ""))
733681 then $Tuple2(amBalance, prBalance)
734682 else if ((pmtAssetId == amId))
735683 then if ((pmtAmtRaw > amBalance))
740688 then throw("invalid payment amount")
741689 else $Tuple2(amBalance, (prBalance - pmtAmtRaw))
742690 else throw("wrong pmtAssetId")
743- let amBalanceOld = $t02786028322._1
744- let prBalanceOld = $t02786028322._2
745- let $t02832828504 = if ((pmtAssetId == amId))
691+ let amBalanceOld = $t02684127303._1
692+ let prBalanceOld = $t02684127303._2
693+ let $t02730927485 = if ((pmtAssetId == amId))
746694 then $Tuple2(pmtAmtRaw, 0)
747695 else if ((pmtAssetId == prId))
748696 then $Tuple2(0, pmtAmtRaw)
749697 else throw("invalid payment")
750- let amAmountRaw = $t02832828504._1
751- let prAmountRaw = $t02832828504._2
752- let $t02850828762 = if (withTakeFee)
698+ let amAmountRaw = $t02730927485._1
699+ let prAmountRaw = $t02730927485._2
700+ let $t02748927743 = if (withTakeFee)
753701 then $Tuple3(takeFee(amAmountRaw, inFee)._1, takeFee(prAmountRaw, inFee)._1, takeFee(pmtAmtRaw, inFee)._2)
754702 else $Tuple3(amAmountRaw, prAmountRaw, 0)
755- let amAmount = $t02850828762._1
756- let prAmount = $t02850828762._2
757- let feeAmount = $t02850828762._3
703+ let amAmount = $t02748927743._1
704+ let prAmount = $t02748927743._2
705+ let feeAmount = $t02748927743._3
758706 let amBalanceNew = (amBalanceOld + amAmount)
759707 let prBalanceNew = (prBalanceOld + prAmount)
760708 let D0 = getD([toBigInt(amBalanceOld), toBigInt(prBalanceOld)])
802750 else {
803751 let amBalance = getAccBalance(amId)
804752 let prBalance = getAccBalance(prId)
805- let $t03081230923 = {
753+ let $t02979329904 = {
806754 let @ = invoke(this, "getOneTknV2READONLY", [outAssetId, pmtAmt], nil)
807755 if ($isInstanceOf(@, "(Int, Int)"))
808756 then @
809757 else throw(($getType(@) + " couldn't be cast to (Int, Int)"))
810758 }
811- if (($t03081230923 == $t03081230923))
759+ if (($t02979329904 == $t02979329904))
812760 then {
813- let feeAmount = $t03081230923._2
814- let totalGet = $t03081230923._1
761+ let feeAmount = $t02979329904._2
762+ let totalGet = $t02979329904._1
815763 let totalAmount = if (if ((minOutAmount > 0))
816764 then (minOutAmount > totalGet)
817765 else false)
818766 then throwErr(makeString(["amount to receive is less than ", toString(minOutAmount)], ""))
819767 else totalGet
820- let $t03111331420 = if ((outAssetId == amId))
768+ let $t03009430401 = if ((outAssetId == amId))
821769 then $Tuple4(totalAmount, 0, ((amBalance - totalAmount) - feeAmount), prBalance)
822770 else if ((outAssetId == prId))
823771 then $Tuple4(0, totalAmount, amBalance, ((prBalance - totalAmount) - feeAmount))
824772 else throw("invalid out asset id")
825- let outAm = $t03111331420._1
826- let outPr = $t03111331420._2
827- let amBalanceNew = $t03111331420._3
828- let prBalanceNew = $t03111331420._4
773+ let outAm = $t03009430401._1
774+ let outPr = $t03009430401._2
775+ let amBalanceNew = $t03009430401._3
776+ let prBalanceNew = $t03009430401._4
829777 let curPrX18 = cpbi(t1(prBalanceNew, prDecimals), t1(amBalanceNew, amDecimals))
830778 let curPr = f1(curPrX18, scale8)
831779 let outAssetIdOrWaves = if ((outAssetId == "WAVES"))
840788 let burn = invoke(fca, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
841789 if ((burn == burn))
842790 then {
843- let $t03220532555 = {
791+ let $t03118631536 = {
844792 let feeAmountForCalc = if ((this == feeCollectorAddress))
845793 then 0
846794 else feeAmount
851799 then $Tuple2(-((totalGet + feeAmountForCalc)), 0)
852800 else $Tuple2(0, -((totalGet + feeAmountForCalc)))
853801 }
854- let amountAssetBalanceDelta = $t03220532555._1
855- let priceAssetBalanceDelta = $t03220532555._2
856- let $t03255832666 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
857- let refreshDLpActions = $t03255832666._1
858- let updatedDLp = $t03255832666._2
802+ let amountAssetBalanceDelta = $t03118631536._1
803+ let priceAssetBalanceDelta = $t03118631536._2
804+ let $t03153931647 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
805+ let refreshDLpActions = $t03153931647._1
806+ let updatedDLp = $t03153931647._2
859807 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
860808 if ((isUpdatedDLpValid == isUpdatedDLpValid))
861809 then $Tuple2((state ++ refreshDLpActions), totalAmount)
1024972 else throw("Strict value is not equal to itself.")
1025973 }
1026974 else [ScriptTransfer(i.caller, emitLpAmt, lpAssetId)]
1027- let $t03681536957 = refreshDLpInternal(0, 0, 0)
1028- let refreshDLpActions = $t03681536957._1
1029- let updatedDLp = $t03681536957._2
975+ let $t03579635938 = refreshDLpInternal(0, 0, 0)
976+ let refreshDLpActions = $t03579635938._1
977+ let updatedDLp = $t03579635938._2
1030978 let check = if ((updatedDLp >= currentDLp))
1031979 then true
1032980 else throwErr(makeString(["updated DLp lower than current DLp", toString(amountAssetBalance), toString(priceAssetBalance), toString(lpAssetEmission), toString(currentDLp), toString(updatedDLp), toString(amDiff), toString(prDiff)], " "))
10991047 else calcCurrentDLp(toBigInt(0), toBigInt(pmtAmt), toBigInt(0))
11001048 if ((currentDLp == currentDLp))
11011049 then {
1102- let $t03859838756 = calcPutOneTkn(pmtAmt, pmtAssetId, toString(userAddress), toBase58String(i.transactionId), true)
1103- if (($t03859838756 == $t03859838756))
1050+ let $t03757937737 = calcPutOneTkn(pmtAmt, pmtAssetId, toString(userAddress), toBase58String(i.transactionId), true)
1051+ if (($t03757937737 == $t03757937737))
11041052 then {
1105- let feeAmount = $t03859838756._3
1106- let state = $t03859838756._2
1107- let estimLP = $t03859838756._1
1053+ let feeAmount = $t03757937737._3
1054+ let state = $t03757937737._2
1055+ let estimLP = $t03757937737._1
11081056 let emitLpAmt = if (if ((minOutAmount > 0))
11091057 then (minOutAmount > estimLP)
11101058 else false)
11321080 let sendFeeToMatcher = if ((feeAmount > 0))
11331081 then [ScriptTransfer(feeCollectorAddress, feeAmount, fromBase58String(pmtAssetId))]
11341082 else nil
1135- let $t03957139920 = if ((this == feeCollectorAddress))
1083+ let $t03855238901 = if ((this == feeCollectorAddress))
11361084 then $Tuple2(0, 0)
11371085 else {
11381086 let paymentInAmountAsset = if ((pmt.assetId == cfgAmountAssetId))
11421090 then $Tuple2(-(feeAmount), 0)
11431091 else $Tuple2(0, -(feeAmount))
11441092 }
1145- let amountAssetBalanceDelta = $t03957139920._1
1146- let priceAssetBalanceDelta = $t03957139920._2
1147- let $t03992340031 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
1148- let refreshDLpActions = $t03992340031._1
1149- let updatedDLp = $t03992340031._2
1093+ let amountAssetBalanceDelta = $t03855238901._1
1094+ let priceAssetBalanceDelta = $t03855238901._2
1095+ let $t03890439012 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
1096+ let refreshDLpActions = $t03890439012._1
1097+ let updatedDLp = $t03890439012._2
11501098 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
11511099 if ((isUpdatedDLpValid == isUpdatedDLpValid))
11521100 then $Tuple2((((state ++ lpTrnsfr) ++ sendFeeToMatcher) ++ refreshDLpActions), emitLpAmt)
11781126 let currentDLp = calcCurrentDLp(amAssetPmt, prAssetPmt, toBigInt(0))
11791127 if ((currentDLp == currentDLp))
11801128 then {
1181- let $t04106141126 = refreshDLpInternal(0, 0, 0)
1182- let refreshDLpActions = $t04106141126._1
1183- let updatedDLp = $t04106141126._2
1129+ let $t04004240107 = refreshDLpInternal(0, 0, 0)
1130+ let refreshDLpActions = $t04004240107._1
1131+ let updatedDLp = $t04004240107._2
11841132 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
11851133 if ((isUpdatedDLpValid == isUpdatedDLpValid))
11861134 then (state ++ refreshDLpActions)
12051153 let b = invoke(fca, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
12061154 if ((b == b))
12071155 then {
1208- let $t04229942381 = refreshDLpInternal(-(outAmtAmt), -(outPrAmt), 0)
1209- let refreshDLpActions = $t04229942381._1
1210- let updatedDLp = $t04229942381._2
1156+ let $t04128041362 = refreshDLpInternal(-(outAmtAmt), -(outPrAmt), 0)
1157+ let refreshDLpActions = $t04128041362._1
1158+ let updatedDLp = $t04128041362._2
12111159 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
12121160 if ((isUpdatedDLpValid == isUpdatedDLpValid))
12131161 then (state ++ refreshDLpActions)
12421190 else throwErr("exactly 1 payment are expected")]
12431191 if ((checks == checks))
12441192 then {
1245- let $t04299943154 = getOneTknV2Internal(outAssetId, minOutAmount, i.payments, i.caller, i.originCaller, i.transactionId)
1246- let state = $t04299943154._1
1247- let totalAmount = $t04299943154._2
1193+ let $t04198042135 = getOneTknV2Internal(outAssetId, minOutAmount, i.payments, i.caller, i.originCaller, i.transactionId)
1194+ let state = $t04198042135._1
1195+ let totalAmount = $t04198042135._2
12481196 $Tuple2(state, totalAmount)
12491197 }
12501198 else throw("Strict value is not equal to itself.")
12611209 if ((checkLastRefreshedBlockHeight == checkLastRefreshedBlockHeight))
12621210 then {
12631211 let dLp = valueOrErrorMessage(parseBigInt(valueOrElse(getString(this, keyDLp), "0")), fmtErr("invalid dLp"))
1264- let $t04367843742 = refreshDLpInternal(0, 0, 0)
1265- let dLpUpdateActions = $t04367843742._1
1266- let updatedDLp = $t04367843742._2
1212+ let $t04265942723 = refreshDLpInternal(0, 0, 0)
1213+ let dLpUpdateActions = $t04265942723._1
1214+ let updatedDLp = $t04265942723._2
12671215 let actions = if ((dLp != updatedDLp))
12681216 then dLpUpdateActions
12691217 else throwErr("nothing to refresh")
12911239 let newY = getYD(xp, index, D1)
12921240 let dy = (xp[index] - newY)
12931241 let totalGetRaw = max([0, toInt((dy - big1))])
1294- let $t04467244727 = takeFee(totalGetRaw, outFee)
1295- let totalGet = $t04467244727._1
1296- let feeAmount = $t04467244727._2
1242+ let $t04365343708 = takeFee(totalGetRaw, outFee)
1243+ let totalGet = $t04365343708._1
1244+ let feeAmount = $t04365343708._2
12971245 $Tuple2(nil, $Tuple2(totalGet, feeAmount))
12981246 }
12991247
13061254 let lpId = toBase58String(value(cfgLpAssetId))
13071255 let amBalance = getAccBalance(amId)
13081256 let prBalance = getAccBalance(prId)
1309- let $t04510245217 = {
1257+ let $t04408344198 = {
13101258 let @ = invoke(this, "getOneTknV2READONLY", [outAssetId, lpAssetAmount], nil)
13111259 if ($isInstanceOf(@, "(Int, Int)"))
13121260 then @
13131261 else throw(($getType(@) + " couldn't be cast to (Int, Int)"))
13141262 }
1315- let totalGet = $t04510245217._1
1316- let feeAmount = $t04510245217._2
1263+ let totalGet = $t04408344198._1
1264+ let feeAmount = $t04408344198._2
13171265 let r = ego("", lpId, lpAssetAmount, this)
13181266 let outAmAmt = r._1
13191267 let outPrAmt = r._2
13471295 let burnLPAssetOnFactory = invoke(fca, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
13481296 if ((burnLPAssetOnFactory == burnLPAssetOnFactory))
13491297 then {
1350- let $t04638346464 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1351- let refreshDLpActions = $t04638346464._1
1352- let updatedDLp = $t04638346464._2
1298+ let $t04536445445 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1299+ let refreshDLpActions = $t04536445445._1
1300+ let updatedDLp = $t04536445445._2
13531301 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
13541302 if ((isUpdatedDLpValid == isUpdatedDLpValid))
13551303 then (state ++ refreshDLpActions)
13941342 let burnA = invoke(fca, "burn", [amount], [AttachedPayment(lpAssetId, amount)])
13951343 if ((burnA == burnA))
13961344 then {
1397- let $t04749147572 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1398- let refreshDLpActions = $t04749147572._1
1399- let updatedDLp = $t04749147572._2
1345+ let $t04647246553 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1346+ let refreshDLpActions = $t04647246553._1
1347+ let updatedDLp = $t04647246553._2
14001348 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
14011349 if ((isUpdatedDLpValid == isUpdatedDLpValid))
14021350 then (state ++ refreshDLpActions)
14471395 let burnLPAssetOnFactory = invoke(fca, "burn", [unstakeAmount], [AttachedPayment(cfgLpAssetId, unstakeAmount)])
14481396 if ((burnLPAssetOnFactory == burnLPAssetOnFactory))
14491397 then {
1450- let $t04882348904 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1451- let refreshDLpActions = $t04882348904._1
1452- let updatedDLp = $t04882348904._2
1398+ let $t04780447885 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1399+ let refreshDLpActions = $t04780447885._1
1400+ let updatedDLp = $t04780447885._2
14531401 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
14541402 if ((isUpdatedDLpValid == isUpdatedDLpValid))
14551403 then (state ++ refreshDLpActions)
14961444 let unstakeInv = invoke(staking, "unstake", [toBase58String(lpAssetId), unstakeAmount], nil)
14971445 if ((unstakeInv == unstakeInv))
14981446 then {
1499- let $t04979949987 = getOneTknV2Internal(outAssetId, minOutAmount, [AttachedPayment(lpAssetId, unstakeAmount)], i.caller, i.originCaller, i.transactionId)
1500- let state = $t04979949987._1
1501- let totalAmount = $t04979949987._2
1447+ let $t04878048968 = getOneTknV2Internal(outAssetId, minOutAmount, [AttachedPayment(lpAssetId, unstakeAmount)], i.caller, i.originCaller, i.transactionId)
1448+ let state = $t04878048968._1
1449+ let totalAmount = $t04878048968._2
15021450 $Tuple2(state, totalAmount)
15031451 }
15041452 else throw("Strict value is not equal to itself.")
15101458
15111459 @Callable(i)
15121460 func putOneTknV2WithBonusREADONLY (paymentAmountRaw,paymentAssetId) = {
1513- let $t05011550218 = calcPutOneTkn(paymentAmountRaw, paymentAssetId, "", "", true)
1514- let lpAmount = $t05011550218._1
1515- let state = $t05011550218._2
1516- let feeAmount = $t05011550218._3
1517- let bonus = $t05011550218._4
1461+ let $t04909649199 = calcPutOneTkn(paymentAmountRaw, paymentAssetId, "", "", true)
1462+ let lpAmount = $t04909649199._1
1463+ let state = $t04909649199._2
1464+ let feeAmount = $t04909649199._3
1465+ let bonus = $t04909649199._4
15181466 $Tuple2(nil, $Tuple3(lpAmount, feeAmount, bonus))
15191467 }
15201468
15221470
15231471 @Callable(i)
15241472 func putOneTknV2WithoutTakeFeeREADONLY (paymentAmountRaw,paymentAssetId) = {
1525- let $t05036650470 = calcPutOneTkn(paymentAmountRaw, paymentAssetId, "", "", false)
1526- let lpAmount = $t05036650470._1
1527- let state = $t05036650470._2
1528- let feeAmount = $t05036650470._3
1529- let bonus = $t05036650470._4
1473+ let $t04934749451 = calcPutOneTkn(paymentAmountRaw, paymentAssetId, "", "", false)
1474+ let lpAmount = $t04934749451._1
1475+ let state = $t04934749451._2
1476+ let feeAmount = $t04934749451._3
1477+ let bonus = $t04934749451._4
15301478 $Tuple2(nil, $Tuple3(lpAmount, feeAmount, bonus))
15311479 }
15321480
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let scale8 = 100000000
55
66 let scale8BigInt = toBigInt(100000000)
77
88 let scale18 = toBigInt(1000000000000000000)
99
1010 let zeroBigInt = toBigInt(0)
1111
1212 let big0 = toBigInt(0)
1313
1414 let big1 = toBigInt(1)
1515
1616 let big2 = toBigInt(2)
1717
1818 let big3 = toBigInt(3)
1919
2020 let big4 = toBigInt(4)
2121
2222 let slippage4D = toBigInt((scale8 - ((scale8 * 1) / scale8)))
2323
2424 let wavesString = "WAVES"
2525
2626 let Amult = "100"
2727
2828 let Dconv = "1"
2929
3030 let SEP = "__"
3131
3232 let EMPTY = ""
3333
3434 let PoolActive = 1
3535
3636 let PoolPutDis = 2
3737
3838 let PoolMatcherDis = 3
3939
4040 let PoolShutdown = 4
4141
4242 let idxPoolAddress = 1
4343
4444 let idxPoolSt = 2
4545
4646 let idxLPAsId = 3
4747
4848 let idxAmAsId = 4
4949
5050 let idxPrAsId = 5
5151
5252 let idxAmtAsDcm = 6
5353
5454 let idxPriceAsDcm = 7
5555
5656 let idxIAmtAsId = 8
5757
5858 let idxIPriceAsId = 9
5959
6060 let idxFactStakCntr = 1
6161
6262 let idxFactoryRestCntr = 6
6363
6464 let idxFactSlippCntr = 7
6565
6666 let idxFactGwxRewCntr = 10
6767
6868 let feeDefault = fraction(10, scale8, 10000)
6969
7070 func t1 (origVal,origScaleMult) = fraction(toBigInt(origVal), scale18, toBigInt(origScaleMult))
71+
72+
73+func t1BigInt (origVal,origScaleMult) = fraction(origVal, scale18, origScaleMult)
7174
7275
7376 func f1 (val,resultScaleMult) = toInt(fraction(val, toBigInt(resultScaleMult), scale18))
7477
7578
7679 func fromX18Round (val,resultScaleMult,round) = toInt(fraction(val, toBigInt(resultScaleMult), scale18, round))
7780
7881
7982 func t2 (origVal,origScaleMult) = fraction(origVal, scale18, toBigInt(origScaleMult))
8083
8184
8285 func f2 (val,resultScaleMult) = fraction(val, toBigInt(resultScaleMult), scale18)
8386
8487
8588 func ts (amt,resScale,curScale) = fraction(amt, resScale, curScale)
8689
8790
8891 func abs (val) = if ((zeroBigInt > val))
8992 then -(val)
9093 else val
9194
9295
9396 func absBigInt (val) = if ((zeroBigInt > val))
9497 then -(val)
9598 else val
9699
97100
98101 func fc () = "%s__factoryContract"
99102
100103
101104 func mpk () = "%s__managerPublicKey"
102105
103106
104107 func pmpk () = "%s__pendingManagerPublicKey"
105108
106109
107110 func pl () = "%s%s__price__last"
108111
109112
110113 func ph (h,t) = makeString(["%s%s%d%d__price__history", toString(h), toString(t)], SEP)
111114
112115
113116 func pau (ua,txId) = ((("%s%s%s__P__" + ua) + "__") + txId)
114117
115118
116119 func gau (ua,txId) = ((("%s%s%s__G__" + ua) + "__") + txId)
117120
118121
119122 func aa () = "%s__amountAsset"
120123
121124
122125 func pa () = "%s__priceAsset"
123126
124127
125128 func amp () = "%s__amp"
126129
127130
128131 func ada () = "%s__addonAddr"
129132
130133
131134 let keyFee = "%s__fee"
132135
133136 let fee = valueOrElse(getInteger(this, keyFee), feeDefault)
134137
135138 let keyDLp = makeString(["%s", "dLp"], SEP)
136139
137140 let keyDLpRefreshedHeight = makeString(["%s", "dLpRefreshedHeight"], SEP)
138141
139142 let keyDLpRefreshDelay = makeString(["%s", "refreshDLpDelay"], SEP)
140143
141144 let dLpRefreshDelayDefault = 1
142145
143146 let dLpRefreshDelay = valueOrElse(getInteger(this, keyDLpRefreshDelay), dLpRefreshDelayDefault)
144147
145148 func fcfg () = "%s__factoryConfig"
146149
147150
148151 func mtpk () = "%s%s__matcher__publicKey"
149152
150153
151154 func pc (iAmtAs,iPrAs) = (((("%d%d%s__" + iAmtAs) + "__") + iPrAs) + "__config")
152155
153156
154157 func mba (bAStr) = ("%s%s%s__mappings__baseAsset2internalId__" + bAStr)
155158
156159
157160 func aps () = "%s__shutdown"
158161
159162
160163 func keyAllowedLpStableScriptHash () = "%s__allowedLpStableScriptHash"
161164
162165
163166 func keyFeeCollectorAddress () = "%s__feeCollectorAddress"
164167
165168
166169 func toe (orV,sendrV,matchV) = throw(((((("Failed: ordValid=" + toString(orV)) + " sndrValid=") + toString(sendrV)) + " mtchrValid=") + toString(matchV)))
167170
168171
169172 func strf (addr,key) = valueOrErrorMessage(getString(addr, key), makeString(["mandatory ", toString(addr), ".", key, " not defined"], ""))
170173
171174
172175 func intf (addr,key) = valueOrErrorMessage(getInteger(addr, key), makeString(["mandatory ", toString(addr), ".", key, " not defined"], ""))
173176
174177
175178 func throwErr (msg) = throw(makeString(["lp_stable.ride:", msg], " "))
176179
177180
178181 func fmtErr (msg) = makeString(["lp_stable.ride:", msg], " ")
179182
180183
181184 let fca = addressFromStringValue(strf(this, fc()))
182185
183186 let inFee = {
184187 let @ = invoke(fca, "getInFeeREADONLY", [toString(this)], nil)
185188 if ($isInstanceOf(@, "Int"))
186189 then @
187190 else throw(($getType(@) + " couldn't be cast to Int"))
188191 }
189192
190193 let outFee = {
191194 let @ = invoke(fca, "getOutFeeREADONLY", [toString(this)], nil)
192195 if ($isInstanceOf(@, "Int"))
193196 then @
194197 else throw(($getType(@) + " couldn't be cast to Int"))
195198 }
196199
197200 let A = strf(this, amp())
198201
199202 func igs () = valueOrElse(getBoolean(fca, aps()), false)
200203
201204
202205 func mp () = fromBase58String(strf(fca, mtpk()))
203206
204207
205208 let feeCollectorAddress = addressFromStringValue(strf(fca, keyFeeCollectorAddress()))
206209
207210 func gpc () = {
208211 let amtAs = strf(this, aa())
209212 let priceAs = strf(this, pa())
210213 let iPriceAs = intf(fca, mba(priceAs))
211214 let iAmtAs = intf(fca, mba(amtAs))
212215 split(strf(fca, pc(toString(iAmtAs), toString(iPriceAs))), SEP)
213216 }
214217
215218
216219 func parseAssetId (input) = if ((input == wavesString))
217220 then unit
218221 else fromBase58String(input)
219222
220223
221224 func assetIdToString (input) = if ((input == unit))
222225 then wavesString
223226 else toBase58String(value(input))
224227
225228
226229 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]))
227230
228231
229232 let poolConfigParsed = parsePoolConfig(gpc())
230233
231-let $t077427971 = poolConfigParsed
234+let $t078478076 = poolConfigParsed
232235
233-let cfgPoolAddress = $t077427971._1
236+let cfgPoolAddress = $t078478076._1
234237
235-let cfgPoolStatus = $t077427971._2
238+let cfgPoolStatus = $t078478076._2
236239
237-let cfgLpAssetId = $t077427971._3
240+let cfgLpAssetId = $t078478076._3
238241
239-let cfgAmountAssetId = $t077427971._4
242+let cfgAmountAssetId = $t078478076._4
240243
241-let cfgPriceAssetId = $t077427971._5
244+let cfgPriceAssetId = $t078478076._5
242245
243-let cfgAmountAssetDecimals = $t077427971._6
246+let cfgAmountAssetDecimals = $t078478076._6
244247
245-let cfgPriceAssetDecimals = $t077427971._7
248+let cfgPriceAssetDecimals = $t078478076._7
246249
247-let cfgInAmountAssedId = $t077427971._8
250+let cfgInAmountAssedId = $t078478076._8
248251
249-let cfgInPriceAssetId = $t077427971._9
252+let cfgInPriceAssetId = $t078478076._9
250253
251254 func gfc () = split(strf(fca, fcfg()), SEP)
252255
253256
254257 let factoryConfig = gfc()
255258
256259 let stakingContract = valueOrErrorMessage(addressFromString(factoryConfig[idxFactStakCntr]), "Invalid staking contract address")
257260
258261 let slipageContract = valueOrErrorMessage(addressFromString(factoryConfig[idxFactSlippCntr]), "Invalid slipage contract address")
259262
260263 let gwxContract = valueOrErrorMessage(addressFromString(factoryConfig[idxFactGwxRewCntr]), "Invalid gwx contract address")
261264
262265 let restContract = valueOrErrorMessage(addressFromString(factoryConfig[idxFactoryRestCntr]), "Invalid gwx contract address")
263266
264267 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)
265268
266269
267270 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)
268271
269272
270273 func getAccBalance (assetId) = if ((assetId == "WAVES"))
271274 then wavesBalance(this).available
272275 else assetBalance(this, fromBase58String(assetId))
273276
274277
275278 func cpbi (prAmtX18,amAmtX18) = fraction(prAmtX18, scale18, amAmtX18)
276279
277280
278281 func cpbir (prAmtX18,amAmtX18,round) = fraction(prAmtX18, scale18, amAmtX18, round)
279282
280283
281284 func vad (A1,A2,slippage) = {
282285 let diff = fraction((A1 - A2), scale8BigInt, A2)
283286 let pass = ((slippage - abs(diff)) > zeroBigInt)
284287 if (!(pass))
285288 then throw(("Big slpg: " + toString(diff)))
286289 else $Tuple2(pass, min([A1, A2]))
287290 }
288291
289292
290293 func vd (D1,D0,slpg) = {
291294 let diff = fraction(D0, scale8BigInt, D1)
292295 let fail = (slpg > diff)
293296 if (if (fail)
294297 then true
295298 else (D0 > D1))
296299 then throw(((((((toString(D0) + " ") + toString(D1)) + " ") + toString(diff)) + " ") + toString(slpg)))
297300 else fail
298301 }
299302
300303
301304 func pcp (amAssetDcm,prAssetDcm,amAmt,prAmt) = {
302305 let amtAsAmtX18 = t1(amAmt, amAssetDcm)
303306 let prAsAmtX18 = t1(prAmt, prAssetDcm)
304307 cpbi(prAsAmtX18, amtAsAmtX18)
305308 }
306309
307310
308311 func calcPrices (amAmt,prAmt,lpAmt) = {
309312 let amtAsDcm = cfgAmountAssetDecimals
310313 let prAsDcm = cfgPriceAssetDecimals
311314 let priceX18 = pcp(amtAsDcm, prAsDcm, amAmt, prAmt)
312315 let amAmtX18 = t1(amAmt, amtAsDcm)
313316 let prAmtX18 = t1(prAmt, prAsDcm)
314317 let lpAmtX18 = t1(lpAmt, scale8)
315318 let lpPrInAmAsX18 = cpbi(amAmtX18, lpAmtX18)
316319 let lpPrInPrAsX18 = cpbi(prAmtX18, lpAmtX18)
317320 [priceX18, lpPrInAmAsX18, lpPrInPrAsX18]
318321 }
319322
320323
321324 func calculatePrices (amAmt,prAmt,lpAmt) = {
322325 let p = calcPrices(amAmt, prAmt, lpAmt)
323326 [f1(p[0], scale8), f1(p[1], scale8), f1(p[2], scale8)]
324327 }
325328
326329
327330 func takeFee (amount,fee) = {
328331 let feeAmount = if ((fee == 0))
329332 then 0
330333 else fraction(amount, fee, scale8)
331334 $Tuple2((amount - feeAmount), feeAmount)
332335 }
333336
334337
335338 func ego (txId58,pmtAssetId,pmtLpAmt,userAddress) = {
336339 let lpId = cfgLpAssetId
337340 let amId = toBase58String(value(cfgAmountAssetId))
338341 let prId = toBase58String(value(cfgPriceAssetId))
339342 let amDcm = cfgAmountAssetDecimals
340343 let prDcm = cfgPriceAssetDecimals
341344 let sts = toString(cfgPoolStatus)
342345 let lpEmiss = valueOrErrorMessage(assetInfo(lpId), "Wrong LP id").quantity
343346 if ((toBase58String(lpId) != pmtAssetId))
344347 then throw("Wrong pmt asset")
345348 else {
346349 let amBalance = getAccBalance(amId)
347350 let amBalanceX18 = t1(amBalance, amDcm)
348351 let prBalance = getAccBalance(prId)
349352 let prBalanceX18 = t1(prBalance, prDcm)
350353 let curPriceX18 = cpbi(prBalanceX18, amBalanceX18)
351354 let curPrice = f1(curPriceX18, scale8)
352355 let pmtLpAmtX18 = t1(pmtLpAmt, scale8)
353356 let lpEmissX18 = t1(lpEmiss, scale8)
354357 let outAmAmtX18 = fraction(amBalanceX18, pmtLpAmtX18, lpEmissX18)
355358 let outPrAmtX18 = fraction(prBalanceX18, pmtLpAmtX18, lpEmissX18)
356359 let outAmAmt = fromX18Round(outAmAmtX18, amDcm, FLOOR)
357360 let outPrAmt = fromX18Round(outPrAmtX18, prDcm, FLOOR)
358361 let state = if ((txId58 == ""))
359362 then nil
360363 else [ScriptTransfer(userAddress, outAmAmt, if ((amId == "WAVES"))
361364 then unit
362365 else fromBase58String(amId)), ScriptTransfer(userAddress, outPrAmt, if ((prId == "WAVES"))
363366 then unit
364367 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)]
365368 $Tuple10(outAmAmt, outPrAmt, amId, prId, amBalance, prBalance, lpEmiss, curPriceX18, sts, state)
366369 }
367370 }
368371
369372
370373 func epo (txId58,slippage,inAmAmt,inAmId,inPrAmt,inPrId,userAddress,isEval,emitLp,isOneAsset,validateSlippage,pmtAmt,pmtId) = {
371374 let lpId = cfgLpAssetId
372375 let amIdStr = toBase58String(value(cfgAmountAssetId))
373376 let prIdStr = toBase58String(value(cfgPriceAssetId))
374377 let inAmIdStr = cfgInAmountAssedId
375378 let inPrIdStr = cfgInPriceAssetId
376379 let amtDcm = cfgAmountAssetDecimals
377380 let priceDcm = cfgPriceAssetDecimals
378381 let sts = toString(cfgPoolStatus)
379382 let lpEm = valueOrErrorMessage(assetInfo(lpId), "Wr lp as").quantity
380383 let amBalance = if (isEval)
381384 then getAccBalance(amIdStr)
382385 else if (if (isOneAsset)
383386 then (pmtId == amIdStr)
384387 else false)
385388 then (getAccBalance(amIdStr) - pmtAmt)
386389 else if (isOneAsset)
387390 then getAccBalance(amIdStr)
388391 else (getAccBalance(amIdStr) - inAmAmt)
389392 let prBalance = if (isEval)
390393 then getAccBalance(prIdStr)
391394 else if (if (isOneAsset)
392395 then (pmtId == prIdStr)
393396 else false)
394397 then (getAccBalance(prIdStr) - pmtAmt)
395398 else if (isOneAsset)
396399 then getAccBalance(prIdStr)
397400 else (getAccBalance(prIdStr) - inPrAmt)
398401 let inAmAssetAmtX18 = t1(inAmAmt, amtDcm)
399402 let inPrAssetAmtX18 = t1(inPrAmt, priceDcm)
400403 let userPriceX18 = cpbi(inPrAssetAmtX18, inAmAssetAmtX18)
401404 let amBalanceX18 = t1(amBalance, amtDcm)
402405 let prBalanceX18 = t1(prBalance, priceDcm)
403406 let r = if ((lpEm == 0))
404407 then {
405408 let curPriceX18 = zeroBigInt
406409 let slippageX18 = zeroBigInt
407410 let lpAmtX18 = pow((inAmAssetAmtX18 * inPrAssetAmtX18), 0, toBigInt(5), 1, 0, DOWN)
408411 $Tuple5(f1(lpAmtX18, scale8), f1(inAmAssetAmtX18, amtDcm), f1(inPrAssetAmtX18, priceDcm), cpbi((prBalanceX18 + inPrAssetAmtX18), (amBalanceX18 + inAmAssetAmtX18)), slippageX18)
409412 }
410413 else {
411414 let curPriceX18 = cpbi(prBalanceX18, amBalanceX18)
412415 let slippageRealX18 = fraction(abs((curPriceX18 - userPriceX18)), scale18, curPriceX18)
413416 let slippageX18 = t1(slippage, scale8)
414417 if (if (if (validateSlippage)
415418 then (curPriceX18 != zeroBigInt)
416419 else false)
417420 then (slippageRealX18 > slippageX18)
418421 else false)
419422 then throw(((("Price slippage " + toString(slippageRealX18)) + " > ") + toString(slippageX18)))
420423 else {
421424 let lpEmissionX18 = t1(lpEm, scale8)
422425 let prViaAmX18 = fraction(inAmAssetAmtX18, cpbir(prBalanceX18, amBalanceX18, CEILING), scale18, CEILING)
423426 let amViaPrX18 = fraction(inPrAssetAmtX18, scale18, cpbir(prBalanceX18, amBalanceX18, FLOOR), CEILING)
424427 let expectedAmts = if ((prViaAmX18 > inPrAssetAmtX18))
425428 then $Tuple2(amViaPrX18, inPrAssetAmtX18)
426429 else $Tuple2(inAmAssetAmtX18, prViaAmX18)
427430 let expAmtAssetAmtX18 = expectedAmts._1
428431 let expPriceAssetAmtX18 = expectedAmts._2
429432 let lpAmtX18 = fraction(lpEmissionX18, expPriceAssetAmtX18, prBalanceX18, FLOOR)
430433 $Tuple5(fromX18Round(lpAmtX18, scale8, FLOOR), fromX18Round(expAmtAssetAmtX18, amtDcm, CEILING), fromX18Round(expPriceAssetAmtX18, priceDcm, CEILING), curPriceX18, slippageX18)
431434 }
432435 }
433436 let calcLpAmt = r._1
434437 let calcAmAssetPmt = r._2
435438 let calcPrAssetPmt = r._3
436439 let curPrice = f1(r._4, scale8)
437440 let slippageCalc = f1(r._5, scale8)
438441 if ((0 >= calcLpAmt))
439442 then throw("LP <= 0")
440443 else {
441444 let emitLpAmt = if (!(emitLp))
442445 then 0
443446 else calcLpAmt
444447 let amDiff = (inAmAmt - calcAmAssetPmt)
445448 let prDiff = (inPrAmt - calcPrAssetPmt)
446- let $t01862118966 = if (if (isOneAsset)
449+ let $t01872619071 = if (if (isOneAsset)
447450 then (pmtId == amIdStr)
448451 else false)
449452 then $Tuple2(pmtAmt, 0)
450453 else if (if (isOneAsset)
451454 then (pmtId == prIdStr)
452455 else false)
453456 then $Tuple2(0, pmtAmt)
454457 else $Tuple2(calcAmAssetPmt, calcPrAssetPmt)
455- let writeAmAmt = $t01862118966._1
456- let writePrAmt = $t01862118966._2
458+ let writeAmAmt = $t01872619071._1
459+ let writePrAmt = $t01872619071._2
457460 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))]
458461 $Tuple13(calcLpAmt, emitLpAmt, curPrice, amBalance, prBalance, lpEm, lpId, sts, commonState, amDiff, prDiff, inAmId, inPrId)
459462 }
460463 }
461464
462465
463466 func getD (xp) = {
464467 let xp0 = xp[0]
465468 let xp1 = xp[1]
466469 let s = (xp0 + xp1)
467470 if ((s == big0))
468471 then big0
469472 else {
470473 let a = parseIntValue(A)
471474 let ann = (a * 2)
472475 let p = fraction(xp0, xp1, big1)
473476 let xp0_xp1_n_n = fraction(p, big4, big1)
474477 let ann_s = fraction(toBigInt(ann), s, big1)
475478 let ann_1 = toBigInt((ann - 1))
476479 func calcDNext (d) = {
477480 let dd = fraction(d, d, big1)
478481 let ddd = fraction(dd, d, big1)
479482 let dp = fraction(ddd, big1, xp0_xp1_n_n)
480- fraction((ann_s + fraction(dp, big2, big1)), d, (fraction(ann_1, d, big1) + fraction(big3, dp, big1)), CEILING)
483+ fraction((ann_s + fraction(dp, big2, big1)), d, (fraction(ann_1, d, big1) + fraction(big3, dp, big1)))
481484 }
482485
483486 func calc (acc,i) = if (acc._2)
484487 then acc
485488 else {
486489 let d = acc._1
487490 let dNext = calcDNext(d)
488491 let dDiffRaw = (dNext - value(d))
489492 let dDiff = if ((big0 > dDiffRaw))
490493 then -(dDiffRaw)
491494 else dDiffRaw
492495 if ((big1 >= dDiff))
493496 then $Tuple2(dNext, true)
494497 else $Tuple2(dNext, false)
495498 }
496499
497500 let arr = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
498- let $t02089020938 = {
501+ let $t02097821026 = {
499502 let $l = arr
500503 let $s = size($l)
501504 let $acc0 = $Tuple2(s, false)
502505 func $f0_1 ($a,$i) = if (($i >= $s))
503506 then $a
504507 else calc($a, $l[$i])
505508
506509 func $f0_2 ($a,$i) = if (($i >= $s))
507510 then $a
508511 else throw("List size exceeds 15")
509512
510513 $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)
511514 }
512- let d = $t02089020938._1
513- let found = $t02089020938._2
515+ let d = $t02097821026._1
516+ let found = $t02097821026._2
514517 if (found)
515- then d
516- else throw(("D calculation error, D = " + toString(d)))
517- }
518- }
519-
520-
521-func getDOld (xp) = {
522- let n = big2
523- let xp0 = xp[0]
524- let xp1 = xp[1]
525- let aPrecision = parseBigIntValue(Amult)
526- let a = (parseBigIntValue(A) * aPrecision)
527- let s = (xp0 + xp1)
528- if ((s == big0))
529- then big0
530- else {
531- let ann = (a * n)
532- let xp0_xp1_n_n = (((xp0 * xp1) * n) * n)
533- let ann_s_aPrecision = ((ann * s) / aPrecision)
534- let ann_aPrecision = (ann - aPrecision)
535- let n1 = (n + big1)
536- func calc (acc,cur) = {
537- let $t02156721587 = acc
538- let d = $t02156721587._1
539- let found = $t02156721587._2
540- if ((found != unit))
541- then acc
542- else {
543- let dp = (((d * d) * d) / xp0_xp1_n_n)
544- let dNext = (((ann_s_aPrecision + (dp * n)) * d) / (((ann_aPrecision * d) / aPrecision) + (n1 * dp)))
545- let dDiff = absBigInt((dNext - value(d)))
546- if ((big1 >= dDiff))
547- then $Tuple2(dNext, cur)
548- else $Tuple2(dNext, unit)
549- }
550- }
551-
552- let arr = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
553- let $t02200822055 = {
554- let $l = arr
555- let $s = size($l)
556- let $acc0 = $Tuple2(s, unit)
557- func $f0_1 ($a,$i) = if (($i >= $s))
558- then $a
559- else calc($a, $l[$i])
560-
561- func $f0_2 ($a,$i) = if (($i >= $s))
562- then $a
563- else throw("List size exceeds 15")
564-
565- $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)
566- }
567- let d = $t02200822055._1
568- let found = $t02200822055._2
569- if ((found != unit))
570518 then d
571519 else throw(("D calculation error, D = " + toString(d)))
572520 }
573521 }
574522
575523
576524 func getYD (xp,i,D) = {
577525 let n = big2
578526 let x = xp[if ((i == 0))
579527 then 1
580528 else 0]
581529 let aPrecision = parseBigIntValue(Amult)
582530 let a = (parseBigIntValue(A) * aPrecision)
583531 let s = x
584532 let ann = (a * n)
585533 let c = (((((D * D) / (x * n)) * D) * aPrecision) / (ann * n))
586534 let b = ((s + ((D * aPrecision) / ann)) - D)
587535 func calc (acc,cur) = {
588- let $t02255522575 = acc
589- let y = $t02255522575._1
590- let found = $t02255522575._2
536+ let $t02151821538 = acc
537+ let y = $t02151821538._1
538+ let found = $t02151821538._2
591539 if ((found != unit))
592540 then acc
593541 else {
594542 let yNext = (((y * y) + c) / ((big2 * y) + b))
595543 let yDiff = absBigInt((yNext - value(y)))
596544 if ((big1 >= yDiff))
597545 then $Tuple2(yNext, cur)
598546 else $Tuple2(yNext, unit)
599547 }
600548 }
601549
602550 let arr = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
603- let $t02288222929 = {
551+ let $t02184521892 = {
604552 let $l = arr
605553 let $s = size($l)
606554 let $acc0 = $Tuple2(D, unit)
607555 func $f0_1 ($a,$i) = if (($i >= $s))
608556 then $a
609557 else calc($a, $l[$i])
610558
611559 func $f0_2 ($a,$i) = if (($i >= $s))
612560 then $a
613561 else throw("List size exceeds 15")
614562
615563 $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)
616564 }
617- let y = $t02288222929._1
618- let found = $t02288222929._2
565+ let y = $t02184521892._1
566+ let found = $t02184521892._2
619567 if ((found != unit))
620568 then y
621569 else throw(("Y calculation error, Y = " + toString(y)))
622570 }
623571
624572
625573 func calcDLp (amountBalance,priceBalance,lpEmission) = {
626- let updatedDLp = fraction(getD([t1(toInt(amountBalance), cfgAmountAssetDecimals), t1(toInt(priceBalance), cfgPriceAssetDecimals)]), big1, lpEmission)
574+ let updatedDLp = fraction(getD([t1BigInt(amountBalance, toBigInt(cfgAmountAssetDecimals)), t1BigInt(priceBalance, toBigInt(cfgPriceAssetDecimals))]), big1, lpEmission)
627575 if ((lpEmission == big0))
628576 then big0
629577 else updatedDLp
630578 }
631579
632580
633581 func calcCurrentDLp (amountAssetDelta,priceAssetDelta,lpAssetEmissionDelta) = {
634582 let amountAssetBalance = (toBigInt(getAccBalance(assetIdToString(cfgAmountAssetId))) - amountAssetDelta)
635583 let priceAssetBalance = (toBigInt(getAccBalance(assetIdToString(cfgPriceAssetId))) - priceAssetDelta)
636584 let lpAssetEmission = (toBigInt(value(assetInfo(cfgLpAssetId)).quantity) - lpAssetEmissionDelta)
637585 let currentDLp = calcDLp(amountAssetBalance, priceAssetBalance, lpAssetEmission)
638586 currentDLp
639587 }
640588
641589
642590 func refreshDLpInternal (amountAssetBalanceDelta,priceAssetBalanceDelta,lpAssetEmissionDelta) = {
643591 let amountAssetBalance = (getAccBalance(assetIdToString(cfgAmountAssetId)) + amountAssetBalanceDelta)
644592 let priceAssetBalance = (getAccBalance(assetIdToString(cfgPriceAssetId)) + priceAssetBalanceDelta)
645593 let lpAssetEmission = (value(assetInfo(cfgLpAssetId)).quantity + lpAssetEmissionDelta)
646594 let updatedDLp = calcDLp(toBigInt(amountAssetBalance), toBigInt(priceAssetBalance), toBigInt(lpAssetEmission))
647595 let actions = [IntegerEntry(keyDLpRefreshedHeight, height), StringEntry(keyDLp, toString(updatedDLp))]
648596 $Tuple2(actions, updatedDLp)
649597 }
650598
651599
652600 func validateUpdatedDLp (oldDLp,updatedDLp) = if ((updatedDLp >= oldDLp))
653601 then true
654602 else throwErr("updated DLp lower than current DLp")
655603
656604
657605 func validateMatcherOrderAllowed (order) = {
658606 let amountAssetAmount = order.amount
659607 let priceAssetAmount = fraction(order.amount, order.price, scale8, FLOOR)
660- let $t02495225164 = if ((order.orderType == Buy))
608+ let $t02393324145 = if ((order.orderType == Buy))
661609 then $Tuple2(amountAssetAmount, -(priceAssetAmount))
662610 else $Tuple2(-(amountAssetAmount), priceAssetAmount)
663- let amountAssetBalanceDelta = $t02495225164._1
664- let priceAssetBalanceDelta = $t02495225164._2
611+ let amountAssetBalanceDelta = $t02393324145._1
612+ let priceAssetBalanceDelta = $t02393324145._2
665613 if (if (if (igs())
666614 then true
667615 else (cfgPoolStatus == PoolMatcherDis))
668616 then true
669617 else (cfgPoolStatus == PoolShutdown))
670618 then throw("Admin blocked")
671619 else if (if ((order.assetPair.amountAsset != cfgAmountAssetId))
672620 then true
673621 else (order.assetPair.priceAsset != cfgPriceAssetId))
674622 then throw("Wr assets")
675623 else {
676624 let dLp = parseBigIntValue(getStringValue(this, keyDLp))
677- let $t02549425594 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
678- let unusedActions = $t02549425594._1
679- let dLpNew = $t02549425594._2
625+ let $t02447524575 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
626+ let unusedActions = $t02447524575._1
627+ let dLpNew = $t02447524575._2
680628 let isOrderValid = (dLpNew >= dLp)
681629 isOrderValid
682630 }
683631 }
684632
685633
686634 func cg (i) = if ((size(i.payments) != 1))
687635 then throw("1 pmnt exp")
688636 else {
689637 let pmt = value(i.payments[0])
690638 let pmtAssetId = value(pmt.assetId)
691639 let pmtAmt = pmt.amount
692640 let r = ego(toBase58String(i.transactionId), toBase58String(pmtAssetId), pmtAmt, i.caller)
693641 let outAmAmt = r._1
694642 let outPrAmt = r._2
695643 let sts = parseIntValue(r._9)
696644 let state = r._10
697645 if (if (igs())
698646 then true
699647 else (sts == PoolShutdown))
700648 then throw(("Admin blocked: " + toString(sts)))
701649 else $Tuple5(outAmAmt, outPrAmt, pmtAmt, pmtAssetId, state)
702650 }
703651
704652
705653 func cp (caller,txId,amAsPmt,prAsPmt,slippage,emitLp,isOneAsset,validateSlippage,pmtAmt,pmtId) = {
706654 let r = epo(txId, slippage, value(amAsPmt).amount, value(amAsPmt).assetId, value(prAsPmt).amount, value(prAsPmt).assetId, caller, (txId == ""), emitLp, isOneAsset, validateSlippage, pmtAmt, pmtId)
707655 let sts = parseIntValue(r._8)
708656 if (if (if (igs())
709657 then true
710658 else (sts == PoolPutDis))
711659 then true
712660 else (sts == PoolShutdown))
713661 then throw(("Blocked:" + toString(sts)))
714662 else r
715663 }
716664
717665
718666 func calcPutOneTkn (pmtAmtRaw,pmtAssetId,userAddress,txId,withTakeFee) = {
719667 let amId = toBase58String(value(cfgAmountAssetId))
720668 let prId = toBase58String(value(cfgPriceAssetId))
721669 let lpId = cfgLpAssetId
722670 let amtDcm = cfgAmountAssetDecimals
723671 let priceDcm = cfgPriceAssetDecimals
724672 let lpAssetEmission = toBigInt(valueOrErrorMessage(assetInfo(lpId), "invalid lp asset").quantity)
725673 let chechEmission = if ((lpAssetEmission > big0))
726674 then true
727675 else throw("initial deposit requires all coins")
728676 if ((chechEmission == chechEmission))
729677 then {
730678 let amBalance = getAccBalance(amId)
731679 let prBalance = getAccBalance(prId)
732- let $t02786028322 = if ((txId == ""))
680+ let $t02684127303 = if ((txId == ""))
733681 then $Tuple2(amBalance, prBalance)
734682 else if ((pmtAssetId == amId))
735683 then if ((pmtAmtRaw > amBalance))
736684 then throw("invalid payment amount")
737685 else $Tuple2((amBalance - pmtAmtRaw), prBalance)
738686 else if ((pmtAssetId == prId))
739687 then if ((pmtAmtRaw > prBalance))
740688 then throw("invalid payment amount")
741689 else $Tuple2(amBalance, (prBalance - pmtAmtRaw))
742690 else throw("wrong pmtAssetId")
743- let amBalanceOld = $t02786028322._1
744- let prBalanceOld = $t02786028322._2
745- let $t02832828504 = if ((pmtAssetId == amId))
691+ let amBalanceOld = $t02684127303._1
692+ let prBalanceOld = $t02684127303._2
693+ let $t02730927485 = if ((pmtAssetId == amId))
746694 then $Tuple2(pmtAmtRaw, 0)
747695 else if ((pmtAssetId == prId))
748696 then $Tuple2(0, pmtAmtRaw)
749697 else throw("invalid payment")
750- let amAmountRaw = $t02832828504._1
751- let prAmountRaw = $t02832828504._2
752- let $t02850828762 = if (withTakeFee)
698+ let amAmountRaw = $t02730927485._1
699+ let prAmountRaw = $t02730927485._2
700+ let $t02748927743 = if (withTakeFee)
753701 then $Tuple3(takeFee(amAmountRaw, inFee)._1, takeFee(prAmountRaw, inFee)._1, takeFee(pmtAmtRaw, inFee)._2)
754702 else $Tuple3(amAmountRaw, prAmountRaw, 0)
755- let amAmount = $t02850828762._1
756- let prAmount = $t02850828762._2
757- let feeAmount = $t02850828762._3
703+ let amAmount = $t02748927743._1
704+ let prAmount = $t02748927743._2
705+ let feeAmount = $t02748927743._3
758706 let amBalanceNew = (amBalanceOld + amAmount)
759707 let prBalanceNew = (prBalanceOld + prAmount)
760708 let D0 = getD([toBigInt(amBalanceOld), toBigInt(prBalanceOld)])
761709 let D1 = getD([toBigInt(amBalanceNew), toBigInt(prBalanceNew)])
762710 let checkD = if ((D1 > D0))
763711 then true
764712 else throw()
765713 if ((checkD == checkD))
766714 then {
767715 let lpAmount = fraction(lpAssetEmission, (D1 - D0), D0, FLOOR)
768716 let curPrice = f1(cpbi(t1(prBalanceNew, priceDcm), t1(amBalanceNew, amtDcm)), scale8)
769717 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))]
770718 let poolProportion = fraction(prBalanceOld, scale8, amBalanceOld)
771719 let amountAssetPart = fraction(pmtAmtRaw, scale8, (poolProportion + scale8))
772720 let priceAssetPart = (pmtAmtRaw - amountAssetPart)
773721 let lpAmtBoth = fraction(lpAssetEmission, toBigInt(priceAssetPart), toBigInt(prBalanceOld))
774722 let bonus = toInt(fraction((lpAmount - lpAmtBoth), scale8BigInt, lpAmtBoth))
775723 $Tuple4(toInt(lpAmount), commonState, feeAmount, bonus)
776724 }
777725 else throw("Strict value is not equal to itself.")
778726 }
779727 else throw("Strict value is not equal to itself.")
780728 }
781729
782730
783731 func getOneTknV2Internal (outAssetId,minOutAmount,payments,caller,originCaller,transactionId) = {
784732 let lpId = toBase58String(value(cfgLpAssetId))
785733 let amId = toBase58String(value(cfgAmountAssetId))
786734 let prId = toBase58String(value(cfgPriceAssetId))
787735 let amDecimals = cfgAmountAssetDecimals
788736 let prDecimals = cfgPriceAssetDecimals
789737 let poolStatus = cfgPoolStatus
790738 let userAddress = if ((caller == restContract))
791739 then originCaller
792740 else caller
793741 let pmt = value(payments[0])
794742 let pmtAssetId = value(pmt.assetId)
795743 let pmtAmt = pmt.amount
796744 let currentDLp = calcCurrentDLp(big0, big0, big0)
797745 if ((currentDLp == currentDLp))
798746 then {
799747 let txId58 = toBase58String(transactionId)
800748 if ((lpId != toBase58String(pmtAssetId)))
801749 then throw("Wrong LP")
802750 else {
803751 let amBalance = getAccBalance(amId)
804752 let prBalance = getAccBalance(prId)
805- let $t03081230923 = {
753+ let $t02979329904 = {
806754 let @ = invoke(this, "getOneTknV2READONLY", [outAssetId, pmtAmt], nil)
807755 if ($isInstanceOf(@, "(Int, Int)"))
808756 then @
809757 else throw(($getType(@) + " couldn't be cast to (Int, Int)"))
810758 }
811- if (($t03081230923 == $t03081230923))
759+ if (($t02979329904 == $t02979329904))
812760 then {
813- let feeAmount = $t03081230923._2
814- let totalGet = $t03081230923._1
761+ let feeAmount = $t02979329904._2
762+ let totalGet = $t02979329904._1
815763 let totalAmount = if (if ((minOutAmount > 0))
816764 then (minOutAmount > totalGet)
817765 else false)
818766 then throwErr(makeString(["amount to receive is less than ", toString(minOutAmount)], ""))
819767 else totalGet
820- let $t03111331420 = if ((outAssetId == amId))
768+ let $t03009430401 = if ((outAssetId == amId))
821769 then $Tuple4(totalAmount, 0, ((amBalance - totalAmount) - feeAmount), prBalance)
822770 else if ((outAssetId == prId))
823771 then $Tuple4(0, totalAmount, amBalance, ((prBalance - totalAmount) - feeAmount))
824772 else throw("invalid out asset id")
825- let outAm = $t03111331420._1
826- let outPr = $t03111331420._2
827- let amBalanceNew = $t03111331420._3
828- let prBalanceNew = $t03111331420._4
773+ let outAm = $t03009430401._1
774+ let outPr = $t03009430401._2
775+ let amBalanceNew = $t03009430401._3
776+ let prBalanceNew = $t03009430401._4
829777 let curPrX18 = cpbi(t1(prBalanceNew, prDecimals), t1(amBalanceNew, amDecimals))
830778 let curPr = f1(curPrX18, scale8)
831779 let outAssetIdOrWaves = if ((outAssetId == "WAVES"))
832780 then unit
833781 else fromBase58String(outAssetId)
834782 let sendFeeToMatcher = if ((feeAmount > 0))
835783 then [ScriptTransfer(feeCollectorAddress, feeAmount, outAssetIdOrWaves)]
836784 else nil
837785 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)
838786 if ((state == state))
839787 then {
840788 let burn = invoke(fca, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
841789 if ((burn == burn))
842790 then {
843- let $t03220532555 = {
791+ let $t03118631536 = {
844792 let feeAmountForCalc = if ((this == feeCollectorAddress))
845793 then 0
846794 else feeAmount
847795 let outInAmountAsset = if ((parseAssetId(outAssetId) == cfgAmountAssetId))
848796 then true
849797 else false
850798 if (outInAmountAsset)
851799 then $Tuple2(-((totalGet + feeAmountForCalc)), 0)
852800 else $Tuple2(0, -((totalGet + feeAmountForCalc)))
853801 }
854- let amountAssetBalanceDelta = $t03220532555._1
855- let priceAssetBalanceDelta = $t03220532555._2
856- let $t03255832666 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
857- let refreshDLpActions = $t03255832666._1
858- let updatedDLp = $t03255832666._2
802+ let amountAssetBalanceDelta = $t03118631536._1
803+ let priceAssetBalanceDelta = $t03118631536._2
804+ let $t03153931647 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
805+ let refreshDLpActions = $t03153931647._1
806+ let updatedDLp = $t03153931647._2
859807 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
860808 if ((isUpdatedDLpValid == isUpdatedDLpValid))
861809 then $Tuple2((state ++ refreshDLpActions), totalAmount)
862810 else throw("Strict value is not equal to itself.")
863811 }
864812 else throw("Strict value is not equal to itself.")
865813 }
866814 else throw("Strict value is not equal to itself.")
867815 }
868816 else throw("Strict value is not equal to itself.")
869817 }
870818 }
871819 else throw("Strict value is not equal to itself.")
872820 }
873821
874822
875823 func m () = match getString(mpk()) {
876824 case s: String =>
877825 fromBase58String(s)
878826 case _: Unit =>
879827 unit
880828 case _ =>
881829 throw("Match error")
882830 }
883831
884832
885833 func pm () = match getString(pmpk()) {
886834 case s: String =>
887835 fromBase58String(s)
888836 case _: Unit =>
889837 unit
890838 case _ =>
891839 throw("Match error")
892840 }
893841
894842
895843 let pd = throw("Permission denied")
896844
897845 func isManager (i) = match m() {
898846 case pk: ByteVector =>
899847 (i.callerPublicKey == pk)
900848 case _: Unit =>
901849 (i.caller == this)
902850 case _ =>
903851 throw("Match error")
904852 }
905853
906854
907855 func mm (i) = match m() {
908856 case pk: ByteVector =>
909857 if ((i.callerPublicKey == pk))
910858 then true
911859 else pd
912860 case _: Unit =>
913861 if ((i.caller == this))
914862 then true
915863 else pd
916864 case _ =>
917865 throw("Match error")
918866 }
919867
920868
921869 @Callable(i)
922870 func constructor (fc) = {
923871 let c = mm(i)
924872 if ((c == c))
925873 then [StringEntry(fc(), fc)]
926874 else throw("Strict value is not equal to itself.")
927875 }
928876
929877
930878
931879 @Callable(i)
932880 func setManager (pendingManagerPublicKey) = {
933881 let c = mm(i)
934882 if ((c == c))
935883 then {
936884 let cm = fromBase58String(pendingManagerPublicKey)
937885 if ((cm == cm))
938886 then [StringEntry(pmpk(), pendingManagerPublicKey)]
939887 else throw("Strict value is not equal to itself.")
940888 }
941889 else throw("Strict value is not equal to itself.")
942890 }
943891
944892
945893
946894 @Callable(i)
947895 func confirmManager () = {
948896 let p = pm()
949897 let hpm = if (isDefined(p))
950898 then true
951899 else throw("No pending manager")
952900 if ((hpm == hpm))
953901 then {
954902 let cpm = if ((i.callerPublicKey == value(p)))
955903 then true
956904 else throw("You are not pending manager")
957905 if ((cpm == cpm))
958906 then [StringEntry(mpk(), toBase58String(value(p))), DeleteEntry(pmpk())]
959907 else throw("Strict value is not equal to itself.")
960908 }
961909 else throw("Strict value is not equal to itself.")
962910 }
963911
964912
965913
966914 @Callable(i)
967915 func put (slip,autoStake) = {
968916 let factCfg = gfc()
969917 let stakingCntr = valueOrErrorMessage(addressFromString(factCfg[idxFactStakCntr]), "Wr st addr")
970918 let slipCntr = valueOrErrorMessage(addressFromString(factCfg[idxFactSlippCntr]), "Wr sl addr")
971919 if ((0 > slip))
972920 then throw("Wrong slippage")
973921 else if ((size(i.payments) != 2))
974922 then throw("2 pmnts expd")
975923 else {
976924 let amAssetPmt = toBigInt(value(i.payments[0]).amount)
977925 let prAssetPmt = toBigInt(value(i.payments[1]).amount)
978926 let amountAssetBalance = (toBigInt(getAccBalance(assetIdToString(cfgAmountAssetId))) - amAssetPmt)
979927 if ((amountAssetBalance == amountAssetBalance))
980928 then {
981929 let priceAssetBalance = (toBigInt(getAccBalance(assetIdToString(cfgPriceAssetId))) - prAssetPmt)
982930 if ((priceAssetBalance == priceAssetBalance))
983931 then {
984932 let lpAssetEmission = toBigInt(value(assetInfo(cfgLpAssetId)).quantity)
985933 if ((lpAssetEmission == lpAssetEmission))
986934 then {
987935 let currentDLp = calcCurrentDLp(amAssetPmt, prAssetPmt, toBigInt(0))
988936 if ((currentDLp == currentDLp))
989937 then {
990938 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, "")
991939 let emitLpAmt = e._2
992940 let lpAssetId = e._7
993941 let state = e._9
994942 let amDiff = e._10
995943 let prDiff = e._11
996944 let amId = e._12
997945 let prId = e._13
998946 let r = invoke(fca, "emit", [emitLpAmt], nil)
999947 if ((r == r))
1000948 then {
1001949 let el = match r {
1002950 case legacy: Address =>
1003951 invoke(legacy, "emit", [emitLpAmt], nil)
1004952 case _ =>
1005953 unit
1006954 }
1007955 if ((el == el))
1008956 then {
1009957 let sa = if ((amDiff > 0))
1010958 then invoke(slipCntr, "put", nil, [AttachedPayment(amId, amDiff)])
1011959 else nil
1012960 if ((sa == sa))
1013961 then {
1014962 let sp = if ((prDiff > 0))
1015963 then invoke(slipCntr, "put", nil, [AttachedPayment(prId, prDiff)])
1016964 else nil
1017965 if ((sp == sp))
1018966 then {
1019967 let lpTrnsfr = if (autoStake)
1020968 then {
1021969 let ss = invoke(stakingCntr, "stake", nil, [AttachedPayment(lpAssetId, emitLpAmt)])
1022970 if ((ss == ss))
1023971 then nil
1024972 else throw("Strict value is not equal to itself.")
1025973 }
1026974 else [ScriptTransfer(i.caller, emitLpAmt, lpAssetId)]
1027- let $t03681536957 = refreshDLpInternal(0, 0, 0)
1028- let refreshDLpActions = $t03681536957._1
1029- let updatedDLp = $t03681536957._2
975+ let $t03579635938 = refreshDLpInternal(0, 0, 0)
976+ let refreshDLpActions = $t03579635938._1
977+ let updatedDLp = $t03579635938._2
1030978 let check = if ((updatedDLp >= currentDLp))
1031979 then true
1032980 else throwErr(makeString(["updated DLp lower than current DLp", toString(amountAssetBalance), toString(priceAssetBalance), toString(lpAssetEmission), toString(currentDLp), toString(updatedDLp), toString(amDiff), toString(prDiff)], " "))
1033981 if ((check == check))
1034982 then {
1035983 let lpAssetEmissionAfter = value(assetInfo(cfgLpAssetId)).quantity
1036984 if ((lpAssetEmissionAfter == lpAssetEmissionAfter))
1037985 then ((state ++ lpTrnsfr) ++ refreshDLpActions)
1038986 else throw("Strict value is not equal to itself.")
1039987 }
1040988 else throw("Strict value is not equal to itself.")
1041989 }
1042990 else throw("Strict value is not equal to itself.")
1043991 }
1044992 else throw("Strict value is not equal to itself.")
1045993 }
1046994 else throw("Strict value is not equal to itself.")
1047995 }
1048996 else throw("Strict value is not equal to itself.")
1049997 }
1050998 else throw("Strict value is not equal to itself.")
1051999 }
10521000 else throw("Strict value is not equal to itself.")
10531001 }
10541002 else throw("Strict value is not equal to itself.")
10551003 }
10561004 else throw("Strict value is not equal to itself.")
10571005 }
10581006 }
10591007
10601008
10611009
10621010 @Callable(i)
10631011 func putOneTknV2 (minOutAmount,autoStake) = {
10641012 let isPoolOneTokenOperationsDisabled = {
10651013 let @ = invoke(fca, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
10661014 if ($isInstanceOf(@, "Boolean"))
10671015 then @
10681016 else throw(($getType(@) + " couldn't be cast to Boolean"))
10691017 }
10701018 let isPutDisabled = if (if (if (igs())
10711019 then true
10721020 else (cfgPoolStatus == PoolPutDis))
10731021 then true
10741022 else (cfgPoolStatus == PoolShutdown))
10751023 then true
10761024 else isPoolOneTokenOperationsDisabled
10771025 let checks = [if (if (!(isPutDisabled))
10781026 then true
10791027 else isManager(i))
10801028 then true
10811029 else throwErr("put operation is blocked by admin"), if ((size(i.payments) == 1))
10821030 then true
10831031 else throwErr("exactly 1 payment are expected")]
10841032 if ((checks == checks))
10851033 then {
10861034 let amId = toBase58String(value(cfgAmountAssetId))
10871035 let prId = toBase58String(value(cfgPriceAssetId))
10881036 let lpId = cfgLpAssetId
10891037 let amDecimals = cfgAmountAssetDecimals
10901038 let prDecimals = cfgPriceAssetDecimals
10911039 let userAddress = if ((i.caller == this))
10921040 then i.originCaller
10931041 else i.caller
10941042 let pmt = value(i.payments[0])
10951043 let pmtAssetId = toBase58String(value(pmt.assetId))
10961044 let pmtAmt = pmt.amount
10971045 let currentDLp = if ((pmt.assetId == cfgAmountAssetId))
10981046 then calcCurrentDLp(toBigInt(pmtAmt), toBigInt(0), toBigInt(0))
10991047 else calcCurrentDLp(toBigInt(0), toBigInt(pmtAmt), toBigInt(0))
11001048 if ((currentDLp == currentDLp))
11011049 then {
1102- let $t03859838756 = calcPutOneTkn(pmtAmt, pmtAssetId, toString(userAddress), toBase58String(i.transactionId), true)
1103- if (($t03859838756 == $t03859838756))
1050+ let $t03757937737 = calcPutOneTkn(pmtAmt, pmtAssetId, toString(userAddress), toBase58String(i.transactionId), true)
1051+ if (($t03757937737 == $t03757937737))
11041052 then {
1105- let feeAmount = $t03859838756._3
1106- let state = $t03859838756._2
1107- let estimLP = $t03859838756._1
1053+ let feeAmount = $t03757937737._3
1054+ let state = $t03757937737._2
1055+ let estimLP = $t03757937737._1
11081056 let emitLpAmt = if (if ((minOutAmount > 0))
11091057 then (minOutAmount > estimLP)
11101058 else false)
11111059 then throwErr(makeString(["amount to receive is less than ", toString(minOutAmount)], ""))
11121060 else estimLP
11131061 let e = invoke(fca, "emit", [emitLpAmt], nil)
11141062 if ((e == e))
11151063 then {
11161064 let el = match e {
11171065 case legacy: Address =>
11181066 invoke(legacy, "emit", [emitLpAmt], nil)
11191067 case _ =>
11201068 unit
11211069 }
11221070 if ((el == el))
11231071 then {
11241072 let lpTrnsfr = if (autoStake)
11251073 then {
11261074 let ss = invoke(stakingContract, "stake", nil, [AttachedPayment(lpId, emitLpAmt)])
11271075 if ((ss == ss))
11281076 then nil
11291077 else throw("Strict value is not equal to itself.")
11301078 }
11311079 else [ScriptTransfer(i.caller, emitLpAmt, lpId)]
11321080 let sendFeeToMatcher = if ((feeAmount > 0))
11331081 then [ScriptTransfer(feeCollectorAddress, feeAmount, fromBase58String(pmtAssetId))]
11341082 else nil
1135- let $t03957139920 = if ((this == feeCollectorAddress))
1083+ let $t03855238901 = if ((this == feeCollectorAddress))
11361084 then $Tuple2(0, 0)
11371085 else {
11381086 let paymentInAmountAsset = if ((pmt.assetId == cfgAmountAssetId))
11391087 then true
11401088 else false
11411089 if (paymentInAmountAsset)
11421090 then $Tuple2(-(feeAmount), 0)
11431091 else $Tuple2(0, -(feeAmount))
11441092 }
1145- let amountAssetBalanceDelta = $t03957139920._1
1146- let priceAssetBalanceDelta = $t03957139920._2
1147- let $t03992340031 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
1148- let refreshDLpActions = $t03992340031._1
1149- let updatedDLp = $t03992340031._2
1093+ let amountAssetBalanceDelta = $t03855238901._1
1094+ let priceAssetBalanceDelta = $t03855238901._2
1095+ let $t03890439012 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
1096+ let refreshDLpActions = $t03890439012._1
1097+ let updatedDLp = $t03890439012._2
11501098 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
11511099 if ((isUpdatedDLpValid == isUpdatedDLpValid))
11521100 then $Tuple2((((state ++ lpTrnsfr) ++ sendFeeToMatcher) ++ refreshDLpActions), emitLpAmt)
11531101 else throw("Strict value is not equal to itself.")
11541102 }
11551103 else throw("Strict value is not equal to itself.")
11561104 }
11571105 else throw("Strict value is not equal to itself.")
11581106 }
11591107 else throw("Strict value is not equal to itself.")
11601108 }
11611109 else throw("Strict value is not equal to itself.")
11621110 }
11631111 else throw("Strict value is not equal to itself.")
11641112 }
11651113
11661114
11671115
11681116 @Callable(i)
11691117 func putForFree (maxSlpg) = if ((0 > maxSlpg))
11701118 then throw("Wrong slpg")
11711119 else if ((size(i.payments) != 2))
11721120 then throw("2 pmnts expd")
11731121 else {
11741122 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, "")
11751123 let state = estPut._9
11761124 let amAssetPmt = toBigInt(value(i.payments[0]).amount)
11771125 let prAssetPmt = toBigInt(value(i.payments[1]).amount)
11781126 let currentDLp = calcCurrentDLp(amAssetPmt, prAssetPmt, toBigInt(0))
11791127 if ((currentDLp == currentDLp))
11801128 then {
1181- let $t04106141126 = refreshDLpInternal(0, 0, 0)
1182- let refreshDLpActions = $t04106141126._1
1183- let updatedDLp = $t04106141126._2
1129+ let $t04004240107 = refreshDLpInternal(0, 0, 0)
1130+ let refreshDLpActions = $t04004240107._1
1131+ let updatedDLp = $t04004240107._2
11841132 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
11851133 if ((isUpdatedDLpValid == isUpdatedDLpValid))
11861134 then (state ++ refreshDLpActions)
11871135 else throw("Strict value is not equal to itself.")
11881136 }
11891137 else throw("Strict value is not equal to itself.")
11901138 }
11911139
11921140
11931141
11941142 @Callable(i)
11951143 func get () = {
11961144 let currentDLp = calcCurrentDLp(toBigInt(0), toBigInt(0), toBigInt(0))
11971145 if ((currentDLp == currentDLp))
11981146 then {
11991147 let r = cg(i)
12001148 let outAmtAmt = r._1
12011149 let outPrAmt = r._2
12021150 let pmtAmt = r._3
12031151 let pmtAssetId = r._4
12041152 let state = r._5
12051153 let b = invoke(fca, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
12061154 if ((b == b))
12071155 then {
1208- let $t04229942381 = refreshDLpInternal(-(outAmtAmt), -(outPrAmt), 0)
1209- let refreshDLpActions = $t04229942381._1
1210- let updatedDLp = $t04229942381._2
1156+ let $t04128041362 = refreshDLpInternal(-(outAmtAmt), -(outPrAmt), 0)
1157+ let refreshDLpActions = $t04128041362._1
1158+ let updatedDLp = $t04128041362._2
12111159 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
12121160 if ((isUpdatedDLpValid == isUpdatedDLpValid))
12131161 then (state ++ refreshDLpActions)
12141162 else throw("Strict value is not equal to itself.")
12151163 }
12161164 else throw("Strict value is not equal to itself.")
12171165 }
12181166 else throw("Strict value is not equal to itself.")
12191167 }
12201168
12211169
12221170
12231171 @Callable(i)
12241172 func getOneTknV2 (outAssetId,minOutAmount) = {
12251173 let isPoolOneTokenOperationsDisabled = {
12261174 let @ = invoke(fca, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
12271175 if ($isInstanceOf(@, "Boolean"))
12281176 then @
12291177 else throw(($getType(@) + " couldn't be cast to Boolean"))
12301178 }
12311179 let isGetDisabled = if (if (igs())
12321180 then true
12331181 else (cfgPoolStatus == PoolShutdown))
12341182 then true
12351183 else isPoolOneTokenOperationsDisabled
12361184 let checks = [if (if (!(isGetDisabled))
12371185 then true
12381186 else isManager(i))
12391187 then true
12401188 else throwErr("get operation is blocked by admin"), if ((size(i.payments) == 1))
12411189 then true
12421190 else throwErr("exactly 1 payment are expected")]
12431191 if ((checks == checks))
12441192 then {
1245- let $t04299943154 = getOneTknV2Internal(outAssetId, minOutAmount, i.payments, i.caller, i.originCaller, i.transactionId)
1246- let state = $t04299943154._1
1247- let totalAmount = $t04299943154._2
1193+ let $t04198042135 = getOneTknV2Internal(outAssetId, minOutAmount, i.payments, i.caller, i.originCaller, i.transactionId)
1194+ let state = $t04198042135._1
1195+ let totalAmount = $t04198042135._2
12481196 $Tuple2(state, totalAmount)
12491197 }
12501198 else throw("Strict value is not equal to itself.")
12511199 }
12521200
12531201
12541202
12551203 @Callable(i)
12561204 func refreshDLp () = {
12571205 let lastRefreshedBlockHeight = valueOrElse(getInteger(keyDLpRefreshedHeight), 0)
12581206 let checkLastRefreshedBlockHeight = if (((height - lastRefreshedBlockHeight) >= dLpRefreshDelay))
12591207 then unit
12601208 else throwErr(makeString([toString(dLpRefreshDelay), " blocks have not passed since the previous call"], ""))
12611209 if ((checkLastRefreshedBlockHeight == checkLastRefreshedBlockHeight))
12621210 then {
12631211 let dLp = valueOrErrorMessage(parseBigInt(valueOrElse(getString(this, keyDLp), "0")), fmtErr("invalid dLp"))
1264- let $t04367843742 = refreshDLpInternal(0, 0, 0)
1265- let dLpUpdateActions = $t04367843742._1
1266- let updatedDLp = $t04367843742._2
1212+ let $t04265942723 = refreshDLpInternal(0, 0, 0)
1213+ let dLpUpdateActions = $t04265942723._1
1214+ let updatedDLp = $t04265942723._2
12671215 let actions = if ((dLp != updatedDLp))
12681216 then dLpUpdateActions
12691217 else throwErr("nothing to refresh")
12701218 $Tuple2(actions, toString(updatedDLp))
12711219 }
12721220 else throw("Strict value is not equal to itself.")
12731221 }
12741222
12751223
12761224
12771225 @Callable(i)
12781226 func getOneTknV2READONLY (outAssetId,lpAssetAmount) = {
12791227 let amId = toBase58String(value(cfgAmountAssetId))
12801228 let prId = toBase58String(value(cfgPriceAssetId))
12811229 let lpId = toBase58String(value(cfgLpAssetId))
12821230 let xp = [toBigInt(getAccBalance(amId)), toBigInt(getAccBalance(prId))]
12831231 let lpEmission = toBigInt(valueOrErrorMessage(assetInfo(fromBase58String(lpId)), "invalid lp asset").quantity)
12841232 let D0 = getD(xp)
12851233 let D1 = (D0 - fraction(toBigInt(lpAssetAmount), D0, lpEmission))
12861234 let index = if ((outAssetId == amId))
12871235 then 0
12881236 else if ((outAssetId == prId))
12891237 then 1
12901238 else throw("invalid out asset id")
12911239 let newY = getYD(xp, index, D1)
12921240 let dy = (xp[index] - newY)
12931241 let totalGetRaw = max([0, toInt((dy - big1))])
1294- let $t04467244727 = takeFee(totalGetRaw, outFee)
1295- let totalGet = $t04467244727._1
1296- let feeAmount = $t04467244727._2
1242+ let $t04365343708 = takeFee(totalGetRaw, outFee)
1243+ let totalGet = $t04365343708._1
1244+ let feeAmount = $t04365343708._2
12971245 $Tuple2(nil, $Tuple2(totalGet, feeAmount))
12981246 }
12991247
13001248
13011249
13021250 @Callable(i)
13031251 func getOneTknV2WithBonusREADONLY (outAssetId,lpAssetAmount) = {
13041252 let amId = toBase58String(value(cfgAmountAssetId))
13051253 let prId = toBase58String(value(cfgPriceAssetId))
13061254 let lpId = toBase58String(value(cfgLpAssetId))
13071255 let amBalance = getAccBalance(amId)
13081256 let prBalance = getAccBalance(prId)
1309- let $t04510245217 = {
1257+ let $t04408344198 = {
13101258 let @ = invoke(this, "getOneTknV2READONLY", [outAssetId, lpAssetAmount], nil)
13111259 if ($isInstanceOf(@, "(Int, Int)"))
13121260 then @
13131261 else throw(($getType(@) + " couldn't be cast to (Int, Int)"))
13141262 }
1315- let totalGet = $t04510245217._1
1316- let feeAmount = $t04510245217._2
1263+ let totalGet = $t04408344198._1
1264+ let feeAmount = $t04408344198._2
13171265 let r = ego("", lpId, lpAssetAmount, this)
13181266 let outAmAmt = r._1
13191267 let outPrAmt = r._2
13201268 let sumOfGetAssets = (outAmAmt + outPrAmt)
13211269 let bonus = if ((sumOfGetAssets == 0))
13221270 then if ((totalGet == 0))
13231271 then 0
13241272 else throw("bonus calculation error")
13251273 else fraction((totalGet - sumOfGetAssets), scale8, sumOfGetAssets)
13261274 $Tuple2(nil, $Tuple3(totalGet, feeAmount, bonus))
13271275 }
13281276
13291277
13301278
13311279 @Callable(i)
13321280 func getNoLess (noLessThenAmtAsset,noLessThenPriceAsset) = {
13331281 let r = cg(i)
13341282 let outAmAmt = r._1
13351283 let outPrAmt = r._2
13361284 let pmtAmt = r._3
13371285 let pmtAssetId = r._4
13381286 let state = r._5
13391287 if ((noLessThenAmtAsset > outAmAmt))
13401288 then throw(((("Failed: " + toString(outAmAmt)) + " < ") + toString(noLessThenAmtAsset)))
13411289 else if ((noLessThenPriceAsset > outPrAmt))
13421290 then throw(((("Failed: " + toString(outPrAmt)) + " < ") + toString(noLessThenPriceAsset)))
13431291 else {
13441292 let currentDLp = calcCurrentDLp(toBigInt(0), toBigInt(0), toBigInt(0))
13451293 if ((currentDLp == currentDLp))
13461294 then {
13471295 let burnLPAssetOnFactory = invoke(fca, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
13481296 if ((burnLPAssetOnFactory == burnLPAssetOnFactory))
13491297 then {
1350- let $t04638346464 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1351- let refreshDLpActions = $t04638346464._1
1352- let updatedDLp = $t04638346464._2
1298+ let $t04536445445 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1299+ let refreshDLpActions = $t04536445445._1
1300+ let updatedDLp = $t04536445445._2
13531301 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
13541302 if ((isUpdatedDLpValid == isUpdatedDLpValid))
13551303 then (state ++ refreshDLpActions)
13561304 else throw("Strict value is not equal to itself.")
13571305 }
13581306 else throw("Strict value is not equal to itself.")
13591307 }
13601308 else throw("Strict value is not equal to itself.")
13611309 }
13621310 }
13631311
13641312
13651313
13661314 @Callable(i)
13671315 func unstakeAndGet (amount) = {
13681316 let checkPayments = if ((size(i.payments) != 0))
13691317 then throw("No pmnts expd")
13701318 else true
13711319 if ((checkPayments == checkPayments))
13721320 then {
13731321 let factoryCfg = gfc()
13741322 let lpAssetId = cfgLpAssetId
13751323 let staking = valueOrErrorMessage(addressFromString(factoryCfg[idxFactStakCntr]), "Wr st addr")
13761324 let currentDLp = calcCurrentDLp(toBigInt(0), toBigInt(0), toBigInt(0))
13771325 if ((currentDLp == currentDLp))
13781326 then {
13791327 let unstakeInv = invoke(staking, "unstake", [toBase58String(lpAssetId), amount], nil)
13801328 if ((unstakeInv == unstakeInv))
13811329 then {
13821330 let r = ego(toBase58String(i.transactionId), toBase58String(lpAssetId), amount, i.caller)
13831331 let outAmAmt = r._1
13841332 let outPrAmt = r._2
13851333 let sts = parseIntValue(r._9)
13861334 let state = r._10
13871335 let v = if (if (igs())
13881336 then true
13891337 else (sts == PoolShutdown))
13901338 then throw(("Blocked: " + toString(sts)))
13911339 else true
13921340 if ((v == v))
13931341 then {
13941342 let burnA = invoke(fca, "burn", [amount], [AttachedPayment(lpAssetId, amount)])
13951343 if ((burnA == burnA))
13961344 then {
1397- let $t04749147572 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1398- let refreshDLpActions = $t04749147572._1
1399- let updatedDLp = $t04749147572._2
1345+ let $t04647246553 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1346+ let refreshDLpActions = $t04647246553._1
1347+ let updatedDLp = $t04647246553._2
14001348 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
14011349 if ((isUpdatedDLpValid == isUpdatedDLpValid))
14021350 then (state ++ refreshDLpActions)
14031351 else throw("Strict value is not equal to itself.")
14041352 }
14051353 else throw("Strict value is not equal to itself.")
14061354 }
14071355 else throw("Strict value is not equal to itself.")
14081356 }
14091357 else throw("Strict value is not equal to itself.")
14101358 }
14111359 else throw("Strict value is not equal to itself.")
14121360 }
14131361 else throw("Strict value is not equal to itself.")
14141362 }
14151363
14161364
14171365
14181366 @Callable(i)
14191367 func unstakeAndGetNoLess (unstakeAmount,noLessThenAmountAsset,noLessThenPriceAsset) = {
14201368 let isGetDisabled = if (igs())
14211369 then true
14221370 else (cfgPoolStatus == PoolShutdown)
14231371 let checks = [if (!(isGetDisabled))
14241372 then true
14251373 else throw("get operation is blocked by admin"), if ((size(i.payments) == 0))
14261374 then true
14271375 else throw("no payments are expected")]
14281376 if ((checks == checks))
14291377 then {
14301378 let currentDLp = calcCurrentDLp(toBigInt(0), toBigInt(0), toBigInt(0))
14311379 if ((currentDLp == currentDLp))
14321380 then {
14331381 let unstakeInv = invoke(stakingContract, "unstake", [toBase58String(cfgLpAssetId), unstakeAmount], nil)
14341382 if ((unstakeInv == unstakeInv))
14351383 then {
14361384 let res = ego(toBase58String(i.transactionId), toBase58String(cfgLpAssetId), unstakeAmount, i.caller)
14371385 let outAmAmt = res._1
14381386 let outPrAmt = res._2
14391387 let state = res._10
14401388 let checkAmounts = [if ((outAmAmt >= noLessThenAmountAsset))
14411389 then true
14421390 else throw(makeString(["amount asset amount to receive is less than ", toString(noLessThenAmountAsset)], "")), if ((outPrAmt >= noLessThenPriceAsset))
14431391 then true
14441392 else throw(makeString(["price asset amount to receive is less than ", toString(noLessThenPriceAsset)], ""))]
14451393 if ((checkAmounts == checkAmounts))
14461394 then {
14471395 let burnLPAssetOnFactory = invoke(fca, "burn", [unstakeAmount], [AttachedPayment(cfgLpAssetId, unstakeAmount)])
14481396 if ((burnLPAssetOnFactory == burnLPAssetOnFactory))
14491397 then {
1450- let $t04882348904 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1451- let refreshDLpActions = $t04882348904._1
1452- let updatedDLp = $t04882348904._2
1398+ let $t04780447885 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1399+ let refreshDLpActions = $t04780447885._1
1400+ let updatedDLp = $t04780447885._2
14531401 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
14541402 if ((isUpdatedDLpValid == isUpdatedDLpValid))
14551403 then (state ++ refreshDLpActions)
14561404 else throw("Strict value is not equal to itself.")
14571405 }
14581406 else throw("Strict value is not equal to itself.")
14591407 }
14601408 else throw("Strict value is not equal to itself.")
14611409 }
14621410 else throw("Strict value is not equal to itself.")
14631411 }
14641412 else throw("Strict value is not equal to itself.")
14651413 }
14661414 else throw("Strict value is not equal to itself.")
14671415 }
14681416
14691417
14701418
14711419 @Callable(i)
14721420 func unstakeAndGetOneTknV2 (unstakeAmount,outAssetId,minOutAmount) = {
14731421 let isPoolOneTokenOperationsDisabled = {
14741422 let @ = invoke(fca, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
14751423 if ($isInstanceOf(@, "Boolean"))
14761424 then @
14771425 else throw(($getType(@) + " couldn't be cast to Boolean"))
14781426 }
14791427 let isGetDisabled = if (if (igs())
14801428 then true
14811429 else (cfgPoolStatus == PoolShutdown))
14821430 then true
14831431 else isPoolOneTokenOperationsDisabled
14841432 let checks = [if (if (!(isGetDisabled))
14851433 then true
14861434 else isManager(i))
14871435 then true
14881436 else throwErr("get operation is blocked by admin"), if ((size(i.payments) == 0))
14891437 then true
14901438 else throwErr("no payments are expected")]
14911439 if ((checks == checks))
14921440 then {
14931441 let factoryCfg = gfc()
14941442 let lpAssetId = cfgLpAssetId
14951443 let staking = valueOrErrorMessage(addressFromString(factoryCfg[idxFactStakCntr]), "Wr st addr")
14961444 let unstakeInv = invoke(staking, "unstake", [toBase58String(lpAssetId), unstakeAmount], nil)
14971445 if ((unstakeInv == unstakeInv))
14981446 then {
1499- let $t04979949987 = getOneTknV2Internal(outAssetId, minOutAmount, [AttachedPayment(lpAssetId, unstakeAmount)], i.caller, i.originCaller, i.transactionId)
1500- let state = $t04979949987._1
1501- let totalAmount = $t04979949987._2
1447+ let $t04878048968 = getOneTknV2Internal(outAssetId, minOutAmount, [AttachedPayment(lpAssetId, unstakeAmount)], i.caller, i.originCaller, i.transactionId)
1448+ let state = $t04878048968._1
1449+ let totalAmount = $t04878048968._2
15021450 $Tuple2(state, totalAmount)
15031451 }
15041452 else throw("Strict value is not equal to itself.")
15051453 }
15061454 else throw("Strict value is not equal to itself.")
15071455 }
15081456
15091457
15101458
15111459 @Callable(i)
15121460 func putOneTknV2WithBonusREADONLY (paymentAmountRaw,paymentAssetId) = {
1513- let $t05011550218 = calcPutOneTkn(paymentAmountRaw, paymentAssetId, "", "", true)
1514- let lpAmount = $t05011550218._1
1515- let state = $t05011550218._2
1516- let feeAmount = $t05011550218._3
1517- let bonus = $t05011550218._4
1461+ let $t04909649199 = calcPutOneTkn(paymentAmountRaw, paymentAssetId, "", "", true)
1462+ let lpAmount = $t04909649199._1
1463+ let state = $t04909649199._2
1464+ let feeAmount = $t04909649199._3
1465+ let bonus = $t04909649199._4
15181466 $Tuple2(nil, $Tuple3(lpAmount, feeAmount, bonus))
15191467 }
15201468
15211469
15221470
15231471 @Callable(i)
15241472 func putOneTknV2WithoutTakeFeeREADONLY (paymentAmountRaw,paymentAssetId) = {
1525- let $t05036650470 = calcPutOneTkn(paymentAmountRaw, paymentAssetId, "", "", false)
1526- let lpAmount = $t05036650470._1
1527- let state = $t05036650470._2
1528- let feeAmount = $t05036650470._3
1529- let bonus = $t05036650470._4
1473+ let $t04934749451 = calcPutOneTkn(paymentAmountRaw, paymentAssetId, "", "", false)
1474+ let lpAmount = $t04934749451._1
1475+ let state = $t04934749451._2
1476+ let feeAmount = $t04934749451._3
1477+ let bonus = $t04934749451._4
15301478 $Tuple2(nil, $Tuple3(lpAmount, feeAmount, bonus))
15311479 }
15321480
15331481
15341482
15351483 @Callable(i)
15361484 func activate (amtAsStr,prAsStr) = if ((toString(i.caller) != toString(fca)))
15371485 then throw("denied")
15381486 else $Tuple2([StringEntry(aa(), amtAsStr), StringEntry(pa(), prAsStr)], "success")
15391487
15401488
15411489
15421490 @Callable(i)
15431491 func setS (k,v) = if ((toString(i.caller) != strf(this, ada())))
15441492 then pd
15451493 else [StringEntry(k, v)]
15461494
15471495
15481496
15491497 @Callable(i)
15501498 func setI (k,v) = if ((toString(i.caller) != strf(this, ada())))
15511499 then pd
15521500 else [IntegerEntry(k, v)]
15531501
15541502
15551503
15561504 @Callable(i)
15571505 func getPoolConfigWrapperREADONLY () = $Tuple2(nil, gpc())
15581506
15591507
15601508
15611509 @Callable(i)
15621510 func getAccBalanceWrapperREADONLY (assetId) = $Tuple2(nil, getAccBalance(assetId))
15631511
15641512
15651513
15661514 @Callable(i)
15671515 func calcPricesWrapperREADONLY (amAmt,prAmt,lpAmt) = {
15681516 let pr = calcPrices(amAmt, prAmt, lpAmt)
15691517 $Tuple2(nil, [toString(pr[0]), toString(pr[1]), toString(pr[2])])
15701518 }
15711519
15721520
15731521
15741522 @Callable(i)
15751523 func fromX18WrapperREADONLY (val,resScaleMult) = $Tuple2(nil, f1(parseBigIntValue(val), resScaleMult))
15761524
15771525
15781526
15791527 @Callable(i)
15801528 func toX18WrapperREADONLY (origVal,origScaleMult) = $Tuple2(nil, toString(t1(origVal, origScaleMult)))
15811529
15821530
15831531
15841532 @Callable(i)
15851533 func calcPriceBigIntWrapperREADONLY (prAmtX18,amAmtX18) = $Tuple2(nil, toString(cpbi(parseBigIntValue(prAmtX18), parseBigIntValue(amAmtX18))))
15861534
15871535
15881536
15891537 @Callable(i)
15901538 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, ""))
15911539
15921540
15931541
15941542 @Callable(i)
15951543 func estimateGetOperationWrapperREADONLY (txId58,pmtAsId,pmtLpAmt,usrAddr) = {
15961544 let r = ego(txId58, pmtAsId, pmtLpAmt, addressFromStringValue(usrAddr))
15971545 $Tuple2(nil, $Tuple10(r._1, r._2, r._3, r._4, r._5, r._6, r._7, toString(r._8), r._9, r._10))
15981546 }
15991547
16001548
16011549 @Verifier(tx)
16021550 func verify () = {
16031551 let targetPublicKey = match m() {
16041552 case pk: ByteVector =>
16051553 pk
16061554 case _: Unit =>
16071555 tx.senderPublicKey
16081556 case _ =>
16091557 throw("Match error")
16101558 }
16111559 match tx {
16121560 case order: Order =>
16131561 let matcherPub = mp()
16141562 let orderValid = validateMatcherOrderAllowed(order)
16151563 let senderValid = sigVerify(order.bodyBytes, order.proofs[0], order.senderPublicKey)
16161564 let matcherValid = sigVerify(order.bodyBytes, order.proofs[1], matcherPub)
16171565 if (if (if (orderValid)
16181566 then senderValid
16191567 else false)
16201568 then matcherValid
16211569 else false)
16221570 then true
16231571 else toe(orderValid, senderValid, matcherValid)
16241572 case s: SetScriptTransaction =>
16251573 if (sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey))
16261574 then true
16271575 else {
16281576 let newHash = blake2b256(value(s.script))
16291577 let allowedHash = fromBase64String(value(getString(fca, keyAllowedLpStableScriptHash())))
16301578 let currentHash = scriptHash(this)
16311579 if ((allowedHash == newHash))
16321580 then (currentHash != newHash)
16331581 else false
16341582 }
16351583 case _ =>
16361584 sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey)
16371585 }
16381586 }
16391587

github/deemru/w8io/026f985 
240.36 ms