tx · uuAsZaGnFLpm3yhk5J8wGdViPKEJT4VnsdGvrd9FCoJ

3NAefciWv6f9fWvEXdGgpHfanJFG8HqfjuT:  -0.03700000 Waves

2022.12.26 16:34 [2377309] smart account 3NAefciWv6f9fWvEXdGgpHfanJFG8HqfjuT > SELF 0.00000000 Waves

{ "type": 13, "id": "uuAsZaGnFLpm3yhk5J8wGdViPKEJT4VnsdGvrd9FCoJ", "fee": 3700000, "feeAssetId": null, "timestamp": 1672061735051, "version": 1, "sender": "3NAefciWv6f9fWvEXdGgpHfanJFG8HqfjuT", "senderPublicKey": "D1BL65meykxFZTCuq7jq9HSGLLnWvQamQPUNrguW5w39", "proofs": [ "H3iYqnZWoSrGtCHgenGx5CcuokAtaV4diibqqYcAyzeG6ih77G9N6DERj71Km5Tj2s3DWDUadQHWq332YZd4Qyg" ], "script": "base64:BgKpKQgCEgMKAQgSAwoBCBIAEgQKAgEEEgQKAgEEEgMKAQESABIECgIIARIAEgQKAggBEgQKAggBEgQKAgEBEgMKAQESBQoDAQEBEgUKAwEIARIECgIBCBIECgIBCBIECgIICBIECgIICBIECgIIARIAEgMKAQgSBQoDAQEBEgQKAggBEgQKAgEBEgQKAggIEgsKCQgBAQIBAggEBBIGCgQICAEIEgAiBnNjYWxlOCIMc2NhbGU4QmlnSW50IgdzY2FsZTE4Igp6ZXJvQmlnSW50IgRiaWcwIgRiaWcxIgRiaWcyIgRiaWczIgRiaWc0IgpzbGlwcGFnZTREIgt3YXZlc1N0cmluZyIFQW11bHQiBURjb252IgNTRVAiBUVNUFRZIgpQb29sQWN0aXZlIgpQb29sUHV0RGlzIg5Qb29sTWF0Y2hlckRpcyIMUG9vbFNodXRkb3duIg5pZHhQb29sQWRkcmVzcyIJaWR4UG9vbFN0IglpZHhMUEFzSWQiCWlkeEFtQXNJZCIJaWR4UHJBc0lkIgtpZHhBbXRBc0RjbSINaWR4UHJpY2VBc0RjbSILaWR4SUFtdEFzSWQiDWlkeElQcmljZUFzSWQiD2lkeEZhY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vZnMAAAUCaFVILNSN", "chainId": 84, "height": 2377309, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 2SNEaESZkeXRWWjM6WaniXuYjv9aJBVdqudEdiP1crg9 Next: DSgqLqm5gyjG4nCW4Yp2o63V5YWufPD2WQuWovGFDYXx Diff:
OldNewDifferences
394394 then throw(((("Price slippage " + toString(slippageRealX18)) + " > ") + toString(slippageX18)))
395395 else {
396396 let lpEmissionX18 = t1(lpEm, scale8)
397- let prViaAmX18 = fraction(inAmAssetAmtX18, curPriceX18, scale18)
398- let amViaPrX18 = fraction(inPrAssetAmtX18, scale18, curPriceX18)
397+ let prViaAmX18 = fraction(inAmAssetAmtX18, curPriceX18, scale18, CEILING)
398+ let amViaPrX18 = fraction(inPrAssetAmtX18, scale18, curPriceX18, CEILING)
399399 let expectedAmts = if ((prViaAmX18 > inPrAssetAmtX18))
400400 then $Tuple2(amViaPrX18, inPrAssetAmtX18)
401401 else $Tuple2(inAmAssetAmtX18, prViaAmX18)
418418 else calcLpAmt
419419 let amDiff = (inAmAmt - calcAmAssetPmt)
420420 let prDiff = (inPrAmt - calcPrAssetPmt)
421- let $t01801718362 = if (if (isOneAsset)
421+ let $t01819418539 = if (if (isOneAsset)
422422 then (pmtId == amIdStr)
423423 else false)
424424 then $Tuple2(pmtAmt, 0)
427427 else false)
428428 then $Tuple2(0, pmtAmt)
429429 else $Tuple2(calcAmAssetPmt, calcPrAssetPmt)
430- let writeAmAmt = $t01801718362._1
431- let writePrAmt = $t01801718362._2
430+ let writeAmAmt = $t01819418539._1
431+ let writePrAmt = $t01819418539._2
432432 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))]
433433 $Tuple13(calcLpAmt, emitLpAmt, curPrice, amBalance, prBalance, lpEm, lpId, sts, commonState, amDiff, prDiff, inAmId, inPrId)
434434 }
470470 }
471471
472472 let arr = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
473- let $t02029020338 = {
473+ let $t02046720515 = {
474474 let $l = arr
475475 let $s = size($l)
476476 let $acc0 = $Tuple2(s, false)
484484
485485 $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)
486486 }
487- let d = $t02029020338._1
488- let found = $t02029020338._2
487+ let d = $t02046720515._1
488+ let found = $t02046720515._2
489489 if (found)
490490 then d
491491 else throw(("D calculation error, D = " + toString(d)))
509509 let ann_aPrecision = (ann - aPrecision)
510510 let n1 = (n + big1)
511511 func calc (acc,cur) = {
512- let $t02096720987 = acc
513- let d = $t02096720987._1
514- let found = $t02096720987._2
512+ let $t02114421164 = acc
513+ let d = $t02114421164._1
514+ let found = $t02114421164._2
515515 if ((found != unit))
516516 then acc
517517 else {
525525 }
526526
527527 let arr = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
528- let $t02140821455 = {
528+ let $t02158521632 = {
529529 let $l = arr
530530 let $s = size($l)
531531 let $acc0 = $Tuple2(s, unit)
539539
540540 $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)
541541 }
542- let d = $t02140821455._1
543- let found = $t02140821455._2
542+ let d = $t02158521632._1
543+ let found = $t02158521632._2
544544 if ((found != unit))
545545 then d
546546 else throw(("D calculation error, D = " + toString(d)))
560560 let c = (((((D * D) / (x * n)) * D) * aPrecision) / (ann * n))
561561 let b = ((s + ((D * aPrecision) / ann)) - D)
562562 func calc (acc,cur) = {
563- let $t02195521975 = acc
564- let y = $t02195521975._1
565- let found = $t02195521975._2
563+ let $t02213222152 = acc
564+ let y = $t02213222152._1
565+ let found = $t02213222152._2
566566 if ((found != unit))
567567 then acc
568568 else {
575575 }
576576
577577 let arr = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
578- let $t02228222329 = {
578+ let $t02245922506 = {
579579 let $l = arr
580580 let $s = size($l)
581581 let $acc0 = $Tuple2(D, unit)
589589
590590 $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)
591591 }
592- let y = $t02228222329._1
593- let found = $t02228222329._2
592+ let y = $t02245922506._1
593+ let found = $t02245922506._2
594594 if ((found != unit))
595595 then y
596596 else throw(("Y calculation error, Y = " + toString(y)))
632632 func validateMatcherOrderAllowed (order) = {
633633 let amountAssetAmount = order.amount
634634 let priceAssetAmount = fraction(order.amount, order.price, scale8, FLOOR)
635- let $t02426824480 = if ((order.orderType == Buy))
635+ let $t02444524657 = if ((order.orderType == Buy))
636636 then $Tuple2(amountAssetAmount, -(priceAssetAmount))
637637 else $Tuple2(-(amountAssetAmount), priceAssetAmount)
638- let amountAssetBalanceDelta = $t02426824480._1
639- let priceAssetBalanceDelta = $t02426824480._2
638+ let amountAssetBalanceDelta = $t02444524657._1
639+ let priceAssetBalanceDelta = $t02444524657._2
640640 if (if (if (igs())
641641 then true
642642 else (cfgPoolStatus == PoolMatcherDis))
649649 then throw("Wr assets")
650650 else {
651651 let dLp = parseBigIntValue(getStringValue(this, keyDLp))
652- let $t02481024910 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
653- let unusedActions = $t02481024910._1
654- let dLpNew = $t02481024910._2
652+ let $t02498725087 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
653+ let unusedActions = $t02498725087._1
654+ let dLpNew = $t02498725087._2
655655 let isOrderValid = (dLpNew >= dLp)
656656 isOrderValid
657657 }
704704 then {
705705 let amBalance = getAccBalance(amId)
706706 let prBalance = getAccBalance(prId)
707- let $t02717627638 = if ((txId == ""))
707+ let $t02735327815 = if ((txId == ""))
708708 then $Tuple2(amBalance, prBalance)
709709 else if ((pmtAssetId == amId))
710710 then if ((pmtAmtRaw > amBalance))
715715 then throw("invalid payment amount")
716716 else $Tuple2(amBalance, (prBalance - pmtAmtRaw))
717717 else throw("wrong pmtAssetId")
718- let amBalanceOld = $t02717627638._1
719- let prBalanceOld = $t02717627638._2
720- let $t02764427820 = if ((pmtAssetId == amId))
718+ let amBalanceOld = $t02735327815._1
719+ let prBalanceOld = $t02735327815._2
720+ let $t02782127997 = if ((pmtAssetId == amId))
721721 then $Tuple2(pmtAmtRaw, 0)
722722 else if ((pmtAssetId == prId))
723723 then $Tuple2(0, pmtAmtRaw)
724724 else throw("invalid payment")
725- let amAmountRaw = $t02764427820._1
726- let prAmountRaw = $t02764427820._2
727- let $t02782428063 = if (withTakeFee)
725+ let amAmountRaw = $t02782127997._1
726+ let prAmountRaw = $t02782127997._2
727+ let $t02800128240 = if (withTakeFee)
728728 then $Tuple3(takeFee(amAmountRaw)._1, takeFee(prAmountRaw)._1, takeFee(pmtAmtRaw)._2)
729729 else $Tuple3(amAmountRaw, prAmountRaw, 0)
730- let amAmount = $t02782428063._1
731- let prAmount = $t02782428063._2
732- let feeAmount = $t02782428063._3
730+ let amAmount = $t02800128240._1
731+ let prAmount = $t02800128240._2
732+ let feeAmount = $t02800128240._3
733733 let amBalanceNew = (amBalanceOld + amAmount)
734734 let prBalanceNew = (prBalanceOld + prAmount)
735735 let D0 = getD([toBigInt(amBalanceOld), toBigInt(prBalanceOld)])
777777 else {
778778 let amBalance = getAccBalance(amId)
779779 let prBalance = getAccBalance(prId)
780- let $t03011330224 = {
780+ let $t03029030401 = {
781781 let @ = invoke(this, "getOneTknV2READONLY", [outAssetId, pmtAmt], nil)
782782 if ($isInstanceOf(@, "(Int, Int)"))
783783 then @
784784 else throw(($getType(@) + " couldn't be cast to (Int, Int)"))
785785 }
786- if (($t03011330224 == $t03011330224))
786+ if (($t03029030401 == $t03029030401))
787787 then {
788- let feeAmount = $t03011330224._2
789- let totalGet = $t03011330224._1
788+ let feeAmount = $t03029030401._2
789+ let totalGet = $t03029030401._1
790790 let totalAmount = if (if ((minOutAmount > 0))
791791 then (minOutAmount > totalGet)
792792 else false)
793793 then throwErr(makeString(["amount to receive is less than ", toString(minOutAmount)], ""))
794794 else totalGet
795- let $t03041430721 = if ((outAssetId == amId))
795+ let $t03059130898 = if ((outAssetId == amId))
796796 then $Tuple4(totalAmount, 0, ((amBalance - totalAmount) - feeAmount), prBalance)
797797 else if ((outAssetId == prId))
798798 then $Tuple4(0, totalAmount, amBalance, ((prBalance - totalAmount) - feeAmount))
799799 else throw("invalid out asset id")
800- let outAm = $t03041430721._1
801- let outPr = $t03041430721._2
802- let amBalanceNew = $t03041430721._3
803- let prBalanceNew = $t03041430721._4
800+ let outAm = $t03059130898._1
801+ let outPr = $t03059130898._2
802+ let amBalanceNew = $t03059130898._3
803+ let prBalanceNew = $t03059130898._4
804804 let curPrX18 = cpbi(t1(prBalanceNew, prDecimals), t1(amBalanceNew, amDecimals))
805805 let curPr = f1(curPrX18, scale8)
806806 let outAssetIdOrWaves = if ((outAssetId == "WAVES"))
815815 let burn = invoke(fca, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
816816 if ((burn == burn))
817817 then {
818- let $t03150631856 = {
818+ let $t03168332033 = {
819819 let feeAmountForCalc = if ((this == feeCollectorAddress))
820820 then 0
821821 else feeAmount
826826 then $Tuple2(-((totalGet + feeAmountForCalc)), 0)
827827 else $Tuple2(0, -((totalGet + feeAmountForCalc)))
828828 }
829- let amountAssetBalanceDelta = $t03150631856._1
830- let priceAssetBalanceDelta = $t03150631856._2
831- let $t03185931967 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
832- let refreshDLpActions = $t03185931967._1
833- let updatedDLp = $t03185931967._2
829+ let amountAssetBalanceDelta = $t03168332033._1
830+ let priceAssetBalanceDelta = $t03168332033._2
831+ let $t03203632144 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
832+ let refreshDLpActions = $t03203632144._1
833+ let updatedDLp = $t03203632144._2
834834 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
835835 if ((isUpdatedDLpValid == isUpdatedDLpValid))
836836 then $Tuple2((state ++ refreshDLpActions), totalAmount)
999999 else throw("Strict value is not equal to itself.")
10001000 }
10011001 else [ScriptTransfer(i.caller, emitLpAmt, lpAssetId)]
1002- let $t03611636258 = refreshDLpInternal(0, 0, 0)
1003- let refreshDLpActions = $t03611636258._1
1004- let updatedDLp = $t03611636258._2
1002+ let $t03629336435 = refreshDLpInternal(0, 0, 0)
1003+ let refreshDLpActions = $t03629336435._1
1004+ let updatedDLp = $t03629336435._2
10051005 let check = if ((updatedDLp >= currentDLp))
10061006 then true
10071007 else throwErr(makeString(["updated DLp lower than current DLp", toString(amountAssetBalance), toString(priceAssetBalance), toString(lpAssetEmission), toString(currentDLp), toString(updatedDLp)], " "))
10741074 else calcCurrentDLp(toBigInt(0), toBigInt(pmtAmt), toBigInt(0))
10751075 if ((currentDLp == currentDLp))
10761076 then {
1077- let $t03784938007 = calcPutOneTkn(pmtAmt, pmtAssetId, toString(userAddress), toBase58String(i.transactionId), true)
1078- if (($t03784938007 == $t03784938007))
1077+ let $t03813138289 = calcPutOneTkn(pmtAmt, pmtAssetId, toString(userAddress), toBase58String(i.transactionId), true)
1078+ if (($t03813138289 == $t03813138289))
10791079 then {
1080- let feeAmount = $t03784938007._3
1081- let state = $t03784938007._2
1082- let estimLP = $t03784938007._1
1080+ let feeAmount = $t03813138289._3
1081+ let state = $t03813138289._2
1082+ let estimLP = $t03813138289._1
10831083 let emitLpAmt = if (if ((minOutAmount > 0))
10841084 then (minOutAmount > estimLP)
10851085 else false)
11071107 let sendFeeToMatcher = if ((feeAmount > 0))
11081108 then [ScriptTransfer(feeCollectorAddress, feeAmount, fromBase58String(pmtAssetId))]
11091109 else nil
1110- let $t03882239171 = if ((this == feeCollectorAddress))
1110+ let $t03910439453 = if ((this == feeCollectorAddress))
11111111 then $Tuple2(0, 0)
11121112 else {
11131113 let paymentInAmountAsset = if ((pmt.assetId == cfgAmountAssetId))
11171117 then $Tuple2(-(feeAmount), 0)
11181118 else $Tuple2(0, -(feeAmount))
11191119 }
1120- let amountAssetBalanceDelta = $t03882239171._1
1121- let priceAssetBalanceDelta = $t03882239171._2
1122- let $t03917439282 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
1123- let refreshDLpActions = $t03917439282._1
1124- let updatedDLp = $t03917439282._2
1120+ let amountAssetBalanceDelta = $t03910439453._1
1121+ let priceAssetBalanceDelta = $t03910439453._2
1122+ let $t03945639564 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
1123+ let refreshDLpActions = $t03945639564._1
1124+ let updatedDLp = $t03945639564._2
11251125 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
11261126 if ((isUpdatedDLpValid == isUpdatedDLpValid))
11271127 then $Tuple2((((state ++ lpTrnsfr) ++ sendFeeToMatcher) ++ refreshDLpActions), emitLpAmt)
11531153 let currentDLp = calcCurrentDLp(amAssetPmt, prAssetPmt, toBigInt(0))
11541154 if ((currentDLp == currentDLp))
11551155 then {
1156- let $t04031240377 = refreshDLpInternal(0, 0, 0)
1157- let refreshDLpActions = $t04031240377._1
1158- let updatedDLp = $t04031240377._2
1156+ let $t04059440659 = refreshDLpInternal(0, 0, 0)
1157+ let refreshDLpActions = $t04059440659._1
1158+ let updatedDLp = $t04059440659._2
11591159 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
11601160 if ((isUpdatedDLpValid == isUpdatedDLpValid))
11611161 then (state ++ refreshDLpActions)
11801180 let b = invoke(fca, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
11811181 if ((b == b))
11821182 then {
1183- let $t04155041632 = refreshDLpInternal(-(outAmtAmt), -(outPrAmt), 0)
1184- let refreshDLpActions = $t04155041632._1
1185- let updatedDLp = $t04155041632._2
1183+ let $t04183241914 = refreshDLpInternal(-(outAmtAmt), -(outPrAmt), 0)
1184+ let refreshDLpActions = $t04183241914._1
1185+ let updatedDLp = $t04183241914._2
11861186 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
11871187 if ((isUpdatedDLpValid == isUpdatedDLpValid))
11881188 then (state ++ refreshDLpActions)
12171217 else throwErr("exactly 1 payment are expected")]
12181218 if ((checks == checks))
12191219 then {
1220- let $t04225042405 = getOneTknV2Internal(outAssetId, minOutAmount, i.payments, i.caller, i.originCaller, i.transactionId)
1221- let state = $t04225042405._1
1222- let totalAmount = $t04225042405._2
1220+ let $t04253242687 = getOneTknV2Internal(outAssetId, minOutAmount, i.payments, i.caller, i.originCaller, i.transactionId)
1221+ let state = $t04253242687._1
1222+ let totalAmount = $t04253242687._2
12231223 $Tuple2(state, totalAmount)
12241224 }
12251225 else throw("Strict value is not equal to itself.")
12361236 if ((checkLastRefreshedBlockHeight == checkLastRefreshedBlockHeight))
12371237 then {
12381238 let dLp = valueOrErrorMessage(parseBigInt(valueOrElse(getString(this, keyDLp), "0")), fmtErr("invalid dLp"))
1239- let $t04292942993 = refreshDLpInternal(0, 0, 0)
1240- let dLpUpdateActions = $t04292942993._1
1241- let updatedDLp = $t04292942993._2
1239+ let $t04321143275 = refreshDLpInternal(0, 0, 0)
1240+ let dLpUpdateActions = $t04321143275._1
1241+ let updatedDLp = $t04321143275._2
12421242 let actions = if ((dLp != updatedDLp))
12431243 then dLpUpdateActions
12441244 else throwErr("nothing to refresh")
12661266 let newY = getYD(xp, index, D1)
12671267 let dy = (xp[index] - newY)
12681268 let totalGetRaw = max([0, toInt((dy - big1))])
1269- let $t04392343972 = takeFee(totalGetRaw)
1270- let totalGet = $t04392343972._1
1271- let feeAmount = $t04392343972._2
1269+ let $t04420544254 = takeFee(totalGetRaw)
1270+ let totalGet = $t04420544254._1
1271+ let feeAmount = $t04420544254._2
12721272 $Tuple2(nil, $Tuple2(totalGet, feeAmount))
12731273 }
12741274
12811281 let lpId = toBase58String(value(cfgLpAssetId))
12821282 let amBalance = getAccBalance(amId)
12831283 let prBalance = getAccBalance(prId)
1284- let $t04434744462 = {
1284+ let $t04462944744 = {
12851285 let @ = invoke(this, "getOneTknV2READONLY", [outAssetId, lpAssetAmount], nil)
12861286 if ($isInstanceOf(@, "(Int, Int)"))
12871287 then @
12881288 else throw(($getType(@) + " couldn't be cast to (Int, Int)"))
12891289 }
1290- let totalGet = $t04434744462._1
1291- let feeAmount = $t04434744462._2
1290+ let totalGet = $t04462944744._1
1291+ let feeAmount = $t04462944744._2
12921292 let r = ego("", lpId, lpAssetAmount, this)
12931293 let outAmAmt = r._1
12941294 let outPrAmt = r._2
13341334 let burnLPAssetOnFactory = invoke(fca, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
13351335 if ((burnLPAssetOnFactory == burnLPAssetOnFactory))
13361336 then {
1337- let $t04600146082 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1338- let refreshDLpActions = $t04600146082._1
1339- let updatedDLp = $t04600146082._2
1337+ let $t04628346364 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1338+ let refreshDLpActions = $t04628346364._1
1339+ let updatedDLp = $t04628346364._2
13401340 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
13411341 if ((isUpdatedDLpValid == isUpdatedDLpValid))
13421342 then (state ++ refreshDLpActions)
13871387 let burnA = invoke(fca, "burn", [amount], [AttachedPayment(lpAssetId, amount)])
13881388 if ((burnA == burnA))
13891389 then {
1390- let $t04710647187 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1391- let refreshDLpActions = $t04710647187._1
1392- let updatedDLp = $t04710647187._2
1390+ let $t04738847469 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1391+ let refreshDLpActions = $t04738847469._1
1392+ let updatedDLp = $t04738847469._2
13931393 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
13941394 if ((isUpdatedDLpValid == isUpdatedDLpValid))
13951395 then (state ++ refreshDLpActions)
14361436 let burnLPAssetOnFactory = invoke(fca, "burn", [unstakeAmount], [AttachedPayment(cfgLpAssetId, unstakeAmount)])
14371437 if ((burnLPAssetOnFactory == burnLPAssetOnFactory))
14381438 then {
1439- let $t04843548516 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1440- let refreshDLpActions = $t04843548516._1
1441- let updatedDLp = $t04843548516._2
1439+ let $t04871748798 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1440+ let refreshDLpActions = $t04871748798._1
1441+ let updatedDLp = $t04871748798._2
14421442 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
14431443 if ((isUpdatedDLpValid == isUpdatedDLpValid))
14441444 then (state ++ refreshDLpActions)
14831483 let unstakeInv = invoke(staking, "unstake", [toBase58String(lpAssetId), unstakeAmount], nil)
14841484 if ((unstakeInv == unstakeInv))
14851485 then {
1486- let $t04941149599 = getOneTknV2Internal(outAssetId, minOutAmount, [AttachedPayment(lpAssetId, unstakeAmount)], i.caller, i.originCaller, i.transactionId)
1487- let state = $t04941149599._1
1488- let totalAmount = $t04941149599._2
1486+ let $t04969349881 = getOneTknV2Internal(outAssetId, minOutAmount, [AttachedPayment(lpAssetId, unstakeAmount)], i.caller, i.originCaller, i.transactionId)
1487+ let state = $t04969349881._1
1488+ let totalAmount = $t04969349881._2
14891489 $Tuple2(state, totalAmount)
14901490 }
14911491 else throw("Strict value is not equal to itself.")
14971497
14981498 @Callable(i)
14991499 func putOneTknV2WithBonusREADONLY (paymentAmountRaw,paymentAssetId) = {
1500- let $t04972749830 = calcPutOneTkn(paymentAmountRaw, paymentAssetId, "", "", true)
1501- let lpAmount = $t04972749830._1
1502- let state = $t04972749830._2
1503- let feeAmount = $t04972749830._3
1504- let bonus = $t04972749830._4
1500+ let $t05000950112 = calcPutOneTkn(paymentAmountRaw, paymentAssetId, "", "", true)
1501+ let lpAmount = $t05000950112._1
1502+ let state = $t05000950112._2
1503+ let feeAmount = $t05000950112._3
1504+ let bonus = $t05000950112._4
15051505 $Tuple2(nil, $Tuple3(lpAmount, feeAmount, bonus))
15061506 }
15071507
15091509
15101510 @Callable(i)
15111511 func putOneTknV2WithoutTakeFeeREADONLY (paymentAmountRaw,paymentAssetId) = {
1512- let $t04997850082 = calcPutOneTkn(paymentAmountRaw, paymentAssetId, "", "", false)
1513- let lpAmount = $t04997850082._1
1514- let state = $t04997850082._2
1515- let feeAmount = $t04997850082._3
1516- let bonus = $t04997850082._4
1512+ let $t05026050364 = calcPutOneTkn(paymentAmountRaw, paymentAssetId, "", "", false)
1513+ let lpAmount = $t05026050364._1
1514+ let state = $t05026050364._2
1515+ let feeAmount = $t05026050364._3
1516+ let bonus = $t05026050364._4
15171517 $Tuple2(nil, $Tuple3(lpAmount, feeAmount, bonus))
15181518 }
15191519
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let scale8 = 100000000
55
66 let scale8BigInt = toBigInt(100000000)
77
88 let scale18 = toBigInt(1000000000000000000)
99
1010 let zeroBigInt = toBigInt(0)
1111
1212 let big0 = toBigInt(0)
1313
1414 let big1 = toBigInt(1)
1515
1616 let big2 = toBigInt(2)
1717
1818 let big3 = toBigInt(3)
1919
2020 let big4 = toBigInt(4)
2121
2222 let slippage4D = toBigInt((scale8 - ((scale8 * 1) / scale8)))
2323
2424 let wavesString = "WAVES"
2525
2626 let Amult = "100"
2727
2828 let Dconv = "1"
2929
3030 let SEP = "__"
3131
3232 let EMPTY = ""
3333
3434 let PoolActive = 1
3535
3636 let PoolPutDis = 2
3737
3838 let PoolMatcherDis = 3
3939
4040 let PoolShutdown = 4
4141
4242 let idxPoolAddress = 1
4343
4444 let idxPoolSt = 2
4545
4646 let idxLPAsId = 3
4747
4848 let idxAmAsId = 4
4949
5050 let idxPrAsId = 5
5151
5252 let idxAmtAsDcm = 6
5353
5454 let idxPriceAsDcm = 7
5555
5656 let idxIAmtAsId = 8
5757
5858 let idxIPriceAsId = 9
5959
6060 let idxFactStakCntr = 1
6161
6262 let idxFactoryRestCntr = 6
6363
6464 let idxFactSlippCntr = 7
6565
6666 let idxFactGwxRewCntr = 10
6767
6868 let feeDefault = fraction(10, scale8, 10000)
6969
7070 func t1 (origVal,origScaleMult) = fraction(toBigInt(origVal), scale18, toBigInt(origScaleMult))
7171
7272
7373 func f1 (val,resultScaleMult) = toInt(fraction(val, toBigInt(resultScaleMult), scale18))
7474
7575
7676 func fromX18Round (val,resultScaleMult,round) = toInt(fraction(val, toBigInt(resultScaleMult), scale18, round))
7777
7878
7979 func ts (amt,resScale,curScale) = fraction(amt, resScale, curScale)
8080
8181
8282 func abs (val) = if ((zeroBigInt > val))
8383 then -(val)
8484 else val
8585
8686
8787 func absBigInt (val) = if ((zeroBigInt > val))
8888 then -(val)
8989 else val
9090
9191
9292 func fc () = "%s__factoryContract"
9393
9494
9595 func mpk () = "%s__managerPublicKey"
9696
9797
9898 func pmpk () = "%s__pendingManagerPublicKey"
9999
100100
101101 func pl () = "%s%s__price__last"
102102
103103
104104 func ph (h,t) = makeString(["%s%s%d%d__price__history", toString(h), toString(t)], SEP)
105105
106106
107107 func pau (ua,txId) = ((("%s%s%s__P__" + ua) + "__") + txId)
108108
109109
110110 func gau (ua,txId) = ((("%s%s%s__G__" + ua) + "__") + txId)
111111
112112
113113 func aa () = "%s__amountAsset"
114114
115115
116116 func pa () = "%s__priceAsset"
117117
118118
119119 func amp () = "%s__amp"
120120
121121
122122 func ada () = "%s__addonAddr"
123123
124124
125125 let keyFee = "%s__fee"
126126
127127 let fee = valueOrElse(getInteger(this, keyFee), feeDefault)
128128
129129 let keyDLp = makeString(["%s", "dLp"], SEP)
130130
131131 let keyDLpRefreshedHeight = makeString(["%s", "dLpRefreshedHeight"], SEP)
132132
133133 let keyDLpRefreshDelay = makeString(["%s", "refreshDLpDelay"], SEP)
134134
135135 let dLpRefreshDelayDefault = 1
136136
137137 let dLpRefreshDelay = valueOrElse(getInteger(this, keyDLpRefreshDelay), dLpRefreshDelayDefault)
138138
139139 func fcfg () = "%s__factoryConfig"
140140
141141
142142 func mtpk () = "%s%s__matcher__publicKey"
143143
144144
145145 func pc (iAmtAs,iPrAs) = (((("%d%d%s__" + iAmtAs) + "__") + iPrAs) + "__config")
146146
147147
148148 func mba (bAStr) = ("%s%s%s__mappings__baseAsset2internalId__" + bAStr)
149149
150150
151151 func aps () = "%s__shutdown"
152152
153153
154154 func keyAllowedLpStableScriptHash () = "%s__allowedLpStableScriptHash"
155155
156156
157157 func keyFeeCollectorAddress () = "%s__feeCollectorAddress"
158158
159159
160160 func toe (orV,sendrV,matchV) = throw(((((("Failed: ordValid=" + toString(orV)) + " sndrValid=") + toString(sendrV)) + " mtchrValid=") + toString(matchV)))
161161
162162
163163 func strf (addr,key) = valueOrErrorMessage(getString(addr, key), makeString(["mandatory ", toString(addr), ".", key, " not defined"], ""))
164164
165165
166166 func intf (addr,key) = valueOrErrorMessage(getInteger(addr, key), makeString(["mandatory ", toString(addr), ".", key, " not defined"], ""))
167167
168168
169169 func throwErr (msg) = throw(makeString(["lp_stable.ride:", msg], " "))
170170
171171
172172 func fmtErr (msg) = makeString(["lp_stable.ride:", msg], " ")
173173
174174
175175 let fca = addressFromStringValue(strf(this, fc()))
176176
177177 let A = strf(this, amp())
178178
179179 func igs () = valueOrElse(getBoolean(fca, aps()), false)
180180
181181
182182 func mp () = fromBase58String(strf(fca, mtpk()))
183183
184184
185185 let feeCollectorAddress = addressFromStringValue(strf(fca, keyFeeCollectorAddress()))
186186
187187 func gpc () = {
188188 let amtAs = strf(this, aa())
189189 let priceAs = strf(this, pa())
190190 let iPriceAs = intf(fca, mba(priceAs))
191191 let iAmtAs = intf(fca, mba(amtAs))
192192 split(strf(fca, pc(toString(iAmtAs), toString(iPriceAs))), SEP)
193193 }
194194
195195
196196 func parseAssetId (input) = if ((input == wavesString))
197197 then unit
198198 else fromBase58String(input)
199199
200200
201201 func assetIdToString (input) = if ((input == unit))
202202 then wavesString
203203 else toBase58String(value(input))
204204
205205
206206 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]))
207207
208208
209209 let poolConfigParsed = parsePoolConfig(gpc())
210210
211211 let $t073837612 = poolConfigParsed
212212
213213 let cfgPoolAddress = $t073837612._1
214214
215215 let cfgPoolStatus = $t073837612._2
216216
217217 let cfgLpAssetId = $t073837612._3
218218
219219 let cfgAmountAssetId = $t073837612._4
220220
221221 let cfgPriceAssetId = $t073837612._5
222222
223223 let cfgAmountAssetDecimals = $t073837612._6
224224
225225 let cfgPriceAssetDecimals = $t073837612._7
226226
227227 let cfgInAmountAssedId = $t073837612._8
228228
229229 let cfgInPriceAssetId = $t073837612._9
230230
231231 func gfc () = split(strf(fca, fcfg()), SEP)
232232
233233
234234 let factoryConfig = gfc()
235235
236236 let stakingContract = valueOrErrorMessage(addressFromString(factoryConfig[idxFactStakCntr]), "Invalid staking contract address")
237237
238238 let slipageContract = valueOrErrorMessage(addressFromString(factoryConfig[idxFactSlippCntr]), "Invalid slipage contract address")
239239
240240 let gwxContract = valueOrErrorMessage(addressFromString(factoryConfig[idxFactGwxRewCntr]), "Invalid gwx contract address")
241241
242242 let restContract = valueOrErrorMessage(addressFromString(factoryConfig[idxFactoryRestCntr]), "Invalid gwx contract address")
243243
244244 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)
245245
246246
247247 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)
248248
249249
250250 func getAccBalance (assetId) = if ((assetId == "WAVES"))
251251 then wavesBalance(this).available
252252 else assetBalance(this, fromBase58String(assetId))
253253
254254
255255 func cpbi (prAmtX18,amAmtX18) = fraction(prAmtX18, scale18, amAmtX18)
256256
257257
258258 func vad (A1,A2,slippage) = {
259259 let diff = fraction((A1 - A2), scale8BigInt, A2)
260260 let pass = ((slippage - abs(diff)) > zeroBigInt)
261261 if (!(pass))
262262 then throw(("Big slpg: " + toString(diff)))
263263 else $Tuple2(pass, min([A1, A2]))
264264 }
265265
266266
267267 func vd (D1,D0,slpg) = {
268268 let diff = fraction(D0, scale8BigInt, D1)
269269 let fail = (slpg > diff)
270270 if (if (fail)
271271 then true
272272 else (D0 > D1))
273273 then throw(((((((toString(D0) + " ") + toString(D1)) + " ") + toString(diff)) + " ") + toString(slpg)))
274274 else fail
275275 }
276276
277277
278278 func pcp (amAssetDcm,prAssetDcm,amAmt,prAmt) = {
279279 let amtAsAmtX18 = t1(amAmt, amAssetDcm)
280280 let prAsAmtX18 = t1(prAmt, prAssetDcm)
281281 cpbi(prAsAmtX18, amtAsAmtX18)
282282 }
283283
284284
285285 func calcPrices (amAmt,prAmt,lpAmt) = {
286286 let amtAsDcm = cfgAmountAssetDecimals
287287 let prAsDcm = cfgPriceAssetDecimals
288288 let priceX18 = pcp(amtAsDcm, prAsDcm, amAmt, prAmt)
289289 let amAmtX18 = t1(amAmt, amtAsDcm)
290290 let prAmtX18 = t1(prAmt, prAsDcm)
291291 let lpAmtX18 = t1(lpAmt, scale8)
292292 let lpPrInAmAsX18 = cpbi(amAmtX18, lpAmtX18)
293293 let lpPrInPrAsX18 = cpbi(prAmtX18, lpAmtX18)
294294 [priceX18, lpPrInAmAsX18, lpPrInPrAsX18]
295295 }
296296
297297
298298 func calculatePrices (amAmt,prAmt,lpAmt) = {
299299 let p = calcPrices(amAmt, prAmt, lpAmt)
300300 [f1(p[0], scale8), f1(p[1], scale8), f1(p[2], scale8)]
301301 }
302302
303303
304304 func takeFee (amount) = {
305305 let feeAmount = fraction(amount, fee, scale8)
306306 $Tuple2((amount - feeAmount), feeAmount)
307307 }
308308
309309
310310 func ego (txId58,pmtAssetId,pmtLpAmt,userAddress) = {
311311 let lpId = cfgLpAssetId
312312 let amId = toBase58String(value(cfgAmountAssetId))
313313 let prId = toBase58String(value(cfgPriceAssetId))
314314 let amDcm = cfgAmountAssetDecimals
315315 let prDcm = cfgPriceAssetDecimals
316316 let sts = toString(cfgPoolStatus)
317317 let lpEmiss = valueOrErrorMessage(assetInfo(lpId), "Wrong LP id").quantity
318318 if ((toBase58String(lpId) != pmtAssetId))
319319 then throw("Wrong pmt asset")
320320 else {
321321 let amBalance = getAccBalance(amId)
322322 let amBalanceX18 = t1(amBalance, amDcm)
323323 let prBalance = getAccBalance(prId)
324324 let prBalanceX18 = t1(prBalance, prDcm)
325325 let curPriceX18 = cpbi(prBalanceX18, amBalanceX18)
326326 let curPrice = f1(curPriceX18, scale8)
327327 let pmtLpAmtX18 = t1(pmtLpAmt, scale8)
328328 let lpEmissX18 = t1(lpEmiss, scale8)
329329 let outAmAmtX18 = fraction(amBalanceX18, pmtLpAmtX18, lpEmissX18)
330330 let outPrAmtX18 = fraction(prBalanceX18, pmtLpAmtX18, lpEmissX18)
331331 let outAmAmt = fromX18Round(outAmAmtX18, amDcm, FLOOR)
332332 let outPrAmt = fromX18Round(outPrAmtX18, prDcm, FLOOR)
333333 let state = if ((txId58 == ""))
334334 then nil
335335 else [ScriptTransfer(userAddress, outAmAmt, if ((amId == "WAVES"))
336336 then unit
337337 else fromBase58String(amId)), ScriptTransfer(userAddress, outPrAmt, if ((prId == "WAVES"))
338338 then unit
339339 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)]
340340 $Tuple10(outAmAmt, outPrAmt, amId, prId, amBalance, prBalance, lpEmiss, curPriceX18, sts, state)
341341 }
342342 }
343343
344344
345345 func epo (txId58,slippage,inAmAmt,inAmId,inPrAmt,inPrId,userAddress,isEval,emitLp,isOneAsset,validateSlippage,pmtAmt,pmtId) = {
346346 let lpId = cfgLpAssetId
347347 let amIdStr = toBase58String(value(cfgAmountAssetId))
348348 let prIdStr = toBase58String(value(cfgPriceAssetId))
349349 let inAmIdStr = cfgInAmountAssedId
350350 let inPrIdStr = cfgInPriceAssetId
351351 let amtDcm = cfgAmountAssetDecimals
352352 let priceDcm = cfgPriceAssetDecimals
353353 let sts = toString(cfgPoolStatus)
354354 let lpEm = valueOrErrorMessage(assetInfo(lpId), "Wr lp as").quantity
355355 let amBalance = if (isEval)
356356 then getAccBalance(amIdStr)
357357 else if (if (isOneAsset)
358358 then (pmtId == amIdStr)
359359 else false)
360360 then (getAccBalance(amIdStr) - pmtAmt)
361361 else if (isOneAsset)
362362 then getAccBalance(amIdStr)
363363 else (getAccBalance(amIdStr) - inAmAmt)
364364 let prBalance = if (isEval)
365365 then getAccBalance(prIdStr)
366366 else if (if (isOneAsset)
367367 then (pmtId == prIdStr)
368368 else false)
369369 then (getAccBalance(prIdStr) - pmtAmt)
370370 else if (isOneAsset)
371371 then getAccBalance(prIdStr)
372372 else (getAccBalance(prIdStr) - inPrAmt)
373373 let inAmAssetAmtX18 = t1(inAmAmt, amtDcm)
374374 let inPrAssetAmtX18 = t1(inPrAmt, priceDcm)
375375 let userPriceX18 = cpbi(inPrAssetAmtX18, inAmAssetAmtX18)
376376 let amBalanceX18 = t1(amBalance, amtDcm)
377377 let prBalanceX18 = t1(prBalance, priceDcm)
378378 let r = if ((lpEm == 0))
379379 then {
380380 let curPriceX18 = zeroBigInt
381381 let slippageX18 = zeroBigInt
382382 let lpAmtX18 = pow((inAmAssetAmtX18 * inPrAssetAmtX18), 0, toBigInt(5), 1, 0, DOWN)
383383 $Tuple5(f1(lpAmtX18, scale8), f1(inAmAssetAmtX18, amtDcm), f1(inPrAssetAmtX18, priceDcm), cpbi((prBalanceX18 + inPrAssetAmtX18), (amBalanceX18 + inAmAssetAmtX18)), slippageX18)
384384 }
385385 else {
386386 let curPriceX18 = cpbi(prBalanceX18, amBalanceX18)
387387 let slippageRealX18 = fraction(abs((curPriceX18 - userPriceX18)), scale18, curPriceX18)
388388 let slippageX18 = t1(slippage, scale8)
389389 if (if (if (validateSlippage)
390390 then (curPriceX18 != zeroBigInt)
391391 else false)
392392 then (slippageRealX18 > slippageX18)
393393 else false)
394394 then throw(((("Price slippage " + toString(slippageRealX18)) + " > ") + toString(slippageX18)))
395395 else {
396396 let lpEmissionX18 = t1(lpEm, scale8)
397- let prViaAmX18 = fraction(inAmAssetAmtX18, curPriceX18, scale18)
398- let amViaPrX18 = fraction(inPrAssetAmtX18, scale18, curPriceX18)
397+ let prViaAmX18 = fraction(inAmAssetAmtX18, curPriceX18, scale18, CEILING)
398+ let amViaPrX18 = fraction(inPrAssetAmtX18, scale18, curPriceX18, CEILING)
399399 let expectedAmts = if ((prViaAmX18 > inPrAssetAmtX18))
400400 then $Tuple2(amViaPrX18, inPrAssetAmtX18)
401401 else $Tuple2(inAmAssetAmtX18, prViaAmX18)
402402 let expAmtAssetAmtX18 = expectedAmts._1
403403 let expPriceAssetAmtX18 = expectedAmts._2
404404 let lpAmtX18 = fraction(lpEmissionX18, expPriceAssetAmtX18, prBalanceX18)
405405 $Tuple5(fromX18Round(lpAmtX18, scale8, FLOOR), fromX18Round(expAmtAssetAmtX18, amtDcm, CEILING), fromX18Round(expPriceAssetAmtX18, priceDcm, CEILING), curPriceX18, slippageX18)
406406 }
407407 }
408408 let calcLpAmt = r._1
409409 let calcAmAssetPmt = r._2
410410 let calcPrAssetPmt = r._3
411411 let curPrice = f1(r._4, scale8)
412412 let slippageCalc = f1(r._5, scale8)
413413 if ((0 >= calcLpAmt))
414414 then throw("LP <= 0")
415415 else {
416416 let emitLpAmt = if (!(emitLp))
417417 then 0
418418 else calcLpAmt
419419 let amDiff = (inAmAmt - calcAmAssetPmt)
420420 let prDiff = (inPrAmt - calcPrAssetPmt)
421- let $t01801718362 = if (if (isOneAsset)
421+ let $t01819418539 = if (if (isOneAsset)
422422 then (pmtId == amIdStr)
423423 else false)
424424 then $Tuple2(pmtAmt, 0)
425425 else if (if (isOneAsset)
426426 then (pmtId == prIdStr)
427427 else false)
428428 then $Tuple2(0, pmtAmt)
429429 else $Tuple2(calcAmAssetPmt, calcPrAssetPmt)
430- let writeAmAmt = $t01801718362._1
431- let writePrAmt = $t01801718362._2
430+ let writeAmAmt = $t01819418539._1
431+ let writePrAmt = $t01819418539._2
432432 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))]
433433 $Tuple13(calcLpAmt, emitLpAmt, curPrice, amBalance, prBalance, lpEm, lpId, sts, commonState, amDiff, prDiff, inAmId, inPrId)
434434 }
435435 }
436436
437437
438438 func getD (xp) = {
439439 let xp0 = xp[0]
440440 let xp1 = xp[1]
441441 let s = (xp0 + xp1)
442442 if ((s == big0))
443443 then big0
444444 else {
445445 let a = parseIntValue(A)
446446 let ann = (a * 2)
447447 let p = fraction(xp0, xp1, big1)
448448 let xp0_xp1_n_n = fraction(p, big4, big1)
449449 let ann_s = fraction(toBigInt(ann), s, big1)
450450 let ann_1 = toBigInt((ann - 1))
451451 func calcDNext (d) = {
452452 let dd = fraction(d, d, big1)
453453 let ddd = fraction(dd, d, big1)
454454 let dp = fraction(ddd, big1, xp0_xp1_n_n)
455455 fraction((ann_s + fraction(dp, big2, big1)), d, (fraction(ann_1, d, big1) + fraction(big3, dp, big1)), CEILING)
456456 }
457457
458458 func calc (acc,i) = if (acc._2)
459459 then acc
460460 else {
461461 let d = acc._1
462462 let dNext = calcDNext(d)
463463 let dDiffRaw = toInt((dNext - value(d)))
464464 let dDiff = if ((0 > dDiffRaw))
465465 then -(dDiffRaw)
466466 else dDiffRaw
467467 if ((1 >= dDiff))
468468 then $Tuple2(dNext, true)
469469 else $Tuple2(dNext, false)
470470 }
471471
472472 let arr = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
473- let $t02029020338 = {
473+ let $t02046720515 = {
474474 let $l = arr
475475 let $s = size($l)
476476 let $acc0 = $Tuple2(s, false)
477477 func $f0_1 ($a,$i) = if (($i >= $s))
478478 then $a
479479 else calc($a, $l[$i])
480480
481481 func $f0_2 ($a,$i) = if (($i >= $s))
482482 then $a
483483 else throw("List size exceeds 15")
484484
485485 $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)
486486 }
487- let d = $t02029020338._1
488- let found = $t02029020338._2
487+ let d = $t02046720515._1
488+ let found = $t02046720515._2
489489 if (found)
490490 then d
491491 else throw(("D calculation error, D = " + toString(d)))
492492 }
493493 }
494494
495495
496496 func getDOld (xp) = {
497497 let n = big2
498498 let xp0 = xp[0]
499499 let xp1 = xp[1]
500500 let aPrecision = parseBigIntValue(Amult)
501501 let a = (parseBigIntValue(A) * aPrecision)
502502 let s = (xp0 + xp1)
503503 if ((s == big0))
504504 then big0
505505 else {
506506 let ann = (a * n)
507507 let xp0_xp1_n_n = (((xp0 * xp1) * n) * n)
508508 let ann_s_aPrecision = ((ann * s) / aPrecision)
509509 let ann_aPrecision = (ann - aPrecision)
510510 let n1 = (n + big1)
511511 func calc (acc,cur) = {
512- let $t02096720987 = acc
513- let d = $t02096720987._1
514- let found = $t02096720987._2
512+ let $t02114421164 = acc
513+ let d = $t02114421164._1
514+ let found = $t02114421164._2
515515 if ((found != unit))
516516 then acc
517517 else {
518518 let dp = (((d * d) * d) / xp0_xp1_n_n)
519519 let dNext = (((ann_s_aPrecision + (dp * n)) * d) / (((ann_aPrecision * d) / aPrecision) + (n1 * dp)))
520520 let dDiff = absBigInt((dNext - value(d)))
521521 if ((big1 >= dDiff))
522522 then $Tuple2(dNext, cur)
523523 else $Tuple2(dNext, unit)
524524 }
525525 }
526526
527527 let arr = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
528- let $t02140821455 = {
528+ let $t02158521632 = {
529529 let $l = arr
530530 let $s = size($l)
531531 let $acc0 = $Tuple2(s, unit)
532532 func $f0_1 ($a,$i) = if (($i >= $s))
533533 then $a
534534 else calc($a, $l[$i])
535535
536536 func $f0_2 ($a,$i) = if (($i >= $s))
537537 then $a
538538 else throw("List size exceeds 15")
539539
540540 $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)
541541 }
542- let d = $t02140821455._1
543- let found = $t02140821455._2
542+ let d = $t02158521632._1
543+ let found = $t02158521632._2
544544 if ((found != unit))
545545 then d
546546 else throw(("D calculation error, D = " + toString(d)))
547547 }
548548 }
549549
550550
551551 func getYD (xp,i,D) = {
552552 let n = big2
553553 let x = xp[if ((i == 0))
554554 then 1
555555 else 0]
556556 let aPrecision = parseBigIntValue(Amult)
557557 let a = (parseBigIntValue(A) * aPrecision)
558558 let s = x
559559 let ann = (a * n)
560560 let c = (((((D * D) / (x * n)) * D) * aPrecision) / (ann * n))
561561 let b = ((s + ((D * aPrecision) / ann)) - D)
562562 func calc (acc,cur) = {
563- let $t02195521975 = acc
564- let y = $t02195521975._1
565- let found = $t02195521975._2
563+ let $t02213222152 = acc
564+ let y = $t02213222152._1
565+ let found = $t02213222152._2
566566 if ((found != unit))
567567 then acc
568568 else {
569569 let yNext = (((y * y) + c) / ((big2 * y) + b))
570570 let yDiff = absBigInt((yNext - value(y)))
571571 if ((big1 >= yDiff))
572572 then $Tuple2(yNext, cur)
573573 else $Tuple2(yNext, unit)
574574 }
575575 }
576576
577577 let arr = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
578- let $t02228222329 = {
578+ let $t02245922506 = {
579579 let $l = arr
580580 let $s = size($l)
581581 let $acc0 = $Tuple2(D, unit)
582582 func $f0_1 ($a,$i) = if (($i >= $s))
583583 then $a
584584 else calc($a, $l[$i])
585585
586586 func $f0_2 ($a,$i) = if (($i >= $s))
587587 then $a
588588 else throw("List size exceeds 15")
589589
590590 $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)
591591 }
592- let y = $t02228222329._1
593- let found = $t02228222329._2
592+ let y = $t02245922506._1
593+ let found = $t02245922506._2
594594 if ((found != unit))
595595 then y
596596 else throw(("Y calculation error, Y = " + toString(y)))
597597 }
598598
599599
600600 func calcDLp (amountBalance,priceBalance,lpEmission) = {
601601 let updatedDLp = fraction(getD([amountBalance, priceBalance]), scale18, lpEmission)
602602 if ((lpEmission == big0))
603603 then big0
604604 else updatedDLp
605605 }
606606
607607
608608 func calcCurrentDLp (amountAssetDelta,priceAssetDelta,lpAssetEmissionDelta) = {
609609 let amountAssetBalance = (toBigInt(getAccBalance(assetIdToString(cfgAmountAssetId))) - amountAssetDelta)
610610 let priceAssetBalance = (toBigInt(getAccBalance(assetIdToString(cfgPriceAssetId))) - priceAssetDelta)
611611 let lpAssetEmission = (toBigInt(value(assetInfo(cfgLpAssetId)).quantity) - lpAssetEmissionDelta)
612612 let currentDLp = calcDLp(amountAssetBalance, priceAssetBalance, lpAssetEmission)
613613 currentDLp
614614 }
615615
616616
617617 func refreshDLpInternal (amountAssetBalanceDelta,priceAssetBalanceDelta,lpAssetEmissionDelta) = {
618618 let amountAssetBalance = (getAccBalance(assetIdToString(cfgAmountAssetId)) + amountAssetBalanceDelta)
619619 let priceAssetBalance = (getAccBalance(assetIdToString(cfgPriceAssetId)) + priceAssetBalanceDelta)
620620 let lpAssetEmission = (value(assetInfo(cfgLpAssetId)).quantity + lpAssetEmissionDelta)
621621 let updatedDLp = calcDLp(toBigInt(amountAssetBalance), toBigInt(priceAssetBalance), toBigInt(lpAssetEmission))
622622 let actions = [IntegerEntry(keyDLpRefreshedHeight, height), StringEntry(keyDLp, toString(updatedDLp))]
623623 $Tuple2(actions, updatedDLp)
624624 }
625625
626626
627627 func validateUpdatedDLp (oldDLp,updatedDLp) = if ((updatedDLp >= oldDLp))
628628 then true
629629 else throwErr("updated DLp lower than current DLp")
630630
631631
632632 func validateMatcherOrderAllowed (order) = {
633633 let amountAssetAmount = order.amount
634634 let priceAssetAmount = fraction(order.amount, order.price, scale8, FLOOR)
635- let $t02426824480 = if ((order.orderType == Buy))
635+ let $t02444524657 = if ((order.orderType == Buy))
636636 then $Tuple2(amountAssetAmount, -(priceAssetAmount))
637637 else $Tuple2(-(amountAssetAmount), priceAssetAmount)
638- let amountAssetBalanceDelta = $t02426824480._1
639- let priceAssetBalanceDelta = $t02426824480._2
638+ let amountAssetBalanceDelta = $t02444524657._1
639+ let priceAssetBalanceDelta = $t02444524657._2
640640 if (if (if (igs())
641641 then true
642642 else (cfgPoolStatus == PoolMatcherDis))
643643 then true
644644 else (cfgPoolStatus == PoolShutdown))
645645 then throw("Admin blocked")
646646 else if (if ((order.assetPair.amountAsset != cfgAmountAssetId))
647647 then true
648648 else (order.assetPair.priceAsset != cfgPriceAssetId))
649649 then throw("Wr assets")
650650 else {
651651 let dLp = parseBigIntValue(getStringValue(this, keyDLp))
652- let $t02481024910 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
653- let unusedActions = $t02481024910._1
654- let dLpNew = $t02481024910._2
652+ let $t02498725087 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
653+ let unusedActions = $t02498725087._1
654+ let dLpNew = $t02498725087._2
655655 let isOrderValid = (dLpNew >= dLp)
656656 isOrderValid
657657 }
658658 }
659659
660660
661661 func cg (i) = if ((size(i.payments) != 1))
662662 then throw("1 pmnt exp")
663663 else {
664664 let pmt = value(i.payments[0])
665665 let pmtAssetId = value(pmt.assetId)
666666 let pmtAmt = pmt.amount
667667 let r = ego(toBase58String(i.transactionId), toBase58String(pmtAssetId), pmtAmt, i.caller)
668668 let outAmAmt = r._1
669669 let outPrAmt = r._2
670670 let sts = parseIntValue(r._9)
671671 let state = r._10
672672 if (if (igs())
673673 then true
674674 else (sts == PoolShutdown))
675675 then throw(("Admin blocked: " + toString(sts)))
676676 else $Tuple5(outAmAmt, outPrAmt, pmtAmt, pmtAssetId, state)
677677 }
678678
679679
680680 func cp (caller,txId,amAsPmt,prAsPmt,slippage,emitLp,isOneAsset,validateSlippage,pmtAmt,pmtId) = {
681681 let r = epo(txId, slippage, value(amAsPmt).amount, value(amAsPmt).assetId, value(prAsPmt).amount, value(prAsPmt).assetId, caller, (txId == ""), emitLp, isOneAsset, validateSlippage, pmtAmt, pmtId)
682682 let sts = parseIntValue(r._8)
683683 if (if (if (igs())
684684 then true
685685 else (sts == PoolPutDis))
686686 then true
687687 else (sts == PoolShutdown))
688688 then throw(("Blocked:" + toString(sts)))
689689 else r
690690 }
691691
692692
693693 func calcPutOneTkn (pmtAmtRaw,pmtAssetId,userAddress,txId,withTakeFee) = {
694694 let amId = toBase58String(value(cfgAmountAssetId))
695695 let prId = toBase58String(value(cfgPriceAssetId))
696696 let lpId = cfgLpAssetId
697697 let amtDcm = cfgAmountAssetDecimals
698698 let priceDcm = cfgPriceAssetDecimals
699699 let lpAssetEmission = toBigInt(valueOrErrorMessage(assetInfo(lpId), "invalid lp asset").quantity)
700700 let chechEmission = if ((lpAssetEmission > big0))
701701 then true
702702 else throw("initial deposit requires all coins")
703703 if ((chechEmission == chechEmission))
704704 then {
705705 let amBalance = getAccBalance(amId)
706706 let prBalance = getAccBalance(prId)
707- let $t02717627638 = if ((txId == ""))
707+ let $t02735327815 = if ((txId == ""))
708708 then $Tuple2(amBalance, prBalance)
709709 else if ((pmtAssetId == amId))
710710 then if ((pmtAmtRaw > amBalance))
711711 then throw("invalid payment amount")
712712 else $Tuple2((amBalance - pmtAmtRaw), prBalance)
713713 else if ((pmtAssetId == prId))
714714 then if ((pmtAmtRaw > prBalance))
715715 then throw("invalid payment amount")
716716 else $Tuple2(amBalance, (prBalance - pmtAmtRaw))
717717 else throw("wrong pmtAssetId")
718- let amBalanceOld = $t02717627638._1
719- let prBalanceOld = $t02717627638._2
720- let $t02764427820 = if ((pmtAssetId == amId))
718+ let amBalanceOld = $t02735327815._1
719+ let prBalanceOld = $t02735327815._2
720+ let $t02782127997 = if ((pmtAssetId == amId))
721721 then $Tuple2(pmtAmtRaw, 0)
722722 else if ((pmtAssetId == prId))
723723 then $Tuple2(0, pmtAmtRaw)
724724 else throw("invalid payment")
725- let amAmountRaw = $t02764427820._1
726- let prAmountRaw = $t02764427820._2
727- let $t02782428063 = if (withTakeFee)
725+ let amAmountRaw = $t02782127997._1
726+ let prAmountRaw = $t02782127997._2
727+ let $t02800128240 = if (withTakeFee)
728728 then $Tuple3(takeFee(amAmountRaw)._1, takeFee(prAmountRaw)._1, takeFee(pmtAmtRaw)._2)
729729 else $Tuple3(amAmountRaw, prAmountRaw, 0)
730- let amAmount = $t02782428063._1
731- let prAmount = $t02782428063._2
732- let feeAmount = $t02782428063._3
730+ let amAmount = $t02800128240._1
731+ let prAmount = $t02800128240._2
732+ let feeAmount = $t02800128240._3
733733 let amBalanceNew = (amBalanceOld + amAmount)
734734 let prBalanceNew = (prBalanceOld + prAmount)
735735 let D0 = getD([toBigInt(amBalanceOld), toBigInt(prBalanceOld)])
736736 let D1 = getD([toBigInt(amBalanceNew), toBigInt(prBalanceNew)])
737737 let checkD = if ((D1 > D0))
738738 then true
739739 else throw()
740740 if ((checkD == checkD))
741741 then {
742742 let lpAmount = fraction(lpAssetEmission, (D1 - D0), D0, FLOOR)
743743 let curPrice = f1(cpbi(t1(prBalanceNew, priceDcm), t1(amBalanceNew, amtDcm)), scale8)
744744 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))]
745745 let poolProportion = fraction(prBalanceOld, scale8, amBalanceOld)
746746 let amountAssetPart = fraction(pmtAmtRaw, scale8, (poolProportion + scale8))
747747 let priceAssetPart = (pmtAmtRaw - amountAssetPart)
748748 let lpAmtBoth = fraction(lpAssetEmission, toBigInt(priceAssetPart), toBigInt(prBalanceOld))
749749 let bonus = toInt(fraction((lpAmount - lpAmtBoth), scale8BigInt, lpAmtBoth))
750750 $Tuple4(toInt(lpAmount), commonState, feeAmount, bonus)
751751 }
752752 else throw("Strict value is not equal to itself.")
753753 }
754754 else throw("Strict value is not equal to itself.")
755755 }
756756
757757
758758 func getOneTknV2Internal (outAssetId,minOutAmount,payments,caller,originCaller,transactionId) = {
759759 let lpId = toBase58String(value(cfgLpAssetId))
760760 let amId = toBase58String(value(cfgAmountAssetId))
761761 let prId = toBase58String(value(cfgPriceAssetId))
762762 let amDecimals = cfgAmountAssetDecimals
763763 let prDecimals = cfgPriceAssetDecimals
764764 let poolStatus = cfgPoolStatus
765765 let userAddress = if ((caller == restContract))
766766 then originCaller
767767 else caller
768768 let pmt = value(payments[0])
769769 let pmtAssetId = value(pmt.assetId)
770770 let pmtAmt = pmt.amount
771771 let currentDLp = calcCurrentDLp(big0, big0, big0)
772772 if ((currentDLp == currentDLp))
773773 then {
774774 let txId58 = toBase58String(transactionId)
775775 if ((lpId != toBase58String(pmtAssetId)))
776776 then throw("Wrong LP")
777777 else {
778778 let amBalance = getAccBalance(amId)
779779 let prBalance = getAccBalance(prId)
780- let $t03011330224 = {
780+ let $t03029030401 = {
781781 let @ = invoke(this, "getOneTknV2READONLY", [outAssetId, pmtAmt], nil)
782782 if ($isInstanceOf(@, "(Int, Int)"))
783783 then @
784784 else throw(($getType(@) + " couldn't be cast to (Int, Int)"))
785785 }
786- if (($t03011330224 == $t03011330224))
786+ if (($t03029030401 == $t03029030401))
787787 then {
788- let feeAmount = $t03011330224._2
789- let totalGet = $t03011330224._1
788+ let feeAmount = $t03029030401._2
789+ let totalGet = $t03029030401._1
790790 let totalAmount = if (if ((minOutAmount > 0))
791791 then (minOutAmount > totalGet)
792792 else false)
793793 then throwErr(makeString(["amount to receive is less than ", toString(minOutAmount)], ""))
794794 else totalGet
795- let $t03041430721 = if ((outAssetId == amId))
795+ let $t03059130898 = if ((outAssetId == amId))
796796 then $Tuple4(totalAmount, 0, ((amBalance - totalAmount) - feeAmount), prBalance)
797797 else if ((outAssetId == prId))
798798 then $Tuple4(0, totalAmount, amBalance, ((prBalance - totalAmount) - feeAmount))
799799 else throw("invalid out asset id")
800- let outAm = $t03041430721._1
801- let outPr = $t03041430721._2
802- let amBalanceNew = $t03041430721._3
803- let prBalanceNew = $t03041430721._4
800+ let outAm = $t03059130898._1
801+ let outPr = $t03059130898._2
802+ let amBalanceNew = $t03059130898._3
803+ let prBalanceNew = $t03059130898._4
804804 let curPrX18 = cpbi(t1(prBalanceNew, prDecimals), t1(amBalanceNew, amDecimals))
805805 let curPr = f1(curPrX18, scale8)
806806 let outAssetIdOrWaves = if ((outAssetId == "WAVES"))
807807 then unit
808808 else fromBase58String(outAssetId)
809809 let sendFeeToMatcher = if ((feeAmount > 0))
810810 then [ScriptTransfer(feeCollectorAddress, feeAmount, outAssetIdOrWaves)]
811811 else nil
812812 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)
813813 if ((state == state))
814814 then {
815815 let burn = invoke(fca, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
816816 if ((burn == burn))
817817 then {
818- let $t03150631856 = {
818+ let $t03168332033 = {
819819 let feeAmountForCalc = if ((this == feeCollectorAddress))
820820 then 0
821821 else feeAmount
822822 let outInAmountAsset = if ((parseAssetId(outAssetId) == cfgAmountAssetId))
823823 then true
824824 else false
825825 if (outInAmountAsset)
826826 then $Tuple2(-((totalGet + feeAmountForCalc)), 0)
827827 else $Tuple2(0, -((totalGet + feeAmountForCalc)))
828828 }
829- let amountAssetBalanceDelta = $t03150631856._1
830- let priceAssetBalanceDelta = $t03150631856._2
831- let $t03185931967 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
832- let refreshDLpActions = $t03185931967._1
833- let updatedDLp = $t03185931967._2
829+ let amountAssetBalanceDelta = $t03168332033._1
830+ let priceAssetBalanceDelta = $t03168332033._2
831+ let $t03203632144 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
832+ let refreshDLpActions = $t03203632144._1
833+ let updatedDLp = $t03203632144._2
834834 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
835835 if ((isUpdatedDLpValid == isUpdatedDLpValid))
836836 then $Tuple2((state ++ refreshDLpActions), totalAmount)
837837 else throw("Strict value is not equal to itself.")
838838 }
839839 else throw("Strict value is not equal to itself.")
840840 }
841841 else throw("Strict value is not equal to itself.")
842842 }
843843 else throw("Strict value is not equal to itself.")
844844 }
845845 }
846846 else throw("Strict value is not equal to itself.")
847847 }
848848
849849
850850 func m () = match getString(mpk()) {
851851 case s: String =>
852852 fromBase58String(s)
853853 case _: Unit =>
854854 unit
855855 case _ =>
856856 throw("Match error")
857857 }
858858
859859
860860 func pm () = match getString(pmpk()) {
861861 case s: String =>
862862 fromBase58String(s)
863863 case _: Unit =>
864864 unit
865865 case _ =>
866866 throw("Match error")
867867 }
868868
869869
870870 let pd = throw("Permission denied")
871871
872872 func isManager (i) = match m() {
873873 case pk: ByteVector =>
874874 (i.callerPublicKey == pk)
875875 case _: Unit =>
876876 (i.caller == this)
877877 case _ =>
878878 throw("Match error")
879879 }
880880
881881
882882 func mm (i) = match m() {
883883 case pk: ByteVector =>
884884 if ((i.callerPublicKey == pk))
885885 then true
886886 else pd
887887 case _: Unit =>
888888 if ((i.caller == this))
889889 then true
890890 else pd
891891 case _ =>
892892 throw("Match error")
893893 }
894894
895895
896896 @Callable(i)
897897 func constructor (fc) = {
898898 let c = mm(i)
899899 if ((c == c))
900900 then [StringEntry(fc(), fc)]
901901 else throw("Strict value is not equal to itself.")
902902 }
903903
904904
905905
906906 @Callable(i)
907907 func setManager (pendingManagerPublicKey) = {
908908 let c = mm(i)
909909 if ((c == c))
910910 then {
911911 let cm = fromBase58String(pendingManagerPublicKey)
912912 if ((cm == cm))
913913 then [StringEntry(pmpk(), pendingManagerPublicKey)]
914914 else throw("Strict value is not equal to itself.")
915915 }
916916 else throw("Strict value is not equal to itself.")
917917 }
918918
919919
920920
921921 @Callable(i)
922922 func confirmManager () = {
923923 let p = pm()
924924 let hpm = if (isDefined(p))
925925 then true
926926 else throw("No pending manager")
927927 if ((hpm == hpm))
928928 then {
929929 let cpm = if ((i.callerPublicKey == value(p)))
930930 then true
931931 else throw("You are not pending manager")
932932 if ((cpm == cpm))
933933 then [StringEntry(mpk(), toBase58String(value(p))), DeleteEntry(pmpk())]
934934 else throw("Strict value is not equal to itself.")
935935 }
936936 else throw("Strict value is not equal to itself.")
937937 }
938938
939939
940940
941941 @Callable(i)
942942 func put (slip,autoStake) = {
943943 let factCfg = gfc()
944944 let stakingCntr = valueOrErrorMessage(addressFromString(factCfg[idxFactStakCntr]), "Wr st addr")
945945 let slipCntr = valueOrErrorMessage(addressFromString(factCfg[idxFactSlippCntr]), "Wr sl addr")
946946 if ((0 > slip))
947947 then throw("Wrong slippage")
948948 else if ((size(i.payments) != 2))
949949 then throw("2 pmnts expd")
950950 else {
951951 let amAssetPmt = toBigInt(value(i.payments[0]).amount)
952952 let prAssetPmt = toBigInt(value(i.payments[1]).amount)
953953 let amountAssetBalance = (toBigInt(getAccBalance(assetIdToString(cfgAmountAssetId))) - amAssetPmt)
954954 if ((amountAssetBalance == amountAssetBalance))
955955 then {
956956 let priceAssetBalance = (toBigInt(getAccBalance(assetIdToString(cfgPriceAssetId))) - prAssetPmt)
957957 if ((priceAssetBalance == priceAssetBalance))
958958 then {
959959 let lpAssetEmission = toBigInt(value(assetInfo(cfgLpAssetId)).quantity)
960960 if ((lpAssetEmission == lpAssetEmission))
961961 then {
962962 let currentDLp = calcCurrentDLp(amAssetPmt, prAssetPmt, toBigInt(0))
963963 if ((currentDLp == currentDLp))
964964 then {
965965 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, "")
966966 let emitLpAmt = e._2
967967 let lpAssetId = e._7
968968 let state = e._9
969969 let amDiff = e._10
970970 let prDiff = e._11
971971 let amId = e._12
972972 let prId = e._13
973973 let r = invoke(fca, "emit", [emitLpAmt], nil)
974974 if ((r == r))
975975 then {
976976 let el = match r {
977977 case legacy: Address =>
978978 invoke(legacy, "emit", [emitLpAmt], nil)
979979 case _ =>
980980 unit
981981 }
982982 if ((el == el))
983983 then {
984984 let sa = if ((amDiff > 0))
985985 then invoke(slipCntr, "put", nil, [AttachedPayment(amId, amDiff)])
986986 else nil
987987 if ((sa == sa))
988988 then {
989989 let sp = if ((prDiff > 0))
990990 then invoke(slipCntr, "put", nil, [AttachedPayment(prId, prDiff)])
991991 else nil
992992 if ((sp == sp))
993993 then {
994994 let lpTrnsfr = if (autoStake)
995995 then {
996996 let ss = invoke(stakingCntr, "stake", nil, [AttachedPayment(lpAssetId, emitLpAmt)])
997997 if ((ss == ss))
998998 then nil
999999 else throw("Strict value is not equal to itself.")
10001000 }
10011001 else [ScriptTransfer(i.caller, emitLpAmt, lpAssetId)]
1002- let $t03611636258 = refreshDLpInternal(0, 0, 0)
1003- let refreshDLpActions = $t03611636258._1
1004- let updatedDLp = $t03611636258._2
1002+ let $t03629336435 = refreshDLpInternal(0, 0, 0)
1003+ let refreshDLpActions = $t03629336435._1
1004+ let updatedDLp = $t03629336435._2
10051005 let check = if ((updatedDLp >= currentDLp))
10061006 then true
10071007 else throwErr(makeString(["updated DLp lower than current DLp", toString(amountAssetBalance), toString(priceAssetBalance), toString(lpAssetEmission), toString(currentDLp), toString(updatedDLp)], " "))
10081008 if ((check == check))
10091009 then {
10101010 let lpAssetEmissionAfter = value(assetInfo(cfgLpAssetId)).quantity
10111011 if ((lpAssetEmissionAfter == lpAssetEmissionAfter))
10121012 then ((state ++ lpTrnsfr) ++ refreshDLpActions)
10131013 else throw("Strict value is not equal to itself.")
10141014 }
10151015 else throw("Strict value is not equal to itself.")
10161016 }
10171017 else throw("Strict value is not equal to itself.")
10181018 }
10191019 else throw("Strict value is not equal to itself.")
10201020 }
10211021 else throw("Strict value is not equal to itself.")
10221022 }
10231023 else throw("Strict value is not equal to itself.")
10241024 }
10251025 else throw("Strict value is not equal to itself.")
10261026 }
10271027 else throw("Strict value is not equal to itself.")
10281028 }
10291029 else throw("Strict value is not equal to itself.")
10301030 }
10311031 else throw("Strict value is not equal to itself.")
10321032 }
10331033 }
10341034
10351035
10361036
10371037 @Callable(i)
10381038 func putOneTknV2 (minOutAmount,autoStake) = {
10391039 let isPoolOneTokenOperationsDisabled = {
10401040 let @ = invoke(fca, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
10411041 if ($isInstanceOf(@, "Boolean"))
10421042 then @
10431043 else throw(($getType(@) + " couldn't be cast to Boolean"))
10441044 }
10451045 let isPutDisabled = if (if (if (igs())
10461046 then true
10471047 else (cfgPoolStatus == PoolPutDis))
10481048 then true
10491049 else (cfgPoolStatus == PoolShutdown))
10501050 then true
10511051 else isPoolOneTokenOperationsDisabled
10521052 let checks = [if (if (!(isPutDisabled))
10531053 then true
10541054 else isManager(i))
10551055 then true
10561056 else throwErr("put operation is blocked by admin"), if ((size(i.payments) == 1))
10571057 then true
10581058 else throwErr("exactly 1 payment are expected")]
10591059 if ((checks == checks))
10601060 then {
10611061 let amId = toBase58String(value(cfgAmountAssetId))
10621062 let prId = toBase58String(value(cfgPriceAssetId))
10631063 let lpId = cfgLpAssetId
10641064 let amDecimals = cfgAmountAssetDecimals
10651065 let prDecimals = cfgPriceAssetDecimals
10661066 let userAddress = if ((i.caller == this))
10671067 then i.originCaller
10681068 else i.caller
10691069 let pmt = value(i.payments[0])
10701070 let pmtAssetId = toBase58String(value(pmt.assetId))
10711071 let pmtAmt = pmt.amount
10721072 let currentDLp = if ((pmt.assetId == cfgAmountAssetId))
10731073 then calcCurrentDLp(toBigInt(pmtAmt), toBigInt(0), toBigInt(0))
10741074 else calcCurrentDLp(toBigInt(0), toBigInt(pmtAmt), toBigInt(0))
10751075 if ((currentDLp == currentDLp))
10761076 then {
1077- let $t03784938007 = calcPutOneTkn(pmtAmt, pmtAssetId, toString(userAddress), toBase58String(i.transactionId), true)
1078- if (($t03784938007 == $t03784938007))
1077+ let $t03813138289 = calcPutOneTkn(pmtAmt, pmtAssetId, toString(userAddress), toBase58String(i.transactionId), true)
1078+ if (($t03813138289 == $t03813138289))
10791079 then {
1080- let feeAmount = $t03784938007._3
1081- let state = $t03784938007._2
1082- let estimLP = $t03784938007._1
1080+ let feeAmount = $t03813138289._3
1081+ let state = $t03813138289._2
1082+ let estimLP = $t03813138289._1
10831083 let emitLpAmt = if (if ((minOutAmount > 0))
10841084 then (minOutAmount > estimLP)
10851085 else false)
10861086 then throwErr(makeString(["amount to receive is less than ", toString(minOutAmount)], ""))
10871087 else estimLP
10881088 let e = invoke(fca, "emit", [emitLpAmt], nil)
10891089 if ((e == e))
10901090 then {
10911091 let el = match e {
10921092 case legacy: Address =>
10931093 invoke(legacy, "emit", [emitLpAmt], nil)
10941094 case _ =>
10951095 unit
10961096 }
10971097 if ((el == el))
10981098 then {
10991099 let lpTrnsfr = if (autoStake)
11001100 then {
11011101 let ss = invoke(stakingContract, "stake", nil, [AttachedPayment(lpId, emitLpAmt)])
11021102 if ((ss == ss))
11031103 then nil
11041104 else throw("Strict value is not equal to itself.")
11051105 }
11061106 else [ScriptTransfer(i.caller, emitLpAmt, lpId)]
11071107 let sendFeeToMatcher = if ((feeAmount > 0))
11081108 then [ScriptTransfer(feeCollectorAddress, feeAmount, fromBase58String(pmtAssetId))]
11091109 else nil
1110- let $t03882239171 = if ((this == feeCollectorAddress))
1110+ let $t03910439453 = if ((this == feeCollectorAddress))
11111111 then $Tuple2(0, 0)
11121112 else {
11131113 let paymentInAmountAsset = if ((pmt.assetId == cfgAmountAssetId))
11141114 then true
11151115 else false
11161116 if (paymentInAmountAsset)
11171117 then $Tuple2(-(feeAmount), 0)
11181118 else $Tuple2(0, -(feeAmount))
11191119 }
1120- let amountAssetBalanceDelta = $t03882239171._1
1121- let priceAssetBalanceDelta = $t03882239171._2
1122- let $t03917439282 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
1123- let refreshDLpActions = $t03917439282._1
1124- let updatedDLp = $t03917439282._2
1120+ let amountAssetBalanceDelta = $t03910439453._1
1121+ let priceAssetBalanceDelta = $t03910439453._2
1122+ let $t03945639564 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
1123+ let refreshDLpActions = $t03945639564._1
1124+ let updatedDLp = $t03945639564._2
11251125 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
11261126 if ((isUpdatedDLpValid == isUpdatedDLpValid))
11271127 then $Tuple2((((state ++ lpTrnsfr) ++ sendFeeToMatcher) ++ refreshDLpActions), emitLpAmt)
11281128 else throw("Strict value is not equal to itself.")
11291129 }
11301130 else throw("Strict value is not equal to itself.")
11311131 }
11321132 else throw("Strict value is not equal to itself.")
11331133 }
11341134 else throw("Strict value is not equal to itself.")
11351135 }
11361136 else throw("Strict value is not equal to itself.")
11371137 }
11381138 else throw("Strict value is not equal to itself.")
11391139 }
11401140
11411141
11421142
11431143 @Callable(i)
11441144 func putForFree (maxSlpg) = if ((0 > maxSlpg))
11451145 then throw("Wrong slpg")
11461146 else if ((size(i.payments) != 2))
11471147 then throw("2 pmnts expd")
11481148 else {
11491149 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, "")
11501150 let state = estPut._9
11511151 let amAssetPmt = toBigInt(value(i.payments[0]).amount)
11521152 let prAssetPmt = toBigInt(value(i.payments[1]).amount)
11531153 let currentDLp = calcCurrentDLp(amAssetPmt, prAssetPmt, toBigInt(0))
11541154 if ((currentDLp == currentDLp))
11551155 then {
1156- let $t04031240377 = refreshDLpInternal(0, 0, 0)
1157- let refreshDLpActions = $t04031240377._1
1158- let updatedDLp = $t04031240377._2
1156+ let $t04059440659 = refreshDLpInternal(0, 0, 0)
1157+ let refreshDLpActions = $t04059440659._1
1158+ let updatedDLp = $t04059440659._2
11591159 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
11601160 if ((isUpdatedDLpValid == isUpdatedDLpValid))
11611161 then (state ++ refreshDLpActions)
11621162 else throw("Strict value is not equal to itself.")
11631163 }
11641164 else throw("Strict value is not equal to itself.")
11651165 }
11661166
11671167
11681168
11691169 @Callable(i)
11701170 func get () = {
11711171 let currentDLp = calcCurrentDLp(toBigInt(0), toBigInt(0), toBigInt(0))
11721172 if ((currentDLp == currentDLp))
11731173 then {
11741174 let r = cg(i)
11751175 let outAmtAmt = r._1
11761176 let outPrAmt = r._2
11771177 let pmtAmt = r._3
11781178 let pmtAssetId = r._4
11791179 let state = r._5
11801180 let b = invoke(fca, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
11811181 if ((b == b))
11821182 then {
1183- let $t04155041632 = refreshDLpInternal(-(outAmtAmt), -(outPrAmt), 0)
1184- let refreshDLpActions = $t04155041632._1
1185- let updatedDLp = $t04155041632._2
1183+ let $t04183241914 = refreshDLpInternal(-(outAmtAmt), -(outPrAmt), 0)
1184+ let refreshDLpActions = $t04183241914._1
1185+ let updatedDLp = $t04183241914._2
11861186 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
11871187 if ((isUpdatedDLpValid == isUpdatedDLpValid))
11881188 then (state ++ refreshDLpActions)
11891189 else throw("Strict value is not equal to itself.")
11901190 }
11911191 else throw("Strict value is not equal to itself.")
11921192 }
11931193 else throw("Strict value is not equal to itself.")
11941194 }
11951195
11961196
11971197
11981198 @Callable(i)
11991199 func getOneTknV2 (outAssetId,minOutAmount) = {
12001200 let isPoolOneTokenOperationsDisabled = {
12011201 let @ = invoke(fca, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
12021202 if ($isInstanceOf(@, "Boolean"))
12031203 then @
12041204 else throw(($getType(@) + " couldn't be cast to Boolean"))
12051205 }
12061206 let isGetDisabled = if (if (igs())
12071207 then true
12081208 else (cfgPoolStatus == PoolShutdown))
12091209 then true
12101210 else isPoolOneTokenOperationsDisabled
12111211 let checks = [if (if (!(isGetDisabled))
12121212 then true
12131213 else isManager(i))
12141214 then true
12151215 else throwErr("get operation is blocked by admin"), if ((size(i.payments) == 1))
12161216 then true
12171217 else throwErr("exactly 1 payment are expected")]
12181218 if ((checks == checks))
12191219 then {
1220- let $t04225042405 = getOneTknV2Internal(outAssetId, minOutAmount, i.payments, i.caller, i.originCaller, i.transactionId)
1221- let state = $t04225042405._1
1222- let totalAmount = $t04225042405._2
1220+ let $t04253242687 = getOneTknV2Internal(outAssetId, minOutAmount, i.payments, i.caller, i.originCaller, i.transactionId)
1221+ let state = $t04253242687._1
1222+ let totalAmount = $t04253242687._2
12231223 $Tuple2(state, totalAmount)
12241224 }
12251225 else throw("Strict value is not equal to itself.")
12261226 }
12271227
12281228
12291229
12301230 @Callable(i)
12311231 func refreshDLp () = {
12321232 let lastRefreshedBlockHeight = valueOrElse(getInteger(keyDLpRefreshedHeight), 0)
12331233 let checkLastRefreshedBlockHeight = if (((height - lastRefreshedBlockHeight) >= dLpRefreshDelay))
12341234 then unit
12351235 else throwErr(makeString([toString(dLpRefreshDelay), " blocks have not passed since the previous call"], ""))
12361236 if ((checkLastRefreshedBlockHeight == checkLastRefreshedBlockHeight))
12371237 then {
12381238 let dLp = valueOrErrorMessage(parseBigInt(valueOrElse(getString(this, keyDLp), "0")), fmtErr("invalid dLp"))
1239- let $t04292942993 = refreshDLpInternal(0, 0, 0)
1240- let dLpUpdateActions = $t04292942993._1
1241- let updatedDLp = $t04292942993._2
1239+ let $t04321143275 = refreshDLpInternal(0, 0, 0)
1240+ let dLpUpdateActions = $t04321143275._1
1241+ let updatedDLp = $t04321143275._2
12421242 let actions = if ((dLp != updatedDLp))
12431243 then dLpUpdateActions
12441244 else throwErr("nothing to refresh")
12451245 $Tuple2(actions, toString(updatedDLp))
12461246 }
12471247 else throw("Strict value is not equal to itself.")
12481248 }
12491249
12501250
12511251
12521252 @Callable(i)
12531253 func getOneTknV2READONLY (outAssetId,lpAssetAmount) = {
12541254 let amId = toBase58String(value(cfgAmountAssetId))
12551255 let prId = toBase58String(value(cfgPriceAssetId))
12561256 let lpId = toBase58String(value(cfgLpAssetId))
12571257 let xp = [toBigInt(getAccBalance(amId)), toBigInt(getAccBalance(prId))]
12581258 let lpEmission = toBigInt(valueOrErrorMessage(assetInfo(fromBase58String(lpId)), "invalid lp asset").quantity)
12591259 let D0 = getD(xp)
12601260 let D1 = (D0 - fraction(toBigInt(lpAssetAmount), D0, lpEmission))
12611261 let index = if ((outAssetId == amId))
12621262 then 0
12631263 else if ((outAssetId == prId))
12641264 then 1
12651265 else throw("invalid out asset id")
12661266 let newY = getYD(xp, index, D1)
12671267 let dy = (xp[index] - newY)
12681268 let totalGetRaw = max([0, toInt((dy - big1))])
1269- let $t04392343972 = takeFee(totalGetRaw)
1270- let totalGet = $t04392343972._1
1271- let feeAmount = $t04392343972._2
1269+ let $t04420544254 = takeFee(totalGetRaw)
1270+ let totalGet = $t04420544254._1
1271+ let feeAmount = $t04420544254._2
12721272 $Tuple2(nil, $Tuple2(totalGet, feeAmount))
12731273 }
12741274
12751275
12761276
12771277 @Callable(i)
12781278 func getOneTknV2WithBonusREADONLY (outAssetId,lpAssetAmount) = {
12791279 let amId = toBase58String(value(cfgAmountAssetId))
12801280 let prId = toBase58String(value(cfgPriceAssetId))
12811281 let lpId = toBase58String(value(cfgLpAssetId))
12821282 let amBalance = getAccBalance(amId)
12831283 let prBalance = getAccBalance(prId)
1284- let $t04434744462 = {
1284+ let $t04462944744 = {
12851285 let @ = invoke(this, "getOneTknV2READONLY", [outAssetId, lpAssetAmount], nil)
12861286 if ($isInstanceOf(@, "(Int, Int)"))
12871287 then @
12881288 else throw(($getType(@) + " couldn't be cast to (Int, Int)"))
12891289 }
1290- let totalGet = $t04434744462._1
1291- let feeAmount = $t04434744462._2
1290+ let totalGet = $t04462944744._1
1291+ let feeAmount = $t04462944744._2
12921292 let r = ego("", lpId, lpAssetAmount, this)
12931293 let outAmAmt = r._1
12941294 let outPrAmt = r._2
12951295 let sumOfGetAssets = (outAmAmt + outPrAmt)
12961296 let bonus = if ((sumOfGetAssets == 0))
12971297 then if ((totalGet == 0))
12981298 then 0
12991299 else throw("bonus calculation error")
13001300 else fraction((totalGet - sumOfGetAssets), scale8, sumOfGetAssets)
13011301 $Tuple2(nil, $Tuple3(totalGet, feeAmount, bonus))
13021302 }
13031303
13041304
13051305
13061306 @Callable(i)
13071307 func getNoLess (noLessThenAmtAsset,noLessThenPriceAsset) = {
13081308 let aab = toBigInt(getAccBalance(assetIdToString(cfgAmountAssetId)))
13091309 if ((aab == aab))
13101310 then {
13111311 let pab = toBigInt(getAccBalance(assetIdToString(cfgPriceAssetId)))
13121312 if ((pab == pab))
13131313 then {
13141314 let lae = toBigInt(value(assetInfo(cfgLpAssetId)).quantity)
13151315 if ((lae == lae))
13161316 then {
13171317 let laea = (lae - toBigInt(value(i.payments[0]).amount))
13181318 if ((laea == laea))
13191319 then {
13201320 let r = cg(i)
13211321 let outAmAmt = r._1
13221322 let outPrAmt = r._2
13231323 let pmtAmt = r._3
13241324 let pmtAssetId = r._4
13251325 let state = r._5
13261326 if ((noLessThenAmtAsset > outAmAmt))
13271327 then throw(((("Failed: " + toString(outAmAmt)) + " < ") + toString(noLessThenAmtAsset)))
13281328 else if ((noLessThenPriceAsset > outPrAmt))
13291329 then throw(((("Failed: " + toString(outPrAmt)) + " < ") + toString(noLessThenPriceAsset)))
13301330 else {
13311331 let currentDLp = calcCurrentDLp(toBigInt(0), toBigInt(0), toBigInt(0))
13321332 if ((currentDLp == currentDLp))
13331333 then {
13341334 let burnLPAssetOnFactory = invoke(fca, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
13351335 if ((burnLPAssetOnFactory == burnLPAssetOnFactory))
13361336 then {
1337- let $t04600146082 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1338- let refreshDLpActions = $t04600146082._1
1339- let updatedDLp = $t04600146082._2
1337+ let $t04628346364 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1338+ let refreshDLpActions = $t04628346364._1
1339+ let updatedDLp = $t04628346364._2
13401340 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
13411341 if ((isUpdatedDLpValid == isUpdatedDLpValid))
13421342 then (state ++ refreshDLpActions)
13431343 else throw("Strict value is not equal to itself.")
13441344 }
13451345 else throw("Strict value is not equal to itself.")
13461346 }
13471347 else throw("Strict value is not equal to itself.")
13481348 }
13491349 }
13501350 else throw("Strict value is not equal to itself.")
13511351 }
13521352 else throw("Strict value is not equal to itself.")
13531353 }
13541354 else throw("Strict value is not equal to itself.")
13551355 }
13561356 else throw("Strict value is not equal to itself.")
13571357 }
13581358
13591359
13601360
13611361 @Callable(i)
13621362 func unstakeAndGet (amount) = {
13631363 let checkPayments = if ((size(i.payments) != 0))
13641364 then throw("No pmnts expd")
13651365 else true
13661366 if ((checkPayments == checkPayments))
13671367 then {
13681368 let factoryCfg = gfc()
13691369 let lpAssetId = cfgLpAssetId
13701370 let staking = valueOrErrorMessage(addressFromString(factoryCfg[idxFactStakCntr]), "Wr st addr")
13711371 let currentDLp = calcCurrentDLp(toBigInt(0), toBigInt(0), toBigInt(0))
13721372 let unstakeInv = invoke(staking, "unstake", [toBase58String(lpAssetId), amount], nil)
13731373 if ((unstakeInv == unstakeInv))
13741374 then {
13751375 let r = ego(toBase58String(i.transactionId), toBase58String(lpAssetId), amount, i.caller)
13761376 let outAmAmt = r._1
13771377 let outPrAmt = r._2
13781378 let sts = parseIntValue(r._9)
13791379 let state = r._10
13801380 let v = if (if (igs())
13811381 then true
13821382 else (sts == PoolShutdown))
13831383 then throw(("Blocked: " + toString(sts)))
13841384 else true
13851385 if ((v == v))
13861386 then {
13871387 let burnA = invoke(fca, "burn", [amount], [AttachedPayment(lpAssetId, amount)])
13881388 if ((burnA == burnA))
13891389 then {
1390- let $t04710647187 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1391- let refreshDLpActions = $t04710647187._1
1392- let updatedDLp = $t04710647187._2
1390+ let $t04738847469 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1391+ let refreshDLpActions = $t04738847469._1
1392+ let updatedDLp = $t04738847469._2
13931393 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
13941394 if ((isUpdatedDLpValid == isUpdatedDLpValid))
13951395 then (state ++ refreshDLpActions)
13961396 else throw("Strict value is not equal to itself.")
13971397 }
13981398 else throw("Strict value is not equal to itself.")
13991399 }
14001400 else throw("Strict value is not equal to itself.")
14011401 }
14021402 else throw("Strict value is not equal to itself.")
14031403 }
14041404 else throw("Strict value is not equal to itself.")
14051405 }
14061406
14071407
14081408
14091409 @Callable(i)
14101410 func unstakeAndGetNoLess (unstakeAmount,noLessThenAmountAsset,noLessThenPriceAsset) = {
14111411 let isGetDisabled = if (igs())
14121412 then true
14131413 else (cfgPoolStatus == PoolShutdown)
14141414 let checks = [if (!(isGetDisabled))
14151415 then true
14161416 else throw("get operation is blocked by admin"), if ((size(i.payments) == 0))
14171417 then true
14181418 else throw("no payments are expected")]
14191419 if ((checks == checks))
14201420 then {
14211421 let currentDLp = calcCurrentDLp(toBigInt(0), toBigInt(0), toBigInt(0))
14221422 let unstakeInv = invoke(stakingContract, "unstake", [toBase58String(cfgLpAssetId), unstakeAmount], nil)
14231423 if ((unstakeInv == unstakeInv))
14241424 then {
14251425 let res = ego(toBase58String(i.transactionId), toBase58String(cfgLpAssetId), unstakeAmount, i.caller)
14261426 let outAmAmt = res._1
14271427 let outPrAmt = res._2
14281428 let state = res._10
14291429 let checkAmounts = [if ((outAmAmt >= noLessThenAmountAsset))
14301430 then true
14311431 else throw(makeString(["amount asset amount to receive is less than ", toString(noLessThenAmountAsset)], "")), if ((outPrAmt >= noLessThenPriceAsset))
14321432 then true
14331433 else throw(makeString(["price asset amount to receive is less than ", toString(noLessThenPriceAsset)], ""))]
14341434 if ((checkAmounts == checkAmounts))
14351435 then {
14361436 let burnLPAssetOnFactory = invoke(fca, "burn", [unstakeAmount], [AttachedPayment(cfgLpAssetId, unstakeAmount)])
14371437 if ((burnLPAssetOnFactory == burnLPAssetOnFactory))
14381438 then {
1439- let $t04843548516 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1440- let refreshDLpActions = $t04843548516._1
1441- let updatedDLp = $t04843548516._2
1439+ let $t04871748798 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1440+ let refreshDLpActions = $t04871748798._1
1441+ let updatedDLp = $t04871748798._2
14421442 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
14431443 if ((isUpdatedDLpValid == isUpdatedDLpValid))
14441444 then (state ++ refreshDLpActions)
14451445 else throw("Strict value is not equal to itself.")
14461446 }
14471447 else throw("Strict value is not equal to itself.")
14481448 }
14491449 else throw("Strict value is not equal to itself.")
14501450 }
14511451 else throw("Strict value is not equal to itself.")
14521452 }
14531453 else throw("Strict value is not equal to itself.")
14541454 }
14551455
14561456
14571457
14581458 @Callable(i)
14591459 func unstakeAndGetOneTknV2 (unstakeAmount,outAssetId,minOutAmount) = {
14601460 let isPoolOneTokenOperationsDisabled = {
14611461 let @ = invoke(fca, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
14621462 if ($isInstanceOf(@, "Boolean"))
14631463 then @
14641464 else throw(($getType(@) + " couldn't be cast to Boolean"))
14651465 }
14661466 let isGetDisabled = if (if (igs())
14671467 then true
14681468 else (cfgPoolStatus == PoolShutdown))
14691469 then true
14701470 else isPoolOneTokenOperationsDisabled
14711471 let checks = [if (if (!(isGetDisabled))
14721472 then true
14731473 else isManager(i))
14741474 then true
14751475 else throwErr("get operation is blocked by admin"), if ((size(i.payments) == 0))
14761476 then true
14771477 else throwErr("no payments are expected")]
14781478 if ((checks == checks))
14791479 then {
14801480 let factoryCfg = gfc()
14811481 let lpAssetId = cfgLpAssetId
14821482 let staking = valueOrErrorMessage(addressFromString(factoryCfg[idxFactStakCntr]), "Wr st addr")
14831483 let unstakeInv = invoke(staking, "unstake", [toBase58String(lpAssetId), unstakeAmount], nil)
14841484 if ((unstakeInv == unstakeInv))
14851485 then {
1486- let $t04941149599 = getOneTknV2Internal(outAssetId, minOutAmount, [AttachedPayment(lpAssetId, unstakeAmount)], i.caller, i.originCaller, i.transactionId)
1487- let state = $t04941149599._1
1488- let totalAmount = $t04941149599._2
1486+ let $t04969349881 = getOneTknV2Internal(outAssetId, minOutAmount, [AttachedPayment(lpAssetId, unstakeAmount)], i.caller, i.originCaller, i.transactionId)
1487+ let state = $t04969349881._1
1488+ let totalAmount = $t04969349881._2
14891489 $Tuple2(state, totalAmount)
14901490 }
14911491 else throw("Strict value is not equal to itself.")
14921492 }
14931493 else throw("Strict value is not equal to itself.")
14941494 }
14951495
14961496
14971497
14981498 @Callable(i)
14991499 func putOneTknV2WithBonusREADONLY (paymentAmountRaw,paymentAssetId) = {
1500- let $t04972749830 = calcPutOneTkn(paymentAmountRaw, paymentAssetId, "", "", true)
1501- let lpAmount = $t04972749830._1
1502- let state = $t04972749830._2
1503- let feeAmount = $t04972749830._3
1504- let bonus = $t04972749830._4
1500+ let $t05000950112 = calcPutOneTkn(paymentAmountRaw, paymentAssetId, "", "", true)
1501+ let lpAmount = $t05000950112._1
1502+ let state = $t05000950112._2
1503+ let feeAmount = $t05000950112._3
1504+ let bonus = $t05000950112._4
15051505 $Tuple2(nil, $Tuple3(lpAmount, feeAmount, bonus))
15061506 }
15071507
15081508
15091509
15101510 @Callable(i)
15111511 func putOneTknV2WithoutTakeFeeREADONLY (paymentAmountRaw,paymentAssetId) = {
1512- let $t04997850082 = calcPutOneTkn(paymentAmountRaw, paymentAssetId, "", "", false)
1513- let lpAmount = $t04997850082._1
1514- let state = $t04997850082._2
1515- let feeAmount = $t04997850082._3
1516- let bonus = $t04997850082._4
1512+ let $t05026050364 = calcPutOneTkn(paymentAmountRaw, paymentAssetId, "", "", false)
1513+ let lpAmount = $t05026050364._1
1514+ let state = $t05026050364._2
1515+ let feeAmount = $t05026050364._3
1516+ let bonus = $t05026050364._4
15171517 $Tuple2(nil, $Tuple3(lpAmount, feeAmount, bonus))
15181518 }
15191519
15201520
15211521
15221522 @Callable(i)
15231523 func activate (amtAsStr,prAsStr) = if ((toString(i.caller) != toString(fca)))
15241524 then throw("denied")
15251525 else $Tuple2([StringEntry(aa(), amtAsStr), StringEntry(pa(), prAsStr)], "success")
15261526
15271527
15281528
15291529 @Callable(i)
15301530 func setS (k,v) = if ((toString(i.caller) != strf(this, ada())))
15311531 then pd
15321532 else [StringEntry(k, v)]
15331533
15341534
15351535
15361536 @Callable(i)
15371537 func setI (k,v) = if ((toString(i.caller) != strf(this, ada())))
15381538 then pd
15391539 else [IntegerEntry(k, v)]
15401540
15411541
15421542
15431543 @Callable(i)
15441544 func getPoolConfigWrapperREADONLY () = $Tuple2(nil, gpc())
15451545
15461546
15471547
15481548 @Callable(i)
15491549 func getAccBalanceWrapperREADONLY (assetId) = $Tuple2(nil, getAccBalance(assetId))
15501550
15511551
15521552
15531553 @Callable(i)
15541554 func calcPricesWrapperREADONLY (amAmt,prAmt,lpAmt) = {
15551555 let pr = calcPrices(amAmt, prAmt, lpAmt)
15561556 $Tuple2(nil, [toString(pr[0]), toString(pr[1]), toString(pr[2])])
15571557 }
15581558
15591559
15601560
15611561 @Callable(i)
15621562 func fromX18WrapperREADONLY (val,resScaleMult) = $Tuple2(nil, f1(parseBigIntValue(val), resScaleMult))
15631563
15641564
15651565
15661566 @Callable(i)
15671567 func toX18WrapperREADONLY (origVal,origScaleMult) = $Tuple2(nil, toString(t1(origVal, origScaleMult)))
15681568
15691569
15701570
15711571 @Callable(i)
15721572 func calcPriceBigIntWrapperREADONLY (prAmtX18,amAmtX18) = $Tuple2(nil, toString(cpbi(parseBigIntValue(prAmtX18), parseBigIntValue(amAmtX18))))
15731573
15741574
15751575
15761576 @Callable(i)
15771577 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, ""))
15781578
15791579
15801580
15811581 @Callable(i)
15821582 func estimateGetOperationWrapperREADONLY (txId58,pmtAsId,pmtLpAmt,usrAddr) = {
15831583 let r = ego(txId58, pmtAsId, pmtLpAmt, addressFromStringValue(usrAddr))
15841584 $Tuple2(nil, $Tuple10(r._1, r._2, r._3, r._4, r._5, r._6, r._7, toString(r._8), r._9, r._10))
15851585 }
15861586
15871587
15881588
15891589 @Callable(i)
15901590 func getFeeREADONLY () = $Tuple2(nil, fee)
15911591
15921592
15931593 @Verifier(tx)
15941594 func verify () = {
15951595 let targetPublicKey = match m() {
15961596 case pk: ByteVector =>
15971597 pk
15981598 case _: Unit =>
15991599 tx.senderPublicKey
16001600 case _ =>
16011601 throw("Match error")
16021602 }
16031603 match tx {
16041604 case order: Order =>
16051605 let matcherPub = mp()
16061606 let orderValid = validateMatcherOrderAllowed(order)
16071607 let senderValid = sigVerify(order.bodyBytes, order.proofs[0], order.senderPublicKey)
16081608 let matcherValid = sigVerify(order.bodyBytes, order.proofs[1], matcherPub)
16091609 if (if (if (orderValid)
16101610 then senderValid
16111611 else false)
16121612 then matcherValid
16131613 else false)
16141614 then true
16151615 else toe(orderValid, senderValid, matcherValid)
16161616 case s: SetScriptTransaction =>
16171617 let newHash = blake2b256(value(s.script))
16181618 let allowedHash = fromBase64String(value(getString(fca, keyAllowedLpStableScriptHash())))
16191619 let currentHash = scriptHash(this)
16201620 if (if ((allowedHash == newHash))
16211621 then (currentHash != newHash)
16221622 else false)
16231623 then true
16241624 else sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey)
16251625 case _ =>
16261626 sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey)
16271627 }
16281628 }
16291629

github/deemru/w8io/169f3d6 
220.87 ms