tx · Du9kDYGkFo53oLCaDowhUFG4VKpPvt8CyxJW6hZH87gs

3NAefciWv6f9fWvEXdGgpHfanJFG8HqfjuT:  -0.04000000 Waves

2023.02.10 10:17 [2443215] smart account 3NAefciWv6f9fWvEXdGgpHfanJFG8HqfjuT > SELF 0.00000000 Waves

{ "type": 13, "id": "Du9kDYGkFo53oLCaDowhUFG4VKpPvt8CyxJW6hZH87gs", "fee": 4000000, "feeAssetId": null, "timestamp": 1676013425246, "version": 2, "chainId": 84, "sender": "3NAefciWv6f9fWvEXdGgpHfanJFG8HqfjuT", "senderPublicKey": "D1BL65meykxFZTCuq7jq9HSGLLnWvQamQPUNrguW5w39", "proofs": [ "3WzGonMi6qSkkV9ZZJZzspqhYgpRg9pag9248Q2fsTYasguYqFruebdghUqkjNmfpwKADwM1X5KJoyWKQMNdnZan" ], "script": "base64:BgLYKggCEgQKAgEEEgYKBAEEAQgSAwoBCBIDCgEIEgASBAoCAQQSBAoCAQQSAwoBARIAEgQKAggBEgASBAoCCAESBAoCCAESBAoCAQESAwoBARIFCgMBAQESBQoDAQgBEgQKAgEIEgQKAgEIEgQKAggIEgQKAggIEgQKAggBEgASAwoBCBIFCgMBAQESBAoCCAESBAoCAQESBAoCCAgSCwoJCAEBAgECCAQEEgYKBAgIAQgiBnNjYWxlOCIMc2NhbGU4QmlnSW50IgdzY2FsZTE4Igp6ZXJvQmlnSW50IgRiaWcwIgRiaWcxIgRiaWcyIgRiaWczIgRiaWc0IgpzbGlwcGFnZTREIgt3YXZlc1N0cmluZyIFQW11bHQiBURjb252IgNTRVAiBUVNUFRZIgpQb29sQWN0aXZlIgpQb29sUHV0RGlzIg5Qb29sTWF0Y2hlckRpcyIMUG9vbFNodXRkb3duIg5pZHhQb29sQWRkcmVzcyIJaWR4UG9vbFN0IglpZHhMUEFzSWQiCWlkeEFtQXNJZCIJaWR4UHJBc0lkIgtpZHhBbXRBc0RjbSINaWR4UHJpY2VBc0RjbSILaWR4SUFtdEFzSWQiDWlkeEl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CeXRlcwkAkQMCCAUCZVoGcHJvb2ZzAAEFAmlqAwMDBQJhRgUCYUgHBQJhSQcGCQECYUUEBQJhRgUCYUcFAmFIBQJhSQMJAAECBQJnbAIUU2V0U2NyaXB0VHJhbnNhY3Rpb24EAmNDBQJnbAMJAPQDAwgFAmlnCWJvZHlCeXRlcwkAkQMCCAUCaWcGcHJvb2ZzAAAFAmlpBgQCaWwJAPYDAQkBBXZhbHVlAQgFAmNDBnNjcmlwdAQCaW0JANsEAQkBBXZhbHVlAQkAnQgCBQJhUQkBAmFDAAQCaW4JAPEHAQUEdGhpcwMJAAACBQJpbQUCaWwJAQIhPQIFAmluBQJpbAcJAPQDAwgFAmlnCWJvZHlCeXRlcwkAkQMCCAUCaWcGcHJvb2ZzAAAFAmlpDnBk1A==", "height": 2443215, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 5AgjhwQG3NGFP3Ah7rqD2au6h6iJYCfzLh63LSnADcyy Next: 2XJ5QrUeS6abmdoaHQ3TfaWoYnVR8NEsE27VYsu7FbYz Diff:
OldNewDifferences
369369 else $Tuple2(dNext, false)
370370 }
371371
372- let arr = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
373- let $t01269112739 = {
372+ let arr = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17]
373+ let $t01270312751 = {
374374 let $l = arr
375375 let $s = size($l)
376376 let $acc0 = $Tuple2(s, false)
380380
381381 func $f0_2 ($a,$i) = if (($i >= $s))
382382 then $a
383- else throw("List size exceeds 15")
383+ else throw("List size exceeds 18")
384384
385- $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15)
385+ $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18)
386386 }
387- let d = $t01269112739._1
388- let found = $t01269112739._2
387+ let d = $t01270312751._1
388+ let found = $t01270312751._2
389389 if (found)
390390 then d
391391 else throw(("D calculation error, D = " + toString(d)))
521521 else calcLpAmt
522522 let amDiff = (inAmAmt - calcAmAssetPmt)
523523 let prDiff = (inPrAmt - calcPrAssetPmt)
524- let $t02057820923 = if (if (isOneAsset)
524+ let $t02059020935 = if (if (isOneAsset)
525525 then (pmtId == amIdStr)
526526 else false)
527527 then $Tuple2(pmtAmt, 0)
530530 else false)
531531 then $Tuple2(0, pmtAmt)
532532 else $Tuple2(calcAmAssetPmt, calcPrAssetPmt)
533- let writeAmAmt = $t02057820923._1
534- let writePrAmt = $t02057820923._2
533+ let writeAmAmt = $t02059020935._1
534+ let writePrAmt = $t02059020935._2
535535 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))]
536536 $Tuple13(calcLpAmt, emitLpAmt, curPrice, amBalance, prBalance, lpEm, lpId, sts, commonState, amDiff, prDiff, inAmId, inPrId)
537537 }
550550 let c = (((((D * D) / (x * n)) * D) * aPrecision) / (ann * n))
551551 let b = ((s + ((D * aPrecision) / ann)) - D)
552552 func calc (acc,cur) = {
553- let $t02211822138 = acc
554- let y = $t02211822138._1
555- let found = $t02211822138._2
553+ let $t02213022150 = acc
554+ let y = $t02213022150._1
555+ let found = $t02213022150._2
556556 if ((found != unit))
557557 then acc
558558 else {
565565 }
566566
567567 let arr = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
568- let $t02244522492 = {
568+ let $t02245722504 = {
569569 let $l = arr
570570 let $s = size($l)
571571 let $acc0 = $Tuple2(D, unit)
579579
580580 $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)
581581 }
582- let y = $t02244522492._1
583- let found = $t02244522492._2
582+ let y = $t02245722504._1
583+ let found = $t02245722504._2
584584 if ((found != unit))
585585 then y
586586 else throw(("Y calculation error, Y = " + toString(y)))
624624 let priceAssetBalance = getAccBalance(assetIdToString(cfgPriceAssetId))
625625 let amountAssetAmount = order.amount
626626 let priceAssetAmount = fraction(order.amount, order.price, scale8, FLOOR)
627- let $t02469024902 = if ((order.orderType == Buy))
627+ let $t02470224914 = if ((order.orderType == Buy))
628628 then $Tuple2(amountAssetAmount, -(priceAssetAmount))
629629 else $Tuple2(-(amountAssetAmount), priceAssetAmount)
630- let amountAssetBalanceDelta = $t02469024902._1
631- let priceAssetBalanceDelta = $t02469024902._2
630+ let amountAssetBalanceDelta = $t02470224914._1
631+ let priceAssetBalanceDelta = $t02470224914._2
632632 if (if (if (igs())
633633 then true
634634 else (cfgPoolStatus == PoolMatcherDis))
641641 then throw("Wr assets")
642642 else {
643643 let dLp = parseBigIntValue(valueOrElse(getString(this, keyDLp), "0"))
644- let $t02524425344 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
645- let unusedActions = $t02524425344._1
646- let dLpNew = $t02524425344._2
644+ let $t02525625356 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
645+ let unusedActions = $t02525625356._1
646+ let dLpNew = $t02525625356._2
647647 let isOrderValid = (dLpNew >= dLp)
648648 let info = makeString(["dLp=", toString(dLp), " dLpNew=", toString(dLpNew), " amountAssetBalance=", toString(amountAssetBalance), " priceAssetBalance=", toString(priceAssetBalance), " amountAssetBalanceDelta=", toString(amountAssetBalanceDelta), " priceAssetBalanceDelta=", toString(priceAssetBalanceDelta), " height=", toString(height)], "")
649649 $Tuple2(isOrderValid, info)
697697 then {
698698 let amBalance = getAccBalance(amId)
699699 let prBalance = getAccBalance(prId)
700- let $t02800028462 = if ((txId == ""))
700+ let $t02801228474 = if ((txId == ""))
701701 then $Tuple2(amBalance, prBalance)
702702 else if ((pmtAssetId == amId))
703703 then if ((pmtAmtRaw > amBalance))
708708 then throw("invalid payment amount")
709709 else $Tuple2(amBalance, (prBalance - pmtAmtRaw))
710710 else throw("wrong pmtAssetId")
711- let amBalanceOld = $t02800028462._1
712- let prBalanceOld = $t02800028462._2
713- let $t02846828644 = if ((pmtAssetId == amId))
711+ let amBalanceOld = $t02801228474._1
712+ let prBalanceOld = $t02801228474._2
713+ let $t02848028656 = if ((pmtAssetId == amId))
714714 then $Tuple2(pmtAmtRaw, 0)
715715 else if ((pmtAssetId == prId))
716716 then $Tuple2(0, pmtAmtRaw)
717717 else throw("invalid payment")
718- let amAmountRaw = $t02846828644._1
719- let prAmountRaw = $t02846828644._2
720- let $t02864828902 = if (withTakeFee)
718+ let amAmountRaw = $t02848028656._1
719+ let prAmountRaw = $t02848028656._2
720+ let $t02866028914 = if (withTakeFee)
721721 then $Tuple3(takeFee(amAmountRaw, inFee)._1, takeFee(prAmountRaw, inFee)._1, takeFee(pmtAmtRaw, inFee)._2)
722722 else $Tuple3(amAmountRaw, prAmountRaw, 0)
723- let amAmount = $t02864828902._1
724- let prAmount = $t02864828902._2
725- let feeAmount = $t02864828902._3
723+ let amAmount = $t02866028914._1
724+ let prAmount = $t02866028914._2
725+ let feeAmount = $t02866028914._3
726726 let amBalanceNew = (amBalanceOld + amAmount)
727727 let prBalanceNew = (prBalanceOld + prAmount)
728728 let D0 = getD([t1(amBalanceOld, cfgAmountAssetDecimals), t1(prBalanceOld, cfgPriceAssetDecimals)])
770770 else {
771771 let amBalance = getAccBalance(amId)
772772 let prBalance = getAccBalance(prId)
773- let $t03101431125 = {
773+ let $t03102631137 = {
774774 let @ = invoke(this, "getOneTknV2READONLY", [outAssetId, pmtAmt], nil)
775775 if ($isInstanceOf(@, "(Int, Int)"))
776776 then @
777777 else throw(($getType(@) + " couldn't be cast to (Int, Int)"))
778778 }
779- if (($t03101431125 == $t03101431125))
779+ if (($t03102631137 == $t03102631137))
780780 then {
781- let feeAmount = $t03101431125._2
782- let totalGet = $t03101431125._1
781+ let feeAmount = $t03102631137._2
782+ let totalGet = $t03102631137._1
783783 let totalAmount = if (if ((minOutAmount > 0))
784784 then (minOutAmount > totalGet)
785785 else false)
786786 then throwErr(makeString(["amount to receive is less than ", toString(minOutAmount)], ""))
787787 else totalGet
788- let $t03131531622 = if ((outAssetId == amId))
788+ let $t03132731634 = if ((outAssetId == amId))
789789 then $Tuple4(totalAmount, 0, ((amBalance - totalAmount) - feeAmount), prBalance)
790790 else if ((outAssetId == prId))
791791 then $Tuple4(0, totalAmount, amBalance, ((prBalance - totalAmount) - feeAmount))
792792 else throw("invalid out asset id")
793- let outAm = $t03131531622._1
794- let outPr = $t03131531622._2
795- let amBalanceNew = $t03131531622._3
796- let prBalanceNew = $t03131531622._4
793+ let outAm = $t03132731634._1
794+ let outPr = $t03132731634._2
795+ let amBalanceNew = $t03132731634._3
796+ let prBalanceNew = $t03132731634._4
797797 let curPrX18 = cpbi(t1(prBalanceNew, prDecimals), t1(amBalanceNew, amDecimals))
798798 let curPr = f1(curPrX18, scale8)
799799 let outAssetIdOrWaves = if ((outAssetId == "WAVES"))
808808 let burn = invoke(fca, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
809809 if ((burn == burn))
810810 then {
811- let $t03240732757 = {
811+ let $t03241932769 = {
812812 let feeAmountForCalc = if ((this == feeCollectorAddress))
813813 then 0
814814 else feeAmount
819819 then $Tuple2(-((totalGet + feeAmountForCalc)), 0)
820820 else $Tuple2(0, -((totalGet + feeAmountForCalc)))
821821 }
822- let amountAssetBalanceDelta = $t03240732757._1
823- let priceAssetBalanceDelta = $t03240732757._2
824- let $t03276032868 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
825- let refreshDLpActions = $t03276032868._1
826- let updatedDLp = $t03276032868._2
822+ let amountAssetBalanceDelta = $t03241932769._1
823+ let priceAssetBalanceDelta = $t03241932769._2
824+ let $t03277232880 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
825+ let refreshDLpActions = $t03277232880._1
826+ let updatedDLp = $t03277232880._2
827827 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
828828 if ((isUpdatedDLpValid == isUpdatedDLpValid))
829829 then $Tuple2((state ++ refreshDLpActions), totalAmount)
902902 let c = (((((D * D) / (x * n)) * D) * aPrecision) / (ann * n))
903903 let b = ((s + ((D * aPrecision) / ann)) - D)
904904 func calc (acc,cur) = {
905- let $t03431534335 = acc
906- let y = $t03431534335._1
907- let found = $t03431534335._2
905+ let $t03432734347 = acc
906+ let y = $t03432734347._1
907+ let found = $t03432734347._2
908908 if ((found != unit))
909909 then acc
910910 else {
917917 }
918918
919919 let arr = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
920- let $t03466634713 = {
920+ let $t03467834725 = {
921921 let $l = arr
922922 let $s = size($l)
923923 let $acc0 = $Tuple2(D, unit)
931931
932932 $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)
933933 }
934- let y = $t03466634713._1
935- let found = $t03466634713._2
934+ let y = $t03467834725._1
935+ let found = $t03467834725._2
936936 if ((found != unit))
937937 then y
938938 else throw(("Y calculation error, Y = " + toString(y)))
941941
942942 @Callable(i)
943943 func calculateAmountOutForSwapREADONLY (cleanAmountIn,isReverse) = {
944- let $t03493435358 = if ((isReverse == false))
944+ let $t03494635370 = if ((isReverse == false))
945945 then {
946946 let assetOut = strf(this, pa())
947947 let poolAmountInBalance = (toBigInt(getAccBalance(strf(this, aa()))) + toBigInt(cleanAmountIn))
952952 let poolAmountInBalance = (toBigInt(getAccBalance(strf(this, pa()))) + toBigInt(cleanAmountIn))
953953 $Tuple2(assetOut, poolAmountInBalance)
954954 }
955- let assetOut = $t03493435358._1
956- let poolAmountInBalance = $t03493435358._2
955+ let assetOut = $t03494635370._1
956+ let poolAmountInBalance = $t03494635370._2
957957 let poolConfig = gpc()
958958 let amId = poolConfig[idxAmAsId]
959959 let prId = poolConfig[idxPrAsId]
962962 let y = getY(isReverse, D, toBigInt(cleanAmountIn))
963963 let dy = ((toBigInt(getAccBalance(assetOut)) - y) - toBigInt(1))
964964 let totalGetRaw = max([0, toInt(dy)])
965- $Tuple2(nil, totalGetRaw)
965+ let newXp = if ((isReverse == false))
966+ then [(toBigInt(getAccBalance(amId)) + toBigInt(cleanAmountIn)), (toBigInt(getAccBalance(prId)) - dy)]
967+ else [(toBigInt(getAccBalance(amId)) - dy), (toBigInt(getAccBalance(prId)) + toBigInt(cleanAmountIn))]
968+ let newD = getD(newXp)
969+ let checkD = if ((newD >= D))
970+ then true
971+ else throw(makeString(["new D is fewer error", toString(D), toString(newD)], "__"))
972+ if ((checkD == checkD))
973+ then $Tuple2(nil, totalGetRaw)
974+ else throw("Strict value is not equal to itself.")
966975 }
967976
968977
986995 let assetIn = if ((pmt.assetId == unit))
987996 then toBase58String(toBytes("WAVES"))
988997 else toBase58String(value(pmt.assetId))
989- let $t03681037204 = if ((isReverse == false))
998+ let $t03680837202 = if ((isReverse == false))
990999 then {
9911000 let assetOut = strf(this, pa())
9921001 let poolAmountInBalance = (getAccBalance(assetIn) - value(i.payments[0]).amount)
9971006 let poolAmountInBalance = (getAccBalance(assetIn) - value(i.payments[0]).amount)
9981007 $Tuple2(assetOut, poolAmountInBalance)
9991008 }
1000- let assetOut = $t03681037204._1
1001- let poolAmountInBalance = $t03681037204._2
1009+ let assetOut = $t03680837202._1
1010+ let poolAmountInBalance = $t03680837202._2
10021011 let poolConfig = gpc()
10031012 let amId = poolConfig[idxAmAsId]
10041013 let prId = poolConfig[idxPrAsId]
11381147 else throw("Strict value is not equal to itself.")
11391148 }
11401149 else [ScriptTransfer(i.caller, emitLpAmt, lpAssetId)]
1141- let $t04206142203 = refreshDLpInternal(0, 0, 0)
1142- let refreshDLpActions = $t04206142203._1
1143- let updatedDLp = $t04206142203._2
1150+ let $t04205942201 = refreshDLpInternal(0, 0, 0)
1151+ let refreshDLpActions = $t04205942201._1
1152+ let updatedDLp = $t04205942201._2
11441153 let check = if ((updatedDLp >= currentDLp))
11451154 then true
11461155 else throwErr(makeString(["updated DLp lower than current DLp", toString(amountAssetBalance), toString(priceAssetBalance), toString(lpAssetEmission), toString(currentDLp), toString(updatedDLp), toString(amDiff), toString(prDiff)], " "))
12131222 else calcCurrentDLp(toBigInt(0), toBigInt(pmtAmt), toBigInt(0))
12141223 if ((currentDLp == currentDLp))
12151224 then {
1216- let $t04384444002 = calcPutOneTkn(pmtAmt, pmtAssetId, toString(userAddress), toBase58String(i.transactionId), true)
1217- if (($t04384444002 == $t04384444002))
1225+ let $t04384244000 = calcPutOneTkn(pmtAmt, pmtAssetId, toString(userAddress), toBase58String(i.transactionId), true)
1226+ if (($t04384244000 == $t04384244000))
12181227 then {
1219- let feeAmount = $t04384444002._3
1220- let state = $t04384444002._2
1221- let estimLP = $t04384444002._1
1228+ let feeAmount = $t04384244000._3
1229+ let state = $t04384244000._2
1230+ let estimLP = $t04384244000._1
12221231 let emitLpAmt = if (if ((minOutAmount > 0))
12231232 then (minOutAmount > estimLP)
12241233 else false)
12461255 let sendFeeToMatcher = if ((feeAmount > 0))
12471256 then [ScriptTransfer(feeCollectorAddress, feeAmount, fromBase58String(pmtAssetId))]
12481257 else nil
1249- let $t04481745166 = if ((this == feeCollectorAddress))
1258+ let $t04481545164 = if ((this == feeCollectorAddress))
12501259 then $Tuple2(0, 0)
12511260 else {
12521261 let paymentInAmountAsset = if ((pmt.assetId == cfgAmountAssetId))
12561265 then $Tuple2(-(feeAmount), 0)
12571266 else $Tuple2(0, -(feeAmount))
12581267 }
1259- let amountAssetBalanceDelta = $t04481745166._1
1260- let priceAssetBalanceDelta = $t04481745166._2
1261- let $t04516945277 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
1262- let refreshDLpActions = $t04516945277._1
1263- let updatedDLp = $t04516945277._2
1268+ let amountAssetBalanceDelta = $t04481545164._1
1269+ let priceAssetBalanceDelta = $t04481545164._2
1270+ let $t04516745275 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
1271+ let refreshDLpActions = $t04516745275._1
1272+ let updatedDLp = $t04516745275._2
12641273 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
12651274 if ((isUpdatedDLpValid == isUpdatedDLpValid))
12661275 then $Tuple2((((state ++ lpTrnsfr) ++ sendFeeToMatcher) ++ refreshDLpActions), emitLpAmt)
12921301 let currentDLp = calcCurrentDLp(amAssetPmt, prAssetPmt, toBigInt(0))
12931302 if ((currentDLp == currentDLp))
12941303 then {
1295- let $t04630746372 = refreshDLpInternal(0, 0, 0)
1296- let refreshDLpActions = $t04630746372._1
1297- let updatedDLp = $t04630746372._2
1304+ let $t04630546370 = refreshDLpInternal(0, 0, 0)
1305+ let refreshDLpActions = $t04630546370._1
1306+ let updatedDLp = $t04630546370._2
12981307 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
12991308 if ((isUpdatedDLpValid == isUpdatedDLpValid))
13001309 then (state ++ refreshDLpActions)
13191328 let b = invoke(fca, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
13201329 if ((b == b))
13211330 then {
1322- let $t04754547627 = refreshDLpInternal(-(outAmtAmt), -(outPrAmt), 0)
1323- let refreshDLpActions = $t04754547627._1
1324- let updatedDLp = $t04754547627._2
1331+ let $t04754347625 = refreshDLpInternal(-(outAmtAmt), -(outPrAmt), 0)
1332+ let refreshDLpActions = $t04754347625._1
1333+ let updatedDLp = $t04754347625._2
13251334 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
13261335 if ((isUpdatedDLpValid == isUpdatedDLpValid))
13271336 then (state ++ refreshDLpActions)
13561365 else throwErr("exactly 1 payment are expected")]
13571366 if ((checks == checks))
13581367 then {
1359- let $t04824548400 = getOneTknV2Internal(outAssetId, minOutAmount, i.payments, i.caller, i.originCaller, i.transactionId)
1360- let state = $t04824548400._1
1361- let totalAmount = $t04824548400._2
1368+ let $t04824348398 = getOneTknV2Internal(outAssetId, minOutAmount, i.payments, i.caller, i.originCaller, i.transactionId)
1369+ let state = $t04824348398._1
1370+ let totalAmount = $t04824348398._2
13621371 $Tuple2(state, totalAmount)
13631372 }
13641373 else throw("Strict value is not equal to itself.")
13751384 if ((checkLastRefreshedBlockHeight == checkLastRefreshedBlockHeight))
13761385 then {
13771386 let dLp = valueOrErrorMessage(parseBigInt(valueOrElse(getString(this, keyDLp), "0")), fmtErr("invalid dLp"))
1378- let $t04892448988 = refreshDLpInternal(0, 0, 0)
1379- let dLpUpdateActions = $t04892448988._1
1380- let updatedDLp = $t04892448988._2
1387+ let $t04892248986 = refreshDLpInternal(0, 0, 0)
1388+ let dLpUpdateActions = $t04892248986._1
1389+ let updatedDLp = $t04892248986._2
13811390 let actions = if ((dLp != updatedDLp))
13821391 then dLpUpdateActions
13831392 else throwErr("nothing to refresh")
14051414 let newY = getYD(xp, index, D1)
14061415 let dy = (xp[index] - newY)
14071416 let totalGetRaw = max([0, toInt((dy - big1))])
1408- let $t04999850053 = takeFee(totalGetRaw, outFee)
1409- let totalGet = $t04999850053._1
1410- let feeAmount = $t04999850053._2
1417+ let $t04999650051 = takeFee(totalGetRaw, outFee)
1418+ let totalGet = $t04999650051._1
1419+ let feeAmount = $t04999650051._2
14111420 $Tuple2(nil, $Tuple2(totalGet, feeAmount))
14121421 }
14131422
14201429 let lpId = toBase58String(value(cfgLpAssetId))
14211430 let amBalance = getAccBalance(amId)
14221431 let prBalance = getAccBalance(prId)
1423- let $t05042850543 = {
1432+ let $t05042650541 = {
14241433 let @ = invoke(this, "getOneTknV2READONLY", [outAssetId, lpAssetAmount], nil)
14251434 if ($isInstanceOf(@, "(Int, Int)"))
14261435 then @
14271436 else throw(($getType(@) + " couldn't be cast to (Int, Int)"))
14281437 }
1429- let totalGet = $t05042850543._1
1430- let feeAmount = $t05042850543._2
1438+ let totalGet = $t05042650541._1
1439+ let feeAmount = $t05042650541._2
14311440 let r = ego("", lpId, lpAssetAmount, this)
14321441 let outAmAmt = r._1
14331442 let outPrAmt = r._2
14611470 let burnLPAssetOnFactory = invoke(fca, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
14621471 if ((burnLPAssetOnFactory == burnLPAssetOnFactory))
14631472 then {
1464- let $t05170951790 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1465- let refreshDLpActions = $t05170951790._1
1466- let updatedDLp = $t05170951790._2
1473+ let $t05170751788 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1474+ let refreshDLpActions = $t05170751788._1
1475+ let updatedDLp = $t05170751788._2
14671476 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
14681477 if ((isUpdatedDLpValid == isUpdatedDLpValid))
14691478 then (state ++ refreshDLpActions)
15081517 let burnA = invoke(fca, "burn", [amount], [AttachedPayment(lpAssetId, amount)])
15091518 if ((burnA == burnA))
15101519 then {
1511- let $t05281752898 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1512- let refreshDLpActions = $t05281752898._1
1513- let updatedDLp = $t05281752898._2
1520+ let $t05281552896 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1521+ let refreshDLpActions = $t05281552896._1
1522+ let updatedDLp = $t05281552896._2
15141523 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
15151524 if ((isUpdatedDLpValid == isUpdatedDLpValid))
15161525 then (state ++ refreshDLpActions)
15611570 let burnLPAssetOnFactory = invoke(fca, "burn", [unstakeAmount], [AttachedPayment(cfgLpAssetId, unstakeAmount)])
15621571 if ((burnLPAssetOnFactory == burnLPAssetOnFactory))
15631572 then {
1564- let $t05414954230 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1565- let refreshDLpActions = $t05414954230._1
1566- let updatedDLp = $t05414954230._2
1573+ let $t05414754228 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1574+ let refreshDLpActions = $t05414754228._1
1575+ let updatedDLp = $t05414754228._2
15671576 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
15681577 if ((isUpdatedDLpValid == isUpdatedDLpValid))
15691578 then (state ++ refreshDLpActions)
16101619 let unstakeInv = invoke(staking, "unstake", [toBase58String(lpAssetId), unstakeAmount], nil)
16111620 if ((unstakeInv == unstakeInv))
16121621 then {
1613- let $t05512555313 = getOneTknV2Internal(outAssetId, minOutAmount, [AttachedPayment(lpAssetId, unstakeAmount)], i.caller, i.originCaller, i.transactionId)
1614- let state = $t05512555313._1
1615- let totalAmount = $t05512555313._2
1622+ let $t05512355311 = getOneTknV2Internal(outAssetId, minOutAmount, [AttachedPayment(lpAssetId, unstakeAmount)], i.caller, i.originCaller, i.transactionId)
1623+ let state = $t05512355311._1
1624+ let totalAmount = $t05512355311._2
16161625 $Tuple2(state, totalAmount)
16171626 }
16181627 else throw("Strict value is not equal to itself.")
16241633
16251634 @Callable(i)
16261635 func putOneTknV2WithBonusREADONLY (paymentAmountRaw,paymentAssetId) = {
1627- let $t05544155544 = calcPutOneTkn(paymentAmountRaw, paymentAssetId, "", "", true)
1628- let lpAmount = $t05544155544._1
1629- let state = $t05544155544._2
1630- let feeAmount = $t05544155544._3
1631- let bonus = $t05544155544._4
1636+ let $t05543955542 = calcPutOneTkn(paymentAmountRaw, paymentAssetId, "", "", true)
1637+ let lpAmount = $t05543955542._1
1638+ let state = $t05543955542._2
1639+ let feeAmount = $t05543955542._3
1640+ let bonus = $t05543955542._4
16321641 $Tuple2(nil, $Tuple3(lpAmount, feeAmount, bonus))
16331642 }
16341643
16361645
16371646 @Callable(i)
16381647 func putOneTknV2WithoutTakeFeeREADONLY (paymentAmountRaw,paymentAssetId) = {
1639- let $t05569255796 = calcPutOneTkn(paymentAmountRaw, paymentAssetId, "", "", false)
1640- let lpAmount = $t05569255796._1
1641- let state = $t05569255796._2
1642- let feeAmount = $t05569255796._3
1643- let bonus = $t05569255796._4
1648+ let $t05569055794 = calcPutOneTkn(paymentAmountRaw, paymentAssetId, "", "", false)
1649+ let lpAmount = $t05569055794._1
1650+ let state = $t05569055794._2
1651+ let feeAmount = $t05569055794._3
1652+ let bonus = $t05569055794._4
16441653 $Tuple2(nil, $Tuple3(lpAmount, feeAmount, bonus))
16451654 }
16461655
17251734 match tx {
17261735 case order: Order =>
17271736 let matcherPub = mp()
1728- let $t05858858657 = validateMatcherOrderAllowed(order)
1729- let orderValid = $t05858858657._1
1730- let orderValidInfo = $t05858858657._2
1737+ let $t05858658655 = validateMatcherOrderAllowed(order)
1738+ let orderValid = $t05858658655._1
1739+ let orderValidInfo = $t05858658655._2
17311740 let senderValid = sigVerify(order.bodyBytes, order.proofs[0], order.senderPublicKey)
17321741 let matcherValid = sigVerify(order.bodyBytes, order.proofs[1], matcherPub)
17331742 if (if (if (orderValid)
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let scale8 = 100000000
55
66 let scale8BigInt = toBigInt(100000000)
77
88 let scale18 = toBigInt(1000000000000000000)
99
1010 let zeroBigInt = toBigInt(0)
1111
1212 let big0 = toBigInt(0)
1313
1414 let big1 = toBigInt(1)
1515
1616 let big2 = toBigInt(2)
1717
1818 let big3 = toBigInt(3)
1919
2020 let big4 = toBigInt(4)
2121
2222 let slippage4D = toBigInt((scale8 - ((scale8 * 1) / scale8)))
2323
2424 let wavesString = "WAVES"
2525
2626 let Amult = "100"
2727
2828 let Dconv = "1"
2929
3030 let SEP = "__"
3131
3232 let EMPTY = ""
3333
3434 let PoolActive = 1
3535
3636 let PoolPutDis = 2
3737
3838 let PoolMatcherDis = 3
3939
4040 let PoolShutdown = 4
4141
4242 let idxPoolAddress = 1
4343
4444 let idxPoolSt = 2
4545
4646 let idxLPAsId = 3
4747
4848 let idxAmAsId = 4
4949
5050 let idxPrAsId = 5
5151
5252 let idxAmtAsDcm = 6
5353
5454 let idxPriceAsDcm = 7
5555
5656 let idxIAmtAsId = 8
5757
5858 let idxIPriceAsId = 9
5959
6060 let idxFactStakCntr = 1
6161
6262 let idxFactoryRestCntr = 6
6363
6464 let idxFactSlippCntr = 7
6565
6666 let idxFactGwxRewCntr = 10
6767
6868 let feeDefault = fraction(10, scale8, 10000)
6969
7070 func t1 (origVal,origScaleMult) = fraction(toBigInt(origVal), scale18, toBigInt(origScaleMult))
7171
7272
7373 func t1BigInt (origVal,origScaleMult) = fraction(origVal, scale18, origScaleMult)
7474
7575
7676 func f1 (val,resultScaleMult) = toInt(fraction(val, toBigInt(resultScaleMult), scale18))
7777
7878
7979 func fromX18Round (val,resultScaleMult,round) = toInt(fraction(val, toBigInt(resultScaleMult), scale18, round))
8080
8181
8282 func t2 (origVal,origScaleMult) = fraction(origVal, scale18, toBigInt(origScaleMult))
8383
8484
8585 func f2 (val,resultScaleMult) = fraction(val, toBigInt(resultScaleMult), scale18)
8686
8787
8888 func ts (amt,resScale,curScale) = fraction(amt, resScale, curScale)
8989
9090
9191 func abs (val) = if ((zeroBigInt > val))
9292 then -(val)
9393 else val
9494
9595
9696 func absBigInt (val) = if ((zeroBigInt > val))
9797 then -(val)
9898 else val
9999
100100
101101 func fc () = "%s__factoryContract"
102102
103103
104104 func mpk () = "%s__managerPublicKey"
105105
106106
107107 func pmpk () = "%s__pendingManagerPublicKey"
108108
109109
110110 func pl () = "%s%s__price__last"
111111
112112
113113 func ph (h,t) = makeString(["%s%s%d%d__price__history", toString(h), toString(t)], SEP)
114114
115115
116116 func pau (ua,txId) = ((("%s%s%s__P__" + ua) + "__") + txId)
117117
118118
119119 func gau (ua,txId) = ((("%s%s%s__G__" + ua) + "__") + txId)
120120
121121
122122 func aa () = "%s__amountAsset"
123123
124124
125125 func pa () = "%s__priceAsset"
126126
127127
128128 func amp () = "%s__amp"
129129
130130
131131 func ada () = "%s__addonAddr"
132132
133133
134134 let keyFee = "%s__fee"
135135
136136 let fee = valueOrElse(getInteger(this, keyFee), feeDefault)
137137
138138 let keyDLp = makeString(["%s", "dLp"], SEP)
139139
140140 let keyDLpRefreshedHeight = makeString(["%s", "dLpRefreshedHeight"], SEP)
141141
142142 let keyDLpRefreshDelay = makeString(["%s", "refreshDLpDelay"], SEP)
143143
144144 let dLpRefreshDelayDefault = 30
145145
146146 let dLpRefreshDelay = valueOrElse(getInteger(this, keyDLpRefreshDelay), dLpRefreshDelayDefault)
147147
148148 func fcfg () = "%s__factoryConfig"
149149
150150
151151 func mtpk () = "%s%s__matcher__publicKey"
152152
153153
154154 func pc (iAmtAs,iPrAs) = (((("%d%d%s__" + iAmtAs) + "__") + iPrAs) + "__config")
155155
156156
157157 func mba (bAStr) = ("%s%s%s__mappings__baseAsset2internalId__" + bAStr)
158158
159159
160160 func aps () = "%s__shutdown"
161161
162162
163163 func keyAllowedLpStableScriptHash () = "%s__allowedLpStableScriptHash"
164164
165165
166166 func keyFeeCollectorAddress () = "%s__feeCollectorAddress"
167167
168168
169169 func throwOrderError (orderValid,orderValidInfo,senderValid,matcherValid) = throw((((((((("order validation failed: orderValid=" + toString(orderValid)) + " (") + orderValidInfo) + ")") + " senderValid=") + toString(senderValid)) + " matcherValid=") + toString(matcherValid)))
170170
171171
172172 func strf (addr,key) = valueOrErrorMessage(getString(addr, key), makeString(["mandatory ", toString(addr), ".", key, " not defined"], ""))
173173
174174
175175 func intf (addr,key) = valueOrErrorMessage(getInteger(addr, key), makeString(["mandatory ", toString(addr), ".", key, " not defined"], ""))
176176
177177
178178 func throwErr (msg) = throw(makeString(["lp_stable.ride:", msg], " "))
179179
180180
181181 func fmtErr (msg) = makeString(["lp_stable.ride:", msg], " ")
182182
183183
184184 let fca = addressFromStringValue(strf(this, fc()))
185185
186186 let inFee = {
187187 let @ = invoke(fca, "getInFeeREADONLY", [toString(this)], nil)
188188 if ($isInstanceOf(@, "Int"))
189189 then @
190190 else throw(($getType(@) + " couldn't be cast to Int"))
191191 }
192192
193193 let outFee = {
194194 let @ = invoke(fca, "getOutFeeREADONLY", [toString(this)], nil)
195195 if ($isInstanceOf(@, "Int"))
196196 then @
197197 else throw(($getType(@) + " couldn't be cast to Int"))
198198 }
199199
200200 let A = strf(this, amp())
201201
202202 func igs () = valueOrElse(getBoolean(fca, aps()), false)
203203
204204
205205 func mp () = fromBase58String(strf(fca, mtpk()))
206206
207207
208208 let feeCollectorAddress = addressFromStringValue(strf(fca, keyFeeCollectorAddress()))
209209
210210 func gpc () = {
211211 let amtAs = strf(this, aa())
212212 let priceAs = strf(this, pa())
213213 let iPriceAs = intf(fca, mba(priceAs))
214214 let iAmtAs = intf(fca, mba(amtAs))
215215 split(strf(fca, pc(toString(iAmtAs), toString(iPriceAs))), SEP)
216216 }
217217
218218
219219 func parseAssetId (input) = if ((input == wavesString))
220220 then unit
221221 else fromBase58String(input)
222222
223223
224224 func assetIdToString (input) = if ((input == unit))
225225 then wavesString
226226 else toBase58String(value(input))
227227
228228
229229 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]))
230230
231231
232232 let poolConfigParsed = parsePoolConfig(gpc())
233233
234234 let $t079658194 = poolConfigParsed
235235
236236 let cfgPoolAddress = $t079658194._1
237237
238238 let cfgPoolStatus = $t079658194._2
239239
240240 let cfgLpAssetId = $t079658194._3
241241
242242 let cfgAmountAssetId = $t079658194._4
243243
244244 let cfgPriceAssetId = $t079658194._5
245245
246246 let cfgAmountAssetDecimals = $t079658194._6
247247
248248 let cfgPriceAssetDecimals = $t079658194._7
249249
250250 let cfgInAmountAssedId = $t079658194._8
251251
252252 let cfgInPriceAssetId = $t079658194._9
253253
254254 func gfc () = split(strf(fca, fcfg()), SEP)
255255
256256
257257 let factoryConfig = gfc()
258258
259259 let stakingContract = valueOrErrorMessage(addressFromString(factoryConfig[idxFactStakCntr]), "Invalid staking contract address")
260260
261261 let slipageContract = valueOrErrorMessage(addressFromString(factoryConfig[idxFactSlippCntr]), "Invalid slipage contract address")
262262
263263 let gwxContract = valueOrErrorMessage(addressFromString(factoryConfig[idxFactGwxRewCntr]), "Invalid gwx contract address")
264264
265265 let restContract = valueOrErrorMessage(addressFromString(factoryConfig[idxFactoryRestCntr]), "Invalid gwx contract address")
266266
267267 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)
268268
269269
270270 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)
271271
272272
273273 func getAccBalance (assetId) = if ((assetId == "WAVES"))
274274 then wavesBalance(this).available
275275 else assetBalance(this, fromBase58String(assetId))
276276
277277
278278 func cpbi (prAmtX18,amAmtX18) = fraction(prAmtX18, scale18, amAmtX18)
279279
280280
281281 func cpbir (prAmtX18,amAmtX18,round) = fraction(prAmtX18, scale18, amAmtX18, round)
282282
283283
284284 func vad (A1,A2,slippage) = {
285285 let diff = fraction((A1 - A2), scale8BigInt, A2)
286286 let pass = ((slippage - abs(diff)) > zeroBigInt)
287287 if (!(pass))
288288 then throw(("Big slpg: " + toString(diff)))
289289 else $Tuple2(pass, min([A1, A2]))
290290 }
291291
292292
293293 func vd (D1,D0,slpg) = {
294294 let diff = fraction(D0, scale8BigInt, D1)
295295 let fail = (slpg > diff)
296296 if (if (fail)
297297 then true
298298 else (D0 > D1))
299299 then throw(((((((toString(D0) + " ") + toString(D1)) + " ") + toString(diff)) + " ") + toString(slpg)))
300300 else fail
301301 }
302302
303303
304304 func pcp (amAssetDcm,prAssetDcm,amAmt,prAmt) = {
305305 let amtAsAmtX18 = t1(amAmt, amAssetDcm)
306306 let prAsAmtX18 = t1(prAmt, prAssetDcm)
307307 cpbi(prAsAmtX18, amtAsAmtX18)
308308 }
309309
310310
311311 func calcPrices (amAmt,prAmt,lpAmt) = {
312312 let amtAsDcm = cfgAmountAssetDecimals
313313 let prAsDcm = cfgPriceAssetDecimals
314314 let priceX18 = pcp(amtAsDcm, prAsDcm, amAmt, prAmt)
315315 let amAmtX18 = t1(amAmt, amtAsDcm)
316316 let prAmtX18 = t1(prAmt, prAsDcm)
317317 let lpAmtX18 = t1(lpAmt, scale8)
318318 let lpPrInAmAsX18 = cpbi(amAmtX18, lpAmtX18)
319319 let lpPrInPrAsX18 = cpbi(prAmtX18, lpAmtX18)
320320 [priceX18, lpPrInAmAsX18, lpPrInPrAsX18]
321321 }
322322
323323
324324 func calculatePrices (amAmt,prAmt,lpAmt) = {
325325 let p = calcPrices(amAmt, prAmt, lpAmt)
326326 [f1(p[0], scale8), f1(p[1], scale8), f1(p[2], scale8)]
327327 }
328328
329329
330330 func takeFee (amount,fee) = {
331331 let feeAmount = if ((fee == 0))
332332 then 0
333333 else fraction(amount, fee, scale8)
334334 $Tuple2((amount - feeAmount), feeAmount)
335335 }
336336
337337
338338 func getD (xp) = {
339339 let xp0 = xp[0]
340340 let xp1 = xp[1]
341341 let s = (xp0 + xp1)
342342 if ((s == big0))
343343 then big0
344344 else {
345345 let a = parseIntValue(A)
346346 let ann = (a * 2)
347347 let p = fraction(xp0, xp1, big1)
348348 let xp0_xp1_n_n = fraction(p, big4, big1)
349349 let ann_s = fraction(toBigInt(ann), s, big1)
350350 let ann_1 = toBigInt((ann - 1))
351351 func calcDNext (d) = {
352352 let dd = fraction(d, d, big1)
353353 let ddd = fraction(dd, d, big1)
354354 let dp = fraction(ddd, big1, xp0_xp1_n_n)
355355 fraction((ann_s + fraction(dp, big2, big1)), d, (fraction(ann_1, d, big1) + fraction(big3, dp, big1)))
356356 }
357357
358358 func calc (acc,i) = if (acc._2)
359359 then acc
360360 else {
361361 let d = acc._1
362362 let dNext = calcDNext(d)
363363 let dDiffRaw = (dNext - value(d))
364364 let dDiff = if ((big0 > dDiffRaw))
365365 then -(dDiffRaw)
366366 else dDiffRaw
367367 if ((big1 >= dDiff))
368368 then $Tuple2(dNext, true)
369369 else $Tuple2(dNext, false)
370370 }
371371
372- let arr = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
373- let $t01269112739 = {
372+ let arr = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17]
373+ let $t01270312751 = {
374374 let $l = arr
375375 let $s = size($l)
376376 let $acc0 = $Tuple2(s, false)
377377 func $f0_1 ($a,$i) = if (($i >= $s))
378378 then $a
379379 else calc($a, $l[$i])
380380
381381 func $f0_2 ($a,$i) = if (($i >= $s))
382382 then $a
383- else throw("List size exceeds 15")
383+ else throw("List size exceeds 18")
384384
385- $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15)
385+ $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18)
386386 }
387- let d = $t01269112739._1
388- let found = $t01269112739._2
387+ let d = $t01270312751._1
388+ let found = $t01270312751._2
389389 if (found)
390390 then d
391391 else throw(("D calculation error, D = " + toString(d)))
392392 }
393393 }
394394
395395
396396 func ego (txId58,pmtAssetId,pmtLpAmt,userAddress) = {
397397 let lpId = cfgLpAssetId
398398 let amId = toBase58String(value(cfgAmountAssetId))
399399 let prId = toBase58String(value(cfgPriceAssetId))
400400 let amDcm = cfgAmountAssetDecimals
401401 let prDcm = cfgPriceAssetDecimals
402402 let sts = toString(cfgPoolStatus)
403403 let lpEmiss = valueOrErrorMessage(assetInfo(lpId), "Wrong LP id").quantity
404404 if ((toBase58String(lpId) != pmtAssetId))
405405 then throw("Wrong pmt asset")
406406 else {
407407 let amBalance = getAccBalance(amId)
408408 let amBalanceX18 = t1(amBalance, amDcm)
409409 let prBalance = getAccBalance(prId)
410410 let prBalanceX18 = t1(prBalance, prDcm)
411411 let curPriceX18 = cpbi(prBalanceX18, amBalanceX18)
412412 let curPrice = f1(curPriceX18, scale8)
413413 let pmtLpAmtX18 = t1(pmtLpAmt, scale8)
414414 let lpEmissX18 = t1(lpEmiss, scale8)
415415 let outAmAmtX18 = fraction(amBalanceX18, pmtLpAmtX18, lpEmissX18)
416416 let outPrAmtX18 = fraction(prBalanceX18, pmtLpAmtX18, lpEmissX18)
417417 let outAmAmt = fromX18Round(outAmAmtX18, amDcm, FLOOR)
418418 let outPrAmt = fromX18Round(outPrAmtX18, prDcm, FLOOR)
419419 let state = if ((txId58 == ""))
420420 then nil
421421 else [ScriptTransfer(userAddress, outAmAmt, if ((amId == "WAVES"))
422422 then unit
423423 else fromBase58String(amId)), ScriptTransfer(userAddress, outPrAmt, if ((prId == "WAVES"))
424424 then unit
425425 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)]
426426 $Tuple10(outAmAmt, outPrAmt, amId, prId, amBalance, prBalance, lpEmiss, curPriceX18, sts, state)
427427 }
428428 }
429429
430430
431431 func epo (txId58,slippage,inAmAmt,inAmId,inPrAmt,inPrId,userAddress,isEval,emitLp,isOneAsset,validateSlippage,pmtAmt,pmtId) = {
432432 let lpId = cfgLpAssetId
433433 let amIdStr = toBase58String(value(cfgAmountAssetId))
434434 let prIdStr = toBase58String(value(cfgPriceAssetId))
435435 let inAmIdStr = cfgInAmountAssedId
436436 let inPrIdStr = cfgInPriceAssetId
437437 let amtDcm = cfgAmountAssetDecimals
438438 let priceDcm = cfgPriceAssetDecimals
439439 let sts = toString(cfgPoolStatus)
440440 let lpEm = valueOrErrorMessage(assetInfo(lpId), "Wr lp as").quantity
441441 let amBalance = if (isEval)
442442 then getAccBalance(amIdStr)
443443 else if (if (isOneAsset)
444444 then (pmtId == amIdStr)
445445 else false)
446446 then (getAccBalance(amIdStr) - pmtAmt)
447447 else if (isOneAsset)
448448 then getAccBalance(amIdStr)
449449 else (getAccBalance(amIdStr) - inAmAmt)
450450 let prBalance = if (isEval)
451451 then getAccBalance(prIdStr)
452452 else if (if (isOneAsset)
453453 then (pmtId == prIdStr)
454454 else false)
455455 then (getAccBalance(prIdStr) - pmtAmt)
456456 else if (isOneAsset)
457457 then getAccBalance(prIdStr)
458458 else (getAccBalance(prIdStr) - inPrAmt)
459459 let inAmAssetAmtX18 = t1(inAmAmt, amtDcm)
460460 let inPrAssetAmtX18 = t1(inPrAmt, priceDcm)
461461 let userPriceX18 = cpbi(inPrAssetAmtX18, inAmAssetAmtX18)
462462 let amBalanceX18 = t1(amBalance, amtDcm)
463463 let prBalanceX18 = t1(prBalance, priceDcm)
464464 let D0 = getD([amBalanceX18, prBalanceX18])
465465 let r = if ((lpEm == 0))
466466 then {
467467 let D1 = getD([(amBalanceX18 + inAmAssetAmtX18), (prBalanceX18 + inPrAssetAmtX18)])
468468 let checkD = if ((D1 > D0))
469469 then true
470470 else throw("D1 should be greater than D0")
471471 if ((checkD == checkD))
472472 then {
473473 let curPriceX18 = zeroBigInt
474474 let slippageX18 = zeroBigInt
475475 let lpAmtX18 = D1
476476 $Tuple5(f1(lpAmtX18, scale8), f1(inAmAssetAmtX18, amtDcm), f1(inPrAssetAmtX18, priceDcm), cpbi((prBalanceX18 + inPrAssetAmtX18), (amBalanceX18 + inAmAssetAmtX18)), slippageX18)
477477 }
478478 else throw("Strict value is not equal to itself.")
479479 }
480480 else {
481481 let curPriceX18 = cpbi(prBalanceX18, amBalanceX18)
482482 let slippageRealX18 = fraction(abs((curPriceX18 - userPriceX18)), scale18, curPriceX18)
483483 let slippageX18 = t1(slippage, scale8)
484484 if (if (if (validateSlippage)
485485 then (curPriceX18 != zeroBigInt)
486486 else false)
487487 then (slippageRealX18 > slippageX18)
488488 else false)
489489 then throw(((("Price slippage " + toString(slippageRealX18)) + " > ") + toString(slippageX18)))
490490 else {
491491 let lpEmissionX18 = t1(lpEm, scale8)
492492 let prViaAmX18 = fraction(inAmAssetAmtX18, cpbir(prBalanceX18, amBalanceX18, CEILING), scale18, CEILING)
493493 let amViaPrX18 = fraction(inPrAssetAmtX18, scale18, cpbir(prBalanceX18, amBalanceX18, FLOOR), CEILING)
494494 let expectedAmts = if ((prViaAmX18 > inPrAssetAmtX18))
495495 then $Tuple2(amViaPrX18, inPrAssetAmtX18)
496496 else $Tuple2(inAmAssetAmtX18, prViaAmX18)
497497 let expAmtAssetAmtX18 = expectedAmts._1
498498 let expPriceAssetAmtX18 = expectedAmts._2
499499 let D1 = getD([(amBalanceX18 + expAmtAssetAmtX18), (prBalanceX18 + expPriceAssetAmtX18)])
500500 let checkD = if ((D1 > D0))
501501 then true
502502 else throw("D1 should be greater than D0")
503503 if ((checkD == checkD))
504504 then {
505505 let lpAmtX18 = fraction(lpEmissionX18, (D1 - D0), D0)
506506 $Tuple5(fromX18Round(lpAmtX18, scale8, FLOOR), fromX18Round(expAmtAssetAmtX18, amtDcm, CEILING), fromX18Round(expPriceAssetAmtX18, priceDcm, CEILING), curPriceX18, slippageX18)
507507 }
508508 else throw("Strict value is not equal to itself.")
509509 }
510510 }
511511 let calcLpAmt = r._1
512512 let calcAmAssetPmt = r._2
513513 let calcPrAssetPmt = r._3
514514 let curPrice = f1(r._4, scale8)
515515 let slippageCalc = f1(r._5, scale8)
516516 if ((0 >= calcLpAmt))
517517 then throw("LP <= 0")
518518 else {
519519 let emitLpAmt = if (!(emitLp))
520520 then 0
521521 else calcLpAmt
522522 let amDiff = (inAmAmt - calcAmAssetPmt)
523523 let prDiff = (inPrAmt - calcPrAssetPmt)
524- let $t02057820923 = if (if (isOneAsset)
524+ let $t02059020935 = if (if (isOneAsset)
525525 then (pmtId == amIdStr)
526526 else false)
527527 then $Tuple2(pmtAmt, 0)
528528 else if (if (isOneAsset)
529529 then (pmtId == prIdStr)
530530 else false)
531531 then $Tuple2(0, pmtAmt)
532532 else $Tuple2(calcAmAssetPmt, calcPrAssetPmt)
533- let writeAmAmt = $t02057820923._1
534- let writePrAmt = $t02057820923._2
533+ let writeAmAmt = $t02059020935._1
534+ let writePrAmt = $t02059020935._2
535535 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))]
536536 $Tuple13(calcLpAmt, emitLpAmt, curPrice, amBalance, prBalance, lpEm, lpId, sts, commonState, amDiff, prDiff, inAmId, inPrId)
537537 }
538538 }
539539
540540
541541 func getYD (xp,i,D) = {
542542 let n = big2
543543 let x = xp[if ((i == 0))
544544 then 1
545545 else 0]
546546 let aPrecision = parseBigIntValue(Amult)
547547 let a = (parseBigIntValue(A) * aPrecision)
548548 let s = x
549549 let ann = (a * n)
550550 let c = (((((D * D) / (x * n)) * D) * aPrecision) / (ann * n))
551551 let b = ((s + ((D * aPrecision) / ann)) - D)
552552 func calc (acc,cur) = {
553- let $t02211822138 = acc
554- let y = $t02211822138._1
555- let found = $t02211822138._2
553+ let $t02213022150 = acc
554+ let y = $t02213022150._1
555+ let found = $t02213022150._2
556556 if ((found != unit))
557557 then acc
558558 else {
559559 let yNext = (((y * y) + c) / ((big2 * y) + b))
560560 let yDiff = absBigInt((yNext - value(y)))
561561 if ((big1 >= yDiff))
562562 then $Tuple2(yNext, cur)
563563 else $Tuple2(yNext, unit)
564564 }
565565 }
566566
567567 let arr = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
568- let $t02244522492 = {
568+ let $t02245722504 = {
569569 let $l = arr
570570 let $s = size($l)
571571 let $acc0 = $Tuple2(D, unit)
572572 func $f0_1 ($a,$i) = if (($i >= $s))
573573 then $a
574574 else calc($a, $l[$i])
575575
576576 func $f0_2 ($a,$i) = if (($i >= $s))
577577 then $a
578578 else throw("List size exceeds 15")
579579
580580 $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)
581581 }
582- let y = $t02244522492._1
583- let found = $t02244522492._2
582+ let y = $t02245722504._1
583+ let found = $t02245722504._2
584584 if ((found != unit))
585585 then y
586586 else throw(("Y calculation error, Y = " + toString(y)))
587587 }
588588
589589
590590 func calcDLp (amountBalance,priceBalance,lpEmission) = {
591591 let updatedDLp = fraction(getD([t1BigInt(amountBalance, toBigInt(cfgAmountAssetDecimals)), t1BigInt(priceBalance, toBigInt(cfgPriceAssetDecimals))]), scale18, lpEmission)
592592 if ((lpEmission == big0))
593593 then big0
594594 else updatedDLp
595595 }
596596
597597
598598 func calcCurrentDLp (amountAssetDelta,priceAssetDelta,lpAssetEmissionDelta) = {
599599 let amountAssetBalance = (toBigInt(getAccBalance(assetIdToString(cfgAmountAssetId))) - amountAssetDelta)
600600 let priceAssetBalance = (toBigInt(getAccBalance(assetIdToString(cfgPriceAssetId))) - priceAssetDelta)
601601 let lpAssetEmission = (toBigInt(value(assetInfo(cfgLpAssetId)).quantity) - lpAssetEmissionDelta)
602602 let currentDLp = calcDLp(amountAssetBalance, priceAssetBalance, lpAssetEmission)
603603 currentDLp
604604 }
605605
606606
607607 func refreshDLpInternal (amountAssetBalanceDelta,priceAssetBalanceDelta,lpAssetEmissionDelta) = {
608608 let amountAssetBalance = (getAccBalance(assetIdToString(cfgAmountAssetId)) + amountAssetBalanceDelta)
609609 let priceAssetBalance = (getAccBalance(assetIdToString(cfgPriceAssetId)) + priceAssetBalanceDelta)
610610 let lpAssetEmission = (value(assetInfo(cfgLpAssetId)).quantity + lpAssetEmissionDelta)
611611 let updatedDLp = calcDLp(toBigInt(amountAssetBalance), toBigInt(priceAssetBalance), toBigInt(lpAssetEmission))
612612 let actions = [IntegerEntry(keyDLpRefreshedHeight, height), StringEntry(keyDLp, toString(updatedDLp))]
613613 $Tuple2(actions, updatedDLp)
614614 }
615615
616616
617617 func validateUpdatedDLp (oldDLp,updatedDLp) = if ((updatedDLp >= oldDLp))
618618 then true
619619 else throwErr("updated DLp lower than current DLp")
620620
621621
622622 func validateMatcherOrderAllowed (order) = {
623623 let amountAssetBalance = getAccBalance(assetIdToString(cfgAmountAssetId))
624624 let priceAssetBalance = getAccBalance(assetIdToString(cfgPriceAssetId))
625625 let amountAssetAmount = order.amount
626626 let priceAssetAmount = fraction(order.amount, order.price, scale8, FLOOR)
627- let $t02469024902 = if ((order.orderType == Buy))
627+ let $t02470224914 = if ((order.orderType == Buy))
628628 then $Tuple2(amountAssetAmount, -(priceAssetAmount))
629629 else $Tuple2(-(amountAssetAmount), priceAssetAmount)
630- let amountAssetBalanceDelta = $t02469024902._1
631- let priceAssetBalanceDelta = $t02469024902._2
630+ let amountAssetBalanceDelta = $t02470224914._1
631+ let priceAssetBalanceDelta = $t02470224914._2
632632 if (if (if (igs())
633633 then true
634634 else (cfgPoolStatus == PoolMatcherDis))
635635 then true
636636 else (cfgPoolStatus == PoolShutdown))
637637 then throw("Admin blocked")
638638 else if (if ((order.assetPair.amountAsset != cfgAmountAssetId))
639639 then true
640640 else (order.assetPair.priceAsset != cfgPriceAssetId))
641641 then throw("Wr assets")
642642 else {
643643 let dLp = parseBigIntValue(valueOrElse(getString(this, keyDLp), "0"))
644- let $t02524425344 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
645- let unusedActions = $t02524425344._1
646- let dLpNew = $t02524425344._2
644+ let $t02525625356 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
645+ let unusedActions = $t02525625356._1
646+ let dLpNew = $t02525625356._2
647647 let isOrderValid = (dLpNew >= dLp)
648648 let info = makeString(["dLp=", toString(dLp), " dLpNew=", toString(dLpNew), " amountAssetBalance=", toString(amountAssetBalance), " priceAssetBalance=", toString(priceAssetBalance), " amountAssetBalanceDelta=", toString(amountAssetBalanceDelta), " priceAssetBalanceDelta=", toString(priceAssetBalanceDelta), " height=", toString(height)], "")
649649 $Tuple2(isOrderValid, info)
650650 }
651651 }
652652
653653
654654 func cg (i) = if ((size(i.payments) != 1))
655655 then throw("1 pmnt exp")
656656 else {
657657 let pmt = value(i.payments[0])
658658 let pmtAssetId = value(pmt.assetId)
659659 let pmtAmt = pmt.amount
660660 let r = ego(toBase58String(i.transactionId), toBase58String(pmtAssetId), pmtAmt, i.caller)
661661 let outAmAmt = r._1
662662 let outPrAmt = r._2
663663 let sts = parseIntValue(r._9)
664664 let state = r._10
665665 if (if (igs())
666666 then true
667667 else (sts == PoolShutdown))
668668 then throw(("Admin blocked: " + toString(sts)))
669669 else $Tuple5(outAmAmt, outPrAmt, pmtAmt, pmtAssetId, state)
670670 }
671671
672672
673673 func cp (caller,txId,amAsPmt,prAsPmt,slippage,emitLp,isOneAsset,validateSlippage,pmtAmt,pmtId) = {
674674 let r = epo(txId, slippage, value(amAsPmt).amount, value(amAsPmt).assetId, value(prAsPmt).amount, value(prAsPmt).assetId, caller, (txId == ""), emitLp, isOneAsset, validateSlippage, pmtAmt, pmtId)
675675 let sts = parseIntValue(r._8)
676676 if (if (if (igs())
677677 then true
678678 else (sts == PoolPutDis))
679679 then true
680680 else (sts == PoolShutdown))
681681 then throw(("Blocked:" + toString(sts)))
682682 else r
683683 }
684684
685685
686686 func calcPutOneTkn (pmtAmtRaw,pmtAssetId,userAddress,txId,withTakeFee) = {
687687 let amId = toBase58String(value(cfgAmountAssetId))
688688 let prId = toBase58String(value(cfgPriceAssetId))
689689 let lpId = cfgLpAssetId
690690 let amtDcm = cfgAmountAssetDecimals
691691 let priceDcm = cfgPriceAssetDecimals
692692 let lpAssetEmission = toBigInt(valueOrErrorMessage(assetInfo(lpId), "invalid lp asset").quantity)
693693 let chechEmission = if ((lpAssetEmission > big0))
694694 then true
695695 else throw("initial deposit requires all coins")
696696 if ((chechEmission == chechEmission))
697697 then {
698698 let amBalance = getAccBalance(amId)
699699 let prBalance = getAccBalance(prId)
700- let $t02800028462 = if ((txId == ""))
700+ let $t02801228474 = if ((txId == ""))
701701 then $Tuple2(amBalance, prBalance)
702702 else if ((pmtAssetId == amId))
703703 then if ((pmtAmtRaw > amBalance))
704704 then throw("invalid payment amount")
705705 else $Tuple2((amBalance - pmtAmtRaw), prBalance)
706706 else if ((pmtAssetId == prId))
707707 then if ((pmtAmtRaw > prBalance))
708708 then throw("invalid payment amount")
709709 else $Tuple2(amBalance, (prBalance - pmtAmtRaw))
710710 else throw("wrong pmtAssetId")
711- let amBalanceOld = $t02800028462._1
712- let prBalanceOld = $t02800028462._2
713- let $t02846828644 = if ((pmtAssetId == amId))
711+ let amBalanceOld = $t02801228474._1
712+ let prBalanceOld = $t02801228474._2
713+ let $t02848028656 = if ((pmtAssetId == amId))
714714 then $Tuple2(pmtAmtRaw, 0)
715715 else if ((pmtAssetId == prId))
716716 then $Tuple2(0, pmtAmtRaw)
717717 else throw("invalid payment")
718- let amAmountRaw = $t02846828644._1
719- let prAmountRaw = $t02846828644._2
720- let $t02864828902 = if (withTakeFee)
718+ let amAmountRaw = $t02848028656._1
719+ let prAmountRaw = $t02848028656._2
720+ let $t02866028914 = if (withTakeFee)
721721 then $Tuple3(takeFee(amAmountRaw, inFee)._1, takeFee(prAmountRaw, inFee)._1, takeFee(pmtAmtRaw, inFee)._2)
722722 else $Tuple3(amAmountRaw, prAmountRaw, 0)
723- let amAmount = $t02864828902._1
724- let prAmount = $t02864828902._2
725- let feeAmount = $t02864828902._3
723+ let amAmount = $t02866028914._1
724+ let prAmount = $t02866028914._2
725+ let feeAmount = $t02866028914._3
726726 let amBalanceNew = (amBalanceOld + amAmount)
727727 let prBalanceNew = (prBalanceOld + prAmount)
728728 let D0 = getD([t1(amBalanceOld, cfgAmountAssetDecimals), t1(prBalanceOld, cfgPriceAssetDecimals)])
729729 let D1 = getD([t1(amBalanceNew, cfgAmountAssetDecimals), t1(prBalanceNew, cfgPriceAssetDecimals)])
730730 let checkD = if ((D1 > D0))
731731 then true
732732 else throw()
733733 if ((checkD == checkD))
734734 then {
735735 let lpAmount = fraction(lpAssetEmission, (D1 - D0), D0, FLOOR)
736736 let curPrice = f1(cpbi(t1(prBalanceNew, priceDcm), t1(amBalanceNew, amtDcm)), scale8)
737737 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))]
738738 let poolProportion = fraction(prBalanceOld, scale8, amBalanceOld)
739739 let amountAssetPart = fraction(pmtAmtRaw, scale8, (poolProportion + scale8))
740740 let priceAssetPart = (pmtAmtRaw - amountAssetPart)
741741 let lpAmtBoth = fraction(lpAssetEmission, toBigInt(priceAssetPart), toBigInt(prBalanceOld))
742742 let bonus = toInt(fraction((lpAmount - lpAmtBoth), scale8BigInt, lpAmtBoth))
743743 $Tuple4(toInt(lpAmount), commonState, feeAmount, bonus)
744744 }
745745 else throw("Strict value is not equal to itself.")
746746 }
747747 else throw("Strict value is not equal to itself.")
748748 }
749749
750750
751751 func getOneTknV2Internal (outAssetId,minOutAmount,payments,caller,originCaller,transactionId) = {
752752 let lpId = toBase58String(value(cfgLpAssetId))
753753 let amId = toBase58String(value(cfgAmountAssetId))
754754 let prId = toBase58String(value(cfgPriceAssetId))
755755 let amDecimals = cfgAmountAssetDecimals
756756 let prDecimals = cfgPriceAssetDecimals
757757 let poolStatus = cfgPoolStatus
758758 let userAddress = if ((caller == restContract))
759759 then originCaller
760760 else caller
761761 let pmt = value(payments[0])
762762 let pmtAssetId = value(pmt.assetId)
763763 let pmtAmt = pmt.amount
764764 let currentDLp = calcCurrentDLp(big0, big0, big0)
765765 if ((currentDLp == currentDLp))
766766 then {
767767 let txId58 = toBase58String(transactionId)
768768 if ((lpId != toBase58String(pmtAssetId)))
769769 then throw("Wrong LP")
770770 else {
771771 let amBalance = getAccBalance(amId)
772772 let prBalance = getAccBalance(prId)
773- let $t03101431125 = {
773+ let $t03102631137 = {
774774 let @ = invoke(this, "getOneTknV2READONLY", [outAssetId, pmtAmt], nil)
775775 if ($isInstanceOf(@, "(Int, Int)"))
776776 then @
777777 else throw(($getType(@) + " couldn't be cast to (Int, Int)"))
778778 }
779- if (($t03101431125 == $t03101431125))
779+ if (($t03102631137 == $t03102631137))
780780 then {
781- let feeAmount = $t03101431125._2
782- let totalGet = $t03101431125._1
781+ let feeAmount = $t03102631137._2
782+ let totalGet = $t03102631137._1
783783 let totalAmount = if (if ((minOutAmount > 0))
784784 then (minOutAmount > totalGet)
785785 else false)
786786 then throwErr(makeString(["amount to receive is less than ", toString(minOutAmount)], ""))
787787 else totalGet
788- let $t03131531622 = if ((outAssetId == amId))
788+ let $t03132731634 = if ((outAssetId == amId))
789789 then $Tuple4(totalAmount, 0, ((amBalance - totalAmount) - feeAmount), prBalance)
790790 else if ((outAssetId == prId))
791791 then $Tuple4(0, totalAmount, amBalance, ((prBalance - totalAmount) - feeAmount))
792792 else throw("invalid out asset id")
793- let outAm = $t03131531622._1
794- let outPr = $t03131531622._2
795- let amBalanceNew = $t03131531622._3
796- let prBalanceNew = $t03131531622._4
793+ let outAm = $t03132731634._1
794+ let outPr = $t03132731634._2
795+ let amBalanceNew = $t03132731634._3
796+ let prBalanceNew = $t03132731634._4
797797 let curPrX18 = cpbi(t1(prBalanceNew, prDecimals), t1(amBalanceNew, amDecimals))
798798 let curPr = f1(curPrX18, scale8)
799799 let outAssetIdOrWaves = if ((outAssetId == "WAVES"))
800800 then unit
801801 else fromBase58String(outAssetId)
802802 let sendFeeToMatcher = if ((feeAmount > 0))
803803 then [ScriptTransfer(feeCollectorAddress, feeAmount, outAssetIdOrWaves)]
804804 else nil
805805 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)
806806 if ((state == state))
807807 then {
808808 let burn = invoke(fca, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
809809 if ((burn == burn))
810810 then {
811- let $t03240732757 = {
811+ let $t03241932769 = {
812812 let feeAmountForCalc = if ((this == feeCollectorAddress))
813813 then 0
814814 else feeAmount
815815 let outInAmountAsset = if ((parseAssetId(outAssetId) == cfgAmountAssetId))
816816 then true
817817 else false
818818 if (outInAmountAsset)
819819 then $Tuple2(-((totalGet + feeAmountForCalc)), 0)
820820 else $Tuple2(0, -((totalGet + feeAmountForCalc)))
821821 }
822- let amountAssetBalanceDelta = $t03240732757._1
823- let priceAssetBalanceDelta = $t03240732757._2
824- let $t03276032868 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
825- let refreshDLpActions = $t03276032868._1
826- let updatedDLp = $t03276032868._2
822+ let amountAssetBalanceDelta = $t03241932769._1
823+ let priceAssetBalanceDelta = $t03241932769._2
824+ let $t03277232880 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
825+ let refreshDLpActions = $t03277232880._1
826+ let updatedDLp = $t03277232880._2
827827 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
828828 if ((isUpdatedDLpValid == isUpdatedDLpValid))
829829 then $Tuple2((state ++ refreshDLpActions), totalAmount)
830830 else throw("Strict value is not equal to itself.")
831831 }
832832 else throw("Strict value is not equal to itself.")
833833 }
834834 else throw("Strict value is not equal to itself.")
835835 }
836836 else throw("Strict value is not equal to itself.")
837837 }
838838 }
839839 else throw("Strict value is not equal to itself.")
840840 }
841841
842842
843843 func m () = match getString(mpk()) {
844844 case s: String =>
845845 fromBase58String(s)
846846 case _: Unit =>
847847 unit
848848 case _ =>
849849 throw("Match error")
850850 }
851851
852852
853853 func pm () = match getString(pmpk()) {
854854 case s: String =>
855855 fromBase58String(s)
856856 case _: Unit =>
857857 unit
858858 case _ =>
859859 throw("Match error")
860860 }
861861
862862
863863 let pd = throw("Permission denied")
864864
865865 func isManager (i) = match m() {
866866 case pk: ByteVector =>
867867 (i.callerPublicKey == pk)
868868 case _: Unit =>
869869 (i.caller == this)
870870 case _ =>
871871 throw("Match error")
872872 }
873873
874874
875875 func mm (i) = match m() {
876876 case pk: ByteVector =>
877877 if ((i.callerPublicKey == pk))
878878 then true
879879 else pd
880880 case _: Unit =>
881881 if ((i.caller == this))
882882 then true
883883 else pd
884884 case _ =>
885885 throw("Match error")
886886 }
887887
888888
889889 func getY (isReverse,D,poolAmountInBalance) = {
890890 let poolConfig = gpc()
891891 let amId = poolConfig[idxAmAsId]
892892 let prId = poolConfig[idxPrAsId]
893893 let n = big2
894894 let aPrecision = parseBigIntValue(Amult)
895895 let a = (parseBigIntValue(A) * aPrecision)
896896 let xp = if ((isReverse == false))
897897 then [(toBigInt(getAccBalance(amId)) + poolAmountInBalance), toBigInt(getAccBalance(prId))]
898898 else [(toBigInt(getAccBalance(prId)) + poolAmountInBalance), toBigInt(getAccBalance(amId))]
899899 let x = xp[0]
900900 let s = x
901901 let ann = (a * n)
902902 let c = (((((D * D) / (x * n)) * D) * aPrecision) / (ann * n))
903903 let b = ((s + ((D * aPrecision) / ann)) - D)
904904 func calc (acc,cur) = {
905- let $t03431534335 = acc
906- let y = $t03431534335._1
907- let found = $t03431534335._2
905+ let $t03432734347 = acc
906+ let y = $t03432734347._1
907+ let found = $t03432734347._2
908908 if ((found != unit))
909909 then acc
910910 else {
911911 let yNext = (((y * y) + c) / ((big2 * y) + b))
912912 let yDiff = absBigInt((yNext - value(y)))
913913 if ((big1 >= yDiff))
914914 then $Tuple2(yNext, cur)
915915 else $Tuple2(yNext, unit)
916916 }
917917 }
918918
919919 let arr = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
920- let $t03466634713 = {
920+ let $t03467834725 = {
921921 let $l = arr
922922 let $s = size($l)
923923 let $acc0 = $Tuple2(D, unit)
924924 func $f0_1 ($a,$i) = if (($i >= $s))
925925 then $a
926926 else calc($a, $l[$i])
927927
928928 func $f0_2 ($a,$i) = if (($i >= $s))
929929 then $a
930930 else throw("List size exceeds 15")
931931
932932 $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)
933933 }
934- let y = $t03466634713._1
935- let found = $t03466634713._2
934+ let y = $t03467834725._1
935+ let found = $t03467834725._2
936936 if ((found != unit))
937937 then y
938938 else throw(("Y calculation error, Y = " + toString(y)))
939939 }
940940
941941
942942 @Callable(i)
943943 func calculateAmountOutForSwapREADONLY (cleanAmountIn,isReverse) = {
944- let $t03493435358 = if ((isReverse == false))
944+ let $t03494635370 = if ((isReverse == false))
945945 then {
946946 let assetOut = strf(this, pa())
947947 let poolAmountInBalance = (toBigInt(getAccBalance(strf(this, aa()))) + toBigInt(cleanAmountIn))
948948 $Tuple2(assetOut, poolAmountInBalance)
949949 }
950950 else {
951951 let assetOut = strf(this, aa())
952952 let poolAmountInBalance = (toBigInt(getAccBalance(strf(this, pa()))) + toBigInt(cleanAmountIn))
953953 $Tuple2(assetOut, poolAmountInBalance)
954954 }
955- let assetOut = $t03493435358._1
956- let poolAmountInBalance = $t03493435358._2
955+ let assetOut = $t03494635370._1
956+ let poolAmountInBalance = $t03494635370._2
957957 let poolConfig = gpc()
958958 let amId = poolConfig[idxAmAsId]
959959 let prId = poolConfig[idxPrAsId]
960960 let xp = [toBigInt(getAccBalance(amId)), toBigInt(getAccBalance(prId))]
961961 let D = getD(xp)
962962 let y = getY(isReverse, D, toBigInt(cleanAmountIn))
963963 let dy = ((toBigInt(getAccBalance(assetOut)) - y) - toBigInt(1))
964964 let totalGetRaw = max([0, toInt(dy)])
965- $Tuple2(nil, totalGetRaw)
965+ let newXp = if ((isReverse == false))
966+ then [(toBigInt(getAccBalance(amId)) + toBigInt(cleanAmountIn)), (toBigInt(getAccBalance(prId)) - dy)]
967+ else [(toBigInt(getAccBalance(amId)) - dy), (toBigInt(getAccBalance(prId)) + toBigInt(cleanAmountIn))]
968+ let newD = getD(newXp)
969+ let checkD = if ((newD >= D))
970+ then true
971+ else throw(makeString(["new D is fewer error", toString(D), toString(newD)], "__"))
972+ if ((checkD == checkD))
973+ then $Tuple2(nil, totalGetRaw)
974+ else throw("Strict value is not equal to itself.")
966975 }
967976
968977
969978
970979 @Callable(i)
971980 func calculateAmountOutForSwapAndSendTokens (cleanAmountIn,isReverse,amountOutMin,addressTo) = {
972981 let swapContact = {
973982 let @ = invoke(fca, "getSwapContractREADONLY", nil, nil)
974983 if ($isInstanceOf(@, "String"))
975984 then @
976985 else throw(($getType(@) + " couldn't be cast to String"))
977986 }
978987 let checks = [if ((value(i.payments[0]).amount >= cleanAmountIn))
979988 then true
980989 else throwErr("Wrong amount"), if ((i.caller == addressFromStringValue(swapContact)))
981990 then true
982991 else throwErr("Permission denied")]
983992 if ((checks == checks))
984993 then {
985994 let pmt = value(i.payments[0])
986995 let assetIn = if ((pmt.assetId == unit))
987996 then toBase58String(toBytes("WAVES"))
988997 else toBase58String(value(pmt.assetId))
989- let $t03681037204 = if ((isReverse == false))
998+ let $t03680837202 = if ((isReverse == false))
990999 then {
9911000 let assetOut = strf(this, pa())
9921001 let poolAmountInBalance = (getAccBalance(assetIn) - value(i.payments[0]).amount)
9931002 $Tuple2(assetOut, poolAmountInBalance)
9941003 }
9951004 else {
9961005 let assetOut = strf(this, aa())
9971006 let poolAmountInBalance = (getAccBalance(assetIn) - value(i.payments[0]).amount)
9981007 $Tuple2(assetOut, poolAmountInBalance)
9991008 }
1000- let assetOut = $t03681037204._1
1001- let poolAmountInBalance = $t03681037204._2
1009+ let assetOut = $t03680837202._1
1010+ let poolAmountInBalance = $t03680837202._2
10021011 let poolConfig = gpc()
10031012 let amId = poolConfig[idxAmAsId]
10041013 let prId = poolConfig[idxPrAsId]
10051014 let xp = if ((isReverse == false))
10061015 then [(toBigInt(getAccBalance(amId)) - toBigInt(value(i.payments[0]).amount)), toBigInt(getAccBalance(prId))]
10071016 else [toBigInt(getAccBalance(amId)), (toBigInt(getAccBalance(prId)) - toBigInt(value(i.payments[0]).amount))]
10081017 let D = getD(xp)
10091018 let y = getY(isReverse, D, toBigInt(0))
10101019 let dy = ((toBigInt(getAccBalance(assetOut)) - y) - toBigInt(1))
10111020 let totalGetRaw = max([0, toInt(dy)])
10121021 let checkMin = if ((totalGetRaw >= amountOutMin))
10131022 then true
10141023 else throw("Exchange result is fewer coins than expected")
10151024 if ((checkMin == checkMin))
10161025 then {
10171026 let newXp = if ((isReverse == false))
10181027 then [toBigInt(getAccBalance(amId)), (toBigInt(getAccBalance(prId)) - dy)]
10191028 else [(toBigInt(getAccBalance(amId)) - dy), toBigInt(getAccBalance(prId))]
10201029 let newD = getD(newXp)
10211030 let checkD = if ((newD >= D))
10221031 then true
10231032 else throw("new D is fewer error")
10241033 if ((checkD == checkD))
10251034 then $Tuple2([ScriptTransfer(addressFromStringValue(addressTo), totalGetRaw, parseAssetId(assetOut))], totalGetRaw)
10261035 else throw("Strict value is not equal to itself.")
10271036 }
10281037 else throw("Strict value is not equal to itself.")
10291038 }
10301039 else throw("Strict value is not equal to itself.")
10311040 }
10321041
10331042
10341043
10351044 @Callable(i)
10361045 func constructor (fc) = {
10371046 let c = mm(i)
10381047 if ((c == c))
10391048 then [StringEntry(fc(), fc)]
10401049 else throw("Strict value is not equal to itself.")
10411050 }
10421051
10431052
10441053
10451054 @Callable(i)
10461055 func setManager (pendingManagerPublicKey) = {
10471056 let c = mm(i)
10481057 if ((c == c))
10491058 then {
10501059 let cm = fromBase58String(pendingManagerPublicKey)
10511060 if ((cm == cm))
10521061 then [StringEntry(pmpk(), pendingManagerPublicKey)]
10531062 else throw("Strict value is not equal to itself.")
10541063 }
10551064 else throw("Strict value is not equal to itself.")
10561065 }
10571066
10581067
10591068
10601069 @Callable(i)
10611070 func confirmManager () = {
10621071 let p = pm()
10631072 let hpm = if (isDefined(p))
10641073 then true
10651074 else throw("No pending manager")
10661075 if ((hpm == hpm))
10671076 then {
10681077 let cpm = if ((i.callerPublicKey == value(p)))
10691078 then true
10701079 else throw("You are not pending manager")
10711080 if ((cpm == cpm))
10721081 then [StringEntry(mpk(), toBase58String(value(p))), DeleteEntry(pmpk())]
10731082 else throw("Strict value is not equal to itself.")
10741083 }
10751084 else throw("Strict value is not equal to itself.")
10761085 }
10771086
10781087
10791088
10801089 @Callable(i)
10811090 func put (slip,autoStake) = {
10821091 let factCfg = gfc()
10831092 let stakingCntr = valueOrErrorMessage(addressFromString(factCfg[idxFactStakCntr]), "Wr st addr")
10841093 let slipCntr = valueOrErrorMessage(addressFromString(factCfg[idxFactSlippCntr]), "Wr sl addr")
10851094 if ((0 > slip))
10861095 then throw("Wrong slippage")
10871096 else if ((size(i.payments) != 2))
10881097 then throw("2 pmnts expd")
10891098 else {
10901099 let amAssetPmt = toBigInt(value(i.payments[0]).amount)
10911100 let prAssetPmt = toBigInt(value(i.payments[1]).amount)
10921101 let amountAssetBalance = (toBigInt(getAccBalance(assetIdToString(cfgAmountAssetId))) - amAssetPmt)
10931102 if ((amountAssetBalance == amountAssetBalance))
10941103 then {
10951104 let priceAssetBalance = (toBigInt(getAccBalance(assetIdToString(cfgPriceAssetId))) - prAssetPmt)
10961105 if ((priceAssetBalance == priceAssetBalance))
10971106 then {
10981107 let lpAssetEmission = toBigInt(value(assetInfo(cfgLpAssetId)).quantity)
10991108 if ((lpAssetEmission == lpAssetEmission))
11001109 then {
11011110 let currentDLp = calcCurrentDLp(amAssetPmt, prAssetPmt, toBigInt(0))
11021111 if ((currentDLp == currentDLp))
11031112 then {
11041113 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, "")
11051114 let emitLpAmt = e._2
11061115 let lpAssetId = e._7
11071116 let state = e._9
11081117 let amDiff = e._10
11091118 let prDiff = e._11
11101119 let amId = e._12
11111120 let prId = e._13
11121121 let r = invoke(fca, "emit", [emitLpAmt], nil)
11131122 if ((r == r))
11141123 then {
11151124 let el = match r {
11161125 case legacy: Address =>
11171126 invoke(legacy, "emit", [emitLpAmt], nil)
11181127 case _ =>
11191128 unit
11201129 }
11211130 if ((el == el))
11221131 then {
11231132 let sa = if ((amDiff > 0))
11241133 then invoke(slipCntr, "put", nil, [AttachedPayment(amId, amDiff)])
11251134 else nil
11261135 if ((sa == sa))
11271136 then {
11281137 let sp = if ((prDiff > 0))
11291138 then invoke(slipCntr, "put", nil, [AttachedPayment(prId, prDiff)])
11301139 else nil
11311140 if ((sp == sp))
11321141 then {
11331142 let lpTrnsfr = if (autoStake)
11341143 then {
11351144 let ss = invoke(stakingCntr, "stake", nil, [AttachedPayment(lpAssetId, emitLpAmt)])
11361145 if ((ss == ss))
11371146 then nil
11381147 else throw("Strict value is not equal to itself.")
11391148 }
11401149 else [ScriptTransfer(i.caller, emitLpAmt, lpAssetId)]
1141- let $t04206142203 = refreshDLpInternal(0, 0, 0)
1142- let refreshDLpActions = $t04206142203._1
1143- let updatedDLp = $t04206142203._2
1150+ let $t04205942201 = refreshDLpInternal(0, 0, 0)
1151+ let refreshDLpActions = $t04205942201._1
1152+ let updatedDLp = $t04205942201._2
11441153 let check = if ((updatedDLp >= currentDLp))
11451154 then true
11461155 else throwErr(makeString(["updated DLp lower than current DLp", toString(amountAssetBalance), toString(priceAssetBalance), toString(lpAssetEmission), toString(currentDLp), toString(updatedDLp), toString(amDiff), toString(prDiff)], " "))
11471156 if ((check == check))
11481157 then {
11491158 let lpAssetEmissionAfter = value(assetInfo(cfgLpAssetId)).quantity
11501159 if ((lpAssetEmissionAfter == lpAssetEmissionAfter))
11511160 then ((state ++ lpTrnsfr) ++ refreshDLpActions)
11521161 else throw("Strict value is not equal to itself.")
11531162 }
11541163 else throw("Strict value is not equal to itself.")
11551164 }
11561165 else throw("Strict value is not equal to itself.")
11571166 }
11581167 else throw("Strict value is not equal to itself.")
11591168 }
11601169 else throw("Strict value is not equal to itself.")
11611170 }
11621171 else throw("Strict value is not equal to itself.")
11631172 }
11641173 else throw("Strict value is not equal to itself.")
11651174 }
11661175 else throw("Strict value is not equal to itself.")
11671176 }
11681177 else throw("Strict value is not equal to itself.")
11691178 }
11701179 else throw("Strict value is not equal to itself.")
11711180 }
11721181 }
11731182
11741183
11751184
11761185 @Callable(i)
11771186 func putOneTknV2 (minOutAmount,autoStake) = {
11781187 let isPoolOneTokenOperationsDisabled = {
11791188 let @ = invoke(fca, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
11801189 if ($isInstanceOf(@, "Boolean"))
11811190 then @
11821191 else throw(($getType(@) + " couldn't be cast to Boolean"))
11831192 }
11841193 let isPutDisabled = if (if (if (igs())
11851194 then true
11861195 else (cfgPoolStatus == PoolPutDis))
11871196 then true
11881197 else (cfgPoolStatus == PoolShutdown))
11891198 then true
11901199 else isPoolOneTokenOperationsDisabled
11911200 let checks = [if (if (!(isPutDisabled))
11921201 then true
11931202 else isManager(i))
11941203 then true
11951204 else throwErr("put operation is blocked by admin"), if ((size(i.payments) == 1))
11961205 then true
11971206 else throwErr("exactly 1 payment are expected")]
11981207 if ((checks == checks))
11991208 then {
12001209 let amId = toBase58String(value(cfgAmountAssetId))
12011210 let prId = toBase58String(value(cfgPriceAssetId))
12021211 let lpId = cfgLpAssetId
12031212 let amDecimals = cfgAmountAssetDecimals
12041213 let prDecimals = cfgPriceAssetDecimals
12051214 let userAddress = if ((i.caller == this))
12061215 then i.originCaller
12071216 else i.caller
12081217 let pmt = value(i.payments[0])
12091218 let pmtAssetId = toBase58String(value(pmt.assetId))
12101219 let pmtAmt = pmt.amount
12111220 let currentDLp = if ((pmt.assetId == cfgAmountAssetId))
12121221 then calcCurrentDLp(toBigInt(pmtAmt), toBigInt(0), toBigInt(0))
12131222 else calcCurrentDLp(toBigInt(0), toBigInt(pmtAmt), toBigInt(0))
12141223 if ((currentDLp == currentDLp))
12151224 then {
1216- let $t04384444002 = calcPutOneTkn(pmtAmt, pmtAssetId, toString(userAddress), toBase58String(i.transactionId), true)
1217- if (($t04384444002 == $t04384444002))
1225+ let $t04384244000 = calcPutOneTkn(pmtAmt, pmtAssetId, toString(userAddress), toBase58String(i.transactionId), true)
1226+ if (($t04384244000 == $t04384244000))
12181227 then {
1219- let feeAmount = $t04384444002._3
1220- let state = $t04384444002._2
1221- let estimLP = $t04384444002._1
1228+ let feeAmount = $t04384244000._3
1229+ let state = $t04384244000._2
1230+ let estimLP = $t04384244000._1
12221231 let emitLpAmt = if (if ((minOutAmount > 0))
12231232 then (minOutAmount > estimLP)
12241233 else false)
12251234 then throwErr(makeString(["amount to receive is less than ", toString(minOutAmount)], ""))
12261235 else estimLP
12271236 let e = invoke(fca, "emit", [emitLpAmt], nil)
12281237 if ((e == e))
12291238 then {
12301239 let el = match e {
12311240 case legacy: Address =>
12321241 invoke(legacy, "emit", [emitLpAmt], nil)
12331242 case _ =>
12341243 unit
12351244 }
12361245 if ((el == el))
12371246 then {
12381247 let lpTrnsfr = if (autoStake)
12391248 then {
12401249 let ss = invoke(stakingContract, "stake", nil, [AttachedPayment(lpId, emitLpAmt)])
12411250 if ((ss == ss))
12421251 then nil
12431252 else throw("Strict value is not equal to itself.")
12441253 }
12451254 else [ScriptTransfer(i.caller, emitLpAmt, lpId)]
12461255 let sendFeeToMatcher = if ((feeAmount > 0))
12471256 then [ScriptTransfer(feeCollectorAddress, feeAmount, fromBase58String(pmtAssetId))]
12481257 else nil
1249- let $t04481745166 = if ((this == feeCollectorAddress))
1258+ let $t04481545164 = if ((this == feeCollectorAddress))
12501259 then $Tuple2(0, 0)
12511260 else {
12521261 let paymentInAmountAsset = if ((pmt.assetId == cfgAmountAssetId))
12531262 then true
12541263 else false
12551264 if (paymentInAmountAsset)
12561265 then $Tuple2(-(feeAmount), 0)
12571266 else $Tuple2(0, -(feeAmount))
12581267 }
1259- let amountAssetBalanceDelta = $t04481745166._1
1260- let priceAssetBalanceDelta = $t04481745166._2
1261- let $t04516945277 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
1262- let refreshDLpActions = $t04516945277._1
1263- let updatedDLp = $t04516945277._2
1268+ let amountAssetBalanceDelta = $t04481545164._1
1269+ let priceAssetBalanceDelta = $t04481545164._2
1270+ let $t04516745275 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
1271+ let refreshDLpActions = $t04516745275._1
1272+ let updatedDLp = $t04516745275._2
12641273 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
12651274 if ((isUpdatedDLpValid == isUpdatedDLpValid))
12661275 then $Tuple2((((state ++ lpTrnsfr) ++ sendFeeToMatcher) ++ refreshDLpActions), emitLpAmt)
12671276 else throw("Strict value is not equal to itself.")
12681277 }
12691278 else throw("Strict value is not equal to itself.")
12701279 }
12711280 else throw("Strict value is not equal to itself.")
12721281 }
12731282 else throw("Strict value is not equal to itself.")
12741283 }
12751284 else throw("Strict value is not equal to itself.")
12761285 }
12771286 else throw("Strict value is not equal to itself.")
12781287 }
12791288
12801289
12811290
12821291 @Callable(i)
12831292 func putForFree (maxSlpg) = if ((0 > maxSlpg))
12841293 then throw("Wrong slpg")
12851294 else if ((size(i.payments) != 2))
12861295 then throw("2 pmnts expd")
12871296 else {
12881297 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, "")
12891298 let state = estPut._9
12901299 let amAssetPmt = toBigInt(value(i.payments[0]).amount)
12911300 let prAssetPmt = toBigInt(value(i.payments[1]).amount)
12921301 let currentDLp = calcCurrentDLp(amAssetPmt, prAssetPmt, toBigInt(0))
12931302 if ((currentDLp == currentDLp))
12941303 then {
1295- let $t04630746372 = refreshDLpInternal(0, 0, 0)
1296- let refreshDLpActions = $t04630746372._1
1297- let updatedDLp = $t04630746372._2
1304+ let $t04630546370 = refreshDLpInternal(0, 0, 0)
1305+ let refreshDLpActions = $t04630546370._1
1306+ let updatedDLp = $t04630546370._2
12981307 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
12991308 if ((isUpdatedDLpValid == isUpdatedDLpValid))
13001309 then (state ++ refreshDLpActions)
13011310 else throw("Strict value is not equal to itself.")
13021311 }
13031312 else throw("Strict value is not equal to itself.")
13041313 }
13051314
13061315
13071316
13081317 @Callable(i)
13091318 func get () = {
13101319 let currentDLp = calcCurrentDLp(toBigInt(0), toBigInt(0), toBigInt(0))
13111320 if ((currentDLp == currentDLp))
13121321 then {
13131322 let r = cg(i)
13141323 let outAmtAmt = r._1
13151324 let outPrAmt = r._2
13161325 let pmtAmt = r._3
13171326 let pmtAssetId = r._4
13181327 let state = r._5
13191328 let b = invoke(fca, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
13201329 if ((b == b))
13211330 then {
1322- let $t04754547627 = refreshDLpInternal(-(outAmtAmt), -(outPrAmt), 0)
1323- let refreshDLpActions = $t04754547627._1
1324- let updatedDLp = $t04754547627._2
1331+ let $t04754347625 = refreshDLpInternal(-(outAmtAmt), -(outPrAmt), 0)
1332+ let refreshDLpActions = $t04754347625._1
1333+ let updatedDLp = $t04754347625._2
13251334 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
13261335 if ((isUpdatedDLpValid == isUpdatedDLpValid))
13271336 then (state ++ refreshDLpActions)
13281337 else throw("Strict value is not equal to itself.")
13291338 }
13301339 else throw("Strict value is not equal to itself.")
13311340 }
13321341 else throw("Strict value is not equal to itself.")
13331342 }
13341343
13351344
13361345
13371346 @Callable(i)
13381347 func getOneTknV2 (outAssetId,minOutAmount) = {
13391348 let isPoolOneTokenOperationsDisabled = {
13401349 let @ = invoke(fca, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
13411350 if ($isInstanceOf(@, "Boolean"))
13421351 then @
13431352 else throw(($getType(@) + " couldn't be cast to Boolean"))
13441353 }
13451354 let isGetDisabled = if (if (igs())
13461355 then true
13471356 else (cfgPoolStatus == PoolShutdown))
13481357 then true
13491358 else isPoolOneTokenOperationsDisabled
13501359 let checks = [if (if (!(isGetDisabled))
13511360 then true
13521361 else isManager(i))
13531362 then true
13541363 else throwErr("get operation is blocked by admin"), if ((size(i.payments) == 1))
13551364 then true
13561365 else throwErr("exactly 1 payment are expected")]
13571366 if ((checks == checks))
13581367 then {
1359- let $t04824548400 = getOneTknV2Internal(outAssetId, minOutAmount, i.payments, i.caller, i.originCaller, i.transactionId)
1360- let state = $t04824548400._1
1361- let totalAmount = $t04824548400._2
1368+ let $t04824348398 = getOneTknV2Internal(outAssetId, minOutAmount, i.payments, i.caller, i.originCaller, i.transactionId)
1369+ let state = $t04824348398._1
1370+ let totalAmount = $t04824348398._2
13621371 $Tuple2(state, totalAmount)
13631372 }
13641373 else throw("Strict value is not equal to itself.")
13651374 }
13661375
13671376
13681377
13691378 @Callable(i)
13701379 func refreshDLp () = {
13711380 let lastRefreshedBlockHeight = valueOrElse(getInteger(keyDLpRefreshedHeight), 0)
13721381 let checkLastRefreshedBlockHeight = if (((height - lastRefreshedBlockHeight) >= dLpRefreshDelay))
13731382 then unit
13741383 else throwErr(makeString([toString(dLpRefreshDelay), " blocks have not passed since the previous call"], ""))
13751384 if ((checkLastRefreshedBlockHeight == checkLastRefreshedBlockHeight))
13761385 then {
13771386 let dLp = valueOrErrorMessage(parseBigInt(valueOrElse(getString(this, keyDLp), "0")), fmtErr("invalid dLp"))
1378- let $t04892448988 = refreshDLpInternal(0, 0, 0)
1379- let dLpUpdateActions = $t04892448988._1
1380- let updatedDLp = $t04892448988._2
1387+ let $t04892248986 = refreshDLpInternal(0, 0, 0)
1388+ let dLpUpdateActions = $t04892248986._1
1389+ let updatedDLp = $t04892248986._2
13811390 let actions = if ((dLp != updatedDLp))
13821391 then dLpUpdateActions
13831392 else throwErr("nothing to refresh")
13841393 $Tuple2(actions, toString(updatedDLp))
13851394 }
13861395 else throw("Strict value is not equal to itself.")
13871396 }
13881397
13891398
13901399
13911400 @Callable(i)
13921401 func getOneTknV2READONLY (outAssetId,lpAssetAmount) = {
13931402 let amId = toBase58String(value(cfgAmountAssetId))
13941403 let prId = toBase58String(value(cfgPriceAssetId))
13951404 let lpId = toBase58String(value(cfgLpAssetId))
13961405 let xp = [toBigInt(getAccBalance(amId)), toBigInt(getAccBalance(prId))]
13971406 let lpEmission = toBigInt(valueOrErrorMessage(assetInfo(fromBase58String(lpId)), "invalid lp asset").quantity)
13981407 let D0 = getD(xp)
13991408 let D1 = (D0 - fraction(toBigInt(lpAssetAmount), D0, lpEmission))
14001409 let index = if ((outAssetId == amId))
14011410 then 0
14021411 else if ((outAssetId == prId))
14031412 then 1
14041413 else throw("invalid out asset id")
14051414 let newY = getYD(xp, index, D1)
14061415 let dy = (xp[index] - newY)
14071416 let totalGetRaw = max([0, toInt((dy - big1))])
1408- let $t04999850053 = takeFee(totalGetRaw, outFee)
1409- let totalGet = $t04999850053._1
1410- let feeAmount = $t04999850053._2
1417+ let $t04999650051 = takeFee(totalGetRaw, outFee)
1418+ let totalGet = $t04999650051._1
1419+ let feeAmount = $t04999650051._2
14111420 $Tuple2(nil, $Tuple2(totalGet, feeAmount))
14121421 }
14131422
14141423
14151424
14161425 @Callable(i)
14171426 func getOneTknV2WithBonusREADONLY (outAssetId,lpAssetAmount) = {
14181427 let amId = toBase58String(value(cfgAmountAssetId))
14191428 let prId = toBase58String(value(cfgPriceAssetId))
14201429 let lpId = toBase58String(value(cfgLpAssetId))
14211430 let amBalance = getAccBalance(amId)
14221431 let prBalance = getAccBalance(prId)
1423- let $t05042850543 = {
1432+ let $t05042650541 = {
14241433 let @ = invoke(this, "getOneTknV2READONLY", [outAssetId, lpAssetAmount], nil)
14251434 if ($isInstanceOf(@, "(Int, Int)"))
14261435 then @
14271436 else throw(($getType(@) + " couldn't be cast to (Int, Int)"))
14281437 }
1429- let totalGet = $t05042850543._1
1430- let feeAmount = $t05042850543._2
1438+ let totalGet = $t05042650541._1
1439+ let feeAmount = $t05042650541._2
14311440 let r = ego("", lpId, lpAssetAmount, this)
14321441 let outAmAmt = r._1
14331442 let outPrAmt = r._2
14341443 let sumOfGetAssets = (outAmAmt + outPrAmt)
14351444 let bonus = if ((sumOfGetAssets == 0))
14361445 then if ((totalGet == 0))
14371446 then 0
14381447 else throw("bonus calculation error")
14391448 else fraction((totalGet - sumOfGetAssets), scale8, sumOfGetAssets)
14401449 $Tuple2(nil, $Tuple3(totalGet, feeAmount, bonus))
14411450 }
14421451
14431452
14441453
14451454 @Callable(i)
14461455 func getNoLess (noLessThenAmtAsset,noLessThenPriceAsset) = {
14471456 let r = cg(i)
14481457 let outAmAmt = r._1
14491458 let outPrAmt = r._2
14501459 let pmtAmt = r._3
14511460 let pmtAssetId = r._4
14521461 let state = r._5
14531462 if ((noLessThenAmtAsset > outAmAmt))
14541463 then throw(((("Failed: " + toString(outAmAmt)) + " < ") + toString(noLessThenAmtAsset)))
14551464 else if ((noLessThenPriceAsset > outPrAmt))
14561465 then throw(((("Failed: " + toString(outPrAmt)) + " < ") + toString(noLessThenPriceAsset)))
14571466 else {
14581467 let currentDLp = calcCurrentDLp(toBigInt(0), toBigInt(0), toBigInt(0))
14591468 if ((currentDLp == currentDLp))
14601469 then {
14611470 let burnLPAssetOnFactory = invoke(fca, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
14621471 if ((burnLPAssetOnFactory == burnLPAssetOnFactory))
14631472 then {
1464- let $t05170951790 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1465- let refreshDLpActions = $t05170951790._1
1466- let updatedDLp = $t05170951790._2
1473+ let $t05170751788 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1474+ let refreshDLpActions = $t05170751788._1
1475+ let updatedDLp = $t05170751788._2
14671476 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
14681477 if ((isUpdatedDLpValid == isUpdatedDLpValid))
14691478 then (state ++ refreshDLpActions)
14701479 else throw("Strict value is not equal to itself.")
14711480 }
14721481 else throw("Strict value is not equal to itself.")
14731482 }
14741483 else throw("Strict value is not equal to itself.")
14751484 }
14761485 }
14771486
14781487
14791488
14801489 @Callable(i)
14811490 func unstakeAndGet (amount) = {
14821491 let checkPayments = if ((size(i.payments) != 0))
14831492 then throw("No pmnts expd")
14841493 else true
14851494 if ((checkPayments == checkPayments))
14861495 then {
14871496 let factoryCfg = gfc()
14881497 let lpAssetId = cfgLpAssetId
14891498 let staking = valueOrErrorMessage(addressFromString(factoryCfg[idxFactStakCntr]), "Wr st addr")
14901499 let currentDLp = calcCurrentDLp(toBigInt(0), toBigInt(0), toBigInt(0))
14911500 if ((currentDLp == currentDLp))
14921501 then {
14931502 let unstakeInv = invoke(staking, "unstake", [toBase58String(lpAssetId), amount], nil)
14941503 if ((unstakeInv == unstakeInv))
14951504 then {
14961505 let r = ego(toBase58String(i.transactionId), toBase58String(lpAssetId), amount, i.caller)
14971506 let outAmAmt = r._1
14981507 let outPrAmt = r._2
14991508 let sts = parseIntValue(r._9)
15001509 let state = r._10
15011510 let v = if (if (igs())
15021511 then true
15031512 else (sts == PoolShutdown))
15041513 then throw(("Blocked: " + toString(sts)))
15051514 else true
15061515 if ((v == v))
15071516 then {
15081517 let burnA = invoke(fca, "burn", [amount], [AttachedPayment(lpAssetId, amount)])
15091518 if ((burnA == burnA))
15101519 then {
1511- let $t05281752898 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1512- let refreshDLpActions = $t05281752898._1
1513- let updatedDLp = $t05281752898._2
1520+ let $t05281552896 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1521+ let refreshDLpActions = $t05281552896._1
1522+ let updatedDLp = $t05281552896._2
15141523 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
15151524 if ((isUpdatedDLpValid == isUpdatedDLpValid))
15161525 then (state ++ refreshDLpActions)
15171526 else throw("Strict value is not equal to itself.")
15181527 }
15191528 else throw("Strict value is not equal to itself.")
15201529 }
15211530 else throw("Strict value is not equal to itself.")
15221531 }
15231532 else throw("Strict value is not equal to itself.")
15241533 }
15251534 else throw("Strict value is not equal to itself.")
15261535 }
15271536 else throw("Strict value is not equal to itself.")
15281537 }
15291538
15301539
15311540
15321541 @Callable(i)
15331542 func unstakeAndGetNoLess (unstakeAmount,noLessThenAmountAsset,noLessThenPriceAsset) = {
15341543 let isGetDisabled = if (igs())
15351544 then true
15361545 else (cfgPoolStatus == PoolShutdown)
15371546 let checks = [if (!(isGetDisabled))
15381547 then true
15391548 else throw("get operation is blocked by admin"), if ((size(i.payments) == 0))
15401549 then true
15411550 else throw("no payments are expected")]
15421551 if ((checks == checks))
15431552 then {
15441553 let currentDLp = calcCurrentDLp(toBigInt(0), toBigInt(0), toBigInt(0))
15451554 if ((currentDLp == currentDLp))
15461555 then {
15471556 let unstakeInv = invoke(stakingContract, "unstake", [toBase58String(cfgLpAssetId), unstakeAmount], nil)
15481557 if ((unstakeInv == unstakeInv))
15491558 then {
15501559 let res = ego(toBase58String(i.transactionId), toBase58String(cfgLpAssetId), unstakeAmount, i.caller)
15511560 let outAmAmt = res._1
15521561 let outPrAmt = res._2
15531562 let state = res._10
15541563 let checkAmounts = [if ((outAmAmt >= noLessThenAmountAsset))
15551564 then true
15561565 else throw(makeString(["amount asset amount to receive is less than ", toString(noLessThenAmountAsset)], "")), if ((outPrAmt >= noLessThenPriceAsset))
15571566 then true
15581567 else throw(makeString(["price asset amount to receive is less than ", toString(noLessThenPriceAsset)], ""))]
15591568 if ((checkAmounts == checkAmounts))
15601569 then {
15611570 let burnLPAssetOnFactory = invoke(fca, "burn", [unstakeAmount], [AttachedPayment(cfgLpAssetId, unstakeAmount)])
15621571 if ((burnLPAssetOnFactory == burnLPAssetOnFactory))
15631572 then {
1564- let $t05414954230 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1565- let refreshDLpActions = $t05414954230._1
1566- let updatedDLp = $t05414954230._2
1573+ let $t05414754228 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1574+ let refreshDLpActions = $t05414754228._1
1575+ let updatedDLp = $t05414754228._2
15671576 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
15681577 if ((isUpdatedDLpValid == isUpdatedDLpValid))
15691578 then (state ++ refreshDLpActions)
15701579 else throw("Strict value is not equal to itself.")
15711580 }
15721581 else throw("Strict value is not equal to itself.")
15731582 }
15741583 else throw("Strict value is not equal to itself.")
15751584 }
15761585 else throw("Strict value is not equal to itself.")
15771586 }
15781587 else throw("Strict value is not equal to itself.")
15791588 }
15801589 else throw("Strict value is not equal to itself.")
15811590 }
15821591
15831592
15841593
15851594 @Callable(i)
15861595 func unstakeAndGetOneTknV2 (unstakeAmount,outAssetId,minOutAmount) = {
15871596 let isPoolOneTokenOperationsDisabled = {
15881597 let @ = invoke(fca, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
15891598 if ($isInstanceOf(@, "Boolean"))
15901599 then @
15911600 else throw(($getType(@) + " couldn't be cast to Boolean"))
15921601 }
15931602 let isGetDisabled = if (if (igs())
15941603 then true
15951604 else (cfgPoolStatus == PoolShutdown))
15961605 then true
15971606 else isPoolOneTokenOperationsDisabled
15981607 let checks = [if (if (!(isGetDisabled))
15991608 then true
16001609 else isManager(i))
16011610 then true
16021611 else throwErr("get operation is blocked by admin"), if ((size(i.payments) == 0))
16031612 then true
16041613 else throwErr("no payments are expected")]
16051614 if ((checks == checks))
16061615 then {
16071616 let factoryCfg = gfc()
16081617 let lpAssetId = cfgLpAssetId
16091618 let staking = valueOrErrorMessage(addressFromString(factoryCfg[idxFactStakCntr]), "Wr st addr")
16101619 let unstakeInv = invoke(staking, "unstake", [toBase58String(lpAssetId), unstakeAmount], nil)
16111620 if ((unstakeInv == unstakeInv))
16121621 then {
1613- let $t05512555313 = getOneTknV2Internal(outAssetId, minOutAmount, [AttachedPayment(lpAssetId, unstakeAmount)], i.caller, i.originCaller, i.transactionId)
1614- let state = $t05512555313._1
1615- let totalAmount = $t05512555313._2
1622+ let $t05512355311 = getOneTknV2Internal(outAssetId, minOutAmount, [AttachedPayment(lpAssetId, unstakeAmount)], i.caller, i.originCaller, i.transactionId)
1623+ let state = $t05512355311._1
1624+ let totalAmount = $t05512355311._2
16161625 $Tuple2(state, totalAmount)
16171626 }
16181627 else throw("Strict value is not equal to itself.")
16191628 }
16201629 else throw("Strict value is not equal to itself.")
16211630 }
16221631
16231632
16241633
16251634 @Callable(i)
16261635 func putOneTknV2WithBonusREADONLY (paymentAmountRaw,paymentAssetId) = {
1627- let $t05544155544 = calcPutOneTkn(paymentAmountRaw, paymentAssetId, "", "", true)
1628- let lpAmount = $t05544155544._1
1629- let state = $t05544155544._2
1630- let feeAmount = $t05544155544._3
1631- let bonus = $t05544155544._4
1636+ let $t05543955542 = calcPutOneTkn(paymentAmountRaw, paymentAssetId, "", "", true)
1637+ let lpAmount = $t05543955542._1
1638+ let state = $t05543955542._2
1639+ let feeAmount = $t05543955542._3
1640+ let bonus = $t05543955542._4
16321641 $Tuple2(nil, $Tuple3(lpAmount, feeAmount, bonus))
16331642 }
16341643
16351644
16361645
16371646 @Callable(i)
16381647 func putOneTknV2WithoutTakeFeeREADONLY (paymentAmountRaw,paymentAssetId) = {
1639- let $t05569255796 = calcPutOneTkn(paymentAmountRaw, paymentAssetId, "", "", false)
1640- let lpAmount = $t05569255796._1
1641- let state = $t05569255796._2
1642- let feeAmount = $t05569255796._3
1643- let bonus = $t05569255796._4
1648+ let $t05569055794 = calcPutOneTkn(paymentAmountRaw, paymentAssetId, "", "", false)
1649+ let lpAmount = $t05569055794._1
1650+ let state = $t05569055794._2
1651+ let feeAmount = $t05569055794._3
1652+ let bonus = $t05569055794._4
16441653 $Tuple2(nil, $Tuple3(lpAmount, feeAmount, bonus))
16451654 }
16461655
16471656
16481657
16491658 @Callable(i)
16501659 func activate (amtAsStr,prAsStr) = if ((toString(i.caller) != toString(fca)))
16511660 then throw("denied")
16521661 else $Tuple2([StringEntry(aa(), amtAsStr), StringEntry(pa(), prAsStr)], "success")
16531662
16541663
16551664
16561665 @Callable(i)
16571666 func setS (k,v) = if ((toString(i.caller) != strf(this, ada())))
16581667 then pd
16591668 else [StringEntry(k, v)]
16601669
16611670
16621671
16631672 @Callable(i)
16641673 func setI (k,v) = if ((toString(i.caller) != strf(this, ada())))
16651674 then pd
16661675 else [IntegerEntry(k, v)]
16671676
16681677
16691678
16701679 @Callable(i)
16711680 func getPoolConfigWrapperREADONLY () = $Tuple2(nil, gpc())
16721681
16731682
16741683
16751684 @Callable(i)
16761685 func getAccBalanceWrapperREADONLY (assetId) = $Tuple2(nil, getAccBalance(assetId))
16771686
16781687
16791688
16801689 @Callable(i)
16811690 func calcPricesWrapperREADONLY (amAmt,prAmt,lpAmt) = {
16821691 let pr = calcPrices(amAmt, prAmt, lpAmt)
16831692 $Tuple2(nil, [toString(pr[0]), toString(pr[1]), toString(pr[2])])
16841693 }
16851694
16861695
16871696
16881697 @Callable(i)
16891698 func fromX18WrapperREADONLY (val,resScaleMult) = $Tuple2(nil, f1(parseBigIntValue(val), resScaleMult))
16901699
16911700
16921701
16931702 @Callable(i)
16941703 func toX18WrapperREADONLY (origVal,origScaleMult) = $Tuple2(nil, toString(t1(origVal, origScaleMult)))
16951704
16961705
16971706
16981707 @Callable(i)
16991708 func calcPriceBigIntWrapperREADONLY (prAmtX18,amAmtX18) = $Tuple2(nil, toString(cpbi(parseBigIntValue(prAmtX18), parseBigIntValue(amAmtX18))))
17001709
17011710
17021711
17031712 @Callable(i)
17041713 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, ""))
17051714
17061715
17071716
17081717 @Callable(i)
17091718 func estimateGetOperationWrapperREADONLY (txId58,pmtAsId,pmtLpAmt,usrAddr) = {
17101719 let r = ego(txId58, pmtAsId, pmtLpAmt, addressFromStringValue(usrAddr))
17111720 $Tuple2(nil, $Tuple10(r._1, r._2, r._3, r._4, r._5, r._6, r._7, toString(r._8), r._9, r._10))
17121721 }
17131722
17141723
17151724 @Verifier(tx)
17161725 func verify () = {
17171726 let targetPublicKey = match m() {
17181727 case pk: ByteVector =>
17191728 pk
17201729 case _: Unit =>
17211730 tx.senderPublicKey
17221731 case _ =>
17231732 throw("Match error")
17241733 }
17251734 match tx {
17261735 case order: Order =>
17271736 let matcherPub = mp()
1728- let $t05858858657 = validateMatcherOrderAllowed(order)
1729- let orderValid = $t05858858657._1
1730- let orderValidInfo = $t05858858657._2
1737+ let $t05858658655 = validateMatcherOrderAllowed(order)
1738+ let orderValid = $t05858658655._1
1739+ let orderValidInfo = $t05858658655._2
17311740 let senderValid = sigVerify(order.bodyBytes, order.proofs[0], order.senderPublicKey)
17321741 let matcherValid = sigVerify(order.bodyBytes, order.proofs[1], matcherPub)
17331742 if (if (if (orderValid)
17341743 then senderValid
17351744 else false)
17361745 then matcherValid
17371746 else false)
17381747 then true
17391748 else throwOrderError(orderValid, orderValidInfo, senderValid, matcherValid)
17401749 case s: SetScriptTransaction =>
17411750 if (sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey))
17421751 then true
17431752 else {
17441753 let newHash = blake2b256(value(s.script))
17451754 let allowedHash = fromBase64String(value(getString(fca, keyAllowedLpStableScriptHash())))
17461755 let currentHash = scriptHash(this)
17471756 if ((allowedHash == newHash))
17481757 then (currentHash != newHash)
17491758 else false
17501759 }
17511760 case _ =>
17521761 sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey)
17531762 }
17541763 }
17551764

github/deemru/w8io/026f985 
219.20 ms