tx · 8izLCTE3yVT8ynDQSJ812eRMzX6mRA5en3n7nGg9PZUM

3MzKSdTH2jFbypLsoNfrH7QgkzSbx3EYwCA:  -0.04100000 Waves

2023.06.01 15:34 [2603600] smart account 3MzKSdTH2jFbypLsoNfrH7QgkzSbx3EYwCA > SELF 0.00000000 Waves

{ "type": 13, "id": "8izLCTE3yVT8ynDQSJ812eRMzX6mRA5en3n7nGg9PZUM", "fee": 4100000, "feeAssetId": null, "timestamp": 1685622914690, "version": 2, "chainId": 84, "sender": "3MzKSdTH2jFbypLsoNfrH7QgkzSbx3EYwCA", "senderPublicKey": "35yd3qw1gxKDxKwGAykHN9fANbXNWwseaUwbWDj24o3x", "proofs": [ "2ovHsYn37BWkaKG4W3diNfoaRzCTeJAhLh2GxUnrP4Aq97VttwPqx6AtebFESEpEXikDw2ZhuytDcPMSzTz5bt8J" ], "script": "base64:BgKALQgCEgUKAwEEARIHCgUBBAEIARIDCgEIEgQKAgEEEgQKAgEEEgMKAQESABIECgIIARIAEgQKAggBEgQKAggBEgQKAgEBEgMKAQESBQoDAQEBEgUKAwEIARIECgIBCBIECgIBCBIECgIICBIAEgMKAQgSBQoDAQEBEgQKAggBEgQKAgEBEgQKAggIEgsKCQgBAQIBAggEBBIGCgQICAEIEgAiBnNjYWxlOCIMc2NhbGU4QmlnSW50IgdzY2FsZTE4Igp6ZXJvQmlnSW50IgRiaWcwIgRiaWcxIgRiaWcyIgRiaWczIgRiaWc0IgpzbGlwcGFnZTREIgt3YXZlc1N0cmluZyIKYW1wSW5pdGlhbCIFQW11bHQiBURjb252IgNTRVAiBUVNUFRZIgpQb29sQWN0aXZlIgpQb29sUHV0RGlzIg5Qb29sTWF0Y2hlckRpcyIMUG9vbFNodXRkb3duIg5pZHhQb29sQWRkcmVzcyIJaWR4UG9vbFN0IglpZHhMUEFzSWQiCWlkeEFtQXNJZCIJaWR4UHJBc0lkIgtpZHhBbXRBc0RjbSINaWR4UHJpY2VBc0RjbSILaWR4SUFtdEFzSWQ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4JAPQDAwgFAmZmCWJvZHlCeXRlcwkAkQMCCAUCZmYGcHJvb2ZzAAEFAml4AwMDBQJhSwUCYU0HBQJhTgcGCQECYUoEBQJhSwUCYUwFAmFNBQJhTgMJAAECBQJhUQIUU2V0U2NyaXB0VHJhbnNhY3Rpb24EAmFWBQJhUQMJAPQDAwgFAml1CWJvZHlCeXRlcwkAkQMCCAUCaXUGcHJvb2ZzAAAFAml3BgQCaXoJAPYDAQkBBXZhbHVlAQgFAmFWBnNjcmlwdAQCaUEJANsEAQkBBXZhbHVlAQkAnQgCBQJhVQkBAmFGAAQCaUIJAPEHAQUEdGhpcwMJAAACBQJpQQUCaXoJAQIhPQIFAmlCBQJpegcJAPQDAwgFAml1CWJvZHlCeXRlcwkAkQMCCAUCaXUGcHJvb2ZzAAAFAml3HRMn8g==", "height": 2603600, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 588uvrDNcdPngaEhLh3jM28edjA1n14UNE7ndBUQpB5h Next: FScn96AwLBy9S2vmMXsNbH85BaCQgmUyFnU5YN7THGmp Diff:
OldNewDifferences
2222 let slippage4D = toBigInt((scale8 - ((scale8 * 1) / scale8)))
2323
2424 let wavesString = "WAVES"
25+
26+let ampInitial = 50
2527
2628 let Amult = "100"
2729
256258 else toBase58String(value(input))
257259
258260
259-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]))
261+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]))
260262
261263
262264 let poolConfigParsed = parsePoolConfig(gpc())
263265
264-let $t086868915 = poolConfigParsed
266+let $t086088794 = poolConfigParsed
265267
266-let cfgPoolAddress = $t086868915._1
268+let cfgPoolAddress = $t086088794._1
267269
268-let cfgPoolStatus = $t086868915._2
270+let cfgPoolStatus = $t086088794._2
269271
270-let cfgLpAssetId = $t086868915._3
272+let cfgLpAssetId = $t086088794._3
271273
272-let cfgAmountAssetId = $t086868915._4
274+let cfgAmountAssetId = $t086088794._4
273275
274-let cfgPriceAssetId = $t086868915._5
276+let cfgPriceAssetId = $t086088794._5
275277
276-let cfgAmountAssetDecimals = $t086868915._6
278+let cfgAmountAssetDecimals = $t086088794._6
277279
278-let cfgPriceAssetDecimals = $t086868915._7
279-
280-let cfgInAmountAssedId = $t086868915._8
281-
282-let cfgInPriceAssetId = $t086868915._9
280+let cfgPriceAssetDecimals = $t086088794._7
283281
284282 func gfc () = split(strf(fca, fcfg()), SEP)
285283
400398 }
401399
402400 let arr = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16]
403- let $t01342013468 = {
401+ let $t01329913347 = {
404402 let $l = arr
405403 let $s = size($l)
406404 let $acc0 = $Tuple2(s, false)
414412
415413 $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)
416414 }
417- let d = $t01342013468._1
418- let found = $t01342013468._2
415+ let d = $t01329913347._1
416+ let found = $t01329913347._2
419417 if (found)
420418 then d
421419 else throw(("D calculation error, D = " + toString(d)))
462460 let lpId = cfgLpAssetId
463461 let amIdStr = toBase58String(value(cfgAmountAssetId))
464462 let prIdStr = toBase58String(value(cfgPriceAssetId))
465- let inAmIdStr = cfgInAmountAssedId
466- let inPrIdStr = cfgInPriceAssetId
467463 let amtDcm = cfgAmountAssetDecimals
468464 let priceDcm = cfgPriceAssetDecimals
469465 let sts = toString(cfgPoolStatus)
551547 else calcLpAmt
552548 let amDiff = (inAmAmt - calcAmAssetPmt)
553549 let prDiff = (inPrAmt - calcPrAssetPmt)
554- let $t02130721652 = if (if (isOneAsset)
550+ let $t02110921454 = if (if (isOneAsset)
555551 then (pmtId == amIdStr)
556552 else false)
557553 then $Tuple2(pmtAmt, 0)
560556 else false)
561557 then $Tuple2(0, pmtAmt)
562558 else $Tuple2(calcAmAssetPmt, calcPrAssetPmt)
563- let writeAmAmt = $t02130721652._1
564- let writePrAmt = $t02130721652._2
559+ let writeAmAmt = $t02110921454._1
560+ let writePrAmt = $t02110921454._2
565561 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))]
566562 $Tuple13(calcLpAmt, emitLpAmt, curPrice, amBalance, prBalance, lpEm, lpId, sts, commonState, amDiff, prDiff, inAmId, inPrId)
567563 }
580576 let c = (((((D * D) / (x * n)) * D) * aPrecision) / (ann * n))
581577 let b = ((s + ((D * aPrecision) / ann)) - D)
582578 func calc (acc,cur) = {
583- let $t02284722867 = acc
584- let y = $t02284722867._1
585- let found = $t02284722867._2
579+ let $t02264922669 = acc
580+ let y = $t02264922669._1
581+ let found = $t02264922669._2
586582 if ((found != unit))
587583 then acc
588584 else {
595591 }
596592
597593 let arr = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
598- let $t02317423221 = {
594+ let $t02297623023 = {
599595 let $l = arr
600596 let $s = size($l)
601597 let $acc0 = $Tuple2(D, unit)
609605
610606 $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)
611607 }
612- let y = $t02317423221._1
613- let found = $t02317423221._2
608+ let y = $t02297623023._1
609+ let found = $t02297623023._2
614610 if ((found != unit))
615611 then y
616612 else throw(("Y calculation error, Y = " + toString(y)))
654650 let priceAssetBalance = getAccBalance(assetIdToString(cfgPriceAssetId))
655651 let amountAssetAmount = order.amount
656652 let priceAssetAmount = fraction(order.amount, order.price, scale8, FLOOR)
657- let $t02541925631 = if ((order.orderType == Buy))
653+ let $t02522125433 = if ((order.orderType == Buy))
658654 then $Tuple2(amountAssetAmount, -(priceAssetAmount))
659655 else $Tuple2(-(amountAssetAmount), priceAssetAmount)
660- let amountAssetBalanceDelta = $t02541925631._1
661- let priceAssetBalanceDelta = $t02541925631._2
656+ let amountAssetBalanceDelta = $t02522125433._1
657+ let priceAssetBalanceDelta = $t02522125433._2
662658 if (if (if (igs())
663659 then true
664660 else (cfgPoolStatus == PoolMatcherDis))
671667 then throw("Wr assets")
672668 else {
673669 let dLp = parseBigIntValue(valueOrElse(getString(this, keyDLp), "0"))
674- let $t02597326073 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
675- let unusedActions = $t02597326073._1
676- let dLpNew = $t02597326073._2
670+ let $t02577525875 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
671+ let unusedActions = $t02577525875._1
672+ let dLpNew = $t02577525875._2
677673 let isOrderValid = (dLpNew >= dLp)
678674 let info = makeString(["dLp=", toString(dLp), " dLpNew=", toString(dLpNew), " amountAssetBalance=", toString(amountAssetBalance), " priceAssetBalance=", toString(priceAssetBalance), " amountAssetBalanceDelta=", toString(amountAssetBalanceDelta), " priceAssetBalanceDelta=", toString(priceAssetBalanceDelta), " height=", toString(height)], "")
679675 $Tuple2(isOrderValid, info)
727723 then {
728724 let amBalance = getAccBalance(amId)
729725 let prBalance = getAccBalance(prId)
730- let $t02872929191 = if ((txId == ""))
726+ let $t02853128993 = if ((txId == ""))
731727 then $Tuple2(amBalance, prBalance)
732728 else if ((pmtAssetId == amId))
733729 then if ((pmtAmtRaw > amBalance))
738734 then throw("invalid payment amount")
739735 else $Tuple2(amBalance, (prBalance - pmtAmtRaw))
740736 else throw("wrong pmtAssetId")
741- let amBalanceOld = $t02872929191._1
742- let prBalanceOld = $t02872929191._2
743- let $t02919729373 = if ((pmtAssetId == amId))
737+ let amBalanceOld = $t02853128993._1
738+ let prBalanceOld = $t02853128993._2
739+ let $t02899929175 = if ((pmtAssetId == amId))
744740 then $Tuple2(pmtAmtRaw, 0)
745741 else if ((pmtAssetId == prId))
746742 then $Tuple2(0, pmtAmtRaw)
747743 else throw("invalid payment")
748- let amAmountRaw = $t02919729373._1
749- let prAmountRaw = $t02919729373._2
750- let $t02937729631 = if (withTakeFee)
744+ let amAmountRaw = $t02899929175._1
745+ let prAmountRaw = $t02899929175._2
746+ let $t02917929433 = if (withTakeFee)
751747 then $Tuple3(takeFee(amAmountRaw, inFee)._1, takeFee(prAmountRaw, inFee)._1, takeFee(pmtAmtRaw, inFee)._2)
752748 else $Tuple3(amAmountRaw, prAmountRaw, 0)
753- let amAmount = $t02937729631._1
754- let prAmount = $t02937729631._2
755- let feeAmount = $t02937729631._3
749+ let amAmount = $t02917929433._1
750+ let prAmount = $t02917929433._2
751+ let feeAmount = $t02917929433._3
756752 let amBalanceNew = (amBalanceOld + amAmount)
757753 let prBalanceNew = (prBalanceOld + prAmount)
758754 let D0 = getD([t1(amBalanceOld, cfgAmountAssetDecimals), t1(prBalanceOld, cfgPriceAssetDecimals)])
800796 else {
801797 let amBalance = getAccBalance(amId)
802798 let prBalance = getAccBalance(prId)
803- let $t03174331854 = {
799+ let $t03154531656 = {
804800 let @ = invoke(this, "getOneTknV2READONLY", [outAssetId, pmtAmt], nil)
805801 if ($isInstanceOf(@, "(Int, Int)"))
806802 then @
807803 else throw(($getType(@) + " couldn't be cast to (Int, Int)"))
808804 }
809- if (($t03174331854 == $t03174331854))
805+ if (($t03154531656 == $t03154531656))
810806 then {
811- let feeAmount = $t03174331854._2
812- let totalGet = $t03174331854._1
807+ let feeAmount = $t03154531656._2
808+ let totalGet = $t03154531656._1
813809 let totalAmount = if (if ((minOutAmount > 0))
814810 then (minOutAmount > totalGet)
815811 else false)
816812 then throwErr(makeString(["amount to receive is less than ", toString(minOutAmount)], ""))
817813 else totalGet
818- let $t03204432351 = if ((outAssetId == amId))
814+ let $t03184632153 = if ((outAssetId == amId))
819815 then $Tuple4(totalAmount, 0, ((amBalance - totalAmount) - feeAmount), prBalance)
820816 else if ((outAssetId == prId))
821817 then $Tuple4(0, totalAmount, amBalance, ((prBalance - totalAmount) - feeAmount))
822818 else throw("invalid out asset id")
823- let outAm = $t03204432351._1
824- let outPr = $t03204432351._2
825- let amBalanceNew = $t03204432351._3
826- let prBalanceNew = $t03204432351._4
819+ let outAm = $t03184632153._1
820+ let outPr = $t03184632153._2
821+ let amBalanceNew = $t03184632153._3
822+ let prBalanceNew = $t03184632153._4
827823 let curPrX18 = cpbi(t1(prBalanceNew, prDecimals), t1(amBalanceNew, amDecimals))
828824 let curPr = f1(curPrX18, scale8)
829825 let outAssetIdOrWaves = if ((outAssetId == "WAVES"))
838834 let burn = invoke(fca, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
839835 if ((burn == burn))
840836 then {
841- let $t03313633486 = {
837+ let $t03293833288 = {
842838 let feeAmountForCalc = if ((this == feeCollectorAddress))
843839 then 0
844840 else feeAmount
849845 then $Tuple2(-((totalGet + feeAmountForCalc)), 0)
850846 else $Tuple2(0, -((totalGet + feeAmountForCalc)))
851847 }
852- let amountAssetBalanceDelta = $t03313633486._1
853- let priceAssetBalanceDelta = $t03313633486._2
854- let $t03348933597 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
855- let refreshDLpActions = $t03348933597._1
856- let updatedDLp = $t03348933597._2
848+ let amountAssetBalanceDelta = $t03293833288._1
849+ let priceAssetBalanceDelta = $t03293833288._2
850+ let $t03329133399 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
851+ let refreshDLpActions = $t03329133399._1
852+ let updatedDLp = $t03329133399._2
857853 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
858854 if ((isUpdatedDLpValid == isUpdatedDLpValid))
859855 then $Tuple2((state ++ refreshDLpActions), totalAmount)
925921 let c = (((((D * D) / (x * n)) * D) * aPrecision) / (ann * n))
926922 let b = ((s + ((D * aPrecision) / ann)) - D)
927923 func calc (acc,cur) = {
928- let $t03508435104 = acc
929- let y = $t03508435104._1
930- let found = $t03508435104._2
924+ let $t03488634906 = acc
925+ let y = $t03488634906._1
926+ let found = $t03488634906._2
931927 if ((found != unit))
932928 then acc
933929 else {
940936 }
941937
942938 let arr = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
943- let $t03543535482 = {
939+ let $t03523735284 = {
944940 let $l = arr
945941 let $s = size($l)
946942 let $acc0 = $Tuple2(D, unit)
954950
955951 $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)
956952 }
957- let y = $t03543535482._1
958- let found = $t03543535482._2
953+ let y = $t03523735284._1
954+ let found = $t03523735284._2
959955 if ((found != unit))
960956 then y
961957 else throw(("Y calculation error, Y = " + toString(y)))
967963
968964 @Callable(i)
969965 func calculateAmountOutForSwapREADONLY (cleanAmountIn,isReverse,feePoolAmount) = {
970- let $t03583436258 = if ((isReverse == false))
966+ let $t03563636060 = if ((isReverse == false))
971967 then {
972968 let assetOut = strf(this, pa())
973969 let poolAmountInBalance = (toBigInt(getAccBalance(strf(this, aa()))) + toBigInt(cleanAmountIn))
978974 let poolAmountInBalance = (toBigInt(getAccBalance(strf(this, pa()))) + toBigInt(cleanAmountIn))
979975 $Tuple2(assetOut, poolAmountInBalance)
980976 }
981- let assetOut = $t03583436258._1
982- let poolAmountInBalance = $t03583436258._2
977+ let assetOut = $t03563636060._1
978+ let poolAmountInBalance = $t03563636060._2
983979 let poolConfig = gpc()
984980 let amId = poolConfig[idxAmAsId]
985981 let prId = poolConfig[idxPrAsId]
10191015 then {
10201016 let pmt = value(i.payments[0])
10211017 let assetIn = assetIdToString(pmt.assetId)
1022- let $t03769438088 = if ((isReverse == false))
1018+ let $t03749637890 = if ((isReverse == false))
10231019 then {
10241020 let assetOut = strf(this, pa())
10251021 let poolAmountInBalance = (getAccBalance(assetIn) - value(i.payments[0]).amount)
10301026 let poolAmountInBalance = (getAccBalance(assetIn) - value(i.payments[0]).amount)
10311027 $Tuple2(assetOut, poolAmountInBalance)
10321028 }
1033- let assetOut = $t03769438088._1
1034- let poolAmountInBalance = $t03769438088._2
1029+ let assetOut = $t03749637890._1
1030+ let poolAmountInBalance = $t03749637890._2
10351031 let poolConfig = gpc()
10361032 let amId = poolConfig[idxAmAsId]
10371033 let prId = poolConfig[idxPrAsId]
11361132 else throw("Strict value is not equal to itself.")
11371133 }
11381134 else [ScriptTransfer(i.caller, emitLpAmt, lpAssetId)]
1139- let $t04223242374 = refreshDLpInternal(0, 0, 0)
1140- let refreshDLpActions = $t04223242374._1
1141- let updatedDLp = $t04223242374._2
1135+ let $t04203442176 = refreshDLpInternal(0, 0, 0)
1136+ let refreshDLpActions = $t04203442176._1
1137+ let updatedDLp = $t04203442176._2
11421138 let check = if ((updatedDLp >= currentDLp))
11431139 then true
11441140 else throwErr(makeString(["updated DLp lower than current DLp", toString(amountAssetBalance), toString(priceAssetBalance), toString(lpAssetEmission), toString(currentDLp), toString(updatedDLp), toString(amDiff), toString(prDiff)], " "))
12111207 else calcCurrentDLp(toBigInt(0), toBigInt(pmtAmt), toBigInt(0))
12121208 if ((currentDLp == currentDLp))
12131209 then {
1214- let $t04401544173 = calcPutOneTkn(pmtAmt, pmtAssetId, toString(userAddress), toBase58String(i.transactionId), true)
1215- if (($t04401544173 == $t04401544173))
1210+ let $t04381743975 = calcPutOneTkn(pmtAmt, pmtAssetId, toString(userAddress), toBase58String(i.transactionId), true)
1211+ if (($t04381743975 == $t04381743975))
12161212 then {
1217- let feeAmount = $t04401544173._3
1218- let state = $t04401544173._2
1219- let estimLP = $t04401544173._1
1213+ let feeAmount = $t04381743975._3
1214+ let state = $t04381743975._2
1215+ let estimLP = $t04381743975._1
12201216 let emitLpAmt = if (if ((minOutAmount > 0))
12211217 then (minOutAmount > estimLP)
12221218 else false)
12441240 let sendFeeToMatcher = if ((feeAmount > 0))
12451241 then [ScriptTransfer(feeCollectorAddress, feeAmount, fromBase58String(pmtAssetId))]
12461242 else nil
1247- let $t04505845407 = if ((this == feeCollectorAddress))
1243+ let $t04486045209 = if ((this == feeCollectorAddress))
12481244 then $Tuple2(0, 0)
12491245 else {
12501246 let paymentInAmountAsset = if ((pmt.assetId == cfgAmountAssetId))
12541250 then $Tuple2(-(feeAmount), 0)
12551251 else $Tuple2(0, -(feeAmount))
12561252 }
1257- let amountAssetBalanceDelta = $t04505845407._1
1258- let priceAssetBalanceDelta = $t04505845407._2
1259- let $t04541045518 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
1260- let refreshDLpActions = $t04541045518._1
1261- let updatedDLp = $t04541045518._2
1253+ let amountAssetBalanceDelta = $t04486045209._1
1254+ let priceAssetBalanceDelta = $t04486045209._2
1255+ let $t04521245320 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
1256+ let refreshDLpActions = $t04521245320._1
1257+ let updatedDLp = $t04521245320._2
12621258 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
12631259 if ((isUpdatedDLpValid == isUpdatedDLpValid))
12641260 then $Tuple2((((state ++ lpTrnsfr) ++ sendFeeToMatcher) ++ refreshDLpActions), emitLpAmt)
12901286 let currentDLp = calcCurrentDLp(amAssetPmt, prAssetPmt, toBigInt(0))
12911287 if ((currentDLp == currentDLp))
12921288 then {
1293- let $t04654846613 = refreshDLpInternal(0, 0, 0)
1294- let refreshDLpActions = $t04654846613._1
1295- let updatedDLp = $t04654846613._2
1289+ let $t04635046415 = refreshDLpInternal(0, 0, 0)
1290+ let refreshDLpActions = $t04635046415._1
1291+ let updatedDLp = $t04635046415._2
12961292 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
12971293 if ((isUpdatedDLpValid == isUpdatedDLpValid))
12981294 then (state ++ refreshDLpActions)
13171313 let b = invoke(fca, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
13181314 if ((b == b))
13191315 then {
1320- let $t04778647868 = refreshDLpInternal(-(outAmtAmt), -(outPrAmt), 0)
1321- let refreshDLpActions = $t04778647868._1
1322- let updatedDLp = $t04778647868._2
1316+ let $t04758847670 = refreshDLpInternal(-(outAmtAmt), -(outPrAmt), 0)
1317+ let refreshDLpActions = $t04758847670._1
1318+ let updatedDLp = $t04758847670._2
13231319 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
13241320 if ((isUpdatedDLpValid == isUpdatedDLpValid))
13251321 then (state ++ refreshDLpActions)
13541350 else throwErr("exactly 1 payment are expected")]
13551351 if ((checks == checks))
13561352 then {
1357- let $t04848648641 = getOneTknV2Internal(outAssetId, minOutAmount, i.payments, i.caller, i.originCaller, i.transactionId)
1358- let state = $t04848648641._1
1359- let totalAmount = $t04848648641._2
1353+ let $t04828848443 = getOneTknV2Internal(outAssetId, minOutAmount, i.payments, i.caller, i.originCaller, i.transactionId)
1354+ let state = $t04828848443._1
1355+ let totalAmount = $t04828848443._2
13601356 $Tuple2(state, totalAmount)
13611357 }
13621358 else throw("Strict value is not equal to itself.")
13731369 if ((checkLastRefreshedBlockHeight == checkLastRefreshedBlockHeight))
13741370 then {
13751371 let dLp = valueOrErrorMessage(parseBigInt(valueOrElse(getString(this, keyDLp), "0")), fmtErr("invalid dLp"))
1376- let $t04916549229 = refreshDLpInternal(0, 0, 0)
1377- let dLpUpdateActions = $t04916549229._1
1378- let updatedDLp = $t04916549229._2
1372+ let $t04896749031 = refreshDLpInternal(0, 0, 0)
1373+ let dLpUpdateActions = $t04896749031._1
1374+ let updatedDLp = $t04896749031._2
13791375 let actions = if ((dLp != updatedDLp))
13801376 then dLpUpdateActions
13811377 else throwErr("nothing to refresh")
14031399 let newY = getYD(xp, index, D1)
14041400 let dy = (xp[index] - newY)
14051401 let totalGetRaw = max([0, toInt((dy - big1))])
1406- let $t05023950294 = takeFee(totalGetRaw, outFee)
1407- let totalGet = $t05023950294._1
1408- let feeAmount = $t05023950294._2
1402+ let $t05004150096 = takeFee(totalGetRaw, outFee)
1403+ let totalGet = $t05004150096._1
1404+ let feeAmount = $t05004150096._2
14091405 $Tuple2(nil, $Tuple2(totalGet, feeAmount))
14101406 }
14111407
14181414 let lpId = toBase58String(value(cfgLpAssetId))
14191415 let amBalance = getAccBalance(amId)
14201416 let prBalance = getAccBalance(prId)
1421- let $t05066950784 = {
1417+ let $t05047150586 = {
14221418 let @ = invoke(this, "getOneTknV2READONLY", [outAssetId, lpAssetAmount], nil)
14231419 if ($isInstanceOf(@, "(Int, Int)"))
14241420 then @
14251421 else throw(($getType(@) + " couldn't be cast to (Int, Int)"))
14261422 }
1427- let totalGet = $t05066950784._1
1428- let feeAmount = $t05066950784._2
1423+ let totalGet = $t05047150586._1
1424+ let feeAmount = $t05047150586._2
14291425 let r = ego("", lpId, lpAssetAmount, this)
14301426 let outAmAmt = r._1
14311427 let outPrAmt = r._2
14591455 let burnLPAssetOnFactory = invoke(fca, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
14601456 if ((burnLPAssetOnFactory == burnLPAssetOnFactory))
14611457 then {
1462- let $t05195052031 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1463- let refreshDLpActions = $t05195052031._1
1464- let updatedDLp = $t05195052031._2
1458+ let $t05175251833 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1459+ let refreshDLpActions = $t05175251833._1
1460+ let updatedDLp = $t05175251833._2
14651461 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
14661462 if ((isUpdatedDLpValid == isUpdatedDLpValid))
14671463 then (state ++ refreshDLpActions)
15061502 let burnA = invoke(fca, "burn", [amount], [AttachedPayment(lpAssetId, amount)])
15071503 if ((burnA == burnA))
15081504 then {
1509- let $t05305853139 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1510- let refreshDLpActions = $t05305853139._1
1511- let updatedDLp = $t05305853139._2
1505+ let $t05286052941 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1506+ let refreshDLpActions = $t05286052941._1
1507+ let updatedDLp = $t05286052941._2
15121508 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
15131509 if ((isUpdatedDLpValid == isUpdatedDLpValid))
15141510 then (state ++ refreshDLpActions)
15591555 let burnLPAssetOnFactory = invoke(fca, "burn", [unstakeAmount], [AttachedPayment(cfgLpAssetId, unstakeAmount)])
15601556 if ((burnLPAssetOnFactory == burnLPAssetOnFactory))
15611557 then {
1562- let $t05439054471 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1563- let refreshDLpActions = $t05439054471._1
1564- let updatedDLp = $t05439054471._2
1558+ let $t05419254273 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1559+ let refreshDLpActions = $t05419254273._1
1560+ let updatedDLp = $t05419254273._2
15651561 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
15661562 if ((isUpdatedDLpValid == isUpdatedDLpValid))
15671563 then (state ++ refreshDLpActions)
16101606 let unstakeInv = invoke(staking, "unstakeINTERNAL", [lpAssetId, unstakeAmount, userAddress.bytes, lpAssetRecipientAddress.bytes], nil)
16111607 if ((unstakeInv == unstakeInv))
16121608 then {
1613- let $t05549355681 = getOneTknV2Internal(outAssetId, minOutAmount, [AttachedPayment(lpAssetId, unstakeAmount)], i.caller, i.originCaller, i.transactionId)
1614- let state = $t05549355681._1
1615- let totalAmount = $t05549355681._2
1609+ let $t05529555483 = getOneTknV2Internal(outAssetId, minOutAmount, [AttachedPayment(lpAssetId, unstakeAmount)], i.caller, i.originCaller, i.transactionId)
1610+ let state = $t05529555483._1
1611+ let totalAmount = $t05529555483._2
16161612 $Tuple2(state, totalAmount)
16171613 }
16181614 else throw("Strict value is not equal to itself.")
16241620
16251621 @Callable(i)
16261622 func putOneTknV2WithBonusREADONLY (paymentAmountRaw,paymentAssetId) = {
1627- let $t05580955912 = calcPutOneTkn(paymentAmountRaw, paymentAssetId, "", "", true)
1628- let lpAmount = $t05580955912._1
1629- let state = $t05580955912._2
1630- let feeAmount = $t05580955912._3
1631- let bonus = $t05580955912._4
1623+ let $t05561155714 = calcPutOneTkn(paymentAmountRaw, paymentAssetId, "", "", true)
1624+ let lpAmount = $t05561155714._1
1625+ let state = $t05561155714._2
1626+ let feeAmount = $t05561155714._3
1627+ let bonus = $t05561155714._4
16321628 $Tuple2(nil, $Tuple3(lpAmount, feeAmount, bonus))
16331629 }
16341630
16361632
16371633 @Callable(i)
16381634 func putOneTknV2WithoutTakeFeeREADONLY (paymentAmountRaw,paymentAssetId) = {
1639- let $t05606056164 = calcPutOneTkn(paymentAmountRaw, paymentAssetId, "", "", false)
1640- let lpAmount = $t05606056164._1
1641- let state = $t05606056164._2
1642- let feeAmount = $t05606056164._3
1643- let bonus = $t05606056164._4
1635+ let $t05586255966 = calcPutOneTkn(paymentAmountRaw, paymentAssetId, "", "", false)
1636+ let lpAmount = $t05586255966._1
1637+ let state = $t05586255966._2
1638+ let feeAmount = $t05586255966._3
1639+ let bonus = $t05586255966._4
16441640 $Tuple2(nil, $Tuple3(lpAmount, feeAmount, bonus))
16451641 }
16461642
16491645 @Callable(i)
16501646 func activate (amtAsStr,prAsStr) = if ((toString(i.caller) != toString(fca)))
16511647 then throw("denied")
1652- else $Tuple2([StringEntry(aa(), amtAsStr), StringEntry(pa(), prAsStr)], "success")
1648+ else $Tuple2([StringEntry(aa(), amtAsStr), StringEntry(pa(), prAsStr), StringEntry(amp(), toString(ampInitial))], "success")
16531649
16541650
16551651
17021698 @Callable(i)
17031699 func changeAmp () = {
17041700 let cfg = invoke(fca, "getChangeAmpConfigREADONLY", [toString(this)], nil)
1705- let $t05851858717 = match cfg {
1701+ let $t05837558574 = match cfg {
17061702 case list: List[Any] =>
17071703 $Tuple3({
17081704 let @ = list[0]
17231719 case _ =>
17241720 throwErr("invalid entry type")
17251721 }
1726- let delay = $t05851858717._1
1727- let delta = $t05851858717._2
1728- let target = $t05851858717._3
1722+ let delay = $t05837558574._1
1723+ let delta = $t05837558574._2
1724+ let target = $t05837558574._3
17291725 let curAmp = parseIntValue(getStringValue(amp()))
17301726 let newAmpRaw = (curAmp + delta)
17311727 let newAmp = if ((0 > delta))
17611757 match tx {
17621758 case order: Order =>
17631759 let matcherPub = mp()
1764- let $t05965059767 = if (skipOrderValidation())
1760+ let $t05950759624 = if (skipOrderValidation())
17651761 then $Tuple2(true, "")
17661762 else validateMatcherOrderAllowed(order)
1767- let orderValid = $t05965059767._1
1768- let orderValidInfo = $t05965059767._2
1763+ let orderValid = $t05950759624._1
1764+ let orderValidInfo = $t05950759624._2
17691765 let senderValid = sigVerify(order.bodyBytes, order.proofs[0], order.senderPublicKey)
17701766 let matcherValid = sigVerify(order.bodyBytes, order.proofs[1], matcherPub)
17711767 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"
25+
26+let ampInitial = 50
2527
2628 let Amult = "100"
2729
2830 let Dconv = "1"
2931
3032 let SEP = "__"
3133
3234 let EMPTY = ""
3335
3436 let PoolActive = 1
3537
3638 let PoolPutDis = 2
3739
3840 let PoolMatcherDis = 3
3941
4042 let PoolShutdown = 4
4143
4244 let idxPoolAddress = 1
4345
4446 let idxPoolSt = 2
4547
4648 let idxLPAsId = 3
4749
4850 let idxAmAsId = 4
4951
5052 let idxPrAsId = 5
5153
5254 let idxAmtAsDcm = 6
5355
5456 let idxPriceAsDcm = 7
5557
5658 let idxIAmtAsId = 8
5759
5860 let idxIPriceAsId = 9
5961
6062 let idxFactStakCntr = 1
6163
6264 let idxFactoryRestCntr = 6
6365
6466 let idxFactSlippCntr = 7
6567
6668 let idxFactGwxRewCntr = 10
6769
6870 let feeDefault = fraction(10, scale8, 10000)
6971
7072 func t1 (origVal,origScaleMult) = fraction(toBigInt(origVal), scale18, toBigInt(origScaleMult))
7173
7274
7375 func t1BigInt (origVal,origScaleMult) = fraction(origVal, scale18, origScaleMult)
7476
7577
7678 func f1 (val,resultScaleMult) = toInt(fraction(val, toBigInt(resultScaleMult), scale18))
7779
7880
7981 func fromX18Round (val,resultScaleMult,round) = toInt(fraction(val, toBigInt(resultScaleMult), scale18, round))
8082
8183
8284 func t2 (origVal,origScaleMult) = fraction(origVal, scale18, toBigInt(origScaleMult))
8385
8486
8587 func f2 (val,resultScaleMult) = fraction(val, toBigInt(resultScaleMult), scale18)
8688
8789
8890 func ts (amt,resScale,curScale) = fraction(amt, resScale, curScale)
8991
9092
9193 func abs (val) = if ((zeroBigInt > val))
9294 then -(val)
9395 else val
9496
9597
9698 func absBigInt (val) = if ((zeroBigInt > val))
9799 then -(val)
98100 else val
99101
100102
101103 func fc () = "%s__factoryContract"
102104
103105
104106 func keyManagerPublicKey () = "%s__managerPublicKey"
105107
106108
107109 func keyManagerVaultAddress () = "%s__managerVaultAddress"
108110
109111
110112 func pl () = "%s%s__price__last"
111113
112114
113115 func ph (h,t) = makeString(["%s%s%d%d__price__history", toString(h), toString(t)], SEP)
114116
115117
116118 func pau (ua,txId) = ((("%s%s%s__P__" + ua) + "__") + txId)
117119
118120
119121 func gau (ua,txId) = ((("%s%s%s__G__" + ua) + "__") + txId)
120122
121123
122124 func aa () = "%s__amountAsset"
123125
124126
125127 func pa () = "%s__priceAsset"
126128
127129
128130 func amp () = "%s__amp"
129131
130132
131133 func keyAmpHistory (heightBlocks) = ("%s%d__amp__" + toString(heightBlocks))
132134
133135
134136 func keyChangeAmpLastCall () = "%s__changeAmpLastCall"
135137
136138
137139 let keyFee = "%s__fee"
138140
139141 let fee = valueOrElse(getInteger(this, keyFee), feeDefault)
140142
141143 let keyDLp = makeString(["%s", "dLp"], SEP)
142144
143145 let keyDLpRefreshedHeight = makeString(["%s", "dLpRefreshedHeight"], SEP)
144146
145147 let keyDLpRefreshDelay = makeString(["%s", "refreshDLpDelay"], SEP)
146148
147149 let dLpRefreshDelayDefault = 30
148150
149151 let dLpRefreshDelay = valueOrElse(getInteger(this, keyDLpRefreshDelay), dLpRefreshDelayDefault)
150152
151153 func fcfg () = "%s__factoryConfig"
152154
153155
154156 func mtpk () = "%s%s__matcher__publicKey"
155157
156158
157159 func pc (iAmtAs,iPrAs) = (((("%d%d%s__" + iAmtAs) + "__") + iPrAs) + "__config")
158160
159161
160162 func mba (bAStr) = ("%s%s%s__mappings__baseAsset2internalId__" + bAStr)
161163
162164
163165 func aps () = "%s__shutdown"
164166
165167
166168 func keyAllowedLpStableScriptHash () = "%s__allowedLpStableScriptHash"
167169
168170
169171 func keyFeeCollectorAddress () = "%s__feeCollectorAddress"
170172
171173
172174 func keySkipOrderValidation (poolAddress) = ("%s%s__skipOrderValidation__" + poolAddress)
173175
174176
175177 func throwOrderError (orderValid,orderValidInfo,senderValid,matcherValid) = throw((((((((("order validation failed: orderValid=" + toString(orderValid)) + " (") + orderValidInfo) + ")") + " senderValid=") + toString(senderValid)) + " matcherValid=") + toString(matcherValid)))
176178
177179
178180 func addressFromStringOrThis (addressString) = match addressFromString(addressString) {
179181 case a: Address =>
180182 a
181183 case _ =>
182184 this
183185 }
184186
185187
186188 func getManagerVaultAddressOrThis () = {
187189 let factoryAddress = match getString(fc()) {
188190 case fca: String =>
189191 addressFromStringOrThis(fca)
190192 case _ =>
191193 this
192194 }
193195 match getString(factoryAddress, keyManagerVaultAddress()) {
194196 case s: String =>
195197 addressFromStringOrThis(s)
196198 case _ =>
197199 this
198200 }
199201 }
200202
201203
202204 func strf (addr,key) = valueOrErrorMessage(getString(addr, key), makeString(["mandatory ", toString(addr), ".", key, " not defined"], ""))
203205
204206
205207 func intf (addr,key) = valueOrErrorMessage(getInteger(addr, key), makeString(["mandatory ", toString(addr), ".", key, " not defined"], ""))
206208
207209
208210 func throwErr (msg) = throw(makeString(["lp_stable.ride:", msg], " "))
209211
210212
211213 func fmtErr (msg) = makeString(["lp_stable.ride:", msg], " ")
212214
213215
214216 let fca = addressFromStringValue(strf(this, fc()))
215217
216218 let inFee = {
217219 let @ = invoke(fca, "getInFeeREADONLY", [toString(this)], nil)
218220 if ($isInstanceOf(@, "Int"))
219221 then @
220222 else throw(($getType(@) + " couldn't be cast to Int"))
221223 }
222224
223225 let outFee = {
224226 let @ = invoke(fca, "getOutFeeREADONLY", [toString(this)], nil)
225227 if ($isInstanceOf(@, "Int"))
226228 then @
227229 else throw(($getType(@) + " couldn't be cast to Int"))
228230 }
229231
230232 let A = strf(this, amp())
231233
232234 func igs () = valueOrElse(getBoolean(fca, aps()), false)
233235
234236
235237 func mp () = fromBase58String(strf(fca, mtpk()))
236238
237239
238240 let feeCollectorAddress = addressFromStringValue(strf(fca, keyFeeCollectorAddress()))
239241
240242 func gpc () = {
241243 let amtAs = strf(this, aa())
242244 let priceAs = strf(this, pa())
243245 let iPriceAs = intf(fca, mba(priceAs))
244246 let iAmtAs = intf(fca, mba(amtAs))
245247 split(strf(fca, pc(toString(iAmtAs), toString(iPriceAs))), SEP)
246248 }
247249
248250
249251 func parseAssetId (input) = if ((input == wavesString))
250252 then unit
251253 else fromBase58String(input)
252254
253255
254256 func assetIdToString (input) = if ((input == unit))
255257 then wavesString
256258 else toBase58String(value(input))
257259
258260
259-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]))
261+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]))
260262
261263
262264 let poolConfigParsed = parsePoolConfig(gpc())
263265
264-let $t086868915 = poolConfigParsed
266+let $t086088794 = poolConfigParsed
265267
266-let cfgPoolAddress = $t086868915._1
268+let cfgPoolAddress = $t086088794._1
267269
268-let cfgPoolStatus = $t086868915._2
270+let cfgPoolStatus = $t086088794._2
269271
270-let cfgLpAssetId = $t086868915._3
272+let cfgLpAssetId = $t086088794._3
271273
272-let cfgAmountAssetId = $t086868915._4
274+let cfgAmountAssetId = $t086088794._4
273275
274-let cfgPriceAssetId = $t086868915._5
276+let cfgPriceAssetId = $t086088794._5
275277
276-let cfgAmountAssetDecimals = $t086868915._6
278+let cfgAmountAssetDecimals = $t086088794._6
277279
278-let cfgPriceAssetDecimals = $t086868915._7
279-
280-let cfgInAmountAssedId = $t086868915._8
281-
282-let cfgInPriceAssetId = $t086868915._9
280+let cfgPriceAssetDecimals = $t086088794._7
283281
284282 func gfc () = split(strf(fca, fcfg()), SEP)
285283
286284
287285 let factoryConfig = gfc()
288286
289287 let stakingContract = valueOrErrorMessage(addressFromString(factoryConfig[idxFactStakCntr]), "Invalid staking contract address")
290288
291289 let slipageContract = valueOrErrorMessage(addressFromString(factoryConfig[idxFactSlippCntr]), "Invalid slipage contract address")
292290
293291 let gwxContract = valueOrErrorMessage(addressFromString(factoryConfig[idxFactGwxRewCntr]), "Invalid gwx contract address")
294292
295293 let restContract = valueOrErrorMessage(addressFromString(factoryConfig[idxFactoryRestCntr]), "Invalid gwx contract address")
296294
297295 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)
298296
299297
300298 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)
301299
302300
303301 func getAccBalance (assetId) = if ((assetId == "WAVES"))
304302 then wavesBalance(this).available
305303 else assetBalance(this, fromBase58String(assetId))
306304
307305
308306 func cpbi (prAmtX18,amAmtX18) = fraction(prAmtX18, scale18, amAmtX18)
309307
310308
311309 func cpbir (prAmtX18,amAmtX18,round) = fraction(prAmtX18, scale18, amAmtX18, round)
312310
313311
314312 func vad (A1,A2,slippage) = {
315313 let diff = fraction((A1 - A2), scale8BigInt, A2)
316314 let pass = ((slippage - abs(diff)) > zeroBigInt)
317315 if (!(pass))
318316 then throw(("Big slpg: " + toString(diff)))
319317 else $Tuple2(pass, min([A1, A2]))
320318 }
321319
322320
323321 func vd (D1,D0,slpg) = {
324322 let diff = fraction(D0, scale8BigInt, D1)
325323 let fail = (slpg > diff)
326324 if (if (fail)
327325 then true
328326 else (D0 > D1))
329327 then throw(((((((toString(D0) + " ") + toString(D1)) + " ") + toString(diff)) + " ") + toString(slpg)))
330328 else fail
331329 }
332330
333331
334332 func pcp (amAssetDcm,prAssetDcm,amAmt,prAmt) = {
335333 let amtAsAmtX18 = t1(amAmt, amAssetDcm)
336334 let prAsAmtX18 = t1(prAmt, prAssetDcm)
337335 cpbi(prAsAmtX18, amtAsAmtX18)
338336 }
339337
340338
341339 func calcPrices (amAmt,prAmt,lpAmt) = {
342340 let amtAsDcm = cfgAmountAssetDecimals
343341 let prAsDcm = cfgPriceAssetDecimals
344342 let priceX18 = pcp(amtAsDcm, prAsDcm, amAmt, prAmt)
345343 let amAmtX18 = t1(amAmt, amtAsDcm)
346344 let prAmtX18 = t1(prAmt, prAsDcm)
347345 let lpAmtX18 = t1(lpAmt, scale8)
348346 let lpPrInAmAsX18 = cpbi(amAmtX18, lpAmtX18)
349347 let lpPrInPrAsX18 = cpbi(prAmtX18, lpAmtX18)
350348 [priceX18, lpPrInAmAsX18, lpPrInPrAsX18]
351349 }
352350
353351
354352 func calculatePrices (amAmt,prAmt,lpAmt) = {
355353 let p = calcPrices(amAmt, prAmt, lpAmt)
356354 [f1(p[0], scale8), f1(p[1], scale8), f1(p[2], scale8)]
357355 }
358356
359357
360358 func takeFee (amount,fee) = {
361359 let feeAmount = if ((fee == 0))
362360 then 0
363361 else fraction(amount, fee, scale8)
364362 $Tuple2((amount - feeAmount), feeAmount)
365363 }
366364
367365
368366 func getD (xp) = {
369367 let xp0 = xp[0]
370368 let xp1 = xp[1]
371369 let s = (xp0 + xp1)
372370 if ((s == big0))
373371 then big0
374372 else {
375373 let a = parseIntValue(A)
376374 let ann = (a * 2)
377375 let p = fraction(xp0, xp1, big1)
378376 let xp0_xp1_n_n = fraction(p, big4, big1)
379377 let ann_s = fraction(toBigInt(ann), s, big1)
380378 let ann_1 = toBigInt((ann - 1))
381379 func calcDNext (d) = {
382380 let dd = fraction(d, d, big1)
383381 let ddd = fraction(dd, d, big1)
384382 let dp = fraction(ddd, big1, xp0_xp1_n_n)
385383 fraction((ann_s + fraction(dp, big2, big1)), d, (fraction(ann_1, d, big1) + fraction(big3, dp, big1)))
386384 }
387385
388386 func calc (acc,i) = if (acc._2)
389387 then acc
390388 else {
391389 let d = acc._1
392390 let dNext = calcDNext(d)
393391 let dDiffRaw = (dNext - value(d))
394392 let dDiff = if ((big0 > dDiffRaw))
395393 then -(dDiffRaw)
396394 else dDiffRaw
397395 if ((big1 >= dDiff))
398396 then $Tuple2(dNext, true)
399397 else $Tuple2(dNext, false)
400398 }
401399
402400 let arr = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16]
403- let $t01342013468 = {
401+ let $t01329913347 = {
404402 let $l = arr
405403 let $s = size($l)
406404 let $acc0 = $Tuple2(s, false)
407405 func $f0_1 ($a,$i) = if (($i >= $s))
408406 then $a
409407 else calc($a, $l[$i])
410408
411409 func $f0_2 ($a,$i) = if (($i >= $s))
412410 then $a
413411 else throw("List size exceeds 17")
414412
415413 $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)
416414 }
417- let d = $t01342013468._1
418- let found = $t01342013468._2
415+ let d = $t01329913347._1
416+ let found = $t01329913347._2
419417 if (found)
420418 then d
421419 else throw(("D calculation error, D = " + toString(d)))
422420 }
423421 }
424422
425423
426424 func ego (txId58,pmtAssetId,pmtLpAmt,userAddress) = {
427425 let lpId = cfgLpAssetId
428426 let amId = toBase58String(value(cfgAmountAssetId))
429427 let prId = toBase58String(value(cfgPriceAssetId))
430428 let amDcm = cfgAmountAssetDecimals
431429 let prDcm = cfgPriceAssetDecimals
432430 let sts = toString(cfgPoolStatus)
433431 let lpEmiss = valueOrErrorMessage(assetInfo(lpId), "Wrong LP id").quantity
434432 if ((toBase58String(lpId) != pmtAssetId))
435433 then throw("Wrong pmt asset")
436434 else {
437435 let amBalance = getAccBalance(amId)
438436 let amBalanceX18 = t1(amBalance, amDcm)
439437 let prBalance = getAccBalance(prId)
440438 let prBalanceX18 = t1(prBalance, prDcm)
441439 let curPriceX18 = cpbi(prBalanceX18, amBalanceX18)
442440 let curPrice = f1(curPriceX18, scale8)
443441 let pmtLpAmtX18 = t1(pmtLpAmt, scale8)
444442 let lpEmissX18 = t1(lpEmiss, scale8)
445443 let outAmAmtX18 = fraction(amBalanceX18, pmtLpAmtX18, lpEmissX18)
446444 let outPrAmtX18 = fraction(prBalanceX18, pmtLpAmtX18, lpEmissX18)
447445 let outAmAmt = fromX18Round(outAmAmtX18, amDcm, FLOOR)
448446 let outPrAmt = fromX18Round(outPrAmtX18, prDcm, FLOOR)
449447 let state = if ((txId58 == ""))
450448 then nil
451449 else [ScriptTransfer(userAddress, outAmAmt, if ((amId == "WAVES"))
452450 then unit
453451 else fromBase58String(amId)), ScriptTransfer(userAddress, outPrAmt, if ((prId == "WAVES"))
454452 then unit
455453 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)]
456454 $Tuple10(outAmAmt, outPrAmt, amId, prId, amBalance, prBalance, lpEmiss, curPriceX18, sts, state)
457455 }
458456 }
459457
460458
461459 func epo (txId58,slippage,inAmAmt,inAmId,inPrAmt,inPrId,userAddress,isEval,emitLp,isOneAsset,validateSlippage,pmtAmt,pmtId) = {
462460 let lpId = cfgLpAssetId
463461 let amIdStr = toBase58String(value(cfgAmountAssetId))
464462 let prIdStr = toBase58String(value(cfgPriceAssetId))
465- let inAmIdStr = cfgInAmountAssedId
466- let inPrIdStr = cfgInPriceAssetId
467463 let amtDcm = cfgAmountAssetDecimals
468464 let priceDcm = cfgPriceAssetDecimals
469465 let sts = toString(cfgPoolStatus)
470466 let lpEm = valueOrErrorMessage(assetInfo(lpId), "Wr lp as").quantity
471467 let amBalance = if (isEval)
472468 then getAccBalance(amIdStr)
473469 else if (if (isOneAsset)
474470 then (pmtId == amIdStr)
475471 else false)
476472 then (getAccBalance(amIdStr) - pmtAmt)
477473 else if (isOneAsset)
478474 then getAccBalance(amIdStr)
479475 else (getAccBalance(amIdStr) - inAmAmt)
480476 let prBalance = if (isEval)
481477 then getAccBalance(prIdStr)
482478 else if (if (isOneAsset)
483479 then (pmtId == prIdStr)
484480 else false)
485481 then (getAccBalance(prIdStr) - pmtAmt)
486482 else if (isOneAsset)
487483 then getAccBalance(prIdStr)
488484 else (getAccBalance(prIdStr) - inPrAmt)
489485 let inAmAssetAmtX18 = t1(inAmAmt, amtDcm)
490486 let inPrAssetAmtX18 = t1(inPrAmt, priceDcm)
491487 let userPriceX18 = cpbi(inPrAssetAmtX18, inAmAssetAmtX18)
492488 let amBalanceX18 = t1(amBalance, amtDcm)
493489 let prBalanceX18 = t1(prBalance, priceDcm)
494490 let D0 = getD([amBalanceX18, prBalanceX18])
495491 let r = if ((lpEm == 0))
496492 then {
497493 let D1 = getD([(amBalanceX18 + inAmAssetAmtX18), (prBalanceX18 + inPrAssetAmtX18)])
498494 let checkD = if ((D1 > D0))
499495 then true
500496 else throw("D1 should be greater than D0")
501497 if ((checkD == checkD))
502498 then {
503499 let curPriceX18 = zeroBigInt
504500 let slippageX18 = zeroBigInt
505501 let lpAmtX18 = D1
506502 $Tuple5(f1(lpAmtX18, scale8), f1(inAmAssetAmtX18, amtDcm), f1(inPrAssetAmtX18, priceDcm), cpbi((prBalanceX18 + inPrAssetAmtX18), (amBalanceX18 + inAmAssetAmtX18)), slippageX18)
507503 }
508504 else throw("Strict value is not equal to itself.")
509505 }
510506 else {
511507 let curPriceX18 = cpbi(prBalanceX18, amBalanceX18)
512508 let slippageRealX18 = fraction(abs((curPriceX18 - userPriceX18)), scale18, curPriceX18)
513509 let slippageX18 = t1(slippage, scale8)
514510 if (if (if (validateSlippage)
515511 then (curPriceX18 != zeroBigInt)
516512 else false)
517513 then (slippageRealX18 > slippageX18)
518514 else false)
519515 then throw(((("Price slippage " + toString(slippageRealX18)) + " > ") + toString(slippageX18)))
520516 else {
521517 let lpEmissionX18 = t1(lpEm, scale8)
522518 let prViaAmX18 = fraction(inAmAssetAmtX18, cpbir(prBalanceX18, amBalanceX18, CEILING), scale18, CEILING)
523519 let amViaPrX18 = fraction(inPrAssetAmtX18, scale18, cpbir(prBalanceX18, amBalanceX18, FLOOR), CEILING)
524520 let expectedAmts = if ((prViaAmX18 > inPrAssetAmtX18))
525521 then $Tuple2(amViaPrX18, inPrAssetAmtX18)
526522 else $Tuple2(inAmAssetAmtX18, prViaAmX18)
527523 let expAmtAssetAmtX18 = expectedAmts._1
528524 let expPriceAssetAmtX18 = expectedAmts._2
529525 let D1 = getD([(amBalanceX18 + expAmtAssetAmtX18), (prBalanceX18 + expPriceAssetAmtX18)])
530526 let checkD = if ((D1 > D0))
531527 then true
532528 else throw("D1 should be greater than D0")
533529 if ((checkD == checkD))
534530 then {
535531 let lpAmtX18 = fraction(lpEmissionX18, (D1 - D0), D0)
536532 $Tuple5(fromX18Round(lpAmtX18, scale8, FLOOR), fromX18Round(expAmtAssetAmtX18, amtDcm, CEILING), fromX18Round(expPriceAssetAmtX18, priceDcm, CEILING), curPriceX18, slippageX18)
537533 }
538534 else throw("Strict value is not equal to itself.")
539535 }
540536 }
541537 let calcLpAmt = r._1
542538 let calcAmAssetPmt = r._2
543539 let calcPrAssetPmt = r._3
544540 let curPrice = f1(r._4, scale8)
545541 let slippageCalc = f1(r._5, scale8)
546542 if ((0 >= calcLpAmt))
547543 then throw("LP <= 0")
548544 else {
549545 let emitLpAmt = if (!(emitLp))
550546 then 0
551547 else calcLpAmt
552548 let amDiff = (inAmAmt - calcAmAssetPmt)
553549 let prDiff = (inPrAmt - calcPrAssetPmt)
554- let $t02130721652 = if (if (isOneAsset)
550+ let $t02110921454 = if (if (isOneAsset)
555551 then (pmtId == amIdStr)
556552 else false)
557553 then $Tuple2(pmtAmt, 0)
558554 else if (if (isOneAsset)
559555 then (pmtId == prIdStr)
560556 else false)
561557 then $Tuple2(0, pmtAmt)
562558 else $Tuple2(calcAmAssetPmt, calcPrAssetPmt)
563- let writeAmAmt = $t02130721652._1
564- let writePrAmt = $t02130721652._2
559+ let writeAmAmt = $t02110921454._1
560+ let writePrAmt = $t02110921454._2
565561 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))]
566562 $Tuple13(calcLpAmt, emitLpAmt, curPrice, amBalance, prBalance, lpEm, lpId, sts, commonState, amDiff, prDiff, inAmId, inPrId)
567563 }
568564 }
569565
570566
571567 func getYD (xp,i,D) = {
572568 let n = big2
573569 let x = xp[if ((i == 0))
574570 then 1
575571 else 0]
576572 let aPrecision = parseBigIntValue(Amult)
577573 let a = (parseBigIntValue(A) * aPrecision)
578574 let s = x
579575 let ann = (a * n)
580576 let c = (((((D * D) / (x * n)) * D) * aPrecision) / (ann * n))
581577 let b = ((s + ((D * aPrecision) / ann)) - D)
582578 func calc (acc,cur) = {
583- let $t02284722867 = acc
584- let y = $t02284722867._1
585- let found = $t02284722867._2
579+ let $t02264922669 = acc
580+ let y = $t02264922669._1
581+ let found = $t02264922669._2
586582 if ((found != unit))
587583 then acc
588584 else {
589585 let yNext = (((y * y) + c) / ((big2 * y) + b))
590586 let yDiff = absBigInt((yNext - value(y)))
591587 if ((big1 >= yDiff))
592588 then $Tuple2(yNext, cur)
593589 else $Tuple2(yNext, unit)
594590 }
595591 }
596592
597593 let arr = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
598- let $t02317423221 = {
594+ let $t02297623023 = {
599595 let $l = arr
600596 let $s = size($l)
601597 let $acc0 = $Tuple2(D, unit)
602598 func $f0_1 ($a,$i) = if (($i >= $s))
603599 then $a
604600 else calc($a, $l[$i])
605601
606602 func $f0_2 ($a,$i) = if (($i >= $s))
607603 then $a
608604 else throw("List size exceeds 15")
609605
610606 $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)
611607 }
612- let y = $t02317423221._1
613- let found = $t02317423221._2
608+ let y = $t02297623023._1
609+ let found = $t02297623023._2
614610 if ((found != unit))
615611 then y
616612 else throw(("Y calculation error, Y = " + toString(y)))
617613 }
618614
619615
620616 func calcDLp (amountBalance,priceBalance,lpEmission) = {
621617 let updatedDLp = fraction(getD([t1BigInt(amountBalance, toBigInt(cfgAmountAssetDecimals)), t1BigInt(priceBalance, toBigInt(cfgPriceAssetDecimals))]), scale18, lpEmission)
622618 if ((lpEmission == big0))
623619 then big0
624620 else updatedDLp
625621 }
626622
627623
628624 func calcCurrentDLp (amountAssetDelta,priceAssetDelta,lpAssetEmissionDelta) = {
629625 let amountAssetBalance = (toBigInt(getAccBalance(assetIdToString(cfgAmountAssetId))) - amountAssetDelta)
630626 let priceAssetBalance = (toBigInt(getAccBalance(assetIdToString(cfgPriceAssetId))) - priceAssetDelta)
631627 let lpAssetEmission = (toBigInt(value(assetInfo(cfgLpAssetId)).quantity) - lpAssetEmissionDelta)
632628 let currentDLp = calcDLp(amountAssetBalance, priceAssetBalance, lpAssetEmission)
633629 currentDLp
634630 }
635631
636632
637633 func refreshDLpInternal (amountAssetBalanceDelta,priceAssetBalanceDelta,lpAssetEmissionDelta) = {
638634 let amountAssetBalance = (getAccBalance(assetIdToString(cfgAmountAssetId)) + amountAssetBalanceDelta)
639635 let priceAssetBalance = (getAccBalance(assetIdToString(cfgPriceAssetId)) + priceAssetBalanceDelta)
640636 let lpAssetEmission = (value(assetInfo(cfgLpAssetId)).quantity + lpAssetEmissionDelta)
641637 let updatedDLp = calcDLp(toBigInt(amountAssetBalance), toBigInt(priceAssetBalance), toBigInt(lpAssetEmission))
642638 let actions = [IntegerEntry(keyDLpRefreshedHeight, height), StringEntry(keyDLp, toString(updatedDLp))]
643639 $Tuple2(actions, updatedDLp)
644640 }
645641
646642
647643 func validateUpdatedDLp (oldDLp,updatedDLp) = if ((updatedDLp >= oldDLp))
648644 then true
649645 else throwErr("updated DLp lower than current DLp")
650646
651647
652648 func validateMatcherOrderAllowed (order) = {
653649 let amountAssetBalance = getAccBalance(assetIdToString(cfgAmountAssetId))
654650 let priceAssetBalance = getAccBalance(assetIdToString(cfgPriceAssetId))
655651 let amountAssetAmount = order.amount
656652 let priceAssetAmount = fraction(order.amount, order.price, scale8, FLOOR)
657- let $t02541925631 = if ((order.orderType == Buy))
653+ let $t02522125433 = if ((order.orderType == Buy))
658654 then $Tuple2(amountAssetAmount, -(priceAssetAmount))
659655 else $Tuple2(-(amountAssetAmount), priceAssetAmount)
660- let amountAssetBalanceDelta = $t02541925631._1
661- let priceAssetBalanceDelta = $t02541925631._2
656+ let amountAssetBalanceDelta = $t02522125433._1
657+ let priceAssetBalanceDelta = $t02522125433._2
662658 if (if (if (igs())
663659 then true
664660 else (cfgPoolStatus == PoolMatcherDis))
665661 then true
666662 else (cfgPoolStatus == PoolShutdown))
667663 then throw("Admin blocked")
668664 else if (if ((order.assetPair.amountAsset != cfgAmountAssetId))
669665 then true
670666 else (order.assetPair.priceAsset != cfgPriceAssetId))
671667 then throw("Wr assets")
672668 else {
673669 let dLp = parseBigIntValue(valueOrElse(getString(this, keyDLp), "0"))
674- let $t02597326073 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
675- let unusedActions = $t02597326073._1
676- let dLpNew = $t02597326073._2
670+ let $t02577525875 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
671+ let unusedActions = $t02577525875._1
672+ let dLpNew = $t02577525875._2
677673 let isOrderValid = (dLpNew >= dLp)
678674 let info = makeString(["dLp=", toString(dLp), " dLpNew=", toString(dLpNew), " amountAssetBalance=", toString(amountAssetBalance), " priceAssetBalance=", toString(priceAssetBalance), " amountAssetBalanceDelta=", toString(amountAssetBalanceDelta), " priceAssetBalanceDelta=", toString(priceAssetBalanceDelta), " height=", toString(height)], "")
679675 $Tuple2(isOrderValid, info)
680676 }
681677 }
682678
683679
684680 func cg (i) = if ((size(i.payments) != 1))
685681 then throw("1 pmnt exp")
686682 else {
687683 let pmt = value(i.payments[0])
688684 let pmtAssetId = value(pmt.assetId)
689685 let pmtAmt = pmt.amount
690686 let r = ego(toBase58String(i.transactionId), toBase58String(pmtAssetId), pmtAmt, i.caller)
691687 let outAmAmt = r._1
692688 let outPrAmt = r._2
693689 let sts = parseIntValue(r._9)
694690 let state = r._10
695691 if (if (igs())
696692 then true
697693 else (sts == PoolShutdown))
698694 then throw(("Admin blocked: " + toString(sts)))
699695 else $Tuple5(outAmAmt, outPrAmt, pmtAmt, pmtAssetId, state)
700696 }
701697
702698
703699 func cp (caller,txId,amAsPmt,prAsPmt,slippage,emitLp,isOneAsset,validateSlippage,pmtAmt,pmtId) = {
704700 let r = epo(txId, slippage, value(amAsPmt).amount, value(amAsPmt).assetId, value(prAsPmt).amount, value(prAsPmt).assetId, caller, (txId == ""), emitLp, isOneAsset, validateSlippage, pmtAmt, pmtId)
705701 let sts = parseIntValue(r._8)
706702 if (if (if (igs())
707703 then true
708704 else (sts == PoolPutDis))
709705 then true
710706 else (sts == PoolShutdown))
711707 then throw(("Blocked:" + toString(sts)))
712708 else r
713709 }
714710
715711
716712 func calcPutOneTkn (pmtAmtRaw,pmtAssetId,userAddress,txId,withTakeFee) = {
717713 let amId = toBase58String(value(cfgAmountAssetId))
718714 let prId = toBase58String(value(cfgPriceAssetId))
719715 let lpId = cfgLpAssetId
720716 let amtDcm = cfgAmountAssetDecimals
721717 let priceDcm = cfgPriceAssetDecimals
722718 let lpAssetEmission = toBigInt(valueOrErrorMessage(assetInfo(lpId), "invalid lp asset").quantity)
723719 let chechEmission = if ((lpAssetEmission > big0))
724720 then true
725721 else throw("initial deposit requires all coins")
726722 if ((chechEmission == chechEmission))
727723 then {
728724 let amBalance = getAccBalance(amId)
729725 let prBalance = getAccBalance(prId)
730- let $t02872929191 = if ((txId == ""))
726+ let $t02853128993 = if ((txId == ""))
731727 then $Tuple2(amBalance, prBalance)
732728 else if ((pmtAssetId == amId))
733729 then if ((pmtAmtRaw > amBalance))
734730 then throw("invalid payment amount")
735731 else $Tuple2((amBalance - pmtAmtRaw), prBalance)
736732 else if ((pmtAssetId == prId))
737733 then if ((pmtAmtRaw > prBalance))
738734 then throw("invalid payment amount")
739735 else $Tuple2(amBalance, (prBalance - pmtAmtRaw))
740736 else throw("wrong pmtAssetId")
741- let amBalanceOld = $t02872929191._1
742- let prBalanceOld = $t02872929191._2
743- let $t02919729373 = if ((pmtAssetId == amId))
737+ let amBalanceOld = $t02853128993._1
738+ let prBalanceOld = $t02853128993._2
739+ let $t02899929175 = if ((pmtAssetId == amId))
744740 then $Tuple2(pmtAmtRaw, 0)
745741 else if ((pmtAssetId == prId))
746742 then $Tuple2(0, pmtAmtRaw)
747743 else throw("invalid payment")
748- let amAmountRaw = $t02919729373._1
749- let prAmountRaw = $t02919729373._2
750- let $t02937729631 = if (withTakeFee)
744+ let amAmountRaw = $t02899929175._1
745+ let prAmountRaw = $t02899929175._2
746+ let $t02917929433 = if (withTakeFee)
751747 then $Tuple3(takeFee(amAmountRaw, inFee)._1, takeFee(prAmountRaw, inFee)._1, takeFee(pmtAmtRaw, inFee)._2)
752748 else $Tuple3(amAmountRaw, prAmountRaw, 0)
753- let amAmount = $t02937729631._1
754- let prAmount = $t02937729631._2
755- let feeAmount = $t02937729631._3
749+ let amAmount = $t02917929433._1
750+ let prAmount = $t02917929433._2
751+ let feeAmount = $t02917929433._3
756752 let amBalanceNew = (amBalanceOld + amAmount)
757753 let prBalanceNew = (prBalanceOld + prAmount)
758754 let D0 = getD([t1(amBalanceOld, cfgAmountAssetDecimals), t1(prBalanceOld, cfgPriceAssetDecimals)])
759755 let D1 = getD([t1(amBalanceNew, cfgAmountAssetDecimals), t1(prBalanceNew, cfgPriceAssetDecimals)])
760756 let checkD = if ((D1 > D0))
761757 then true
762758 else throw()
763759 if ((checkD == checkD))
764760 then {
765761 let lpAmount = fraction(lpAssetEmission, (D1 - D0), D0, FLOOR)
766762 let curPrice = f1(cpbi(t1(prBalanceNew, priceDcm), t1(amBalanceNew, amtDcm)), scale8)
767763 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))]
768764 let poolProportion = fraction(prBalanceOld, scale8, amBalanceOld)
769765 let amountAssetPart = fraction(pmtAmtRaw, scale8, (poolProportion + scale8))
770766 let priceAssetPart = (pmtAmtRaw - amountAssetPart)
771767 let lpAmtBoth = fraction(lpAssetEmission, toBigInt(priceAssetPart), toBigInt(prBalanceOld))
772768 let bonus = toInt(fraction((lpAmount - lpAmtBoth), scale8BigInt, lpAmtBoth))
773769 $Tuple4(toInt(lpAmount), commonState, feeAmount, bonus)
774770 }
775771 else throw("Strict value is not equal to itself.")
776772 }
777773 else throw("Strict value is not equal to itself.")
778774 }
779775
780776
781777 func getOneTknV2Internal (outAssetId,minOutAmount,payments,caller,originCaller,transactionId) = {
782778 let lpId = toBase58String(value(cfgLpAssetId))
783779 let amId = toBase58String(value(cfgAmountAssetId))
784780 let prId = toBase58String(value(cfgPriceAssetId))
785781 let amDecimals = cfgAmountAssetDecimals
786782 let prDecimals = cfgPriceAssetDecimals
787783 let poolStatus = cfgPoolStatus
788784 let userAddress = if ((caller == restContract))
789785 then originCaller
790786 else caller
791787 let pmt = value(payments[0])
792788 let pmtAssetId = value(pmt.assetId)
793789 let pmtAmt = pmt.amount
794790 let currentDLp = calcCurrentDLp(big0, big0, big0)
795791 if ((currentDLp == currentDLp))
796792 then {
797793 let txId58 = toBase58String(transactionId)
798794 if ((lpId != toBase58String(pmtAssetId)))
799795 then throw("Wrong LP")
800796 else {
801797 let amBalance = getAccBalance(amId)
802798 let prBalance = getAccBalance(prId)
803- let $t03174331854 = {
799+ let $t03154531656 = {
804800 let @ = invoke(this, "getOneTknV2READONLY", [outAssetId, pmtAmt], nil)
805801 if ($isInstanceOf(@, "(Int, Int)"))
806802 then @
807803 else throw(($getType(@) + " couldn't be cast to (Int, Int)"))
808804 }
809- if (($t03174331854 == $t03174331854))
805+ if (($t03154531656 == $t03154531656))
810806 then {
811- let feeAmount = $t03174331854._2
812- let totalGet = $t03174331854._1
807+ let feeAmount = $t03154531656._2
808+ let totalGet = $t03154531656._1
813809 let totalAmount = if (if ((minOutAmount > 0))
814810 then (minOutAmount > totalGet)
815811 else false)
816812 then throwErr(makeString(["amount to receive is less than ", toString(minOutAmount)], ""))
817813 else totalGet
818- let $t03204432351 = if ((outAssetId == amId))
814+ let $t03184632153 = if ((outAssetId == amId))
819815 then $Tuple4(totalAmount, 0, ((amBalance - totalAmount) - feeAmount), prBalance)
820816 else if ((outAssetId == prId))
821817 then $Tuple4(0, totalAmount, amBalance, ((prBalance - totalAmount) - feeAmount))
822818 else throw("invalid out asset id")
823- let outAm = $t03204432351._1
824- let outPr = $t03204432351._2
825- let amBalanceNew = $t03204432351._3
826- let prBalanceNew = $t03204432351._4
819+ let outAm = $t03184632153._1
820+ let outPr = $t03184632153._2
821+ let amBalanceNew = $t03184632153._3
822+ let prBalanceNew = $t03184632153._4
827823 let curPrX18 = cpbi(t1(prBalanceNew, prDecimals), t1(amBalanceNew, amDecimals))
828824 let curPr = f1(curPrX18, scale8)
829825 let outAssetIdOrWaves = if ((outAssetId == "WAVES"))
830826 then unit
831827 else fromBase58String(outAssetId)
832828 let sendFeeToMatcher = if ((feeAmount > 0))
833829 then [ScriptTransfer(feeCollectorAddress, feeAmount, outAssetIdOrWaves)]
834830 else nil
835831 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)
836832 if ((state == state))
837833 then {
838834 let burn = invoke(fca, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
839835 if ((burn == burn))
840836 then {
841- let $t03313633486 = {
837+ let $t03293833288 = {
842838 let feeAmountForCalc = if ((this == feeCollectorAddress))
843839 then 0
844840 else feeAmount
845841 let outInAmountAsset = if ((parseAssetId(outAssetId) == cfgAmountAssetId))
846842 then true
847843 else false
848844 if (outInAmountAsset)
849845 then $Tuple2(-((totalGet + feeAmountForCalc)), 0)
850846 else $Tuple2(0, -((totalGet + feeAmountForCalc)))
851847 }
852- let amountAssetBalanceDelta = $t03313633486._1
853- let priceAssetBalanceDelta = $t03313633486._2
854- let $t03348933597 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
855- let refreshDLpActions = $t03348933597._1
856- let updatedDLp = $t03348933597._2
848+ let amountAssetBalanceDelta = $t03293833288._1
849+ let priceAssetBalanceDelta = $t03293833288._2
850+ let $t03329133399 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
851+ let refreshDLpActions = $t03329133399._1
852+ let updatedDLp = $t03329133399._2
857853 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
858854 if ((isUpdatedDLpValid == isUpdatedDLpValid))
859855 then $Tuple2((state ++ refreshDLpActions), totalAmount)
860856 else throw("Strict value is not equal to itself.")
861857 }
862858 else throw("Strict value is not equal to itself.")
863859 }
864860 else throw("Strict value is not equal to itself.")
865861 }
866862 else throw("Strict value is not equal to itself.")
867863 }
868864 }
869865 else throw("Strict value is not equal to itself.")
870866 }
871867
872868
873869 func managerPublicKeyOrUnit () = {
874870 let managerVaultAddress = getManagerVaultAddressOrThis()
875871 match getString(managerVaultAddress, keyManagerPublicKey()) {
876872 case s: String =>
877873 fromBase58String(s)
878874 case _: Unit =>
879875 unit
880876 case _ =>
881877 throw("Match error")
882878 }
883879 }
884880
885881
886882 let pd = throw("Permission denied")
887883
888884 func isManager (i) = match managerPublicKeyOrUnit() {
889885 case pk: ByteVector =>
890886 (i.callerPublicKey == pk)
891887 case _: Unit =>
892888 (i.caller == this)
893889 case _ =>
894890 throw("Match error")
895891 }
896892
897893
898894 func mustManager (i) = match managerPublicKeyOrUnit() {
899895 case pk: ByteVector =>
900896 if ((i.callerPublicKey == pk))
901897 then true
902898 else pd
903899 case _: Unit =>
904900 if ((i.caller == this))
905901 then true
906902 else pd
907903 case _ =>
908904 throw("Match error")
909905 }
910906
911907
912908 func getY (isReverse,D,poolAmountInBalance) = {
913909 let poolConfig = gpc()
914910 let amId = poolConfig[idxAmAsId]
915911 let prId = poolConfig[idxPrAsId]
916912 let n = big2
917913 let aPrecision = parseBigIntValue(Amult)
918914 let a = (parseBigIntValue(A) * aPrecision)
919915 let xp = if ((isReverse == false))
920916 then [(toBigInt(getAccBalance(amId)) + poolAmountInBalance), toBigInt(getAccBalance(prId))]
921917 else [(toBigInt(getAccBalance(prId)) + poolAmountInBalance), toBigInt(getAccBalance(amId))]
922918 let x = xp[0]
923919 let s = x
924920 let ann = (a * n)
925921 let c = (((((D * D) / (x * n)) * D) * aPrecision) / (ann * n))
926922 let b = ((s + ((D * aPrecision) / ann)) - D)
927923 func calc (acc,cur) = {
928- let $t03508435104 = acc
929- let y = $t03508435104._1
930- let found = $t03508435104._2
924+ let $t03488634906 = acc
925+ let y = $t03488634906._1
926+ let found = $t03488634906._2
931927 if ((found != unit))
932928 then acc
933929 else {
934930 let yNext = (((y * y) + c) / ((big2 * y) + b))
935931 let yDiff = absBigInt((yNext - value(y)))
936932 if ((big1 >= yDiff))
937933 then $Tuple2(yNext, cur)
938934 else $Tuple2(yNext, unit)
939935 }
940936 }
941937
942938 let arr = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
943- let $t03543535482 = {
939+ let $t03523735284 = {
944940 let $l = arr
945941 let $s = size($l)
946942 let $acc0 = $Tuple2(D, unit)
947943 func $f0_1 ($a,$i) = if (($i >= $s))
948944 then $a
949945 else calc($a, $l[$i])
950946
951947 func $f0_2 ($a,$i) = if (($i >= $s))
952948 then $a
953949 else throw("List size exceeds 15")
954950
955951 $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)
956952 }
957- let y = $t03543535482._1
958- let found = $t03543535482._2
953+ let y = $t03523735284._1
954+ let found = $t03523735284._2
959955 if ((found != unit))
960956 then y
961957 else throw(("Y calculation error, Y = " + toString(y)))
962958 }
963959
964960
965961 func skipOrderValidation () = valueOrElse(getBoolean(fca, keySkipOrderValidation(toString(this))), false)
966962
967963
968964 @Callable(i)
969965 func calculateAmountOutForSwapREADONLY (cleanAmountIn,isReverse,feePoolAmount) = {
970- let $t03583436258 = if ((isReverse == false))
966+ let $t03563636060 = if ((isReverse == false))
971967 then {
972968 let assetOut = strf(this, pa())
973969 let poolAmountInBalance = (toBigInt(getAccBalance(strf(this, aa()))) + toBigInt(cleanAmountIn))
974970 $Tuple2(assetOut, poolAmountInBalance)
975971 }
976972 else {
977973 let assetOut = strf(this, aa())
978974 let poolAmountInBalance = (toBigInt(getAccBalance(strf(this, pa()))) + toBigInt(cleanAmountIn))
979975 $Tuple2(assetOut, poolAmountInBalance)
980976 }
981- let assetOut = $t03583436258._1
982- let poolAmountInBalance = $t03583436258._2
977+ let assetOut = $t03563636060._1
978+ let poolAmountInBalance = $t03563636060._2
983979 let poolConfig = gpc()
984980 let amId = poolConfig[idxAmAsId]
985981 let prId = poolConfig[idxPrAsId]
986982 let xp = [toBigInt(getAccBalance(amId)), toBigInt(getAccBalance(prId))]
987983 let D = getD(xp)
988984 let y = getY(isReverse, D, toBigInt(cleanAmountIn))
989985 let dy = ((toBigInt(getAccBalance(assetOut)) - y) - toBigInt(1))
990986 let totalGetRaw = max([0, toInt(dy)])
991987 let newXp = if ((isReverse == false))
992988 then [((toBigInt(getAccBalance(amId)) + toBigInt(cleanAmountIn)) + toBigInt(feePoolAmount)), (toBigInt(getAccBalance(prId)) - dy)]
993989 else [(toBigInt(getAccBalance(amId)) - dy), ((toBigInt(getAccBalance(prId)) + toBigInt(cleanAmountIn)) + toBigInt(feePoolAmount))]
994990 let newD = getD(newXp)
995991 let checkD = if ((newD >= D))
996992 then true
997993 else throw(makeString(["new D is fewer error", toString(D), toString(newD)], "__"))
998994 if ((checkD == checkD))
999995 then $Tuple2(nil, totalGetRaw)
1000996 else throw("Strict value is not equal to itself.")
1001997 }
1002998
1003999
10041000
10051001 @Callable(i)
10061002 func calculateAmountOutForSwapAndSendTokens (cleanAmountIn,isReverse,amountOutMin,addressTo,feePoolAmount) = {
10071003 let swapContact = {
10081004 let @ = invoke(fca, "getSwapContractREADONLY", nil, nil)
10091005 if ($isInstanceOf(@, "String"))
10101006 then @
10111007 else throw(($getType(@) + " couldn't be cast to String"))
10121008 }
10131009 let checks = [if ((value(i.payments[0]).amount >= cleanAmountIn))
10141010 then true
10151011 else throwErr("Wrong amount"), if ((i.caller == addressFromStringValue(swapContact)))
10161012 then true
10171013 else throwErr("Permission denied")]
10181014 if ((checks == checks))
10191015 then {
10201016 let pmt = value(i.payments[0])
10211017 let assetIn = assetIdToString(pmt.assetId)
1022- let $t03769438088 = if ((isReverse == false))
1018+ let $t03749637890 = if ((isReverse == false))
10231019 then {
10241020 let assetOut = strf(this, pa())
10251021 let poolAmountInBalance = (getAccBalance(assetIn) - value(i.payments[0]).amount)
10261022 $Tuple2(assetOut, poolAmountInBalance)
10271023 }
10281024 else {
10291025 let assetOut = strf(this, aa())
10301026 let poolAmountInBalance = (getAccBalance(assetIn) - value(i.payments[0]).amount)
10311027 $Tuple2(assetOut, poolAmountInBalance)
10321028 }
1033- let assetOut = $t03769438088._1
1034- let poolAmountInBalance = $t03769438088._2
1029+ let assetOut = $t03749637890._1
1030+ let poolAmountInBalance = $t03749637890._2
10351031 let poolConfig = gpc()
10361032 let amId = poolConfig[idxAmAsId]
10371033 let prId = poolConfig[idxPrAsId]
10381034 let xp = if ((isReverse == false))
10391035 then [(toBigInt(getAccBalance(amId)) - toBigInt(value(i.payments[0]).amount)), toBigInt(getAccBalance(prId))]
10401036 else [toBigInt(getAccBalance(amId)), (toBigInt(getAccBalance(prId)) - toBigInt(value(i.payments[0]).amount))]
10411037 let D = getD(xp)
10421038 let y = getY(isReverse, D, toBigInt(0))
10431039 let dy = ((toBigInt(getAccBalance(assetOut)) - y) - toBigInt(1))
10441040 let totalGetRaw = max([0, toInt(dy)])
10451041 let checkMin = if ((totalGetRaw >= amountOutMin))
10461042 then true
10471043 else throw("Exchange result is fewer coins than expected")
10481044 if ((checkMin == checkMin))
10491045 then {
10501046 let newXp = if ((isReverse == false))
10511047 then [(toBigInt(getAccBalance(amId)) + toBigInt(feePoolAmount)), (toBigInt(getAccBalance(prId)) - dy)]
10521048 else [(toBigInt(getAccBalance(amId)) - dy), (toBigInt(getAccBalance(prId)) + toBigInt(feePoolAmount))]
10531049 let newD = getD(newXp)
10541050 let checkD = if ((newD >= D))
10551051 then true
10561052 else throw("new D is fewer error")
10571053 if ((checkD == checkD))
10581054 then $Tuple2([ScriptTransfer(addressFromStringValue(addressTo), totalGetRaw, parseAssetId(assetOut))], totalGetRaw)
10591055 else throw("Strict value is not equal to itself.")
10601056 }
10611057 else throw("Strict value is not equal to itself.")
10621058 }
10631059 else throw("Strict value is not equal to itself.")
10641060 }
10651061
10661062
10671063
10681064 @Callable(i)
10691065 func constructor (fc) = {
10701066 let c = mustManager(i)
10711067 if ((c == c))
10721068 then [StringEntry(fc(), fc)]
10731069 else throw("Strict value is not equal to itself.")
10741070 }
10751071
10761072
10771073
10781074 @Callable(i)
10791075 func put (slip,autoStake) = {
10801076 let factCfg = gfc()
10811077 let stakingCntr = valueOrErrorMessage(addressFromString(factCfg[idxFactStakCntr]), "Wr st addr")
10821078 let slipCntr = valueOrErrorMessage(addressFromString(factCfg[idxFactSlippCntr]), "Wr sl addr")
10831079 if ((0 > slip))
10841080 then throw("Wrong slippage")
10851081 else if ((size(i.payments) != 2))
10861082 then throw("2 pmnts expd")
10871083 else {
10881084 let amAssetPmt = toBigInt(value(i.payments[0]).amount)
10891085 let prAssetPmt = toBigInt(value(i.payments[1]).amount)
10901086 let amountAssetBalance = (toBigInt(getAccBalance(assetIdToString(cfgAmountAssetId))) - amAssetPmt)
10911087 if ((amountAssetBalance == amountAssetBalance))
10921088 then {
10931089 let priceAssetBalance = (toBigInt(getAccBalance(assetIdToString(cfgPriceAssetId))) - prAssetPmt)
10941090 if ((priceAssetBalance == priceAssetBalance))
10951091 then {
10961092 let lpAssetEmission = toBigInt(value(assetInfo(cfgLpAssetId)).quantity)
10971093 if ((lpAssetEmission == lpAssetEmission))
10981094 then {
10991095 let currentDLp = calcCurrentDLp(amAssetPmt, prAssetPmt, toBigInt(0))
11001096 if ((currentDLp == currentDLp))
11011097 then {
11021098 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, "")
11031099 let emitLpAmt = e._2
11041100 let lpAssetId = e._7
11051101 let state = e._9
11061102 let amDiff = e._10
11071103 let prDiff = e._11
11081104 let amId = e._12
11091105 let prId = e._13
11101106 let r = invoke(fca, "emit", [emitLpAmt], nil)
11111107 if ((r == r))
11121108 then {
11131109 let el = match r {
11141110 case legacy: Address =>
11151111 invoke(legacy, "emit", [emitLpAmt], nil)
11161112 case _ =>
11171113 unit
11181114 }
11191115 if ((el == el))
11201116 then {
11211117 let sa = if ((amDiff > 0))
11221118 then invoke(slipCntr, "put", nil, [AttachedPayment(amId, amDiff)])
11231119 else nil
11241120 if ((sa == sa))
11251121 then {
11261122 let sp = if ((prDiff > 0))
11271123 then invoke(slipCntr, "put", nil, [AttachedPayment(prId, prDiff)])
11281124 else nil
11291125 if ((sp == sp))
11301126 then {
11311127 let lpTrnsfr = if (autoStake)
11321128 then {
11331129 let ss = invoke(stakingCntr, "stake", nil, [AttachedPayment(lpAssetId, emitLpAmt)])
11341130 if ((ss == ss))
11351131 then nil
11361132 else throw("Strict value is not equal to itself.")
11371133 }
11381134 else [ScriptTransfer(i.caller, emitLpAmt, lpAssetId)]
1139- let $t04223242374 = refreshDLpInternal(0, 0, 0)
1140- let refreshDLpActions = $t04223242374._1
1141- let updatedDLp = $t04223242374._2
1135+ let $t04203442176 = refreshDLpInternal(0, 0, 0)
1136+ let refreshDLpActions = $t04203442176._1
1137+ let updatedDLp = $t04203442176._2
11421138 let check = if ((updatedDLp >= currentDLp))
11431139 then true
11441140 else throwErr(makeString(["updated DLp lower than current DLp", toString(amountAssetBalance), toString(priceAssetBalance), toString(lpAssetEmission), toString(currentDLp), toString(updatedDLp), toString(amDiff), toString(prDiff)], " "))
11451141 if ((check == check))
11461142 then {
11471143 let lpAssetEmissionAfter = value(assetInfo(cfgLpAssetId)).quantity
11481144 if ((lpAssetEmissionAfter == lpAssetEmissionAfter))
11491145 then ((state ++ lpTrnsfr) ++ refreshDLpActions)
11501146 else throw("Strict value is not equal to itself.")
11511147 }
11521148 else throw("Strict value is not equal to itself.")
11531149 }
11541150 else throw("Strict value is not equal to itself.")
11551151 }
11561152 else throw("Strict value is not equal to itself.")
11571153 }
11581154 else throw("Strict value is not equal to itself.")
11591155 }
11601156 else throw("Strict value is not equal to itself.")
11611157 }
11621158 else throw("Strict value is not equal to itself.")
11631159 }
11641160 else throw("Strict value is not equal to itself.")
11651161 }
11661162 else throw("Strict value is not equal to itself.")
11671163 }
11681164 else throw("Strict value is not equal to itself.")
11691165 }
11701166 }
11711167
11721168
11731169
11741170 @Callable(i)
11751171 func putOneTknV2 (minOutAmount,autoStake) = {
11761172 let isPoolOneTokenOperationsDisabled = {
11771173 let @ = invoke(fca, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
11781174 if ($isInstanceOf(@, "Boolean"))
11791175 then @
11801176 else throw(($getType(@) + " couldn't be cast to Boolean"))
11811177 }
11821178 let isPutDisabled = if (if (if (igs())
11831179 then true
11841180 else (cfgPoolStatus == PoolPutDis))
11851181 then true
11861182 else (cfgPoolStatus == PoolShutdown))
11871183 then true
11881184 else isPoolOneTokenOperationsDisabled
11891185 let checks = [if (if (!(isPutDisabled))
11901186 then true
11911187 else isManager(i))
11921188 then true
11931189 else throwErr("put operation is blocked by admin"), if ((size(i.payments) == 1))
11941190 then true
11951191 else throwErr("exactly 1 payment are expected")]
11961192 if ((checks == checks))
11971193 then {
11981194 let amId = toBase58String(value(cfgAmountAssetId))
11991195 let prId = toBase58String(value(cfgPriceAssetId))
12001196 let lpId = cfgLpAssetId
12011197 let amDecimals = cfgAmountAssetDecimals
12021198 let prDecimals = cfgPriceAssetDecimals
12031199 let userAddress = if ((i.caller == this))
12041200 then i.originCaller
12051201 else i.caller
12061202 let pmt = value(i.payments[0])
12071203 let pmtAssetId = toBase58String(value(pmt.assetId))
12081204 let pmtAmt = pmt.amount
12091205 let currentDLp = if ((pmt.assetId == cfgAmountAssetId))
12101206 then calcCurrentDLp(toBigInt(pmtAmt), toBigInt(0), toBigInt(0))
12111207 else calcCurrentDLp(toBigInt(0), toBigInt(pmtAmt), toBigInt(0))
12121208 if ((currentDLp == currentDLp))
12131209 then {
1214- let $t04401544173 = calcPutOneTkn(pmtAmt, pmtAssetId, toString(userAddress), toBase58String(i.transactionId), true)
1215- if (($t04401544173 == $t04401544173))
1210+ let $t04381743975 = calcPutOneTkn(pmtAmt, pmtAssetId, toString(userAddress), toBase58String(i.transactionId), true)
1211+ if (($t04381743975 == $t04381743975))
12161212 then {
1217- let feeAmount = $t04401544173._3
1218- let state = $t04401544173._2
1219- let estimLP = $t04401544173._1
1213+ let feeAmount = $t04381743975._3
1214+ let state = $t04381743975._2
1215+ let estimLP = $t04381743975._1
12201216 let emitLpAmt = if (if ((minOutAmount > 0))
12211217 then (minOutAmount > estimLP)
12221218 else false)
12231219 then throwErr(makeString(["amount to receive is less than ", toString(minOutAmount)], ""))
12241220 else estimLP
12251221 let e = invoke(fca, "emit", [emitLpAmt], nil)
12261222 if ((e == e))
12271223 then {
12281224 let el = match e {
12291225 case legacy: Address =>
12301226 invoke(legacy, "emit", [emitLpAmt], nil)
12311227 case _ =>
12321228 unit
12331229 }
12341230 if ((el == el))
12351231 then {
12361232 let lpTrnsfr = if (autoStake)
12371233 then {
12381234 let ss = invoke(stakingContract, "stakeFor", [toString(i.caller)], [AttachedPayment(lpId, emitLpAmt)])
12391235 if ((ss == ss))
12401236 then nil
12411237 else throw("Strict value is not equal to itself.")
12421238 }
12431239 else [ScriptTransfer(i.caller, emitLpAmt, lpId)]
12441240 let sendFeeToMatcher = if ((feeAmount > 0))
12451241 then [ScriptTransfer(feeCollectorAddress, feeAmount, fromBase58String(pmtAssetId))]
12461242 else nil
1247- let $t04505845407 = if ((this == feeCollectorAddress))
1243+ let $t04486045209 = if ((this == feeCollectorAddress))
12481244 then $Tuple2(0, 0)
12491245 else {
12501246 let paymentInAmountAsset = if ((pmt.assetId == cfgAmountAssetId))
12511247 then true
12521248 else false
12531249 if (paymentInAmountAsset)
12541250 then $Tuple2(-(feeAmount), 0)
12551251 else $Tuple2(0, -(feeAmount))
12561252 }
1257- let amountAssetBalanceDelta = $t04505845407._1
1258- let priceAssetBalanceDelta = $t04505845407._2
1259- let $t04541045518 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
1260- let refreshDLpActions = $t04541045518._1
1261- let updatedDLp = $t04541045518._2
1253+ let amountAssetBalanceDelta = $t04486045209._1
1254+ let priceAssetBalanceDelta = $t04486045209._2
1255+ let $t04521245320 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
1256+ let refreshDLpActions = $t04521245320._1
1257+ let updatedDLp = $t04521245320._2
12621258 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
12631259 if ((isUpdatedDLpValid == isUpdatedDLpValid))
12641260 then $Tuple2((((state ++ lpTrnsfr) ++ sendFeeToMatcher) ++ refreshDLpActions), emitLpAmt)
12651261 else throw("Strict value is not equal to itself.")
12661262 }
12671263 else throw("Strict value is not equal to itself.")
12681264 }
12691265 else throw("Strict value is not equal to itself.")
12701266 }
12711267 else throw("Strict value is not equal to itself.")
12721268 }
12731269 else throw("Strict value is not equal to itself.")
12741270 }
12751271 else throw("Strict value is not equal to itself.")
12761272 }
12771273
12781274
12791275
12801276 @Callable(i)
12811277 func putForFree (maxSlpg) = if ((0 > maxSlpg))
12821278 then throw("Wrong slpg")
12831279 else if ((size(i.payments) != 2))
12841280 then throw("2 pmnts expd")
12851281 else {
12861282 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, "")
12871283 let state = estPut._9
12881284 let amAssetPmt = toBigInt(value(i.payments[0]).amount)
12891285 let prAssetPmt = toBigInt(value(i.payments[1]).amount)
12901286 let currentDLp = calcCurrentDLp(amAssetPmt, prAssetPmt, toBigInt(0))
12911287 if ((currentDLp == currentDLp))
12921288 then {
1293- let $t04654846613 = refreshDLpInternal(0, 0, 0)
1294- let refreshDLpActions = $t04654846613._1
1295- let updatedDLp = $t04654846613._2
1289+ let $t04635046415 = refreshDLpInternal(0, 0, 0)
1290+ let refreshDLpActions = $t04635046415._1
1291+ let updatedDLp = $t04635046415._2
12961292 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
12971293 if ((isUpdatedDLpValid == isUpdatedDLpValid))
12981294 then (state ++ refreshDLpActions)
12991295 else throw("Strict value is not equal to itself.")
13001296 }
13011297 else throw("Strict value is not equal to itself.")
13021298 }
13031299
13041300
13051301
13061302 @Callable(i)
13071303 func get () = {
13081304 let currentDLp = calcCurrentDLp(toBigInt(0), toBigInt(0), toBigInt(0))
13091305 if ((currentDLp == currentDLp))
13101306 then {
13111307 let r = cg(i)
13121308 let outAmtAmt = r._1
13131309 let outPrAmt = r._2
13141310 let pmtAmt = r._3
13151311 let pmtAssetId = r._4
13161312 let state = r._5
13171313 let b = invoke(fca, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
13181314 if ((b == b))
13191315 then {
1320- let $t04778647868 = refreshDLpInternal(-(outAmtAmt), -(outPrAmt), 0)
1321- let refreshDLpActions = $t04778647868._1
1322- let updatedDLp = $t04778647868._2
1316+ let $t04758847670 = refreshDLpInternal(-(outAmtAmt), -(outPrAmt), 0)
1317+ let refreshDLpActions = $t04758847670._1
1318+ let updatedDLp = $t04758847670._2
13231319 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
13241320 if ((isUpdatedDLpValid == isUpdatedDLpValid))
13251321 then (state ++ refreshDLpActions)
13261322 else throw("Strict value is not equal to itself.")
13271323 }
13281324 else throw("Strict value is not equal to itself.")
13291325 }
13301326 else throw("Strict value is not equal to itself.")
13311327 }
13321328
13331329
13341330
13351331 @Callable(i)
13361332 func getOneTknV2 (outAssetId,minOutAmount) = {
13371333 let isPoolOneTokenOperationsDisabled = {
13381334 let @ = invoke(fca, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
13391335 if ($isInstanceOf(@, "Boolean"))
13401336 then @
13411337 else throw(($getType(@) + " couldn't be cast to Boolean"))
13421338 }
13431339 let isGetDisabled = if (if (igs())
13441340 then true
13451341 else (cfgPoolStatus == PoolShutdown))
13461342 then true
13471343 else isPoolOneTokenOperationsDisabled
13481344 let checks = [if (if (!(isGetDisabled))
13491345 then true
13501346 else isManager(i))
13511347 then true
13521348 else throwErr("get operation is blocked by admin"), if ((size(i.payments) == 1))
13531349 then true
13541350 else throwErr("exactly 1 payment are expected")]
13551351 if ((checks == checks))
13561352 then {
1357- let $t04848648641 = getOneTknV2Internal(outAssetId, minOutAmount, i.payments, i.caller, i.originCaller, i.transactionId)
1358- let state = $t04848648641._1
1359- let totalAmount = $t04848648641._2
1353+ let $t04828848443 = getOneTknV2Internal(outAssetId, minOutAmount, i.payments, i.caller, i.originCaller, i.transactionId)
1354+ let state = $t04828848443._1
1355+ let totalAmount = $t04828848443._2
13601356 $Tuple2(state, totalAmount)
13611357 }
13621358 else throw("Strict value is not equal to itself.")
13631359 }
13641360
13651361
13661362
13671363 @Callable(i)
13681364 func refreshDLp () = {
13691365 let lastRefreshedBlockHeight = valueOrElse(getInteger(keyDLpRefreshedHeight), 0)
13701366 let checkLastRefreshedBlockHeight = if (((height - lastRefreshedBlockHeight) >= dLpRefreshDelay))
13711367 then unit
13721368 else throwErr(makeString([toString(dLpRefreshDelay), " blocks have not passed since the previous call"], ""))
13731369 if ((checkLastRefreshedBlockHeight == checkLastRefreshedBlockHeight))
13741370 then {
13751371 let dLp = valueOrErrorMessage(parseBigInt(valueOrElse(getString(this, keyDLp), "0")), fmtErr("invalid dLp"))
1376- let $t04916549229 = refreshDLpInternal(0, 0, 0)
1377- let dLpUpdateActions = $t04916549229._1
1378- let updatedDLp = $t04916549229._2
1372+ let $t04896749031 = refreshDLpInternal(0, 0, 0)
1373+ let dLpUpdateActions = $t04896749031._1
1374+ let updatedDLp = $t04896749031._2
13791375 let actions = if ((dLp != updatedDLp))
13801376 then dLpUpdateActions
13811377 else throwErr("nothing to refresh")
13821378 $Tuple2(actions, toString(updatedDLp))
13831379 }
13841380 else throw("Strict value is not equal to itself.")
13851381 }
13861382
13871383
13881384
13891385 @Callable(i)
13901386 func getOneTknV2READONLY (outAssetId,lpAssetAmount) = {
13911387 let amId = toBase58String(value(cfgAmountAssetId))
13921388 let prId = toBase58String(value(cfgPriceAssetId))
13931389 let lpId = toBase58String(value(cfgLpAssetId))
13941390 let xp = [toBigInt(getAccBalance(amId)), toBigInt(getAccBalance(prId))]
13951391 let lpEmission = toBigInt(valueOrErrorMessage(assetInfo(fromBase58String(lpId)), "invalid lp asset").quantity)
13961392 let D0 = getD(xp)
13971393 let D1 = (D0 - fraction(toBigInt(lpAssetAmount), D0, lpEmission))
13981394 let index = if ((outAssetId == amId))
13991395 then 0
14001396 else if ((outAssetId == prId))
14011397 then 1
14021398 else throw("invalid out asset id")
14031399 let newY = getYD(xp, index, D1)
14041400 let dy = (xp[index] - newY)
14051401 let totalGetRaw = max([0, toInt((dy - big1))])
1406- let $t05023950294 = takeFee(totalGetRaw, outFee)
1407- let totalGet = $t05023950294._1
1408- let feeAmount = $t05023950294._2
1402+ let $t05004150096 = takeFee(totalGetRaw, outFee)
1403+ let totalGet = $t05004150096._1
1404+ let feeAmount = $t05004150096._2
14091405 $Tuple2(nil, $Tuple2(totalGet, feeAmount))
14101406 }
14111407
14121408
14131409
14141410 @Callable(i)
14151411 func getOneTknV2WithBonusREADONLY (outAssetId,lpAssetAmount) = {
14161412 let amId = toBase58String(value(cfgAmountAssetId))
14171413 let prId = toBase58String(value(cfgPriceAssetId))
14181414 let lpId = toBase58String(value(cfgLpAssetId))
14191415 let amBalance = getAccBalance(amId)
14201416 let prBalance = getAccBalance(prId)
1421- let $t05066950784 = {
1417+ let $t05047150586 = {
14221418 let @ = invoke(this, "getOneTknV2READONLY", [outAssetId, lpAssetAmount], nil)
14231419 if ($isInstanceOf(@, "(Int, Int)"))
14241420 then @
14251421 else throw(($getType(@) + " couldn't be cast to (Int, Int)"))
14261422 }
1427- let totalGet = $t05066950784._1
1428- let feeAmount = $t05066950784._2
1423+ let totalGet = $t05047150586._1
1424+ let feeAmount = $t05047150586._2
14291425 let r = ego("", lpId, lpAssetAmount, this)
14301426 let outAmAmt = r._1
14311427 let outPrAmt = r._2
14321428 let sumOfGetAssets = (outAmAmt + outPrAmt)
14331429 let bonus = if ((sumOfGetAssets == 0))
14341430 then if ((totalGet == 0))
14351431 then 0
14361432 else throw("bonus calculation error")
14371433 else fraction((totalGet - sumOfGetAssets), scale8, sumOfGetAssets)
14381434 $Tuple2(nil, $Tuple3(totalGet, feeAmount, bonus))
14391435 }
14401436
14411437
14421438
14431439 @Callable(i)
14441440 func getNoLess (noLessThenAmtAsset,noLessThenPriceAsset) = {
14451441 let r = cg(i)
14461442 let outAmAmt = r._1
14471443 let outPrAmt = r._2
14481444 let pmtAmt = r._3
14491445 let pmtAssetId = r._4
14501446 let state = r._5
14511447 if ((noLessThenAmtAsset > outAmAmt))
14521448 then throw(((("Failed: " + toString(outAmAmt)) + " < ") + toString(noLessThenAmtAsset)))
14531449 else if ((noLessThenPriceAsset > outPrAmt))
14541450 then throw(((("Failed: " + toString(outPrAmt)) + " < ") + toString(noLessThenPriceAsset)))
14551451 else {
14561452 let currentDLp = calcCurrentDLp(toBigInt(0), toBigInt(0), toBigInt(0))
14571453 if ((currentDLp == currentDLp))
14581454 then {
14591455 let burnLPAssetOnFactory = invoke(fca, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
14601456 if ((burnLPAssetOnFactory == burnLPAssetOnFactory))
14611457 then {
1462- let $t05195052031 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1463- let refreshDLpActions = $t05195052031._1
1464- let updatedDLp = $t05195052031._2
1458+ let $t05175251833 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1459+ let refreshDLpActions = $t05175251833._1
1460+ let updatedDLp = $t05175251833._2
14651461 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
14661462 if ((isUpdatedDLpValid == isUpdatedDLpValid))
14671463 then (state ++ refreshDLpActions)
14681464 else throw("Strict value is not equal to itself.")
14691465 }
14701466 else throw("Strict value is not equal to itself.")
14711467 }
14721468 else throw("Strict value is not equal to itself.")
14731469 }
14741470 }
14751471
14761472
14771473
14781474 @Callable(i)
14791475 func unstakeAndGet (amount) = {
14801476 let checkPayments = if ((size(i.payments) != 0))
14811477 then throw("No pmnts expd")
14821478 else true
14831479 if ((checkPayments == checkPayments))
14841480 then {
14851481 let factoryCfg = gfc()
14861482 let lpAssetId = cfgLpAssetId
14871483 let staking = valueOrErrorMessage(addressFromString(factoryCfg[idxFactStakCntr]), "Wr st addr")
14881484 let currentDLp = calcCurrentDLp(toBigInt(0), toBigInt(0), toBigInt(0))
14891485 if ((currentDLp == currentDLp))
14901486 then {
14911487 let unstakeInv = invoke(staking, "unstake", [toBase58String(lpAssetId), amount], nil)
14921488 if ((unstakeInv == unstakeInv))
14931489 then {
14941490 let r = ego(toBase58String(i.transactionId), toBase58String(lpAssetId), amount, i.caller)
14951491 let outAmAmt = r._1
14961492 let outPrAmt = r._2
14971493 let sts = parseIntValue(r._9)
14981494 let state = r._10
14991495 let v = if (if (igs())
15001496 then true
15011497 else (sts == PoolShutdown))
15021498 then throw(("Blocked: " + toString(sts)))
15031499 else true
15041500 if ((v == v))
15051501 then {
15061502 let burnA = invoke(fca, "burn", [amount], [AttachedPayment(lpAssetId, amount)])
15071503 if ((burnA == burnA))
15081504 then {
1509- let $t05305853139 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1510- let refreshDLpActions = $t05305853139._1
1511- let updatedDLp = $t05305853139._2
1505+ let $t05286052941 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1506+ let refreshDLpActions = $t05286052941._1
1507+ let updatedDLp = $t05286052941._2
15121508 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
15131509 if ((isUpdatedDLpValid == isUpdatedDLpValid))
15141510 then (state ++ refreshDLpActions)
15151511 else throw("Strict value is not equal to itself.")
15161512 }
15171513 else throw("Strict value is not equal to itself.")
15181514 }
15191515 else throw("Strict value is not equal to itself.")
15201516 }
15211517 else throw("Strict value is not equal to itself.")
15221518 }
15231519 else throw("Strict value is not equal to itself.")
15241520 }
15251521 else throw("Strict value is not equal to itself.")
15261522 }
15271523
15281524
15291525
15301526 @Callable(i)
15311527 func unstakeAndGetNoLess (unstakeAmount,noLessThenAmountAsset,noLessThenPriceAsset) = {
15321528 let isGetDisabled = if (igs())
15331529 then true
15341530 else (cfgPoolStatus == PoolShutdown)
15351531 let checks = [if (!(isGetDisabled))
15361532 then true
15371533 else throw("get operation is blocked by admin"), if ((size(i.payments) == 0))
15381534 then true
15391535 else throw("no payments are expected")]
15401536 if ((checks == checks))
15411537 then {
15421538 let currentDLp = calcCurrentDLp(toBigInt(0), toBigInt(0), toBigInt(0))
15431539 if ((currentDLp == currentDLp))
15441540 then {
15451541 let unstakeInv = invoke(stakingContract, "unstake", [toBase58String(cfgLpAssetId), unstakeAmount], nil)
15461542 if ((unstakeInv == unstakeInv))
15471543 then {
15481544 let res = ego(toBase58String(i.transactionId), toBase58String(cfgLpAssetId), unstakeAmount, i.caller)
15491545 let outAmAmt = res._1
15501546 let outPrAmt = res._2
15511547 let state = res._10
15521548 let checkAmounts = [if ((outAmAmt >= noLessThenAmountAsset))
15531549 then true
15541550 else throw(makeString(["amount asset amount to receive is less than ", toString(noLessThenAmountAsset)], "")), if ((outPrAmt >= noLessThenPriceAsset))
15551551 then true
15561552 else throw(makeString(["price asset amount to receive is less than ", toString(noLessThenPriceAsset)], ""))]
15571553 if ((checkAmounts == checkAmounts))
15581554 then {
15591555 let burnLPAssetOnFactory = invoke(fca, "burn", [unstakeAmount], [AttachedPayment(cfgLpAssetId, unstakeAmount)])
15601556 if ((burnLPAssetOnFactory == burnLPAssetOnFactory))
15611557 then {
1562- let $t05439054471 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1563- let refreshDLpActions = $t05439054471._1
1564- let updatedDLp = $t05439054471._2
1558+ let $t05419254273 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1559+ let refreshDLpActions = $t05419254273._1
1560+ let updatedDLp = $t05419254273._2
15651561 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
15661562 if ((isUpdatedDLpValid == isUpdatedDLpValid))
15671563 then (state ++ refreshDLpActions)
15681564 else throw("Strict value is not equal to itself.")
15691565 }
15701566 else throw("Strict value is not equal to itself.")
15711567 }
15721568 else throw("Strict value is not equal to itself.")
15731569 }
15741570 else throw("Strict value is not equal to itself.")
15751571 }
15761572 else throw("Strict value is not equal to itself.")
15771573 }
15781574 else throw("Strict value is not equal to itself.")
15791575 }
15801576
15811577
15821578
15831579 @Callable(i)
15841580 func unstakeAndGetOneTknV2 (unstakeAmount,outAssetId,minOutAmount) = {
15851581 let isPoolOneTokenOperationsDisabled = {
15861582 let @ = invoke(fca, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
15871583 if ($isInstanceOf(@, "Boolean"))
15881584 then @
15891585 else throw(($getType(@) + " couldn't be cast to Boolean"))
15901586 }
15911587 let isGetDisabled = if (if (igs())
15921588 then true
15931589 else (cfgPoolStatus == PoolShutdown))
15941590 then true
15951591 else isPoolOneTokenOperationsDisabled
15961592 let checks = [if (if (!(isGetDisabled))
15971593 then true
15981594 else isManager(i))
15991595 then true
16001596 else throwErr("get operation is blocked by admin"), if ((size(i.payments) == 0))
16011597 then true
16021598 else throwErr("no payments are expected")]
16031599 if ((checks == checks))
16041600 then {
16051601 let factoryCfg = gfc()
16061602 let lpAssetId = cfgLpAssetId
16071603 let staking = valueOrErrorMessage(addressFromString(factoryCfg[idxFactStakCntr]), "Wr st addr")
16081604 let userAddress = i.caller
16091605 let lpAssetRecipientAddress = this
16101606 let unstakeInv = invoke(staking, "unstakeINTERNAL", [lpAssetId, unstakeAmount, userAddress.bytes, lpAssetRecipientAddress.bytes], nil)
16111607 if ((unstakeInv == unstakeInv))
16121608 then {
1613- let $t05549355681 = getOneTknV2Internal(outAssetId, minOutAmount, [AttachedPayment(lpAssetId, unstakeAmount)], i.caller, i.originCaller, i.transactionId)
1614- let state = $t05549355681._1
1615- let totalAmount = $t05549355681._2
1609+ let $t05529555483 = getOneTknV2Internal(outAssetId, minOutAmount, [AttachedPayment(lpAssetId, unstakeAmount)], i.caller, i.originCaller, i.transactionId)
1610+ let state = $t05529555483._1
1611+ let totalAmount = $t05529555483._2
16161612 $Tuple2(state, totalAmount)
16171613 }
16181614 else throw("Strict value is not equal to itself.")
16191615 }
16201616 else throw("Strict value is not equal to itself.")
16211617 }
16221618
16231619
16241620
16251621 @Callable(i)
16261622 func putOneTknV2WithBonusREADONLY (paymentAmountRaw,paymentAssetId) = {
1627- let $t05580955912 = calcPutOneTkn(paymentAmountRaw, paymentAssetId, "", "", true)
1628- let lpAmount = $t05580955912._1
1629- let state = $t05580955912._2
1630- let feeAmount = $t05580955912._3
1631- let bonus = $t05580955912._4
1623+ let $t05561155714 = calcPutOneTkn(paymentAmountRaw, paymentAssetId, "", "", true)
1624+ let lpAmount = $t05561155714._1
1625+ let state = $t05561155714._2
1626+ let feeAmount = $t05561155714._3
1627+ let bonus = $t05561155714._4
16321628 $Tuple2(nil, $Tuple3(lpAmount, feeAmount, bonus))
16331629 }
16341630
16351631
16361632
16371633 @Callable(i)
16381634 func putOneTknV2WithoutTakeFeeREADONLY (paymentAmountRaw,paymentAssetId) = {
1639- let $t05606056164 = calcPutOneTkn(paymentAmountRaw, paymentAssetId, "", "", false)
1640- let lpAmount = $t05606056164._1
1641- let state = $t05606056164._2
1642- let feeAmount = $t05606056164._3
1643- let bonus = $t05606056164._4
1635+ let $t05586255966 = calcPutOneTkn(paymentAmountRaw, paymentAssetId, "", "", false)
1636+ let lpAmount = $t05586255966._1
1637+ let state = $t05586255966._2
1638+ let feeAmount = $t05586255966._3
1639+ let bonus = $t05586255966._4
16441640 $Tuple2(nil, $Tuple3(lpAmount, feeAmount, bonus))
16451641 }
16461642
16471643
16481644
16491645 @Callable(i)
16501646 func activate (amtAsStr,prAsStr) = if ((toString(i.caller) != toString(fca)))
16511647 then throw("denied")
1652- else $Tuple2([StringEntry(aa(), amtAsStr), StringEntry(pa(), prAsStr)], "success")
1648+ else $Tuple2([StringEntry(aa(), amtAsStr), StringEntry(pa(), prAsStr), StringEntry(amp(), toString(ampInitial))], "success")
16531649
16541650
16551651
16561652 @Callable(i)
16571653 func getPoolConfigWrapperREADONLY () = $Tuple2(nil, gpc())
16581654
16591655
16601656
16611657 @Callable(i)
16621658 func getAccBalanceWrapperREADONLY (assetId) = $Tuple2(nil, getAccBalance(assetId))
16631659
16641660
16651661
16661662 @Callable(i)
16671663 func calcPricesWrapperREADONLY (amAmt,prAmt,lpAmt) = {
16681664 let pr = calcPrices(amAmt, prAmt, lpAmt)
16691665 $Tuple2(nil, [toString(pr[0]), toString(pr[1]), toString(pr[2])])
16701666 }
16711667
16721668
16731669
16741670 @Callable(i)
16751671 func fromX18WrapperREADONLY (val,resScaleMult) = $Tuple2(nil, f1(parseBigIntValue(val), resScaleMult))
16761672
16771673
16781674
16791675 @Callable(i)
16801676 func toX18WrapperREADONLY (origVal,origScaleMult) = $Tuple2(nil, toString(t1(origVal, origScaleMult)))
16811677
16821678
16831679
16841680 @Callable(i)
16851681 func calcPriceBigIntWrapperREADONLY (prAmtX18,amAmtX18) = $Tuple2(nil, toString(cpbi(parseBigIntValue(prAmtX18), parseBigIntValue(amAmtX18))))
16861682
16871683
16881684
16891685 @Callable(i)
16901686 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, ""))
16911687
16921688
16931689
16941690 @Callable(i)
16951691 func estimateGetOperationWrapperREADONLY (txId58,pmtAsId,pmtLpAmt,usrAddr) = {
16961692 let r = ego(txId58, pmtAsId, pmtLpAmt, addressFromStringValue(usrAddr))
16971693 $Tuple2(nil, $Tuple10(r._1, r._2, r._3, r._4, r._5, r._6, r._7, toString(r._8), r._9, r._10))
16981694 }
16991695
17001696
17011697
17021698 @Callable(i)
17031699 func changeAmp () = {
17041700 let cfg = invoke(fca, "getChangeAmpConfigREADONLY", [toString(this)], nil)
1705- let $t05851858717 = match cfg {
1701+ let $t05837558574 = match cfg {
17061702 case list: List[Any] =>
17071703 $Tuple3({
17081704 let @ = list[0]
17091705 if ($isInstanceOf(@, "Int"))
17101706 then @
17111707 else throw(($getType(@) + " couldn't be cast to Int"))
17121708 }, {
17131709 let @ = list[1]
17141710 if ($isInstanceOf(@, "Int"))
17151711 then @
17161712 else throw(($getType(@) + " couldn't be cast to Int"))
17171713 }, {
17181714 let @ = list[2]
17191715 if ($isInstanceOf(@, "Int"))
17201716 then @
17211717 else throw(($getType(@) + " couldn't be cast to Int"))
17221718 })
17231719 case _ =>
17241720 throwErr("invalid entry type")
17251721 }
1726- let delay = $t05851858717._1
1727- let delta = $t05851858717._2
1728- let target = $t05851858717._3
1722+ let delay = $t05837558574._1
1723+ let delta = $t05837558574._2
1724+ let target = $t05837558574._3
17291725 let curAmp = parseIntValue(getStringValue(amp()))
17301726 let newAmpRaw = (curAmp + delta)
17311727 let newAmp = if ((0 > delta))
17321728 then if ((target > newAmpRaw))
17331729 then target
17341730 else newAmpRaw
17351731 else if ((newAmpRaw > target))
17361732 then target
17371733 else newAmpRaw
17381734 let lastCall = valueOrElse(getInteger(keyChangeAmpLastCall()), 0)
17391735 let wait = (lastCall + delay)
17401736 let checks = [if ((height > wait))
17411737 then true
17421738 else throwErr("try again in few blocks"), if ((curAmp != newAmp))
17431739 then true
17441740 else throwErr("already reached target")]
17451741 if ((checks == checks))
17461742 then [IntegerEntry(keyChangeAmpLastCall(), height), StringEntry(amp(), toString(newAmp)), StringEntry(keyAmpHistory(height), toString(newAmp))]
17471743 else throw("Strict value is not equal to itself.")
17481744 }
17491745
17501746
17511747 @Verifier(tx)
17521748 func verify () = {
17531749 let targetPublicKey = match managerPublicKeyOrUnit() {
17541750 case pk: ByteVector =>
17551751 pk
17561752 case _: Unit =>
17571753 tx.senderPublicKey
17581754 case _ =>
17591755 throw("Match error")
17601756 }
17611757 match tx {
17621758 case order: Order =>
17631759 let matcherPub = mp()
1764- let $t05965059767 = if (skipOrderValidation())
1760+ let $t05950759624 = if (skipOrderValidation())
17651761 then $Tuple2(true, "")
17661762 else validateMatcherOrderAllowed(order)
1767- let orderValid = $t05965059767._1
1768- let orderValidInfo = $t05965059767._2
1763+ let orderValid = $t05950759624._1
1764+ let orderValidInfo = $t05950759624._2
17691765 let senderValid = sigVerify(order.bodyBytes, order.proofs[0], order.senderPublicKey)
17701766 let matcherValid = sigVerify(order.bodyBytes, order.proofs[1], matcherPub)
17711767 if (if (if (orderValid)
17721768 then senderValid
17731769 else false)
17741770 then matcherValid
17751771 else false)
17761772 then true
17771773 else throwOrderError(orderValid, orderValidInfo, senderValid, matcherValid)
17781774 case s: SetScriptTransaction =>
17791775 if (sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey))
17801776 then true
17811777 else {
17821778 let newHash = blake2b256(value(s.script))
17831779 let allowedHash = fromBase64String(value(getString(fca, keyAllowedLpStableScriptHash())))
17841780 let currentHash = scriptHash(this)
17851781 if ((allowedHash == newHash))
17861782 then (currentHash != newHash)
17871783 else false
17881784 }
17891785 case _ =>
17901786 sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey)
17911787 }
17921788 }
17931789

github/deemru/w8io/026f985 
318.26 ms