tx · C4YHY5zxGuCYdb5ojqVMw9yk96MTYym6HyytEv2oxAVw

3N7b3kPunHUXhZp1vMG9NhPMARNEprCMWxT:  -0.03600000 Waves

2023.01.24 10:19 [2418733] smart account 3N7b3kPunHUXhZp1vMG9NhPMARNEprCMWxT > SELF 0.00000000 Waves

{ "type": 13, "id": "C4YHY5zxGuCYdb5ojqVMw9yk96MTYym6HyytEv2oxAVw", "fee": 3600000, "feeAssetId": null, "timestamp": 1674544772644, "version": 1, "sender": "3N7b3kPunHUXhZp1vMG9NhPMARNEprCMWxT", "senderPublicKey": "AYbpHveq7zviKTDV7SGTB1pZGFbkumgfq3jSwVv6BznT", "proofs": [ "5Pt6rYrkkmJ53mAdGYmht2seBucxBz8YRZeLHrXuLtnxd2KXhWiSLRSRw9j42fkHY9pJ9hFsmQ8Z1RSQfriZQnUc" ], "script": "base64:BgKBLggCEgMKAQgSABIECgIBBBIDCgEBEgQKAgEEEgQKAggBEgQKAggBEgQKAggBEgUKAwEIARIAEgQKAgEBEgMKAQESBQoDAQEBEgQKAggIEgASABIDCgEIEgUKAwEBARIECgIBARIECgIIARIECgIICBILCgkIAQECAQIIBAQSBgoECAgBCBIAEgMKAQESAwoBARIECgIIASIKbFBkZWNpbWFscyIGc2NhbGU4IgxzY2FsZThCaWdJbnQiB3NjYWxlMTgiCnplcm9CaWdJbnQiBGJpZzAiBGJpZzEiBGJpZzIiC3dhdmVzU3RyaW5nIgNTRVAiClBvb2xBY3RpdmUiD1Bvb2xQdXREaXNhYmxlZCITUG9vbE1hdGNoZXJEaXNhYmxlZCIMUG9vbFNodXRkb3duIg5pZHhQb29sQWRkcmVzcyINaWR4UG9vbFN0YXR1cyIQaWR4UG9vbExQQXNzZXRJZCINaWR4QW10QXNzZXRJZCIPaWR4UHJpY2VBc3NldElkIg5pZHhBbXRBc3NldERjbSIQaWR4UHJpY2VBc3NldERjbSIOaWR4SUFtdEFzc2V0SWQiEGlkeElQcmljZUFzc2V0SWQiDWlkeExQQXNzZXRE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cHQEAmdPCQDbBAEJAQV2YWx1ZQEJAJ0IAgUCYU4JAQJhegAEAmdQCQDxBwEFBHRoaXMDAwkAAAIFAmdPBQJnTgkBAiE9AgUCZ1AFAmdOBwYJAPQDAwgFAmdJCWJvZHlCeXRlcwkAkQMCCAUCZ0kGcHJvb2ZzAAAFAmdLCQD0AwMIBQJnSQlib2R5Qnl0ZXMJAJEDAggFAmdJBnByb29mcwAABQJnS4J/hPg=", "chainId": 84, "height": 2418733, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 3HzS5zWaowaTuXXM1UgzeTbZ81r8E2LGQWsoqGBe6F7k Next: CdiJjaSo3tL1qnKrWiYdYFmsR2ys81KvgXGfRZ6nrA2U Diff:
OldNewDifferences
431431
432432
433433 func validateMatcherOrderAllowed (order) = {
434+ let amountAssetBalance = getAccBalance(assetIdToString(cfgAmountAssetId))
435+ let priceAssetBalance = getAccBalance(assetIdToString(cfgPriceAssetId))
434436 let amountAssetAmount = order.amount
435437 let priceAssetAmount = fraction(order.amount, order.price, scale8, FLOOR)
436- let $t02132621538 = if ((order.orderType == Buy))
438+ let $t02148021692 = if ((order.orderType == Buy))
437439 then $Tuple2(amountAssetAmount, -(priceAssetAmount))
438440 else $Tuple2(-(amountAssetAmount), priceAssetAmount)
439- let amountAssetBalanceDelta = $t02132621538._1
440- let priceAssetBalanceDelta = $t02132621538._2
441+ let amountAssetBalanceDelta = $t02148021692._1
442+ let priceAssetBalanceDelta = $t02148021692._2
441443 if (if (if (isGlobalShutdown())
442444 then true
443445 else (cfgPoolStatus == PoolMatcherDisabled))
450452 then throw("Wrong order assets.")
451453 else {
452454 let kLp = valueOrErrorMessage(parseBigInt(valueOrElse(getString(this, keyKLp), "0")), fmtErr("invalid kLp"))
453- let $t02197822078 = refreshKLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
454- let unusedActions = $t02197822078._1
455- let kLpNew = $t02197822078._2
455+ let $t02213222232 = refreshKLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
456+ let unusedActions = $t02213222232._1
457+ let kLpNew = $t02213222232._2
456458 let isOrderValid = (kLpNew >= kLp)
457- let info = makeString([toString(kLp), toString(kLpNew)], " ")
459+ let info = makeString(["kLp=", toString(kLp), " kLpNew=", toString(kLpNew), " amountAssetBalance=", toString(amountAssetBalance), " priceAssetBalance=", toString(priceAssetBalance), " amountAssetBalanceDelta=", toString(amountAssetBalanceDelta), " priceAssetBalanceDelta=", toString(priceAssetBalanceDelta)], "")
458460 $Tuple2(isOrderValid, info)
459461 }
460462 }
531533 else if ((paymentAssetId == cfgPriceAssetId))
532534 then false
533535 else throwErr("invalid asset")
534- let $t02488525178 = if (isEval)
536+ let $t02531025603 = if (isEval)
535537 then $Tuple2(amountBalanceRaw, priceBalanceRaw)
536538 else if (paymentInAmountAsset)
537539 then $Tuple2((amountBalanceRaw - paymentAmountRaw), priceBalanceRaw)
538540 else $Tuple2(amountBalanceRaw, (priceBalanceRaw - paymentAmountRaw))
539- let amountBalanceOld = $t02488525178._1
540- let priceBalanceOld = $t02488525178._2
541- let $t02518225331 = if (paymentInAmountAsset)
541+ let amountBalanceOld = $t02531025603._1
542+ let priceBalanceOld = $t02531025603._2
543+ let $t02560725756 = if (paymentInAmountAsset)
542544 then $Tuple2(paymentAmountRaw, 0)
543545 else $Tuple2(0, paymentAmountRaw)
544- let amountAssetAmountRaw = $t02518225331._1
545- let priceAssetAmountRaw = $t02518225331._2
546+ let amountAssetAmountRaw = $t02560725756._1
547+ let priceAssetAmountRaw = $t02560725756._2
546548 let amountAssetAmount = takeFee(amountAssetAmountRaw, inFee)._1
547549 let priceAssetAmount = takeFee(priceAssetAmountRaw, inFee)._1
548- let $t02546325527 = takeFee(paymentAmountRaw, inFee)
549- let paymentAmount = $t02546325527._1
550- let feeAmount = $t02546325527._2
550+ let $t02588825952 = takeFee(paymentAmountRaw, inFee)
551+ let paymentAmount = $t02588825952._1
552+ let feeAmount = $t02588825952._2
551553 let amountBalanceNew = (amountBalanceOld + amountAssetAmount)
552554 let priceBalanceNew = (priceBalanceOld + priceAssetAmount)
553555 let priceNewX18 = calcPriceBigInt(toX18(priceBalanceNew, cfgPriceAssetDecimals), toX18(amountBalanceNew, cfgAmountAssetDecimals))
570572 let priceOldX18 = calcPriceBigInt(toX18(priceBalanceOld, cfgPriceAssetDecimals), toX18(amountBalanceOld, cfgAmountAssetDecimals))
571573 let priceOld = fromX18(priceOldX18, scale8)
572574 let loss = {
573- let $t02720827375 = if (paymentInAmountAsset)
575+ let $t02763327800 = if (paymentInAmountAsset)
574576 then $Tuple2(amountAssetAmountRaw, amountBalanceOld)
575577 else $Tuple2(priceAssetAmountRaw, priceBalanceOld)
576- let amount = $t02720827375._1
577- let balance = $t02720827375._2
578+ let amount = $t02763327800._1
579+ let balance = $t02763327800._2
578580 let issueAmountBoth = toInt(fraction(supplyBigInt, toBigInt((amount / 2)), toBigInt(balance)))
579581 fraction((issueAmount - issueAmountBoth), scale8, issueAmountBoth)
580582 }
614616 let supplyBigInt = toBigInt(valueOrErrorMessage(assetInfo(cfgLpAssetId), (("asset " + toBase58String(cfgLpAssetId)) + " doesn't exist")).quantity)
615617 let redeemedBigInt = toBigInt(paymentAmount)
616618 let amountRaw = max([0, toInt(((balanceBigInt * (scale18 - pow((scale18 - ((redeemedBigInt * scale18) / supplyBigInt)), 18, big2, 0, 18, DOWN))) / scale18))])
617- let $t02945329509 = takeFee(amountRaw, outFee)
618- let totalAmount = $t02945329509._1
619- let feeAmount = $t02945329509._2
620- let $t02951329739 = if (outInAmountAsset)
619+ let $t02987829934 = takeFee(amountRaw, outFee)
620+ let totalAmount = $t02987829934._1
621+ let feeAmount = $t02987829934._2
622+ let $t02993830164 = if (outInAmountAsset)
621623 then $Tuple4(totalAmount, 0, (amBalanceOld - amountRaw), prBalanceOld)
622624 else $Tuple4(0, totalAmount, amBalanceOld, (prBalanceOld - amountRaw))
623- let outAmAmount = $t02951329739._1
624- let outPrAmount = $t02951329739._2
625- let amBalanceNew = $t02951329739._3
626- let prBalanceNew = $t02951329739._4
625+ let outAmAmount = $t02993830164._1
626+ let outPrAmount = $t02993830164._2
627+ let amBalanceNew = $t02993830164._3
628+ let prBalanceNew = $t02993830164._4
627629 let priceNewX18 = calcPriceBigInt(toX18(prBalanceNew, cfgPriceAssetDecimals), toX18(amBalanceNew, cfgAmountAssetDecimals))
628630 let priceNew = fromX18(priceNewX18, scale8)
629631 let commonState = if (isEval)
769771 else throw("Strict value is not equal to itself.")
770772 }
771773 else [ScriptTransfer(i.caller, emitLpAmt, lpAssetId)]
772- let $t03426734729 = refreshKLpInternal(0, 0, 0)
773- if (($t03426734729 == $t03426734729))
774+ let $t03469235154 = refreshKLpInternal(0, 0, 0)
775+ if (($t03469235154 == $t03469235154))
774776 then {
775- let updatedKLp = $t03426734729._2
776- let refreshKLpActions = $t03426734729._1
777+ let updatedKLp = $t03469235154._2
778+ let refreshKLpActions = $t03469235154._1
777779 let isUpdatedKLpValid = validateUpdatedKLp(currentKLp, updatedKLp)
778780 if ((isUpdatedKLpValid == isUpdatedKLpValid))
779781 then ((state ++ lpTransfer) ++ refreshKLpActions)
805807 let currentKLp = calcCurrentKLp(amAssetPmt, prAssetPmt, toBigInt(0))
806808 if ((currentKLp == currentKLp))
807809 then {
808- let $t03529135356 = refreshKLpInternal(0, 0, 0)
809- let refreshKLpActions = $t03529135356._1
810- let updatedKLp = $t03529135356._2
810+ let $t03571635781 = refreshKLpInternal(0, 0, 0)
811+ let refreshKLpActions = $t03571635781._1
812+ let updatedKLp = $t03571635781._2
811813 let isUpdatedKLpValid = validateUpdatedKLp(currentKLp, updatedKLp)
812814 if ((isUpdatedKLpValid == isUpdatedKLpValid))
813815 then (state ++ refreshKLpActions)
854856 then {
855857 let userAddress = i.caller
856858 let txId = i.transactionId
857- let $t03654436696 = calcPutOneToken(paymentAmountRaw, paymentAssetId, userAddress, txId)
858- if (($t03654436696 == $t03654436696))
859+ let $t03696937121 = calcPutOneToken(paymentAmountRaw, paymentAssetId, userAddress, txId)
860+ if (($t03696937121 == $t03696937121))
859861 then {
860- let paymentInAmountAsset = $t03654436696._5
861- let bonus = $t03654436696._4
862- let feeAmount = $t03654436696._3
863- let commonState = $t03654436696._2
864- let emitAmountEstimated = $t03654436696._1
862+ let paymentInAmountAsset = $t03696937121._5
863+ let bonus = $t03696937121._4
864+ let feeAmount = $t03696937121._3
865+ let commonState = $t03696937121._2
866+ let emitAmountEstimated = $t03696937121._1
865867 let emitAmount = if (if ((minOutAmount > 0))
866868 then (minOutAmount > emitAmountEstimated)
867869 else false)
881883 let sendFee = if ((feeAmount > 0))
882884 then [ScriptTransfer(feeCollectorAddress, feeAmount, paymentAssetId)]
883885 else nil
884- let $t03728237479 = if ((this == feeCollectorAddress))
886+ let $t03770737904 = if ((this == feeCollectorAddress))
885887 then $Tuple2(0, 0)
886888 else if (paymentInAmountAsset)
887889 then $Tuple2(-(feeAmount), 0)
888890 else $Tuple2(0, -(feeAmount))
889- let amountAssetBalanceDelta = $t03728237479._1
890- let priceAssetBalanceDelta = $t03728237479._2
891- let $t03748237590 = refreshKLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
892- let refreshKLpActions = $t03748237590._1
893- let updatedKLp = $t03748237590._2
891+ let amountAssetBalanceDelta = $t03770737904._1
892+ let priceAssetBalanceDelta = $t03770737904._2
893+ let $t03790738015 = refreshKLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
894+ let refreshKLpActions = $t03790738015._1
895+ let updatedKLp = $t03790738015._2
894896 let kLp = value(getString(keyKLp))
895897 let isUpdatedKLpValid = validateUpdatedKLp(currentKLp, updatedKLp)
896898 if ((isUpdatedKLpValid == isUpdatedKLpValid))
910912
911913 @Callable(i)
912914 func putOneTknREADONLY (paymentAssetId,paymentAmountRaw) = {
913- let $t03789638053 = calcPutOneToken(paymentAmountRaw, parseAssetId(paymentAssetId), unit, unit)
914- let emitAmountEstimated = $t03789638053._1
915- let commonState = $t03789638053._2
916- let feeAmount = $t03789638053._3
917- let bonus = $t03789638053._4
918- let paymentInAmountAsset = $t03789638053._5
915+ let $t03832138478 = calcPutOneToken(paymentAmountRaw, parseAssetId(paymentAssetId), unit, unit)
916+ let emitAmountEstimated = $t03832138478._1
917+ let commonState = $t03832138478._2
918+ let feeAmount = $t03832138478._3
919+ let bonus = $t03832138478._4
920+ let paymentInAmountAsset = $t03832138478._5
919921 $Tuple2(nil, $Tuple3(emitAmountEstimated, feeAmount, bonus))
920922 }
921923
952954 then {
953955 let userAddress = i.caller
954956 let txId = i.transactionId
955- let $t03893839091 = calcGetOneToken(outAssetId, paymentAmount, paymentAssetId, userAddress, txId)
956- if (($t03893839091 == $t03893839091))
957+ let $t03936339516 = calcGetOneToken(outAssetId, paymentAmount, paymentAssetId, userAddress, txId)
958+ if (($t03936339516 == $t03936339516))
957959 then {
958- let outInAmountAsset = $t03893839091._5
959- let bonus = $t03893839091._4
960- let feeAmount = $t03893839091._3
961- let commonState = $t03893839091._2
962- let amountEstimated = $t03893839091._1
960+ let outInAmountAsset = $t03936339516._5
961+ let bonus = $t03936339516._4
962+ let feeAmount = $t03936339516._3
963+ let commonState = $t03936339516._2
964+ let amountEstimated = $t03936339516._1
963965 let amount = if (if ((minOutAmount > 0))
964966 then (minOutAmount > amountEstimated)
965967 else false)
972974 let sendFee = if ((feeAmount > 0))
973975 then [ScriptTransfer(feeCollectorAddress, feeAmount, outAssetId)]
974976 else nil
975- let $t03959139838 = {
977+ let $t04001640263 = {
976978 let feeAmountForCalc = if ((this == feeCollectorAddress))
977979 then 0
978980 else feeAmount
980982 then $Tuple2(-((amount + feeAmountForCalc)), 0)
981983 else $Tuple2(0, -((amount + feeAmountForCalc)))
982984 }
983- let amountAssetBalanceDelta = $t03959139838._1
984- let priceAssetBalanceDelta = $t03959139838._2
985- let $t03984139949 = refreshKLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
986- let refreshKLpActions = $t03984139949._1
987- let updatedKLp = $t03984139949._2
985+ let amountAssetBalanceDelta = $t04001640263._1
986+ let priceAssetBalanceDelta = $t04001640263._2
987+ let $t04026640374 = refreshKLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
988+ let refreshKLpActions = $t04026640374._1
989+ let updatedKLp = $t04026640374._2
988990 let isUpdatedKLpValid = validateUpdatedKLp(currentKLp, updatedKLp)
989991 if ((isUpdatedKLpValid == isUpdatedKLpValid))
990992 then $Tuple2((((commonState ++ assetTransfer) ++ sendFee) ++ refreshKLpActions), amount)
10031005
10041006 @Callable(i)
10051007 func getOneTknREADONLY (outAssetId,paymentAmount) = {
1006- let $t04020640362 = calcGetOneToken(parseAssetId(outAssetId), paymentAmount, cfgLpAssetId, unit, unit)
1007- let amountEstimated = $t04020640362._1
1008- let commonState = $t04020640362._2
1009- let feeAmount = $t04020640362._3
1010- let bonus = $t04020640362._4
1011- let outInAmountAsset = $t04020640362._5
1008+ let $t04063140787 = calcGetOneToken(parseAssetId(outAssetId), paymentAmount, cfgLpAssetId, unit, unit)
1009+ let amountEstimated = $t04063140787._1
1010+ let commonState = $t04063140787._2
1011+ let feeAmount = $t04063140787._3
1012+ let bonus = $t04063140787._4
1013+ let outInAmountAsset = $t04063140787._5
10121014 $Tuple2(nil, $Tuple3(amountEstimated, feeAmount, bonus))
10131015 }
10141016
10451047 let unstakeInv = invoke(stakingContract, "unstake", [toBase58String(cfgLpAssetId), unstakeAmount], nil)
10461048 if ((unstakeInv == unstakeInv))
10471049 then {
1048- let $t04126741418 = calcGetOneToken(outAssetId, unstakeAmount, cfgLpAssetId, userAddress, txId)
1049- if (($t04126741418 == $t04126741418))
1050+ let $t04169241843 = calcGetOneToken(outAssetId, unstakeAmount, cfgLpAssetId, userAddress, txId)
1051+ if (($t04169241843 == $t04169241843))
10501052 then {
1051- let outInAmountAsset = $t04126741418._5
1052- let bonus = $t04126741418._4
1053- let feeAmount = $t04126741418._3
1054- let commonState = $t04126741418._2
1055- let amountEstimated = $t04126741418._1
1053+ let outInAmountAsset = $t04169241843._5
1054+ let bonus = $t04169241843._4
1055+ let feeAmount = $t04169241843._3
1056+ let commonState = $t04169241843._2
1057+ let amountEstimated = $t04169241843._1
10561058 let amount = if (if ((minOutAmount > 0))
10571059 then (minOutAmount > amountEstimated)
10581060 else false)
10651067 let sendFee = if ((feeAmount > 0))
10661068 then [ScriptTransfer(feeCollectorAddress, feeAmount, outAssetId)]
10671069 else nil
1068- let $t04191342160 = {
1070+ let $t04233842585 = {
10691071 let feeAmountForCalc = if ((this == feeCollectorAddress))
10701072 then 0
10711073 else feeAmount
10731075 then $Tuple2(-((amount + feeAmountForCalc)), 0)
10741076 else $Tuple2(0, -((amount + feeAmountForCalc)))
10751077 }
1076- let amountAssetBalanceDelta = $t04191342160._1
1077- let priceAssetBalanceDelta = $t04191342160._2
1078- let $t04216342271 = refreshKLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
1079- let refreshKLpActions = $t04216342271._1
1080- let updatedKLp = $t04216342271._2
1078+ let amountAssetBalanceDelta = $t04233842585._1
1079+ let priceAssetBalanceDelta = $t04233842585._2
1080+ let $t04258842696 = refreshKLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
1081+ let refreshKLpActions = $t04258842696._1
1082+ let updatedKLp = $t04258842696._2
10811083 let isUpdatedKLpValid = validateUpdatedKLp(currentKLp, updatedKLp)
10821084 if ((isUpdatedKLpValid == isUpdatedKLpValid))
10831085 then $Tuple2((((commonState ++ assetTransfer) ++ sendFee) ++ refreshKLpActions), amount)
11101112 let burnLPAssetOnFactory = invoke(factoryContract, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
11111113 if ((burnLPAssetOnFactory == burnLPAssetOnFactory))
11121114 then {
1113- let $t04321743299 = refreshKLpInternal(-(outAmtAmt), -(outPrAmt), 0)
1114- let refreshKLpActions = $t04321743299._1
1115- let updatedKLp = $t04321743299._2
1115+ let $t04364243724 = refreshKLpInternal(-(outAmtAmt), -(outPrAmt), 0)
1116+ let refreshKLpActions = $t04364243724._1
1117+ let updatedKLp = $t04364243724._2
11161118 let isUpdatedKLpValid = validateUpdatedKLp(currentKLp, updatedKLp)
11171119 if ((isUpdatedKLpValid == isUpdatedKLpValid))
11181120 then (state ++ refreshKLpActions)
11441146 let burnLPAssetOnFactory = invoke(factoryContract, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
11451147 if ((burnLPAssetOnFactory == burnLPAssetOnFactory))
11461148 then {
1147- let $t04424844329 = refreshKLpInternal(-(outAmAmt), -(outPrAmt), 0)
1148- let refreshKLpActions = $t04424844329._1
1149- let updatedKLp = $t04424844329._2
1149+ let $t04467344754 = refreshKLpInternal(-(outAmAmt), -(outPrAmt), 0)
1150+ let refreshKLpActions = $t04467344754._1
1151+ let updatedKLp = $t04467344754._2
11501152 let isUpdatedKLpValid = validateUpdatedKLp(currentKLp, updatedKLp)
11511153 if ((isUpdatedKLpValid == isUpdatedKLpValid))
11521154 then (state ++ refreshKLpActions)
11901192 let burnLPAssetOnFactory = invoke(factoryContract, "burn", [amount], [AttachedPayment(lpAssetId, amount)])
11911193 if ((burnLPAssetOnFactory == burnLPAssetOnFactory))
11921194 then {
1193- let $t04545545536 = refreshKLpInternal(-(outAmAmt), -(outPrAmt), 0)
1194- let refreshKLpActions = $t04545545536._1
1195- let updatedKLp = $t04545545536._2
1195+ let $t04588045961 = refreshKLpInternal(-(outAmAmt), -(outPrAmt), 0)
1196+ let refreshKLpActions = $t04588045961._1
1197+ let updatedKLp = $t04588045961._2
11961198 let isUpdatedKLpValid = validateUpdatedKLp(currentKLp, updatedKLp)
11971199 if ((isUpdatedKLpValid == isUpdatedKLpValid))
11981200 then (state ++ refreshKLpActions)
12431245 let burnLPAssetOnFactory = invoke(factoryContract, "burn", [unstakeAmount], [AttachedPayment(cfgLpAssetId, unstakeAmount)])
12441246 if ((burnLPAssetOnFactory == burnLPAssetOnFactory))
12451247 then {
1246- let $t04683146912 = refreshKLpInternal(-(outAmAmt), -(outPrAmt), 0)
1247- let refreshKLpActions = $t04683146912._1
1248- let updatedKLp = $t04683146912._2
1248+ let $t04725647337 = refreshKLpInternal(-(outAmAmt), -(outPrAmt), 0)
1249+ let refreshKLpActions = $t04725647337._1
1250+ let updatedKLp = $t04725647337._2
12491251 let isUpdatedKLpValid = validateUpdatedKLp(currentKLp, updatedKLp)
12501252 if ((isUpdatedKLpValid == isUpdatedKLpValid))
12511253 then (state ++ refreshKLpActions)
12801282 if ((checkLastRefreshedBlockHeight == checkLastRefreshedBlockHeight))
12811283 then {
12821284 let kLp = valueOrErrorMessage(parseBigInt(valueOrElse(getString(this, keyKLp), "0")), fmtErr("invalid kLp"))
1283- let $t04809948163 = refreshKLpInternal(0, 0, 0)
1284- let kLpUpdateActions = $t04809948163._1
1285- let updatedKLp = $t04809948163._2
1285+ let $t04852448588 = refreshKLpInternal(0, 0, 0)
1286+ let kLpUpdateActions = $t04852448588._1
1287+ let updatedKLp = $t04852448588._2
12861288 let actions = if ((kLp != updatedKLp))
12871289 then kLpUpdateActions
12881290 else throwErr("nothing to refresh")
14571459 match tx {
14581460 case order: Order =>
14591461 let matcherPub = getMatcherPubOrFail()
1460- let $t05682556894 = validateMatcherOrderAllowed(order)
1461- let orderValid = $t05682556894._1
1462- let orderValidInfo = $t05682556894._2
1462+ let $t05725057319 = validateMatcherOrderAllowed(order)
1463+ let orderValid = $t05725057319._1
1464+ let orderValidInfo = $t05725057319._2
14631465 let senderValid = sigVerify(order.bodyBytes, order.proofs[0], order.senderPublicKey)
14641466 let matcherValid = sigVerify(order.bodyBytes, order.proofs[1], matcherPub)
14651467 if (if (if (orderValid)
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let lPdecimals = 8
55
66 let scale8 = 100000000
77
88 let scale8BigInt = toBigInt(100000000)
99
1010 let scale18 = toBigInt(1000000000000000000)
1111
1212 let zeroBigInt = toBigInt(0)
1313
1414 let big0 = toBigInt(0)
1515
1616 let big1 = toBigInt(1)
1717
1818 let big2 = toBigInt(2)
1919
2020 let wavesString = "WAVES"
2121
2222 let SEP = "__"
2323
2424 let PoolActive = 1
2525
2626 let PoolPutDisabled = 2
2727
2828 let PoolMatcherDisabled = 3
2929
3030 let PoolShutdown = 4
3131
3232 let idxPoolAddress = 1
3333
3434 let idxPoolStatus = 2
3535
3636 let idxPoolLPAssetId = 3
3737
3838 let idxAmtAssetId = 4
3939
4040 let idxPriceAssetId = 5
4141
4242 let idxAmtAssetDcm = 6
4343
4444 let idxPriceAssetDcm = 7
4545
4646 let idxIAmtAssetId = 8
4747
4848 let idxIPriceAssetId = 9
4949
5050 let idxLPAssetDcm = 10
5151
5252 let idxPoolAmtAssetAmt = 1
5353
5454 let idxPoolPriceAssetAmt = 2
5555
5656 let idxPoolLPAssetAmt = 3
5757
5858 let idxFactoryStakingContract = 1
5959
6060 let idxFactorySlippageContract = 7
6161
6262 func toX18 (origVal,origScaleMult) = fraction(toBigInt(origVal), scale18, toBigInt(origScaleMult))
6363
6464
6565 func toX18BigInt (origVal,origScaleMult) = fraction(origVal, scale18, origScaleMult)
6666
6767
6868 func fromX18 (val,resultScaleMult) = toInt(fraction(val, toBigInt(resultScaleMult), scale18))
6969
7070
7171 func fromX18Round (val,resultScaleMult,round) = toInt(fraction(val, toBigInt(resultScaleMult), scale18, round))
7272
7373
7474 func toScale (amt,resScale,curScale) = fraction(amt, resScale, curScale)
7575
7676
7777 func abs (val) = if ((0 > val))
7878 then -(val)
7979 else val
8080
8181
8282 func absBigInt (val) = if ((zeroBigInt > val))
8383 then -(val)
8484 else val
8585
8686
8787 func fc () = "%s__factoryContract"
8888
8989
9090 func mpk () = "%s__managerPublicKey"
9191
9292
9393 func pmpk () = "%s__pendingManagerPublicKey"
9494
9595
9696 func pl () = "%s%s__price__last"
9797
9898
9999 func ph (h,timestamp) = makeString(["%s%s%d%d__price__history", toString(h), toString(timestamp)], SEP)
100100
101101
102102 func pau (userAddress,txId) = ((("%s%s%s__P__" + userAddress) + "__") + txId)
103103
104104
105105 func gau (userAddress,txId) = ((("%s%s%s__G__" + userAddress) + "__") + txId)
106106
107107
108108 func aa () = "%s__amountAsset"
109109
110110
111111 func pa () = "%s__priceAsset"
112112
113113
114114 let keyFee = "%s__fee"
115115
116116 let feeDefault = fraction(10, scale8, 10000)
117117
118118 let fee = valueOrElse(getInteger(this, keyFee), feeDefault)
119119
120120 let keyKLp = makeString(["%s", "kLp"], SEP)
121121
122122 let keyKLpRefreshedHeight = makeString(["%s", "kLpRefreshedHeight"], SEP)
123123
124124 let keyKLpRefreshDelay = makeString(["%s", "refreshKLpDelay"], SEP)
125125
126126 let kLpRefreshDelayDefault = 30
127127
128128 let kLpRefreshDelay = valueOrElse(getInteger(this, keyKLpRefreshDelay), kLpRefreshDelayDefault)
129129
130130 func keyFactoryConfig () = "%s__factoryConfig"
131131
132132
133133 func keyMatcherPub () = "%s%s__matcher__publicKey"
134134
135135
136136 func keyMappingPoolContractAddressToPoolAssets (poolContractAddress) = (("%s%s%s__" + poolContractAddress) + "__mappings__poolContract2LpAsset")
137137
138138
139139 func keyPoolConfig (iAmtAsset,iPriceAsset) = (((("%d%d%s__" + iAmtAsset) + "__") + iPriceAsset) + "__config")
140140
141141
142142 func keyMappingsBaseAsset2internalId (baseAssetStr) = ("%s%s%s__mappings__baseAsset2internalId__" + baseAssetStr)
143143
144144
145145 func keyAllPoolsShutdown () = "%s__shutdown"
146146
147147
148148 func keyPoolWeight (contractAddress) = ("%s%s__poolWeight__" + contractAddress)
149149
150150
151151 func keyAllowedLpScriptHash () = "%s__allowedLpScriptHash"
152152
153153
154154 let keyFeeCollectorAddress = "%s__feeCollectorAddress"
155155
156156 func throwOrderError (orderValid,orderValidInfo,senderValid,matcherValid) = throw((((((((("order validation failed: orderValid=" + toString(orderValid)) + " (") + orderValidInfo) + ")") + " senderValid=") + toString(senderValid)) + " matcherValid=") + toString(matcherValid)))
157157
158158
159159 func getStringOrFail (address,key) = valueOrErrorMessage(getString(address, key), makeString(["mandatory ", toString(address), ".", key, " is not defined"], ""))
160160
161161
162162 func getIntOrFail (address,key) = valueOrErrorMessage(getInteger(address, key), makeString(["mandatory ", toString(address), ".", key, " is not defined"], ""))
163163
164164
165165 func throwErr (msg) = throw(makeString(["lp.ride:", msg], " "))
166166
167167
168168 func fmtErr (msg) = makeString(["lp.ride:", msg], " ")
169169
170170
171171 let factoryContract = addressFromStringValue(getStringOrFail(this, fc()))
172172
173173 let feeCollectorAddress = addressFromStringValue(getStringOrFail(factoryContract, keyFeeCollectorAddress))
174174
175175 let inFee = {
176176 let @ = invoke(factoryContract, "getInFeeREADONLY", [toString(this)], nil)
177177 if ($isInstanceOf(@, "Int"))
178178 then @
179179 else throw(($getType(@) + " couldn't be cast to Int"))
180180 }
181181
182182 let outFee = {
183183 let @ = invoke(factoryContract, "getOutFeeREADONLY", [toString(this)], nil)
184184 if ($isInstanceOf(@, "Int"))
185185 then @
186186 else throw(($getType(@) + " couldn't be cast to Int"))
187187 }
188188
189189 func isGlobalShutdown () = valueOrElse(getBoolean(factoryContract, keyAllPoolsShutdown()), false)
190190
191191
192192 func getMatcherPubOrFail () = fromBase58String(getStringOrFail(factoryContract, keyMatcherPub()))
193193
194194
195195 func getPoolConfig () = {
196196 let amtAsset = getStringOrFail(this, aa())
197197 let priceAsset = getStringOrFail(this, pa())
198198 let iPriceAsset = getIntOrFail(factoryContract, keyMappingsBaseAsset2internalId(priceAsset))
199199 let iAmtAsset = getIntOrFail(factoryContract, keyMappingsBaseAsset2internalId(amtAsset))
200200 split(getStringOrFail(factoryContract, keyPoolConfig(toString(iAmtAsset), toString(iPriceAsset))), SEP)
201201 }
202202
203203
204204 func parseAssetId (input) = if ((input == wavesString))
205205 then unit
206206 else fromBase58String(input)
207207
208208
209209 func assetIdToString (input) = if ((input == unit))
210210 then wavesString
211211 else toBase58String(value(input))
212212
213213
214214 func parsePoolConfig (poolConfig) = $Tuple7(addressFromStringValue(poolConfig[idxPoolAddress]), parseIntValue(poolConfig[idxPoolStatus]), fromBase58String(poolConfig[idxPoolLPAssetId]), parseAssetId(poolConfig[idxAmtAssetId]), parseAssetId(poolConfig[idxPriceAssetId]), parseIntValue(poolConfig[idxAmtAssetDcm]), parseIntValue(poolConfig[idxPriceAssetDcm]))
215215
216216
217217 let poolConfigParsed = parsePoolConfig(getPoolConfig())
218218
219219 let $t084088574 = poolConfigParsed
220220
221221 let cfgPoolAddress = $t084088574._1
222222
223223 let cfgPoolStatus = $t084088574._2
224224
225225 let cfgLpAssetId = $t084088574._3
226226
227227 let cfgAmountAssetId = $t084088574._4
228228
229229 let cfgPriceAssetId = $t084088574._5
230230
231231 let cfgAmountAssetDecimals = $t084088574._6
232232
233233 let cfgPriceAssetDecimals = $t084088574._7
234234
235235 func getFactoryConfig () = split(getStringOrFail(factoryContract, keyFactoryConfig()), SEP)
236236
237237
238238 let stakingContract = valueOrErrorMessage(addressFromString(getFactoryConfig()[idxFactoryStakingContract]), "incorrect staking address")
239239
240240 let slippageContract = valueOrErrorMessage(addressFromString(getFactoryConfig()[idxFactorySlippageContract]), "incorrect staking address")
241241
242242 func dataPutActionInfo (inAmtAssetAmt,inPriceAssetAmt,outLpAmt,price,slippageTolerancePassedByUser,slippageToleranceReal,txHeight,txTimestamp,slipageAmtAssetAmt,slipagePriceAssetAmt) = makeString(["%d%d%d%d%d%d%d%d%d%d", toString(inAmtAssetAmt), toString(inPriceAssetAmt), toString(outLpAmt), toString(price), toString(slippageTolerancePassedByUser), toString(slippageToleranceReal), toString(txHeight), toString(txTimestamp), toString(slipageAmtAssetAmt), toString(slipagePriceAssetAmt)], SEP)
243243
244244
245245 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)
246246
247247
248248 func getAccBalance (assetId) = if ((assetId == "WAVES"))
249249 then wavesBalance(this).available
250250 else assetBalance(this, fromBase58String(assetId))
251251
252252
253253 func calcPriceBigInt (prAmtX18,amAmtX18) = fraction(prAmtX18, scale18, amAmtX18)
254254
255255
256256 func calcPriceBigIntRound (prAmtX18,amAmtX18,round) = fraction(prAmtX18, scale18, amAmtX18, round)
257257
258258
259259 func privateCalcPrice (amAssetDcm,prAssetDcm,amAmt,prAmt) = {
260260 let amtAssetAmtX18 = toX18(amAmt, amAssetDcm)
261261 let priceAssetAmtX18 = toX18(prAmt, prAssetDcm)
262262 calcPriceBigInt(priceAssetAmtX18, amtAssetAmtX18)
263263 }
264264
265265
266266 func calcPrices (amAmt,prAmt,lpAmt) = {
267267 let cfg = getPoolConfig()
268268 let amtAssetDcm = parseIntValue(cfg[idxAmtAssetDcm])
269269 let priceAssetDcm = parseIntValue(cfg[idxPriceAssetDcm])
270270 let priceX18 = privateCalcPrice(amtAssetDcm, priceAssetDcm, amAmt, prAmt)
271271 let amAmtX18 = toX18(amAmt, amtAssetDcm)
272272 let prAmtX18 = toX18(prAmt, priceAssetDcm)
273273 let lpAmtX18 = toX18(lpAmt, scale8)
274274 let lpPriceInAmAssetX18 = calcPriceBigInt(amAmtX18, lpAmtX18)
275275 let lpPriceInPrAssetX18 = calcPriceBigInt(prAmtX18, lpAmtX18)
276276 [priceX18, lpPriceInAmAssetX18, lpPriceInPrAssetX18]
277277 }
278278
279279
280280 func calculatePrices (amAmt,prAmt,lpAmt) = {
281281 let prices = calcPrices(amAmt, prAmt, lpAmt)
282282 [fromX18(prices[0], scale8), fromX18(prices[1], scale8), fromX18(prices[2], scale8)]
283283 }
284284
285285
286286 func estimateGetOperation (txId58,pmtAssetId,pmtLpAmt,userAddress) = {
287287 let cfg = getPoolConfig()
288288 let lpAssetId = cfg[idxPoolLPAssetId]
289289 let amAssetId = cfg[idxAmtAssetId]
290290 let prAssetId = cfg[idxPriceAssetId]
291291 let amAssetDcm = parseIntValue(cfg[idxAmtAssetDcm])
292292 let prAssetDcm = parseIntValue(cfg[idxPriceAssetDcm])
293293 let poolStatus = cfg[idxPoolStatus]
294294 let lpEmission = valueOrErrorMessage(assetInfo(fromBase58String(lpAssetId)), (("Asset " + lpAssetId) + " doesn't exist")).quantity
295295 if ((lpAssetId != pmtAssetId))
296296 then throw("Invalid asset passed.")
297297 else {
298298 let amBalance = getAccBalance(amAssetId)
299299 let amBalanceX18 = toX18(amBalance, amAssetDcm)
300300 let prBalance = getAccBalance(prAssetId)
301301 let prBalanceX18 = toX18(prBalance, prAssetDcm)
302302 let curPriceX18 = calcPriceBigInt(prBalanceX18, amBalanceX18)
303303 let curPrice = fromX18(curPriceX18, scale8)
304304 let pmtLpAmtX18 = toX18(pmtLpAmt, scale8)
305305 let lpEmissionX18 = toX18(lpEmission, scale8)
306306 let outAmAmtX18 = fraction(amBalanceX18, pmtLpAmtX18, lpEmissionX18)
307307 let outPrAmtX18 = fraction(prBalanceX18, pmtLpAmtX18, lpEmissionX18)
308308 let outAmAmt = fromX18Round(outAmAmtX18, amAssetDcm, FLOOR)
309309 let outPrAmt = fromX18Round(outPrAmtX18, prAssetDcm, FLOOR)
310310 let state = if ((txId58 == ""))
311311 then nil
312312 else [ScriptTransfer(userAddress, outAmAmt, if ((amAssetId == "WAVES"))
313313 then unit
314314 else fromBase58String(amAssetId)), ScriptTransfer(userAddress, outPrAmt, if ((prAssetId == "WAVES"))
315315 then unit
316316 else fromBase58String(prAssetId)), StringEntry(gau(toString(userAddress), txId58), dataGetActionInfo(outAmAmt, outPrAmt, pmtLpAmt, curPrice, height, lastBlock.timestamp)), IntegerEntry(pl(), curPrice), IntegerEntry(ph(height, lastBlock.timestamp), curPrice)]
317317 $Tuple10(outAmAmt, outPrAmt, amAssetId, prAssetId, amBalance, prBalance, lpEmission, curPriceX18, poolStatus, state)
318318 }
319319 }
320320
321321
322322 func estimatePutOperation (txId58,slippageTolerance,inAmAssetAmt,inAmAssetId,inPrAssetAmt,inPrAssetId,userAddress,isEvaluate,emitLp) = {
323323 let cfg = getPoolConfig()
324324 let lpAssetId = fromBase58String(cfg[idxPoolLPAssetId])
325325 let amAssetIdStr = cfg[idxAmtAssetId]
326326 let prAssetIdStr = cfg[idxPriceAssetId]
327327 let iAmtAssetId = cfg[idxIAmtAssetId]
328328 let iPriceAssetId = cfg[idxIPriceAssetId]
329329 let amtAssetDcm = parseIntValue(cfg[idxAmtAssetDcm])
330330 let priceAssetDcm = parseIntValue(cfg[idxPriceAssetDcm])
331331 let poolStatus = cfg[idxPoolStatus]
332332 let lpEmission = valueOrErrorMessage(assetInfo(lpAssetId), (("Asset " + toBase58String(lpAssetId)) + " doesn't exist")).quantity
333333 let inAmAssetIdStr = toBase58String(valueOrElse(inAmAssetId, fromBase58String("WAVES")))
334334 let inPrAssetIdStr = toBase58String(valueOrElse(inPrAssetId, fromBase58String("WAVES")))
335335 if (if ((amAssetIdStr != inAmAssetIdStr))
336336 then true
337337 else (prAssetIdStr != inPrAssetIdStr))
338338 then throw("Invalid amt or price asset passed.")
339339 else {
340340 let amBalance = if (isEvaluate)
341341 then getAccBalance(amAssetIdStr)
342342 else (getAccBalance(amAssetIdStr) - inAmAssetAmt)
343343 let prBalance = if (isEvaluate)
344344 then getAccBalance(prAssetIdStr)
345345 else (getAccBalance(prAssetIdStr) - inPrAssetAmt)
346346 let inAmAssetAmtX18 = toX18(inAmAssetAmt, amtAssetDcm)
347347 let inPrAssetAmtX18 = toX18(inPrAssetAmt, priceAssetDcm)
348348 let userPriceX18 = calcPriceBigInt(inPrAssetAmtX18, inAmAssetAmtX18)
349349 let amBalanceX18 = toX18(amBalance, amtAssetDcm)
350350 let prBalanceX18 = toX18(prBalance, priceAssetDcm)
351351 let res = if ((lpEmission == 0))
352352 then {
353353 let curPriceX18 = zeroBigInt
354354 let slippageX18 = zeroBigInt
355355 let lpAmtX18 = pow((inAmAssetAmtX18 * inPrAssetAmtX18), 0, toBigInt(5), 1, 0, DOWN)
356356 $Tuple5(fromX18(lpAmtX18, scale8), fromX18(inAmAssetAmtX18, amtAssetDcm), fromX18(inPrAssetAmtX18, priceAssetDcm), calcPriceBigInt((prBalanceX18 + inPrAssetAmtX18), (amBalanceX18 + inAmAssetAmtX18)), slippageX18)
357357 }
358358 else {
359359 let curPriceX18 = calcPriceBigInt(prBalanceX18, amBalanceX18)
360360 let slippageX18 = fraction(absBigInt((curPriceX18 - userPriceX18)), scale18, curPriceX18)
361361 let slippageToleranceX18 = toX18(slippageTolerance, scale8)
362362 if (if ((curPriceX18 != zeroBigInt))
363363 then (slippageX18 > slippageToleranceX18)
364364 else false)
365365 then throw(((("Price slippage " + toString(slippageX18)) + " exceeded the passed limit of ") + toString(slippageToleranceX18)))
366366 else {
367367 let lpEmissionX18 = toX18(lpEmission, scale8)
368368 let prViaAmX18 = fraction(inAmAssetAmtX18, calcPriceBigIntRound(prBalanceX18, amBalanceX18, CEILING), scale18, CEILING)
369369 let amViaPrX18 = fraction(inPrAssetAmtX18, scale18, calcPriceBigIntRound(prBalanceX18, amBalanceX18, FLOOR), CEILING)
370370 let expectedAmts = if ((prViaAmX18 > inPrAssetAmtX18))
371371 then $Tuple2(amViaPrX18, inPrAssetAmtX18)
372372 else $Tuple2(inAmAssetAmtX18, prViaAmX18)
373373 let expAmtAssetAmtX18 = expectedAmts._1
374374 let expPriceAssetAmtX18 = expectedAmts._2
375375 let lpAmtX18 = fraction(lpEmissionX18, expPriceAssetAmtX18, prBalanceX18, FLOOR)
376376 $Tuple5(fromX18Round(lpAmtX18, scale8, FLOOR), fromX18Round(expAmtAssetAmtX18, amtAssetDcm, CEILING), fromX18Round(expPriceAssetAmtX18, priceAssetDcm, CEILING), curPriceX18, slippageX18)
377377 }
378378 }
379379 let calcLpAmt = res._1
380380 let calcAmAssetPmt = res._2
381381 let calcPrAssetPmt = res._3
382382 let curPrice = fromX18(res._4, scale8)
383383 let slippageCalc = fromX18(res._5, scale8)
384384 if ((0 >= calcLpAmt))
385385 then throw("Invalid calculations. LP calculated is less than zero.")
386386 else {
387387 let emitLpAmt = if (!(emitLp))
388388 then 0
389389 else calcLpAmt
390390 let amDiff = (inAmAssetAmt - calcAmAssetPmt)
391391 let prDiff = (inPrAssetAmt - calcPrAssetPmt)
392392 let commonState = [IntegerEntry(pl(), curPrice), IntegerEntry(ph(height, lastBlock.timestamp), curPrice), StringEntry(pau(userAddress, txId58), dataPutActionInfo(calcAmAssetPmt, calcPrAssetPmt, emitLpAmt, curPrice, slippageTolerance, slippageCalc, height, lastBlock.timestamp, amDiff, prDiff))]
393393 $Tuple13(calcLpAmt, emitLpAmt, curPrice, amBalance, prBalance, lpEmission, lpAssetId, poolStatus, commonState, amDiff, prDiff, inAmAssetId, inPrAssetId)
394394 }
395395 }
396396 }
397397
398398
399399 func calcKLp (amountBalance,priceBalance,lpEmission) = {
400400 let amountBalanceX18 = toX18BigInt(amountBalance, toBigInt(cfgAmountAssetDecimals))
401401 let priceBalanceX18 = toX18BigInt(priceBalance, toBigInt(cfgPriceAssetDecimals))
402402 let updatedKLp = fraction(pow((amountBalanceX18 * priceBalanceX18), 0, toBigInt(5), 1, 18, DOWN), big1, lpEmission)
403403 if ((lpEmission == big0))
404404 then big0
405405 else updatedKLp
406406 }
407407
408408
409409 func calcCurrentKLp (amountAssetDelta,priceAssetDelta,lpAssetEmissionDelta) = {
410410 let amountAssetBalance = (toBigInt(getAccBalance(assetIdToString(cfgAmountAssetId))) - amountAssetDelta)
411411 let priceAssetBalance = (toBigInt(getAccBalance(assetIdToString(cfgPriceAssetId))) - priceAssetDelta)
412412 let lpAssetEmission = (toBigInt(value(assetInfo(cfgLpAssetId)).quantity) - lpAssetEmissionDelta)
413413 let currentKLp = calcKLp(amountAssetBalance, priceAssetBalance, lpAssetEmission)
414414 currentKLp
415415 }
416416
417417
418418 func refreshKLpInternal (amountAssetBalanceDelta,priceAssetBalanceDelta,lpAssetEmissionDelta) = {
419419 let amountAssetBalance = (getAccBalance(assetIdToString(cfgAmountAssetId)) + amountAssetBalanceDelta)
420420 let priceAssetBalance = (getAccBalance(assetIdToString(cfgPriceAssetId)) + priceAssetBalanceDelta)
421421 let lpAssetEmission = (value(assetInfo(cfgLpAssetId)).quantity + lpAssetEmissionDelta)
422422 let updatedKLp = calcKLp(toBigInt(amountAssetBalance), toBigInt(priceAssetBalance), toBigInt(lpAssetEmission))
423423 let actions = [IntegerEntry(keyKLpRefreshedHeight, height), StringEntry(keyKLp, toString(updatedKLp))]
424424 $Tuple2(actions, updatedKLp)
425425 }
426426
427427
428428 func validateUpdatedKLp (oldKLp,updatedKLp) = if ((updatedKLp >= oldKLp))
429429 then true
430430 else throwErr(makeString(["updated KLp lower than current KLp", toString(oldKLp), toString(updatedKLp)], " "))
431431
432432
433433 func validateMatcherOrderAllowed (order) = {
434+ let amountAssetBalance = getAccBalance(assetIdToString(cfgAmountAssetId))
435+ let priceAssetBalance = getAccBalance(assetIdToString(cfgPriceAssetId))
434436 let amountAssetAmount = order.amount
435437 let priceAssetAmount = fraction(order.amount, order.price, scale8, FLOOR)
436- let $t02132621538 = if ((order.orderType == Buy))
438+ let $t02148021692 = if ((order.orderType == Buy))
437439 then $Tuple2(amountAssetAmount, -(priceAssetAmount))
438440 else $Tuple2(-(amountAssetAmount), priceAssetAmount)
439- let amountAssetBalanceDelta = $t02132621538._1
440- let priceAssetBalanceDelta = $t02132621538._2
441+ let amountAssetBalanceDelta = $t02148021692._1
442+ let priceAssetBalanceDelta = $t02148021692._2
441443 if (if (if (isGlobalShutdown())
442444 then true
443445 else (cfgPoolStatus == PoolMatcherDisabled))
444446 then true
445447 else (cfgPoolStatus == PoolShutdown))
446448 then throw("Exchange operations disabled")
447449 else if (if ((order.assetPair.amountAsset != cfgAmountAssetId))
448450 then true
449451 else (order.assetPair.priceAsset != cfgPriceAssetId))
450452 then throw("Wrong order assets.")
451453 else {
452454 let kLp = valueOrErrorMessage(parseBigInt(valueOrElse(getString(this, keyKLp), "0")), fmtErr("invalid kLp"))
453- let $t02197822078 = refreshKLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
454- let unusedActions = $t02197822078._1
455- let kLpNew = $t02197822078._2
455+ let $t02213222232 = refreshKLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
456+ let unusedActions = $t02213222232._1
457+ let kLpNew = $t02213222232._2
456458 let isOrderValid = (kLpNew >= kLp)
457- let info = makeString([toString(kLp), toString(kLpNew)], " ")
459+ let info = makeString(["kLp=", toString(kLp), " kLpNew=", toString(kLpNew), " amountAssetBalance=", toString(amountAssetBalance), " priceAssetBalance=", toString(priceAssetBalance), " amountAssetBalanceDelta=", toString(amountAssetBalanceDelta), " priceAssetBalanceDelta=", toString(priceAssetBalanceDelta)], "")
458460 $Tuple2(isOrderValid, info)
459461 }
460462 }
461463
462464
463465 func commonGet (i) = if ((size(i.payments) != 1))
464466 then throw("exactly 1 payment is expected")
465467 else {
466468 let pmt = value(i.payments[0])
467469 let pmtAssetId = value(pmt.assetId)
468470 let pmtAmt = pmt.amount
469471 let res = estimateGetOperation(toBase58String(i.transactionId), toBase58String(pmtAssetId), pmtAmt, i.caller)
470472 let outAmAmt = res._1
471473 let outPrAmt = res._2
472474 let poolStatus = parseIntValue(res._9)
473475 let state = res._10
474476 if (if (isGlobalShutdown())
475477 then true
476478 else (poolStatus == PoolShutdown))
477479 then throw(("Get operation is blocked by admin. Status = " + toString(poolStatus)))
478480 else $Tuple5(outAmAmt, outPrAmt, pmtAmt, pmtAssetId, state)
479481 }
480482
481483
482484 func commonPut (i,slippageTolerance,emitLp) = if ((size(i.payments) != 2))
483485 then throw("exactly 2 payments are expected")
484486 else {
485487 let amAssetPmt = value(i.payments[0])
486488 let prAssetPmt = value(i.payments[1])
487489 let estPut = estimatePutOperation(toBase58String(i.transactionId), slippageTolerance, amAssetPmt.amount, amAssetPmt.assetId, prAssetPmt.amount, prAssetPmt.assetId, toString(i.caller), false, emitLp)
488490 let poolStatus = parseIntValue(estPut._8)
489491 if (if (if (isGlobalShutdown())
490492 then true
491493 else (poolStatus == PoolPutDisabled))
492494 then true
493495 else (poolStatus == PoolShutdown))
494496 then throw(("Put operation is blocked by admin. Status = " + toString(poolStatus)))
495497 else estPut
496498 }
497499
498500
499501 func emit (amount) = {
500502 let emitInv = invoke(factoryContract, "emit", [amount], nil)
501503 if ((emitInv == emitInv))
502504 then {
503505 let emitInvLegacy = match emitInv {
504506 case legacyFactoryContract: Address =>
505507 invoke(legacyFactoryContract, "emit", [amount], nil)
506508 case _ =>
507509 unit
508510 }
509511 if ((emitInvLegacy == emitInvLegacy))
510512 then amount
511513 else throw("Strict value is not equal to itself.")
512514 }
513515 else throw("Strict value is not equal to itself.")
514516 }
515517
516518
517519 func takeFee (amount,fee) = {
518520 let feeAmount = if ((fee == 0))
519521 then 0
520522 else fraction(amount, fee, scale8)
521523 $Tuple2((amount - feeAmount), feeAmount)
522524 }
523525
524526
525527 func calcPutOneToken (paymentAmountRaw,paymentAssetId,userAddress,txId) = {
526528 let isEval = (txId == unit)
527529 let amountBalanceRaw = getAccBalance(assetIdToString(cfgAmountAssetId))
528530 let priceBalanceRaw = getAccBalance(assetIdToString(cfgPriceAssetId))
529531 let paymentInAmountAsset = if ((paymentAssetId == cfgAmountAssetId))
530532 then true
531533 else if ((paymentAssetId == cfgPriceAssetId))
532534 then false
533535 else throwErr("invalid asset")
534- let $t02488525178 = if (isEval)
536+ let $t02531025603 = if (isEval)
535537 then $Tuple2(amountBalanceRaw, priceBalanceRaw)
536538 else if (paymentInAmountAsset)
537539 then $Tuple2((amountBalanceRaw - paymentAmountRaw), priceBalanceRaw)
538540 else $Tuple2(amountBalanceRaw, (priceBalanceRaw - paymentAmountRaw))
539- let amountBalanceOld = $t02488525178._1
540- let priceBalanceOld = $t02488525178._2
541- let $t02518225331 = if (paymentInAmountAsset)
541+ let amountBalanceOld = $t02531025603._1
542+ let priceBalanceOld = $t02531025603._2
543+ let $t02560725756 = if (paymentInAmountAsset)
542544 then $Tuple2(paymentAmountRaw, 0)
543545 else $Tuple2(0, paymentAmountRaw)
544- let amountAssetAmountRaw = $t02518225331._1
545- let priceAssetAmountRaw = $t02518225331._2
546+ let amountAssetAmountRaw = $t02560725756._1
547+ let priceAssetAmountRaw = $t02560725756._2
546548 let amountAssetAmount = takeFee(amountAssetAmountRaw, inFee)._1
547549 let priceAssetAmount = takeFee(priceAssetAmountRaw, inFee)._1
548- let $t02546325527 = takeFee(paymentAmountRaw, inFee)
549- let paymentAmount = $t02546325527._1
550- let feeAmount = $t02546325527._2
550+ let $t02588825952 = takeFee(paymentAmountRaw, inFee)
551+ let paymentAmount = $t02588825952._1
552+ let feeAmount = $t02588825952._2
551553 let amountBalanceNew = (amountBalanceOld + amountAssetAmount)
552554 let priceBalanceNew = (priceBalanceOld + priceAssetAmount)
553555 let priceNewX18 = calcPriceBigInt(toX18(priceBalanceNew, cfgPriceAssetDecimals), toX18(amountBalanceNew, cfgAmountAssetDecimals))
554556 let priceNew = fromX18(priceNewX18, scale8)
555557 let paymentBalance = if (paymentInAmountAsset)
556558 then amountBalanceOld
557559 else priceBalanceOld
558560 let paymentBalanceBigInt = toBigInt(paymentBalance)
559561 let supplyBigInt = toBigInt(valueOrErrorMessage(assetInfo(cfgLpAssetId), (("asset " + toBase58String(cfgLpAssetId)) + " doesn't exist")).quantity)
560562 let chechSupply = if ((supplyBigInt > big0))
561563 then true
562564 else throwErr("initial deposit requires all coins")
563565 if ((chechSupply == chechSupply))
564566 then {
565567 let depositBigInt = toBigInt(paymentAmount)
566568 let issueAmount = max([0, toInt(((supplyBigInt * (sqrtBigInt((scale18 + ((depositBigInt * scale18) / paymentBalanceBigInt)), 18, 18, DOWN) - scale18)) / scale18))])
567569 let commonState = if (isEval)
568570 then nil
569571 else [IntegerEntry(pl(), priceNew), IntegerEntry(ph(height, lastBlock.timestamp), priceNew), StringEntry(pau(toString(value(userAddress)), toBase58String(value(txId))), dataPutActionInfo(amountAssetAmountRaw, priceAssetAmountRaw, issueAmount, priceNew, 0, 0, height, lastBlock.timestamp, 0, 0))]
570572 let priceOldX18 = calcPriceBigInt(toX18(priceBalanceOld, cfgPriceAssetDecimals), toX18(amountBalanceOld, cfgAmountAssetDecimals))
571573 let priceOld = fromX18(priceOldX18, scale8)
572574 let loss = {
573- let $t02720827375 = if (paymentInAmountAsset)
575+ let $t02763327800 = if (paymentInAmountAsset)
574576 then $Tuple2(amountAssetAmountRaw, amountBalanceOld)
575577 else $Tuple2(priceAssetAmountRaw, priceBalanceOld)
576- let amount = $t02720827375._1
577- let balance = $t02720827375._2
578+ let amount = $t02763327800._1
579+ let balance = $t02763327800._2
578580 let issueAmountBoth = toInt(fraction(supplyBigInt, toBigInt((amount / 2)), toBigInt(balance)))
579581 fraction((issueAmount - issueAmountBoth), scale8, issueAmountBoth)
580582 }
581583 $Tuple5(issueAmount, commonState, feeAmount, loss, paymentInAmountAsset)
582584 }
583585 else throw("Strict value is not equal to itself.")
584586 }
585587
586588
587589 func calcGetOneToken (outAssetId,paymentAmount,paymentAssetId,userAddress,txId) = {
588590 let isEval = (txId == unit)
589591 let cfg = getPoolConfig()
590592 let amtAssetDcm = parseIntValue(cfg[idxAmtAssetDcm])
591593 let priceAssetDcm = parseIntValue(cfg[idxPriceAssetDcm])
592594 let checks = [if ((paymentAssetId == cfgLpAssetId))
593595 then true
594596 else throwErr("invalid lp asset")]
595597 if ((checks == checks))
596598 then {
597599 let outInAmountAsset = if ((outAssetId == cfgAmountAssetId))
598600 then true
599601 else if ((outAssetId == cfgPriceAssetId))
600602 then false
601603 else throwErr("invalid asset")
602604 let balanceBigInt = if (outInAmountAsset)
603605 then toBigInt(getAccBalance(assetIdToString(cfgAmountAssetId)))
604606 else toBigInt(getAccBalance(assetIdToString(cfgPriceAssetId)))
605607 let outInAmountAssetDecimals = if (outInAmountAsset)
606608 then amtAssetDcm
607609 else priceAssetDcm
608610 let amBalanceOld = getAccBalance(assetIdToString(cfgAmountAssetId))
609611 let prBalanceOld = getAccBalance(assetIdToString(cfgPriceAssetId))
610612 let outBalance = if (outInAmountAsset)
611613 then amBalanceOld
612614 else prBalanceOld
613615 let outBalanceBigInt = toBigInt(outBalance)
614616 let supplyBigInt = toBigInt(valueOrErrorMessage(assetInfo(cfgLpAssetId), (("asset " + toBase58String(cfgLpAssetId)) + " doesn't exist")).quantity)
615617 let redeemedBigInt = toBigInt(paymentAmount)
616618 let amountRaw = max([0, toInt(((balanceBigInt * (scale18 - pow((scale18 - ((redeemedBigInt * scale18) / supplyBigInt)), 18, big2, 0, 18, DOWN))) / scale18))])
617- let $t02945329509 = takeFee(amountRaw, outFee)
618- let totalAmount = $t02945329509._1
619- let feeAmount = $t02945329509._2
620- let $t02951329739 = if (outInAmountAsset)
619+ let $t02987829934 = takeFee(amountRaw, outFee)
620+ let totalAmount = $t02987829934._1
621+ let feeAmount = $t02987829934._2
622+ let $t02993830164 = if (outInAmountAsset)
621623 then $Tuple4(totalAmount, 0, (amBalanceOld - amountRaw), prBalanceOld)
622624 else $Tuple4(0, totalAmount, amBalanceOld, (prBalanceOld - amountRaw))
623- let outAmAmount = $t02951329739._1
624- let outPrAmount = $t02951329739._2
625- let amBalanceNew = $t02951329739._3
626- let prBalanceNew = $t02951329739._4
625+ let outAmAmount = $t02993830164._1
626+ let outPrAmount = $t02993830164._2
627+ let amBalanceNew = $t02993830164._3
628+ let prBalanceNew = $t02993830164._4
627629 let priceNewX18 = calcPriceBigInt(toX18(prBalanceNew, cfgPriceAssetDecimals), toX18(amBalanceNew, cfgAmountAssetDecimals))
628630 let priceNew = fromX18(priceNewX18, scale8)
629631 let commonState = if (isEval)
630632 then nil
631633 else [StringEntry(gau(toString(value(userAddress)), toBase58String(value(txId))), dataGetActionInfo(outAmAmount, outPrAmount, paymentAmount, priceNew, height, lastBlock.timestamp)), IntegerEntry(pl(), priceNew), IntegerEntry(ph(height, lastBlock.timestamp), priceNew)]
632634 let priceOldX18 = calcPriceBigInt(toX18(prBalanceOld, cfgPriceAssetDecimals), toX18(amBalanceOld, cfgAmountAssetDecimals))
633635 let priceOld = fromX18(priceOldX18, scale8)
634636 let loss = {
635637 let amountBothInPaymentAsset = (toInt(fraction(balanceBigInt, redeemedBigInt, supplyBigInt)) * 2)
636638 fraction((totalAmount - amountBothInPaymentAsset), scale8, amountBothInPaymentAsset)
637639 }
638640 $Tuple5(totalAmount, commonState, feeAmount, loss, outInAmountAsset)
639641 }
640642 else throw("Strict value is not equal to itself.")
641643 }
642644
643645
644646 func managerPublicKeyOrUnit () = match getString(mpk()) {
645647 case s: String =>
646648 fromBase58String(s)
647649 case _: Unit =>
648650 unit
649651 case _ =>
650652 throw("Match error")
651653 }
652654
653655
654656 func pendingManagerPublicKeyOrUnit () = match getString(pmpk()) {
655657 case s: String =>
656658 fromBase58String(s)
657659 case _: Unit =>
658660 unit
659661 case _ =>
660662 throw("Match error")
661663 }
662664
663665
664666 func isManager (i) = match managerPublicKeyOrUnit() {
665667 case pk: ByteVector =>
666668 (i.callerPublicKey == pk)
667669 case _: Unit =>
668670 (i.caller == this)
669671 case _ =>
670672 throw("Match error")
671673 }
672674
673675
674676 func mustManager (i) = {
675677 let pd = throw("Permission denied")
676678 match managerPublicKeyOrUnit() {
677679 case pk: ByteVector =>
678680 if ((i.callerPublicKey == pk))
679681 then true
680682 else pd
681683 case _: Unit =>
682684 if ((i.caller == this))
683685 then true
684686 else pd
685687 case _ =>
686688 throw("Match error")
687689 }
688690 }
689691
690692
691693 @Callable(i)
692694 func setManager (pendingManagerPublicKey) = {
693695 let checkCaller = mustManager(i)
694696 if ((checkCaller == checkCaller))
695697 then {
696698 let checkManagerPublicKey = fromBase58String(pendingManagerPublicKey)
697699 if ((checkManagerPublicKey == checkManagerPublicKey))
698700 then [StringEntry(pmpk(), pendingManagerPublicKey)]
699701 else throw("Strict value is not equal to itself.")
700702 }
701703 else throw("Strict value is not equal to itself.")
702704 }
703705
704706
705707
706708 @Callable(i)
707709 func confirmManager () = {
708710 let pm = pendingManagerPublicKeyOrUnit()
709711 let hasPM = if (isDefined(pm))
710712 then true
711713 else throw("No pending manager")
712714 if ((hasPM == hasPM))
713715 then {
714716 let checkPM = if ((i.callerPublicKey == value(pm)))
715717 then true
716718 else throw("You are not pending manager")
717719 if ((checkPM == checkPM))
718720 then [StringEntry(mpk(), toBase58String(value(pm))), DeleteEntry(pmpk())]
719721 else throw("Strict value is not equal to itself.")
720722 }
721723 else throw("Strict value is not equal to itself.")
722724 }
723725
724726
725727
726728 @Callable(i)
727729 func put (slippageTolerance,shouldAutoStake) = if ((0 > slippageTolerance))
728730 then throw("Invalid slippageTolerance passed")
729731 else {
730732 let estPut = commonPut(i, slippageTolerance, true)
731733 let emitLpAmt = estPut._2
732734 let lpAssetId = estPut._7
733735 let state = estPut._9
734736 let amDiff = estPut._10
735737 let prDiff = estPut._11
736738 let amId = estPut._12
737739 let prId = estPut._13
738740 let amAssetPmt = toBigInt(value(i.payments[0]).amount)
739741 let prAssetPmt = toBigInt(value(i.payments[1]).amount)
740742 let currentKLp = calcCurrentKLp(amAssetPmt, prAssetPmt, toBigInt(0))
741743 if ((currentKLp == currentKLp))
742744 then {
743745 let emitInv = invoke(factoryContract, "emit", [emitLpAmt], nil)
744746 if ((emitInv == emitInv))
745747 then {
746748 let emitInvLegacy = match emitInv {
747749 case legacyFactoryContract: Address =>
748750 invoke(legacyFactoryContract, "emit", [emitLpAmt], nil)
749751 case _ =>
750752 unit
751753 }
752754 if ((emitInvLegacy == emitInvLegacy))
753755 then {
754756 let slippageAInv = if ((amDiff > 0))
755757 then invoke(slippageContract, "put", nil, [AttachedPayment(amId, amDiff)])
756758 else nil
757759 if ((slippageAInv == slippageAInv))
758760 then {
759761 let slippagePInv = if ((prDiff > 0))
760762 then invoke(slippageContract, "put", nil, [AttachedPayment(prId, prDiff)])
761763 else nil
762764 if ((slippagePInv == slippagePInv))
763765 then {
764766 let lpTransfer = if (shouldAutoStake)
765767 then {
766768 let slpStakeInv = invoke(stakingContract, "stake", nil, [AttachedPayment(lpAssetId, emitLpAmt)])
767769 if ((slpStakeInv == slpStakeInv))
768770 then nil
769771 else throw("Strict value is not equal to itself.")
770772 }
771773 else [ScriptTransfer(i.caller, emitLpAmt, lpAssetId)]
772- let $t03426734729 = refreshKLpInternal(0, 0, 0)
773- if (($t03426734729 == $t03426734729))
774+ let $t03469235154 = refreshKLpInternal(0, 0, 0)
775+ if (($t03469235154 == $t03469235154))
774776 then {
775- let updatedKLp = $t03426734729._2
776- let refreshKLpActions = $t03426734729._1
777+ let updatedKLp = $t03469235154._2
778+ let refreshKLpActions = $t03469235154._1
777779 let isUpdatedKLpValid = validateUpdatedKLp(currentKLp, updatedKLp)
778780 if ((isUpdatedKLpValid == isUpdatedKLpValid))
779781 then ((state ++ lpTransfer) ++ refreshKLpActions)
780782 else throw("Strict value is not equal to itself.")
781783 }
782784 else throw("Strict value is not equal to itself.")
783785 }
784786 else throw("Strict value is not equal to itself.")
785787 }
786788 else throw("Strict value is not equal to itself.")
787789 }
788790 else throw("Strict value is not equal to itself.")
789791 }
790792 else throw("Strict value is not equal to itself.")
791793 }
792794 else throw("Strict value is not equal to itself.")
793795 }
794796
795797
796798
797799 @Callable(i)
798800 func putForFree (maxSlippage) = if ((0 > maxSlippage))
799801 then throw("Invalid value passed")
800802 else {
801803 let estPut = commonPut(i, maxSlippage, false)
802804 let state = estPut._9
803805 let amAssetPmt = toBigInt(value(i.payments[0]).amount)
804806 let prAssetPmt = toBigInt(value(i.payments[1]).amount)
805807 let currentKLp = calcCurrentKLp(amAssetPmt, prAssetPmt, toBigInt(0))
806808 if ((currentKLp == currentKLp))
807809 then {
808- let $t03529135356 = refreshKLpInternal(0, 0, 0)
809- let refreshKLpActions = $t03529135356._1
810- let updatedKLp = $t03529135356._2
810+ let $t03571635781 = refreshKLpInternal(0, 0, 0)
811+ let refreshKLpActions = $t03571635781._1
812+ let updatedKLp = $t03571635781._2
811813 let isUpdatedKLpValid = validateUpdatedKLp(currentKLp, updatedKLp)
812814 if ((isUpdatedKLpValid == isUpdatedKLpValid))
813815 then (state ++ refreshKLpActions)
814816 else throw("Strict value is not equal to itself.")
815817 }
816818 else throw("Strict value is not equal to itself.")
817819 }
818820
819821
820822
821823 @Callable(i)
822824 func putOneTkn (minOutAmount,autoStake) = {
823825 let isPoolOneTokenOperationsDisabled = {
824826 let @ = invoke(factoryContract, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
825827 if ($isInstanceOf(@, "Boolean"))
826828 then @
827829 else throw(($getType(@) + " couldn't be cast to Boolean"))
828830 }
829831 let isPutDisabled = if (if (if (isGlobalShutdown())
830832 then true
831833 else (cfgPoolStatus == PoolPutDisabled))
832834 then true
833835 else (cfgPoolStatus == PoolShutdown))
834836 then true
835837 else isPoolOneTokenOperationsDisabled
836838 let checks = [if (if (!(isPutDisabled))
837839 then true
838840 else isManager(i))
839841 then true
840842 else throwErr("put operation is blocked by admin"), if ((size(i.payments) == 1))
841843 then true
842844 else throwErr("exactly 1 payment are expected")]
843845 if ((checks == checks))
844846 then {
845847 let payment = i.payments[0]
846848 let paymentAssetId = payment.assetId
847849 let paymentAmountRaw = payment.amount
848850 let currentKLp = if ((paymentAssetId == cfgAmountAssetId))
849851 then calcCurrentKLp(toBigInt(paymentAmountRaw), toBigInt(0), toBigInt(0))
850852 else if ((paymentAssetId == cfgPriceAssetId))
851853 then calcCurrentKLp(toBigInt(0), toBigInt(paymentAmountRaw), toBigInt(0))
852854 else throwErr("payment asset is not supported")
853855 if ((currentKLp == currentKLp))
854856 then {
855857 let userAddress = i.caller
856858 let txId = i.transactionId
857- let $t03654436696 = calcPutOneToken(paymentAmountRaw, paymentAssetId, userAddress, txId)
858- if (($t03654436696 == $t03654436696))
859+ let $t03696937121 = calcPutOneToken(paymentAmountRaw, paymentAssetId, userAddress, txId)
860+ if (($t03696937121 == $t03696937121))
859861 then {
860- let paymentInAmountAsset = $t03654436696._5
861- let bonus = $t03654436696._4
862- let feeAmount = $t03654436696._3
863- let commonState = $t03654436696._2
864- let emitAmountEstimated = $t03654436696._1
862+ let paymentInAmountAsset = $t03696937121._5
863+ let bonus = $t03696937121._4
864+ let feeAmount = $t03696937121._3
865+ let commonState = $t03696937121._2
866+ let emitAmountEstimated = $t03696937121._1
865867 let emitAmount = if (if ((minOutAmount > 0))
866868 then (minOutAmount > emitAmountEstimated)
867869 else false)
868870 then throwErr(makeString(["amount to receive is less than ", toString(minOutAmount)], ""))
869871 else emitAmountEstimated
870872 let emitInv = emit(emitAmount)
871873 if ((emitInv == emitInv))
872874 then {
873875 let lpTransfer = if (autoStake)
874876 then {
875877 let stakeInv = invoke(stakingContract, "stake", nil, [AttachedPayment(cfgLpAssetId, emitAmount)])
876878 if ((stakeInv == stakeInv))
877879 then nil
878880 else throw("Strict value is not equal to itself.")
879881 }
880882 else [ScriptTransfer(i.caller, emitAmount, cfgLpAssetId)]
881883 let sendFee = if ((feeAmount > 0))
882884 then [ScriptTransfer(feeCollectorAddress, feeAmount, paymentAssetId)]
883885 else nil
884- let $t03728237479 = if ((this == feeCollectorAddress))
886+ let $t03770737904 = if ((this == feeCollectorAddress))
885887 then $Tuple2(0, 0)
886888 else if (paymentInAmountAsset)
887889 then $Tuple2(-(feeAmount), 0)
888890 else $Tuple2(0, -(feeAmount))
889- let amountAssetBalanceDelta = $t03728237479._1
890- let priceAssetBalanceDelta = $t03728237479._2
891- let $t03748237590 = refreshKLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
892- let refreshKLpActions = $t03748237590._1
893- let updatedKLp = $t03748237590._2
891+ let amountAssetBalanceDelta = $t03770737904._1
892+ let priceAssetBalanceDelta = $t03770737904._2
893+ let $t03790738015 = refreshKLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
894+ let refreshKLpActions = $t03790738015._1
895+ let updatedKLp = $t03790738015._2
894896 let kLp = value(getString(keyKLp))
895897 let isUpdatedKLpValid = validateUpdatedKLp(currentKLp, updatedKLp)
896898 if ((isUpdatedKLpValid == isUpdatedKLpValid))
897899 then $Tuple2((((commonState ++ lpTransfer) ++ sendFee) ++ refreshKLpActions), emitAmount)
898900 else throw("Strict value is not equal to itself.")
899901 }
900902 else throw("Strict value is not equal to itself.")
901903 }
902904 else throw("Strict value is not equal to itself.")
903905 }
904906 else throw("Strict value is not equal to itself.")
905907 }
906908 else throw("Strict value is not equal to itself.")
907909 }
908910
909911
910912
911913 @Callable(i)
912914 func putOneTknREADONLY (paymentAssetId,paymentAmountRaw) = {
913- let $t03789638053 = calcPutOneToken(paymentAmountRaw, parseAssetId(paymentAssetId), unit, unit)
914- let emitAmountEstimated = $t03789638053._1
915- let commonState = $t03789638053._2
916- let feeAmount = $t03789638053._3
917- let bonus = $t03789638053._4
918- let paymentInAmountAsset = $t03789638053._5
915+ let $t03832138478 = calcPutOneToken(paymentAmountRaw, parseAssetId(paymentAssetId), unit, unit)
916+ let emitAmountEstimated = $t03832138478._1
917+ let commonState = $t03832138478._2
918+ let feeAmount = $t03832138478._3
919+ let bonus = $t03832138478._4
920+ let paymentInAmountAsset = $t03832138478._5
919921 $Tuple2(nil, $Tuple3(emitAmountEstimated, feeAmount, bonus))
920922 }
921923
922924
923925
924926 @Callable(i)
925927 func getOneTkn (outAssetIdStr,minOutAmount) = {
926928 let isPoolOneTokenOperationsDisabled = {
927929 let @ = invoke(factoryContract, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
928930 if ($isInstanceOf(@, "Boolean"))
929931 then @
930932 else throw(($getType(@) + " couldn't be cast to Boolean"))
931933 }
932934 let isGetDisabled = if (if (isGlobalShutdown())
933935 then true
934936 else (cfgPoolStatus == PoolShutdown))
935937 then true
936938 else isPoolOneTokenOperationsDisabled
937939 let checks = [if (if (!(isGetDisabled))
938940 then true
939941 else isManager(i))
940942 then true
941943 else throwErr("get operation is blocked by admin"), if ((size(i.payments) == 1))
942944 then true
943945 else throwErr("exactly 1 payment are expected")]
944946 if ((checks == checks))
945947 then {
946948 let outAssetId = parseAssetId(outAssetIdStr)
947949 let payment = i.payments[0]
948950 let paymentAssetId = payment.assetId
949951 let paymentAmount = payment.amount
950952 let currentKLp = calcCurrentKLp(toBigInt(0), toBigInt(0), toBigInt(0))
951953 if ((currentKLp == currentKLp))
952954 then {
953955 let userAddress = i.caller
954956 let txId = i.transactionId
955- let $t03893839091 = calcGetOneToken(outAssetId, paymentAmount, paymentAssetId, userAddress, txId)
956- if (($t03893839091 == $t03893839091))
957+ let $t03936339516 = calcGetOneToken(outAssetId, paymentAmount, paymentAssetId, userAddress, txId)
958+ if (($t03936339516 == $t03936339516))
957959 then {
958- let outInAmountAsset = $t03893839091._5
959- let bonus = $t03893839091._4
960- let feeAmount = $t03893839091._3
961- let commonState = $t03893839091._2
962- let amountEstimated = $t03893839091._1
960+ let outInAmountAsset = $t03936339516._5
961+ let bonus = $t03936339516._4
962+ let feeAmount = $t03936339516._3
963+ let commonState = $t03936339516._2
964+ let amountEstimated = $t03936339516._1
963965 let amount = if (if ((minOutAmount > 0))
964966 then (minOutAmount > amountEstimated)
965967 else false)
966968 then throwErr(makeString(["amount to receive is less than ", toString(minOutAmount)], ""))
967969 else amountEstimated
968970 let burnInv = invoke(factoryContract, "burn", [paymentAmount], [AttachedPayment(paymentAssetId, paymentAmount)])
969971 if ((burnInv == burnInv))
970972 then {
971973 let assetTransfer = [ScriptTransfer(userAddress, amount, outAssetId)]
972974 let sendFee = if ((feeAmount > 0))
973975 then [ScriptTransfer(feeCollectorAddress, feeAmount, outAssetId)]
974976 else nil
975- let $t03959139838 = {
977+ let $t04001640263 = {
976978 let feeAmountForCalc = if ((this == feeCollectorAddress))
977979 then 0
978980 else feeAmount
979981 if (outInAmountAsset)
980982 then $Tuple2(-((amount + feeAmountForCalc)), 0)
981983 else $Tuple2(0, -((amount + feeAmountForCalc)))
982984 }
983- let amountAssetBalanceDelta = $t03959139838._1
984- let priceAssetBalanceDelta = $t03959139838._2
985- let $t03984139949 = refreshKLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
986- let refreshKLpActions = $t03984139949._1
987- let updatedKLp = $t03984139949._2
985+ let amountAssetBalanceDelta = $t04001640263._1
986+ let priceAssetBalanceDelta = $t04001640263._2
987+ let $t04026640374 = refreshKLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
988+ let refreshKLpActions = $t04026640374._1
989+ let updatedKLp = $t04026640374._2
988990 let isUpdatedKLpValid = validateUpdatedKLp(currentKLp, updatedKLp)
989991 if ((isUpdatedKLpValid == isUpdatedKLpValid))
990992 then $Tuple2((((commonState ++ assetTransfer) ++ sendFee) ++ refreshKLpActions), amount)
991993 else throw("Strict value is not equal to itself.")
992994 }
993995 else throw("Strict value is not equal to itself.")
994996 }
995997 else throw("Strict value is not equal to itself.")
996998 }
997999 else throw("Strict value is not equal to itself.")
9981000 }
9991001 else throw("Strict value is not equal to itself.")
10001002 }
10011003
10021004
10031005
10041006 @Callable(i)
10051007 func getOneTknREADONLY (outAssetId,paymentAmount) = {
1006- let $t04020640362 = calcGetOneToken(parseAssetId(outAssetId), paymentAmount, cfgLpAssetId, unit, unit)
1007- let amountEstimated = $t04020640362._1
1008- let commonState = $t04020640362._2
1009- let feeAmount = $t04020640362._3
1010- let bonus = $t04020640362._4
1011- let outInAmountAsset = $t04020640362._5
1008+ let $t04063140787 = calcGetOneToken(parseAssetId(outAssetId), paymentAmount, cfgLpAssetId, unit, unit)
1009+ let amountEstimated = $t04063140787._1
1010+ let commonState = $t04063140787._2
1011+ let feeAmount = $t04063140787._3
1012+ let bonus = $t04063140787._4
1013+ let outInAmountAsset = $t04063140787._5
10121014 $Tuple2(nil, $Tuple3(amountEstimated, feeAmount, bonus))
10131015 }
10141016
10151017
10161018
10171019 @Callable(i)
10181020 func unstakeAndGetOneTkn (unstakeAmount,outAssetIdStr,minOutAmount) = {
10191021 let isPoolOneTokenOperationsDisabled = {
10201022 let @ = invoke(factoryContract, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
10211023 if ($isInstanceOf(@, "Boolean"))
10221024 then @
10231025 else throw(($getType(@) + " couldn't be cast to Boolean"))
10241026 }
10251027 let isGetDisabled = if (if (isGlobalShutdown())
10261028 then true
10271029 else (cfgPoolStatus == PoolShutdown))
10281030 then true
10291031 else isPoolOneTokenOperationsDisabled
10301032 let checks = [if (if (!(isGetDisabled))
10311033 then true
10321034 else isManager(i))
10331035 then true
10341036 else throwErr("get operation is blocked by admin"), if ((size(i.payments) == 0))
10351037 then true
10361038 else throwErr("no payments are expected")]
10371039 if ((checks == checks))
10381040 then {
10391041 let outAssetId = parseAssetId(outAssetIdStr)
10401042 let userAddress = i.caller
10411043 let txId = i.transactionId
10421044 let currentKLp = calcCurrentKLp(toBigInt(0), toBigInt(0), toBigInt(0))
10431045 if ((currentKLp == currentKLp))
10441046 then {
10451047 let unstakeInv = invoke(stakingContract, "unstake", [toBase58String(cfgLpAssetId), unstakeAmount], nil)
10461048 if ((unstakeInv == unstakeInv))
10471049 then {
1048- let $t04126741418 = calcGetOneToken(outAssetId, unstakeAmount, cfgLpAssetId, userAddress, txId)
1049- if (($t04126741418 == $t04126741418))
1050+ let $t04169241843 = calcGetOneToken(outAssetId, unstakeAmount, cfgLpAssetId, userAddress, txId)
1051+ if (($t04169241843 == $t04169241843))
10501052 then {
1051- let outInAmountAsset = $t04126741418._5
1052- let bonus = $t04126741418._4
1053- let feeAmount = $t04126741418._3
1054- let commonState = $t04126741418._2
1055- let amountEstimated = $t04126741418._1
1053+ let outInAmountAsset = $t04169241843._5
1054+ let bonus = $t04169241843._4
1055+ let feeAmount = $t04169241843._3
1056+ let commonState = $t04169241843._2
1057+ let amountEstimated = $t04169241843._1
10561058 let amount = if (if ((minOutAmount > 0))
10571059 then (minOutAmount > amountEstimated)
10581060 else false)
10591061 then throwErr(makeString(["amount to receive is less than ", toString(minOutAmount)], ""))
10601062 else amountEstimated
10611063 let burnInv = invoke(factoryContract, "burn", [unstakeAmount], [AttachedPayment(cfgLpAssetId, unstakeAmount)])
10621064 if ((burnInv == burnInv))
10631065 then {
10641066 let assetTransfer = [ScriptTransfer(i.caller, amount, outAssetId)]
10651067 let sendFee = if ((feeAmount > 0))
10661068 then [ScriptTransfer(feeCollectorAddress, feeAmount, outAssetId)]
10671069 else nil
1068- let $t04191342160 = {
1070+ let $t04233842585 = {
10691071 let feeAmountForCalc = if ((this == feeCollectorAddress))
10701072 then 0
10711073 else feeAmount
10721074 if (outInAmountAsset)
10731075 then $Tuple2(-((amount + feeAmountForCalc)), 0)
10741076 else $Tuple2(0, -((amount + feeAmountForCalc)))
10751077 }
1076- let amountAssetBalanceDelta = $t04191342160._1
1077- let priceAssetBalanceDelta = $t04191342160._2
1078- let $t04216342271 = refreshKLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
1079- let refreshKLpActions = $t04216342271._1
1080- let updatedKLp = $t04216342271._2
1078+ let amountAssetBalanceDelta = $t04233842585._1
1079+ let priceAssetBalanceDelta = $t04233842585._2
1080+ let $t04258842696 = refreshKLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
1081+ let refreshKLpActions = $t04258842696._1
1082+ let updatedKLp = $t04258842696._2
10811083 let isUpdatedKLpValid = validateUpdatedKLp(currentKLp, updatedKLp)
10821084 if ((isUpdatedKLpValid == isUpdatedKLpValid))
10831085 then $Tuple2((((commonState ++ assetTransfer) ++ sendFee) ++ refreshKLpActions), amount)
10841086 else throw("Strict value is not equal to itself.")
10851087 }
10861088 else throw("Strict value is not equal to itself.")
10871089 }
10881090 else throw("Strict value is not equal to itself.")
10891091 }
10901092 else throw("Strict value is not equal to itself.")
10911093 }
10921094 else throw("Strict value is not equal to itself.")
10931095 }
10941096 else throw("Strict value is not equal to itself.")
10951097 }
10961098
10971099
10981100
10991101 @Callable(i)
11001102 func get () = {
11011103 let res = commonGet(i)
11021104 let outAmtAmt = res._1
11031105 let outPrAmt = res._2
11041106 let pmtAmt = res._3
11051107 let pmtAssetId = res._4
11061108 let state = res._5
11071109 let currentKLp = calcCurrentKLp(toBigInt(0), toBigInt(0), toBigInt(0))
11081110 if ((currentKLp == currentKLp))
11091111 then {
11101112 let burnLPAssetOnFactory = invoke(factoryContract, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
11111113 if ((burnLPAssetOnFactory == burnLPAssetOnFactory))
11121114 then {
1113- let $t04321743299 = refreshKLpInternal(-(outAmtAmt), -(outPrAmt), 0)
1114- let refreshKLpActions = $t04321743299._1
1115- let updatedKLp = $t04321743299._2
1115+ let $t04364243724 = refreshKLpInternal(-(outAmtAmt), -(outPrAmt), 0)
1116+ let refreshKLpActions = $t04364243724._1
1117+ let updatedKLp = $t04364243724._2
11161118 let isUpdatedKLpValid = validateUpdatedKLp(currentKLp, updatedKLp)
11171119 if ((isUpdatedKLpValid == isUpdatedKLpValid))
11181120 then (state ++ refreshKLpActions)
11191121 else throw("Strict value is not equal to itself.")
11201122 }
11211123 else throw("Strict value is not equal to itself.")
11221124 }
11231125 else throw("Strict value is not equal to itself.")
11241126 }
11251127
11261128
11271129
11281130 @Callable(i)
11291131 func getNoLess (noLessThenAmtAsset,noLessThenPriceAsset) = {
11301132 let res = commonGet(i)
11311133 let outAmAmt = res._1
11321134 let outPrAmt = res._2
11331135 let pmtAmt = res._3
11341136 let pmtAssetId = res._4
11351137 let state = res._5
11361138 if ((noLessThenAmtAsset > outAmAmt))
11371139 then throw(((("noLessThenAmtAsset failed: " + toString(outAmAmt)) + " < ") + toString(noLessThenAmtAsset)))
11381140 else if ((noLessThenPriceAsset > outPrAmt))
11391141 then throw(((("noLessThenPriceAsset failed: " + toString(outPrAmt)) + " < ") + toString(noLessThenPriceAsset)))
11401142 else {
11411143 let currentKLp = calcCurrentKLp(toBigInt(0), toBigInt(0), toBigInt(0))
11421144 if ((currentKLp == currentKLp))
11431145 then {
11441146 let burnLPAssetOnFactory = invoke(factoryContract, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
11451147 if ((burnLPAssetOnFactory == burnLPAssetOnFactory))
11461148 then {
1147- let $t04424844329 = refreshKLpInternal(-(outAmAmt), -(outPrAmt), 0)
1148- let refreshKLpActions = $t04424844329._1
1149- let updatedKLp = $t04424844329._2
1149+ let $t04467344754 = refreshKLpInternal(-(outAmAmt), -(outPrAmt), 0)
1150+ let refreshKLpActions = $t04467344754._1
1151+ let updatedKLp = $t04467344754._2
11501152 let isUpdatedKLpValid = validateUpdatedKLp(currentKLp, updatedKLp)
11511153 if ((isUpdatedKLpValid == isUpdatedKLpValid))
11521154 then (state ++ refreshKLpActions)
11531155 else throw("Strict value is not equal to itself.")
11541156 }
11551157 else throw("Strict value is not equal to itself.")
11561158 }
11571159 else throw("Strict value is not equal to itself.")
11581160 }
11591161 }
11601162
11611163
11621164
11631165 @Callable(i)
11641166 func unstakeAndGet (amount) = {
11651167 let checkPayments = if ((size(i.payments) != 0))
11661168 then throw("No payments are expected")
11671169 else true
11681170 if ((checkPayments == checkPayments))
11691171 then {
11701172 let cfg = getPoolConfig()
11711173 let lpAssetId = fromBase58String(cfg[idxPoolLPAssetId])
11721174 let currentKLp = calcCurrentKLp(toBigInt(0), toBigInt(0), toBigInt(0))
11731175 if ((currentKLp == currentKLp))
11741176 then {
11751177 let unstakeInv = invoke(stakingContract, "unstake", [toBase58String(lpAssetId), amount], nil)
11761178 if ((unstakeInv == unstakeInv))
11771179 then {
11781180 let res = estimateGetOperation(toBase58String(i.transactionId), toBase58String(lpAssetId), amount, i.caller)
11791181 let outAmAmt = res._1
11801182 let outPrAmt = res._2
11811183 let poolStatus = parseIntValue(res._9)
11821184 let state = res._10
11831185 let checkPoolStatus = if (if (isGlobalShutdown())
11841186 then true
11851187 else (poolStatus == PoolShutdown))
11861188 then throw(("Get operation is blocked by admin. Status = " + toString(poolStatus)))
11871189 else true
11881190 if ((checkPoolStatus == checkPoolStatus))
11891191 then {
11901192 let burnLPAssetOnFactory = invoke(factoryContract, "burn", [amount], [AttachedPayment(lpAssetId, amount)])
11911193 if ((burnLPAssetOnFactory == burnLPAssetOnFactory))
11921194 then {
1193- let $t04545545536 = refreshKLpInternal(-(outAmAmt), -(outPrAmt), 0)
1194- let refreshKLpActions = $t04545545536._1
1195- let updatedKLp = $t04545545536._2
1195+ let $t04588045961 = refreshKLpInternal(-(outAmAmt), -(outPrAmt), 0)
1196+ let refreshKLpActions = $t04588045961._1
1197+ let updatedKLp = $t04588045961._2
11961198 let isUpdatedKLpValid = validateUpdatedKLp(currentKLp, updatedKLp)
11971199 if ((isUpdatedKLpValid == isUpdatedKLpValid))
11981200 then (state ++ refreshKLpActions)
11991201 else throw("Strict value is not equal to itself.")
12001202 }
12011203 else throw("Strict value is not equal to itself.")
12021204 }
12031205 else throw("Strict value is not equal to itself.")
12041206 }
12051207 else throw("Strict value is not equal to itself.")
12061208 }
12071209 else throw("Strict value is not equal to itself.")
12081210 }
12091211 else throw("Strict value is not equal to itself.")
12101212 }
12111213
12121214
12131215
12141216 @Callable(i)
12151217 func unstakeAndGetNoLess (unstakeAmount,noLessThenAmountAsset,noLessThenPriceAsset) = {
12161218 let isGetDisabled = if (isGlobalShutdown())
12171219 then true
12181220 else (cfgPoolStatus == PoolShutdown)
12191221 let checks = [if (!(isGetDisabled))
12201222 then true
12211223 else throw("get operation is blocked by admin"), if ((size(i.payments) == 0))
12221224 then true
12231225 else throw("no payments are expected")]
12241226 if ((checks == checks))
12251227 then {
12261228 let currentKLp = calcCurrentKLp(toBigInt(0), toBigInt(0), toBigInt(0))
12271229 if ((currentKLp == currentKLp))
12281230 then {
12291231 let unstakeInv = invoke(stakingContract, "unstake", [toBase58String(cfgLpAssetId), unstakeAmount], nil)
12301232 if ((unstakeInv == unstakeInv))
12311233 then {
12321234 let res = estimateGetOperation(toBase58String(i.transactionId), toBase58String(cfgLpAssetId), unstakeAmount, i.caller)
12331235 let outAmAmt = res._1
12341236 let outPrAmt = res._2
12351237 let state = res._10
12361238 let checkAmounts = [if ((outAmAmt >= noLessThenAmountAsset))
12371239 then true
12381240 else throw(makeString(["amount asset amount to receive is less than ", toString(noLessThenAmountAsset)], "")), if ((outPrAmt >= noLessThenPriceAsset))
12391241 then true
12401242 else throw(makeString(["price asset amount to receive is less than ", toString(noLessThenPriceAsset)], ""))]
12411243 if ((checkAmounts == checkAmounts))
12421244 then {
12431245 let burnLPAssetOnFactory = invoke(factoryContract, "burn", [unstakeAmount], [AttachedPayment(cfgLpAssetId, unstakeAmount)])
12441246 if ((burnLPAssetOnFactory == burnLPAssetOnFactory))
12451247 then {
1246- let $t04683146912 = refreshKLpInternal(-(outAmAmt), -(outPrAmt), 0)
1247- let refreshKLpActions = $t04683146912._1
1248- let updatedKLp = $t04683146912._2
1248+ let $t04725647337 = refreshKLpInternal(-(outAmAmt), -(outPrAmt), 0)
1249+ let refreshKLpActions = $t04725647337._1
1250+ let updatedKLp = $t04725647337._2
12491251 let isUpdatedKLpValid = validateUpdatedKLp(currentKLp, updatedKLp)
12501252 if ((isUpdatedKLpValid == isUpdatedKLpValid))
12511253 then (state ++ refreshKLpActions)
12521254 else throw("Strict value is not equal to itself.")
12531255 }
12541256 else throw("Strict value is not equal to itself.")
12551257 }
12561258 else throw("Strict value is not equal to itself.")
12571259 }
12581260 else throw("Strict value is not equal to itself.")
12591261 }
12601262 else throw("Strict value is not equal to itself.")
12611263 }
12621264 else throw("Strict value is not equal to itself.")
12631265 }
12641266
12651267
12661268
12671269 @Callable(i)
12681270 func activate (amtAssetStr,priceAssetStr) = if ((toString(i.caller) != toString(factoryContract)))
12691271 then throw("permissions denied")
12701272 else $Tuple2([StringEntry(aa(), amtAssetStr), StringEntry(pa(), priceAssetStr)], "success")
12711273
12721274
12731275
12741276 @Callable(i)
12751277 func refreshKLp () = {
12761278 let lastRefreshedBlockHeight = valueOrElse(getInteger(keyKLpRefreshedHeight), 0)
12771279 let checkLastRefreshedBlockHeight = if (((height - lastRefreshedBlockHeight) >= kLpRefreshDelay))
12781280 then unit
12791281 else throwErr(makeString([toString(kLpRefreshDelay), " blocks have not passed since the previous call"], ""))
12801282 if ((checkLastRefreshedBlockHeight == checkLastRefreshedBlockHeight))
12811283 then {
12821284 let kLp = valueOrErrorMessage(parseBigInt(valueOrElse(getString(this, keyKLp), "0")), fmtErr("invalid kLp"))
1283- let $t04809948163 = refreshKLpInternal(0, 0, 0)
1284- let kLpUpdateActions = $t04809948163._1
1285- let updatedKLp = $t04809948163._2
1285+ let $t04852448588 = refreshKLpInternal(0, 0, 0)
1286+ let kLpUpdateActions = $t04852448588._1
1287+ let updatedKLp = $t04852448588._2
12861288 let actions = if ((kLp != updatedKLp))
12871289 then kLpUpdateActions
12881290 else throwErr("nothing to refresh")
12891291 $Tuple2(actions, toString(updatedKLp))
12901292 }
12911293 else throw("Strict value is not equal to itself.")
12921294 }
12931295
12941296
12951297
12961298 @Callable(i)
12971299 func getPoolConfigWrapperREADONLY () = $Tuple2(nil, getPoolConfig())
12981300
12991301
13001302
13011303 @Callable(i)
13021304 func getAccBalanceWrapperREADONLY (assetId) = $Tuple2(nil, getAccBalance(assetId))
13031305
13041306
13051307
13061308 @Callable(i)
13071309 func calcPricesWrapperREADONLY (amAmt,prAmt,lpAmt) = {
13081310 let prices = calcPrices(amAmt, prAmt, lpAmt)
13091311 $Tuple2(nil, [toString(prices[0]), toString(prices[1]), toString(prices[2])])
13101312 }
13111313
13121314
13131315
13141316 @Callable(i)
13151317 func toX18WrapperREADONLY (origVal,origScaleMult) = $Tuple2(nil, toString(toX18(origVal, origScaleMult)))
13161318
13171319
13181320
13191321 @Callable(i)
13201322 func fromX18WrapperREADONLY (val,resultScaleMult) = $Tuple2(nil, fromX18(parseBigIntValue(val), resultScaleMult))
13211323
13221324
13231325
13241326 @Callable(i)
13251327 func calcPriceBigIntWrapperREADONLY (prAmtX18,amAmtX18) = $Tuple2(nil, toString(calcPriceBigInt(parseBigIntValue(prAmtX18), parseBigIntValue(amAmtX18))))
13261328
13271329
13281330
13291331 @Callable(i)
13301332 func estimatePutOperationWrapperREADONLY (txId58,slippageTolerance,inAmAssetAmt,inAmAssetId,inPrAssetAmt,inPrAssetId,userAddress,isEvaluate,emitLp) = $Tuple2(nil, estimatePutOperation(txId58, slippageTolerance, inAmAssetAmt, inAmAssetId, inPrAssetAmt, inPrAssetId, userAddress, isEvaluate, emitLp))
13311333
13321334
13331335
13341336 @Callable(i)
13351337 func estimateGetOperationWrapperREADONLY (txId58,pmtAssetId,pmtLpAmt,userAddress) = {
13361338 let res = estimateGetOperation(txId58, pmtAssetId, pmtLpAmt, addressFromStringValue(userAddress))
13371339 $Tuple2(nil, $Tuple10(res._1, res._2, res._3, res._4, res._5, res._6, res._7, toString(res._8), res._9, res._10))
13381340 }
13391341
13401342
13411343
13421344 @Callable(i)
13431345 func statsREADONLY () = {
13441346 let cfg = getPoolConfig()
13451347 let lpAssetId = fromBase58String(cfg[idxPoolLPAssetId])
13461348 let amtAssetId = cfg[idxAmtAssetId]
13471349 let priceAssetId = cfg[idxPriceAssetId]
13481350 let iAmtAssetId = cfg[idxIAmtAssetId]
13491351 let iPriceAssetId = cfg[idxIPriceAssetId]
13501352 let amtAssetDcm = parseIntValue(cfg[idxAmtAssetDcm])
13511353 let priceAssetDcm = parseIntValue(cfg[idxPriceAssetDcm])
13521354 let poolLPBalance = valueOrErrorMessage(assetInfo(lpAssetId), (("Asset " + toBase58String(lpAssetId)) + " doesn't exist")).quantity
13531355 let accAmtAssetBalance = getAccBalance(amtAssetId)
13541356 let accPriceAssetBalance = getAccBalance(priceAssetId)
13551357 let pricesList = if ((poolLPBalance == 0))
13561358 then [zeroBigInt, zeroBigInt, zeroBigInt]
13571359 else calcPrices(accAmtAssetBalance, accPriceAssetBalance, poolLPBalance)
13581360 let curPrice = 0
13591361 let lpAmtAssetShare = fromX18(pricesList[1], scale8)
13601362 let lpPriceAssetShare = fromX18(pricesList[2], scale8)
13611363 let poolWeight = value(getInteger(factoryContract, keyPoolWeight(toString(this))))
13621364 $Tuple2(nil, makeString(["%d%d%d%d%d%d%d", toString(accAmtAssetBalance), toString(accPriceAssetBalance), toString(poolLPBalance), toString(curPrice), toString(lpAmtAssetShare), toString(lpPriceAssetShare), toString(poolWeight)], SEP))
13631365 }
13641366
13651367
13661368
13671369 @Callable(i)
13681370 func evaluatePutByAmountAssetREADONLY (inAmAssetAmt) = {
13691371 let cfg = getPoolConfig()
13701372 let lpAssetId = fromBase58String(cfg[idxPoolLPAssetId])
13711373 let amAssetIdStr = cfg[idxAmtAssetId]
13721374 let amAssetId = fromBase58String(amAssetIdStr)
13731375 let prAssetIdStr = cfg[idxPriceAssetId]
13741376 let prAssetId = fromBase58String(prAssetIdStr)
13751377 let amtAssetDcm = parseIntValue(cfg[idxAmtAssetDcm])
13761378 let priceAssetDcm = parseIntValue(cfg[idxPriceAssetDcm])
13771379 let poolStatus = cfg[idxPoolStatus]
13781380 let poolLPBalance = valueOrErrorMessage(assetInfo(lpAssetId), (("Asset " + toBase58String(lpAssetId)) + " doesn't exist")).quantity
13791381 let accAmtAssetBalance = getAccBalance(amAssetIdStr)
13801382 let accPriceAssetBalance = getAccBalance(prAssetIdStr)
13811383 let amtAssetAmtX18 = toX18(accAmtAssetBalance, amtAssetDcm)
13821384 let priceAssetAmtX18 = toX18(accPriceAssetBalance, priceAssetDcm)
13831385 let curPriceX18 = if ((poolLPBalance == 0))
13841386 then zeroBigInt
13851387 else calcPriceBigInt(priceAssetAmtX18, amtAssetAmtX18)
13861388 let inAmAssetAmtX18 = toX18(inAmAssetAmt, amtAssetDcm)
13871389 let inPrAssetAmtX18 = fraction(inAmAssetAmtX18, curPriceX18, scale18)
13881390 let inPrAssetAmt = fromX18(inPrAssetAmtX18, priceAssetDcm)
13891391 let estPut = estimatePutOperation("", 500000, inAmAssetAmt, amAssetId, inPrAssetAmt, prAssetId, "", true, false)
13901392 let calcLpAmt = estPut._1
13911393 let curPriceCalc = estPut._3
13921394 let amBalance = estPut._4
13931395 let prBalance = estPut._5
13941396 let lpEmission = estPut._6
13951397 $Tuple2(nil, makeString(["%d%d%d%d%d%d%d%d", toString(calcLpAmt), toString(fromX18(curPriceX18, scale8)), toString(amBalance), toString(prBalance), toString(lpEmission), poolStatus, toString(inAmAssetAmt), toString(inPrAssetAmt)], SEP))
13961398 }
13971399
13981400
13991401
14001402 @Callable(i)
14011403 func evaluatePutByPriceAssetREADONLY (inPrAssetAmt) = {
14021404 let cfg = getPoolConfig()
14031405 let lpAssetId = fromBase58String(cfg[idxPoolLPAssetId])
14041406 let amAssetIdStr = cfg[idxAmtAssetId]
14051407 let amAssetId = fromBase58String(amAssetIdStr)
14061408 let prAssetIdStr = cfg[idxPriceAssetId]
14071409 let prAssetId = fromBase58String(prAssetIdStr)
14081410 let amtAssetDcm = parseIntValue(cfg[idxAmtAssetDcm])
14091411 let priceAssetDcm = parseIntValue(cfg[idxPriceAssetDcm])
14101412 let poolStatus = cfg[idxPoolStatus]
14111413 let poolLPBalance = valueOrErrorMessage(assetInfo(lpAssetId), (("Asset " + toBase58String(lpAssetId)) + " doesn't exist")).quantity
14121414 let amBalanceRaw = getAccBalance(amAssetIdStr)
14131415 let prBalanceRaw = getAccBalance(prAssetIdStr)
14141416 let amBalanceRawX18 = toX18(amBalanceRaw, amtAssetDcm)
14151417 let prBalanceRawX18 = toX18(prBalanceRaw, priceAssetDcm)
14161418 let curPriceX18 = if ((poolLPBalance == 0))
14171419 then zeroBigInt
14181420 else calcPriceBigInt(prBalanceRawX18, amBalanceRawX18)
14191421 let inPrAssetAmtX18 = toX18(inPrAssetAmt, priceAssetDcm)
14201422 let inAmAssetAmtX18 = fraction(inPrAssetAmtX18, scale18, curPriceX18)
14211423 let inAmAssetAmt = fromX18(inAmAssetAmtX18, amtAssetDcm)
14221424 let estPut = estimatePutOperation("", 500000, inAmAssetAmt, amAssetId, inPrAssetAmt, prAssetId, "", true, false)
14231425 let calcLpAmt = estPut._1
14241426 let curPriceCalc = estPut._3
14251427 let amBalance = estPut._4
14261428 let prBalance = estPut._5
14271429 let lpEmission = estPut._6
14281430 $Tuple2(nil, makeString(["%d%d%d%d%d%d%d%d", toString(calcLpAmt), toString(fromX18(curPriceX18, scale8)), toString(amBalance), toString(prBalance), toString(lpEmission), poolStatus, toString(inAmAssetAmt), toString(inPrAssetAmt)], SEP))
14291431 }
14301432
14311433
14321434
14331435 @Callable(i)
14341436 func evaluateGetREADONLY (paymentLpAssetId,paymentLpAmt) = {
14351437 let res = estimateGetOperation("", paymentLpAssetId, paymentLpAmt, this)
14361438 let outAmAmt = res._1
14371439 let outPrAmt = res._2
14381440 let amBalance = res._5
14391441 let prBalance = res._6
14401442 let lpEmission = res._7
14411443 let curPrice = res._8
14421444 let poolStatus = parseIntValue(res._9)
14431445 $Tuple2(nil, makeString(["%d%d%d%d%d%d%d", toString(outAmAmt), toString(outPrAmt), toString(amBalance), toString(prBalance), toString(lpEmission), toString(curPrice), toString(poolStatus)], SEP))
14441446 }
14451447
14461448
14471449 @Verifier(tx)
14481450 func verify () = {
14491451 let targetPublicKey = match managerPublicKeyOrUnit() {
14501452 case pk: ByteVector =>
14511453 pk
14521454 case _: Unit =>
14531455 tx.senderPublicKey
14541456 case _ =>
14551457 throw("Match error")
14561458 }
14571459 match tx {
14581460 case order: Order =>
14591461 let matcherPub = getMatcherPubOrFail()
1460- let $t05682556894 = validateMatcherOrderAllowed(order)
1461- let orderValid = $t05682556894._1
1462- let orderValidInfo = $t05682556894._2
1462+ let $t05725057319 = validateMatcherOrderAllowed(order)
1463+ let orderValid = $t05725057319._1
1464+ let orderValidInfo = $t05725057319._2
14631465 let senderValid = sigVerify(order.bodyBytes, order.proofs[0], order.senderPublicKey)
14641466 let matcherValid = sigVerify(order.bodyBytes, order.proofs[1], matcherPub)
14651467 if (if (if (orderValid)
14661468 then senderValid
14671469 else false)
14681470 then matcherValid
14691471 else false)
14701472 then true
14711473 else throwOrderError(orderValid, orderValidInfo, senderValid, matcherValid)
14721474 case s: SetScriptTransaction =>
14731475 let newHash = blake2b256(value(s.script))
14741476 let allowedHash = fromBase64String(value(getString(factoryContract, keyAllowedLpScriptHash())))
14751477 let currentHash = scriptHash(this)
14761478 if (if ((allowedHash == newHash))
14771479 then (currentHash != newHash)
14781480 else false)
14791481 then true
14801482 else sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey)
14811483 case _ =>
14821484 sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey)
14831485 }
14841486 }
14851487

github/deemru/w8io/026f985 
184.87 ms