tx · FsiYSLSi2LwLFrvsx8cKu4b35Gx4Zz5UowqZA9H4x5xE 3Mqo3c7G5qkBfvMMLhriequKQFofhJSP9ip: -0.06200000 Waves 2024.02.21 15:14 [2985981] smart account 3Mqo3c7G5qkBfvMMLhriequKQFofhJSP9ip > SELF 0.00000000 Waves
{ "type": 13, "id": "FsiYSLSi2LwLFrvsx8cKu4b35Gx4Zz5UowqZA9H4x5xE", "fee": 6200000, "feeAssetId": null, "timestamp": 1708517636604, "version": 2, "chainId": 84, "sender": "3Mqo3c7G5qkBfvMMLhriequKQFofhJSP9ip", "senderPublicKey": "5A4c5wG6NUWakcEewdfBkkZSvSdZRqo9onS5bqQrv3x1", "proofs": [ "jmXPCFSiJ95x42i73gM9vpvCLUavLaTvZAm3ZZpoegGMHLt2eTkkFUgfF3K41dZLrcpnUbVW5Us9F7gHszWCfv9" ], "script": "base64:BgKhAQgCEgASBQoDAQQBEgcKBQEEAQgBEgQKAgEEEgMKAQESBAoCAQQSBAoCCAESBAoCCAESBAoCCAESBQoDAQgBEgASBAoCAQESAwoBARIFCgMBAQESBAoCCAgSABIAEgMKAQgSBQoDAQEBEgQKAgEBEgQKAggBEgQKAggIEgsKCQgBAQIBAggEBBIGCgQICAEIEgASAwoBARIDCgEBEgQKAggBhAEACmxQZGVjaW1hbHMACAAGc2NhbGU4AIDC1y8ADHNjYWxlOEJpZ0ludAkAtgIBAIDC1y8AB3NjYWxlMTgJALYCAQCAgJC7utat8A0ACnplcm9CaWdJbnQJALYCAQAAAARiaWcwCQC2AgEAAAAEYmlnMQkAtgIBAAEABGJpZzIJALYCAQACAAt3YXZlc1N0cmluZwIFV0FWRVMAA1NFUAICX18AClBvb2xBY3RpdmUAAQAPUG9vbFB1dERpc2FibGVkAAIAE1Bvb2xNYXRjaGVyRGlzYWJsZWQAAwAMUG9vbFNodXRkb3duAAQADmlkeFBvb2xBZGRyZXNzAAEADWlkeFBvb2xTdGF0dXMAAgAQaWR4UG9vbExQQXNzZXRJZAADAA1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DAwgFBW9yZGVyCWJvZHlCeXRlcwkAkQMCCAUFb3JkZXIGcHJvb2ZzAAEFCm1hdGNoZXJQdWIDAwMFCm9yZGVyVmFsaWQFC3NlbmRlclZhbGlkBwUMbWF0Y2hlclZhbGlkBwYJAQ90aHJvd09yZGVyRXJyb3IEBQpvcmRlclZhbGlkBQ5vcmRlclZhbGlkSW5mbwULc2VuZGVyVmFsaWQFDG1hdGNoZXJWYWxpZAMJAAECBQckbWF0Y2gwAhRTZXRTY3JpcHRUcmFuc2FjdGlvbgQBcwUHJG1hdGNoMAMJAPQDAwgFAnR4CWJvZHlCeXRlcwkAkQMCCAUCdHgGcHJvb2ZzAAAFD3RhcmdldFB1YmxpY0tleQYEB25ld0hhc2gJAPYDAQkBBXZhbHVlAQgFAXMGc2NyaXB0BAthbGxvd2VkSGFzaAkA2wQBCQEFdmFsdWUBCQCdCAIFD2ZhY3RvcnlDb250cmFjdAkBFmtleUFsbG93ZWRMcFNjcmlwdEhhc2gABAtjdXJyZW50SGFzaAkA8QcBBQR0aGlzAwkAAAIFC2FsbG93ZWRIYXNoBQduZXdIYXNoCQECIT0CBQtjdXJyZW50SGFzaAUHbmV3SGFzaAcJAPQDAwgFAnR4CWJvZHlCeXRlcwkAkQMCCAUCdHgGcHJvb2ZzAAAFD3RhcmdldFB1YmxpY0tlecMZ+sA=", "height": 2985981, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: EcgcLqYpdrg7GknRTtZdXgjntZS8SqgFcdk9aeGHAMeg Next: 838d9aNBMi4kstg36zxLE49tezzDLvMamci9kRLAU3Eb Diff:
Old | New | Differences | |
---|---|---|---|
454 | 454 | let stakingProfitAddress = $t01675516891._7 | |
455 | 455 | if (isLeasable) | |
456 | 456 | then { | |
457 | - | let | |
458 | - | if (( | |
457 | + | let currentStakingAssetBalance = getStakingAssetBalanceOrZero(proxyAssetId) | |
458 | + | if ((currentStakingAssetBalance == currentStakingAssetBalance)) | |
459 | 459 | then { | |
460 | - | let newAdditionalBalance = fraction(leasedRatio, newTotalLeasableBalance, 100) | |
461 | - | if ((newAdditionalBalance == newAdditionalBalance)) | |
460 | + | let currentAdditionalBalance = if ((currentStakingAssetBalance != 0)) | |
461 | + | then getAdditionalBalanceOrZero(assetId) | |
462 | + | else 0 | |
463 | + | if ((currentAdditionalBalance == currentAdditionalBalance)) | |
462 | 464 | then { | |
463 | - | let withdrawAmount = (getAdditionalBalanceOrZero(assetId) - newAdditionalBalance) | |
464 | - | if ((withdrawAmount == withdrawAmount)) | |
465 | - | then if ((0 > withdrawAmount)) | |
466 | - | then deposit(assetId, -(withdrawAmount), proxyAssetId, addressFromStringValue(proxyAddress)) | |
467 | - | else withdraw(assetId, withdrawAmount, proxyAssetId, addressFromStringValue(proxyAddress), proxyRateMul, addressFromStringValue(stakingProfitAddress)) | |
465 | + | let newTotalLeasableBalance = max([0, ((getAccBalance(assetId) - getAmount) - minBalance)]) | |
466 | + | if ((newTotalLeasableBalance == newTotalLeasableBalance)) | |
467 | + | then { | |
468 | + | let newAdditionalBalance = fraction(leasedRatio, newTotalLeasableBalance, 100) | |
469 | + | if ((newAdditionalBalance == newAdditionalBalance)) | |
470 | + | then { | |
471 | + | let withdrawAmount = (currentAdditionalBalance - newAdditionalBalance) | |
472 | + | if ((withdrawAmount == withdrawAmount)) | |
473 | + | then if ((0 > withdrawAmount)) | |
474 | + | then deposit(assetId, -(withdrawAmount), proxyAssetId, addressFromStringValue(proxyAddress)) | |
475 | + | else withdraw(assetId, withdrawAmount, proxyAssetId, addressFromStringValue(proxyAddress), proxyRateMul, addressFromStringValue(stakingProfitAddress)) | |
476 | + | else throw("Strict value is not equal to itself.") | |
477 | + | } | |
478 | + | else throw("Strict value is not equal to itself.") | |
479 | + | } | |
468 | 480 | else throw("Strict value is not equal to itself.") | |
469 | 481 | } | |
470 | 482 | else throw("Strict value is not equal to itself.") | |
664 | 676 | let priceAssetBalance = getAccBalance(assetIdToString(cfgPriceAssetId)) | |
665 | 677 | let amountAssetAmount = order.amount | |
666 | 678 | let priceAssetAmount = fraction(order.amount, order.price, scale8, FLOOR) | |
667 | - | let $ | |
679 | + | let $t02947529687 = if ((order.orderType == Buy)) | |
668 | 680 | then $Tuple2(amountAssetAmount, -(priceAssetAmount)) | |
669 | 681 | else $Tuple2(-(amountAssetAmount), priceAssetAmount) | |
670 | - | let amountAssetBalanceDelta = $ | |
671 | - | let priceAssetBalanceDelta = $ | |
682 | + | let amountAssetBalanceDelta = $t02947529687._1 | |
683 | + | let priceAssetBalanceDelta = $t02947529687._2 | |
672 | 684 | if (if (if (isGlobalShutdown()) | |
673 | 685 | then true | |
674 | 686 | else (cfgPoolStatus == PoolMatcherDisabled)) | |
681 | 693 | then throw("Wrong order assets.") | |
682 | 694 | else { | |
683 | 695 | let kLp = valueOrErrorMessage(parseBigInt(valueOrElse(getString(this, keyKLp), "0")), fmtErr("invalid kLp")) | |
684 | - | let $ | |
685 | - | let unusedActions = $ | |
686 | - | let kLpNew = $ | |
696 | + | let $t03012730227 = refreshKLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0) | |
697 | + | let unusedActions = $t03012730227._1 | |
698 | + | let kLpNew = $t03012730227._2 | |
687 | 699 | let isOrderValid = (kLpNew >= kLp) | |
688 | 700 | let info = makeString(["kLp=", toString(kLp), " kLpNew=", toString(kLpNew), " amountAssetBalance=", toString(amountAssetBalance), " priceAssetBalance=", toString(priceAssetBalance), " amountAssetBalanceDelta=", toString(amountAssetBalanceDelta), " priceAssetBalanceDelta=", toString(priceAssetBalanceDelta), " height=", toString(height)], "") | |
689 | 701 | $Tuple2(isOrderValid, info) | |
766 | 778 | else if ((paymentAssetId == cfgPriceAssetId)) | |
767 | 779 | then false | |
768 | 780 | else throwErr("invalid asset") | |
769 | - | let $ | |
781 | + | let $t03341333706 = if (isEval) | |
770 | 782 | then $Tuple2(amountBalanceRaw, priceBalanceRaw) | |
771 | 783 | else if (paymentInAmountAsset) | |
772 | 784 | then $Tuple2((amountBalanceRaw - paymentAmountRaw), priceBalanceRaw) | |
773 | 785 | else $Tuple2(amountBalanceRaw, (priceBalanceRaw - paymentAmountRaw)) | |
774 | - | let amountBalanceOld = $ | |
775 | - | let priceBalanceOld = $ | |
776 | - | let $ | |
786 | + | let amountBalanceOld = $t03341333706._1 | |
787 | + | let priceBalanceOld = $t03341333706._2 | |
788 | + | let $t03371033859 = if (paymentInAmountAsset) | |
777 | 789 | then $Tuple2(paymentAmountRaw, 0) | |
778 | 790 | else $Tuple2(0, paymentAmountRaw) | |
779 | - | let amountAssetAmountRaw = $ | |
780 | - | let priceAssetAmountRaw = $ | |
791 | + | let amountAssetAmountRaw = $t03371033859._1 | |
792 | + | let priceAssetAmountRaw = $t03371033859._2 | |
781 | 793 | let amountAssetAmount = takeFee(amountAssetAmountRaw, inFee)._1 | |
782 | 794 | let priceAssetAmount = takeFee(priceAssetAmountRaw, inFee)._1 | |
783 | - | let $ | |
784 | - | let paymentAmount = $ | |
785 | - | let feeAmount = $ | |
795 | + | let $t03399134055 = takeFee(paymentAmountRaw, inFee) | |
796 | + | let paymentAmount = $t03399134055._1 | |
797 | + | let feeAmount = $t03399134055._2 | |
786 | 798 | let amountBalanceNew = (amountBalanceOld + amountAssetAmount) | |
787 | 799 | let priceBalanceNew = (priceBalanceOld + priceAssetAmount) | |
788 | 800 | let priceNewX18 = calcPriceBigInt(toX18(priceBalanceNew, cfgPriceAssetDecimals), toX18(amountBalanceNew, cfgAmountAssetDecimals)) | |
805 | 817 | let priceOldX18 = calcPriceBigInt(toX18(priceBalanceOld, cfgPriceAssetDecimals), toX18(amountBalanceOld, cfgAmountAssetDecimals)) | |
806 | 818 | let priceOld = fromX18(priceOldX18, scale8) | |
807 | 819 | let loss = { | |
808 | - | let $ | |
820 | + | let $t03573635903 = if (paymentInAmountAsset) | |
809 | 821 | then $Tuple2(amountAssetAmountRaw, amountBalanceOld) | |
810 | 822 | else $Tuple2(priceAssetAmountRaw, priceBalanceOld) | |
811 | - | let amount = $ | |
812 | - | let balance = $ | |
823 | + | let amount = $t03573635903._1 | |
824 | + | let balance = $t03573635903._2 | |
813 | 825 | let issueAmountBoth = toInt(fraction(supplyBigInt, toBigInt((amount / 2)), toBigInt(balance))) | |
814 | 826 | fraction((issueAmount - issueAmountBoth), scale8, issueAmountBoth) | |
815 | 827 | } | |
849 | 861 | let supplyBigInt = toBigInt(valueOrErrorMessage(assetInfo(cfgLpAssetId), (("asset " + toBase58String(cfgLpAssetId)) + " doesn't exist")).quantity) | |
850 | 862 | let redeemedBigInt = toBigInt(paymentAmount) | |
851 | 863 | let amountRaw = max([0, toInt(((balanceBigInt * (scale18 - pow((scale18 - ((redeemedBigInt * scale18) / supplyBigInt)), 18, big2, 0, 18, DOWN))) / scale18))]) | |
852 | - | let $ | |
853 | - | let totalAmount = $ | |
854 | - | let feeAmount = $ | |
855 | - | let $ | |
864 | + | let $t03798138037 = takeFee(amountRaw, outFee) | |
865 | + | let totalAmount = $t03798138037._1 | |
866 | + | let feeAmount = $t03798138037._2 | |
867 | + | let $t03804138267 = if (outInAmountAsset) | |
856 | 868 | then $Tuple4(totalAmount, 0, (amBalanceOld - amountRaw), prBalanceOld) | |
857 | 869 | else $Tuple4(0, totalAmount, amBalanceOld, (prBalanceOld - amountRaw)) | |
858 | - | let outAmAmount = $ | |
859 | - | let outPrAmount = $ | |
860 | - | let amBalanceNew = $ | |
861 | - | let prBalanceNew = $ | |
870 | + | let outAmAmount = $t03804138267._1 | |
871 | + | let outPrAmount = $t03804138267._2 | |
872 | + | let amBalanceNew = $t03804138267._3 | |
873 | + | let prBalanceNew = $t03804138267._4 | |
862 | 874 | let priceNewX18 = calcPriceBigInt(toX18(prBalanceNew, cfgPriceAssetDecimals), toX18(amBalanceNew, cfgAmountAssetDecimals)) | |
863 | 875 | let priceNew = fromX18(priceNewX18, scale8) | |
864 | 876 | let commonState = if (isEval) | |
923 | 935 | ||
924 | 936 | @Callable(i) | |
925 | 937 | func calculateAmountOutForSwapREADONLY (cleanAmountIn,isReverse,feePoolAmount) = { | |
926 | - | let $ | |
938 | + | let $t04012540430 = if ((isReverse == false)) | |
927 | 939 | then { | |
928 | 940 | let assetOut = getStringOrFail(this, pa()) | |
929 | 941 | let assetIn = getStringOrFail(this, aa()) | |
934 | 946 | let assetIn = getStringOrFail(this, pa()) | |
935 | 947 | $Tuple2(assetOut, assetIn) | |
936 | 948 | } | |
937 | - | let assetOut = $ | |
938 | - | let assetIn = $ | |
949 | + | let assetOut = $t04012540430._1 | |
950 | + | let assetIn = $t04012540430._2 | |
939 | 951 | let poolAssetInBalance = getAccBalance(assetIn) | |
940 | 952 | let poolAssetOutBalance = getAccBalance(assetOut) | |
941 | 953 | let amountOut = fraction(poolAssetOutBalance, cleanAmountIn, (poolAssetInBalance + cleanAmountIn)) | |
1079 | 1091 | else throw("Strict value is not equal to itself.") | |
1080 | 1092 | } | |
1081 | 1093 | else [ScriptTransfer(i.caller, emitLpAmt, lpAssetId)] | |
1082 | - | let $ | |
1083 | - | if (($ | |
1094 | + | let $t04560646068 = refreshKLpInternal(0, 0, 0) | |
1095 | + | if (($t04560646068 == $t04560646068)) | |
1084 | 1096 | then { | |
1085 | - | let updatedKLp = $ | |
1086 | - | let refreshKLpActions = $ | |
1097 | + | let updatedKLp = $t04560646068._2 | |
1098 | + | let refreshKLpActions = $t04560646068._1 | |
1087 | 1099 | let isUpdatedKLpValid = validateUpdatedKLp(currentKLp, updatedKLp) | |
1088 | 1100 | if ((isUpdatedKLpValid == isUpdatedKLpValid)) | |
1089 | 1101 | then { | |
1120 | 1132 | let currentKLp = calcCurrentKLp(amAssetPmt, prAssetPmt, toBigInt(0)) | |
1121 | 1133 | if ((currentKLp == currentKLp)) | |
1122 | 1134 | then { | |
1123 | - | let $ | |
1124 | - | let refreshKLpActions = $ | |
1125 | - | let updatedKLp = $ | |
1135 | + | let $t04668046745 = refreshKLpInternal(0, 0, 0) | |
1136 | + | let refreshKLpActions = $t04668046745._1 | |
1137 | + | let updatedKLp = $t04668046745._2 | |
1126 | 1138 | let isUpdatedKLpValid = validateUpdatedKLp(currentKLp, updatedKLp) | |
1127 | 1139 | if ((isUpdatedKLpValid == isUpdatedKLpValid)) | |
1128 | 1140 | then (state ++ refreshKLpActions) | |
1171 | 1183 | then { | |
1172 | 1184 | let userAddress = i.caller | |
1173 | 1185 | let txId = i.transactionId | |
1174 | - | let $ | |
1175 | - | if (($ | |
1186 | + | let $t04797448126 = calcPutOneToken(paymentAmountRaw, paymentAssetId, userAddress, txId) | |
1187 | + | if (($t04797448126 == $t04797448126)) | |
1176 | 1188 | then { | |
1177 | - | let paymentInAmountAsset = $ | |
1178 | - | let bonus = $ | |
1179 | - | let feeAmount = $ | |
1180 | - | let commonState = $ | |
1181 | - | let emitAmountEstimated = $ | |
1189 | + | let paymentInAmountAsset = $t04797448126._5 | |
1190 | + | let bonus = $t04797448126._4 | |
1191 | + | let feeAmount = $t04797448126._3 | |
1192 | + | let commonState = $t04797448126._2 | |
1193 | + | let emitAmountEstimated = $t04797448126._1 | |
1182 | 1194 | let emitAmount = if (if ((minOutAmount > 0)) | |
1183 | 1195 | then (minOutAmount > emitAmountEstimated) | |
1184 | 1196 | else false) | |
1198 | 1210 | let sendFee = if ((feeAmount > 0)) | |
1199 | 1211 | then [ScriptTransfer(feeCollectorAddress, feeAmount, paymentAssetId)] | |
1200 | 1212 | else nil | |
1201 | - | let $ | |
1213 | + | let $t04871248909 = if ((this == feeCollectorAddress)) | |
1202 | 1214 | then $Tuple2(0, 0) | |
1203 | 1215 | else if (paymentInAmountAsset) | |
1204 | 1216 | then $Tuple2(-(feeAmount), 0) | |
1205 | 1217 | else $Tuple2(0, -(feeAmount)) | |
1206 | - | let amountAssetBalanceDelta = $ | |
1207 | - | let priceAssetBalanceDelta = $ | |
1208 | - | let $ | |
1209 | - | let refreshKLpActions = $ | |
1210 | - | let updatedKLp = $ | |
1218 | + | let amountAssetBalanceDelta = $t04871248909._1 | |
1219 | + | let priceAssetBalanceDelta = $t04871248909._2 | |
1220 | + | let $t04891249020 = refreshKLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0) | |
1221 | + | let refreshKLpActions = $t04891249020._1 | |
1222 | + | let updatedKLp = $t04891249020._2 | |
1211 | 1223 | let kLp = value(getString(keyKLp)) | |
1212 | 1224 | let isUpdatedKLpValid = validateUpdatedKLp(currentKLp, updatedKLp) | |
1213 | 1225 | if ((isUpdatedKLpValid == isUpdatedKLpValid)) | |
1232 | 1244 | ||
1233 | 1245 | @Callable(i) | |
1234 | 1246 | func putOneTknREADONLY (paymentAssetId,paymentAmountRaw) = { | |
1235 | - | let $ | |
1236 | - | let emitAmountEstimated = $ | |
1237 | - | let commonState = $ | |
1238 | - | let feeAmount = $ | |
1239 | - | let bonus = $ | |
1240 | - | let paymentInAmountAsset = $ | |
1247 | + | let $t04937549532 = calcPutOneToken(paymentAmountRaw, parseAssetId(paymentAssetId), unit, unit) | |
1248 | + | let emitAmountEstimated = $t04937549532._1 | |
1249 | + | let commonState = $t04937549532._2 | |
1250 | + | let feeAmount = $t04937549532._3 | |
1251 | + | let bonus = $t04937549532._4 | |
1252 | + | let paymentInAmountAsset = $t04937549532._5 | |
1241 | 1253 | $Tuple2(nil, $Tuple3(emitAmountEstimated, feeAmount, bonus)) | |
1242 | 1254 | } | |
1243 | 1255 | ||
1276 | 1288 | then { | |
1277 | 1289 | let userAddress = i.caller | |
1278 | 1290 | let txId = i.transactionId | |
1279 | - | let $ | |
1280 | - | if (($ | |
1291 | + | let $t05045450607 = calcGetOneToken(outAssetId, paymentAmount, paymentAssetId, userAddress, txId) | |
1292 | + | if (($t05045450607 == $t05045450607)) | |
1281 | 1293 | then { | |
1282 | - | let outInAmountAsset = $ | |
1283 | - | let bonus = $ | |
1284 | - | let feeAmount = $ | |
1285 | - | let commonState = $ | |
1286 | - | let amountEstimated = $ | |
1294 | + | let outInAmountAsset = $t05045450607._5 | |
1295 | + | let bonus = $t05045450607._4 | |
1296 | + | let feeAmount = $t05045450607._3 | |
1297 | + | let commonState = $t05045450607._2 | |
1298 | + | let amountEstimated = $t05045450607._1 | |
1287 | 1299 | let amount = if (if ((minOutAmount > 0)) | |
1288 | 1300 | then (minOutAmount > amountEstimated) | |
1289 | 1301 | else false) | |
1297 | 1309 | let sendFee = if ((feeAmount > 0)) | |
1298 | 1310 | then [ScriptTransfer(feeCollectorAddress, feeAmount, outAssetId)] | |
1299 | 1311 | else nil | |
1300 | - | let $ | |
1312 | + | let $t05127151518 = { | |
1301 | 1313 | let feeAmountForCalc = if ((this == feeCollectorAddress)) | |
1302 | 1314 | then 0 | |
1303 | 1315 | else feeAmount | |
1305 | 1317 | then $Tuple2(-((amount + feeAmountForCalc)), 0) | |
1306 | 1318 | else $Tuple2(0, -((amount + feeAmountForCalc))) | |
1307 | 1319 | } | |
1308 | - | let amountAssetBalanceDelta = $ | |
1309 | - | let priceAssetBalanceDelta = $ | |
1310 | - | let $ | |
1311 | - | let refreshKLpActions = $ | |
1312 | - | let updatedKLp = $ | |
1320 | + | let amountAssetBalanceDelta = $t05127151518._1 | |
1321 | + | let priceAssetBalanceDelta = $t05127151518._2 | |
1322 | + | let $t05152151629 = refreshKLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0) | |
1323 | + | let refreshKLpActions = $t05152151629._1 | |
1324 | + | let updatedKLp = $t05152151629._2 | |
1313 | 1325 | let isUpdatedKLpValid = validateUpdatedKLp(currentKLp, updatedKLp) | |
1314 | 1326 | if ((isUpdatedKLpValid == isUpdatedKLpValid)) | |
1315 | 1327 | then $Tuple2(((((commonState ++ withdrawState) ++ assetTransfer) ++ sendFee) ++ refreshKLpActions), amount) | |
1328 | 1340 | ||
1329 | 1341 | @Callable(i) | |
1330 | 1342 | func getOneTknREADONLY (outAssetId,paymentAmount) = { | |
1331 | - | let $ | |
1332 | - | let amountEstimated = $ | |
1333 | - | let commonState = $ | |
1334 | - | let feeAmount = $ | |
1335 | - | let bonus = $ | |
1336 | - | let outInAmountAsset = $ | |
1343 | + | let $t05190752063 = calcGetOneToken(parseAssetId(outAssetId), paymentAmount, cfgLpAssetId, unit, unit) | |
1344 | + | let amountEstimated = $t05190752063._1 | |
1345 | + | let commonState = $t05190752063._2 | |
1346 | + | let feeAmount = $t05190752063._3 | |
1347 | + | let bonus = $t05190752063._4 | |
1348 | + | let outInAmountAsset = $t05190752063._5 | |
1337 | 1349 | $Tuple2(nil, $Tuple3(amountEstimated, feeAmount, bonus)) | |
1338 | 1350 | } | |
1339 | 1351 | ||
1372 | 1384 | let unstakeInv = invoke(stakingContract, "unstake", [toBase58String(cfgLpAssetId), unstakeAmount], nil) | |
1373 | 1385 | if ((unstakeInv == unstakeInv)) | |
1374 | 1386 | then { | |
1375 | - | let $ | |
1376 | - | if (($ | |
1387 | + | let $t05300553156 = calcGetOneToken(outAssetId, unstakeAmount, cfgLpAssetId, userAddress, txId) | |
1388 | + | if (($t05300553156 == $t05300553156)) | |
1377 | 1389 | then { | |
1378 | - | let outInAmountAsset = $ | |
1379 | - | let bonus = $ | |
1380 | - | let feeAmount = $ | |
1381 | - | let commonState = $ | |
1382 | - | let amountEstimated = $ | |
1390 | + | let outInAmountAsset = $t05300553156._5 | |
1391 | + | let bonus = $t05300553156._4 | |
1392 | + | let feeAmount = $t05300553156._3 | |
1393 | + | let commonState = $t05300553156._2 | |
1394 | + | let amountEstimated = $t05300553156._1 | |
1383 | 1395 | let amount = if (if ((minOutAmount > 0)) | |
1384 | 1396 | then (minOutAmount > amountEstimated) | |
1385 | 1397 | else false) | |
1393 | 1405 | let sendFee = if ((feeAmount > 0)) | |
1394 | 1406 | then [ScriptTransfer(feeCollectorAddress, feeAmount, outAssetId)] | |
1395 | 1407 | else nil | |
1396 | - | let $ | |
1408 | + | let $t05381554062 = { | |
1397 | 1409 | let feeAmountForCalc = if ((this == feeCollectorAddress)) | |
1398 | 1410 | then 0 | |
1399 | 1411 | else feeAmount | |
1401 | 1413 | then $Tuple2(-((amount + feeAmountForCalc)), 0) | |
1402 | 1414 | else $Tuple2(0, -((amount + feeAmountForCalc))) | |
1403 | 1415 | } | |
1404 | - | let amountAssetBalanceDelta = $ | |
1405 | - | let priceAssetBalanceDelta = $ | |
1406 | - | let $ | |
1407 | - | let refreshKLpActions = $ | |
1408 | - | let updatedKLp = $ | |
1416 | + | let amountAssetBalanceDelta = $t05381554062._1 | |
1417 | + | let priceAssetBalanceDelta = $t05381554062._2 | |
1418 | + | let $t05406554173 = refreshKLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0) | |
1419 | + | let refreshKLpActions = $t05406554173._1 | |
1420 | + | let updatedKLp = $t05406554173._2 | |
1409 | 1421 | let isUpdatedKLpValid = validateUpdatedKLp(currentKLp, updatedKLp) | |
1410 | 1422 | if ((isUpdatedKLpValid == isUpdatedKLpValid)) | |
1411 | 1423 | then $Tuple2(((((commonState ++ withdrawState) ++ assetTransfer) ++ sendFee) ++ refreshKLpActions), amount) | |
1439 | 1451 | let burnLPAssetOnFactory = invoke(factoryContract, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)]) | |
1440 | 1452 | if ((burnLPAssetOnFactory == burnLPAssetOnFactory)) | |
1441 | 1453 | then { | |
1442 | - | let $ | |
1443 | - | let refreshKLpActions = $ | |
1444 | - | let updatedKLp = $ | |
1454 | + | let $t05526855349 = refreshKLpInternal(-(outAmAmt), -(outPrAmt), 0) | |
1455 | + | let refreshKLpActions = $t05526855349._1 | |
1456 | + | let updatedKLp = $t05526855349._2 | |
1445 | 1457 | let isUpdatedKLpValid = validateUpdatedKLp(currentKLp, updatedKLp) | |
1446 | 1458 | if ((isUpdatedKLpValid == isUpdatedKLpValid)) | |
1447 | 1459 | then ((withdrawState ++ state) ++ refreshKLpActions) | |
1474 | 1486 | let burnLPAssetOnFactory = invoke(factoryContract, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)]) | |
1475 | 1487 | if ((burnLPAssetOnFactory == burnLPAssetOnFactory)) | |
1476 | 1488 | then { | |
1477 | - | let $ | |
1478 | - | let refreshKLpActions = $ | |
1479 | - | let updatedKLp = $ | |
1489 | + | let $t05644456525 = refreshKLpInternal(-(outAmAmt), -(outPrAmt), 0) | |
1490 | + | let refreshKLpActions = $t05644456525._1 | |
1491 | + | let updatedKLp = $t05644456525._2 | |
1480 | 1492 | let isUpdatedKLpValid = validateUpdatedKLp(currentKLp, updatedKLp) | |
1481 | 1493 | if ((isUpdatedKLpValid == isUpdatedKLpValid)) | |
1482 | 1494 | then ((withdrawState ++ state) ++ refreshKLpActions) | |
1524 | 1536 | let burnLPAssetOnFactory = invoke(factoryContract, "burn", [amount], [AttachedPayment(lpAssetId, amount)]) | |
1525 | 1537 | if ((burnLPAssetOnFactory == burnLPAssetOnFactory)) | |
1526 | 1538 | then { | |
1527 | - | let $ | |
1528 | - | let refreshKLpActions = $ | |
1529 | - | let updatedKLp = $ | |
1539 | + | let $t05787357954 = refreshKLpInternal(-(outAmAmt), -(outPrAmt), 0) | |
1540 | + | let refreshKLpActions = $t05787357954._1 | |
1541 | + | let updatedKLp = $t05787357954._2 | |
1530 | 1542 | let isUpdatedKLpValid = validateUpdatedKLp(currentKLp, updatedKLp) | |
1531 | 1543 | if ((isUpdatedKLpValid == isUpdatedKLpValid)) | |
1532 | 1544 | then ((withdrawState ++ state) ++ refreshKLpActions) | |
1580 | 1592 | let burnLPAssetOnFactory = invoke(factoryContract, "burn", [unstakeAmount], [AttachedPayment(cfgLpAssetId, unstakeAmount)]) | |
1581 | 1593 | if ((burnLPAssetOnFactory == burnLPAssetOnFactory)) | |
1582 | 1594 | then { | |
1583 | - | let $ | |
1584 | - | let refreshKLpActions = $ | |
1585 | - | let updatedKLp = $ | |
1595 | + | let $t05943259513 = refreshKLpInternal(-(outAmAmt), -(outPrAmt), 0) | |
1596 | + | let refreshKLpActions = $t05943259513._1 | |
1597 | + | let updatedKLp = $t05943259513._2 | |
1586 | 1598 | let isUpdatedKLpValid = validateUpdatedKLp(currentKLp, updatedKLp) | |
1587 | 1599 | if ((isUpdatedKLpValid == isUpdatedKLpValid)) | |
1588 | 1600 | then ((withdrawState ++ state) ++ refreshKLpActions) | |
1617 | 1629 | if ((checkLastRefreshedBlockHeight == checkLastRefreshedBlockHeight)) | |
1618 | 1630 | then { | |
1619 | 1631 | let kLp = valueOrErrorMessage(parseBigInt(valueOrElse(getString(this, keyKLp), "0")), fmtErr("invalid kLp")) | |
1620 | - | let $ | |
1621 | - | let kLpUpdateActions = $ | |
1622 | - | let updatedKLp = $ | |
1632 | + | let $t06071760781 = refreshKLpInternal(0, 0, 0) | |
1633 | + | let kLpUpdateActions = $t06071760781._1 | |
1634 | + | let updatedKLp = $t06071760781._2 | |
1623 | 1635 | let actions = if ((kLp != updatedKLp)) | |
1624 | 1636 | then kLpUpdateActions | |
1625 | 1637 | else throwErr("nothing to refresh") | |
1794 | 1806 | match tx { | |
1795 | 1807 | case order: Order => | |
1796 | 1808 | let matcherPub = getMatcherPubOrFail() | |
1797 | - | let $ | |
1809 | + | let $t06944369560 = if (skipOrderValidation()) | |
1798 | 1810 | then $Tuple2(true, "") | |
1799 | 1811 | else validateMatcherOrderAllowed(order) | |
1800 | - | let orderValid = $ | |
1801 | - | let orderValidInfo = $ | |
1812 | + | let orderValid = $t06944369560._1 | |
1813 | + | let orderValidInfo = $t06944369560._2 | |
1802 | 1814 | let senderValid = sigVerify(order.bodyBytes, order.proofs[0], order.senderPublicKey) | |
1803 | 1815 | let matcherValid = sigVerify(order.bodyBytes, order.proofs[1], matcherPub) | |
1804 | 1816 | if (if (if (orderValid) |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let lPdecimals = 8 | |
5 | 5 | ||
6 | 6 | let scale8 = 100000000 | |
7 | 7 | ||
8 | 8 | let scale8BigInt = toBigInt(100000000) | |
9 | 9 | ||
10 | 10 | let scale18 = toBigInt(1000000000000000000) | |
11 | 11 | ||
12 | 12 | let zeroBigInt = toBigInt(0) | |
13 | 13 | ||
14 | 14 | let big0 = toBigInt(0) | |
15 | 15 | ||
16 | 16 | let big1 = toBigInt(1) | |
17 | 17 | ||
18 | 18 | let big2 = toBigInt(2) | |
19 | 19 | ||
20 | 20 | let wavesString = "WAVES" | |
21 | 21 | ||
22 | 22 | let SEP = "__" | |
23 | 23 | ||
24 | 24 | let PoolActive = 1 | |
25 | 25 | ||
26 | 26 | let PoolPutDisabled = 2 | |
27 | 27 | ||
28 | 28 | let PoolMatcherDisabled = 3 | |
29 | 29 | ||
30 | 30 | let PoolShutdown = 4 | |
31 | 31 | ||
32 | 32 | let idxPoolAddress = 1 | |
33 | 33 | ||
34 | 34 | let idxPoolStatus = 2 | |
35 | 35 | ||
36 | 36 | let idxPoolLPAssetId = 3 | |
37 | 37 | ||
38 | 38 | let idxAmtAssetId = 4 | |
39 | 39 | ||
40 | 40 | let idxPriceAssetId = 5 | |
41 | 41 | ||
42 | 42 | let idxAmtAssetDcm = 6 | |
43 | 43 | ||
44 | 44 | let idxPriceAssetDcm = 7 | |
45 | 45 | ||
46 | 46 | let idxIAmtAssetId = 8 | |
47 | 47 | ||
48 | 48 | let idxIPriceAssetId = 9 | |
49 | 49 | ||
50 | 50 | let idxLPAssetDcm = 10 | |
51 | 51 | ||
52 | 52 | let idxPoolAmtAssetAmt = 1 | |
53 | 53 | ||
54 | 54 | let idxPoolPriceAssetAmt = 2 | |
55 | 55 | ||
56 | 56 | let idxPoolLPAssetAmt = 3 | |
57 | 57 | ||
58 | 58 | let idxFactoryStakingContract = 1 | |
59 | 59 | ||
60 | 60 | let idxFactorySlippageContract = 7 | |
61 | 61 | ||
62 | 62 | func toX18 (origVal,origScaleMult) = fraction(toBigInt(origVal), scale18, toBigInt(origScaleMult)) | |
63 | 63 | ||
64 | 64 | ||
65 | 65 | func toX18BigInt (origVal,origScaleMult) = fraction(origVal, scale18, origScaleMult) | |
66 | 66 | ||
67 | 67 | ||
68 | 68 | func fromX18 (val,resultScaleMult) = toInt(fraction(val, toBigInt(resultScaleMult), scale18)) | |
69 | 69 | ||
70 | 70 | ||
71 | 71 | func fromX18Round (val,resultScaleMult,round) = toInt(fraction(val, toBigInt(resultScaleMult), scale18, round)) | |
72 | 72 | ||
73 | 73 | ||
74 | 74 | func toScale (amt,resScale,curScale) = fraction(amt, resScale, curScale) | |
75 | 75 | ||
76 | 76 | ||
77 | 77 | func abs (val) = if ((0 > val)) | |
78 | 78 | then -(val) | |
79 | 79 | else val | |
80 | 80 | ||
81 | 81 | ||
82 | 82 | func absBigInt (val) = if ((zeroBigInt > val)) | |
83 | 83 | then -(val) | |
84 | 84 | else val | |
85 | 85 | ||
86 | 86 | ||
87 | 87 | func swapContract () = "%s__swapContract" | |
88 | 88 | ||
89 | 89 | ||
90 | 90 | func fc () = "%s__factoryContract" | |
91 | 91 | ||
92 | 92 | ||
93 | 93 | func keyManagerPublicKey () = "%s__managerPublicKey" | |
94 | 94 | ||
95 | 95 | ||
96 | 96 | func keyManagerVaultAddress () = "%s__managerVaultAddress" | |
97 | 97 | ||
98 | 98 | ||
99 | 99 | func pl () = "%s%s__price__last" | |
100 | 100 | ||
101 | 101 | ||
102 | 102 | func ph (h,timestamp) = makeString(["%s%s%d%d__price__history", toString(h), toString(timestamp)], SEP) | |
103 | 103 | ||
104 | 104 | ||
105 | 105 | func pau (userAddress,txId) = ((("%s%s%s__P__" + userAddress) + "__") + txId) | |
106 | 106 | ||
107 | 107 | ||
108 | 108 | func gau (userAddress,txId) = ((("%s%s%s__G__" + userAddress) + "__") + txId) | |
109 | 109 | ||
110 | 110 | ||
111 | 111 | func aa () = "%s__amountAsset" | |
112 | 112 | ||
113 | 113 | ||
114 | 114 | func pa () = "%s__priceAsset" | |
115 | 115 | ||
116 | 116 | ||
117 | 117 | let keyFee = "%s__fee" | |
118 | 118 | ||
119 | 119 | let feeDefault = fraction(10, scale8, 10000) | |
120 | 120 | ||
121 | 121 | let fee = valueOrElse(getInteger(this, keyFee), feeDefault) | |
122 | 122 | ||
123 | 123 | let keyKLp = makeString(["%s", "kLp"], SEP) | |
124 | 124 | ||
125 | 125 | let keyKLpRefreshedHeight = makeString(["%s", "kLpRefreshedHeight"], SEP) | |
126 | 126 | ||
127 | 127 | let keyKLpRefreshDelay = makeString(["%s", "refreshKLpDelay"], SEP) | |
128 | 128 | ||
129 | 129 | let kLpRefreshDelayDefault = 30 | |
130 | 130 | ||
131 | 131 | let kLpRefreshDelay = valueOrElse(getInteger(this, keyKLpRefreshDelay), kLpRefreshDelayDefault) | |
132 | 132 | ||
133 | 133 | func keyAdditionalBalance (assetId) = makeString(["%s%s", "stakedBalance", assetId], SEP) | |
134 | 134 | ||
135 | 135 | ||
136 | 136 | func keyStakingAssetBalance (assetId) = makeString(["%s%s", "shareAssetBalance", assetId], SEP) | |
137 | 137 | ||
138 | 138 | ||
139 | 139 | func getAdditionalBalanceOrZero (assetId) = valueOrElse(getInteger(this, keyAdditionalBalance(assetId)), 0) | |
140 | 140 | ||
141 | 141 | ||
142 | 142 | func getStakingAssetBalanceOrZero (assetId) = valueOrElse(getInteger(this, keyStakingAssetBalance(assetId)), 0) | |
143 | 143 | ||
144 | 144 | ||
145 | 145 | func keyFactoryConfig () = "%s__factoryConfig" | |
146 | 146 | ||
147 | 147 | ||
148 | 148 | func keyMatcherPub () = "%s%s__matcher__publicKey" | |
149 | 149 | ||
150 | 150 | ||
151 | 151 | func keyMappingPoolContractAddressToPoolAssets (poolContractAddress) = (("%s%s%s__" + poolContractAddress) + "__mappings__poolContract2LpAsset") | |
152 | 152 | ||
153 | 153 | ||
154 | 154 | func keyPoolConfig (iAmtAsset,iPriceAsset) = (((("%d%d%s__" + iAmtAsset) + "__") + iPriceAsset) + "__config") | |
155 | 155 | ||
156 | 156 | ||
157 | 157 | func keyMappingsBaseAsset2internalId (baseAssetStr) = ("%s%s%s__mappings__baseAsset2internalId__" + baseAssetStr) | |
158 | 158 | ||
159 | 159 | ||
160 | 160 | func keyAllPoolsShutdown () = "%s__shutdown" | |
161 | 161 | ||
162 | 162 | ||
163 | 163 | func keyPoolWeight (contractAddress) = ("%s%s__poolWeight__" + contractAddress) | |
164 | 164 | ||
165 | 165 | ||
166 | 166 | func keyAllowedLpScriptHash () = "%s__allowedLpScriptHash" | |
167 | 167 | ||
168 | 168 | ||
169 | 169 | let keyFeeCollectorAddress = "%s__feeCollectorAddress" | |
170 | 170 | ||
171 | 171 | func keySkipOrderValidation (poolAddress) = ("%s%s__skipOrderValidation__" + poolAddress) | |
172 | 172 | ||
173 | 173 | ||
174 | 174 | func throwOrderError (orderValid,orderValidInfo,senderValid,matcherValid) = throw((((((((("order validation failed: orderValid=" + toString(orderValid)) + " (") + orderValidInfo) + ")") + " senderValid=") + toString(senderValid)) + " matcherValid=") + toString(matcherValid))) | |
175 | 175 | ||
176 | 176 | ||
177 | 177 | func addressFromStringOrThis (addressString) = match addressFromString(addressString) { | |
178 | 178 | case a: Address => | |
179 | 179 | a | |
180 | 180 | case _ => | |
181 | 181 | this | |
182 | 182 | } | |
183 | 183 | ||
184 | 184 | ||
185 | 185 | func getManagerVaultAddressOrThis () = { | |
186 | 186 | let factoryAddress = match getString(fc()) { | |
187 | 187 | case fca: String => | |
188 | 188 | addressFromStringOrThis(fca) | |
189 | 189 | case _ => | |
190 | 190 | this | |
191 | 191 | } | |
192 | 192 | match getString(factoryAddress, keyManagerVaultAddress()) { | |
193 | 193 | case s: String => | |
194 | 194 | addressFromStringOrThis(s) | |
195 | 195 | case _ => | |
196 | 196 | this | |
197 | 197 | } | |
198 | 198 | } | |
199 | 199 | ||
200 | 200 | ||
201 | 201 | func getStringOrFail (address,key) = valueOrErrorMessage(getString(address, key), makeString(["mandatory ", toString(address), ".", key, " is not defined"], "")) | |
202 | 202 | ||
203 | 203 | ||
204 | 204 | func getIntOrFail (address,key) = valueOrErrorMessage(getInteger(address, key), makeString(["mandatory ", toString(address), ".", key, " is not defined"], "")) | |
205 | 205 | ||
206 | 206 | ||
207 | 207 | func throwErr (msg) = throw(makeString(["lp.ride:", msg], " ")) | |
208 | 208 | ||
209 | 209 | ||
210 | 210 | func fmtErr (msg) = makeString(["lp.ride:", msg], " ") | |
211 | 211 | ||
212 | 212 | ||
213 | 213 | let factoryContract = addressFromStringValue(getStringOrFail(this, fc())) | |
214 | 214 | ||
215 | 215 | let feeCollectorAddress = addressFromStringValue(getStringOrFail(factoryContract, keyFeeCollectorAddress)) | |
216 | 216 | ||
217 | 217 | let inFee = { | |
218 | 218 | let @ = invoke(factoryContract, "getInFeeREADONLY", [toString(this)], nil) | |
219 | 219 | if ($isInstanceOf(@, "Int")) | |
220 | 220 | then @ | |
221 | 221 | else throw(($getType(@) + " couldn't be cast to Int")) | |
222 | 222 | } | |
223 | 223 | ||
224 | 224 | let outFee = { | |
225 | 225 | let @ = invoke(factoryContract, "getOutFeeREADONLY", [toString(this)], nil) | |
226 | 226 | if ($isInstanceOf(@, "Int")) | |
227 | 227 | then @ | |
228 | 228 | else throw(($getType(@) + " couldn't be cast to Int")) | |
229 | 229 | } | |
230 | 230 | ||
231 | 231 | func keyAddressWhitelisted (address) = makeString(["%s%s", "whitelisted", toString(address)], SEP) | |
232 | 232 | ||
233 | 233 | ||
234 | 234 | func isAddressWhitelisted (address) = valueOrElse(getBoolean(factoryContract, keyAddressWhitelisted(address)), false) | |
235 | 235 | ||
236 | 236 | ||
237 | 237 | func isGlobalShutdown () = valueOrElse(getBoolean(factoryContract, keyAllPoolsShutdown()), false) | |
238 | 238 | ||
239 | 239 | ||
240 | 240 | func getMatcherPubOrFail () = fromBase58String(getStringOrFail(factoryContract, keyMatcherPub())) | |
241 | 241 | ||
242 | 242 | ||
243 | 243 | func getPoolConfig () = { | |
244 | 244 | let amtAsset = getStringOrFail(this, aa()) | |
245 | 245 | let priceAsset = getStringOrFail(this, pa()) | |
246 | 246 | let iPriceAsset = getIntOrFail(factoryContract, keyMappingsBaseAsset2internalId(priceAsset)) | |
247 | 247 | let iAmtAsset = getIntOrFail(factoryContract, keyMappingsBaseAsset2internalId(amtAsset)) | |
248 | 248 | split(getStringOrFail(factoryContract, keyPoolConfig(toString(iAmtAsset), toString(iPriceAsset))), SEP) | |
249 | 249 | } | |
250 | 250 | ||
251 | 251 | ||
252 | 252 | func parseAssetId (input) = if ((input == wavesString)) | |
253 | 253 | then unit | |
254 | 254 | else fromBase58String(input) | |
255 | 255 | ||
256 | 256 | ||
257 | 257 | func assetIdToString (input) = if ((input == unit)) | |
258 | 258 | then wavesString | |
259 | 259 | else toBase58String(value(input)) | |
260 | 260 | ||
261 | 261 | ||
262 | 262 | 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])) | |
263 | 263 | ||
264 | 264 | ||
265 | 265 | let poolConfigParsed = parsePoolConfig(getPoolConfig()) | |
266 | 266 | ||
267 | 267 | let $t097699935 = poolConfigParsed | |
268 | 268 | ||
269 | 269 | let cfgPoolAddress = $t097699935._1 | |
270 | 270 | ||
271 | 271 | let cfgPoolStatus = $t097699935._2 | |
272 | 272 | ||
273 | 273 | let cfgLpAssetId = $t097699935._3 | |
274 | 274 | ||
275 | 275 | let cfgAmountAssetId = $t097699935._4 | |
276 | 276 | ||
277 | 277 | let cfgPriceAssetId = $t097699935._5 | |
278 | 278 | ||
279 | 279 | let cfgAmountAssetDecimals = $t097699935._6 | |
280 | 280 | ||
281 | 281 | let cfgPriceAssetDecimals = $t097699935._7 | |
282 | 282 | ||
283 | 283 | func getFactoryConfig () = split(getStringOrFail(factoryContract, keyFactoryConfig()), SEP) | |
284 | 284 | ||
285 | 285 | ||
286 | 286 | let stakingContract = valueOrErrorMessage(addressFromString(getFactoryConfig()[idxFactoryStakingContract]), "incorrect staking address") | |
287 | 287 | ||
288 | 288 | let slippageContract = valueOrErrorMessage(addressFromString(getFactoryConfig()[idxFactorySlippageContract]), "incorrect staking address") | |
289 | 289 | ||
290 | 290 | 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) | |
291 | 291 | ||
292 | 292 | ||
293 | 293 | 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) | |
294 | 294 | ||
295 | 295 | ||
296 | 296 | func getAccBalance (assetId) = { | |
297 | 297 | let balanceOnPool = if ((assetId == "WAVES")) | |
298 | 298 | then wavesBalance(this).available | |
299 | 299 | else assetBalance(this, fromBase58String(assetId)) | |
300 | 300 | let totalBalance = ((balanceOnPool + getAdditionalBalanceOrZero(assetId)) - getStakingAssetBalanceOrZero(assetId)) | |
301 | 301 | max([0, totalBalance]) | |
302 | 302 | } | |
303 | 303 | ||
304 | 304 | ||
305 | 305 | func calcPriceBigInt (prAmtX18,amAmtX18) = fraction(prAmtX18, scale18, amAmtX18) | |
306 | 306 | ||
307 | 307 | ||
308 | 308 | func calcPriceBigIntRound (prAmtX18,amAmtX18,round) = fraction(prAmtX18, scale18, amAmtX18, round) | |
309 | 309 | ||
310 | 310 | ||
311 | 311 | func getRate (proxy) = { | |
312 | 312 | let inv = invoke(proxy, "getRate", nil, nil) | |
313 | 313 | if ((inv == inv)) | |
314 | 314 | then match inv { | |
315 | 315 | case r: Int => | |
316 | 316 | r | |
317 | 317 | case _ => | |
318 | 318 | throwErr("proxy.getRate() unexpected value") | |
319 | 319 | } | |
320 | 320 | else throw("Strict value is not equal to itself.") | |
321 | 321 | } | |
322 | 322 | ||
323 | 323 | ||
324 | 324 | func deposit (assetId,amount,stakingAssetId,proxy) = { | |
325 | 325 | let currentAdditionalBalance = getAdditionalBalanceOrZero(assetId) | |
326 | 326 | if ((currentAdditionalBalance == currentAdditionalBalance)) | |
327 | 327 | then { | |
328 | 328 | let currentStakingAssetBalance = getStakingAssetBalanceOrZero(stakingAssetId) | |
329 | 329 | if ((currentStakingAssetBalance == currentStakingAssetBalance)) | |
330 | 330 | then { | |
331 | 331 | let asset = parseAssetId(assetId) | |
332 | 332 | if ((amount > 0)) | |
333 | 333 | then { | |
334 | 334 | let depositInvoke = invoke(proxy, "deposit", nil, [AttachedPayment(asset, amount)]) | |
335 | 335 | if ((depositInvoke == depositInvoke)) | |
336 | 336 | then match depositInvoke { | |
337 | 337 | case receivedStakingAsset: Int => | |
338 | 338 | let newAdditionalBalance = (currentAdditionalBalance + amount) | |
339 | 339 | let newStakingAssetBalance = (currentStakingAssetBalance + receivedStakingAsset) | |
340 | 340 | [IntegerEntry(keyAdditionalBalance(assetId), newAdditionalBalance), IntegerEntry(keyStakingAssetBalance(stakingAssetId), newStakingAssetBalance)] | |
341 | 341 | case _ => | |
342 | 342 | nil | |
343 | 343 | } | |
344 | 344 | else throw("Strict value is not equal to itself.") | |
345 | 345 | } | |
346 | 346 | else nil | |
347 | 347 | } | |
348 | 348 | else throw("Strict value is not equal to itself.") | |
349 | 349 | } | |
350 | 350 | else throw("Strict value is not equal to itself.") | |
351 | 351 | } | |
352 | 352 | ||
353 | 353 | ||
354 | 354 | func withdraw (assetId,amount,stakingAssetId,proxy,proxyRateMul,profitAddress) = { | |
355 | 355 | let currentAdditionalBalance = getAdditionalBalanceOrZero(assetId) | |
356 | 356 | if ((currentAdditionalBalance == currentAdditionalBalance)) | |
357 | 357 | then { | |
358 | 358 | let currentStakingAssetBalance = getStakingAssetBalanceOrZero(stakingAssetId) | |
359 | 359 | if ((currentStakingAssetBalance == currentStakingAssetBalance)) | |
360 | 360 | then { | |
361 | 361 | let currentProxyRate = getRate(proxy) | |
362 | 362 | if ((currentProxyRate == currentProxyRate)) | |
363 | 363 | then { | |
364 | 364 | let oldRate = fraction(proxyRateMul, currentAdditionalBalance, currentStakingAssetBalance) | |
365 | 365 | let stakingAsset = parseAssetId(stakingAssetId) | |
366 | 366 | let oldSendStakingAmount = fraction(proxyRateMul, amount, oldRate) | |
367 | 367 | let sendStakingAssetAmount = fraction(proxyRateMul, amount, currentProxyRate) | |
368 | 368 | let profitAmount = max([0, (oldSendStakingAmount - sendStakingAssetAmount)]) | |
369 | 369 | if ((sendStakingAssetAmount > 0)) | |
370 | 370 | then { | |
371 | 371 | let withdrawInvoke = invoke(proxy, "withdraw", nil, [AttachedPayment(stakingAsset, sendStakingAssetAmount)]) | |
372 | 372 | if ((withdrawInvoke == withdrawInvoke)) | |
373 | 373 | then match withdrawInvoke { | |
374 | 374 | case receivedAssets: Int => | |
375 | 375 | let newAdditionalBalance = (currentAdditionalBalance - receivedAssets) | |
376 | 376 | let newStakingAssetBalance = ((currentStakingAssetBalance - sendStakingAssetAmount) - profitAmount) | |
377 | 377 | [IntegerEntry(keyAdditionalBalance(assetId), newAdditionalBalance), IntegerEntry(keyStakingAssetBalance(stakingAssetId), newStakingAssetBalance), ScriptTransfer(profitAddress, profitAmount, parseAssetId(stakingAssetId))] | |
378 | 378 | case _ => | |
379 | 379 | nil | |
380 | 380 | } | |
381 | 381 | else throw("Strict value is not equal to itself.") | |
382 | 382 | } | |
383 | 383 | else nil | |
384 | 384 | } | |
385 | 385 | else throw("Strict value is not equal to itself.") | |
386 | 386 | } | |
387 | 387 | else throw("Strict value is not equal to itself.") | |
388 | 388 | } | |
389 | 389 | else throw("Strict value is not equal to itself.") | |
390 | 390 | } | |
391 | 391 | ||
392 | 392 | ||
393 | 393 | func getLeaseProxyConfig (assetId) = match invoke(factoryContract, "getPoolLeaseConfigREADONLY", [toString(this), assetId], nil) { | |
394 | 394 | case a: (Boolean, Int, Int, String, String, Int, String) => | |
395 | 395 | a | |
396 | 396 | case _ => | |
397 | 397 | throwErr((("[" + assetId) + "] getLeaseProxyConfig() error")) | |
398 | 398 | } | |
399 | 399 | ||
400 | 400 | ||
401 | 401 | func rebalanceInternal (targetRatio,assetId,stakingAssetId,minBalance,proxy,proxyRateMul,profitAddress) = { | |
402 | 402 | let currentStakingAssetBalance = getStakingAssetBalanceOrZero(stakingAssetId) | |
403 | 403 | if ((currentStakingAssetBalance == currentStakingAssetBalance)) | |
404 | 404 | then { | |
405 | 405 | let currentAdditionalBalance = if ((currentStakingAssetBalance != 0)) | |
406 | 406 | then getAdditionalBalanceOrZero(assetId) | |
407 | 407 | else 0 | |
408 | 408 | if ((currentAdditionalBalance == currentAdditionalBalance)) | |
409 | 409 | then { | |
410 | 410 | let leasableTotalBalance = max([0, (getAccBalance(assetId) - minBalance)]) | |
411 | 411 | let targetAdditionalBalance = fraction(targetRatio, leasableTotalBalance, 100) | |
412 | 412 | let diff = (currentAdditionalBalance - targetAdditionalBalance) | |
413 | 413 | if ((diff == 0)) | |
414 | 414 | then nil | |
415 | 415 | else if ((0 > diff)) | |
416 | 416 | then { | |
417 | 417 | let sendAssetAmount = -(diff) | |
418 | 418 | deposit(assetId, sendAssetAmount, stakingAssetId, proxy) | |
419 | 419 | } | |
420 | 420 | else { | |
421 | 421 | let getAssetAmount = diff | |
422 | 422 | withdraw(assetId, getAssetAmount, stakingAssetId, proxy, proxyRateMul, profitAddress) | |
423 | 423 | } | |
424 | 424 | } | |
425 | 425 | else throw("Strict value is not equal to itself.") | |
426 | 426 | } | |
427 | 427 | else throw("Strict value is not equal to itself.") | |
428 | 428 | } | |
429 | 429 | ||
430 | 430 | ||
431 | 431 | func rebalanceAsset (assetId) = { | |
432 | 432 | let $t01622016356 = getLeaseProxyConfig(assetId) | |
433 | 433 | let isLeasable = $t01622016356._1 | |
434 | 434 | let leasedRatio = $t01622016356._2 | |
435 | 435 | let minBalance = $t01622016356._3 | |
436 | 436 | let proxyAddress = $t01622016356._4 | |
437 | 437 | let proxyAssetId = $t01622016356._5 | |
438 | 438 | let proxyRateMul = $t01622016356._6 | |
439 | 439 | let stakingProfitAddress = $t01622016356._7 | |
440 | 440 | if (isLeasable) | |
441 | 441 | then rebalanceInternal(leasedRatio, assetId, proxyAssetId, minBalance, addressFromStringValue(proxyAddress), proxyRateMul, addressFromStringValue(stakingProfitAddress)) | |
442 | 442 | else nil | |
443 | 443 | } | |
444 | 444 | ||
445 | 445 | ||
446 | 446 | func withdrawAndRebalanceAsset (assetId,getAmount) = { | |
447 | 447 | let $t01675516891 = getLeaseProxyConfig(assetId) | |
448 | 448 | let isLeasable = $t01675516891._1 | |
449 | 449 | let leasedRatio = $t01675516891._2 | |
450 | 450 | let minBalance = $t01675516891._3 | |
451 | 451 | let proxyAddress = $t01675516891._4 | |
452 | 452 | let proxyAssetId = $t01675516891._5 | |
453 | 453 | let proxyRateMul = $t01675516891._6 | |
454 | 454 | let stakingProfitAddress = $t01675516891._7 | |
455 | 455 | if (isLeasable) | |
456 | 456 | then { | |
457 | - | let | |
458 | - | if (( | |
457 | + | let currentStakingAssetBalance = getStakingAssetBalanceOrZero(proxyAssetId) | |
458 | + | if ((currentStakingAssetBalance == currentStakingAssetBalance)) | |
459 | 459 | then { | |
460 | - | let newAdditionalBalance = fraction(leasedRatio, newTotalLeasableBalance, 100) | |
461 | - | if ((newAdditionalBalance == newAdditionalBalance)) | |
460 | + | let currentAdditionalBalance = if ((currentStakingAssetBalance != 0)) | |
461 | + | then getAdditionalBalanceOrZero(assetId) | |
462 | + | else 0 | |
463 | + | if ((currentAdditionalBalance == currentAdditionalBalance)) | |
462 | 464 | then { | |
463 | - | let withdrawAmount = (getAdditionalBalanceOrZero(assetId) - newAdditionalBalance) | |
464 | - | if ((withdrawAmount == withdrawAmount)) | |
465 | - | then if ((0 > withdrawAmount)) | |
466 | - | then deposit(assetId, -(withdrawAmount), proxyAssetId, addressFromStringValue(proxyAddress)) | |
467 | - | else withdraw(assetId, withdrawAmount, proxyAssetId, addressFromStringValue(proxyAddress), proxyRateMul, addressFromStringValue(stakingProfitAddress)) | |
465 | + | let newTotalLeasableBalance = max([0, ((getAccBalance(assetId) - getAmount) - minBalance)]) | |
466 | + | if ((newTotalLeasableBalance == newTotalLeasableBalance)) | |
467 | + | then { | |
468 | + | let newAdditionalBalance = fraction(leasedRatio, newTotalLeasableBalance, 100) | |
469 | + | if ((newAdditionalBalance == newAdditionalBalance)) | |
470 | + | then { | |
471 | + | let withdrawAmount = (currentAdditionalBalance - newAdditionalBalance) | |
472 | + | if ((withdrawAmount == withdrawAmount)) | |
473 | + | then if ((0 > withdrawAmount)) | |
474 | + | then deposit(assetId, -(withdrawAmount), proxyAssetId, addressFromStringValue(proxyAddress)) | |
475 | + | else withdraw(assetId, withdrawAmount, proxyAssetId, addressFromStringValue(proxyAddress), proxyRateMul, addressFromStringValue(stakingProfitAddress)) | |
476 | + | else throw("Strict value is not equal to itself.") | |
477 | + | } | |
478 | + | else throw("Strict value is not equal to itself.") | |
479 | + | } | |
468 | 480 | else throw("Strict value is not equal to itself.") | |
469 | 481 | } | |
470 | 482 | else throw("Strict value is not equal to itself.") | |
471 | 483 | } | |
472 | 484 | else throw("Strict value is not equal to itself.") | |
473 | 485 | } | |
474 | 486 | else nil | |
475 | 487 | } | |
476 | 488 | ||
477 | 489 | ||
478 | 490 | func withdrawAndRebalanceAll (amountAssetOutAmount,priceAssetOutAmount) = { | |
479 | 491 | let AmAmtWithdrawState = withdrawAndRebalanceAsset(getStringOrFail(this, aa()), amountAssetOutAmount) | |
480 | 492 | let PrAmtWithdrawState = withdrawAndRebalanceAsset(getStringOrFail(this, pa()), priceAssetOutAmount) | |
481 | 493 | (AmAmtWithdrawState ++ PrAmtWithdrawState) | |
482 | 494 | } | |
483 | 495 | ||
484 | 496 | ||
485 | 497 | func privateCalcPrice (amAssetDcm,prAssetDcm,amAmt,prAmt) = { | |
486 | 498 | let amtAssetAmtX18 = toX18(amAmt, amAssetDcm) | |
487 | 499 | let priceAssetAmtX18 = toX18(prAmt, prAssetDcm) | |
488 | 500 | calcPriceBigInt(priceAssetAmtX18, amtAssetAmtX18) | |
489 | 501 | } | |
490 | 502 | ||
491 | 503 | ||
492 | 504 | func calcPrices (amAmt,prAmt,lpAmt) = { | |
493 | 505 | let cfg = getPoolConfig() | |
494 | 506 | let amtAssetDcm = parseIntValue(cfg[idxAmtAssetDcm]) | |
495 | 507 | let priceAssetDcm = parseIntValue(cfg[idxPriceAssetDcm]) | |
496 | 508 | let priceX18 = privateCalcPrice(amtAssetDcm, priceAssetDcm, amAmt, prAmt) | |
497 | 509 | let amAmtX18 = toX18(amAmt, amtAssetDcm) | |
498 | 510 | let prAmtX18 = toX18(prAmt, priceAssetDcm) | |
499 | 511 | let lpAmtX18 = toX18(lpAmt, scale8) | |
500 | 512 | let lpPriceInAmAssetX18 = calcPriceBigInt(amAmtX18, lpAmtX18) | |
501 | 513 | let lpPriceInPrAssetX18 = calcPriceBigInt(prAmtX18, lpAmtX18) | |
502 | 514 | [priceX18, lpPriceInAmAssetX18, lpPriceInPrAssetX18] | |
503 | 515 | } | |
504 | 516 | ||
505 | 517 | ||
506 | 518 | func calculatePrices (amAmt,prAmt,lpAmt) = { | |
507 | 519 | let prices = calcPrices(amAmt, prAmt, lpAmt) | |
508 | 520 | [fromX18(prices[0], scale8), fromX18(prices[1], scale8), fromX18(prices[2], scale8)] | |
509 | 521 | } | |
510 | 522 | ||
511 | 523 | ||
512 | 524 | func estimateGetOperation (txId58,pmtAssetId,pmtLpAmt,userAddress) = { | |
513 | 525 | let cfg = getPoolConfig() | |
514 | 526 | let lpAssetId = cfg[idxPoolLPAssetId] | |
515 | 527 | let amAssetId = cfg[idxAmtAssetId] | |
516 | 528 | let prAssetId = cfg[idxPriceAssetId] | |
517 | 529 | let amAssetDcm = parseIntValue(cfg[idxAmtAssetDcm]) | |
518 | 530 | let prAssetDcm = parseIntValue(cfg[idxPriceAssetDcm]) | |
519 | 531 | let poolStatus = cfg[idxPoolStatus] | |
520 | 532 | let lpEmission = valueOrErrorMessage(assetInfo(fromBase58String(lpAssetId)), (("Asset " + lpAssetId) + " doesn't exist")).quantity | |
521 | 533 | if ((lpAssetId != pmtAssetId)) | |
522 | 534 | then throw("Invalid asset passed.") | |
523 | 535 | else { | |
524 | 536 | let amBalance = getAccBalance(amAssetId) | |
525 | 537 | let amBalanceX18 = toX18(amBalance, amAssetDcm) | |
526 | 538 | let prBalance = getAccBalance(prAssetId) | |
527 | 539 | let prBalanceX18 = toX18(prBalance, prAssetDcm) | |
528 | 540 | let curPriceX18 = calcPriceBigInt(prBalanceX18, amBalanceX18) | |
529 | 541 | let curPrice = fromX18(curPriceX18, scale8) | |
530 | 542 | let pmtLpAmtX18 = toX18(pmtLpAmt, scale8) | |
531 | 543 | let lpEmissionX18 = toX18(lpEmission, scale8) | |
532 | 544 | let outAmAmtX18 = fraction(amBalanceX18, pmtLpAmtX18, lpEmissionX18) | |
533 | 545 | let outPrAmtX18 = fraction(prBalanceX18, pmtLpAmtX18, lpEmissionX18) | |
534 | 546 | let outAmAmt = fromX18Round(outAmAmtX18, amAssetDcm, FLOOR) | |
535 | 547 | let outPrAmt = fromX18Round(outPrAmtX18, prAssetDcm, FLOOR) | |
536 | 548 | let state = if ((txId58 == "")) | |
537 | 549 | then nil | |
538 | 550 | else [ScriptTransfer(userAddress, outAmAmt, if ((amAssetId == "WAVES")) | |
539 | 551 | then unit | |
540 | 552 | else fromBase58String(amAssetId)), ScriptTransfer(userAddress, outPrAmt, if ((prAssetId == "WAVES")) | |
541 | 553 | then unit | |
542 | 554 | 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)] | |
543 | 555 | $Tuple10(outAmAmt, outPrAmt, amAssetId, prAssetId, amBalance, prBalance, lpEmission, curPriceX18, poolStatus, state) | |
544 | 556 | } | |
545 | 557 | } | |
546 | 558 | ||
547 | 559 | ||
548 | 560 | func estimatePutOperation (txId58,slippageTolerance,inAmAssetAmt,inAmAssetId,inPrAssetAmt,inPrAssetId,userAddress,isEvaluate,emitLp) = { | |
549 | 561 | let cfg = getPoolConfig() | |
550 | 562 | let lpAssetId = fromBase58String(cfg[idxPoolLPAssetId]) | |
551 | 563 | let amAssetIdStr = cfg[idxAmtAssetId] | |
552 | 564 | let prAssetIdStr = cfg[idxPriceAssetId] | |
553 | 565 | let iAmtAssetId = cfg[idxIAmtAssetId] | |
554 | 566 | let iPriceAssetId = cfg[idxIPriceAssetId] | |
555 | 567 | let amtAssetDcm = parseIntValue(cfg[idxAmtAssetDcm]) | |
556 | 568 | let priceAssetDcm = parseIntValue(cfg[idxPriceAssetDcm]) | |
557 | 569 | let poolStatus = cfg[idxPoolStatus] | |
558 | 570 | let lpEmission = valueOrErrorMessage(assetInfo(lpAssetId), (("Asset " + toBase58String(lpAssetId)) + " doesn't exist")).quantity | |
559 | 571 | let inAmAssetIdStr = toBase58String(valueOrElse(inAmAssetId, fromBase58String("WAVES"))) | |
560 | 572 | let inPrAssetIdStr = toBase58String(valueOrElse(inPrAssetId, fromBase58String("WAVES"))) | |
561 | 573 | if (if ((amAssetIdStr != inAmAssetIdStr)) | |
562 | 574 | then true | |
563 | 575 | else (prAssetIdStr != inPrAssetIdStr)) | |
564 | 576 | then throw("Invalid amt or price asset passed.") | |
565 | 577 | else { | |
566 | 578 | let amBalance = if (isEvaluate) | |
567 | 579 | then getAccBalance(amAssetIdStr) | |
568 | 580 | else (getAccBalance(amAssetIdStr) - inAmAssetAmt) | |
569 | 581 | let prBalance = if (isEvaluate) | |
570 | 582 | then getAccBalance(prAssetIdStr) | |
571 | 583 | else (getAccBalance(prAssetIdStr) - inPrAssetAmt) | |
572 | 584 | let inAmAssetAmtX18 = toX18(inAmAssetAmt, amtAssetDcm) | |
573 | 585 | let inPrAssetAmtX18 = toX18(inPrAssetAmt, priceAssetDcm) | |
574 | 586 | let userPriceX18 = calcPriceBigInt(inPrAssetAmtX18, inAmAssetAmtX18) | |
575 | 587 | let amBalanceX18 = toX18(amBalance, amtAssetDcm) | |
576 | 588 | let prBalanceX18 = toX18(prBalance, priceAssetDcm) | |
577 | 589 | let res = if ((lpEmission == 0)) | |
578 | 590 | then { | |
579 | 591 | let curPriceX18 = zeroBigInt | |
580 | 592 | let slippageX18 = zeroBigInt | |
581 | 593 | let lpAmtX18 = pow((inAmAssetAmtX18 * inPrAssetAmtX18), 0, toBigInt(5), 1, 0, DOWN) | |
582 | 594 | $Tuple5(fromX18(lpAmtX18, scale8), fromX18(inAmAssetAmtX18, amtAssetDcm), fromX18(inPrAssetAmtX18, priceAssetDcm), calcPriceBigInt((prBalanceX18 + inPrAssetAmtX18), (amBalanceX18 + inAmAssetAmtX18)), slippageX18) | |
583 | 595 | } | |
584 | 596 | else { | |
585 | 597 | let curPriceX18 = calcPriceBigInt(prBalanceX18, amBalanceX18) | |
586 | 598 | let slippageX18 = fraction(absBigInt((curPriceX18 - userPriceX18)), scale18, curPriceX18) | |
587 | 599 | let slippageToleranceX18 = toX18(slippageTolerance, scale8) | |
588 | 600 | if (if ((curPriceX18 != zeroBigInt)) | |
589 | 601 | then (slippageX18 > slippageToleranceX18) | |
590 | 602 | else false) | |
591 | 603 | then throw(((("Price slippage " + toString(slippageX18)) + " exceeded the passed limit of ") + toString(slippageToleranceX18))) | |
592 | 604 | else { | |
593 | 605 | let lpEmissionX18 = toX18(lpEmission, scale8) | |
594 | 606 | let prViaAmX18 = fraction(inAmAssetAmtX18, calcPriceBigIntRound(prBalanceX18, amBalanceX18, CEILING), scale18, CEILING) | |
595 | 607 | let amViaPrX18 = fraction(inPrAssetAmtX18, scale18, calcPriceBigIntRound(prBalanceX18, amBalanceX18, FLOOR), CEILING) | |
596 | 608 | let expectedAmts = if ((prViaAmX18 > inPrAssetAmtX18)) | |
597 | 609 | then $Tuple2(amViaPrX18, inPrAssetAmtX18) | |
598 | 610 | else $Tuple2(inAmAssetAmtX18, prViaAmX18) | |
599 | 611 | let expAmtAssetAmtX18 = expectedAmts._1 | |
600 | 612 | let expPriceAssetAmtX18 = expectedAmts._2 | |
601 | 613 | let lpAmtX18 = fraction(lpEmissionX18, expPriceAssetAmtX18, prBalanceX18, FLOOR) | |
602 | 614 | $Tuple5(fromX18Round(lpAmtX18, scale8, FLOOR), fromX18Round(expAmtAssetAmtX18, amtAssetDcm, CEILING), fromX18Round(expPriceAssetAmtX18, priceAssetDcm, CEILING), curPriceX18, slippageX18) | |
603 | 615 | } | |
604 | 616 | } | |
605 | 617 | let calcLpAmt = res._1 | |
606 | 618 | let calcAmAssetPmt = res._2 | |
607 | 619 | let calcPrAssetPmt = res._3 | |
608 | 620 | let curPrice = fromX18(res._4, scale8) | |
609 | 621 | let slippageCalc = fromX18(res._5, scale8) | |
610 | 622 | if ((0 >= calcLpAmt)) | |
611 | 623 | then throw("Invalid calculations. LP calculated is less than zero.") | |
612 | 624 | else { | |
613 | 625 | let emitLpAmt = if (!(emitLp)) | |
614 | 626 | then 0 | |
615 | 627 | else calcLpAmt | |
616 | 628 | let amDiff = (inAmAssetAmt - calcAmAssetPmt) | |
617 | 629 | let prDiff = (inPrAssetAmt - calcPrAssetPmt) | |
618 | 630 | 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))] | |
619 | 631 | $Tuple13(calcLpAmt, emitLpAmt, curPrice, amBalance, prBalance, lpEmission, lpAssetId, poolStatus, commonState, amDiff, prDiff, inAmAssetId, inPrAssetId) | |
620 | 632 | } | |
621 | 633 | } | |
622 | 634 | } | |
623 | 635 | ||
624 | 636 | ||
625 | 637 | func calcKLp (amountBalance,priceBalance,lpEmission) = { | |
626 | 638 | let amountBalanceX18 = toX18BigInt(amountBalance, toBigInt(cfgAmountAssetDecimals)) | |
627 | 639 | let priceBalanceX18 = toX18BigInt(priceBalance, toBigInt(cfgPriceAssetDecimals)) | |
628 | 640 | let updatedKLp = fraction(pow((amountBalanceX18 * priceBalanceX18), 0, toBigInt(5), 1, 18, DOWN), big1, lpEmission) | |
629 | 641 | if ((lpEmission == big0)) | |
630 | 642 | then big0 | |
631 | 643 | else updatedKLp | |
632 | 644 | } | |
633 | 645 | ||
634 | 646 | ||
635 | 647 | func calcCurrentKLp (amountAssetDelta,priceAssetDelta,lpAssetEmissionDelta) = { | |
636 | 648 | let amountAssetBalance = (toBigInt(getAccBalance(assetIdToString(cfgAmountAssetId))) - amountAssetDelta) | |
637 | 649 | let priceAssetBalance = (toBigInt(getAccBalance(assetIdToString(cfgPriceAssetId))) - priceAssetDelta) | |
638 | 650 | let lpAssetEmission = (toBigInt(value(assetInfo(cfgLpAssetId)).quantity) - lpAssetEmissionDelta) | |
639 | 651 | let currentKLp = calcKLp(amountAssetBalance, priceAssetBalance, lpAssetEmission) | |
640 | 652 | currentKLp | |
641 | 653 | } | |
642 | 654 | ||
643 | 655 | ||
644 | 656 | func refreshKLpInternal (amountAssetBalanceDelta,priceAssetBalanceDelta,lpAssetEmissionDelta) = { | |
645 | 657 | let amountAssetBalance = (getAccBalance(assetIdToString(cfgAmountAssetId)) + amountAssetBalanceDelta) | |
646 | 658 | let priceAssetBalance = (getAccBalance(assetIdToString(cfgPriceAssetId)) + priceAssetBalanceDelta) | |
647 | 659 | let lpAssetEmission = (value(assetInfo(cfgLpAssetId)).quantity + lpAssetEmissionDelta) | |
648 | 660 | let updatedKLp = calcKLp(toBigInt(amountAssetBalance), toBigInt(priceAssetBalance), toBigInt(lpAssetEmission)) | |
649 | 661 | let actions = [IntegerEntry(keyKLpRefreshedHeight, height), StringEntry(keyKLp, toString(updatedKLp))] | |
650 | 662 | $Tuple2(actions, updatedKLp) | |
651 | 663 | } | |
652 | 664 | ||
653 | 665 | ||
654 | 666 | func skipOrderValidation () = valueOrElse(getBoolean(factoryContract, keySkipOrderValidation(toString(this))), false) | |
655 | 667 | ||
656 | 668 | ||
657 | 669 | func validateUpdatedKLp (oldKLp,updatedKLp) = if ((updatedKLp >= oldKLp)) | |
658 | 670 | then true | |
659 | 671 | else throwErr(makeString(["updated KLp lower than current KLp", toString(oldKLp), toString(updatedKLp)], " ")) | |
660 | 672 | ||
661 | 673 | ||
662 | 674 | func validateMatcherOrderAllowed (order) = { | |
663 | 675 | let amountAssetBalance = getAccBalance(assetIdToString(cfgAmountAssetId)) | |
664 | 676 | let priceAssetBalance = getAccBalance(assetIdToString(cfgPriceAssetId)) | |
665 | 677 | let amountAssetAmount = order.amount | |
666 | 678 | let priceAssetAmount = fraction(order.amount, order.price, scale8, FLOOR) | |
667 | - | let $ | |
679 | + | let $t02947529687 = if ((order.orderType == Buy)) | |
668 | 680 | then $Tuple2(amountAssetAmount, -(priceAssetAmount)) | |
669 | 681 | else $Tuple2(-(amountAssetAmount), priceAssetAmount) | |
670 | - | let amountAssetBalanceDelta = $ | |
671 | - | let priceAssetBalanceDelta = $ | |
682 | + | let amountAssetBalanceDelta = $t02947529687._1 | |
683 | + | let priceAssetBalanceDelta = $t02947529687._2 | |
672 | 684 | if (if (if (isGlobalShutdown()) | |
673 | 685 | then true | |
674 | 686 | else (cfgPoolStatus == PoolMatcherDisabled)) | |
675 | 687 | then true | |
676 | 688 | else (cfgPoolStatus == PoolShutdown)) | |
677 | 689 | then throw("Exchange operations disabled") | |
678 | 690 | else if (if ((order.assetPair.amountAsset != cfgAmountAssetId)) | |
679 | 691 | then true | |
680 | 692 | else (order.assetPair.priceAsset != cfgPriceAssetId)) | |
681 | 693 | then throw("Wrong order assets.") | |
682 | 694 | else { | |
683 | 695 | let kLp = valueOrErrorMessage(parseBigInt(valueOrElse(getString(this, keyKLp), "0")), fmtErr("invalid kLp")) | |
684 | - | let $ | |
685 | - | let unusedActions = $ | |
686 | - | let kLpNew = $ | |
696 | + | let $t03012730227 = refreshKLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0) | |
697 | + | let unusedActions = $t03012730227._1 | |
698 | + | let kLpNew = $t03012730227._2 | |
687 | 699 | let isOrderValid = (kLpNew >= kLp) | |
688 | 700 | let info = makeString(["kLp=", toString(kLp), " kLpNew=", toString(kLpNew), " amountAssetBalance=", toString(amountAssetBalance), " priceAssetBalance=", toString(priceAssetBalance), " amountAssetBalanceDelta=", toString(amountAssetBalanceDelta), " priceAssetBalanceDelta=", toString(priceAssetBalanceDelta), " height=", toString(height)], "") | |
689 | 701 | $Tuple2(isOrderValid, info) | |
690 | 702 | } | |
691 | 703 | } | |
692 | 704 | ||
693 | 705 | ||
694 | 706 | func commonGet (i) = if ((size(i.payments) != 1)) | |
695 | 707 | then throw("exactly 1 payment is expected") | |
696 | 708 | else { | |
697 | 709 | let pmt = value(i.payments[0]) | |
698 | 710 | let pmtAssetId = value(pmt.assetId) | |
699 | 711 | let pmtAmt = pmt.amount | |
700 | 712 | let res = estimateGetOperation(toBase58String(i.transactionId), toBase58String(pmtAssetId), pmtAmt, i.caller) | |
701 | 713 | let outAmAmt = res._1 | |
702 | 714 | let outPrAmt = res._2 | |
703 | 715 | let state = res._10 | |
704 | 716 | let isGetDisabled = if (!(isAddressWhitelisted(i.caller))) | |
705 | 717 | then if (isGlobalShutdown()) | |
706 | 718 | then true | |
707 | 719 | else (cfgPoolStatus == PoolShutdown) | |
708 | 720 | else false | |
709 | 721 | if (isGetDisabled) | |
710 | 722 | then throw(("Get operation is blocked by admin. Status = " + toString(cfgPoolStatus))) | |
711 | 723 | else $Tuple5(outAmAmt, outPrAmt, pmtAmt, pmtAssetId, state) | |
712 | 724 | } | |
713 | 725 | ||
714 | 726 | ||
715 | 727 | func commonPut (i,slippageTolerance,emitLp) = if ((size(i.payments) != 2)) | |
716 | 728 | then throw("exactly 2 payments are expected") | |
717 | 729 | else { | |
718 | 730 | let amAssetPmt = value(i.payments[0]) | |
719 | 731 | let prAssetPmt = value(i.payments[1]) | |
720 | 732 | let estPut = estimatePutOperation(toBase58String(i.transactionId), slippageTolerance, amAssetPmt.amount, amAssetPmt.assetId, prAssetPmt.amount, prAssetPmt.assetId, toString(i.caller), false, emitLp) | |
721 | 733 | let isPutDisabled = if (!(isAddressWhitelisted(i.caller))) | |
722 | 734 | then if (if (isGlobalShutdown()) | |
723 | 735 | then true | |
724 | 736 | else (cfgPoolStatus == PoolPutDisabled)) | |
725 | 737 | then true | |
726 | 738 | else (cfgPoolStatus == PoolShutdown) | |
727 | 739 | else false | |
728 | 740 | if (isPutDisabled) | |
729 | 741 | then throw(("Put operation is blocked by admin. Status = " + toString(cfgPoolStatus))) | |
730 | 742 | else estPut | |
731 | 743 | } | |
732 | 744 | ||
733 | 745 | ||
734 | 746 | func emit (amount) = { | |
735 | 747 | let emitInv = invoke(factoryContract, "emit", [amount], nil) | |
736 | 748 | if ((emitInv == emitInv)) | |
737 | 749 | then { | |
738 | 750 | let emitInvLegacy = match emitInv { | |
739 | 751 | case legacyFactoryContract: Address => | |
740 | 752 | invoke(legacyFactoryContract, "emit", [amount], nil) | |
741 | 753 | case _ => | |
742 | 754 | unit | |
743 | 755 | } | |
744 | 756 | if ((emitInvLegacy == emitInvLegacy)) | |
745 | 757 | then amount | |
746 | 758 | else throw("Strict value is not equal to itself.") | |
747 | 759 | } | |
748 | 760 | else throw("Strict value is not equal to itself.") | |
749 | 761 | } | |
750 | 762 | ||
751 | 763 | ||
752 | 764 | func takeFee (amount,fee) = { | |
753 | 765 | let feeAmount = if ((fee == 0)) | |
754 | 766 | then 0 | |
755 | 767 | else fraction(amount, fee, scale8) | |
756 | 768 | $Tuple2((amount - feeAmount), feeAmount) | |
757 | 769 | } | |
758 | 770 | ||
759 | 771 | ||
760 | 772 | func calcPutOneToken (paymentAmountRaw,paymentAssetId,userAddress,txId) = { | |
761 | 773 | let isEval = (txId == unit) | |
762 | 774 | let amountBalanceRaw = getAccBalance(assetIdToString(cfgAmountAssetId)) | |
763 | 775 | let priceBalanceRaw = getAccBalance(assetIdToString(cfgPriceAssetId)) | |
764 | 776 | let paymentInAmountAsset = if ((paymentAssetId == cfgAmountAssetId)) | |
765 | 777 | then true | |
766 | 778 | else if ((paymentAssetId == cfgPriceAssetId)) | |
767 | 779 | then false | |
768 | 780 | else throwErr("invalid asset") | |
769 | - | let $ | |
781 | + | let $t03341333706 = if (isEval) | |
770 | 782 | then $Tuple2(amountBalanceRaw, priceBalanceRaw) | |
771 | 783 | else if (paymentInAmountAsset) | |
772 | 784 | then $Tuple2((amountBalanceRaw - paymentAmountRaw), priceBalanceRaw) | |
773 | 785 | else $Tuple2(amountBalanceRaw, (priceBalanceRaw - paymentAmountRaw)) | |
774 | - | let amountBalanceOld = $ | |
775 | - | let priceBalanceOld = $ | |
776 | - | let $ | |
786 | + | let amountBalanceOld = $t03341333706._1 | |
787 | + | let priceBalanceOld = $t03341333706._2 | |
788 | + | let $t03371033859 = if (paymentInAmountAsset) | |
777 | 789 | then $Tuple2(paymentAmountRaw, 0) | |
778 | 790 | else $Tuple2(0, paymentAmountRaw) | |
779 | - | let amountAssetAmountRaw = $ | |
780 | - | let priceAssetAmountRaw = $ | |
791 | + | let amountAssetAmountRaw = $t03371033859._1 | |
792 | + | let priceAssetAmountRaw = $t03371033859._2 | |
781 | 793 | let amountAssetAmount = takeFee(amountAssetAmountRaw, inFee)._1 | |
782 | 794 | let priceAssetAmount = takeFee(priceAssetAmountRaw, inFee)._1 | |
783 | - | let $ | |
784 | - | let paymentAmount = $ | |
785 | - | let feeAmount = $ | |
795 | + | let $t03399134055 = takeFee(paymentAmountRaw, inFee) | |
796 | + | let paymentAmount = $t03399134055._1 | |
797 | + | let feeAmount = $t03399134055._2 | |
786 | 798 | let amountBalanceNew = (amountBalanceOld + amountAssetAmount) | |
787 | 799 | let priceBalanceNew = (priceBalanceOld + priceAssetAmount) | |
788 | 800 | let priceNewX18 = calcPriceBigInt(toX18(priceBalanceNew, cfgPriceAssetDecimals), toX18(amountBalanceNew, cfgAmountAssetDecimals)) | |
789 | 801 | let priceNew = fromX18(priceNewX18, scale8) | |
790 | 802 | let paymentBalance = if (paymentInAmountAsset) | |
791 | 803 | then amountBalanceOld | |
792 | 804 | else priceBalanceOld | |
793 | 805 | let paymentBalanceBigInt = toBigInt(paymentBalance) | |
794 | 806 | let supplyBigInt = toBigInt(valueOrErrorMessage(assetInfo(cfgLpAssetId), (("asset " + toBase58String(cfgLpAssetId)) + " doesn't exist")).quantity) | |
795 | 807 | let chechSupply = if ((supplyBigInt > big0)) | |
796 | 808 | then true | |
797 | 809 | else throwErr("initial deposit requires all coins") | |
798 | 810 | if ((chechSupply == chechSupply)) | |
799 | 811 | then { | |
800 | 812 | let depositBigInt = toBigInt(paymentAmount) | |
801 | 813 | let issueAmount = max([0, toInt(((supplyBigInt * (sqrtBigInt((scale18 + ((depositBigInt * scale18) / paymentBalanceBigInt)), 18, 18, DOWN) - scale18)) / scale18))]) | |
802 | 814 | let commonState = if (isEval) | |
803 | 815 | then nil | |
804 | 816 | 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))] | |
805 | 817 | let priceOldX18 = calcPriceBigInt(toX18(priceBalanceOld, cfgPriceAssetDecimals), toX18(amountBalanceOld, cfgAmountAssetDecimals)) | |
806 | 818 | let priceOld = fromX18(priceOldX18, scale8) | |
807 | 819 | let loss = { | |
808 | - | let $ | |
820 | + | let $t03573635903 = if (paymentInAmountAsset) | |
809 | 821 | then $Tuple2(amountAssetAmountRaw, amountBalanceOld) | |
810 | 822 | else $Tuple2(priceAssetAmountRaw, priceBalanceOld) | |
811 | - | let amount = $ | |
812 | - | let balance = $ | |
823 | + | let amount = $t03573635903._1 | |
824 | + | let balance = $t03573635903._2 | |
813 | 825 | let issueAmountBoth = toInt(fraction(supplyBigInt, toBigInt((amount / 2)), toBigInt(balance))) | |
814 | 826 | fraction((issueAmount - issueAmountBoth), scale8, issueAmountBoth) | |
815 | 827 | } | |
816 | 828 | $Tuple5(issueAmount, commonState, feeAmount, loss, paymentInAmountAsset) | |
817 | 829 | } | |
818 | 830 | else throw("Strict value is not equal to itself.") | |
819 | 831 | } | |
820 | 832 | ||
821 | 833 | ||
822 | 834 | func calcGetOneToken (outAssetId,paymentAmount,paymentAssetId,userAddress,txId) = { | |
823 | 835 | let isEval = (txId == unit) | |
824 | 836 | let cfg = getPoolConfig() | |
825 | 837 | let amtAssetDcm = parseIntValue(cfg[idxAmtAssetDcm]) | |
826 | 838 | let priceAssetDcm = parseIntValue(cfg[idxPriceAssetDcm]) | |
827 | 839 | let checks = [if ((paymentAssetId == cfgLpAssetId)) | |
828 | 840 | then true | |
829 | 841 | else throwErr("invalid lp asset")] | |
830 | 842 | if ((checks == checks)) | |
831 | 843 | then { | |
832 | 844 | let outInAmountAsset = if ((outAssetId == cfgAmountAssetId)) | |
833 | 845 | then true | |
834 | 846 | else if ((outAssetId == cfgPriceAssetId)) | |
835 | 847 | then false | |
836 | 848 | else throwErr("invalid asset") | |
837 | 849 | let balanceBigInt = if (outInAmountAsset) | |
838 | 850 | then toBigInt(getAccBalance(assetIdToString(cfgAmountAssetId))) | |
839 | 851 | else toBigInt(getAccBalance(assetIdToString(cfgPriceAssetId))) | |
840 | 852 | let outInAmountAssetDecimals = if (outInAmountAsset) | |
841 | 853 | then amtAssetDcm | |
842 | 854 | else priceAssetDcm | |
843 | 855 | let amBalanceOld = getAccBalance(assetIdToString(cfgAmountAssetId)) | |
844 | 856 | let prBalanceOld = getAccBalance(assetIdToString(cfgPriceAssetId)) | |
845 | 857 | let outBalance = if (outInAmountAsset) | |
846 | 858 | then amBalanceOld | |
847 | 859 | else prBalanceOld | |
848 | 860 | let outBalanceBigInt = toBigInt(outBalance) | |
849 | 861 | let supplyBigInt = toBigInt(valueOrErrorMessage(assetInfo(cfgLpAssetId), (("asset " + toBase58String(cfgLpAssetId)) + " doesn't exist")).quantity) | |
850 | 862 | let redeemedBigInt = toBigInt(paymentAmount) | |
851 | 863 | let amountRaw = max([0, toInt(((balanceBigInt * (scale18 - pow((scale18 - ((redeemedBigInt * scale18) / supplyBigInt)), 18, big2, 0, 18, DOWN))) / scale18))]) | |
852 | - | let $ | |
853 | - | let totalAmount = $ | |
854 | - | let feeAmount = $ | |
855 | - | let $ | |
864 | + | let $t03798138037 = takeFee(amountRaw, outFee) | |
865 | + | let totalAmount = $t03798138037._1 | |
866 | + | let feeAmount = $t03798138037._2 | |
867 | + | let $t03804138267 = if (outInAmountAsset) | |
856 | 868 | then $Tuple4(totalAmount, 0, (amBalanceOld - amountRaw), prBalanceOld) | |
857 | 869 | else $Tuple4(0, totalAmount, amBalanceOld, (prBalanceOld - amountRaw)) | |
858 | - | let outAmAmount = $ | |
859 | - | let outPrAmount = $ | |
860 | - | let amBalanceNew = $ | |
861 | - | let prBalanceNew = $ | |
870 | + | let outAmAmount = $t03804138267._1 | |
871 | + | let outPrAmount = $t03804138267._2 | |
872 | + | let amBalanceNew = $t03804138267._3 | |
873 | + | let prBalanceNew = $t03804138267._4 | |
862 | 874 | let priceNewX18 = calcPriceBigInt(toX18(prBalanceNew, cfgPriceAssetDecimals), toX18(amBalanceNew, cfgAmountAssetDecimals)) | |
863 | 875 | let priceNew = fromX18(priceNewX18, scale8) | |
864 | 876 | let commonState = if (isEval) | |
865 | 877 | then nil | |
866 | 878 | 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)] | |
867 | 879 | let priceOldX18 = calcPriceBigInt(toX18(prBalanceOld, cfgPriceAssetDecimals), toX18(amBalanceOld, cfgAmountAssetDecimals)) | |
868 | 880 | let priceOld = fromX18(priceOldX18, scale8) | |
869 | 881 | let loss = { | |
870 | 882 | let amountBothInPaymentAsset = (toInt(fraction(balanceBigInt, redeemedBigInt, supplyBigInt)) * 2) | |
871 | 883 | fraction((totalAmount - amountBothInPaymentAsset), scale8, amountBothInPaymentAsset) | |
872 | 884 | } | |
873 | 885 | $Tuple5(totalAmount, commonState, feeAmount, loss, outInAmountAsset) | |
874 | 886 | } | |
875 | 887 | else throw("Strict value is not equal to itself.") | |
876 | 888 | } | |
877 | 889 | ||
878 | 890 | ||
879 | 891 | func managerPublicKeyOrUnit () = { | |
880 | 892 | let managerVaultAddress = getManagerVaultAddressOrThis() | |
881 | 893 | match getString(managerVaultAddress, keyManagerPublicKey()) { | |
882 | 894 | case s: String => | |
883 | 895 | fromBase58String(s) | |
884 | 896 | case _: Unit => | |
885 | 897 | unit | |
886 | 898 | case _ => | |
887 | 899 | throw("Match error") | |
888 | 900 | } | |
889 | 901 | } | |
890 | 902 | ||
891 | 903 | ||
892 | 904 | func isManager (i) = match managerPublicKeyOrUnit() { | |
893 | 905 | case pk: ByteVector => | |
894 | 906 | (i.callerPublicKey == pk) | |
895 | 907 | case _: Unit => | |
896 | 908 | (i.caller == this) | |
897 | 909 | case _ => | |
898 | 910 | throw("Match error") | |
899 | 911 | } | |
900 | 912 | ||
901 | 913 | ||
902 | 914 | func mustManager (i) = { | |
903 | 915 | let pd = throw("Permission denied") | |
904 | 916 | match managerPublicKeyOrUnit() { | |
905 | 917 | case pk: ByteVector => | |
906 | 918 | if ((i.callerPublicKey == pk)) | |
907 | 919 | then true | |
908 | 920 | else pd | |
909 | 921 | case _: Unit => | |
910 | 922 | if ((i.caller == this)) | |
911 | 923 | then true | |
912 | 924 | else pd | |
913 | 925 | case _ => | |
914 | 926 | throw("Match error") | |
915 | 927 | } | |
916 | 928 | } | |
917 | 929 | ||
918 | 930 | ||
919 | 931 | @Callable(i) | |
920 | 932 | func rebalance () = (rebalanceAsset(getStringOrFail(this, aa())) ++ rebalanceAsset(getStringOrFail(this, pa()))) | |
921 | 933 | ||
922 | 934 | ||
923 | 935 | ||
924 | 936 | @Callable(i) | |
925 | 937 | func calculateAmountOutForSwapREADONLY (cleanAmountIn,isReverse,feePoolAmount) = { | |
926 | - | let $ | |
938 | + | let $t04012540430 = if ((isReverse == false)) | |
927 | 939 | then { | |
928 | 940 | let assetOut = getStringOrFail(this, pa()) | |
929 | 941 | let assetIn = getStringOrFail(this, aa()) | |
930 | 942 | $Tuple2(assetOut, assetIn) | |
931 | 943 | } | |
932 | 944 | else { | |
933 | 945 | let assetOut = getStringOrFail(this, aa()) | |
934 | 946 | let assetIn = getStringOrFail(this, pa()) | |
935 | 947 | $Tuple2(assetOut, assetIn) | |
936 | 948 | } | |
937 | - | let assetOut = $ | |
938 | - | let assetIn = $ | |
949 | + | let assetOut = $t04012540430._1 | |
950 | + | let assetIn = $t04012540430._2 | |
939 | 951 | let poolAssetInBalance = getAccBalance(assetIn) | |
940 | 952 | let poolAssetOutBalance = getAccBalance(assetOut) | |
941 | 953 | let amountOut = fraction(poolAssetOutBalance, cleanAmountIn, (poolAssetInBalance + cleanAmountIn)) | |
942 | 954 | let oldK = (toBigInt(poolAssetInBalance) * toBigInt(poolAssetOutBalance)) | |
943 | 955 | let newK = (((toBigInt(getAccBalance(assetIn)) + toBigInt(cleanAmountIn)) + toBigInt(feePoolAmount)) * (toBigInt(getAccBalance(assetOut)) - toBigInt(amountOut))) | |
944 | 956 | let checkK = if ((newK >= oldK)) | |
945 | 957 | then true | |
946 | 958 | else throw("new K is fewer error") | |
947 | 959 | if ((checkK == checkK)) | |
948 | 960 | then $Tuple2(nil, amountOut) | |
949 | 961 | else throw("Strict value is not equal to itself.") | |
950 | 962 | } | |
951 | 963 | ||
952 | 964 | ||
953 | 965 | ||
954 | 966 | @Callable(i) | |
955 | 967 | func calculateAmountOutForSwapAndSendTokens (cleanAmountIn,isReverse,amountOutMin,addressTo,feePoolAmount) = { | |
956 | 968 | let swapContact = { | |
957 | 969 | let @ = invoke(factoryContract, "getSwapContractREADONLY", nil, nil) | |
958 | 970 | if ($isInstanceOf(@, "String")) | |
959 | 971 | then @ | |
960 | 972 | else throw(($getType(@) + " couldn't be cast to String")) | |
961 | 973 | } | |
962 | 974 | let isPoolSwapDisabled = { | |
963 | 975 | let @ = invoke(factoryContract, "isPoolSwapDisabledREADONLY", [toString(this)], nil) | |
964 | 976 | if ($isInstanceOf(@, "Boolean")) | |
965 | 977 | then @ | |
966 | 978 | else throw(($getType(@) + " couldn't be cast to Boolean")) | |
967 | 979 | } | |
968 | 980 | let isSwapDisabled = if (!(isAddressWhitelisted(i.caller))) | |
969 | 981 | then if (if (isGlobalShutdown()) | |
970 | 982 | then true | |
971 | 983 | else (cfgPoolStatus == PoolShutdown)) | |
972 | 984 | then true | |
973 | 985 | else isPoolSwapDisabled | |
974 | 986 | else false | |
975 | 987 | let checks = [if (if (!(isSwapDisabled)) | |
976 | 988 | then true | |
977 | 989 | else isManager(i)) | |
978 | 990 | then true | |
979 | 991 | else throwErr("swap operation is blocked by admin"), if ((value(i.payments[0]).amount >= cleanAmountIn)) | |
980 | 992 | then true | |
981 | 993 | else throwErr("Wrong amount"), if ((i.caller == addressFromStringValue(swapContact))) | |
982 | 994 | then true | |
983 | 995 | else throwErr("Permission denied")] | |
984 | 996 | if ((checks == checks)) | |
985 | 997 | then { | |
986 | 998 | let pmt = value(i.payments[0]) | |
987 | 999 | let assetIn = assetIdToString(pmt.assetId) | |
988 | 1000 | let assetOut = if ((isReverse == false)) | |
989 | 1001 | then getStringOrFail(this, pa()) | |
990 | 1002 | else getStringOrFail(this, aa()) | |
991 | 1003 | let poolAssetInBalance = ((getAccBalance(assetIn) - value(i.payments[0]).amount) - feePoolAmount) | |
992 | 1004 | let poolAssetOutBalance = getAccBalance(assetOut) | |
993 | 1005 | let amountOut = fraction(poolAssetOutBalance, cleanAmountIn, (poolAssetInBalance + cleanAmountIn)) | |
994 | 1006 | let oldK = (toBigInt(poolAssetInBalance) * toBigInt(poolAssetOutBalance)) | |
995 | 1007 | let newK = ((toBigInt(getAccBalance(assetIn)) + toBigInt(feePoolAmount)) * (toBigInt(getAccBalance(assetOut)) - toBigInt(amountOut))) | |
996 | 1008 | let checkK = if ((newK >= oldK)) | |
997 | 1009 | then true | |
998 | 1010 | else throw("new K is fewer error") | |
999 | 1011 | if ((checkK == checkK)) | |
1000 | 1012 | then { | |
1001 | 1013 | let checkMin = if ((amountOut >= amountOutMin)) | |
1002 | 1014 | then true | |
1003 | 1015 | else throw("Exchange result is fewer coins than expected") | |
1004 | 1016 | if ((checkMin == checkMin)) | |
1005 | 1017 | then { | |
1006 | 1018 | let amountAssetBalanceDelta = if (isReverse) | |
1007 | 1019 | then -(amountOut) | |
1008 | 1020 | else feePoolAmount | |
1009 | 1021 | let priceAssetBalanceDelta = if (isReverse) | |
1010 | 1022 | then feePoolAmount | |
1011 | 1023 | else -(amountOut) | |
1012 | 1024 | let refreshKLpActions = refreshKLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)._1 | |
1013 | 1025 | if ((refreshKLpActions == refreshKLpActions)) | |
1014 | 1026 | then { | |
1015 | 1027 | let rebalanceState = rebalanceAsset(assetIn) | |
1016 | 1028 | if ((rebalanceState == rebalanceState)) | |
1017 | 1029 | then { | |
1018 | 1030 | let withdrawState = withdrawAndRebalanceAsset(assetOut, amountOut) | |
1019 | 1031 | if ((withdrawState == withdrawState)) | |
1020 | 1032 | then $Tuple2(((withdrawState ++ rebalanceState) ++ [ScriptTransfer(addressFromStringValue(addressTo), amountOut, parseAssetId(assetOut))]), amountOut) | |
1021 | 1033 | else throw("Strict value is not equal to itself.") | |
1022 | 1034 | } | |
1023 | 1035 | else throw("Strict value is not equal to itself.") | |
1024 | 1036 | } | |
1025 | 1037 | else throw("Strict value is not equal to itself.") | |
1026 | 1038 | } | |
1027 | 1039 | else throw("Strict value is not equal to itself.") | |
1028 | 1040 | } | |
1029 | 1041 | else throw("Strict value is not equal to itself.") | |
1030 | 1042 | } | |
1031 | 1043 | else throw("Strict value is not equal to itself.") | |
1032 | 1044 | } | |
1033 | 1045 | ||
1034 | 1046 | ||
1035 | 1047 | ||
1036 | 1048 | @Callable(i) | |
1037 | 1049 | func put (slippageTolerance,shouldAutoStake) = if ((0 > slippageTolerance)) | |
1038 | 1050 | then throw("Invalid slippageTolerance passed") | |
1039 | 1051 | else { | |
1040 | 1052 | let estPut = commonPut(i, slippageTolerance, true) | |
1041 | 1053 | let emitLpAmt = estPut._2 | |
1042 | 1054 | let lpAssetId = estPut._7 | |
1043 | 1055 | let state = estPut._9 | |
1044 | 1056 | let amDiff = estPut._10 | |
1045 | 1057 | let prDiff = estPut._11 | |
1046 | 1058 | let amId = estPut._12 | |
1047 | 1059 | let prId = estPut._13 | |
1048 | 1060 | let amAssetPmt = toBigInt(value(i.payments[0]).amount) | |
1049 | 1061 | let prAssetPmt = toBigInt(value(i.payments[1]).amount) | |
1050 | 1062 | let currentKLp = calcCurrentKLp(amAssetPmt, prAssetPmt, toBigInt(0)) | |
1051 | 1063 | if ((currentKLp == currentKLp)) | |
1052 | 1064 | then { | |
1053 | 1065 | let emitInv = invoke(factoryContract, "emit", [emitLpAmt], nil) | |
1054 | 1066 | if ((emitInv == emitInv)) | |
1055 | 1067 | then { | |
1056 | 1068 | let emitInvLegacy = match emitInv { | |
1057 | 1069 | case legacyFactoryContract: Address => | |
1058 | 1070 | invoke(legacyFactoryContract, "emit", [emitLpAmt], nil) | |
1059 | 1071 | case _ => | |
1060 | 1072 | unit | |
1061 | 1073 | } | |
1062 | 1074 | if ((emitInvLegacy == emitInvLegacy)) | |
1063 | 1075 | then { | |
1064 | 1076 | let slippageAInv = if ((amDiff > 0)) | |
1065 | 1077 | then invoke(slippageContract, "put", nil, [AttachedPayment(amId, amDiff)]) | |
1066 | 1078 | else nil | |
1067 | 1079 | if ((slippageAInv == slippageAInv)) | |
1068 | 1080 | then { | |
1069 | 1081 | let slippagePInv = if ((prDiff > 0)) | |
1070 | 1082 | then invoke(slippageContract, "put", nil, [AttachedPayment(prId, prDiff)]) | |
1071 | 1083 | else nil | |
1072 | 1084 | if ((slippagePInv == slippagePInv)) | |
1073 | 1085 | then { | |
1074 | 1086 | let lpTransfer = if (shouldAutoStake) | |
1075 | 1087 | then { | |
1076 | 1088 | let slpStakeInv = invoke(stakingContract, "stake", nil, [AttachedPayment(lpAssetId, emitLpAmt)]) | |
1077 | 1089 | if ((slpStakeInv == slpStakeInv)) | |
1078 | 1090 | then nil | |
1079 | 1091 | else throw("Strict value is not equal to itself.") | |
1080 | 1092 | } | |
1081 | 1093 | else [ScriptTransfer(i.caller, emitLpAmt, lpAssetId)] | |
1082 | - | let $ | |
1083 | - | if (($ | |
1094 | + | let $t04560646068 = refreshKLpInternal(0, 0, 0) | |
1095 | + | if (($t04560646068 == $t04560646068)) | |
1084 | 1096 | then { | |
1085 | - | let updatedKLp = $ | |
1086 | - | let refreshKLpActions = $ | |
1097 | + | let updatedKLp = $t04560646068._2 | |
1098 | + | let refreshKLpActions = $t04560646068._1 | |
1087 | 1099 | let isUpdatedKLpValid = validateUpdatedKLp(currentKLp, updatedKLp) | |
1088 | 1100 | if ((isUpdatedKLpValid == isUpdatedKLpValid)) | |
1089 | 1101 | then { | |
1090 | 1102 | let reb = invoke(this, "rebalance", nil, nil) | |
1091 | 1103 | if ((reb == reb)) | |
1092 | 1104 | then ((state ++ lpTransfer) ++ refreshKLpActions) | |
1093 | 1105 | else throw("Strict value is not equal to itself.") | |
1094 | 1106 | } | |
1095 | 1107 | else throw("Strict value is not equal to itself.") | |
1096 | 1108 | } | |
1097 | 1109 | else throw("Strict value is not equal to itself.") | |
1098 | 1110 | } | |
1099 | 1111 | else throw("Strict value is not equal to itself.") | |
1100 | 1112 | } | |
1101 | 1113 | else throw("Strict value is not equal to itself.") | |
1102 | 1114 | } | |
1103 | 1115 | else throw("Strict value is not equal to itself.") | |
1104 | 1116 | } | |
1105 | 1117 | else throw("Strict value is not equal to itself.") | |
1106 | 1118 | } | |
1107 | 1119 | else throw("Strict value is not equal to itself.") | |
1108 | 1120 | } | |
1109 | 1121 | ||
1110 | 1122 | ||
1111 | 1123 | ||
1112 | 1124 | @Callable(i) | |
1113 | 1125 | func putForFree (maxSlippage) = if ((0 > maxSlippage)) | |
1114 | 1126 | then throw("Invalid value passed") | |
1115 | 1127 | else { | |
1116 | 1128 | let estPut = commonPut(i, maxSlippage, false) | |
1117 | 1129 | let state = estPut._9 | |
1118 | 1130 | let amAssetPmt = toBigInt(value(i.payments[0]).amount) | |
1119 | 1131 | let prAssetPmt = toBigInt(value(i.payments[1]).amount) | |
1120 | 1132 | let currentKLp = calcCurrentKLp(amAssetPmt, prAssetPmt, toBigInt(0)) | |
1121 | 1133 | if ((currentKLp == currentKLp)) | |
1122 | 1134 | then { | |
1123 | - | let $ | |
1124 | - | let refreshKLpActions = $ | |
1125 | - | let updatedKLp = $ | |
1135 | + | let $t04668046745 = refreshKLpInternal(0, 0, 0) | |
1136 | + | let refreshKLpActions = $t04668046745._1 | |
1137 | + | let updatedKLp = $t04668046745._2 | |
1126 | 1138 | let isUpdatedKLpValid = validateUpdatedKLp(currentKLp, updatedKLp) | |
1127 | 1139 | if ((isUpdatedKLpValid == isUpdatedKLpValid)) | |
1128 | 1140 | then (state ++ refreshKLpActions) | |
1129 | 1141 | else throw("Strict value is not equal to itself.") | |
1130 | 1142 | } | |
1131 | 1143 | else throw("Strict value is not equal to itself.") | |
1132 | 1144 | } | |
1133 | 1145 | ||
1134 | 1146 | ||
1135 | 1147 | ||
1136 | 1148 | @Callable(i) | |
1137 | 1149 | func putOneTkn (minOutAmount,autoStake) = { | |
1138 | 1150 | let isPoolOneTokenOperationsDisabled = { | |
1139 | 1151 | let @ = invoke(factoryContract, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil) | |
1140 | 1152 | if ($isInstanceOf(@, "Boolean")) | |
1141 | 1153 | then @ | |
1142 | 1154 | else throw(($getType(@) + " couldn't be cast to Boolean")) | |
1143 | 1155 | } | |
1144 | 1156 | let isPutDisabled = if (!(isAddressWhitelisted(i.caller))) | |
1145 | 1157 | then if (if (if (isGlobalShutdown()) | |
1146 | 1158 | then true | |
1147 | 1159 | else (cfgPoolStatus == PoolPutDisabled)) | |
1148 | 1160 | then true | |
1149 | 1161 | else (cfgPoolStatus == PoolShutdown)) | |
1150 | 1162 | then true | |
1151 | 1163 | else isPoolOneTokenOperationsDisabled | |
1152 | 1164 | else false | |
1153 | 1165 | let checks = [if (if (!(isPutDisabled)) | |
1154 | 1166 | then true | |
1155 | 1167 | else isManager(i)) | |
1156 | 1168 | then true | |
1157 | 1169 | else throwErr("put operation is blocked by admin"), if ((size(i.payments) == 1)) | |
1158 | 1170 | then true | |
1159 | 1171 | else throwErr("exactly 1 payment are expected")] | |
1160 | 1172 | if ((checks == checks)) | |
1161 | 1173 | then { | |
1162 | 1174 | let payment = i.payments[0] | |
1163 | 1175 | let paymentAssetId = payment.assetId | |
1164 | 1176 | let paymentAmountRaw = payment.amount | |
1165 | 1177 | let currentKLp = if ((paymentAssetId == cfgAmountAssetId)) | |
1166 | 1178 | then calcCurrentKLp(toBigInt(paymentAmountRaw), toBigInt(0), toBigInt(0)) | |
1167 | 1179 | else if ((paymentAssetId == cfgPriceAssetId)) | |
1168 | 1180 | then calcCurrentKLp(toBigInt(0), toBigInt(paymentAmountRaw), toBigInt(0)) | |
1169 | 1181 | else throwErr("payment asset is not supported") | |
1170 | 1182 | if ((currentKLp == currentKLp)) | |
1171 | 1183 | then { | |
1172 | 1184 | let userAddress = i.caller | |
1173 | 1185 | let txId = i.transactionId | |
1174 | - | let $ | |
1175 | - | if (($ | |
1186 | + | let $t04797448126 = calcPutOneToken(paymentAmountRaw, paymentAssetId, userAddress, txId) | |
1187 | + | if (($t04797448126 == $t04797448126)) | |
1176 | 1188 | then { | |
1177 | - | let paymentInAmountAsset = $ | |
1178 | - | let bonus = $ | |
1179 | - | let feeAmount = $ | |
1180 | - | let commonState = $ | |
1181 | - | let emitAmountEstimated = $ | |
1189 | + | let paymentInAmountAsset = $t04797448126._5 | |
1190 | + | let bonus = $t04797448126._4 | |
1191 | + | let feeAmount = $t04797448126._3 | |
1192 | + | let commonState = $t04797448126._2 | |
1193 | + | let emitAmountEstimated = $t04797448126._1 | |
1182 | 1194 | let emitAmount = if (if ((minOutAmount > 0)) | |
1183 | 1195 | then (minOutAmount > emitAmountEstimated) | |
1184 | 1196 | else false) | |
1185 | 1197 | then throwErr(makeString(["amount to receive is less than ", toString(minOutAmount)], "")) | |
1186 | 1198 | else emitAmountEstimated | |
1187 | 1199 | let emitInv = emit(emitAmount) | |
1188 | 1200 | if ((emitInv == emitInv)) | |
1189 | 1201 | then { | |
1190 | 1202 | let lpTransfer = if (autoStake) | |
1191 | 1203 | then { | |
1192 | 1204 | let stakeInv = invoke(stakingContract, "stake", nil, [AttachedPayment(cfgLpAssetId, emitAmount)]) | |
1193 | 1205 | if ((stakeInv == stakeInv)) | |
1194 | 1206 | then nil | |
1195 | 1207 | else throw("Strict value is not equal to itself.") | |
1196 | 1208 | } | |
1197 | 1209 | else [ScriptTransfer(i.caller, emitAmount, cfgLpAssetId)] | |
1198 | 1210 | let sendFee = if ((feeAmount > 0)) | |
1199 | 1211 | then [ScriptTransfer(feeCollectorAddress, feeAmount, paymentAssetId)] | |
1200 | 1212 | else nil | |
1201 | - | let $ | |
1213 | + | let $t04871248909 = if ((this == feeCollectorAddress)) | |
1202 | 1214 | then $Tuple2(0, 0) | |
1203 | 1215 | else if (paymentInAmountAsset) | |
1204 | 1216 | then $Tuple2(-(feeAmount), 0) | |
1205 | 1217 | else $Tuple2(0, -(feeAmount)) | |
1206 | - | let amountAssetBalanceDelta = $ | |
1207 | - | let priceAssetBalanceDelta = $ | |
1208 | - | let $ | |
1209 | - | let refreshKLpActions = $ | |
1210 | - | let updatedKLp = $ | |
1218 | + | let amountAssetBalanceDelta = $t04871248909._1 | |
1219 | + | let priceAssetBalanceDelta = $t04871248909._2 | |
1220 | + | let $t04891249020 = refreshKLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0) | |
1221 | + | let refreshKLpActions = $t04891249020._1 | |
1222 | + | let updatedKLp = $t04891249020._2 | |
1211 | 1223 | let kLp = value(getString(keyKLp)) | |
1212 | 1224 | let isUpdatedKLpValid = validateUpdatedKLp(currentKLp, updatedKLp) | |
1213 | 1225 | if ((isUpdatedKLpValid == isUpdatedKLpValid)) | |
1214 | 1226 | then { | |
1215 | 1227 | let reb = invoke(this, "rebalance", nil, nil) | |
1216 | 1228 | if ((reb == reb)) | |
1217 | 1229 | then $Tuple2((((commonState ++ lpTransfer) ++ sendFee) ++ refreshKLpActions), emitAmount) | |
1218 | 1230 | else throw("Strict value is not equal to itself.") | |
1219 | 1231 | } | |
1220 | 1232 | else throw("Strict value is not equal to itself.") | |
1221 | 1233 | } | |
1222 | 1234 | else throw("Strict value is not equal to itself.") | |
1223 | 1235 | } | |
1224 | 1236 | else throw("Strict value is not equal to itself.") | |
1225 | 1237 | } | |
1226 | 1238 | else throw("Strict value is not equal to itself.") | |
1227 | 1239 | } | |
1228 | 1240 | else throw("Strict value is not equal to itself.") | |
1229 | 1241 | } | |
1230 | 1242 | ||
1231 | 1243 | ||
1232 | 1244 | ||
1233 | 1245 | @Callable(i) | |
1234 | 1246 | func putOneTknREADONLY (paymentAssetId,paymentAmountRaw) = { | |
1235 | - | let $ | |
1236 | - | let emitAmountEstimated = $ | |
1237 | - | let commonState = $ | |
1238 | - | let feeAmount = $ | |
1239 | - | let bonus = $ | |
1240 | - | let paymentInAmountAsset = $ | |
1247 | + | let $t04937549532 = calcPutOneToken(paymentAmountRaw, parseAssetId(paymentAssetId), unit, unit) | |
1248 | + | let emitAmountEstimated = $t04937549532._1 | |
1249 | + | let commonState = $t04937549532._2 | |
1250 | + | let feeAmount = $t04937549532._3 | |
1251 | + | let bonus = $t04937549532._4 | |
1252 | + | let paymentInAmountAsset = $t04937549532._5 | |
1241 | 1253 | $Tuple2(nil, $Tuple3(emitAmountEstimated, feeAmount, bonus)) | |
1242 | 1254 | } | |
1243 | 1255 | ||
1244 | 1256 | ||
1245 | 1257 | ||
1246 | 1258 | @Callable(i) | |
1247 | 1259 | func getOneTkn (outAssetIdStr,minOutAmount) = { | |
1248 | 1260 | let isPoolOneTokenOperationsDisabled = { | |
1249 | 1261 | let @ = invoke(factoryContract, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil) | |
1250 | 1262 | if ($isInstanceOf(@, "Boolean")) | |
1251 | 1263 | then @ | |
1252 | 1264 | else throw(($getType(@) + " couldn't be cast to Boolean")) | |
1253 | 1265 | } | |
1254 | 1266 | let isGetDisabled = if (!(isAddressWhitelisted(i.caller))) | |
1255 | 1267 | then if (if (isGlobalShutdown()) | |
1256 | 1268 | then true | |
1257 | 1269 | else (cfgPoolStatus == PoolShutdown)) | |
1258 | 1270 | then true | |
1259 | 1271 | else isPoolOneTokenOperationsDisabled | |
1260 | 1272 | else false | |
1261 | 1273 | let checks = [if (if (!(isGetDisabled)) | |
1262 | 1274 | then true | |
1263 | 1275 | else isManager(i)) | |
1264 | 1276 | then true | |
1265 | 1277 | else throwErr("get operation is blocked by admin"), if ((size(i.payments) == 1)) | |
1266 | 1278 | then true | |
1267 | 1279 | else throwErr("exactly 1 payment are expected")] | |
1268 | 1280 | if ((checks == checks)) | |
1269 | 1281 | then { | |
1270 | 1282 | let outAssetId = parseAssetId(outAssetIdStr) | |
1271 | 1283 | let payment = i.payments[0] | |
1272 | 1284 | let paymentAssetId = payment.assetId | |
1273 | 1285 | let paymentAmount = payment.amount | |
1274 | 1286 | let currentKLp = calcCurrentKLp(toBigInt(0), toBigInt(0), toBigInt(0)) | |
1275 | 1287 | if ((currentKLp == currentKLp)) | |
1276 | 1288 | then { | |
1277 | 1289 | let userAddress = i.caller | |
1278 | 1290 | let txId = i.transactionId | |
1279 | - | let $ | |
1280 | - | if (($ | |
1291 | + | let $t05045450607 = calcGetOneToken(outAssetId, paymentAmount, paymentAssetId, userAddress, txId) | |
1292 | + | if (($t05045450607 == $t05045450607)) | |
1281 | 1293 | then { | |
1282 | - | let outInAmountAsset = $ | |
1283 | - | let bonus = $ | |
1284 | - | let feeAmount = $ | |
1285 | - | let commonState = $ | |
1286 | - | let amountEstimated = $ | |
1294 | + | let outInAmountAsset = $t05045450607._5 | |
1295 | + | let bonus = $t05045450607._4 | |
1296 | + | let feeAmount = $t05045450607._3 | |
1297 | + | let commonState = $t05045450607._2 | |
1298 | + | let amountEstimated = $t05045450607._1 | |
1287 | 1299 | let amount = if (if ((minOutAmount > 0)) | |
1288 | 1300 | then (minOutAmount > amountEstimated) | |
1289 | 1301 | else false) | |
1290 | 1302 | then throwErr(makeString(["amount to receive is less than ", toString(minOutAmount)], "")) | |
1291 | 1303 | else amountEstimated | |
1292 | 1304 | let burnInv = invoke(factoryContract, "burn", [paymentAmount], [AttachedPayment(paymentAssetId, paymentAmount)]) | |
1293 | 1305 | if ((burnInv == burnInv)) | |
1294 | 1306 | then { | |
1295 | 1307 | let withdrawState = withdrawAndRebalanceAsset(outAssetIdStr, (amount + max([0, feeAmount]))) | |
1296 | 1308 | let assetTransfer = [ScriptTransfer(userAddress, amount, outAssetId)] | |
1297 | 1309 | let sendFee = if ((feeAmount > 0)) | |
1298 | 1310 | then [ScriptTransfer(feeCollectorAddress, feeAmount, outAssetId)] | |
1299 | 1311 | else nil | |
1300 | - | let $ | |
1312 | + | let $t05127151518 = { | |
1301 | 1313 | let feeAmountForCalc = if ((this == feeCollectorAddress)) | |
1302 | 1314 | then 0 | |
1303 | 1315 | else feeAmount | |
1304 | 1316 | if (outInAmountAsset) | |
1305 | 1317 | then $Tuple2(-((amount + feeAmountForCalc)), 0) | |
1306 | 1318 | else $Tuple2(0, -((amount + feeAmountForCalc))) | |
1307 | 1319 | } | |
1308 | - | let amountAssetBalanceDelta = $ | |
1309 | - | let priceAssetBalanceDelta = $ | |
1310 | - | let $ | |
1311 | - | let refreshKLpActions = $ | |
1312 | - | let updatedKLp = $ | |
1320 | + | let amountAssetBalanceDelta = $t05127151518._1 | |
1321 | + | let priceAssetBalanceDelta = $t05127151518._2 | |
1322 | + | let $t05152151629 = refreshKLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0) | |
1323 | + | let refreshKLpActions = $t05152151629._1 | |
1324 | + | let updatedKLp = $t05152151629._2 | |
1313 | 1325 | let isUpdatedKLpValid = validateUpdatedKLp(currentKLp, updatedKLp) | |
1314 | 1326 | if ((isUpdatedKLpValid == isUpdatedKLpValid)) | |
1315 | 1327 | then $Tuple2(((((commonState ++ withdrawState) ++ assetTransfer) ++ sendFee) ++ refreshKLpActions), amount) | |
1316 | 1328 | else throw("Strict value is not equal to itself.") | |
1317 | 1329 | } | |
1318 | 1330 | else throw("Strict value is not equal to itself.") | |
1319 | 1331 | } | |
1320 | 1332 | else throw("Strict value is not equal to itself.") | |
1321 | 1333 | } | |
1322 | 1334 | else throw("Strict value is not equal to itself.") | |
1323 | 1335 | } | |
1324 | 1336 | else throw("Strict value is not equal to itself.") | |
1325 | 1337 | } | |
1326 | 1338 | ||
1327 | 1339 | ||
1328 | 1340 | ||
1329 | 1341 | @Callable(i) | |
1330 | 1342 | func getOneTknREADONLY (outAssetId,paymentAmount) = { | |
1331 | - | let $ | |
1332 | - | let amountEstimated = $ | |
1333 | - | let commonState = $ | |
1334 | - | let feeAmount = $ | |
1335 | - | let bonus = $ | |
1336 | - | let outInAmountAsset = $ | |
1343 | + | let $t05190752063 = calcGetOneToken(parseAssetId(outAssetId), paymentAmount, cfgLpAssetId, unit, unit) | |
1344 | + | let amountEstimated = $t05190752063._1 | |
1345 | + | let commonState = $t05190752063._2 | |
1346 | + | let feeAmount = $t05190752063._3 | |
1347 | + | let bonus = $t05190752063._4 | |
1348 | + | let outInAmountAsset = $t05190752063._5 | |
1337 | 1349 | $Tuple2(nil, $Tuple3(amountEstimated, feeAmount, bonus)) | |
1338 | 1350 | } | |
1339 | 1351 | ||
1340 | 1352 | ||
1341 | 1353 | ||
1342 | 1354 | @Callable(i) | |
1343 | 1355 | func unstakeAndGetOneTkn (unstakeAmount,outAssetIdStr,minOutAmount) = { | |
1344 | 1356 | let isPoolOneTokenOperationsDisabled = { | |
1345 | 1357 | let @ = invoke(factoryContract, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil) | |
1346 | 1358 | if ($isInstanceOf(@, "Boolean")) | |
1347 | 1359 | then @ | |
1348 | 1360 | else throw(($getType(@) + " couldn't be cast to Boolean")) | |
1349 | 1361 | } | |
1350 | 1362 | let isGetDisabled = if (!(isAddressWhitelisted(i.caller))) | |
1351 | 1363 | then if (if (isGlobalShutdown()) | |
1352 | 1364 | then true | |
1353 | 1365 | else (cfgPoolStatus == PoolShutdown)) | |
1354 | 1366 | then true | |
1355 | 1367 | else isPoolOneTokenOperationsDisabled | |
1356 | 1368 | else false | |
1357 | 1369 | let checks = [if (if (!(isGetDisabled)) | |
1358 | 1370 | then true | |
1359 | 1371 | else isManager(i)) | |
1360 | 1372 | then true | |
1361 | 1373 | else throwErr("get operation is blocked by admin"), if ((size(i.payments) == 0)) | |
1362 | 1374 | then true | |
1363 | 1375 | else throwErr("no payments are expected")] | |
1364 | 1376 | if ((checks == checks)) | |
1365 | 1377 | then { | |
1366 | 1378 | let outAssetId = parseAssetId(outAssetIdStr) | |
1367 | 1379 | let userAddress = i.caller | |
1368 | 1380 | let txId = i.transactionId | |
1369 | 1381 | let currentKLp = calcCurrentKLp(toBigInt(0), toBigInt(0), toBigInt(0)) | |
1370 | 1382 | if ((currentKLp == currentKLp)) | |
1371 | 1383 | then { | |
1372 | 1384 | let unstakeInv = invoke(stakingContract, "unstake", [toBase58String(cfgLpAssetId), unstakeAmount], nil) | |
1373 | 1385 | if ((unstakeInv == unstakeInv)) | |
1374 | 1386 | then { | |
1375 | - | let $ | |
1376 | - | if (($ | |
1387 | + | let $t05300553156 = calcGetOneToken(outAssetId, unstakeAmount, cfgLpAssetId, userAddress, txId) | |
1388 | + | if (($t05300553156 == $t05300553156)) | |
1377 | 1389 | then { | |
1378 | - | let outInAmountAsset = $ | |
1379 | - | let bonus = $ | |
1380 | - | let feeAmount = $ | |
1381 | - | let commonState = $ | |
1382 | - | let amountEstimated = $ | |
1390 | + | let outInAmountAsset = $t05300553156._5 | |
1391 | + | let bonus = $t05300553156._4 | |
1392 | + | let feeAmount = $t05300553156._3 | |
1393 | + | let commonState = $t05300553156._2 | |
1394 | + | let amountEstimated = $t05300553156._1 | |
1383 | 1395 | let amount = if (if ((minOutAmount > 0)) | |
1384 | 1396 | then (minOutAmount > amountEstimated) | |
1385 | 1397 | else false) | |
1386 | 1398 | then throwErr(makeString(["amount to receive is less than ", toString(minOutAmount)], "")) | |
1387 | 1399 | else amountEstimated | |
1388 | 1400 | let burnInv = invoke(factoryContract, "burn", [unstakeAmount], [AttachedPayment(cfgLpAssetId, unstakeAmount)]) | |
1389 | 1401 | if ((burnInv == burnInv)) | |
1390 | 1402 | then { | |
1391 | 1403 | let withdrawState = withdrawAndRebalanceAsset(outAssetIdStr, (amount + max([0, feeAmount]))) | |
1392 | 1404 | let assetTransfer = [ScriptTransfer(i.caller, amount, outAssetId)] | |
1393 | 1405 | let sendFee = if ((feeAmount > 0)) | |
1394 | 1406 | then [ScriptTransfer(feeCollectorAddress, feeAmount, outAssetId)] | |
1395 | 1407 | else nil | |
1396 | - | let $ | |
1408 | + | let $t05381554062 = { | |
1397 | 1409 | let feeAmountForCalc = if ((this == feeCollectorAddress)) | |
1398 | 1410 | then 0 | |
1399 | 1411 | else feeAmount | |
1400 | 1412 | if (outInAmountAsset) | |
1401 | 1413 | then $Tuple2(-((amount + feeAmountForCalc)), 0) | |
1402 | 1414 | else $Tuple2(0, -((amount + feeAmountForCalc))) | |
1403 | 1415 | } | |
1404 | - | let amountAssetBalanceDelta = $ | |
1405 | - | let priceAssetBalanceDelta = $ | |
1406 | - | let $ | |
1407 | - | let refreshKLpActions = $ | |
1408 | - | let updatedKLp = $ | |
1416 | + | let amountAssetBalanceDelta = $t05381554062._1 | |
1417 | + | let priceAssetBalanceDelta = $t05381554062._2 | |
1418 | + | let $t05406554173 = refreshKLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0) | |
1419 | + | let refreshKLpActions = $t05406554173._1 | |
1420 | + | let updatedKLp = $t05406554173._2 | |
1409 | 1421 | let isUpdatedKLpValid = validateUpdatedKLp(currentKLp, updatedKLp) | |
1410 | 1422 | if ((isUpdatedKLpValid == isUpdatedKLpValid)) | |
1411 | 1423 | then $Tuple2(((((commonState ++ withdrawState) ++ assetTransfer) ++ sendFee) ++ refreshKLpActions), amount) | |
1412 | 1424 | else throw("Strict value is not equal to itself.") | |
1413 | 1425 | } | |
1414 | 1426 | else throw("Strict value is not equal to itself.") | |
1415 | 1427 | } | |
1416 | 1428 | else throw("Strict value is not equal to itself.") | |
1417 | 1429 | } | |
1418 | 1430 | else throw("Strict value is not equal to itself.") | |
1419 | 1431 | } | |
1420 | 1432 | else throw("Strict value is not equal to itself.") | |
1421 | 1433 | } | |
1422 | 1434 | else throw("Strict value is not equal to itself.") | |
1423 | 1435 | } | |
1424 | 1436 | ||
1425 | 1437 | ||
1426 | 1438 | ||
1427 | 1439 | @Callable(i) | |
1428 | 1440 | func get () = { | |
1429 | 1441 | let res = commonGet(i) | |
1430 | 1442 | let outAmAmt = res._1 | |
1431 | 1443 | let outPrAmt = res._2 | |
1432 | 1444 | let pmtAmt = res._3 | |
1433 | 1445 | let pmtAssetId = res._4 | |
1434 | 1446 | let state = res._5 | |
1435 | 1447 | let withdrawState = withdrawAndRebalanceAll(outAmAmt, outPrAmt) | |
1436 | 1448 | let currentKLp = calcCurrentKLp(toBigInt(0), toBigInt(0), toBigInt(0)) | |
1437 | 1449 | if ((currentKLp == currentKLp)) | |
1438 | 1450 | then { | |
1439 | 1451 | let burnLPAssetOnFactory = invoke(factoryContract, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)]) | |
1440 | 1452 | if ((burnLPAssetOnFactory == burnLPAssetOnFactory)) | |
1441 | 1453 | then { | |
1442 | - | let $ | |
1443 | - | let refreshKLpActions = $ | |
1444 | - | let updatedKLp = $ | |
1454 | + | let $t05526855349 = refreshKLpInternal(-(outAmAmt), -(outPrAmt), 0) | |
1455 | + | let refreshKLpActions = $t05526855349._1 | |
1456 | + | let updatedKLp = $t05526855349._2 | |
1445 | 1457 | let isUpdatedKLpValid = validateUpdatedKLp(currentKLp, updatedKLp) | |
1446 | 1458 | if ((isUpdatedKLpValid == isUpdatedKLpValid)) | |
1447 | 1459 | then ((withdrawState ++ state) ++ refreshKLpActions) | |
1448 | 1460 | else throw("Strict value is not equal to itself.") | |
1449 | 1461 | } | |
1450 | 1462 | else throw("Strict value is not equal to itself.") | |
1451 | 1463 | } | |
1452 | 1464 | else throw("Strict value is not equal to itself.") | |
1453 | 1465 | } | |
1454 | 1466 | ||
1455 | 1467 | ||
1456 | 1468 | ||
1457 | 1469 | @Callable(i) | |
1458 | 1470 | func getNoLess (noLessThenAmtAsset,noLessThenPriceAsset) = { | |
1459 | 1471 | let res = commonGet(i) | |
1460 | 1472 | let outAmAmt = res._1 | |
1461 | 1473 | let outPrAmt = res._2 | |
1462 | 1474 | let pmtAmt = res._3 | |
1463 | 1475 | let pmtAssetId = res._4 | |
1464 | 1476 | let state = res._5 | |
1465 | 1477 | if ((noLessThenAmtAsset > outAmAmt)) | |
1466 | 1478 | then throw(((("noLessThenAmtAsset failed: " + toString(outAmAmt)) + " < ") + toString(noLessThenAmtAsset))) | |
1467 | 1479 | else if ((noLessThenPriceAsset > outPrAmt)) | |
1468 | 1480 | then throw(((("noLessThenPriceAsset failed: " + toString(outPrAmt)) + " < ") + toString(noLessThenPriceAsset))) | |
1469 | 1481 | else { | |
1470 | 1482 | let withdrawState = withdrawAndRebalanceAll(outAmAmt, outPrAmt) | |
1471 | 1483 | let currentKLp = calcCurrentKLp(toBigInt(0), toBigInt(0), toBigInt(0)) | |
1472 | 1484 | if ((currentKLp == currentKLp)) | |
1473 | 1485 | then { | |
1474 | 1486 | let burnLPAssetOnFactory = invoke(factoryContract, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)]) | |
1475 | 1487 | if ((burnLPAssetOnFactory == burnLPAssetOnFactory)) | |
1476 | 1488 | then { | |
1477 | - | let $ | |
1478 | - | let refreshKLpActions = $ | |
1479 | - | let updatedKLp = $ | |
1489 | + | let $t05644456525 = refreshKLpInternal(-(outAmAmt), -(outPrAmt), 0) | |
1490 | + | let refreshKLpActions = $t05644456525._1 | |
1491 | + | let updatedKLp = $t05644456525._2 | |
1480 | 1492 | let isUpdatedKLpValid = validateUpdatedKLp(currentKLp, updatedKLp) | |
1481 | 1493 | if ((isUpdatedKLpValid == isUpdatedKLpValid)) | |
1482 | 1494 | then ((withdrawState ++ state) ++ refreshKLpActions) | |
1483 | 1495 | else throw("Strict value is not equal to itself.") | |
1484 | 1496 | } | |
1485 | 1497 | else throw("Strict value is not equal to itself.") | |
1486 | 1498 | } | |
1487 | 1499 | else throw("Strict value is not equal to itself.") | |
1488 | 1500 | } | |
1489 | 1501 | } | |
1490 | 1502 | ||
1491 | 1503 | ||
1492 | 1504 | ||
1493 | 1505 | @Callable(i) | |
1494 | 1506 | func unstakeAndGet (amount) = { | |
1495 | 1507 | let checkPayments = if ((size(i.payments) != 0)) | |
1496 | 1508 | then throw("No payments are expected") | |
1497 | 1509 | else true | |
1498 | 1510 | if ((checkPayments == checkPayments)) | |
1499 | 1511 | then { | |
1500 | 1512 | let cfg = getPoolConfig() | |
1501 | 1513 | let lpAssetId = fromBase58String(cfg[idxPoolLPAssetId]) | |
1502 | 1514 | let currentKLp = calcCurrentKLp(toBigInt(0), toBigInt(0), toBigInt(0)) | |
1503 | 1515 | if ((currentKLp == currentKLp)) | |
1504 | 1516 | then { | |
1505 | 1517 | let unstakeInv = invoke(stakingContract, "unstake", [toBase58String(lpAssetId), amount], nil) | |
1506 | 1518 | if ((unstakeInv == unstakeInv)) | |
1507 | 1519 | then { | |
1508 | 1520 | let res = estimateGetOperation(toBase58String(i.transactionId), toBase58String(lpAssetId), amount, i.caller) | |
1509 | 1521 | let outAmAmt = res._1 | |
1510 | 1522 | let outPrAmt = res._2 | |
1511 | 1523 | let poolStatus = parseIntValue(res._9) | |
1512 | 1524 | let state = res._10 | |
1513 | 1525 | let withdrawState = withdrawAndRebalanceAll(outAmAmt, outPrAmt) | |
1514 | 1526 | let isGetDisabled = if (!(isAddressWhitelisted(i.caller))) | |
1515 | 1527 | then if (isGlobalShutdown()) | |
1516 | 1528 | then true | |
1517 | 1529 | else (cfgPoolStatus == PoolShutdown) | |
1518 | 1530 | else false | |
1519 | 1531 | let checkPoolStatus = if (isGetDisabled) | |
1520 | 1532 | then throw(("Get operation is blocked by admin. Status = " + toString(poolStatus))) | |
1521 | 1533 | else true | |
1522 | 1534 | if ((checkPoolStatus == checkPoolStatus)) | |
1523 | 1535 | then { | |
1524 | 1536 | let burnLPAssetOnFactory = invoke(factoryContract, "burn", [amount], [AttachedPayment(lpAssetId, amount)]) | |
1525 | 1537 | if ((burnLPAssetOnFactory == burnLPAssetOnFactory)) | |
1526 | 1538 | then { | |
1527 | - | let $ | |
1528 | - | let refreshKLpActions = $ | |
1529 | - | let updatedKLp = $ | |
1539 | + | let $t05787357954 = refreshKLpInternal(-(outAmAmt), -(outPrAmt), 0) | |
1540 | + | let refreshKLpActions = $t05787357954._1 | |
1541 | + | let updatedKLp = $t05787357954._2 | |
1530 | 1542 | let isUpdatedKLpValid = validateUpdatedKLp(currentKLp, updatedKLp) | |
1531 | 1543 | if ((isUpdatedKLpValid == isUpdatedKLpValid)) | |
1532 | 1544 | then ((withdrawState ++ state) ++ refreshKLpActions) | |
1533 | 1545 | else throw("Strict value is not equal to itself.") | |
1534 | 1546 | } | |
1535 | 1547 | else throw("Strict value is not equal to itself.") | |
1536 | 1548 | } | |
1537 | 1549 | else throw("Strict value is not equal to itself.") | |
1538 | 1550 | } | |
1539 | 1551 | else throw("Strict value is not equal to itself.") | |
1540 | 1552 | } | |
1541 | 1553 | else throw("Strict value is not equal to itself.") | |
1542 | 1554 | } | |
1543 | 1555 | else throw("Strict value is not equal to itself.") | |
1544 | 1556 | } | |
1545 | 1557 | ||
1546 | 1558 | ||
1547 | 1559 | ||
1548 | 1560 | @Callable(i) | |
1549 | 1561 | func unstakeAndGetNoLess (unstakeAmount,noLessThenAmountAsset,noLessThenPriceAsset) = { | |
1550 | 1562 | let isGetDisabled = if (!(isAddressWhitelisted(i.caller))) | |
1551 | 1563 | then if (isGlobalShutdown()) | |
1552 | 1564 | then true | |
1553 | 1565 | else (cfgPoolStatus == PoolShutdown) | |
1554 | 1566 | else false | |
1555 | 1567 | let checks = [if (!(isGetDisabled)) | |
1556 | 1568 | then true | |
1557 | 1569 | else throw("get operation is blocked by admin"), if ((size(i.payments) == 0)) | |
1558 | 1570 | then true | |
1559 | 1571 | else throw("no payments are expected")] | |
1560 | 1572 | if ((checks == checks)) | |
1561 | 1573 | then { | |
1562 | 1574 | let currentKLp = calcCurrentKLp(toBigInt(0), toBigInt(0), toBigInt(0)) | |
1563 | 1575 | if ((currentKLp == currentKLp)) | |
1564 | 1576 | then { | |
1565 | 1577 | let unstakeInv = invoke(stakingContract, "unstake", [toBase58String(cfgLpAssetId), unstakeAmount], nil) | |
1566 | 1578 | if ((unstakeInv == unstakeInv)) | |
1567 | 1579 | then { | |
1568 | 1580 | let res = estimateGetOperation(toBase58String(i.transactionId), toBase58String(cfgLpAssetId), unstakeAmount, i.caller) | |
1569 | 1581 | let outAmAmt = res._1 | |
1570 | 1582 | let outPrAmt = res._2 | |
1571 | 1583 | let state = res._10 | |
1572 | 1584 | let withdrawState = withdrawAndRebalanceAll(outAmAmt, outPrAmt) | |
1573 | 1585 | let checkAmounts = [if ((outAmAmt >= noLessThenAmountAsset)) | |
1574 | 1586 | then true | |
1575 | 1587 | else throw(makeString(["amount asset amount to receive is less than ", toString(noLessThenAmountAsset)], "")), if ((outPrAmt >= noLessThenPriceAsset)) | |
1576 | 1588 | then true | |
1577 | 1589 | else throw(makeString(["price asset amount to receive is less than ", toString(noLessThenPriceAsset)], ""))] | |
1578 | 1590 | if ((checkAmounts == checkAmounts)) | |
1579 | 1591 | then { | |
1580 | 1592 | let burnLPAssetOnFactory = invoke(factoryContract, "burn", [unstakeAmount], [AttachedPayment(cfgLpAssetId, unstakeAmount)]) | |
1581 | 1593 | if ((burnLPAssetOnFactory == burnLPAssetOnFactory)) | |
1582 | 1594 | then { | |
1583 | - | let $ | |
1584 | - | let refreshKLpActions = $ | |
1585 | - | let updatedKLp = $ | |
1595 | + | let $t05943259513 = refreshKLpInternal(-(outAmAmt), -(outPrAmt), 0) | |
1596 | + | let refreshKLpActions = $t05943259513._1 | |
1597 | + | let updatedKLp = $t05943259513._2 | |
1586 | 1598 | let isUpdatedKLpValid = validateUpdatedKLp(currentKLp, updatedKLp) | |
1587 | 1599 | if ((isUpdatedKLpValid == isUpdatedKLpValid)) | |
1588 | 1600 | then ((withdrawState ++ state) ++ refreshKLpActions) | |
1589 | 1601 | else throw("Strict value is not equal to itself.") | |
1590 | 1602 | } | |
1591 | 1603 | else throw("Strict value is not equal to itself.") | |
1592 | 1604 | } | |
1593 | 1605 | else throw("Strict value is not equal to itself.") | |
1594 | 1606 | } | |
1595 | 1607 | else throw("Strict value is not equal to itself.") | |
1596 | 1608 | } | |
1597 | 1609 | else throw("Strict value is not equal to itself.") | |
1598 | 1610 | } | |
1599 | 1611 | else throw("Strict value is not equal to itself.") | |
1600 | 1612 | } | |
1601 | 1613 | ||
1602 | 1614 | ||
1603 | 1615 | ||
1604 | 1616 | @Callable(i) | |
1605 | 1617 | func activate (amtAssetStr,priceAssetStr) = if ((toString(i.caller) != toString(factoryContract))) | |
1606 | 1618 | then throw("permissions denied") | |
1607 | 1619 | else $Tuple2([StringEntry(aa(), amtAssetStr), StringEntry(pa(), priceAssetStr)], "success") | |
1608 | 1620 | ||
1609 | 1621 | ||
1610 | 1622 | ||
1611 | 1623 | @Callable(i) | |
1612 | 1624 | func refreshKLp () = { | |
1613 | 1625 | let lastRefreshedBlockHeight = valueOrElse(getInteger(keyKLpRefreshedHeight), 0) | |
1614 | 1626 | let checkLastRefreshedBlockHeight = if (((height - lastRefreshedBlockHeight) >= kLpRefreshDelay)) | |
1615 | 1627 | then unit | |
1616 | 1628 | else throwErr(makeString([toString(kLpRefreshDelay), " blocks have not passed since the previous call"], "")) | |
1617 | 1629 | if ((checkLastRefreshedBlockHeight == checkLastRefreshedBlockHeight)) | |
1618 | 1630 | then { | |
1619 | 1631 | let kLp = valueOrErrorMessage(parseBigInt(valueOrElse(getString(this, keyKLp), "0")), fmtErr("invalid kLp")) | |
1620 | - | let $ | |
1621 | - | let kLpUpdateActions = $ | |
1622 | - | let updatedKLp = $ | |
1632 | + | let $t06071760781 = refreshKLpInternal(0, 0, 0) | |
1633 | + | let kLpUpdateActions = $t06071760781._1 | |
1634 | + | let updatedKLp = $t06071760781._2 | |
1623 | 1635 | let actions = if ((kLp != updatedKLp)) | |
1624 | 1636 | then kLpUpdateActions | |
1625 | 1637 | else throwErr("nothing to refresh") | |
1626 | 1638 | $Tuple2(actions, toString(updatedKLp)) | |
1627 | 1639 | } | |
1628 | 1640 | else throw("Strict value is not equal to itself.") | |
1629 | 1641 | } | |
1630 | 1642 | ||
1631 | 1643 | ||
1632 | 1644 | ||
1633 | 1645 | @Callable(i) | |
1634 | 1646 | func getPoolConfigWrapperREADONLY () = $Tuple2(nil, getPoolConfig()) | |
1635 | 1647 | ||
1636 | 1648 | ||
1637 | 1649 | ||
1638 | 1650 | @Callable(i) | |
1639 | 1651 | func getAccBalanceWrapperREADONLY (assetId) = $Tuple2(nil, getAccBalance(assetId)) | |
1640 | 1652 | ||
1641 | 1653 | ||
1642 | 1654 | ||
1643 | 1655 | @Callable(i) | |
1644 | 1656 | func calcPricesWrapperREADONLY (amAmt,prAmt,lpAmt) = { | |
1645 | 1657 | let prices = calcPrices(amAmt, prAmt, lpAmt) | |
1646 | 1658 | $Tuple2(nil, [toString(prices[0]), toString(prices[1]), toString(prices[2])]) | |
1647 | 1659 | } | |
1648 | 1660 | ||
1649 | 1661 | ||
1650 | 1662 | ||
1651 | 1663 | @Callable(i) | |
1652 | 1664 | func toX18WrapperREADONLY (origVal,origScaleMult) = $Tuple2(nil, toString(toX18(origVal, origScaleMult))) | |
1653 | 1665 | ||
1654 | 1666 | ||
1655 | 1667 | ||
1656 | 1668 | @Callable(i) | |
1657 | 1669 | func fromX18WrapperREADONLY (val,resultScaleMult) = $Tuple2(nil, fromX18(parseBigIntValue(val), resultScaleMult)) | |
1658 | 1670 | ||
1659 | 1671 | ||
1660 | 1672 | ||
1661 | 1673 | @Callable(i) | |
1662 | 1674 | func calcPriceBigIntWrapperREADONLY (prAmtX18,amAmtX18) = $Tuple2(nil, toString(calcPriceBigInt(parseBigIntValue(prAmtX18), parseBigIntValue(amAmtX18)))) | |
1663 | 1675 | ||
1664 | 1676 | ||
1665 | 1677 | ||
1666 | 1678 | @Callable(i) | |
1667 | 1679 | func estimatePutOperationWrapperREADONLY (txId58,slippageTolerance,inAmAssetAmt,inAmAssetId,inPrAssetAmt,inPrAssetId,userAddress,isEvaluate,emitLp) = $Tuple2(nil, estimatePutOperation(txId58, slippageTolerance, inAmAssetAmt, inAmAssetId, inPrAssetAmt, inPrAssetId, userAddress, isEvaluate, emitLp)) | |
1668 | 1680 | ||
1669 | 1681 | ||
1670 | 1682 | ||
1671 | 1683 | @Callable(i) | |
1672 | 1684 | func estimateGetOperationWrapperREADONLY (txId58,pmtAssetId,pmtLpAmt,userAddress) = { | |
1673 | 1685 | let res = estimateGetOperation(txId58, pmtAssetId, pmtLpAmt, addressFromStringValue(userAddress)) | |
1674 | 1686 | $Tuple2(nil, $Tuple10(res._1, res._2, res._3, res._4, res._5, res._6, res._7, toString(res._8), res._9, res._10)) | |
1675 | 1687 | } | |
1676 | 1688 | ||
1677 | 1689 | ||
1678 | 1690 | ||
1679 | 1691 | @Callable(i) | |
1680 | 1692 | func statsREADONLY () = { | |
1681 | 1693 | let cfg = getPoolConfig() | |
1682 | 1694 | let lpAssetId = fromBase58String(cfg[idxPoolLPAssetId]) | |
1683 | 1695 | let amtAssetId = cfg[idxAmtAssetId] | |
1684 | 1696 | let priceAssetId = cfg[idxPriceAssetId] | |
1685 | 1697 | let iAmtAssetId = cfg[idxIAmtAssetId] | |
1686 | 1698 | let iPriceAssetId = cfg[idxIPriceAssetId] | |
1687 | 1699 | let amtAssetDcm = parseIntValue(cfg[idxAmtAssetDcm]) | |
1688 | 1700 | let priceAssetDcm = parseIntValue(cfg[idxPriceAssetDcm]) | |
1689 | 1701 | let poolLPBalance = valueOrErrorMessage(assetInfo(lpAssetId), (("Asset " + toBase58String(lpAssetId)) + " doesn't exist")).quantity | |
1690 | 1702 | let accAmtAssetBalance = getAccBalance(amtAssetId) | |
1691 | 1703 | let accPriceAssetBalance = getAccBalance(priceAssetId) | |
1692 | 1704 | let pricesList = if ((poolLPBalance == 0)) | |
1693 | 1705 | then [zeroBigInt, zeroBigInt, zeroBigInt] | |
1694 | 1706 | else calcPrices(accAmtAssetBalance, accPriceAssetBalance, poolLPBalance) | |
1695 | 1707 | let curPrice = 0 | |
1696 | 1708 | let lpAmtAssetShare = fromX18(pricesList[1], scale8) | |
1697 | 1709 | let lpPriceAssetShare = fromX18(pricesList[2], scale8) | |
1698 | 1710 | let poolWeight = value(getInteger(factoryContract, keyPoolWeight(toString(this)))) | |
1699 | 1711 | $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)) | |
1700 | 1712 | } | |
1701 | 1713 | ||
1702 | 1714 | ||
1703 | 1715 | ||
1704 | 1716 | @Callable(i) | |
1705 | 1717 | func evaluatePutByAmountAssetREADONLY (inAmAssetAmt) = { | |
1706 | 1718 | let cfg = getPoolConfig() | |
1707 | 1719 | let lpAssetId = fromBase58String(cfg[idxPoolLPAssetId]) | |
1708 | 1720 | let amAssetIdStr = cfg[idxAmtAssetId] | |
1709 | 1721 | let amAssetId = fromBase58String(amAssetIdStr) | |
1710 | 1722 | let prAssetIdStr = cfg[idxPriceAssetId] | |
1711 | 1723 | let prAssetId = fromBase58String(prAssetIdStr) | |
1712 | 1724 | let amtAssetDcm = parseIntValue(cfg[idxAmtAssetDcm]) | |
1713 | 1725 | let priceAssetDcm = parseIntValue(cfg[idxPriceAssetDcm]) | |
1714 | 1726 | let poolStatus = cfg[idxPoolStatus] | |
1715 | 1727 | let poolLPBalance = valueOrErrorMessage(assetInfo(lpAssetId), (("Asset " + toBase58String(lpAssetId)) + " doesn't exist")).quantity | |
1716 | 1728 | let accAmtAssetBalance = getAccBalance(amAssetIdStr) | |
1717 | 1729 | let accPriceAssetBalance = getAccBalance(prAssetIdStr) | |
1718 | 1730 | let amtAssetAmtX18 = toX18(accAmtAssetBalance, amtAssetDcm) | |
1719 | 1731 | let priceAssetAmtX18 = toX18(accPriceAssetBalance, priceAssetDcm) | |
1720 | 1732 | let curPriceX18 = if ((poolLPBalance == 0)) | |
1721 | 1733 | then zeroBigInt | |
1722 | 1734 | else calcPriceBigInt(priceAssetAmtX18, amtAssetAmtX18) | |
1723 | 1735 | let inAmAssetAmtX18 = toX18(inAmAssetAmt, amtAssetDcm) | |
1724 | 1736 | let inPrAssetAmtX18 = fraction(inAmAssetAmtX18, curPriceX18, scale18) | |
1725 | 1737 | let inPrAssetAmt = fromX18(inPrAssetAmtX18, priceAssetDcm) | |
1726 | 1738 | let estPut = estimatePutOperation("", 500000, inAmAssetAmt, amAssetId, inPrAssetAmt, prAssetId, "", true, false) | |
1727 | 1739 | let calcLpAmt = estPut._1 | |
1728 | 1740 | let curPriceCalc = estPut._3 | |
1729 | 1741 | let amBalance = estPut._4 | |
1730 | 1742 | let prBalance = estPut._5 | |
1731 | 1743 | let lpEmission = estPut._6 | |
1732 | 1744 | $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)) | |
1733 | 1745 | } | |
1734 | 1746 | ||
1735 | 1747 | ||
1736 | 1748 | ||
1737 | 1749 | @Callable(i) | |
1738 | 1750 | func evaluatePutByPriceAssetREADONLY (inPrAssetAmt) = { | |
1739 | 1751 | let cfg = getPoolConfig() | |
1740 | 1752 | let lpAssetId = fromBase58String(cfg[idxPoolLPAssetId]) | |
1741 | 1753 | let amAssetIdStr = cfg[idxAmtAssetId] | |
1742 | 1754 | let amAssetId = fromBase58String(amAssetIdStr) | |
1743 | 1755 | let prAssetIdStr = cfg[idxPriceAssetId] | |
1744 | 1756 | let prAssetId = fromBase58String(prAssetIdStr) | |
1745 | 1757 | let amtAssetDcm = parseIntValue(cfg[idxAmtAssetDcm]) | |
1746 | 1758 | let priceAssetDcm = parseIntValue(cfg[idxPriceAssetDcm]) | |
1747 | 1759 | let poolStatus = cfg[idxPoolStatus] | |
1748 | 1760 | let poolLPBalance = valueOrErrorMessage(assetInfo(lpAssetId), (("Asset " + toBase58String(lpAssetId)) + " doesn't exist")).quantity | |
1749 | 1761 | let amBalanceRaw = getAccBalance(amAssetIdStr) | |
1750 | 1762 | let prBalanceRaw = getAccBalance(prAssetIdStr) | |
1751 | 1763 | let amBalanceRawX18 = toX18(amBalanceRaw, amtAssetDcm) | |
1752 | 1764 | let prBalanceRawX18 = toX18(prBalanceRaw, priceAssetDcm) | |
1753 | 1765 | let curPriceX18 = if ((poolLPBalance == 0)) | |
1754 | 1766 | then zeroBigInt | |
1755 | 1767 | else calcPriceBigInt(prBalanceRawX18, amBalanceRawX18) | |
1756 | 1768 | let inPrAssetAmtX18 = toX18(inPrAssetAmt, priceAssetDcm) | |
1757 | 1769 | let inAmAssetAmtX18 = fraction(inPrAssetAmtX18, scale18, curPriceX18) | |
1758 | 1770 | let inAmAssetAmt = fromX18(inAmAssetAmtX18, amtAssetDcm) | |
1759 | 1771 | let estPut = estimatePutOperation("", 500000, inAmAssetAmt, amAssetId, inPrAssetAmt, prAssetId, "", true, false) | |
1760 | 1772 | let calcLpAmt = estPut._1 | |
1761 | 1773 | let curPriceCalc = estPut._3 | |
1762 | 1774 | let amBalance = estPut._4 | |
1763 | 1775 | let prBalance = estPut._5 | |
1764 | 1776 | let lpEmission = estPut._6 | |
1765 | 1777 | $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)) | |
1766 | 1778 | } | |
1767 | 1779 | ||
1768 | 1780 | ||
1769 | 1781 | ||
1770 | 1782 | @Callable(i) | |
1771 | 1783 | func evaluateGetREADONLY (paymentLpAssetId,paymentLpAmt) = { | |
1772 | 1784 | let res = estimateGetOperation("", paymentLpAssetId, paymentLpAmt, this) | |
1773 | 1785 | let outAmAmt = res._1 | |
1774 | 1786 | let outPrAmt = res._2 | |
1775 | 1787 | let amBalance = res._5 | |
1776 | 1788 | let prBalance = res._6 | |
1777 | 1789 | let lpEmission = res._7 | |
1778 | 1790 | let curPrice = res._8 | |
1779 | 1791 | let poolStatus = parseIntValue(res._9) | |
1780 | 1792 | $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)) | |
1781 | 1793 | } | |
1782 | 1794 | ||
1783 | 1795 | ||
1784 | 1796 | @Verifier(tx) | |
1785 | 1797 | func verify () = { | |
1786 | 1798 | let targetPublicKey = match managerPublicKeyOrUnit() { | |
1787 | 1799 | case pk: ByteVector => | |
1788 | 1800 | pk | |
1789 | 1801 | case _: Unit => | |
1790 | 1802 | tx.senderPublicKey | |
1791 | 1803 | case _ => | |
1792 | 1804 | throw("Match error") | |
1793 | 1805 | } | |
1794 | 1806 | match tx { | |
1795 | 1807 | case order: Order => | |
1796 | 1808 | let matcherPub = getMatcherPubOrFail() | |
1797 | - | let $ | |
1809 | + | let $t06944369560 = if (skipOrderValidation()) | |
1798 | 1810 | then $Tuple2(true, "") | |
1799 | 1811 | else validateMatcherOrderAllowed(order) | |
1800 | - | let orderValid = $ | |
1801 | - | let orderValidInfo = $ | |
1812 | + | let orderValid = $t06944369560._1 | |
1813 | + | let orderValidInfo = $t06944369560._2 | |
1802 | 1814 | let senderValid = sigVerify(order.bodyBytes, order.proofs[0], order.senderPublicKey) | |
1803 | 1815 | let matcherValid = sigVerify(order.bodyBytes, order.proofs[1], matcherPub) | |
1804 | 1816 | if (if (if (orderValid) | |
1805 | 1817 | then senderValid | |
1806 | 1818 | else false) | |
1807 | 1819 | then matcherValid | |
1808 | 1820 | else false) | |
1809 | 1821 | then true | |
1810 | 1822 | else throwOrderError(orderValid, orderValidInfo, senderValid, matcherValid) | |
1811 | 1823 | case s: SetScriptTransaction => | |
1812 | 1824 | if (sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey)) | |
1813 | 1825 | then true | |
1814 | 1826 | else { | |
1815 | 1827 | let newHash = blake2b256(value(s.script)) | |
1816 | 1828 | let allowedHash = fromBase64String(value(getString(factoryContract, keyAllowedLpScriptHash()))) | |
1817 | 1829 | let currentHash = scriptHash(this) | |
1818 | 1830 | if ((allowedHash == newHash)) | |
1819 | 1831 | then (currentHash != newHash) | |
1820 | 1832 | else false | |
1821 | 1833 | } | |
1822 | 1834 | case _ => | |
1823 | 1835 | sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey) | |
1824 | 1836 | } | |
1825 | 1837 | } | |
1826 | 1838 |
github/deemru/w8io/169f3d6 247.86 ms ◑