tx · 838d9aNBMi4kstg36zxLE49tezzDLvMamci9kRLAU3Eb 3Mqo3c7G5qkBfvMMLhriequKQFofhJSP9ip: -0.06200000 Waves 2024.02.21 15:36 [2986007] smart account 3Mqo3c7G5qkBfvMMLhriequKQFofhJSP9ip > SELF 0.00000000 Waves
{ "type": 13, "id": "838d9aNBMi4kstg36zxLE49tezzDLvMamci9kRLAU3Eb", "fee": 6200000, "feeAssetId": null, "timestamp": 1708518915704, "version": 2, "chainId": 84, "sender": "3Mqo3c7G5qkBfvMMLhriequKQFofhJSP9ip", "senderPublicKey": "5A4c5wG6NUWakcEewdfBkkZSvSdZRqo9onS5bqQrv3x1", "proofs": [ "4ytoRcjJhbBRsKumrTEVK3h2tgFQwxPqkntAr4YxiCMB5SFrfQv3wQHFKsSGevVyaHVpaapK2WmmD1bZqbavyuRV" ], "script": "base64:BgKhAQgCEgASBQoDAQQBEgcKBQEEAQgBEgQKAgEEEgMKAQESBAoCAQQSBAoCCAESBAoCCAESBAoCCAESBQoDAQgBEgASBAoCAQESAwoBARIFCgMBAQESBAoCCAgSABIAEgMKAQgSBQoDAQEBEgQKAgEBEgQKAggBEgQKAggIEgsKCQgBAQIBAggEBBIGCgQICAEIEgASAwoBARIDCgEBEgQKAggBhAEACmxQZGVjaW1hbHMACAAGc2NhbGU4AIDC1y8ADHNjYWxlOEJpZ0ludAkAtgIBAIDC1y8AB3NjYWxlMTgJALYCAQCAgJC7utat8A0ACnplcm9CaWdJbnQJALYCAQAAAARiaWcwCQC2AgEAAAAEYmlnMQkAtgIBAAEABGJpZzIJALYCAQACAAt3YXZlc1N0cmluZwIFV0FWRVMAA1NFUAICX18AClBvb2xBY3RpdmUAAQAPUG9vbFB1dERpc2FibGVkAAIAE1Bvb2xNYXRjaGVyRGlzYWJsZWQAAwAMUG9vbFNodXRkb3duAAQADmlkeFBvb2xBZGRyZXNzAAEADWlkeFBvb2xTdGF0dXMAAgAQaWR4UG9vbExQQXNzZXRJZAADAA1pZHhBbXRBc3N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yBAtzZW5kZXJWYWxpZAkA9AMDCAUFb3JkZXIJYm9keUJ5dGVzCQCRAwIIBQVvcmRlcgZwcm9vZnMAAAgFBW9yZGVyD3NlbmRlclB1YmxpY0tleQQMbWF0Y2hlclZhbGlkCQD0AwMIBQVvcmRlcglib2R5Qnl0ZXMJAJEDAggFBW9yZGVyBnByb29mcwABBQptYXRjaGVyUHViAwMDBQpvcmRlclZhbGlkBQtzZW5kZXJWYWxpZAcFDG1hdGNoZXJWYWxpZAcGCQEPdGhyb3dPcmRlckVycm9yBAUKb3JkZXJWYWxpZAUOb3JkZXJWYWxpZEluZm8FC3NlbmRlclZhbGlkBQxtYXRjaGVyVmFsaWQDCQABAgUHJG1hdGNoMAIUU2V0U2NyaXB0VHJhbnNhY3Rpb24EAXMFByRtYXRjaDADCQD0AwMIBQJ0eAlib2R5Qnl0ZXMJAJEDAggFAnR4BnByb29mcwAABQ90YXJnZXRQdWJsaWNLZXkGBAduZXdIYXNoCQD2AwEJAQV2YWx1ZQEIBQFzBnNjcmlwdAQLYWxsb3dlZEhhc2gJANsEAQkBBXZhbHVlAQkAnQgCBQ9mYWN0b3J5Q29udHJhY3QJARZrZXlBbGxvd2VkTHBTY3JpcHRIYXNoAAQLY3VycmVudEhhc2gJAPEHAQUEdGhpcwMJAAACBQthbGxvd2VkSGFzaAUHbmV3SGFzaAkBAiE9AgULY3VycmVudEhhc2gFB25ld0hhc2gHCQD0AwMIBQJ0eAlib2R5Qnl0ZXMJAJEDAggFAnR4BnByb29mcwAABQ90YXJnZXRQdWJsaWNLZXkke20V", "height": 2986007, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: FsiYSLSi2LwLFrvsx8cKu4b35Gx4Zz5UowqZA9H4x5xE Next: HGZ2CAgzanPgqCjsWFqeBrkAaDF3cEErpndPzLAFjDr4 Diff:
Old | New | Differences | |
---|---|---|---|
470 | 470 | then { | |
471 | 471 | let withdrawAmount = (currentAdditionalBalance - newAdditionalBalance) | |
472 | 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)) | |
473 | + | then if ((withdrawAmount == 0)) | |
474 | + | then nil | |
475 | + | else if ((0 > withdrawAmount)) | |
476 | + | then deposit(assetId, -(withdrawAmount), proxyAssetId, addressFromStringValue(proxyAddress)) | |
477 | + | else withdraw(assetId, withdrawAmount, proxyAssetId, addressFromStringValue(proxyAddress), proxyRateMul, addressFromStringValue(stakingProfitAddress)) | |
476 | 478 | else throw("Strict value is not equal to itself.") | |
477 | 479 | } | |
478 | 480 | else throw("Strict value is not equal to itself.") | |
676 | 678 | let priceAssetBalance = getAccBalance(assetIdToString(cfgPriceAssetId)) | |
677 | 679 | let amountAssetAmount = order.amount | |
678 | 680 | let priceAssetAmount = fraction(order.amount, order.price, scale8, FLOOR) | |
679 | - | let $ | |
681 | + | let $t02951729729 = if ((order.orderType == Buy)) | |
680 | 682 | then $Tuple2(amountAssetAmount, -(priceAssetAmount)) | |
681 | 683 | else $Tuple2(-(amountAssetAmount), priceAssetAmount) | |
682 | - | let amountAssetBalanceDelta = $ | |
683 | - | let priceAssetBalanceDelta = $ | |
684 | + | let amountAssetBalanceDelta = $t02951729729._1 | |
685 | + | let priceAssetBalanceDelta = $t02951729729._2 | |
684 | 686 | if (if (if (isGlobalShutdown()) | |
685 | 687 | then true | |
686 | 688 | else (cfgPoolStatus == PoolMatcherDisabled)) | |
693 | 695 | then throw("Wrong order assets.") | |
694 | 696 | else { | |
695 | 697 | let kLp = valueOrErrorMessage(parseBigInt(valueOrElse(getString(this, keyKLp), "0")), fmtErr("invalid kLp")) | |
696 | - | let $ | |
697 | - | let unusedActions = $ | |
698 | - | let kLpNew = $ | |
698 | + | let $t03016930269 = refreshKLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0) | |
699 | + | let unusedActions = $t03016930269._1 | |
700 | + | let kLpNew = $t03016930269._2 | |
699 | 701 | let isOrderValid = (kLpNew >= kLp) | |
700 | 702 | let info = makeString(["kLp=", toString(kLp), " kLpNew=", toString(kLpNew), " amountAssetBalance=", toString(amountAssetBalance), " priceAssetBalance=", toString(priceAssetBalance), " amountAssetBalanceDelta=", toString(amountAssetBalanceDelta), " priceAssetBalanceDelta=", toString(priceAssetBalanceDelta), " height=", toString(height)], "") | |
701 | 703 | $Tuple2(isOrderValid, info) | |
778 | 780 | else if ((paymentAssetId == cfgPriceAssetId)) | |
779 | 781 | then false | |
780 | 782 | else throwErr("invalid asset") | |
781 | - | let $ | |
783 | + | let $t03345533748 = if (isEval) | |
782 | 784 | then $Tuple2(amountBalanceRaw, priceBalanceRaw) | |
783 | 785 | else if (paymentInAmountAsset) | |
784 | 786 | then $Tuple2((amountBalanceRaw - paymentAmountRaw), priceBalanceRaw) | |
785 | 787 | else $Tuple2(amountBalanceRaw, (priceBalanceRaw - paymentAmountRaw)) | |
786 | - | let amountBalanceOld = $ | |
787 | - | let priceBalanceOld = $ | |
788 | - | let $ | |
788 | + | let amountBalanceOld = $t03345533748._1 | |
789 | + | let priceBalanceOld = $t03345533748._2 | |
790 | + | let $t03375233901 = if (paymentInAmountAsset) | |
789 | 791 | then $Tuple2(paymentAmountRaw, 0) | |
790 | 792 | else $Tuple2(0, paymentAmountRaw) | |
791 | - | let amountAssetAmountRaw = $ | |
792 | - | let priceAssetAmountRaw = $ | |
793 | + | let amountAssetAmountRaw = $t03375233901._1 | |
794 | + | let priceAssetAmountRaw = $t03375233901._2 | |
793 | 795 | let amountAssetAmount = takeFee(amountAssetAmountRaw, inFee)._1 | |
794 | 796 | let priceAssetAmount = takeFee(priceAssetAmountRaw, inFee)._1 | |
795 | - | let $ | |
796 | - | let paymentAmount = $ | |
797 | - | let feeAmount = $ | |
797 | + | let $t03403334097 = takeFee(paymentAmountRaw, inFee) | |
798 | + | let paymentAmount = $t03403334097._1 | |
799 | + | let feeAmount = $t03403334097._2 | |
798 | 800 | let amountBalanceNew = (amountBalanceOld + amountAssetAmount) | |
799 | 801 | let priceBalanceNew = (priceBalanceOld + priceAssetAmount) | |
800 | 802 | let priceNewX18 = calcPriceBigInt(toX18(priceBalanceNew, cfgPriceAssetDecimals), toX18(amountBalanceNew, cfgAmountAssetDecimals)) | |
817 | 819 | let priceOldX18 = calcPriceBigInt(toX18(priceBalanceOld, cfgPriceAssetDecimals), toX18(amountBalanceOld, cfgAmountAssetDecimals)) | |
818 | 820 | let priceOld = fromX18(priceOldX18, scale8) | |
819 | 821 | let loss = { | |
820 | - | let $ | |
822 | + | let $t03577835945 = if (paymentInAmountAsset) | |
821 | 823 | then $Tuple2(amountAssetAmountRaw, amountBalanceOld) | |
822 | 824 | else $Tuple2(priceAssetAmountRaw, priceBalanceOld) | |
823 | - | let amount = $ | |
824 | - | let balance = $ | |
825 | + | let amount = $t03577835945._1 | |
826 | + | let balance = $t03577835945._2 | |
825 | 827 | let issueAmountBoth = toInt(fraction(supplyBigInt, toBigInt((amount / 2)), toBigInt(balance))) | |
826 | 828 | fraction((issueAmount - issueAmountBoth), scale8, issueAmountBoth) | |
827 | 829 | } | |
861 | 863 | let supplyBigInt = toBigInt(valueOrErrorMessage(assetInfo(cfgLpAssetId), (("asset " + toBase58String(cfgLpAssetId)) + " doesn't exist")).quantity) | |
862 | 864 | let redeemedBigInt = toBigInt(paymentAmount) | |
863 | 865 | let amountRaw = max([0, toInt(((balanceBigInt * (scale18 - pow((scale18 - ((redeemedBigInt * scale18) / supplyBigInt)), 18, big2, 0, 18, DOWN))) / scale18))]) | |
864 | - | let $ | |
865 | - | let totalAmount = $ | |
866 | - | let feeAmount = $ | |
867 | - | let $ | |
866 | + | let $t03802338079 = takeFee(amountRaw, outFee) | |
867 | + | let totalAmount = $t03802338079._1 | |
868 | + | let feeAmount = $t03802338079._2 | |
869 | + | let $t03808338309 = if (outInAmountAsset) | |
868 | 870 | then $Tuple4(totalAmount, 0, (amBalanceOld - amountRaw), prBalanceOld) | |
869 | 871 | else $Tuple4(0, totalAmount, amBalanceOld, (prBalanceOld - amountRaw)) | |
870 | - | let outAmAmount = $ | |
871 | - | let outPrAmount = $ | |
872 | - | let amBalanceNew = $ | |
873 | - | let prBalanceNew = $ | |
872 | + | let outAmAmount = $t03808338309._1 | |
873 | + | let outPrAmount = $t03808338309._2 | |
874 | + | let amBalanceNew = $t03808338309._3 | |
875 | + | let prBalanceNew = $t03808338309._4 | |
874 | 876 | let priceNewX18 = calcPriceBigInt(toX18(prBalanceNew, cfgPriceAssetDecimals), toX18(amBalanceNew, cfgAmountAssetDecimals)) | |
875 | 877 | let priceNew = fromX18(priceNewX18, scale8) | |
876 | 878 | let commonState = if (isEval) | |
935 | 937 | ||
936 | 938 | @Callable(i) | |
937 | 939 | func calculateAmountOutForSwapREADONLY (cleanAmountIn,isReverse,feePoolAmount) = { | |
938 | - | let $ | |
940 | + | let $t04016740472 = if ((isReverse == false)) | |
939 | 941 | then { | |
940 | 942 | let assetOut = getStringOrFail(this, pa()) | |
941 | 943 | let assetIn = getStringOrFail(this, aa()) | |
946 | 948 | let assetIn = getStringOrFail(this, pa()) | |
947 | 949 | $Tuple2(assetOut, assetIn) | |
948 | 950 | } | |
949 | - | let assetOut = $ | |
950 | - | let assetIn = $ | |
951 | + | let assetOut = $t04016740472._1 | |
952 | + | let assetIn = $t04016740472._2 | |
951 | 953 | let poolAssetInBalance = getAccBalance(assetIn) | |
952 | 954 | let poolAssetOutBalance = getAccBalance(assetOut) | |
953 | 955 | let amountOut = fraction(poolAssetOutBalance, cleanAmountIn, (poolAssetInBalance + cleanAmountIn)) | |
1091 | 1093 | else throw("Strict value is not equal to itself.") | |
1092 | 1094 | } | |
1093 | 1095 | else [ScriptTransfer(i.caller, emitLpAmt, lpAssetId)] | |
1094 | - | let $ | |
1095 | - | if (($ | |
1096 | + | let $t04564846110 = refreshKLpInternal(0, 0, 0) | |
1097 | + | if (($t04564846110 == $t04564846110)) | |
1096 | 1098 | then { | |
1097 | - | let updatedKLp = $ | |
1098 | - | let refreshKLpActions = $ | |
1099 | + | let updatedKLp = $t04564846110._2 | |
1100 | + | let refreshKLpActions = $t04564846110._1 | |
1099 | 1101 | let isUpdatedKLpValid = validateUpdatedKLp(currentKLp, updatedKLp) | |
1100 | 1102 | if ((isUpdatedKLpValid == isUpdatedKLpValid)) | |
1101 | 1103 | then { | |
1132 | 1134 | let currentKLp = calcCurrentKLp(amAssetPmt, prAssetPmt, toBigInt(0)) | |
1133 | 1135 | if ((currentKLp == currentKLp)) | |
1134 | 1136 | then { | |
1135 | - | let $ | |
1136 | - | let refreshKLpActions = $ | |
1137 | - | let updatedKLp = $ | |
1137 | + | let $t04672246787 = refreshKLpInternal(0, 0, 0) | |
1138 | + | let refreshKLpActions = $t04672246787._1 | |
1139 | + | let updatedKLp = $t04672246787._2 | |
1138 | 1140 | let isUpdatedKLpValid = validateUpdatedKLp(currentKLp, updatedKLp) | |
1139 | 1141 | if ((isUpdatedKLpValid == isUpdatedKLpValid)) | |
1140 | 1142 | then (state ++ refreshKLpActions) | |
1183 | 1185 | then { | |
1184 | 1186 | let userAddress = i.caller | |
1185 | 1187 | let txId = i.transactionId | |
1186 | - | let $ | |
1187 | - | if (($ | |
1188 | + | let $t04801648168 = calcPutOneToken(paymentAmountRaw, paymentAssetId, userAddress, txId) | |
1189 | + | if (($t04801648168 == $t04801648168)) | |
1188 | 1190 | then { | |
1189 | - | let paymentInAmountAsset = $ | |
1190 | - | let bonus = $ | |
1191 | - | let feeAmount = $ | |
1192 | - | let commonState = $ | |
1193 | - | let emitAmountEstimated = $ | |
1191 | + | let paymentInAmountAsset = $t04801648168._5 | |
1192 | + | let bonus = $t04801648168._4 | |
1193 | + | let feeAmount = $t04801648168._3 | |
1194 | + | let commonState = $t04801648168._2 | |
1195 | + | let emitAmountEstimated = $t04801648168._1 | |
1194 | 1196 | let emitAmount = if (if ((minOutAmount > 0)) | |
1195 | 1197 | then (minOutAmount > emitAmountEstimated) | |
1196 | 1198 | else false) | |
1210 | 1212 | let sendFee = if ((feeAmount > 0)) | |
1211 | 1213 | then [ScriptTransfer(feeCollectorAddress, feeAmount, paymentAssetId)] | |
1212 | 1214 | else nil | |
1213 | - | let $ | |
1215 | + | let $t04875448951 = if ((this == feeCollectorAddress)) | |
1214 | 1216 | then $Tuple2(0, 0) | |
1215 | 1217 | else if (paymentInAmountAsset) | |
1216 | 1218 | then $Tuple2(-(feeAmount), 0) | |
1217 | 1219 | else $Tuple2(0, -(feeAmount)) | |
1218 | - | let amountAssetBalanceDelta = $ | |
1219 | - | let priceAssetBalanceDelta = $ | |
1220 | - | let $ | |
1221 | - | let refreshKLpActions = $ | |
1222 | - | let updatedKLp = $ | |
1220 | + | let amountAssetBalanceDelta = $t04875448951._1 | |
1221 | + | let priceAssetBalanceDelta = $t04875448951._2 | |
1222 | + | let $t04895449062 = refreshKLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0) | |
1223 | + | let refreshKLpActions = $t04895449062._1 | |
1224 | + | let updatedKLp = $t04895449062._2 | |
1223 | 1225 | let kLp = value(getString(keyKLp)) | |
1224 | 1226 | let isUpdatedKLpValid = validateUpdatedKLp(currentKLp, updatedKLp) | |
1225 | 1227 | if ((isUpdatedKLpValid == isUpdatedKLpValid)) | |
1244 | 1246 | ||
1245 | 1247 | @Callable(i) | |
1246 | 1248 | func putOneTknREADONLY (paymentAssetId,paymentAmountRaw) = { | |
1247 | - | let $ | |
1248 | - | let emitAmountEstimated = $ | |
1249 | - | let commonState = $ | |
1250 | - | let feeAmount = $ | |
1251 | - | let bonus = $ | |
1252 | - | let paymentInAmountAsset = $ | |
1249 | + | let $t04941749574 = calcPutOneToken(paymentAmountRaw, parseAssetId(paymentAssetId), unit, unit) | |
1250 | + | let emitAmountEstimated = $t04941749574._1 | |
1251 | + | let commonState = $t04941749574._2 | |
1252 | + | let feeAmount = $t04941749574._3 | |
1253 | + | let bonus = $t04941749574._4 | |
1254 | + | let paymentInAmountAsset = $t04941749574._5 | |
1253 | 1255 | $Tuple2(nil, $Tuple3(emitAmountEstimated, feeAmount, bonus)) | |
1254 | 1256 | } | |
1255 | 1257 | ||
1288 | 1290 | then { | |
1289 | 1291 | let userAddress = i.caller | |
1290 | 1292 | let txId = i.transactionId | |
1291 | - | let $ | |
1292 | - | if (($ | |
1293 | + | let $t05049650649 = calcGetOneToken(outAssetId, paymentAmount, paymentAssetId, userAddress, txId) | |
1294 | + | if (($t05049650649 == $t05049650649)) | |
1293 | 1295 | then { | |
1294 | - | let outInAmountAsset = $ | |
1295 | - | let bonus = $ | |
1296 | - | let feeAmount = $ | |
1297 | - | let commonState = $ | |
1298 | - | let amountEstimated = $ | |
1296 | + | let outInAmountAsset = $t05049650649._5 | |
1297 | + | let bonus = $t05049650649._4 | |
1298 | + | let feeAmount = $t05049650649._3 | |
1299 | + | let commonState = $t05049650649._2 | |
1300 | + | let amountEstimated = $t05049650649._1 | |
1299 | 1301 | let amount = if (if ((minOutAmount > 0)) | |
1300 | 1302 | then (minOutAmount > amountEstimated) | |
1301 | 1303 | else false) | |
1309 | 1311 | let sendFee = if ((feeAmount > 0)) | |
1310 | 1312 | then [ScriptTransfer(feeCollectorAddress, feeAmount, outAssetId)] | |
1311 | 1313 | else nil | |
1312 | - | let $ | |
1314 | + | let $t05131351560 = { | |
1313 | 1315 | let feeAmountForCalc = if ((this == feeCollectorAddress)) | |
1314 | 1316 | then 0 | |
1315 | 1317 | else feeAmount | |
1317 | 1319 | then $Tuple2(-((amount + feeAmountForCalc)), 0) | |
1318 | 1320 | else $Tuple2(0, -((amount + feeAmountForCalc))) | |
1319 | 1321 | } | |
1320 | - | let amountAssetBalanceDelta = $ | |
1321 | - | let priceAssetBalanceDelta = $ | |
1322 | - | let $ | |
1323 | - | let refreshKLpActions = $ | |
1324 | - | let updatedKLp = $ | |
1322 | + | let amountAssetBalanceDelta = $t05131351560._1 | |
1323 | + | let priceAssetBalanceDelta = $t05131351560._2 | |
1324 | + | let $t05156351671 = refreshKLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0) | |
1325 | + | let refreshKLpActions = $t05156351671._1 | |
1326 | + | let updatedKLp = $t05156351671._2 | |
1325 | 1327 | let isUpdatedKLpValid = validateUpdatedKLp(currentKLp, updatedKLp) | |
1326 | 1328 | if ((isUpdatedKLpValid == isUpdatedKLpValid)) | |
1327 | 1329 | then $Tuple2(((((commonState ++ withdrawState) ++ assetTransfer) ++ sendFee) ++ refreshKLpActions), amount) | |
1340 | 1342 | ||
1341 | 1343 | @Callable(i) | |
1342 | 1344 | func getOneTknREADONLY (outAssetId,paymentAmount) = { | |
1343 | - | let $ | |
1344 | - | let amountEstimated = $ | |
1345 | - | let commonState = $ | |
1346 | - | let feeAmount = $ | |
1347 | - | let bonus = $ | |
1348 | - | let outInAmountAsset = $ | |
1345 | + | let $t05194952105 = calcGetOneToken(parseAssetId(outAssetId), paymentAmount, cfgLpAssetId, unit, unit) | |
1346 | + | let amountEstimated = $t05194952105._1 | |
1347 | + | let commonState = $t05194952105._2 | |
1348 | + | let feeAmount = $t05194952105._3 | |
1349 | + | let bonus = $t05194952105._4 | |
1350 | + | let outInAmountAsset = $t05194952105._5 | |
1349 | 1351 | $Tuple2(nil, $Tuple3(amountEstimated, feeAmount, bonus)) | |
1350 | 1352 | } | |
1351 | 1353 | ||
1384 | 1386 | let unstakeInv = invoke(stakingContract, "unstake", [toBase58String(cfgLpAssetId), unstakeAmount], nil) | |
1385 | 1387 | if ((unstakeInv == unstakeInv)) | |
1386 | 1388 | then { | |
1387 | - | let $ | |
1388 | - | if (($ | |
1389 | + | let $t05304753198 = calcGetOneToken(outAssetId, unstakeAmount, cfgLpAssetId, userAddress, txId) | |
1390 | + | if (($t05304753198 == $t05304753198)) | |
1389 | 1391 | then { | |
1390 | - | let outInAmountAsset = $ | |
1391 | - | let bonus = $ | |
1392 | - | let feeAmount = $ | |
1393 | - | let commonState = $ | |
1394 | - | let amountEstimated = $ | |
1392 | + | let outInAmountAsset = $t05304753198._5 | |
1393 | + | let bonus = $t05304753198._4 | |
1394 | + | let feeAmount = $t05304753198._3 | |
1395 | + | let commonState = $t05304753198._2 | |
1396 | + | let amountEstimated = $t05304753198._1 | |
1395 | 1397 | let amount = if (if ((minOutAmount > 0)) | |
1396 | 1398 | then (minOutAmount > amountEstimated) | |
1397 | 1399 | else false) | |
1405 | 1407 | let sendFee = if ((feeAmount > 0)) | |
1406 | 1408 | then [ScriptTransfer(feeCollectorAddress, feeAmount, outAssetId)] | |
1407 | 1409 | else nil | |
1408 | - | let $ | |
1410 | + | let $t05385754104 = { | |
1409 | 1411 | let feeAmountForCalc = if ((this == feeCollectorAddress)) | |
1410 | 1412 | then 0 | |
1411 | 1413 | else feeAmount | |
1413 | 1415 | then $Tuple2(-((amount + feeAmountForCalc)), 0) | |
1414 | 1416 | else $Tuple2(0, -((amount + feeAmountForCalc))) | |
1415 | 1417 | } | |
1416 | - | let amountAssetBalanceDelta = $ | |
1417 | - | let priceAssetBalanceDelta = $ | |
1418 | - | let $ | |
1419 | - | let refreshKLpActions = $ | |
1420 | - | let updatedKLp = $ | |
1418 | + | let amountAssetBalanceDelta = $t05385754104._1 | |
1419 | + | let priceAssetBalanceDelta = $t05385754104._2 | |
1420 | + | let $t05410754215 = refreshKLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0) | |
1421 | + | let refreshKLpActions = $t05410754215._1 | |
1422 | + | let updatedKLp = $t05410754215._2 | |
1421 | 1423 | let isUpdatedKLpValid = validateUpdatedKLp(currentKLp, updatedKLp) | |
1422 | 1424 | if ((isUpdatedKLpValid == isUpdatedKLpValid)) | |
1423 | 1425 | then $Tuple2(((((commonState ++ withdrawState) ++ assetTransfer) ++ sendFee) ++ refreshKLpActions), amount) | |
1451 | 1453 | let burnLPAssetOnFactory = invoke(factoryContract, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)]) | |
1452 | 1454 | if ((burnLPAssetOnFactory == burnLPAssetOnFactory)) | |
1453 | 1455 | then { | |
1454 | - | let $ | |
1455 | - | let refreshKLpActions = $ | |
1456 | - | let updatedKLp = $ | |
1456 | + | let $t05531055391 = refreshKLpInternal(-(outAmAmt), -(outPrAmt), 0) | |
1457 | + | let refreshKLpActions = $t05531055391._1 | |
1458 | + | let updatedKLp = $t05531055391._2 | |
1457 | 1459 | let isUpdatedKLpValid = validateUpdatedKLp(currentKLp, updatedKLp) | |
1458 | 1460 | if ((isUpdatedKLpValid == isUpdatedKLpValid)) | |
1459 | 1461 | then ((withdrawState ++ state) ++ refreshKLpActions) | |
1486 | 1488 | let burnLPAssetOnFactory = invoke(factoryContract, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)]) | |
1487 | 1489 | if ((burnLPAssetOnFactory == burnLPAssetOnFactory)) | |
1488 | 1490 | then { | |
1489 | - | let $ | |
1490 | - | let refreshKLpActions = $ | |
1491 | - | let updatedKLp = $ | |
1491 | + | let $t05648656567 = refreshKLpInternal(-(outAmAmt), -(outPrAmt), 0) | |
1492 | + | let refreshKLpActions = $t05648656567._1 | |
1493 | + | let updatedKLp = $t05648656567._2 | |
1492 | 1494 | let isUpdatedKLpValid = validateUpdatedKLp(currentKLp, updatedKLp) | |
1493 | 1495 | if ((isUpdatedKLpValid == isUpdatedKLpValid)) | |
1494 | 1496 | then ((withdrawState ++ state) ++ refreshKLpActions) | |
1536 | 1538 | let burnLPAssetOnFactory = invoke(factoryContract, "burn", [amount], [AttachedPayment(lpAssetId, amount)]) | |
1537 | 1539 | if ((burnLPAssetOnFactory == burnLPAssetOnFactory)) | |
1538 | 1540 | then { | |
1539 | - | let $ | |
1540 | - | let refreshKLpActions = $ | |
1541 | - | let updatedKLp = $ | |
1541 | + | let $t05791557996 = refreshKLpInternal(-(outAmAmt), -(outPrAmt), 0) | |
1542 | + | let refreshKLpActions = $t05791557996._1 | |
1543 | + | let updatedKLp = $t05791557996._2 | |
1542 | 1544 | let isUpdatedKLpValid = validateUpdatedKLp(currentKLp, updatedKLp) | |
1543 | 1545 | if ((isUpdatedKLpValid == isUpdatedKLpValid)) | |
1544 | 1546 | then ((withdrawState ++ state) ++ refreshKLpActions) | |
1592 | 1594 | let burnLPAssetOnFactory = invoke(factoryContract, "burn", [unstakeAmount], [AttachedPayment(cfgLpAssetId, unstakeAmount)]) | |
1593 | 1595 | if ((burnLPAssetOnFactory == burnLPAssetOnFactory)) | |
1594 | 1596 | then { | |
1595 | - | let $ | |
1596 | - | let refreshKLpActions = $ | |
1597 | - | let updatedKLp = $ | |
1597 | + | let $t05947459555 = refreshKLpInternal(-(outAmAmt), -(outPrAmt), 0) | |
1598 | + | let refreshKLpActions = $t05947459555._1 | |
1599 | + | let updatedKLp = $t05947459555._2 | |
1598 | 1600 | let isUpdatedKLpValid = validateUpdatedKLp(currentKLp, updatedKLp) | |
1599 | 1601 | if ((isUpdatedKLpValid == isUpdatedKLpValid)) | |
1600 | 1602 | then ((withdrawState ++ state) ++ refreshKLpActions) | |
1629 | 1631 | if ((checkLastRefreshedBlockHeight == checkLastRefreshedBlockHeight)) | |
1630 | 1632 | then { | |
1631 | 1633 | let kLp = valueOrErrorMessage(parseBigInt(valueOrElse(getString(this, keyKLp), "0")), fmtErr("invalid kLp")) | |
1632 | - | let $ | |
1633 | - | let kLpUpdateActions = $ | |
1634 | - | let updatedKLp = $ | |
1634 | + | let $t06075960823 = refreshKLpInternal(0, 0, 0) | |
1635 | + | let kLpUpdateActions = $t06075960823._1 | |
1636 | + | let updatedKLp = $t06075960823._2 | |
1635 | 1637 | let actions = if ((kLp != updatedKLp)) | |
1636 | 1638 | then kLpUpdateActions | |
1637 | 1639 | else throwErr("nothing to refresh") | |
1806 | 1808 | match tx { | |
1807 | 1809 | case order: Order => | |
1808 | 1810 | let matcherPub = getMatcherPubOrFail() | |
1809 | - | let $ | |
1811 | + | let $t06948569602 = if (skipOrderValidation()) | |
1810 | 1812 | then $Tuple2(true, "") | |
1811 | 1813 | else validateMatcherOrderAllowed(order) | |
1812 | - | let orderValid = $ | |
1813 | - | let orderValidInfo = $ | |
1814 | + | let orderValid = $t06948569602._1 | |
1815 | + | let orderValidInfo = $t06948569602._2 | |
1814 | 1816 | let senderValid = sigVerify(order.bodyBytes, order.proofs[0], order.senderPublicKey) | |
1815 | 1817 | let matcherValid = sigVerify(order.bodyBytes, order.proofs[1], matcherPub) | |
1816 | 1818 | 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 | 457 | let currentStakingAssetBalance = getStakingAssetBalanceOrZero(proxyAssetId) | |
458 | 458 | if ((currentStakingAssetBalance == currentStakingAssetBalance)) | |
459 | 459 | then { | |
460 | 460 | let currentAdditionalBalance = if ((currentStakingAssetBalance != 0)) | |
461 | 461 | then getAdditionalBalanceOrZero(assetId) | |
462 | 462 | else 0 | |
463 | 463 | if ((currentAdditionalBalance == currentAdditionalBalance)) | |
464 | 464 | then { | |
465 | 465 | let newTotalLeasableBalance = max([0, ((getAccBalance(assetId) - getAmount) - minBalance)]) | |
466 | 466 | if ((newTotalLeasableBalance == newTotalLeasableBalance)) | |
467 | 467 | then { | |
468 | 468 | let newAdditionalBalance = fraction(leasedRatio, newTotalLeasableBalance, 100) | |
469 | 469 | if ((newAdditionalBalance == newAdditionalBalance)) | |
470 | 470 | then { | |
471 | 471 | let withdrawAmount = (currentAdditionalBalance - newAdditionalBalance) | |
472 | 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)) | |
473 | + | then if ((withdrawAmount == 0)) | |
474 | + | then nil | |
475 | + | else if ((0 > withdrawAmount)) | |
476 | + | then deposit(assetId, -(withdrawAmount), proxyAssetId, addressFromStringValue(proxyAddress)) | |
477 | + | else withdraw(assetId, withdrawAmount, proxyAssetId, addressFromStringValue(proxyAddress), proxyRateMul, addressFromStringValue(stakingProfitAddress)) | |
476 | 478 | else throw("Strict value is not equal to itself.") | |
477 | 479 | } | |
478 | 480 | else throw("Strict value is not equal to itself.") | |
479 | 481 | } | |
480 | 482 | else throw("Strict value is not equal to itself.") | |
481 | 483 | } | |
482 | 484 | else throw("Strict value is not equal to itself.") | |
483 | 485 | } | |
484 | 486 | else throw("Strict value is not equal to itself.") | |
485 | 487 | } | |
486 | 488 | else nil | |
487 | 489 | } | |
488 | 490 | ||
489 | 491 | ||
490 | 492 | func withdrawAndRebalanceAll (amountAssetOutAmount,priceAssetOutAmount) = { | |
491 | 493 | let AmAmtWithdrawState = withdrawAndRebalanceAsset(getStringOrFail(this, aa()), amountAssetOutAmount) | |
492 | 494 | let PrAmtWithdrawState = withdrawAndRebalanceAsset(getStringOrFail(this, pa()), priceAssetOutAmount) | |
493 | 495 | (AmAmtWithdrawState ++ PrAmtWithdrawState) | |
494 | 496 | } | |
495 | 497 | ||
496 | 498 | ||
497 | 499 | func privateCalcPrice (amAssetDcm,prAssetDcm,amAmt,prAmt) = { | |
498 | 500 | let amtAssetAmtX18 = toX18(amAmt, amAssetDcm) | |
499 | 501 | let priceAssetAmtX18 = toX18(prAmt, prAssetDcm) | |
500 | 502 | calcPriceBigInt(priceAssetAmtX18, amtAssetAmtX18) | |
501 | 503 | } | |
502 | 504 | ||
503 | 505 | ||
504 | 506 | func calcPrices (amAmt,prAmt,lpAmt) = { | |
505 | 507 | let cfg = getPoolConfig() | |
506 | 508 | let amtAssetDcm = parseIntValue(cfg[idxAmtAssetDcm]) | |
507 | 509 | let priceAssetDcm = parseIntValue(cfg[idxPriceAssetDcm]) | |
508 | 510 | let priceX18 = privateCalcPrice(amtAssetDcm, priceAssetDcm, amAmt, prAmt) | |
509 | 511 | let amAmtX18 = toX18(amAmt, amtAssetDcm) | |
510 | 512 | let prAmtX18 = toX18(prAmt, priceAssetDcm) | |
511 | 513 | let lpAmtX18 = toX18(lpAmt, scale8) | |
512 | 514 | let lpPriceInAmAssetX18 = calcPriceBigInt(amAmtX18, lpAmtX18) | |
513 | 515 | let lpPriceInPrAssetX18 = calcPriceBigInt(prAmtX18, lpAmtX18) | |
514 | 516 | [priceX18, lpPriceInAmAssetX18, lpPriceInPrAssetX18] | |
515 | 517 | } | |
516 | 518 | ||
517 | 519 | ||
518 | 520 | func calculatePrices (amAmt,prAmt,lpAmt) = { | |
519 | 521 | let prices = calcPrices(amAmt, prAmt, lpAmt) | |
520 | 522 | [fromX18(prices[0], scale8), fromX18(prices[1], scale8), fromX18(prices[2], scale8)] | |
521 | 523 | } | |
522 | 524 | ||
523 | 525 | ||
524 | 526 | func estimateGetOperation (txId58,pmtAssetId,pmtLpAmt,userAddress) = { | |
525 | 527 | let cfg = getPoolConfig() | |
526 | 528 | let lpAssetId = cfg[idxPoolLPAssetId] | |
527 | 529 | let amAssetId = cfg[idxAmtAssetId] | |
528 | 530 | let prAssetId = cfg[idxPriceAssetId] | |
529 | 531 | let amAssetDcm = parseIntValue(cfg[idxAmtAssetDcm]) | |
530 | 532 | let prAssetDcm = parseIntValue(cfg[idxPriceAssetDcm]) | |
531 | 533 | let poolStatus = cfg[idxPoolStatus] | |
532 | 534 | let lpEmission = valueOrErrorMessage(assetInfo(fromBase58String(lpAssetId)), (("Asset " + lpAssetId) + " doesn't exist")).quantity | |
533 | 535 | if ((lpAssetId != pmtAssetId)) | |
534 | 536 | then throw("Invalid asset passed.") | |
535 | 537 | else { | |
536 | 538 | let amBalance = getAccBalance(amAssetId) | |
537 | 539 | let amBalanceX18 = toX18(amBalance, amAssetDcm) | |
538 | 540 | let prBalance = getAccBalance(prAssetId) | |
539 | 541 | let prBalanceX18 = toX18(prBalance, prAssetDcm) | |
540 | 542 | let curPriceX18 = calcPriceBigInt(prBalanceX18, amBalanceX18) | |
541 | 543 | let curPrice = fromX18(curPriceX18, scale8) | |
542 | 544 | let pmtLpAmtX18 = toX18(pmtLpAmt, scale8) | |
543 | 545 | let lpEmissionX18 = toX18(lpEmission, scale8) | |
544 | 546 | let outAmAmtX18 = fraction(amBalanceX18, pmtLpAmtX18, lpEmissionX18) | |
545 | 547 | let outPrAmtX18 = fraction(prBalanceX18, pmtLpAmtX18, lpEmissionX18) | |
546 | 548 | let outAmAmt = fromX18Round(outAmAmtX18, amAssetDcm, FLOOR) | |
547 | 549 | let outPrAmt = fromX18Round(outPrAmtX18, prAssetDcm, FLOOR) | |
548 | 550 | let state = if ((txId58 == "")) | |
549 | 551 | then nil | |
550 | 552 | else [ScriptTransfer(userAddress, outAmAmt, if ((amAssetId == "WAVES")) | |
551 | 553 | then unit | |
552 | 554 | else fromBase58String(amAssetId)), ScriptTransfer(userAddress, outPrAmt, if ((prAssetId == "WAVES")) | |
553 | 555 | then unit | |
554 | 556 | 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)] | |
555 | 557 | $Tuple10(outAmAmt, outPrAmt, amAssetId, prAssetId, amBalance, prBalance, lpEmission, curPriceX18, poolStatus, state) | |
556 | 558 | } | |
557 | 559 | } | |
558 | 560 | ||
559 | 561 | ||
560 | 562 | func estimatePutOperation (txId58,slippageTolerance,inAmAssetAmt,inAmAssetId,inPrAssetAmt,inPrAssetId,userAddress,isEvaluate,emitLp) = { | |
561 | 563 | let cfg = getPoolConfig() | |
562 | 564 | let lpAssetId = fromBase58String(cfg[idxPoolLPAssetId]) | |
563 | 565 | let amAssetIdStr = cfg[idxAmtAssetId] | |
564 | 566 | let prAssetIdStr = cfg[idxPriceAssetId] | |
565 | 567 | let iAmtAssetId = cfg[idxIAmtAssetId] | |
566 | 568 | let iPriceAssetId = cfg[idxIPriceAssetId] | |
567 | 569 | let amtAssetDcm = parseIntValue(cfg[idxAmtAssetDcm]) | |
568 | 570 | let priceAssetDcm = parseIntValue(cfg[idxPriceAssetDcm]) | |
569 | 571 | let poolStatus = cfg[idxPoolStatus] | |
570 | 572 | let lpEmission = valueOrErrorMessage(assetInfo(lpAssetId), (("Asset " + toBase58String(lpAssetId)) + " doesn't exist")).quantity | |
571 | 573 | let inAmAssetIdStr = toBase58String(valueOrElse(inAmAssetId, fromBase58String("WAVES"))) | |
572 | 574 | let inPrAssetIdStr = toBase58String(valueOrElse(inPrAssetId, fromBase58String("WAVES"))) | |
573 | 575 | if (if ((amAssetIdStr != inAmAssetIdStr)) | |
574 | 576 | then true | |
575 | 577 | else (prAssetIdStr != inPrAssetIdStr)) | |
576 | 578 | then throw("Invalid amt or price asset passed.") | |
577 | 579 | else { | |
578 | 580 | let amBalance = if (isEvaluate) | |
579 | 581 | then getAccBalance(amAssetIdStr) | |
580 | 582 | else (getAccBalance(amAssetIdStr) - inAmAssetAmt) | |
581 | 583 | let prBalance = if (isEvaluate) | |
582 | 584 | then getAccBalance(prAssetIdStr) | |
583 | 585 | else (getAccBalance(prAssetIdStr) - inPrAssetAmt) | |
584 | 586 | let inAmAssetAmtX18 = toX18(inAmAssetAmt, amtAssetDcm) | |
585 | 587 | let inPrAssetAmtX18 = toX18(inPrAssetAmt, priceAssetDcm) | |
586 | 588 | let userPriceX18 = calcPriceBigInt(inPrAssetAmtX18, inAmAssetAmtX18) | |
587 | 589 | let amBalanceX18 = toX18(amBalance, amtAssetDcm) | |
588 | 590 | let prBalanceX18 = toX18(prBalance, priceAssetDcm) | |
589 | 591 | let res = if ((lpEmission == 0)) | |
590 | 592 | then { | |
591 | 593 | let curPriceX18 = zeroBigInt | |
592 | 594 | let slippageX18 = zeroBigInt | |
593 | 595 | let lpAmtX18 = pow((inAmAssetAmtX18 * inPrAssetAmtX18), 0, toBigInt(5), 1, 0, DOWN) | |
594 | 596 | $Tuple5(fromX18(lpAmtX18, scale8), fromX18(inAmAssetAmtX18, amtAssetDcm), fromX18(inPrAssetAmtX18, priceAssetDcm), calcPriceBigInt((prBalanceX18 + inPrAssetAmtX18), (amBalanceX18 + inAmAssetAmtX18)), slippageX18) | |
595 | 597 | } | |
596 | 598 | else { | |
597 | 599 | let curPriceX18 = calcPriceBigInt(prBalanceX18, amBalanceX18) | |
598 | 600 | let slippageX18 = fraction(absBigInt((curPriceX18 - userPriceX18)), scale18, curPriceX18) | |
599 | 601 | let slippageToleranceX18 = toX18(slippageTolerance, scale8) | |
600 | 602 | if (if ((curPriceX18 != zeroBigInt)) | |
601 | 603 | then (slippageX18 > slippageToleranceX18) | |
602 | 604 | else false) | |
603 | 605 | then throw(((("Price slippage " + toString(slippageX18)) + " exceeded the passed limit of ") + toString(slippageToleranceX18))) | |
604 | 606 | else { | |
605 | 607 | let lpEmissionX18 = toX18(lpEmission, scale8) | |
606 | 608 | let prViaAmX18 = fraction(inAmAssetAmtX18, calcPriceBigIntRound(prBalanceX18, amBalanceX18, CEILING), scale18, CEILING) | |
607 | 609 | let amViaPrX18 = fraction(inPrAssetAmtX18, scale18, calcPriceBigIntRound(prBalanceX18, amBalanceX18, FLOOR), CEILING) | |
608 | 610 | let expectedAmts = if ((prViaAmX18 > inPrAssetAmtX18)) | |
609 | 611 | then $Tuple2(amViaPrX18, inPrAssetAmtX18) | |
610 | 612 | else $Tuple2(inAmAssetAmtX18, prViaAmX18) | |
611 | 613 | let expAmtAssetAmtX18 = expectedAmts._1 | |
612 | 614 | let expPriceAssetAmtX18 = expectedAmts._2 | |
613 | 615 | let lpAmtX18 = fraction(lpEmissionX18, expPriceAssetAmtX18, prBalanceX18, FLOOR) | |
614 | 616 | $Tuple5(fromX18Round(lpAmtX18, scale8, FLOOR), fromX18Round(expAmtAssetAmtX18, amtAssetDcm, CEILING), fromX18Round(expPriceAssetAmtX18, priceAssetDcm, CEILING), curPriceX18, slippageX18) | |
615 | 617 | } | |
616 | 618 | } | |
617 | 619 | let calcLpAmt = res._1 | |
618 | 620 | let calcAmAssetPmt = res._2 | |
619 | 621 | let calcPrAssetPmt = res._3 | |
620 | 622 | let curPrice = fromX18(res._4, scale8) | |
621 | 623 | let slippageCalc = fromX18(res._5, scale8) | |
622 | 624 | if ((0 >= calcLpAmt)) | |
623 | 625 | then throw("Invalid calculations. LP calculated is less than zero.") | |
624 | 626 | else { | |
625 | 627 | let emitLpAmt = if (!(emitLp)) | |
626 | 628 | then 0 | |
627 | 629 | else calcLpAmt | |
628 | 630 | let amDiff = (inAmAssetAmt - calcAmAssetPmt) | |
629 | 631 | let prDiff = (inPrAssetAmt - calcPrAssetPmt) | |
630 | 632 | 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))] | |
631 | 633 | $Tuple13(calcLpAmt, emitLpAmt, curPrice, amBalance, prBalance, lpEmission, lpAssetId, poolStatus, commonState, amDiff, prDiff, inAmAssetId, inPrAssetId) | |
632 | 634 | } | |
633 | 635 | } | |
634 | 636 | } | |
635 | 637 | ||
636 | 638 | ||
637 | 639 | func calcKLp (amountBalance,priceBalance,lpEmission) = { | |
638 | 640 | let amountBalanceX18 = toX18BigInt(amountBalance, toBigInt(cfgAmountAssetDecimals)) | |
639 | 641 | let priceBalanceX18 = toX18BigInt(priceBalance, toBigInt(cfgPriceAssetDecimals)) | |
640 | 642 | let updatedKLp = fraction(pow((amountBalanceX18 * priceBalanceX18), 0, toBigInt(5), 1, 18, DOWN), big1, lpEmission) | |
641 | 643 | if ((lpEmission == big0)) | |
642 | 644 | then big0 | |
643 | 645 | else updatedKLp | |
644 | 646 | } | |
645 | 647 | ||
646 | 648 | ||
647 | 649 | func calcCurrentKLp (amountAssetDelta,priceAssetDelta,lpAssetEmissionDelta) = { | |
648 | 650 | let amountAssetBalance = (toBigInt(getAccBalance(assetIdToString(cfgAmountAssetId))) - amountAssetDelta) | |
649 | 651 | let priceAssetBalance = (toBigInt(getAccBalance(assetIdToString(cfgPriceAssetId))) - priceAssetDelta) | |
650 | 652 | let lpAssetEmission = (toBigInt(value(assetInfo(cfgLpAssetId)).quantity) - lpAssetEmissionDelta) | |
651 | 653 | let currentKLp = calcKLp(amountAssetBalance, priceAssetBalance, lpAssetEmission) | |
652 | 654 | currentKLp | |
653 | 655 | } | |
654 | 656 | ||
655 | 657 | ||
656 | 658 | func refreshKLpInternal (amountAssetBalanceDelta,priceAssetBalanceDelta,lpAssetEmissionDelta) = { | |
657 | 659 | let amountAssetBalance = (getAccBalance(assetIdToString(cfgAmountAssetId)) + amountAssetBalanceDelta) | |
658 | 660 | let priceAssetBalance = (getAccBalance(assetIdToString(cfgPriceAssetId)) + priceAssetBalanceDelta) | |
659 | 661 | let lpAssetEmission = (value(assetInfo(cfgLpAssetId)).quantity + lpAssetEmissionDelta) | |
660 | 662 | let updatedKLp = calcKLp(toBigInt(amountAssetBalance), toBigInt(priceAssetBalance), toBigInt(lpAssetEmission)) | |
661 | 663 | let actions = [IntegerEntry(keyKLpRefreshedHeight, height), StringEntry(keyKLp, toString(updatedKLp))] | |
662 | 664 | $Tuple2(actions, updatedKLp) | |
663 | 665 | } | |
664 | 666 | ||
665 | 667 | ||
666 | 668 | func skipOrderValidation () = valueOrElse(getBoolean(factoryContract, keySkipOrderValidation(toString(this))), false) | |
667 | 669 | ||
668 | 670 | ||
669 | 671 | func validateUpdatedKLp (oldKLp,updatedKLp) = if ((updatedKLp >= oldKLp)) | |
670 | 672 | then true | |
671 | 673 | else throwErr(makeString(["updated KLp lower than current KLp", toString(oldKLp), toString(updatedKLp)], " ")) | |
672 | 674 | ||
673 | 675 | ||
674 | 676 | func validateMatcherOrderAllowed (order) = { | |
675 | 677 | let amountAssetBalance = getAccBalance(assetIdToString(cfgAmountAssetId)) | |
676 | 678 | let priceAssetBalance = getAccBalance(assetIdToString(cfgPriceAssetId)) | |
677 | 679 | let amountAssetAmount = order.amount | |
678 | 680 | let priceAssetAmount = fraction(order.amount, order.price, scale8, FLOOR) | |
679 | - | let $ | |
681 | + | let $t02951729729 = if ((order.orderType == Buy)) | |
680 | 682 | then $Tuple2(amountAssetAmount, -(priceAssetAmount)) | |
681 | 683 | else $Tuple2(-(amountAssetAmount), priceAssetAmount) | |
682 | - | let amountAssetBalanceDelta = $ | |
683 | - | let priceAssetBalanceDelta = $ | |
684 | + | let amountAssetBalanceDelta = $t02951729729._1 | |
685 | + | let priceAssetBalanceDelta = $t02951729729._2 | |
684 | 686 | if (if (if (isGlobalShutdown()) | |
685 | 687 | then true | |
686 | 688 | else (cfgPoolStatus == PoolMatcherDisabled)) | |
687 | 689 | then true | |
688 | 690 | else (cfgPoolStatus == PoolShutdown)) | |
689 | 691 | then throw("Exchange operations disabled") | |
690 | 692 | else if (if ((order.assetPair.amountAsset != cfgAmountAssetId)) | |
691 | 693 | then true | |
692 | 694 | else (order.assetPair.priceAsset != cfgPriceAssetId)) | |
693 | 695 | then throw("Wrong order assets.") | |
694 | 696 | else { | |
695 | 697 | let kLp = valueOrErrorMessage(parseBigInt(valueOrElse(getString(this, keyKLp), "0")), fmtErr("invalid kLp")) | |
696 | - | let $ | |
697 | - | let unusedActions = $ | |
698 | - | let kLpNew = $ | |
698 | + | let $t03016930269 = refreshKLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0) | |
699 | + | let unusedActions = $t03016930269._1 | |
700 | + | let kLpNew = $t03016930269._2 | |
699 | 701 | let isOrderValid = (kLpNew >= kLp) | |
700 | 702 | let info = makeString(["kLp=", toString(kLp), " kLpNew=", toString(kLpNew), " amountAssetBalance=", toString(amountAssetBalance), " priceAssetBalance=", toString(priceAssetBalance), " amountAssetBalanceDelta=", toString(amountAssetBalanceDelta), " priceAssetBalanceDelta=", toString(priceAssetBalanceDelta), " height=", toString(height)], "") | |
701 | 703 | $Tuple2(isOrderValid, info) | |
702 | 704 | } | |
703 | 705 | } | |
704 | 706 | ||
705 | 707 | ||
706 | 708 | func commonGet (i) = if ((size(i.payments) != 1)) | |
707 | 709 | then throw("exactly 1 payment is expected") | |
708 | 710 | else { | |
709 | 711 | let pmt = value(i.payments[0]) | |
710 | 712 | let pmtAssetId = value(pmt.assetId) | |
711 | 713 | let pmtAmt = pmt.amount | |
712 | 714 | let res = estimateGetOperation(toBase58String(i.transactionId), toBase58String(pmtAssetId), pmtAmt, i.caller) | |
713 | 715 | let outAmAmt = res._1 | |
714 | 716 | let outPrAmt = res._2 | |
715 | 717 | let state = res._10 | |
716 | 718 | let isGetDisabled = if (!(isAddressWhitelisted(i.caller))) | |
717 | 719 | then if (isGlobalShutdown()) | |
718 | 720 | then true | |
719 | 721 | else (cfgPoolStatus == PoolShutdown) | |
720 | 722 | else false | |
721 | 723 | if (isGetDisabled) | |
722 | 724 | then throw(("Get operation is blocked by admin. Status = " + toString(cfgPoolStatus))) | |
723 | 725 | else $Tuple5(outAmAmt, outPrAmt, pmtAmt, pmtAssetId, state) | |
724 | 726 | } | |
725 | 727 | ||
726 | 728 | ||
727 | 729 | func commonPut (i,slippageTolerance,emitLp) = if ((size(i.payments) != 2)) | |
728 | 730 | then throw("exactly 2 payments are expected") | |
729 | 731 | else { | |
730 | 732 | let amAssetPmt = value(i.payments[0]) | |
731 | 733 | let prAssetPmt = value(i.payments[1]) | |
732 | 734 | let estPut = estimatePutOperation(toBase58String(i.transactionId), slippageTolerance, amAssetPmt.amount, amAssetPmt.assetId, prAssetPmt.amount, prAssetPmt.assetId, toString(i.caller), false, emitLp) | |
733 | 735 | let isPutDisabled = if (!(isAddressWhitelisted(i.caller))) | |
734 | 736 | then if (if (isGlobalShutdown()) | |
735 | 737 | then true | |
736 | 738 | else (cfgPoolStatus == PoolPutDisabled)) | |
737 | 739 | then true | |
738 | 740 | else (cfgPoolStatus == PoolShutdown) | |
739 | 741 | else false | |
740 | 742 | if (isPutDisabled) | |
741 | 743 | then throw(("Put operation is blocked by admin. Status = " + toString(cfgPoolStatus))) | |
742 | 744 | else estPut | |
743 | 745 | } | |
744 | 746 | ||
745 | 747 | ||
746 | 748 | func emit (amount) = { | |
747 | 749 | let emitInv = invoke(factoryContract, "emit", [amount], nil) | |
748 | 750 | if ((emitInv == emitInv)) | |
749 | 751 | then { | |
750 | 752 | let emitInvLegacy = match emitInv { | |
751 | 753 | case legacyFactoryContract: Address => | |
752 | 754 | invoke(legacyFactoryContract, "emit", [amount], nil) | |
753 | 755 | case _ => | |
754 | 756 | unit | |
755 | 757 | } | |
756 | 758 | if ((emitInvLegacy == emitInvLegacy)) | |
757 | 759 | then amount | |
758 | 760 | else throw("Strict value is not equal to itself.") | |
759 | 761 | } | |
760 | 762 | else throw("Strict value is not equal to itself.") | |
761 | 763 | } | |
762 | 764 | ||
763 | 765 | ||
764 | 766 | func takeFee (amount,fee) = { | |
765 | 767 | let feeAmount = if ((fee == 0)) | |
766 | 768 | then 0 | |
767 | 769 | else fraction(amount, fee, scale8) | |
768 | 770 | $Tuple2((amount - feeAmount), feeAmount) | |
769 | 771 | } | |
770 | 772 | ||
771 | 773 | ||
772 | 774 | func calcPutOneToken (paymentAmountRaw,paymentAssetId,userAddress,txId) = { | |
773 | 775 | let isEval = (txId == unit) | |
774 | 776 | let amountBalanceRaw = getAccBalance(assetIdToString(cfgAmountAssetId)) | |
775 | 777 | let priceBalanceRaw = getAccBalance(assetIdToString(cfgPriceAssetId)) | |
776 | 778 | let paymentInAmountAsset = if ((paymentAssetId == cfgAmountAssetId)) | |
777 | 779 | then true | |
778 | 780 | else if ((paymentAssetId == cfgPriceAssetId)) | |
779 | 781 | then false | |
780 | 782 | else throwErr("invalid asset") | |
781 | - | let $ | |
783 | + | let $t03345533748 = if (isEval) | |
782 | 784 | then $Tuple2(amountBalanceRaw, priceBalanceRaw) | |
783 | 785 | else if (paymentInAmountAsset) | |
784 | 786 | then $Tuple2((amountBalanceRaw - paymentAmountRaw), priceBalanceRaw) | |
785 | 787 | else $Tuple2(amountBalanceRaw, (priceBalanceRaw - paymentAmountRaw)) | |
786 | - | let amountBalanceOld = $ | |
787 | - | let priceBalanceOld = $ | |
788 | - | let $ | |
788 | + | let amountBalanceOld = $t03345533748._1 | |
789 | + | let priceBalanceOld = $t03345533748._2 | |
790 | + | let $t03375233901 = if (paymentInAmountAsset) | |
789 | 791 | then $Tuple2(paymentAmountRaw, 0) | |
790 | 792 | else $Tuple2(0, paymentAmountRaw) | |
791 | - | let amountAssetAmountRaw = $ | |
792 | - | let priceAssetAmountRaw = $ | |
793 | + | let amountAssetAmountRaw = $t03375233901._1 | |
794 | + | let priceAssetAmountRaw = $t03375233901._2 | |
793 | 795 | let amountAssetAmount = takeFee(amountAssetAmountRaw, inFee)._1 | |
794 | 796 | let priceAssetAmount = takeFee(priceAssetAmountRaw, inFee)._1 | |
795 | - | let $ | |
796 | - | let paymentAmount = $ | |
797 | - | let feeAmount = $ | |
797 | + | let $t03403334097 = takeFee(paymentAmountRaw, inFee) | |
798 | + | let paymentAmount = $t03403334097._1 | |
799 | + | let feeAmount = $t03403334097._2 | |
798 | 800 | let amountBalanceNew = (amountBalanceOld + amountAssetAmount) | |
799 | 801 | let priceBalanceNew = (priceBalanceOld + priceAssetAmount) | |
800 | 802 | let priceNewX18 = calcPriceBigInt(toX18(priceBalanceNew, cfgPriceAssetDecimals), toX18(amountBalanceNew, cfgAmountAssetDecimals)) | |
801 | 803 | let priceNew = fromX18(priceNewX18, scale8) | |
802 | 804 | let paymentBalance = if (paymentInAmountAsset) | |
803 | 805 | then amountBalanceOld | |
804 | 806 | else priceBalanceOld | |
805 | 807 | let paymentBalanceBigInt = toBigInt(paymentBalance) | |
806 | 808 | let supplyBigInt = toBigInt(valueOrErrorMessage(assetInfo(cfgLpAssetId), (("asset " + toBase58String(cfgLpAssetId)) + " doesn't exist")).quantity) | |
807 | 809 | let chechSupply = if ((supplyBigInt > big0)) | |
808 | 810 | then true | |
809 | 811 | else throwErr("initial deposit requires all coins") | |
810 | 812 | if ((chechSupply == chechSupply)) | |
811 | 813 | then { | |
812 | 814 | let depositBigInt = toBigInt(paymentAmount) | |
813 | 815 | let issueAmount = max([0, toInt(((supplyBigInt * (sqrtBigInt((scale18 + ((depositBigInt * scale18) / paymentBalanceBigInt)), 18, 18, DOWN) - scale18)) / scale18))]) | |
814 | 816 | let commonState = if (isEval) | |
815 | 817 | then nil | |
816 | 818 | 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))] | |
817 | 819 | let priceOldX18 = calcPriceBigInt(toX18(priceBalanceOld, cfgPriceAssetDecimals), toX18(amountBalanceOld, cfgAmountAssetDecimals)) | |
818 | 820 | let priceOld = fromX18(priceOldX18, scale8) | |
819 | 821 | let loss = { | |
820 | - | let $ | |
822 | + | let $t03577835945 = if (paymentInAmountAsset) | |
821 | 823 | then $Tuple2(amountAssetAmountRaw, amountBalanceOld) | |
822 | 824 | else $Tuple2(priceAssetAmountRaw, priceBalanceOld) | |
823 | - | let amount = $ | |
824 | - | let balance = $ | |
825 | + | let amount = $t03577835945._1 | |
826 | + | let balance = $t03577835945._2 | |
825 | 827 | let issueAmountBoth = toInt(fraction(supplyBigInt, toBigInt((amount / 2)), toBigInt(balance))) | |
826 | 828 | fraction((issueAmount - issueAmountBoth), scale8, issueAmountBoth) | |
827 | 829 | } | |
828 | 830 | $Tuple5(issueAmount, commonState, feeAmount, loss, paymentInAmountAsset) | |
829 | 831 | } | |
830 | 832 | else throw("Strict value is not equal to itself.") | |
831 | 833 | } | |
832 | 834 | ||
833 | 835 | ||
834 | 836 | func calcGetOneToken (outAssetId,paymentAmount,paymentAssetId,userAddress,txId) = { | |
835 | 837 | let isEval = (txId == unit) | |
836 | 838 | let cfg = getPoolConfig() | |
837 | 839 | let amtAssetDcm = parseIntValue(cfg[idxAmtAssetDcm]) | |
838 | 840 | let priceAssetDcm = parseIntValue(cfg[idxPriceAssetDcm]) | |
839 | 841 | let checks = [if ((paymentAssetId == cfgLpAssetId)) | |
840 | 842 | then true | |
841 | 843 | else throwErr("invalid lp asset")] | |
842 | 844 | if ((checks == checks)) | |
843 | 845 | then { | |
844 | 846 | let outInAmountAsset = if ((outAssetId == cfgAmountAssetId)) | |
845 | 847 | then true | |
846 | 848 | else if ((outAssetId == cfgPriceAssetId)) | |
847 | 849 | then false | |
848 | 850 | else throwErr("invalid asset") | |
849 | 851 | let balanceBigInt = if (outInAmountAsset) | |
850 | 852 | then toBigInt(getAccBalance(assetIdToString(cfgAmountAssetId))) | |
851 | 853 | else toBigInt(getAccBalance(assetIdToString(cfgPriceAssetId))) | |
852 | 854 | let outInAmountAssetDecimals = if (outInAmountAsset) | |
853 | 855 | then amtAssetDcm | |
854 | 856 | else priceAssetDcm | |
855 | 857 | let amBalanceOld = getAccBalance(assetIdToString(cfgAmountAssetId)) | |
856 | 858 | let prBalanceOld = getAccBalance(assetIdToString(cfgPriceAssetId)) | |
857 | 859 | let outBalance = if (outInAmountAsset) | |
858 | 860 | then amBalanceOld | |
859 | 861 | else prBalanceOld | |
860 | 862 | let outBalanceBigInt = toBigInt(outBalance) | |
861 | 863 | let supplyBigInt = toBigInt(valueOrErrorMessage(assetInfo(cfgLpAssetId), (("asset " + toBase58String(cfgLpAssetId)) + " doesn't exist")).quantity) | |
862 | 864 | let redeemedBigInt = toBigInt(paymentAmount) | |
863 | 865 | let amountRaw = max([0, toInt(((balanceBigInt * (scale18 - pow((scale18 - ((redeemedBigInt * scale18) / supplyBigInt)), 18, big2, 0, 18, DOWN))) / scale18))]) | |
864 | - | let $ | |
865 | - | let totalAmount = $ | |
866 | - | let feeAmount = $ | |
867 | - | let $ | |
866 | + | let $t03802338079 = takeFee(amountRaw, outFee) | |
867 | + | let totalAmount = $t03802338079._1 | |
868 | + | let feeAmount = $t03802338079._2 | |
869 | + | let $t03808338309 = if (outInAmountAsset) | |
868 | 870 | then $Tuple4(totalAmount, 0, (amBalanceOld - amountRaw), prBalanceOld) | |
869 | 871 | else $Tuple4(0, totalAmount, amBalanceOld, (prBalanceOld - amountRaw)) | |
870 | - | let outAmAmount = $ | |
871 | - | let outPrAmount = $ | |
872 | - | let amBalanceNew = $ | |
873 | - | let prBalanceNew = $ | |
872 | + | let outAmAmount = $t03808338309._1 | |
873 | + | let outPrAmount = $t03808338309._2 | |
874 | + | let amBalanceNew = $t03808338309._3 | |
875 | + | let prBalanceNew = $t03808338309._4 | |
874 | 876 | let priceNewX18 = calcPriceBigInt(toX18(prBalanceNew, cfgPriceAssetDecimals), toX18(amBalanceNew, cfgAmountAssetDecimals)) | |
875 | 877 | let priceNew = fromX18(priceNewX18, scale8) | |
876 | 878 | let commonState = if (isEval) | |
877 | 879 | then nil | |
878 | 880 | 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)] | |
879 | 881 | let priceOldX18 = calcPriceBigInt(toX18(prBalanceOld, cfgPriceAssetDecimals), toX18(amBalanceOld, cfgAmountAssetDecimals)) | |
880 | 882 | let priceOld = fromX18(priceOldX18, scale8) | |
881 | 883 | let loss = { | |
882 | 884 | let amountBothInPaymentAsset = (toInt(fraction(balanceBigInt, redeemedBigInt, supplyBigInt)) * 2) | |
883 | 885 | fraction((totalAmount - amountBothInPaymentAsset), scale8, amountBothInPaymentAsset) | |
884 | 886 | } | |
885 | 887 | $Tuple5(totalAmount, commonState, feeAmount, loss, outInAmountAsset) | |
886 | 888 | } | |
887 | 889 | else throw("Strict value is not equal to itself.") | |
888 | 890 | } | |
889 | 891 | ||
890 | 892 | ||
891 | 893 | func managerPublicKeyOrUnit () = { | |
892 | 894 | let managerVaultAddress = getManagerVaultAddressOrThis() | |
893 | 895 | match getString(managerVaultAddress, keyManagerPublicKey()) { | |
894 | 896 | case s: String => | |
895 | 897 | fromBase58String(s) | |
896 | 898 | case _: Unit => | |
897 | 899 | unit | |
898 | 900 | case _ => | |
899 | 901 | throw("Match error") | |
900 | 902 | } | |
901 | 903 | } | |
902 | 904 | ||
903 | 905 | ||
904 | 906 | func isManager (i) = match managerPublicKeyOrUnit() { | |
905 | 907 | case pk: ByteVector => | |
906 | 908 | (i.callerPublicKey == pk) | |
907 | 909 | case _: Unit => | |
908 | 910 | (i.caller == this) | |
909 | 911 | case _ => | |
910 | 912 | throw("Match error") | |
911 | 913 | } | |
912 | 914 | ||
913 | 915 | ||
914 | 916 | func mustManager (i) = { | |
915 | 917 | let pd = throw("Permission denied") | |
916 | 918 | match managerPublicKeyOrUnit() { | |
917 | 919 | case pk: ByteVector => | |
918 | 920 | if ((i.callerPublicKey == pk)) | |
919 | 921 | then true | |
920 | 922 | else pd | |
921 | 923 | case _: Unit => | |
922 | 924 | if ((i.caller == this)) | |
923 | 925 | then true | |
924 | 926 | else pd | |
925 | 927 | case _ => | |
926 | 928 | throw("Match error") | |
927 | 929 | } | |
928 | 930 | } | |
929 | 931 | ||
930 | 932 | ||
931 | 933 | @Callable(i) | |
932 | 934 | func rebalance () = (rebalanceAsset(getStringOrFail(this, aa())) ++ rebalanceAsset(getStringOrFail(this, pa()))) | |
933 | 935 | ||
934 | 936 | ||
935 | 937 | ||
936 | 938 | @Callable(i) | |
937 | 939 | func calculateAmountOutForSwapREADONLY (cleanAmountIn,isReverse,feePoolAmount) = { | |
938 | - | let $ | |
940 | + | let $t04016740472 = if ((isReverse == false)) | |
939 | 941 | then { | |
940 | 942 | let assetOut = getStringOrFail(this, pa()) | |
941 | 943 | let assetIn = getStringOrFail(this, aa()) | |
942 | 944 | $Tuple2(assetOut, assetIn) | |
943 | 945 | } | |
944 | 946 | else { | |
945 | 947 | let assetOut = getStringOrFail(this, aa()) | |
946 | 948 | let assetIn = getStringOrFail(this, pa()) | |
947 | 949 | $Tuple2(assetOut, assetIn) | |
948 | 950 | } | |
949 | - | let assetOut = $ | |
950 | - | let assetIn = $ | |
951 | + | let assetOut = $t04016740472._1 | |
952 | + | let assetIn = $t04016740472._2 | |
951 | 953 | let poolAssetInBalance = getAccBalance(assetIn) | |
952 | 954 | let poolAssetOutBalance = getAccBalance(assetOut) | |
953 | 955 | let amountOut = fraction(poolAssetOutBalance, cleanAmountIn, (poolAssetInBalance + cleanAmountIn)) | |
954 | 956 | let oldK = (toBigInt(poolAssetInBalance) * toBigInt(poolAssetOutBalance)) | |
955 | 957 | let newK = (((toBigInt(getAccBalance(assetIn)) + toBigInt(cleanAmountIn)) + toBigInt(feePoolAmount)) * (toBigInt(getAccBalance(assetOut)) - toBigInt(amountOut))) | |
956 | 958 | let checkK = if ((newK >= oldK)) | |
957 | 959 | then true | |
958 | 960 | else throw("new K is fewer error") | |
959 | 961 | if ((checkK == checkK)) | |
960 | 962 | then $Tuple2(nil, amountOut) | |
961 | 963 | else throw("Strict value is not equal to itself.") | |
962 | 964 | } | |
963 | 965 | ||
964 | 966 | ||
965 | 967 | ||
966 | 968 | @Callable(i) | |
967 | 969 | func calculateAmountOutForSwapAndSendTokens (cleanAmountIn,isReverse,amountOutMin,addressTo,feePoolAmount) = { | |
968 | 970 | let swapContact = { | |
969 | 971 | let @ = invoke(factoryContract, "getSwapContractREADONLY", nil, nil) | |
970 | 972 | if ($isInstanceOf(@, "String")) | |
971 | 973 | then @ | |
972 | 974 | else throw(($getType(@) + " couldn't be cast to String")) | |
973 | 975 | } | |
974 | 976 | let isPoolSwapDisabled = { | |
975 | 977 | let @ = invoke(factoryContract, "isPoolSwapDisabledREADONLY", [toString(this)], nil) | |
976 | 978 | if ($isInstanceOf(@, "Boolean")) | |
977 | 979 | then @ | |
978 | 980 | else throw(($getType(@) + " couldn't be cast to Boolean")) | |
979 | 981 | } | |
980 | 982 | let isSwapDisabled = if (!(isAddressWhitelisted(i.caller))) | |
981 | 983 | then if (if (isGlobalShutdown()) | |
982 | 984 | then true | |
983 | 985 | else (cfgPoolStatus == PoolShutdown)) | |
984 | 986 | then true | |
985 | 987 | else isPoolSwapDisabled | |
986 | 988 | else false | |
987 | 989 | let checks = [if (if (!(isSwapDisabled)) | |
988 | 990 | then true | |
989 | 991 | else isManager(i)) | |
990 | 992 | then true | |
991 | 993 | else throwErr("swap operation is blocked by admin"), if ((value(i.payments[0]).amount >= cleanAmountIn)) | |
992 | 994 | then true | |
993 | 995 | else throwErr("Wrong amount"), if ((i.caller == addressFromStringValue(swapContact))) | |
994 | 996 | then true | |
995 | 997 | else throwErr("Permission denied")] | |
996 | 998 | if ((checks == checks)) | |
997 | 999 | then { | |
998 | 1000 | let pmt = value(i.payments[0]) | |
999 | 1001 | let assetIn = assetIdToString(pmt.assetId) | |
1000 | 1002 | let assetOut = if ((isReverse == false)) | |
1001 | 1003 | then getStringOrFail(this, pa()) | |
1002 | 1004 | else getStringOrFail(this, aa()) | |
1003 | 1005 | let poolAssetInBalance = ((getAccBalance(assetIn) - value(i.payments[0]).amount) - feePoolAmount) | |
1004 | 1006 | let poolAssetOutBalance = getAccBalance(assetOut) | |
1005 | 1007 | let amountOut = fraction(poolAssetOutBalance, cleanAmountIn, (poolAssetInBalance + cleanAmountIn)) | |
1006 | 1008 | let oldK = (toBigInt(poolAssetInBalance) * toBigInt(poolAssetOutBalance)) | |
1007 | 1009 | let newK = ((toBigInt(getAccBalance(assetIn)) + toBigInt(feePoolAmount)) * (toBigInt(getAccBalance(assetOut)) - toBigInt(amountOut))) | |
1008 | 1010 | let checkK = if ((newK >= oldK)) | |
1009 | 1011 | then true | |
1010 | 1012 | else throw("new K is fewer error") | |
1011 | 1013 | if ((checkK == checkK)) | |
1012 | 1014 | then { | |
1013 | 1015 | let checkMin = if ((amountOut >= amountOutMin)) | |
1014 | 1016 | then true | |
1015 | 1017 | else throw("Exchange result is fewer coins than expected") | |
1016 | 1018 | if ((checkMin == checkMin)) | |
1017 | 1019 | then { | |
1018 | 1020 | let amountAssetBalanceDelta = if (isReverse) | |
1019 | 1021 | then -(amountOut) | |
1020 | 1022 | else feePoolAmount | |
1021 | 1023 | let priceAssetBalanceDelta = if (isReverse) | |
1022 | 1024 | then feePoolAmount | |
1023 | 1025 | else -(amountOut) | |
1024 | 1026 | let refreshKLpActions = refreshKLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)._1 | |
1025 | 1027 | if ((refreshKLpActions == refreshKLpActions)) | |
1026 | 1028 | then { | |
1027 | 1029 | let rebalanceState = rebalanceAsset(assetIn) | |
1028 | 1030 | if ((rebalanceState == rebalanceState)) | |
1029 | 1031 | then { | |
1030 | 1032 | let withdrawState = withdrawAndRebalanceAsset(assetOut, amountOut) | |
1031 | 1033 | if ((withdrawState == withdrawState)) | |
1032 | 1034 | then $Tuple2(((withdrawState ++ rebalanceState) ++ [ScriptTransfer(addressFromStringValue(addressTo), amountOut, parseAssetId(assetOut))]), amountOut) | |
1033 | 1035 | else throw("Strict value is not equal to itself.") | |
1034 | 1036 | } | |
1035 | 1037 | else throw("Strict value is not equal to itself.") | |
1036 | 1038 | } | |
1037 | 1039 | else throw("Strict value is not equal to itself.") | |
1038 | 1040 | } | |
1039 | 1041 | else throw("Strict value is not equal to itself.") | |
1040 | 1042 | } | |
1041 | 1043 | else throw("Strict value is not equal to itself.") | |
1042 | 1044 | } | |
1043 | 1045 | else throw("Strict value is not equal to itself.") | |
1044 | 1046 | } | |
1045 | 1047 | ||
1046 | 1048 | ||
1047 | 1049 | ||
1048 | 1050 | @Callable(i) | |
1049 | 1051 | func put (slippageTolerance,shouldAutoStake) = if ((0 > slippageTolerance)) | |
1050 | 1052 | then throw("Invalid slippageTolerance passed") | |
1051 | 1053 | else { | |
1052 | 1054 | let estPut = commonPut(i, slippageTolerance, true) | |
1053 | 1055 | let emitLpAmt = estPut._2 | |
1054 | 1056 | let lpAssetId = estPut._7 | |
1055 | 1057 | let state = estPut._9 | |
1056 | 1058 | let amDiff = estPut._10 | |
1057 | 1059 | let prDiff = estPut._11 | |
1058 | 1060 | let amId = estPut._12 | |
1059 | 1061 | let prId = estPut._13 | |
1060 | 1062 | let amAssetPmt = toBigInt(value(i.payments[0]).amount) | |
1061 | 1063 | let prAssetPmt = toBigInt(value(i.payments[1]).amount) | |
1062 | 1064 | let currentKLp = calcCurrentKLp(amAssetPmt, prAssetPmt, toBigInt(0)) | |
1063 | 1065 | if ((currentKLp == currentKLp)) | |
1064 | 1066 | then { | |
1065 | 1067 | let emitInv = invoke(factoryContract, "emit", [emitLpAmt], nil) | |
1066 | 1068 | if ((emitInv == emitInv)) | |
1067 | 1069 | then { | |
1068 | 1070 | let emitInvLegacy = match emitInv { | |
1069 | 1071 | case legacyFactoryContract: Address => | |
1070 | 1072 | invoke(legacyFactoryContract, "emit", [emitLpAmt], nil) | |
1071 | 1073 | case _ => | |
1072 | 1074 | unit | |
1073 | 1075 | } | |
1074 | 1076 | if ((emitInvLegacy == emitInvLegacy)) | |
1075 | 1077 | then { | |
1076 | 1078 | let slippageAInv = if ((amDiff > 0)) | |
1077 | 1079 | then invoke(slippageContract, "put", nil, [AttachedPayment(amId, amDiff)]) | |
1078 | 1080 | else nil | |
1079 | 1081 | if ((slippageAInv == slippageAInv)) | |
1080 | 1082 | then { | |
1081 | 1083 | let slippagePInv = if ((prDiff > 0)) | |
1082 | 1084 | then invoke(slippageContract, "put", nil, [AttachedPayment(prId, prDiff)]) | |
1083 | 1085 | else nil | |
1084 | 1086 | if ((slippagePInv == slippagePInv)) | |
1085 | 1087 | then { | |
1086 | 1088 | let lpTransfer = if (shouldAutoStake) | |
1087 | 1089 | then { | |
1088 | 1090 | let slpStakeInv = invoke(stakingContract, "stake", nil, [AttachedPayment(lpAssetId, emitLpAmt)]) | |
1089 | 1091 | if ((slpStakeInv == slpStakeInv)) | |
1090 | 1092 | then nil | |
1091 | 1093 | else throw("Strict value is not equal to itself.") | |
1092 | 1094 | } | |
1093 | 1095 | else [ScriptTransfer(i.caller, emitLpAmt, lpAssetId)] | |
1094 | - | let $ | |
1095 | - | if (($ | |
1096 | + | let $t04564846110 = refreshKLpInternal(0, 0, 0) | |
1097 | + | if (($t04564846110 == $t04564846110)) | |
1096 | 1098 | then { | |
1097 | - | let updatedKLp = $ | |
1098 | - | let refreshKLpActions = $ | |
1099 | + | let updatedKLp = $t04564846110._2 | |
1100 | + | let refreshKLpActions = $t04564846110._1 | |
1099 | 1101 | let isUpdatedKLpValid = validateUpdatedKLp(currentKLp, updatedKLp) | |
1100 | 1102 | if ((isUpdatedKLpValid == isUpdatedKLpValid)) | |
1101 | 1103 | then { | |
1102 | 1104 | let reb = invoke(this, "rebalance", nil, nil) | |
1103 | 1105 | if ((reb == reb)) | |
1104 | 1106 | then ((state ++ lpTransfer) ++ refreshKLpActions) | |
1105 | 1107 | else throw("Strict value is not equal to itself.") | |
1106 | 1108 | } | |
1107 | 1109 | else throw("Strict value is not equal to itself.") | |
1108 | 1110 | } | |
1109 | 1111 | else throw("Strict value is not equal to itself.") | |
1110 | 1112 | } | |
1111 | 1113 | else throw("Strict value is not equal to itself.") | |
1112 | 1114 | } | |
1113 | 1115 | else throw("Strict value is not equal to itself.") | |
1114 | 1116 | } | |
1115 | 1117 | else throw("Strict value is not equal to itself.") | |
1116 | 1118 | } | |
1117 | 1119 | else throw("Strict value is not equal to itself.") | |
1118 | 1120 | } | |
1119 | 1121 | else throw("Strict value is not equal to itself.") | |
1120 | 1122 | } | |
1121 | 1123 | ||
1122 | 1124 | ||
1123 | 1125 | ||
1124 | 1126 | @Callable(i) | |
1125 | 1127 | func putForFree (maxSlippage) = if ((0 > maxSlippage)) | |
1126 | 1128 | then throw("Invalid value passed") | |
1127 | 1129 | else { | |
1128 | 1130 | let estPut = commonPut(i, maxSlippage, false) | |
1129 | 1131 | let state = estPut._9 | |
1130 | 1132 | let amAssetPmt = toBigInt(value(i.payments[0]).amount) | |
1131 | 1133 | let prAssetPmt = toBigInt(value(i.payments[1]).amount) | |
1132 | 1134 | let currentKLp = calcCurrentKLp(amAssetPmt, prAssetPmt, toBigInt(0)) | |
1133 | 1135 | if ((currentKLp == currentKLp)) | |
1134 | 1136 | then { | |
1135 | - | let $ | |
1136 | - | let refreshKLpActions = $ | |
1137 | - | let updatedKLp = $ | |
1137 | + | let $t04672246787 = refreshKLpInternal(0, 0, 0) | |
1138 | + | let refreshKLpActions = $t04672246787._1 | |
1139 | + | let updatedKLp = $t04672246787._2 | |
1138 | 1140 | let isUpdatedKLpValid = validateUpdatedKLp(currentKLp, updatedKLp) | |
1139 | 1141 | if ((isUpdatedKLpValid == isUpdatedKLpValid)) | |
1140 | 1142 | then (state ++ refreshKLpActions) | |
1141 | 1143 | else throw("Strict value is not equal to itself.") | |
1142 | 1144 | } | |
1143 | 1145 | else throw("Strict value is not equal to itself.") | |
1144 | 1146 | } | |
1145 | 1147 | ||
1146 | 1148 | ||
1147 | 1149 | ||
1148 | 1150 | @Callable(i) | |
1149 | 1151 | func putOneTkn (minOutAmount,autoStake) = { | |
1150 | 1152 | let isPoolOneTokenOperationsDisabled = { | |
1151 | 1153 | let @ = invoke(factoryContract, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil) | |
1152 | 1154 | if ($isInstanceOf(@, "Boolean")) | |
1153 | 1155 | then @ | |
1154 | 1156 | else throw(($getType(@) + " couldn't be cast to Boolean")) | |
1155 | 1157 | } | |
1156 | 1158 | let isPutDisabled = if (!(isAddressWhitelisted(i.caller))) | |
1157 | 1159 | then if (if (if (isGlobalShutdown()) | |
1158 | 1160 | then true | |
1159 | 1161 | else (cfgPoolStatus == PoolPutDisabled)) | |
1160 | 1162 | then true | |
1161 | 1163 | else (cfgPoolStatus == PoolShutdown)) | |
1162 | 1164 | then true | |
1163 | 1165 | else isPoolOneTokenOperationsDisabled | |
1164 | 1166 | else false | |
1165 | 1167 | let checks = [if (if (!(isPutDisabled)) | |
1166 | 1168 | then true | |
1167 | 1169 | else isManager(i)) | |
1168 | 1170 | then true | |
1169 | 1171 | else throwErr("put operation is blocked by admin"), if ((size(i.payments) == 1)) | |
1170 | 1172 | then true | |
1171 | 1173 | else throwErr("exactly 1 payment are expected")] | |
1172 | 1174 | if ((checks == checks)) | |
1173 | 1175 | then { | |
1174 | 1176 | let payment = i.payments[0] | |
1175 | 1177 | let paymentAssetId = payment.assetId | |
1176 | 1178 | let paymentAmountRaw = payment.amount | |
1177 | 1179 | let currentKLp = if ((paymentAssetId == cfgAmountAssetId)) | |
1178 | 1180 | then calcCurrentKLp(toBigInt(paymentAmountRaw), toBigInt(0), toBigInt(0)) | |
1179 | 1181 | else if ((paymentAssetId == cfgPriceAssetId)) | |
1180 | 1182 | then calcCurrentKLp(toBigInt(0), toBigInt(paymentAmountRaw), toBigInt(0)) | |
1181 | 1183 | else throwErr("payment asset is not supported") | |
1182 | 1184 | if ((currentKLp == currentKLp)) | |
1183 | 1185 | then { | |
1184 | 1186 | let userAddress = i.caller | |
1185 | 1187 | let txId = i.transactionId | |
1186 | - | let $ | |
1187 | - | if (($ | |
1188 | + | let $t04801648168 = calcPutOneToken(paymentAmountRaw, paymentAssetId, userAddress, txId) | |
1189 | + | if (($t04801648168 == $t04801648168)) | |
1188 | 1190 | then { | |
1189 | - | let paymentInAmountAsset = $ | |
1190 | - | let bonus = $ | |
1191 | - | let feeAmount = $ | |
1192 | - | let commonState = $ | |
1193 | - | let emitAmountEstimated = $ | |
1191 | + | let paymentInAmountAsset = $t04801648168._5 | |
1192 | + | let bonus = $t04801648168._4 | |
1193 | + | let feeAmount = $t04801648168._3 | |
1194 | + | let commonState = $t04801648168._2 | |
1195 | + | let emitAmountEstimated = $t04801648168._1 | |
1194 | 1196 | let emitAmount = if (if ((minOutAmount > 0)) | |
1195 | 1197 | then (minOutAmount > emitAmountEstimated) | |
1196 | 1198 | else false) | |
1197 | 1199 | then throwErr(makeString(["amount to receive is less than ", toString(minOutAmount)], "")) | |
1198 | 1200 | else emitAmountEstimated | |
1199 | 1201 | let emitInv = emit(emitAmount) | |
1200 | 1202 | if ((emitInv == emitInv)) | |
1201 | 1203 | then { | |
1202 | 1204 | let lpTransfer = if (autoStake) | |
1203 | 1205 | then { | |
1204 | 1206 | let stakeInv = invoke(stakingContract, "stake", nil, [AttachedPayment(cfgLpAssetId, emitAmount)]) | |
1205 | 1207 | if ((stakeInv == stakeInv)) | |
1206 | 1208 | then nil | |
1207 | 1209 | else throw("Strict value is not equal to itself.") | |
1208 | 1210 | } | |
1209 | 1211 | else [ScriptTransfer(i.caller, emitAmount, cfgLpAssetId)] | |
1210 | 1212 | let sendFee = if ((feeAmount > 0)) | |
1211 | 1213 | then [ScriptTransfer(feeCollectorAddress, feeAmount, paymentAssetId)] | |
1212 | 1214 | else nil | |
1213 | - | let $ | |
1215 | + | let $t04875448951 = if ((this == feeCollectorAddress)) | |
1214 | 1216 | then $Tuple2(0, 0) | |
1215 | 1217 | else if (paymentInAmountAsset) | |
1216 | 1218 | then $Tuple2(-(feeAmount), 0) | |
1217 | 1219 | else $Tuple2(0, -(feeAmount)) | |
1218 | - | let amountAssetBalanceDelta = $ | |
1219 | - | let priceAssetBalanceDelta = $ | |
1220 | - | let $ | |
1221 | - | let refreshKLpActions = $ | |
1222 | - | let updatedKLp = $ | |
1220 | + | let amountAssetBalanceDelta = $t04875448951._1 | |
1221 | + | let priceAssetBalanceDelta = $t04875448951._2 | |
1222 | + | let $t04895449062 = refreshKLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0) | |
1223 | + | let refreshKLpActions = $t04895449062._1 | |
1224 | + | let updatedKLp = $t04895449062._2 | |
1223 | 1225 | let kLp = value(getString(keyKLp)) | |
1224 | 1226 | let isUpdatedKLpValid = validateUpdatedKLp(currentKLp, updatedKLp) | |
1225 | 1227 | if ((isUpdatedKLpValid == isUpdatedKLpValid)) | |
1226 | 1228 | then { | |
1227 | 1229 | let reb = invoke(this, "rebalance", nil, nil) | |
1228 | 1230 | if ((reb == reb)) | |
1229 | 1231 | then $Tuple2((((commonState ++ lpTransfer) ++ sendFee) ++ refreshKLpActions), emitAmount) | |
1230 | 1232 | else throw("Strict value is not equal to itself.") | |
1231 | 1233 | } | |
1232 | 1234 | else throw("Strict value is not equal to itself.") | |
1233 | 1235 | } | |
1234 | 1236 | else throw("Strict value is not equal to itself.") | |
1235 | 1237 | } | |
1236 | 1238 | else throw("Strict value is not equal to itself.") | |
1237 | 1239 | } | |
1238 | 1240 | else throw("Strict value is not equal to itself.") | |
1239 | 1241 | } | |
1240 | 1242 | else throw("Strict value is not equal to itself.") | |
1241 | 1243 | } | |
1242 | 1244 | ||
1243 | 1245 | ||
1244 | 1246 | ||
1245 | 1247 | @Callable(i) | |
1246 | 1248 | func putOneTknREADONLY (paymentAssetId,paymentAmountRaw) = { | |
1247 | - | let $ | |
1248 | - | let emitAmountEstimated = $ | |
1249 | - | let commonState = $ | |
1250 | - | let feeAmount = $ | |
1251 | - | let bonus = $ | |
1252 | - | let paymentInAmountAsset = $ | |
1249 | + | let $t04941749574 = calcPutOneToken(paymentAmountRaw, parseAssetId(paymentAssetId), unit, unit) | |
1250 | + | let emitAmountEstimated = $t04941749574._1 | |
1251 | + | let commonState = $t04941749574._2 | |
1252 | + | let feeAmount = $t04941749574._3 | |
1253 | + | let bonus = $t04941749574._4 | |
1254 | + | let paymentInAmountAsset = $t04941749574._5 | |
1253 | 1255 | $Tuple2(nil, $Tuple3(emitAmountEstimated, feeAmount, bonus)) | |
1254 | 1256 | } | |
1255 | 1257 | ||
1256 | 1258 | ||
1257 | 1259 | ||
1258 | 1260 | @Callable(i) | |
1259 | 1261 | func getOneTkn (outAssetIdStr,minOutAmount) = { | |
1260 | 1262 | let isPoolOneTokenOperationsDisabled = { | |
1261 | 1263 | let @ = invoke(factoryContract, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil) | |
1262 | 1264 | if ($isInstanceOf(@, "Boolean")) | |
1263 | 1265 | then @ | |
1264 | 1266 | else throw(($getType(@) + " couldn't be cast to Boolean")) | |
1265 | 1267 | } | |
1266 | 1268 | let isGetDisabled = if (!(isAddressWhitelisted(i.caller))) | |
1267 | 1269 | then if (if (isGlobalShutdown()) | |
1268 | 1270 | then true | |
1269 | 1271 | else (cfgPoolStatus == PoolShutdown)) | |
1270 | 1272 | then true | |
1271 | 1273 | else isPoolOneTokenOperationsDisabled | |
1272 | 1274 | else false | |
1273 | 1275 | let checks = [if (if (!(isGetDisabled)) | |
1274 | 1276 | then true | |
1275 | 1277 | else isManager(i)) | |
1276 | 1278 | then true | |
1277 | 1279 | else throwErr("get operation is blocked by admin"), if ((size(i.payments) == 1)) | |
1278 | 1280 | then true | |
1279 | 1281 | else throwErr("exactly 1 payment are expected")] | |
1280 | 1282 | if ((checks == checks)) | |
1281 | 1283 | then { | |
1282 | 1284 | let outAssetId = parseAssetId(outAssetIdStr) | |
1283 | 1285 | let payment = i.payments[0] | |
1284 | 1286 | let paymentAssetId = payment.assetId | |
1285 | 1287 | let paymentAmount = payment.amount | |
1286 | 1288 | let currentKLp = calcCurrentKLp(toBigInt(0), toBigInt(0), toBigInt(0)) | |
1287 | 1289 | if ((currentKLp == currentKLp)) | |
1288 | 1290 | then { | |
1289 | 1291 | let userAddress = i.caller | |
1290 | 1292 | let txId = i.transactionId | |
1291 | - | let $ | |
1292 | - | if (($ | |
1293 | + | let $t05049650649 = calcGetOneToken(outAssetId, paymentAmount, paymentAssetId, userAddress, txId) | |
1294 | + | if (($t05049650649 == $t05049650649)) | |
1293 | 1295 | then { | |
1294 | - | let outInAmountAsset = $ | |
1295 | - | let bonus = $ | |
1296 | - | let feeAmount = $ | |
1297 | - | let commonState = $ | |
1298 | - | let amountEstimated = $ | |
1296 | + | let outInAmountAsset = $t05049650649._5 | |
1297 | + | let bonus = $t05049650649._4 | |
1298 | + | let feeAmount = $t05049650649._3 | |
1299 | + | let commonState = $t05049650649._2 | |
1300 | + | let amountEstimated = $t05049650649._1 | |
1299 | 1301 | let amount = if (if ((minOutAmount > 0)) | |
1300 | 1302 | then (minOutAmount > amountEstimated) | |
1301 | 1303 | else false) | |
1302 | 1304 | then throwErr(makeString(["amount to receive is less than ", toString(minOutAmount)], "")) | |
1303 | 1305 | else amountEstimated | |
1304 | 1306 | let burnInv = invoke(factoryContract, "burn", [paymentAmount], [AttachedPayment(paymentAssetId, paymentAmount)]) | |
1305 | 1307 | if ((burnInv == burnInv)) | |
1306 | 1308 | then { | |
1307 | 1309 | let withdrawState = withdrawAndRebalanceAsset(outAssetIdStr, (amount + max([0, feeAmount]))) | |
1308 | 1310 | let assetTransfer = [ScriptTransfer(userAddress, amount, outAssetId)] | |
1309 | 1311 | let sendFee = if ((feeAmount > 0)) | |
1310 | 1312 | then [ScriptTransfer(feeCollectorAddress, feeAmount, outAssetId)] | |
1311 | 1313 | else nil | |
1312 | - | let $ | |
1314 | + | let $t05131351560 = { | |
1313 | 1315 | let feeAmountForCalc = if ((this == feeCollectorAddress)) | |
1314 | 1316 | then 0 | |
1315 | 1317 | else feeAmount | |
1316 | 1318 | if (outInAmountAsset) | |
1317 | 1319 | then $Tuple2(-((amount + feeAmountForCalc)), 0) | |
1318 | 1320 | else $Tuple2(0, -((amount + feeAmountForCalc))) | |
1319 | 1321 | } | |
1320 | - | let amountAssetBalanceDelta = $ | |
1321 | - | let priceAssetBalanceDelta = $ | |
1322 | - | let $ | |
1323 | - | let refreshKLpActions = $ | |
1324 | - | let updatedKLp = $ | |
1322 | + | let amountAssetBalanceDelta = $t05131351560._1 | |
1323 | + | let priceAssetBalanceDelta = $t05131351560._2 | |
1324 | + | let $t05156351671 = refreshKLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0) | |
1325 | + | let refreshKLpActions = $t05156351671._1 | |
1326 | + | let updatedKLp = $t05156351671._2 | |
1325 | 1327 | let isUpdatedKLpValid = validateUpdatedKLp(currentKLp, updatedKLp) | |
1326 | 1328 | if ((isUpdatedKLpValid == isUpdatedKLpValid)) | |
1327 | 1329 | then $Tuple2(((((commonState ++ withdrawState) ++ assetTransfer) ++ sendFee) ++ refreshKLpActions), amount) | |
1328 | 1330 | else throw("Strict value is not equal to itself.") | |
1329 | 1331 | } | |
1330 | 1332 | else throw("Strict value is not equal to itself.") | |
1331 | 1333 | } | |
1332 | 1334 | else throw("Strict value is not equal to itself.") | |
1333 | 1335 | } | |
1334 | 1336 | else throw("Strict value is not equal to itself.") | |
1335 | 1337 | } | |
1336 | 1338 | else throw("Strict value is not equal to itself.") | |
1337 | 1339 | } | |
1338 | 1340 | ||
1339 | 1341 | ||
1340 | 1342 | ||
1341 | 1343 | @Callable(i) | |
1342 | 1344 | func getOneTknREADONLY (outAssetId,paymentAmount) = { | |
1343 | - | let $ | |
1344 | - | let amountEstimated = $ | |
1345 | - | let commonState = $ | |
1346 | - | let feeAmount = $ | |
1347 | - | let bonus = $ | |
1348 | - | let outInAmountAsset = $ | |
1345 | + | let $t05194952105 = calcGetOneToken(parseAssetId(outAssetId), paymentAmount, cfgLpAssetId, unit, unit) | |
1346 | + | let amountEstimated = $t05194952105._1 | |
1347 | + | let commonState = $t05194952105._2 | |
1348 | + | let feeAmount = $t05194952105._3 | |
1349 | + | let bonus = $t05194952105._4 | |
1350 | + | let outInAmountAsset = $t05194952105._5 | |
1349 | 1351 | $Tuple2(nil, $Tuple3(amountEstimated, feeAmount, bonus)) | |
1350 | 1352 | } | |
1351 | 1353 | ||
1352 | 1354 | ||
1353 | 1355 | ||
1354 | 1356 | @Callable(i) | |
1355 | 1357 | func unstakeAndGetOneTkn (unstakeAmount,outAssetIdStr,minOutAmount) = { | |
1356 | 1358 | let isPoolOneTokenOperationsDisabled = { | |
1357 | 1359 | let @ = invoke(factoryContract, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil) | |
1358 | 1360 | if ($isInstanceOf(@, "Boolean")) | |
1359 | 1361 | then @ | |
1360 | 1362 | else throw(($getType(@) + " couldn't be cast to Boolean")) | |
1361 | 1363 | } | |
1362 | 1364 | let isGetDisabled = if (!(isAddressWhitelisted(i.caller))) | |
1363 | 1365 | then if (if (isGlobalShutdown()) | |
1364 | 1366 | then true | |
1365 | 1367 | else (cfgPoolStatus == PoolShutdown)) | |
1366 | 1368 | then true | |
1367 | 1369 | else isPoolOneTokenOperationsDisabled | |
1368 | 1370 | else false | |
1369 | 1371 | let checks = [if (if (!(isGetDisabled)) | |
1370 | 1372 | then true | |
1371 | 1373 | else isManager(i)) | |
1372 | 1374 | then true | |
1373 | 1375 | else throwErr("get operation is blocked by admin"), if ((size(i.payments) == 0)) | |
1374 | 1376 | then true | |
1375 | 1377 | else throwErr("no payments are expected")] | |
1376 | 1378 | if ((checks == checks)) | |
1377 | 1379 | then { | |
1378 | 1380 | let outAssetId = parseAssetId(outAssetIdStr) | |
1379 | 1381 | let userAddress = i.caller | |
1380 | 1382 | let txId = i.transactionId | |
1381 | 1383 | let currentKLp = calcCurrentKLp(toBigInt(0), toBigInt(0), toBigInt(0)) | |
1382 | 1384 | if ((currentKLp == currentKLp)) | |
1383 | 1385 | then { | |
1384 | 1386 | let unstakeInv = invoke(stakingContract, "unstake", [toBase58String(cfgLpAssetId), unstakeAmount], nil) | |
1385 | 1387 | if ((unstakeInv == unstakeInv)) | |
1386 | 1388 | then { | |
1387 | - | let $ | |
1388 | - | if (($ | |
1389 | + | let $t05304753198 = calcGetOneToken(outAssetId, unstakeAmount, cfgLpAssetId, userAddress, txId) | |
1390 | + | if (($t05304753198 == $t05304753198)) | |
1389 | 1391 | then { | |
1390 | - | let outInAmountAsset = $ | |
1391 | - | let bonus = $ | |
1392 | - | let feeAmount = $ | |
1393 | - | let commonState = $ | |
1394 | - | let amountEstimated = $ | |
1392 | + | let outInAmountAsset = $t05304753198._5 | |
1393 | + | let bonus = $t05304753198._4 | |
1394 | + | let feeAmount = $t05304753198._3 | |
1395 | + | let commonState = $t05304753198._2 | |
1396 | + | let amountEstimated = $t05304753198._1 | |
1395 | 1397 | let amount = if (if ((minOutAmount > 0)) | |
1396 | 1398 | then (minOutAmount > amountEstimated) | |
1397 | 1399 | else false) | |
1398 | 1400 | then throwErr(makeString(["amount to receive is less than ", toString(minOutAmount)], "")) | |
1399 | 1401 | else amountEstimated | |
1400 | 1402 | let burnInv = invoke(factoryContract, "burn", [unstakeAmount], [AttachedPayment(cfgLpAssetId, unstakeAmount)]) | |
1401 | 1403 | if ((burnInv == burnInv)) | |
1402 | 1404 | then { | |
1403 | 1405 | let withdrawState = withdrawAndRebalanceAsset(outAssetIdStr, (amount + max([0, feeAmount]))) | |
1404 | 1406 | let assetTransfer = [ScriptTransfer(i.caller, amount, outAssetId)] | |
1405 | 1407 | let sendFee = if ((feeAmount > 0)) | |
1406 | 1408 | then [ScriptTransfer(feeCollectorAddress, feeAmount, outAssetId)] | |
1407 | 1409 | else nil | |
1408 | - | let $ | |
1410 | + | let $t05385754104 = { | |
1409 | 1411 | let feeAmountForCalc = if ((this == feeCollectorAddress)) | |
1410 | 1412 | then 0 | |
1411 | 1413 | else feeAmount | |
1412 | 1414 | if (outInAmountAsset) | |
1413 | 1415 | then $Tuple2(-((amount + feeAmountForCalc)), 0) | |
1414 | 1416 | else $Tuple2(0, -((amount + feeAmountForCalc))) | |
1415 | 1417 | } | |
1416 | - | let amountAssetBalanceDelta = $ | |
1417 | - | let priceAssetBalanceDelta = $ | |
1418 | - | let $ | |
1419 | - | let refreshKLpActions = $ | |
1420 | - | let updatedKLp = $ | |
1418 | + | let amountAssetBalanceDelta = $t05385754104._1 | |
1419 | + | let priceAssetBalanceDelta = $t05385754104._2 | |
1420 | + | let $t05410754215 = refreshKLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0) | |
1421 | + | let refreshKLpActions = $t05410754215._1 | |
1422 | + | let updatedKLp = $t05410754215._2 | |
1421 | 1423 | let isUpdatedKLpValid = validateUpdatedKLp(currentKLp, updatedKLp) | |
1422 | 1424 | if ((isUpdatedKLpValid == isUpdatedKLpValid)) | |
1423 | 1425 | then $Tuple2(((((commonState ++ withdrawState) ++ assetTransfer) ++ sendFee) ++ refreshKLpActions), amount) | |
1424 | 1426 | else throw("Strict value is not equal to itself.") | |
1425 | 1427 | } | |
1426 | 1428 | else throw("Strict value is not equal to itself.") | |
1427 | 1429 | } | |
1428 | 1430 | else throw("Strict value is not equal to itself.") | |
1429 | 1431 | } | |
1430 | 1432 | else throw("Strict value is not equal to itself.") | |
1431 | 1433 | } | |
1432 | 1434 | else throw("Strict value is not equal to itself.") | |
1433 | 1435 | } | |
1434 | 1436 | else throw("Strict value is not equal to itself.") | |
1435 | 1437 | } | |
1436 | 1438 | ||
1437 | 1439 | ||
1438 | 1440 | ||
1439 | 1441 | @Callable(i) | |
1440 | 1442 | func get () = { | |
1441 | 1443 | let res = commonGet(i) | |
1442 | 1444 | let outAmAmt = res._1 | |
1443 | 1445 | let outPrAmt = res._2 | |
1444 | 1446 | let pmtAmt = res._3 | |
1445 | 1447 | let pmtAssetId = res._4 | |
1446 | 1448 | let state = res._5 | |
1447 | 1449 | let withdrawState = withdrawAndRebalanceAll(outAmAmt, outPrAmt) | |
1448 | 1450 | let currentKLp = calcCurrentKLp(toBigInt(0), toBigInt(0), toBigInt(0)) | |
1449 | 1451 | if ((currentKLp == currentKLp)) | |
1450 | 1452 | then { | |
1451 | 1453 | let burnLPAssetOnFactory = invoke(factoryContract, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)]) | |
1452 | 1454 | if ((burnLPAssetOnFactory == burnLPAssetOnFactory)) | |
1453 | 1455 | then { | |
1454 | - | let $ | |
1455 | - | let refreshKLpActions = $ | |
1456 | - | let updatedKLp = $ | |
1456 | + | let $t05531055391 = refreshKLpInternal(-(outAmAmt), -(outPrAmt), 0) | |
1457 | + | let refreshKLpActions = $t05531055391._1 | |
1458 | + | let updatedKLp = $t05531055391._2 | |
1457 | 1459 | let isUpdatedKLpValid = validateUpdatedKLp(currentKLp, updatedKLp) | |
1458 | 1460 | if ((isUpdatedKLpValid == isUpdatedKLpValid)) | |
1459 | 1461 | then ((withdrawState ++ state) ++ refreshKLpActions) | |
1460 | 1462 | else throw("Strict value is not equal to itself.") | |
1461 | 1463 | } | |
1462 | 1464 | else throw("Strict value is not equal to itself.") | |
1463 | 1465 | } | |
1464 | 1466 | else throw("Strict value is not equal to itself.") | |
1465 | 1467 | } | |
1466 | 1468 | ||
1467 | 1469 | ||
1468 | 1470 | ||
1469 | 1471 | @Callable(i) | |
1470 | 1472 | func getNoLess (noLessThenAmtAsset,noLessThenPriceAsset) = { | |
1471 | 1473 | let res = commonGet(i) | |
1472 | 1474 | let outAmAmt = res._1 | |
1473 | 1475 | let outPrAmt = res._2 | |
1474 | 1476 | let pmtAmt = res._3 | |
1475 | 1477 | let pmtAssetId = res._4 | |
1476 | 1478 | let state = res._5 | |
1477 | 1479 | if ((noLessThenAmtAsset > outAmAmt)) | |
1478 | 1480 | then throw(((("noLessThenAmtAsset failed: " + toString(outAmAmt)) + " < ") + toString(noLessThenAmtAsset))) | |
1479 | 1481 | else if ((noLessThenPriceAsset > outPrAmt)) | |
1480 | 1482 | then throw(((("noLessThenPriceAsset failed: " + toString(outPrAmt)) + " < ") + toString(noLessThenPriceAsset))) | |
1481 | 1483 | else { | |
1482 | 1484 | let withdrawState = withdrawAndRebalanceAll(outAmAmt, outPrAmt) | |
1483 | 1485 | let currentKLp = calcCurrentKLp(toBigInt(0), toBigInt(0), toBigInt(0)) | |
1484 | 1486 | if ((currentKLp == currentKLp)) | |
1485 | 1487 | then { | |
1486 | 1488 | let burnLPAssetOnFactory = invoke(factoryContract, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)]) | |
1487 | 1489 | if ((burnLPAssetOnFactory == burnLPAssetOnFactory)) | |
1488 | 1490 | then { | |
1489 | - | let $ | |
1490 | - | let refreshKLpActions = $ | |
1491 | - | let updatedKLp = $ | |
1491 | + | let $t05648656567 = refreshKLpInternal(-(outAmAmt), -(outPrAmt), 0) | |
1492 | + | let refreshKLpActions = $t05648656567._1 | |
1493 | + | let updatedKLp = $t05648656567._2 | |
1492 | 1494 | let isUpdatedKLpValid = validateUpdatedKLp(currentKLp, updatedKLp) | |
1493 | 1495 | if ((isUpdatedKLpValid == isUpdatedKLpValid)) | |
1494 | 1496 | then ((withdrawState ++ state) ++ refreshKLpActions) | |
1495 | 1497 | else throw("Strict value is not equal to itself.") | |
1496 | 1498 | } | |
1497 | 1499 | else throw("Strict value is not equal to itself.") | |
1498 | 1500 | } | |
1499 | 1501 | else throw("Strict value is not equal to itself.") | |
1500 | 1502 | } | |
1501 | 1503 | } | |
1502 | 1504 | ||
1503 | 1505 | ||
1504 | 1506 | ||
1505 | 1507 | @Callable(i) | |
1506 | 1508 | func unstakeAndGet (amount) = { | |
1507 | 1509 | let checkPayments = if ((size(i.payments) != 0)) | |
1508 | 1510 | then throw("No payments are expected") | |
1509 | 1511 | else true | |
1510 | 1512 | if ((checkPayments == checkPayments)) | |
1511 | 1513 | then { | |
1512 | 1514 | let cfg = getPoolConfig() | |
1513 | 1515 | let lpAssetId = fromBase58String(cfg[idxPoolLPAssetId]) | |
1514 | 1516 | let currentKLp = calcCurrentKLp(toBigInt(0), toBigInt(0), toBigInt(0)) | |
1515 | 1517 | if ((currentKLp == currentKLp)) | |
1516 | 1518 | then { | |
1517 | 1519 | let unstakeInv = invoke(stakingContract, "unstake", [toBase58String(lpAssetId), amount], nil) | |
1518 | 1520 | if ((unstakeInv == unstakeInv)) | |
1519 | 1521 | then { | |
1520 | 1522 | let res = estimateGetOperation(toBase58String(i.transactionId), toBase58String(lpAssetId), amount, i.caller) | |
1521 | 1523 | let outAmAmt = res._1 | |
1522 | 1524 | let outPrAmt = res._2 | |
1523 | 1525 | let poolStatus = parseIntValue(res._9) | |
1524 | 1526 | let state = res._10 | |
1525 | 1527 | let withdrawState = withdrawAndRebalanceAll(outAmAmt, outPrAmt) | |
1526 | 1528 | let isGetDisabled = if (!(isAddressWhitelisted(i.caller))) | |
1527 | 1529 | then if (isGlobalShutdown()) | |
1528 | 1530 | then true | |
1529 | 1531 | else (cfgPoolStatus == PoolShutdown) | |
1530 | 1532 | else false | |
1531 | 1533 | let checkPoolStatus = if (isGetDisabled) | |
1532 | 1534 | then throw(("Get operation is blocked by admin. Status = " + toString(poolStatus))) | |
1533 | 1535 | else true | |
1534 | 1536 | if ((checkPoolStatus == checkPoolStatus)) | |
1535 | 1537 | then { | |
1536 | 1538 | let burnLPAssetOnFactory = invoke(factoryContract, "burn", [amount], [AttachedPayment(lpAssetId, amount)]) | |
1537 | 1539 | if ((burnLPAssetOnFactory == burnLPAssetOnFactory)) | |
1538 | 1540 | then { | |
1539 | - | let $ | |
1540 | - | let refreshKLpActions = $ | |
1541 | - | let updatedKLp = $ | |
1541 | + | let $t05791557996 = refreshKLpInternal(-(outAmAmt), -(outPrAmt), 0) | |
1542 | + | let refreshKLpActions = $t05791557996._1 | |
1543 | + | let updatedKLp = $t05791557996._2 | |
1542 | 1544 | let isUpdatedKLpValid = validateUpdatedKLp(currentKLp, updatedKLp) | |
1543 | 1545 | if ((isUpdatedKLpValid == isUpdatedKLpValid)) | |
1544 | 1546 | then ((withdrawState ++ state) ++ refreshKLpActions) | |
1545 | 1547 | else throw("Strict value is not equal to itself.") | |
1546 | 1548 | } | |
1547 | 1549 | else throw("Strict value is not equal to itself.") | |
1548 | 1550 | } | |
1549 | 1551 | else throw("Strict value is not equal to itself.") | |
1550 | 1552 | } | |
1551 | 1553 | else throw("Strict value is not equal to itself.") | |
1552 | 1554 | } | |
1553 | 1555 | else throw("Strict value is not equal to itself.") | |
1554 | 1556 | } | |
1555 | 1557 | else throw("Strict value is not equal to itself.") | |
1556 | 1558 | } | |
1557 | 1559 | ||
1558 | 1560 | ||
1559 | 1561 | ||
1560 | 1562 | @Callable(i) | |
1561 | 1563 | func unstakeAndGetNoLess (unstakeAmount,noLessThenAmountAsset,noLessThenPriceAsset) = { | |
1562 | 1564 | let isGetDisabled = if (!(isAddressWhitelisted(i.caller))) | |
1563 | 1565 | then if (isGlobalShutdown()) | |
1564 | 1566 | then true | |
1565 | 1567 | else (cfgPoolStatus == PoolShutdown) | |
1566 | 1568 | else false | |
1567 | 1569 | let checks = [if (!(isGetDisabled)) | |
1568 | 1570 | then true | |
1569 | 1571 | else throw("get operation is blocked by admin"), if ((size(i.payments) == 0)) | |
1570 | 1572 | then true | |
1571 | 1573 | else throw("no payments are expected")] | |
1572 | 1574 | if ((checks == checks)) | |
1573 | 1575 | then { | |
1574 | 1576 | let currentKLp = calcCurrentKLp(toBigInt(0), toBigInt(0), toBigInt(0)) | |
1575 | 1577 | if ((currentKLp == currentKLp)) | |
1576 | 1578 | then { | |
1577 | 1579 | let unstakeInv = invoke(stakingContract, "unstake", [toBase58String(cfgLpAssetId), unstakeAmount], nil) | |
1578 | 1580 | if ((unstakeInv == unstakeInv)) | |
1579 | 1581 | then { | |
1580 | 1582 | let res = estimateGetOperation(toBase58String(i.transactionId), toBase58String(cfgLpAssetId), unstakeAmount, i.caller) | |
1581 | 1583 | let outAmAmt = res._1 | |
1582 | 1584 | let outPrAmt = res._2 | |
1583 | 1585 | let state = res._10 | |
1584 | 1586 | let withdrawState = withdrawAndRebalanceAll(outAmAmt, outPrAmt) | |
1585 | 1587 | let checkAmounts = [if ((outAmAmt >= noLessThenAmountAsset)) | |
1586 | 1588 | then true | |
1587 | 1589 | else throw(makeString(["amount asset amount to receive is less than ", toString(noLessThenAmountAsset)], "")), if ((outPrAmt >= noLessThenPriceAsset)) | |
1588 | 1590 | then true | |
1589 | 1591 | else throw(makeString(["price asset amount to receive is less than ", toString(noLessThenPriceAsset)], ""))] | |
1590 | 1592 | if ((checkAmounts == checkAmounts)) | |
1591 | 1593 | then { | |
1592 | 1594 | let burnLPAssetOnFactory = invoke(factoryContract, "burn", [unstakeAmount], [AttachedPayment(cfgLpAssetId, unstakeAmount)]) | |
1593 | 1595 | if ((burnLPAssetOnFactory == burnLPAssetOnFactory)) | |
1594 | 1596 | then { | |
1595 | - | let $ | |
1596 | - | let refreshKLpActions = $ | |
1597 | - | let updatedKLp = $ | |
1597 | + | let $t05947459555 = refreshKLpInternal(-(outAmAmt), -(outPrAmt), 0) | |
1598 | + | let refreshKLpActions = $t05947459555._1 | |
1599 | + | let updatedKLp = $t05947459555._2 | |
1598 | 1600 | let isUpdatedKLpValid = validateUpdatedKLp(currentKLp, updatedKLp) | |
1599 | 1601 | if ((isUpdatedKLpValid == isUpdatedKLpValid)) | |
1600 | 1602 | then ((withdrawState ++ state) ++ refreshKLpActions) | |
1601 | 1603 | else throw("Strict value is not equal to itself.") | |
1602 | 1604 | } | |
1603 | 1605 | else throw("Strict value is not equal to itself.") | |
1604 | 1606 | } | |
1605 | 1607 | else throw("Strict value is not equal to itself.") | |
1606 | 1608 | } | |
1607 | 1609 | else throw("Strict value is not equal to itself.") | |
1608 | 1610 | } | |
1609 | 1611 | else throw("Strict value is not equal to itself.") | |
1610 | 1612 | } | |
1611 | 1613 | else throw("Strict value is not equal to itself.") | |
1612 | 1614 | } | |
1613 | 1615 | ||
1614 | 1616 | ||
1615 | 1617 | ||
1616 | 1618 | @Callable(i) | |
1617 | 1619 | func activate (amtAssetStr,priceAssetStr) = if ((toString(i.caller) != toString(factoryContract))) | |
1618 | 1620 | then throw("permissions denied") | |
1619 | 1621 | else $Tuple2([StringEntry(aa(), amtAssetStr), StringEntry(pa(), priceAssetStr)], "success") | |
1620 | 1622 | ||
1621 | 1623 | ||
1622 | 1624 | ||
1623 | 1625 | @Callable(i) | |
1624 | 1626 | func refreshKLp () = { | |
1625 | 1627 | let lastRefreshedBlockHeight = valueOrElse(getInteger(keyKLpRefreshedHeight), 0) | |
1626 | 1628 | let checkLastRefreshedBlockHeight = if (((height - lastRefreshedBlockHeight) >= kLpRefreshDelay)) | |
1627 | 1629 | then unit | |
1628 | 1630 | else throwErr(makeString([toString(kLpRefreshDelay), " blocks have not passed since the previous call"], "")) | |
1629 | 1631 | if ((checkLastRefreshedBlockHeight == checkLastRefreshedBlockHeight)) | |
1630 | 1632 | then { | |
1631 | 1633 | let kLp = valueOrErrorMessage(parseBigInt(valueOrElse(getString(this, keyKLp), "0")), fmtErr("invalid kLp")) | |
1632 | - | let $ | |
1633 | - | let kLpUpdateActions = $ | |
1634 | - | let updatedKLp = $ | |
1634 | + | let $t06075960823 = refreshKLpInternal(0, 0, 0) | |
1635 | + | let kLpUpdateActions = $t06075960823._1 | |
1636 | + | let updatedKLp = $t06075960823._2 | |
1635 | 1637 | let actions = if ((kLp != updatedKLp)) | |
1636 | 1638 | then kLpUpdateActions | |
1637 | 1639 | else throwErr("nothing to refresh") | |
1638 | 1640 | $Tuple2(actions, toString(updatedKLp)) | |
1639 | 1641 | } | |
1640 | 1642 | else throw("Strict value is not equal to itself.") | |
1641 | 1643 | } | |
1642 | 1644 | ||
1643 | 1645 | ||
1644 | 1646 | ||
1645 | 1647 | @Callable(i) | |
1646 | 1648 | func getPoolConfigWrapperREADONLY () = $Tuple2(nil, getPoolConfig()) | |
1647 | 1649 | ||
1648 | 1650 | ||
1649 | 1651 | ||
1650 | 1652 | @Callable(i) | |
1651 | 1653 | func getAccBalanceWrapperREADONLY (assetId) = $Tuple2(nil, getAccBalance(assetId)) | |
1652 | 1654 | ||
1653 | 1655 | ||
1654 | 1656 | ||
1655 | 1657 | @Callable(i) | |
1656 | 1658 | func calcPricesWrapperREADONLY (amAmt,prAmt,lpAmt) = { | |
1657 | 1659 | let prices = calcPrices(amAmt, prAmt, lpAmt) | |
1658 | 1660 | $Tuple2(nil, [toString(prices[0]), toString(prices[1]), toString(prices[2])]) | |
1659 | 1661 | } | |
1660 | 1662 | ||
1661 | 1663 | ||
1662 | 1664 | ||
1663 | 1665 | @Callable(i) | |
1664 | 1666 | func toX18WrapperREADONLY (origVal,origScaleMult) = $Tuple2(nil, toString(toX18(origVal, origScaleMult))) | |
1665 | 1667 | ||
1666 | 1668 | ||
1667 | 1669 | ||
1668 | 1670 | @Callable(i) | |
1669 | 1671 | func fromX18WrapperREADONLY (val,resultScaleMult) = $Tuple2(nil, fromX18(parseBigIntValue(val), resultScaleMult)) | |
1670 | 1672 | ||
1671 | 1673 | ||
1672 | 1674 | ||
1673 | 1675 | @Callable(i) | |
1674 | 1676 | func calcPriceBigIntWrapperREADONLY (prAmtX18,amAmtX18) = $Tuple2(nil, toString(calcPriceBigInt(parseBigIntValue(prAmtX18), parseBigIntValue(amAmtX18)))) | |
1675 | 1677 | ||
1676 | 1678 | ||
1677 | 1679 | ||
1678 | 1680 | @Callable(i) | |
1679 | 1681 | func estimatePutOperationWrapperREADONLY (txId58,slippageTolerance,inAmAssetAmt,inAmAssetId,inPrAssetAmt,inPrAssetId,userAddress,isEvaluate,emitLp) = $Tuple2(nil, estimatePutOperation(txId58, slippageTolerance, inAmAssetAmt, inAmAssetId, inPrAssetAmt, inPrAssetId, userAddress, isEvaluate, emitLp)) | |
1680 | 1682 | ||
1681 | 1683 | ||
1682 | 1684 | ||
1683 | 1685 | @Callable(i) | |
1684 | 1686 | func estimateGetOperationWrapperREADONLY (txId58,pmtAssetId,pmtLpAmt,userAddress) = { | |
1685 | 1687 | let res = estimateGetOperation(txId58, pmtAssetId, pmtLpAmt, addressFromStringValue(userAddress)) | |
1686 | 1688 | $Tuple2(nil, $Tuple10(res._1, res._2, res._3, res._4, res._5, res._6, res._7, toString(res._8), res._9, res._10)) | |
1687 | 1689 | } | |
1688 | 1690 | ||
1689 | 1691 | ||
1690 | 1692 | ||
1691 | 1693 | @Callable(i) | |
1692 | 1694 | func statsREADONLY () = { | |
1693 | 1695 | let cfg = getPoolConfig() | |
1694 | 1696 | let lpAssetId = fromBase58String(cfg[idxPoolLPAssetId]) | |
1695 | 1697 | let amtAssetId = cfg[idxAmtAssetId] | |
1696 | 1698 | let priceAssetId = cfg[idxPriceAssetId] | |
1697 | 1699 | let iAmtAssetId = cfg[idxIAmtAssetId] | |
1698 | 1700 | let iPriceAssetId = cfg[idxIPriceAssetId] | |
1699 | 1701 | let amtAssetDcm = parseIntValue(cfg[idxAmtAssetDcm]) | |
1700 | 1702 | let priceAssetDcm = parseIntValue(cfg[idxPriceAssetDcm]) | |
1701 | 1703 | let poolLPBalance = valueOrErrorMessage(assetInfo(lpAssetId), (("Asset " + toBase58String(lpAssetId)) + " doesn't exist")).quantity | |
1702 | 1704 | let accAmtAssetBalance = getAccBalance(amtAssetId) | |
1703 | 1705 | let accPriceAssetBalance = getAccBalance(priceAssetId) | |
1704 | 1706 | let pricesList = if ((poolLPBalance == 0)) | |
1705 | 1707 | then [zeroBigInt, zeroBigInt, zeroBigInt] | |
1706 | 1708 | else calcPrices(accAmtAssetBalance, accPriceAssetBalance, poolLPBalance) | |
1707 | 1709 | let curPrice = 0 | |
1708 | 1710 | let lpAmtAssetShare = fromX18(pricesList[1], scale8) | |
1709 | 1711 | let lpPriceAssetShare = fromX18(pricesList[2], scale8) | |
1710 | 1712 | let poolWeight = value(getInteger(factoryContract, keyPoolWeight(toString(this)))) | |
1711 | 1713 | $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)) | |
1712 | 1714 | } | |
1713 | 1715 | ||
1714 | 1716 | ||
1715 | 1717 | ||
1716 | 1718 | @Callable(i) | |
1717 | 1719 | func evaluatePutByAmountAssetREADONLY (inAmAssetAmt) = { | |
1718 | 1720 | let cfg = getPoolConfig() | |
1719 | 1721 | let lpAssetId = fromBase58String(cfg[idxPoolLPAssetId]) | |
1720 | 1722 | let amAssetIdStr = cfg[idxAmtAssetId] | |
1721 | 1723 | let amAssetId = fromBase58String(amAssetIdStr) | |
1722 | 1724 | let prAssetIdStr = cfg[idxPriceAssetId] | |
1723 | 1725 | let prAssetId = fromBase58String(prAssetIdStr) | |
1724 | 1726 | let amtAssetDcm = parseIntValue(cfg[idxAmtAssetDcm]) | |
1725 | 1727 | let priceAssetDcm = parseIntValue(cfg[idxPriceAssetDcm]) | |
1726 | 1728 | let poolStatus = cfg[idxPoolStatus] | |
1727 | 1729 | let poolLPBalance = valueOrErrorMessage(assetInfo(lpAssetId), (("Asset " + toBase58String(lpAssetId)) + " doesn't exist")).quantity | |
1728 | 1730 | let accAmtAssetBalance = getAccBalance(amAssetIdStr) | |
1729 | 1731 | let accPriceAssetBalance = getAccBalance(prAssetIdStr) | |
1730 | 1732 | let amtAssetAmtX18 = toX18(accAmtAssetBalance, amtAssetDcm) | |
1731 | 1733 | let priceAssetAmtX18 = toX18(accPriceAssetBalance, priceAssetDcm) | |
1732 | 1734 | let curPriceX18 = if ((poolLPBalance == 0)) | |
1733 | 1735 | then zeroBigInt | |
1734 | 1736 | else calcPriceBigInt(priceAssetAmtX18, amtAssetAmtX18) | |
1735 | 1737 | let inAmAssetAmtX18 = toX18(inAmAssetAmt, amtAssetDcm) | |
1736 | 1738 | let inPrAssetAmtX18 = fraction(inAmAssetAmtX18, curPriceX18, scale18) | |
1737 | 1739 | let inPrAssetAmt = fromX18(inPrAssetAmtX18, priceAssetDcm) | |
1738 | 1740 | let estPut = estimatePutOperation("", 500000, inAmAssetAmt, amAssetId, inPrAssetAmt, prAssetId, "", true, false) | |
1739 | 1741 | let calcLpAmt = estPut._1 | |
1740 | 1742 | let curPriceCalc = estPut._3 | |
1741 | 1743 | let amBalance = estPut._4 | |
1742 | 1744 | let prBalance = estPut._5 | |
1743 | 1745 | let lpEmission = estPut._6 | |
1744 | 1746 | $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)) | |
1745 | 1747 | } | |
1746 | 1748 | ||
1747 | 1749 | ||
1748 | 1750 | ||
1749 | 1751 | @Callable(i) | |
1750 | 1752 | func evaluatePutByPriceAssetREADONLY (inPrAssetAmt) = { | |
1751 | 1753 | let cfg = getPoolConfig() | |
1752 | 1754 | let lpAssetId = fromBase58String(cfg[idxPoolLPAssetId]) | |
1753 | 1755 | let amAssetIdStr = cfg[idxAmtAssetId] | |
1754 | 1756 | let amAssetId = fromBase58String(amAssetIdStr) | |
1755 | 1757 | let prAssetIdStr = cfg[idxPriceAssetId] | |
1756 | 1758 | let prAssetId = fromBase58String(prAssetIdStr) | |
1757 | 1759 | let amtAssetDcm = parseIntValue(cfg[idxAmtAssetDcm]) | |
1758 | 1760 | let priceAssetDcm = parseIntValue(cfg[idxPriceAssetDcm]) | |
1759 | 1761 | let poolStatus = cfg[idxPoolStatus] | |
1760 | 1762 | let poolLPBalance = valueOrErrorMessage(assetInfo(lpAssetId), (("Asset " + toBase58String(lpAssetId)) + " doesn't exist")).quantity | |
1761 | 1763 | let amBalanceRaw = getAccBalance(amAssetIdStr) | |
1762 | 1764 | let prBalanceRaw = getAccBalance(prAssetIdStr) | |
1763 | 1765 | let amBalanceRawX18 = toX18(amBalanceRaw, amtAssetDcm) | |
1764 | 1766 | let prBalanceRawX18 = toX18(prBalanceRaw, priceAssetDcm) | |
1765 | 1767 | let curPriceX18 = if ((poolLPBalance == 0)) | |
1766 | 1768 | then zeroBigInt | |
1767 | 1769 | else calcPriceBigInt(prBalanceRawX18, amBalanceRawX18) | |
1768 | 1770 | let inPrAssetAmtX18 = toX18(inPrAssetAmt, priceAssetDcm) | |
1769 | 1771 | let inAmAssetAmtX18 = fraction(inPrAssetAmtX18, scale18, curPriceX18) | |
1770 | 1772 | let inAmAssetAmt = fromX18(inAmAssetAmtX18, amtAssetDcm) | |
1771 | 1773 | let estPut = estimatePutOperation("", 500000, inAmAssetAmt, amAssetId, inPrAssetAmt, prAssetId, "", true, false) | |
1772 | 1774 | let calcLpAmt = estPut._1 | |
1773 | 1775 | let curPriceCalc = estPut._3 | |
1774 | 1776 | let amBalance = estPut._4 | |
1775 | 1777 | let prBalance = estPut._5 | |
1776 | 1778 | let lpEmission = estPut._6 | |
1777 | 1779 | $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)) | |
1778 | 1780 | } | |
1779 | 1781 | ||
1780 | 1782 | ||
1781 | 1783 | ||
1782 | 1784 | @Callable(i) | |
1783 | 1785 | func evaluateGetREADONLY (paymentLpAssetId,paymentLpAmt) = { | |
1784 | 1786 | let res = estimateGetOperation("", paymentLpAssetId, paymentLpAmt, this) | |
1785 | 1787 | let outAmAmt = res._1 | |
1786 | 1788 | let outPrAmt = res._2 | |
1787 | 1789 | let amBalance = res._5 | |
1788 | 1790 | let prBalance = res._6 | |
1789 | 1791 | let lpEmission = res._7 | |
1790 | 1792 | let curPrice = res._8 | |
1791 | 1793 | let poolStatus = parseIntValue(res._9) | |
1792 | 1794 | $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)) | |
1793 | 1795 | } | |
1794 | 1796 | ||
1795 | 1797 | ||
1796 | 1798 | @Verifier(tx) | |
1797 | 1799 | func verify () = { | |
1798 | 1800 | let targetPublicKey = match managerPublicKeyOrUnit() { | |
1799 | 1801 | case pk: ByteVector => | |
1800 | 1802 | pk | |
1801 | 1803 | case _: Unit => | |
1802 | 1804 | tx.senderPublicKey | |
1803 | 1805 | case _ => | |
1804 | 1806 | throw("Match error") | |
1805 | 1807 | } | |
1806 | 1808 | match tx { | |
1807 | 1809 | case order: Order => | |
1808 | 1810 | let matcherPub = getMatcherPubOrFail() | |
1809 | - | let $ | |
1811 | + | let $t06948569602 = if (skipOrderValidation()) | |
1810 | 1812 | then $Tuple2(true, "") | |
1811 | 1813 | else validateMatcherOrderAllowed(order) | |
1812 | - | let orderValid = $ | |
1813 | - | let orderValidInfo = $ | |
1814 | + | let orderValid = $t06948569602._1 | |
1815 | + | let orderValidInfo = $t06948569602._2 | |
1814 | 1816 | let senderValid = sigVerify(order.bodyBytes, order.proofs[0], order.senderPublicKey) | |
1815 | 1817 | let matcherValid = sigVerify(order.bodyBytes, order.proofs[1], matcherPub) | |
1816 | 1818 | if (if (if (orderValid) | |
1817 | 1819 | then senderValid | |
1818 | 1820 | else false) | |
1819 | 1821 | then matcherValid | |
1820 | 1822 | else false) | |
1821 | 1823 | then true | |
1822 | 1824 | else throwOrderError(orderValid, orderValidInfo, senderValid, matcherValid) | |
1823 | 1825 | case s: SetScriptTransaction => | |
1824 | 1826 | if (sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey)) | |
1825 | 1827 | then true | |
1826 | 1828 | else { | |
1827 | 1829 | let newHash = blake2b256(value(s.script)) | |
1828 | 1830 | let allowedHash = fromBase64String(value(getString(factoryContract, keyAllowedLpScriptHash()))) | |
1829 | 1831 | let currentHash = scriptHash(this) | |
1830 | 1832 | if ((allowedHash == newHash)) | |
1831 | 1833 | then (currentHash != newHash) | |
1832 | 1834 | else false | |
1833 | 1835 | } | |
1834 | 1836 | case _ => | |
1835 | 1837 | sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey) | |
1836 | 1838 | } | |
1837 | 1839 | } | |
1838 | 1840 |
github/deemru/w8io/169f3d6 227.90 ms ◑