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