tx · 5si5UsAw7AzsJiU3AuFJJoArXakgAYowLpS5ssviKbEp

3N6wAa7PMFZJu4Zrmp3avXmMnRTrRpMM9Lh:  -0.04300000 Waves

2023.04.05 11:54 [2521030] smart account 3N6wAa7PMFZJu4Zrmp3avXmMnRTrRpMM9Lh > SELF 0.00000000 Waves

{ "type": 13, "id": "5si5UsAw7AzsJiU3AuFJJoArXakgAYowLpS5ssviKbEp", "fee": 4300000, "feeAssetId": null, "timestamp": 1680684908506, "version": 2, "chainId": 84, "sender": "3N6wAa7PMFZJu4Zrmp3avXmMnRTrRpMM9Lh", "senderPublicKey": "Cr8D7eozSzJh7XHsYTjBinPpo3SS83BrCGiBAJsjGxBo", "proofs": [ "4SpG6tKsuL2BMBS8yGrXT19MoGEWqiFs7Suoae4DFQu3rDSVVBwmQx8FTVxhCZXWMSV2wXkznEAAVFtmvseDuPqP" ], "script": "base64:BgK8NwgCEgASBQoDAQQBEgcKBQEEAQgBEgMKAQgSABIECgIBBBIDCgEBEgQKAgEEEgQKAggBEgQKAggBEgQKAggBEgUKAwEIARIAEgQKAgEBEgMKAQESBQoDAQEBEgQKAggIEgASABIDCgEIEgUKAwEBARIECgIBARIECgIIARIECgIICBILCgkIAQECAQIIBAQSBgoECAgBCBIAEgMKAQESAwoBARIECgIIASIKbFBkZWNpbWFscyIGc2NhbGU4IgxzY2FsZThCaWdJbnQiB3NjYWxlMTgiCnplcm9CaWdJbnQiBGJpZzAiBGJpZzEiBGJpZzIiC3dhdmVzU3RyaW5nIgNTRVAiClBvb2xBY3RpdmUiD1Bvb2xQdXREaXNhYmxlZCITUG9vbE1hdGNoZXJEaXNhYmxlZCIMUG9vbFNodXRkb3duIg5pZHhQb29sQWRkcmVzcyINaWR4UG9vbFN0YXR1cyIQaWR4UG9vbExQQXNzZXRJZCINaWR4QW10QXNzZXRJZCIPaWR4UHJpY2VBc3NldElkIg5pZHhBbXRBc3NldERjbSIQaWR4UHJpY2VBc3NldERjbSIOaWR4SUFtdEFzc2V0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GVycm9yBAJiWAUCaWsDCQABAgUCYlgCBU9yZGVyBAJlTAUCYlgEAmluCQECYmQABAJpbwkBAmVLAQUCZUwEAmFLCAUCaW8CXzEEAmFMCAUCaW8CXzIEAmFNCQD0AwMIBQJlTAlib2R5Qnl0ZXMJAJEDAggFAmVMBnByb29mcwAACAUCZUwPc2VuZGVyUHVibGljS2V5BAJhTgkA9AMDCAUCZUwJYm9keUJ5dGVzCQCRAwIIBQJlTAZwcm9vZnMAAQUCaW4DAwMFAmFLBQJhTQcFAmFOBwYJAQJhSgQFAmFLBQJhTAUCYU0FAmFOAwkAAQIFAmJYAhRTZXRTY3JpcHRUcmFuc2FjdGlvbgQCZ2oFAmJYAwkA9AMDCAUCaWsJYm9keUJ5dGVzCQCRAwIIBQJpawZwcm9vZnMAAAUCaW0GBAJpcAkA9gMBCQEFdmFsdWUBCAUCZ2oGc2NyaXB0BAJpcQkA2wQBCQEFdmFsdWUBCQCdCAIFAmFWCQECYUgABAJpcgkA8QcBBQR0aGlzAwkAAAIFAmlxBQJpcAkBAiE9AgUCaXIFAmlwBwkA9AMDCAUCaWsJYm9keUJ5dGVzCQCRAwIIBQJpawZwcm9vZnMAAAUCaW2Yt2P0", "height": 2521030, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: DE3NbXUJhMiNMWL5LcRH7Knd3VfRuYdRDH2xme5unaRG Next: 8K6sFdr3LaNAbaoLe8AiEz3R59u8yKywmgMpcqTA16Qs Diff:
OldNewDifferences
977977 else throw("Exchange result is fewer coins than expected")
978978 if ((checkMin == checkMin))
979979 then {
980- let lsConf = match getLeaseProxyConfig(assetOut) {
981- case a: (Boolean, Int, Int, String, String, Int, String) =>
982- a
983- case _ =>
984- throw("error lease config")
985- }
986980 let withdrawState = getWithdrawAssetState(assetOut, amountOut)
987981 if ((withdrawState == withdrawState))
988982 then $Tuple2((withdrawState ++ [ScriptTransfer(addressFromStringValue(addressTo), amountOut, parseAssetId(assetOut))]), amountOut)
10781072 else throw("Strict value is not equal to itself.")
10791073 }
10801074 else [ScriptTransfer(i.caller, emitLpAmt, lpAssetId)]
1081- let $t04477045232 = refreshKLpInternal(0, 0, 0)
1082- if (($t04477045232 == $t04477045232))
1075+ let $t04459045052 = refreshKLpInternal(0, 0, 0)
1076+ if (($t04459045052 == $t04459045052))
10831077 then {
1084- let updatedKLp = $t04477045232._2
1085- let refreshKLpActions = $t04477045232._1
1078+ let updatedKLp = $t04459045052._2
1079+ let refreshKLpActions = $t04459045052._1
10861080 let isUpdatedKLpValid = validateUpdatedKLp(currentKLp, updatedKLp)
10871081 if ((isUpdatedKLpValid == isUpdatedKLpValid))
10881082 then {
11191113 let currentKLp = calcCurrentKLp(amAssetPmt, prAssetPmt, toBigInt(0))
11201114 if ((currentKLp == currentKLp))
11211115 then {
1122- let $t04584445909 = refreshKLpInternal(0, 0, 0)
1123- let refreshKLpActions = $t04584445909._1
1124- let updatedKLp = $t04584445909._2
1116+ let $t04566445729 = refreshKLpInternal(0, 0, 0)
1117+ let refreshKLpActions = $t04566445729._1
1118+ let updatedKLp = $t04566445729._2
11251119 let isUpdatedKLpValid = validateUpdatedKLp(currentKLp, updatedKLp)
11261120 if ((isUpdatedKLpValid == isUpdatedKLpValid))
11271121 then (state ++ refreshKLpActions)
11681162 then {
11691163 let userAddress = i.caller
11701164 let txId = i.transactionId
1171- let $t04709747249 = calcPutOneToken(paymentAmountRaw, paymentAssetId, userAddress, txId)
1172- if (($t04709747249 == $t04709747249))
1165+ let $t04691747069 = calcPutOneToken(paymentAmountRaw, paymentAssetId, userAddress, txId)
1166+ if (($t04691747069 == $t04691747069))
11731167 then {
1174- let paymentInAmountAsset = $t04709747249._5
1175- let bonus = $t04709747249._4
1176- let feeAmount = $t04709747249._3
1177- let commonState = $t04709747249._2
1178- let emitAmountEstimated = $t04709747249._1
1168+ let paymentInAmountAsset = $t04691747069._5
1169+ let bonus = $t04691747069._4
1170+ let feeAmount = $t04691747069._3
1171+ let commonState = $t04691747069._2
1172+ let emitAmountEstimated = $t04691747069._1
11791173 let emitAmount = if (if ((minOutAmount > 0))
11801174 then (minOutAmount > emitAmountEstimated)
11811175 else false)
11951189 let sendFee = if ((feeAmount > 0))
11961190 then [ScriptTransfer(feeCollectorAddress, feeAmount, paymentAssetId)]
11971191 else nil
1198- let $t04783548032 = if ((this == feeCollectorAddress))
1192+ let $t04765547852 = if ((this == feeCollectorAddress))
11991193 then $Tuple2(0, 0)
12001194 else if (paymentInAmountAsset)
12011195 then $Tuple2(-(feeAmount), 0)
12021196 else $Tuple2(0, -(feeAmount))
1203- let amountAssetBalanceDelta = $t04783548032._1
1204- let priceAssetBalanceDelta = $t04783548032._2
1205- let $t04803548143 = refreshKLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
1206- let refreshKLpActions = $t04803548143._1
1207- let updatedKLp = $t04803548143._2
1197+ let amountAssetBalanceDelta = $t04765547852._1
1198+ let priceAssetBalanceDelta = $t04765547852._2
1199+ let $t04785547963 = refreshKLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
1200+ let refreshKLpActions = $t04785547963._1
1201+ let updatedKLp = $t04785547963._2
12081202 let kLp = value(getString(keyKLp))
12091203 let isUpdatedKLpValid = validateUpdatedKLp(currentKLp, updatedKLp)
12101204 if ((isUpdatedKLpValid == isUpdatedKLpValid))
12291223
12301224 @Callable(i)
12311225 func putOneTknREADONLY (paymentAssetId,paymentAmountRaw) = {
1232- let $t04849848655 = calcPutOneToken(paymentAmountRaw, parseAssetId(paymentAssetId), unit, unit)
1233- let emitAmountEstimated = $t04849848655._1
1234- let commonState = $t04849848655._2
1235- let feeAmount = $t04849848655._3
1236- let bonus = $t04849848655._4
1237- let paymentInAmountAsset = $t04849848655._5
1226+ let $t04831848475 = calcPutOneToken(paymentAmountRaw, parseAssetId(paymentAssetId), unit, unit)
1227+ let emitAmountEstimated = $t04831848475._1
1228+ let commonState = $t04831848475._2
1229+ let feeAmount = $t04831848475._3
1230+ let bonus = $t04831848475._4
1231+ let paymentInAmountAsset = $t04831848475._5
12381232 $Tuple2(nil, $Tuple3(emitAmountEstimated, feeAmount, bonus))
12391233 }
12401234
12711265 then {
12721266 let userAddress = i.caller
12731267 let txId = i.transactionId
1274- let $t04954049693 = calcGetOneToken(outAssetId, paymentAmount, paymentAssetId, userAddress, txId)
1275- if (($t04954049693 == $t04954049693))
1268+ let $t04936049513 = calcGetOneToken(outAssetId, paymentAmount, paymentAssetId, userAddress, txId)
1269+ if (($t04936049513 == $t04936049513))
12761270 then {
1277- let outInAmountAsset = $t04954049693._5
1278- let bonus = $t04954049693._4
1279- let feeAmount = $t04954049693._3
1280- let commonState = $t04954049693._2
1281- let amountEstimated = $t04954049693._1
1271+ let outInAmountAsset = $t04936049513._5
1272+ let bonus = $t04936049513._4
1273+ let feeAmount = $t04936049513._3
1274+ let commonState = $t04936049513._2
1275+ let amountEstimated = $t04936049513._1
12821276 let amount = if (if ((minOutAmount > 0))
12831277 then (minOutAmount > amountEstimated)
12841278 else false)
12851279 then throwErr(makeString(["amount to receive is less than ", toString(minOutAmount)], ""))
12861280 else amountEstimated
1287- let lsConf = match getLeaseProxyConfig(outAssetIdStr) {
1288- case a: (Boolean, Int, Int, String, String, Int, String) =>
1289- a
1290- case _ =>
1291- throw("error lease config")
1292- }
12931281 let burnInv = invoke(factoryContract, "burn", [paymentAmount], [AttachedPayment(paymentAssetId, paymentAmount)])
12941282 if ((burnInv == burnInv))
12951283 then {
13001288 let sendFee = if ((feeAmount > 0))
13011289 then [ScriptTransfer(feeCollectorAddress, feeAmount, outAssetId)]
13021290 else nil
1303- let $t05044950696 = {
1291+ let $t05008350330 = {
13041292 let feeAmountForCalc = if ((this == feeCollectorAddress))
13051293 then 0
13061294 else feeAmount
13081296 then $Tuple2(-((amount + feeAmountForCalc)), 0)
13091297 else $Tuple2(0, -((amount + feeAmountForCalc)))
13101298 }
1311- let amountAssetBalanceDelta = $t05044950696._1
1312- let priceAssetBalanceDelta = $t05044950696._2
1313- let $t05069950807 = refreshKLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
1314- let refreshKLpActions = $t05069950807._1
1315- let updatedKLp = $t05069950807._2
1299+ let amountAssetBalanceDelta = $t05008350330._1
1300+ let priceAssetBalanceDelta = $t05008350330._2
1301+ let $t05033350441 = refreshKLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
1302+ let refreshKLpActions = $t05033350441._1
1303+ let updatedKLp = $t05033350441._2
13161304 let isUpdatedKLpValid = validateUpdatedKLp(currentKLp, updatedKLp)
13171305 if ((isUpdatedKLpValid == isUpdatedKLpValid))
13181306 then $Tuple2(((((commonState ++ withdrawState) ++ assetTransfer) ++ sendFee) ++ refreshKLpActions), amount)
13331321
13341322 @Callable(i)
13351323 func getOneTknREADONLY (outAssetId,paymentAmount) = {
1336- let $t05108551241 = calcGetOneToken(parseAssetId(outAssetId), paymentAmount, cfgLpAssetId, unit, unit)
1337- let amountEstimated = $t05108551241._1
1338- let commonState = $t05108551241._2
1339- let feeAmount = $t05108551241._3
1340- let bonus = $t05108551241._4
1341- let outInAmountAsset = $t05108551241._5
1324+ let $t05071950875 = calcGetOneToken(parseAssetId(outAssetId), paymentAmount, cfgLpAssetId, unit, unit)
1325+ let amountEstimated = $t05071950875._1
1326+ let commonState = $t05071950875._2
1327+ let feeAmount = $t05071950875._3
1328+ let bonus = $t05071950875._4
1329+ let outInAmountAsset = $t05071950875._5
13421330 $Tuple2(nil, $Tuple3(amountEstimated, feeAmount, bonus))
13431331 }
13441332
13751363 let unstakeInv = invoke(stakingContract, "unstake", [toBase58String(cfgLpAssetId), unstakeAmount], nil)
13761364 if ((unstakeInv == unstakeInv))
13771365 then {
1378- let $t05214652297 = calcGetOneToken(outAssetId, unstakeAmount, cfgLpAssetId, userAddress, txId)
1379- if (($t05214652297 == $t05214652297))
1366+ let $t05178051931 = calcGetOneToken(outAssetId, unstakeAmount, cfgLpAssetId, userAddress, txId)
1367+ if (($t05178051931 == $t05178051931))
13801368 then {
1381- let outInAmountAsset = $t05214652297._5
1382- let bonus = $t05214652297._4
1383- let feeAmount = $t05214652297._3
1384- let commonState = $t05214652297._2
1385- let amountEstimated = $t05214652297._1
1369+ let outInAmountAsset = $t05178051931._5
1370+ let bonus = $t05178051931._4
1371+ let feeAmount = $t05178051931._3
1372+ let commonState = $t05178051931._2
1373+ let amountEstimated = $t05178051931._1
13861374 let amount = if (if ((minOutAmount > 0))
13871375 then (minOutAmount > amountEstimated)
13881376 else false)
13981386 let sendFee = if ((feeAmount > 0))
13991387 then [ScriptTransfer(feeCollectorAddress, feeAmount, outAssetId)]
14001388 else nil
1401- let $t05286253109 = {
1389+ let $t05249652743 = {
14021390 let feeAmountForCalc = if ((this == feeCollectorAddress))
14031391 then 0
14041392 else feeAmount
14061394 then $Tuple2(-((amount + feeAmountForCalc)), 0)
14071395 else $Tuple2(0, -((amount + feeAmountForCalc)))
14081396 }
1409- let amountAssetBalanceDelta = $t05286253109._1
1410- let priceAssetBalanceDelta = $t05286253109._2
1411- let $t05311253220 = refreshKLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
1412- let refreshKLpActions = $t05311253220._1
1413- let updatedKLp = $t05311253220._2
1397+ let amountAssetBalanceDelta = $t05249652743._1
1398+ let priceAssetBalanceDelta = $t05249652743._2
1399+ let $t05274652854 = refreshKLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
1400+ let refreshKLpActions = $t05274652854._1
1401+ let updatedKLp = $t05274652854._2
14141402 let isUpdatedKLpValid = validateUpdatedKLp(currentKLp, updatedKLp)
14151403 if ((isUpdatedKLpValid == isUpdatedKLpValid))
14161404 then $Tuple2(((((commonState ++ withdrawState) ++ assetTransfer) ++ sendFee) ++ refreshKLpActions), amount)
14451433 let burnLPAssetOnFactory = invoke(factoryContract, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
14461434 if ((burnLPAssetOnFactory == burnLPAssetOnFactory))
14471435 then {
1448- let $t05418754269 = refreshKLpInternal(-(outAmtAmt), -(outPrAmt), 0)
1449- let refreshKLpActions = $t05418754269._1
1450- let updatedKLp = $t05418754269._2
1436+ let $t05382153903 = refreshKLpInternal(-(outAmtAmt), -(outPrAmt), 0)
1437+ let refreshKLpActions = $t05382153903._1
1438+ let updatedKLp = $t05382153903._2
14511439 let isUpdatedKLpValid = validateUpdatedKLp(currentKLp, updatedKLp)
14521440 if ((isUpdatedKLpValid == isUpdatedKLpValid))
14531441 then (state ++ refreshKLpActions)
14791467 let burnLPAssetOnFactory = invoke(factoryContract, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
14801468 if ((burnLPAssetOnFactory == burnLPAssetOnFactory))
14811469 then {
1482- let $t05521855299 = refreshKLpInternal(-(outAmAmt), -(outPrAmt), 0)
1483- let refreshKLpActions = $t05521855299._1
1484- let updatedKLp = $t05521855299._2
1470+ let $t05485254933 = refreshKLpInternal(-(outAmAmt), -(outPrAmt), 0)
1471+ let refreshKLpActions = $t05485254933._1
1472+ let updatedKLp = $t05485254933._2
14851473 let isUpdatedKLpValid = validateUpdatedKLp(currentKLp, updatedKLp)
14861474 if ((isUpdatedKLpValid == isUpdatedKLpValid))
14871475 then (state ++ refreshKLpActions)
15251513 let burnLPAssetOnFactory = invoke(factoryContract, "burn", [amount], [AttachedPayment(lpAssetId, amount)])
15261514 if ((burnLPAssetOnFactory == burnLPAssetOnFactory))
15271515 then {
1528- let $t05642556506 = refreshKLpInternal(-(outAmAmt), -(outPrAmt), 0)
1529- let refreshKLpActions = $t05642556506._1
1530- let updatedKLp = $t05642556506._2
1516+ let $t05605956140 = refreshKLpInternal(-(outAmAmt), -(outPrAmt), 0)
1517+ let refreshKLpActions = $t05605956140._1
1518+ let updatedKLp = $t05605956140._2
15311519 let isUpdatedKLpValid = validateUpdatedKLp(currentKLp, updatedKLp)
15321520 if ((isUpdatedKLpValid == isUpdatedKLpValid))
15331521 then (state ++ refreshKLpActions)
15781566 let burnLPAssetOnFactory = invoke(factoryContract, "burn", [unstakeAmount], [AttachedPayment(cfgLpAssetId, unstakeAmount)])
15791567 if ((burnLPAssetOnFactory == burnLPAssetOnFactory))
15801568 then {
1581- let $t05780157882 = refreshKLpInternal(-(outAmAmt), -(outPrAmt), 0)
1582- let refreshKLpActions = $t05780157882._1
1583- let updatedKLp = $t05780157882._2
1569+ let $t05743557516 = refreshKLpInternal(-(outAmAmt), -(outPrAmt), 0)
1570+ let refreshKLpActions = $t05743557516._1
1571+ let updatedKLp = $t05743557516._2
15841572 let isUpdatedKLpValid = validateUpdatedKLp(currentKLp, updatedKLp)
15851573 if ((isUpdatedKLpValid == isUpdatedKLpValid))
15861574 then (state ++ refreshKLpActions)
16151603 if ((checkLastRefreshedBlockHeight == checkLastRefreshedBlockHeight))
16161604 then {
16171605 let kLp = valueOrErrorMessage(parseBigInt(valueOrElse(getString(this, keyKLp), "0")), fmtErr("invalid kLp"))
1618- let $t05906959133 = refreshKLpInternal(0, 0, 0)
1619- let kLpUpdateActions = $t05906959133._1
1620- let updatedKLp = $t05906959133._2
1606+ let $t05870358767 = refreshKLpInternal(0, 0, 0)
1607+ let kLpUpdateActions = $t05870358767._1
1608+ let updatedKLp = $t05870358767._2
16211609 let actions = if ((kLp != updatedKLp))
16221610 then kLpUpdateActions
16231611 else throwErr("nothing to refresh")
17921780 match tx {
17931781 case order: Order =>
17941782 let matcherPub = getMatcherPubOrFail()
1795- let $t06779567864 = validateMatcherOrderAllowed(order)
1796- let orderValid = $t06779567864._1
1797- let orderValidInfo = $t06779567864._2
1783+ let $t06742967498 = validateMatcherOrderAllowed(order)
1784+ let orderValid = $t06742967498._1
1785+ let orderValidInfo = $t06742967498._2
17981786 let senderValid = sigVerify(order.bodyBytes, order.proofs[0], order.senderPublicKey)
17991787 let matcherValid = sigVerify(order.bodyBytes, order.proofs[1], matcherPub)
18001788 if (if (if (orderValid)
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let lPdecimals = 8
55
66 let scale8 = 100000000
77
88 let scale8BigInt = toBigInt(100000000)
99
1010 let scale18 = toBigInt(1000000000000000000)
1111
1212 let zeroBigInt = toBigInt(0)
1313
1414 let big0 = toBigInt(0)
1515
1616 let big1 = toBigInt(1)
1717
1818 let big2 = toBigInt(2)
1919
2020 let wavesString = "WAVES"
2121
2222 let SEP = "__"
2323
2424 let PoolActive = 1
2525
2626 let PoolPutDisabled = 2
2727
2828 let PoolMatcherDisabled = 3
2929
3030 let PoolShutdown = 4
3131
3232 let idxPoolAddress = 1
3333
3434 let idxPoolStatus = 2
3535
3636 let idxPoolLPAssetId = 3
3737
3838 let idxAmtAssetId = 4
3939
4040 let idxPriceAssetId = 5
4141
4242 let idxAmtAssetDcm = 6
4343
4444 let idxPriceAssetDcm = 7
4545
4646 let idxIAmtAssetId = 8
4747
4848 let idxIPriceAssetId = 9
4949
5050 let idxLPAssetDcm = 10
5151
5252 let idxPoolAmtAssetAmt = 1
5353
5454 let idxPoolPriceAssetAmt = 2
5555
5656 let idxPoolLPAssetAmt = 3
5757
5858 let idxFactoryStakingContract = 1
5959
6060 let idxFactorySlippageContract = 7
6161
6262 func toX18 (origVal,origScaleMult) = fraction(toBigInt(origVal), scale18, toBigInt(origScaleMult))
6363
6464
6565 func toX18BigInt (origVal,origScaleMult) = fraction(origVal, scale18, origScaleMult)
6666
6767
6868 func fromX18 (val,resultScaleMult) = toInt(fraction(val, toBigInt(resultScaleMult), scale18))
6969
7070
7171 func fromX18Round (val,resultScaleMult,round) = toInt(fraction(val, toBigInt(resultScaleMult), scale18, round))
7272
7373
7474 func toScale (amt,resScale,curScale) = fraction(amt, resScale, curScale)
7575
7676
7777 func abs (val) = if ((0 > val))
7878 then -(val)
7979 else val
8080
8181
8282 func absBigInt (val) = if ((zeroBigInt > val))
8383 then -(val)
8484 else val
8585
8686
8787 func swapContract () = "%s__swapContract"
8888
8989
9090 func fc () = "%s__factoryContract"
9191
9292
9393 func mpk () = "%s__managerPublicKey"
9494
9595
9696 func pmpk () = "%s__pendingManagerPublicKey"
9797
9898
9999 func pl () = "%s%s__price__last"
100100
101101
102102 func ph (h,timestamp) = makeString(["%s%s%d%d__price__history", toString(h), toString(timestamp)], SEP)
103103
104104
105105 func pau (userAddress,txId) = ((("%s%s%s__P__" + userAddress) + "__") + txId)
106106
107107
108108 func gau (userAddress,txId) = ((("%s%s%s__G__" + userAddress) + "__") + txId)
109109
110110
111111 func aa () = "%s__amountAsset"
112112
113113
114114 func pa () = "%s__priceAsset"
115115
116116
117117 let keyFee = "%s__fee"
118118
119119 let feeDefault = fraction(10, scale8, 10000)
120120
121121 let fee = valueOrElse(getInteger(this, keyFee), feeDefault)
122122
123123 let keyKLp = makeString(["%s", "kLp"], SEP)
124124
125125 let keyKLpRefreshedHeight = makeString(["%s", "kLpRefreshedHeight"], SEP)
126126
127127 let keyKLpRefreshDelay = makeString(["%s", "refreshKLpDelay"], SEP)
128128
129129 let kLpRefreshDelayDefault = 30
130130
131131 let kLpRefreshDelay = valueOrElse(getInteger(this, keyKLpRefreshDelay), kLpRefreshDelayDefault)
132132
133133 func keySWavesAssetId () = "%s__sWavesAssetId"
134134
135135
136136 func keySWavesProxyAddress () = "%s__sWavesProxyAddress"
137137
138138
139139 func keyAdditionalBalance (assetId) = makeString(["%s%s", "additionalBalance", assetId], SEP)
140140
141141
142142 func keyStakingAssetBalance (assetId) = makeString(["%s%s", "stakingAssetBalance", assetId], SEP)
143143
144144
145145 func getAdditionalBalanceOrZero (assetId) = valueOrElse(getInteger(this, keyAdditionalBalance(assetId)), 0)
146146
147147
148148 func getStakingAssetBalanceOrZero (assetId) = valueOrElse(getInteger(this, keyStakingAssetBalance(assetId)), 0)
149149
150150
151151 func keyFactoryConfig () = "%s__factoryConfig"
152152
153153
154154 func keyMatcherPub () = "%s%s__matcher__publicKey"
155155
156156
157157 func keyMappingPoolContractAddressToPoolAssets (poolContractAddress) = (("%s%s%s__" + poolContractAddress) + "__mappings__poolContract2LpAsset")
158158
159159
160160 func keyPoolConfig (iAmtAsset,iPriceAsset) = (((("%d%d%s__" + iAmtAsset) + "__") + iPriceAsset) + "__config")
161161
162162
163163 func keyMappingsBaseAsset2internalId (baseAssetStr) = ("%s%s%s__mappings__baseAsset2internalId__" + baseAssetStr)
164164
165165
166166 func keyAllPoolsShutdown () = "%s__shutdown"
167167
168168
169169 func keyPoolWeight (contractAddress) = ("%s%s__poolWeight__" + contractAddress)
170170
171171
172172 func keyAllowedLpScriptHash () = "%s__allowedLpScriptHash"
173173
174174
175175 let keyFeeCollectorAddress = "%s__feeCollectorAddress"
176176
177177 func throwOrderError (orderValid,orderValidInfo,senderValid,matcherValid) = throw((((((((("order validation failed: orderValid=" + toString(orderValid)) + " (") + orderValidInfo) + ")") + " senderValid=") + toString(senderValid)) + " matcherValid=") + toString(matcherValid)))
178178
179179
180180 func getStringOrFail (address,key) = valueOrErrorMessage(getString(address, key), makeString(["mandatory ", toString(address), ".", key, " is not defined"], ""))
181181
182182
183183 func getIntOrFail (address,key) = valueOrErrorMessage(getInteger(address, key), makeString(["mandatory ", toString(address), ".", key, " is not defined"], ""))
184184
185185
186186 func throwErr (msg) = throw(makeString(["lp.ride:", msg], " "))
187187
188188
189189 func fmtErr (msg) = makeString(["lp.ride:", msg], " ")
190190
191191
192192 let factoryContract = addressFromStringValue(getStringOrFail(this, fc()))
193193
194194 let feeCollectorAddress = addressFromStringValue(getStringOrFail(factoryContract, keyFeeCollectorAddress))
195195
196196 let inFee = {
197197 let @ = invoke(factoryContract, "getInFeeREADONLY", [toString(this)], nil)
198198 if ($isInstanceOf(@, "Int"))
199199 then @
200200 else throw(($getType(@) + " couldn't be cast to Int"))
201201 }
202202
203203 let outFee = {
204204 let @ = invoke(factoryContract, "getOutFeeREADONLY", [toString(this)], nil)
205205 if ($isInstanceOf(@, "Int"))
206206 then @
207207 else throw(($getType(@) + " couldn't be cast to Int"))
208208 }
209209
210210 func sWavesId () = getStringOrFail(factoryContract, keySWavesAssetId())
211211
212212
213213 func sWavesProxy () = getStringOrFail(factoryContract, keySWavesProxyAddress())
214214
215215
216216 func isGlobalShutdown () = valueOrElse(getBoolean(factoryContract, keyAllPoolsShutdown()), false)
217217
218218
219219 func getMatcherPubOrFail () = fromBase58String(getStringOrFail(factoryContract, keyMatcherPub()))
220220
221221
222222 func getPoolConfig () = {
223223 let amtAsset = getStringOrFail(this, aa())
224224 let priceAsset = getStringOrFail(this, pa())
225225 let iPriceAsset = getIntOrFail(factoryContract, keyMappingsBaseAsset2internalId(priceAsset))
226226 let iAmtAsset = getIntOrFail(factoryContract, keyMappingsBaseAsset2internalId(amtAsset))
227227 split(getStringOrFail(factoryContract, keyPoolConfig(toString(iAmtAsset), toString(iPriceAsset))), SEP)
228228 }
229229
230230
231231 func parseAssetId (input) = if ((input == wavesString))
232232 then unit
233233 else fromBase58String(input)
234234
235235
236236 func assetIdToString (input) = if ((input == unit))
237237 then wavesString
238238 else toBase58String(value(input))
239239
240240
241241 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]))
242242
243243
244244 let poolConfigParsed = parsePoolConfig(getPoolConfig())
245245
246246 let $t092979463 = poolConfigParsed
247247
248248 let cfgPoolAddress = $t092979463._1
249249
250250 let cfgPoolStatus = $t092979463._2
251251
252252 let cfgLpAssetId = $t092979463._3
253253
254254 let cfgAmountAssetId = $t092979463._4
255255
256256 let cfgPriceAssetId = $t092979463._5
257257
258258 let cfgAmountAssetDecimals = $t092979463._6
259259
260260 let cfgPriceAssetDecimals = $t092979463._7
261261
262262 func getFactoryConfig () = split(getStringOrFail(factoryContract, keyFactoryConfig()), SEP)
263263
264264
265265 let stakingContract = valueOrErrorMessage(addressFromString(getFactoryConfig()[idxFactoryStakingContract]), "incorrect staking address")
266266
267267 let slippageContract = valueOrErrorMessage(addressFromString(getFactoryConfig()[idxFactorySlippageContract]), "incorrect staking address")
268268
269269 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)
270270
271271
272272 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)
273273
274274
275275 func getAccBalance (assetId) = {
276276 let balanceOnPool = if ((assetId == "WAVES"))
277277 then wavesBalance(this).available
278278 else assetBalance(this, fromBase58String(assetId))
279279 let totalBalance = ((balanceOnPool + getAdditionalBalanceOrZero(assetId)) - getStakingAssetBalanceOrZero(assetId))
280280 max([0, totalBalance])
281281 }
282282
283283
284284 func calcPriceBigInt (prAmtX18,amAmtX18) = fraction(prAmtX18, scale18, amAmtX18)
285285
286286
287287 func calcPriceBigIntRound (prAmtX18,amAmtX18,round) = fraction(prAmtX18, scale18, amAmtX18, round)
288288
289289
290290 func getRate (proxy) = {
291291 let inv = invoke(proxy, "getRate", nil, nil)
292292 if ((inv == inv))
293293 then match inv {
294294 case r: Int =>
295295 r
296296 case _ =>
297297 throwErr("proxy.getRate() unexpected value")
298298 }
299299 else throw("Strict value is not equal to itself.")
300300 }
301301
302302
303303 func deposit (assetId,amount,stakingAssetId,proxy) = {
304304 let currentAdditionalBalance = getAdditionalBalanceOrZero(assetId)
305305 if ((currentAdditionalBalance == currentAdditionalBalance))
306306 then {
307307 let currentStakingAssetBalance = getStakingAssetBalanceOrZero(stakingAssetId)
308308 if ((currentStakingAssetBalance == currentStakingAssetBalance))
309309 then {
310310 let asset = parseAssetId(assetId)
311311 if ((amount > 0))
312312 then {
313313 let depositInvoke = invoke(proxy, "deposit", nil, [AttachedPayment(asset, amount)])
314314 if ((depositInvoke == depositInvoke))
315315 then match depositInvoke {
316316 case receivedStakingAsset: Int =>
317317 let newAdditionalBalance = (currentAdditionalBalance + amount)
318318 let newStakingAssetBalance = (currentStakingAssetBalance + receivedStakingAsset)
319319 [IntegerEntry(keyAdditionalBalance(assetId), newAdditionalBalance), IntegerEntry(keyStakingAssetBalance(stakingAssetId), newStakingAssetBalance)]
320320 case _ =>
321321 nil
322322 }
323323 else throw("Strict value is not equal to itself.")
324324 }
325325 else nil
326326 }
327327 else throw("Strict value is not equal to itself.")
328328 }
329329 else throw("Strict value is not equal to itself.")
330330 }
331331
332332
333333 func withdraw (assetId,amount,stakingAssetId,proxy,proxyRateMul,profitAddress) = {
334334 let currentAdditionalBalance = getAdditionalBalanceOrZero(assetId)
335335 if ((currentAdditionalBalance == currentAdditionalBalance))
336336 then {
337337 let currentStakingAssetBalance = getStakingAssetBalanceOrZero(stakingAssetId)
338338 if ((currentStakingAssetBalance == currentStakingAssetBalance))
339339 then {
340340 let currentProxyRate = getRate(proxy)
341341 if ((currentProxyRate == currentProxyRate))
342342 then {
343343 let oldRate = fraction(proxyRateMul, currentAdditionalBalance, currentStakingAssetBalance)
344344 let stakingAsset = parseAssetId(stakingAssetId)
345345 let oldSendStakingAmount = fraction(proxyRateMul, amount, oldRate)
346346 let sendStakingAssetAmount = fraction(proxyRateMul, amount, currentProxyRate)
347347 let profitAmount = max([0, (oldSendStakingAmount - sendStakingAssetAmount)])
348348 if ((sendStakingAssetAmount > 0))
349349 then {
350350 let withdrawInvoke = invoke(proxy, "withdraw", nil, [AttachedPayment(stakingAsset, sendStakingAssetAmount)])
351351 if ((withdrawInvoke == withdrawInvoke))
352352 then match withdrawInvoke {
353353 case receivedAssets: Int =>
354354 let newAdditionalBalance = (currentAdditionalBalance - receivedAssets)
355355 let newStakingAssetBalance = ((currentStakingAssetBalance - sendStakingAssetAmount) - profitAmount)
356356 [IntegerEntry(keyAdditionalBalance(assetId), newAdditionalBalance), IntegerEntry(keyStakingAssetBalance(stakingAssetId), newStakingAssetBalance), ScriptTransfer(profitAddress, profitAmount, parseAssetId(stakingAssetId))]
357357 case _ =>
358358 nil
359359 }
360360 else throw("Strict value is not equal to itself.")
361361 }
362362 else nil
363363 }
364364 else throw("Strict value is not equal to itself.")
365365 }
366366 else throw("Strict value is not equal to itself.")
367367 }
368368 else throw("Strict value is not equal to itself.")
369369 }
370370
371371
372372 func getLeaseProxyConfig (assetId) = invoke(factoryContract, "getPoolLeaseConfigREADONLY", [toString(this), assetId], nil)
373373
374374
375375 func rebalanceInternal (targetRatio,assetId,stakingAssetId,minBalance,proxy,proxyRateMul,profitAddress) = {
376376 let currentAdditionalBalance = getAdditionalBalanceOrZero(assetId)
377377 if ((currentAdditionalBalance == currentAdditionalBalance))
378378 then {
379379 let currentStakingAssetBalance = getStakingAssetBalanceOrZero(stakingAssetId)
380380 if ((currentStakingAssetBalance == currentStakingAssetBalance))
381381 then {
382382 let availableBalance = match parseAssetId(assetId) {
383383 case b: ByteVector =>
384384 assetBalance(this, b)
385385 case u: Unit =>
386386 wavesBalance(this).available
387387 case _ =>
388388 throw("Match error")
389389 }
390390 if ((availableBalance == availableBalance))
391391 then {
392392 let wholeBalance = max([0, ((availableBalance + currentAdditionalBalance) - minBalance)])
393393 let targetAdditionalBalance = fraction(targetRatio, wholeBalance, 100)
394394 let diff = (currentAdditionalBalance - targetAdditionalBalance)
395395 if ((diff == 0))
396396 then nil
397397 else if ((0 > diff))
398398 then {
399399 let sendAssetAmount = -(diff)
400400 deposit(assetId, sendAssetAmount, stakingAssetId, proxy)
401401 }
402402 else {
403403 let getAssetAmount = diff
404404 withdraw(assetId, getAssetAmount, stakingAssetId, proxy, proxyRateMul, profitAddress)
405405 }
406406 }
407407 else throw("Strict value is not equal to itself.")
408408 }
409409 else throw("Strict value is not equal to itself.")
410410 }
411411 else throw("Strict value is not equal to itself.")
412412 }
413413
414414
415415 func rebalanceAsset (assetId) = match getLeaseProxyConfig(assetId) {
416416 case a: (Boolean, Int, Int, String, String, Int, String) =>
417417 let $t01581415923 = a
418418 let isLeasable = $t01581415923._1
419419 let leasedRatio = $t01581415923._2
420420 let minBalance = $t01581415923._3
421421 let proxyAddress = $t01581415923._4
422422 let proxyAssetId = $t01581415923._5
423423 let proxyRateMul = $t01581415923._6
424424 let stakingProfitAddress = $t01581415923._7
425425 if (isLeasable)
426426 then rebalanceInternal(leasedRatio, assetId, proxyAssetId, minBalance, addressFromStringValue(proxyAddress), proxyRateMul, addressFromStringValue(stakingProfitAddress))
427427 else nil
428428 case _ =>
429429 throwErr((("[" + assetId) + "] Rebalance error"))
430430 }
431431
432432
433433 func getWithdrawAssetState (assetId,getAmount) = match getLeaseProxyConfig(assetId) {
434434 case a: (Boolean, Int, Int, String, String, Int, String) =>
435435 let $t01651616625 = a
436436 let isLeasable = $t01651616625._1
437437 let leasedRatio = $t01651616625._2
438438 let minBalance = $t01651616625._3
439439 let proxyAddress = $t01651616625._4
440440 let proxyAssetId = $t01651616625._5
441441 let proxyRateMul = $t01651616625._6
442442 let stakingProfitAddress = $t01651616625._7
443443 if (isLeasable)
444444 then {
445445 let newTotalCalcBalance = max([0, ((getAccBalance(assetId) - getAmount) - minBalance)])
446446 if ((newTotalCalcBalance == newTotalCalcBalance))
447447 then {
448448 let newAdditionalBalance = fraction(leasedRatio, newTotalCalcBalance, 100)
449449 if ((newAdditionalBalance == newAdditionalBalance))
450450 then {
451451 let withdrawAmount = max([0, (getAdditionalBalanceOrZero(assetId) - newAdditionalBalance)])
452452 if ((withdrawAmount == withdrawAmount))
453453 then withdraw(assetId, withdrawAmount, proxyAssetId, addressFromStringValue(proxyAddress), proxyRateMul, addressFromStringValue(stakingProfitAddress))
454454 else throw("Strict value is not equal to itself.")
455455 }
456456 else throw("Strict value is not equal to itself.")
457457 }
458458 else throw("Strict value is not equal to itself.")
459459 }
460460 else nil
461461 case _ =>
462462 throwErr((("[" + assetId) + "] getWithdrawAssetState() error"))
463463 }
464464
465465
466466 func privateCalcPrice (amAssetDcm,prAssetDcm,amAmt,prAmt) = {
467467 let amtAssetAmtX18 = toX18(amAmt, amAssetDcm)
468468 let priceAssetAmtX18 = toX18(prAmt, prAssetDcm)
469469 calcPriceBigInt(priceAssetAmtX18, amtAssetAmtX18)
470470 }
471471
472472
473473 func calcPrices (amAmt,prAmt,lpAmt) = {
474474 let cfg = getPoolConfig()
475475 let amtAssetDcm = parseIntValue(cfg[idxAmtAssetDcm])
476476 let priceAssetDcm = parseIntValue(cfg[idxPriceAssetDcm])
477477 let priceX18 = privateCalcPrice(amtAssetDcm, priceAssetDcm, amAmt, prAmt)
478478 let amAmtX18 = toX18(amAmt, amtAssetDcm)
479479 let prAmtX18 = toX18(prAmt, priceAssetDcm)
480480 let lpAmtX18 = toX18(lpAmt, scale8)
481481 let lpPriceInAmAssetX18 = calcPriceBigInt(amAmtX18, lpAmtX18)
482482 let lpPriceInPrAssetX18 = calcPriceBigInt(prAmtX18, lpAmtX18)
483483 [priceX18, lpPriceInAmAssetX18, lpPriceInPrAssetX18]
484484 }
485485
486486
487487 func calculatePrices (amAmt,prAmt,lpAmt) = {
488488 let prices = calcPrices(amAmt, prAmt, lpAmt)
489489 [fromX18(prices[0], scale8), fromX18(prices[1], scale8), fromX18(prices[2], scale8)]
490490 }
491491
492492
493493 func estimateGetOperation (txId58,pmtAssetId,pmtLpAmt,userAddress) = {
494494 let cfg = getPoolConfig()
495495 let lpAssetId = cfg[idxPoolLPAssetId]
496496 let amAssetId = cfg[idxAmtAssetId]
497497 let prAssetId = cfg[idxPriceAssetId]
498498 let amAssetDcm = parseIntValue(cfg[idxAmtAssetDcm])
499499 let prAssetDcm = parseIntValue(cfg[idxPriceAssetDcm])
500500 let poolStatus = cfg[idxPoolStatus]
501501 let lpEmission = valueOrErrorMessage(assetInfo(fromBase58String(lpAssetId)), (("Asset " + lpAssetId) + " doesn't exist")).quantity
502502 if ((lpAssetId != pmtAssetId))
503503 then throw("Invalid asset passed.")
504504 else {
505505 let amBalance = getAccBalance(amAssetId)
506506 let amBalanceX18 = toX18(amBalance, amAssetDcm)
507507 let prBalance = getAccBalance(prAssetId)
508508 let prBalanceX18 = toX18(prBalance, prAssetDcm)
509509 let curPriceX18 = calcPriceBigInt(prBalanceX18, amBalanceX18)
510510 let curPrice = fromX18(curPriceX18, scale8)
511511 let pmtLpAmtX18 = toX18(pmtLpAmt, scale8)
512512 let lpEmissionX18 = toX18(lpEmission, scale8)
513513 let outAmAmtX18 = fraction(amBalanceX18, pmtLpAmtX18, lpEmissionX18)
514514 let outPrAmtX18 = fraction(prBalanceX18, pmtLpAmtX18, lpEmissionX18)
515515 let outAmAmt = fromX18Round(outAmAmtX18, amAssetDcm, FLOOR)
516516 let outPrAmt = fromX18Round(outPrAmtX18, prAssetDcm, FLOOR)
517517 let AmAmtWithdrawState = getWithdrawAssetState(amAssetId, outAmAmt)
518518 if ((AmAmtWithdrawState == AmAmtWithdrawState))
519519 then {
520520 let PrAmtWithdrawState = getWithdrawAssetState(prAssetId, outPrAmt)
521521 if ((PrAmtWithdrawState == PrAmtWithdrawState))
522522 then {
523523 let state = if ((txId58 == ""))
524524 then nil
525525 else ((AmAmtWithdrawState ++ PrAmtWithdrawState) ++ [ScriptTransfer(userAddress, outAmAmt, if ((amAssetId == "WAVES"))
526526 then unit
527527 else fromBase58String(amAssetId)), ScriptTransfer(userAddress, outPrAmt, if ((prAssetId == "WAVES"))
528528 then unit
529529 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)])
530530 $Tuple10(outAmAmt, outPrAmt, amAssetId, prAssetId, amBalance, prBalance, lpEmission, curPriceX18, poolStatus, state)
531531 }
532532 else throw("Strict value is not equal to itself.")
533533 }
534534 else throw("Strict value is not equal to itself.")
535535 }
536536 }
537537
538538
539539 func estimatePutOperation (txId58,slippageTolerance,inAmAssetAmt,inAmAssetId,inPrAssetAmt,inPrAssetId,userAddress,isEvaluate,emitLp) = {
540540 let cfg = getPoolConfig()
541541 let lpAssetId = fromBase58String(cfg[idxPoolLPAssetId])
542542 let amAssetIdStr = cfg[idxAmtAssetId]
543543 let prAssetIdStr = cfg[idxPriceAssetId]
544544 let iAmtAssetId = cfg[idxIAmtAssetId]
545545 let iPriceAssetId = cfg[idxIPriceAssetId]
546546 let amtAssetDcm = parseIntValue(cfg[idxAmtAssetDcm])
547547 let priceAssetDcm = parseIntValue(cfg[idxPriceAssetDcm])
548548 let poolStatus = cfg[idxPoolStatus]
549549 let lpEmission = valueOrErrorMessage(assetInfo(lpAssetId), (("Asset " + toBase58String(lpAssetId)) + " doesn't exist")).quantity
550550 let inAmAssetIdStr = toBase58String(valueOrElse(inAmAssetId, fromBase58String("WAVES")))
551551 let inPrAssetIdStr = toBase58String(valueOrElse(inPrAssetId, fromBase58String("WAVES")))
552552 if (if ((amAssetIdStr != inAmAssetIdStr))
553553 then true
554554 else (prAssetIdStr != inPrAssetIdStr))
555555 then throw("Invalid amt or price asset passed.")
556556 else {
557557 let amBalance = if (isEvaluate)
558558 then getAccBalance(amAssetIdStr)
559559 else (getAccBalance(amAssetIdStr) - inAmAssetAmt)
560560 let prBalance = if (isEvaluate)
561561 then getAccBalance(prAssetIdStr)
562562 else (getAccBalance(prAssetIdStr) - inPrAssetAmt)
563563 let inAmAssetAmtX18 = toX18(inAmAssetAmt, amtAssetDcm)
564564 let inPrAssetAmtX18 = toX18(inPrAssetAmt, priceAssetDcm)
565565 let userPriceX18 = calcPriceBigInt(inPrAssetAmtX18, inAmAssetAmtX18)
566566 let amBalanceX18 = toX18(amBalance, amtAssetDcm)
567567 let prBalanceX18 = toX18(prBalance, priceAssetDcm)
568568 let res = if ((lpEmission == 0))
569569 then {
570570 let curPriceX18 = zeroBigInt
571571 let slippageX18 = zeroBigInt
572572 let lpAmtX18 = pow((inAmAssetAmtX18 * inPrAssetAmtX18), 0, toBigInt(5), 1, 0, DOWN)
573573 $Tuple5(fromX18(lpAmtX18, scale8), fromX18(inAmAssetAmtX18, amtAssetDcm), fromX18(inPrAssetAmtX18, priceAssetDcm), calcPriceBigInt((prBalanceX18 + inPrAssetAmtX18), (amBalanceX18 + inAmAssetAmtX18)), slippageX18)
574574 }
575575 else {
576576 let curPriceX18 = calcPriceBigInt(prBalanceX18, amBalanceX18)
577577 let slippageX18 = fraction(absBigInt((curPriceX18 - userPriceX18)), scale18, curPriceX18)
578578 let slippageToleranceX18 = toX18(slippageTolerance, scale8)
579579 if (if ((curPriceX18 != zeroBigInt))
580580 then (slippageX18 > slippageToleranceX18)
581581 else false)
582582 then throw(((("Price slippage " + toString(slippageX18)) + " exceeded the passed limit of ") + toString(slippageToleranceX18)))
583583 else {
584584 let lpEmissionX18 = toX18(lpEmission, scale8)
585585 let prViaAmX18 = fraction(inAmAssetAmtX18, calcPriceBigIntRound(prBalanceX18, amBalanceX18, CEILING), scale18, CEILING)
586586 let amViaPrX18 = fraction(inPrAssetAmtX18, scale18, calcPriceBigIntRound(prBalanceX18, amBalanceX18, FLOOR), CEILING)
587587 let expectedAmts = if ((prViaAmX18 > inPrAssetAmtX18))
588588 then $Tuple2(amViaPrX18, inPrAssetAmtX18)
589589 else $Tuple2(inAmAssetAmtX18, prViaAmX18)
590590 let expAmtAssetAmtX18 = expectedAmts._1
591591 let expPriceAssetAmtX18 = expectedAmts._2
592592 let lpAmtX18 = fraction(lpEmissionX18, expPriceAssetAmtX18, prBalanceX18, FLOOR)
593593 $Tuple5(fromX18Round(lpAmtX18, scale8, FLOOR), fromX18Round(expAmtAssetAmtX18, amtAssetDcm, CEILING), fromX18Round(expPriceAssetAmtX18, priceAssetDcm, CEILING), curPriceX18, slippageX18)
594594 }
595595 }
596596 let calcLpAmt = res._1
597597 let calcAmAssetPmt = res._2
598598 let calcPrAssetPmt = res._3
599599 let curPrice = fromX18(res._4, scale8)
600600 let slippageCalc = fromX18(res._5, scale8)
601601 if ((0 >= calcLpAmt))
602602 then throw("Invalid calculations. LP calculated is less than zero.")
603603 else {
604604 let emitLpAmt = if (!(emitLp))
605605 then 0
606606 else calcLpAmt
607607 let amDiff = (inAmAssetAmt - calcAmAssetPmt)
608608 let prDiff = (inPrAssetAmt - calcPrAssetPmt)
609609 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))]
610610 $Tuple13(calcLpAmt, emitLpAmt, curPrice, amBalance, prBalance, lpEmission, lpAssetId, poolStatus, commonState, amDiff, prDiff, inAmAssetId, inPrAssetId)
611611 }
612612 }
613613 }
614614
615615
616616 func calcKLp (amountBalance,priceBalance,lpEmission) = {
617617 let amountBalanceX18 = toX18BigInt(amountBalance, toBigInt(cfgAmountAssetDecimals))
618618 let priceBalanceX18 = toX18BigInt(priceBalance, toBigInt(cfgPriceAssetDecimals))
619619 let updatedKLp = fraction(pow((amountBalanceX18 * priceBalanceX18), 0, toBigInt(5), 1, 18, DOWN), big1, lpEmission)
620620 if ((lpEmission == big0))
621621 then big0
622622 else updatedKLp
623623 }
624624
625625
626626 func calcCurrentKLp (amountAssetDelta,priceAssetDelta,lpAssetEmissionDelta) = {
627627 let amountAssetBalance = (toBigInt(getAccBalance(assetIdToString(cfgAmountAssetId))) - amountAssetDelta)
628628 let priceAssetBalance = (toBigInt(getAccBalance(assetIdToString(cfgPriceAssetId))) - priceAssetDelta)
629629 let lpAssetEmission = (toBigInt(value(assetInfo(cfgLpAssetId)).quantity) - lpAssetEmissionDelta)
630630 let currentKLp = calcKLp(amountAssetBalance, priceAssetBalance, lpAssetEmission)
631631 currentKLp
632632 }
633633
634634
635635 func refreshKLpInternal (amountAssetBalanceDelta,priceAssetBalanceDelta,lpAssetEmissionDelta) = {
636636 let amountAssetBalance = (getAccBalance(assetIdToString(cfgAmountAssetId)) + amountAssetBalanceDelta)
637637 let priceAssetBalance = (getAccBalance(assetIdToString(cfgPriceAssetId)) + priceAssetBalanceDelta)
638638 let lpAssetEmission = (value(assetInfo(cfgLpAssetId)).quantity + lpAssetEmissionDelta)
639639 let updatedKLp = calcKLp(toBigInt(amountAssetBalance), toBigInt(priceAssetBalance), toBigInt(lpAssetEmission))
640640 let actions = [IntegerEntry(keyKLpRefreshedHeight, height), StringEntry(keyKLp, toString(updatedKLp))]
641641 $Tuple2(actions, updatedKLp)
642642 }
643643
644644
645645 func validateUpdatedKLp (oldKLp,updatedKLp) = if ((updatedKLp >= oldKLp))
646646 then true
647647 else throwErr(makeString(["updated KLp lower than current KLp", toString(oldKLp), toString(updatedKLp)], " "))
648648
649649
650650 func validateMatcherOrderAllowed (order) = {
651651 let amountAssetBalance = getAccBalance(assetIdToString(cfgAmountAssetId))
652652 let priceAssetBalance = getAccBalance(assetIdToString(cfgPriceAssetId))
653653 let amountAssetAmount = order.amount
654654 let priceAssetAmount = fraction(order.amount, order.price, scale8, FLOOR)
655655 let $t02870728919 = if ((order.orderType == Buy))
656656 then $Tuple2(amountAssetAmount, -(priceAssetAmount))
657657 else $Tuple2(-(amountAssetAmount), priceAssetAmount)
658658 let amountAssetBalanceDelta = $t02870728919._1
659659 let priceAssetBalanceDelta = $t02870728919._2
660660 if (if (if (isGlobalShutdown())
661661 then true
662662 else (cfgPoolStatus == PoolMatcherDisabled))
663663 then true
664664 else (cfgPoolStatus == PoolShutdown))
665665 then throw("Exchange operations disabled")
666666 else if (if ((order.assetPair.amountAsset != cfgAmountAssetId))
667667 then true
668668 else (order.assetPair.priceAsset != cfgPriceAssetId))
669669 then throw("Wrong order assets.")
670670 else {
671671 let kLp = valueOrErrorMessage(parseBigInt(valueOrElse(getString(this, keyKLp), "0")), fmtErr("invalid kLp"))
672672 let $t02935929459 = refreshKLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
673673 let unusedActions = $t02935929459._1
674674 let kLpNew = $t02935929459._2
675675 let isOrderValid = (kLpNew >= kLp)
676676 let info = makeString(["kLp=", toString(kLp), " kLpNew=", toString(kLpNew), " amountAssetBalance=", toString(amountAssetBalance), " priceAssetBalance=", toString(priceAssetBalance), " amountAssetBalanceDelta=", toString(amountAssetBalanceDelta), " priceAssetBalanceDelta=", toString(priceAssetBalanceDelta), " height=", toString(height)], "")
677677 $Tuple2(isOrderValid, info)
678678 }
679679 }
680680
681681
682682 func commonGet (i) = if ((size(i.payments) != 1))
683683 then throw("exactly 1 payment is expected")
684684 else {
685685 let pmt = value(i.payments[0])
686686 let pmtAssetId = value(pmt.assetId)
687687 let pmtAmt = pmt.amount
688688 let res = estimateGetOperation(toBase58String(i.transactionId), toBase58String(pmtAssetId), pmtAmt, i.caller)
689689 let outAmAmt = res._1
690690 let outPrAmt = res._2
691691 let poolStatus = parseIntValue(res._9)
692692 let state = res._10
693693 if (if (isGlobalShutdown())
694694 then true
695695 else (poolStatus == PoolShutdown))
696696 then throw(("Get operation is blocked by admin. Status = " + toString(poolStatus)))
697697 else $Tuple5(outAmAmt, outPrAmt, pmtAmt, pmtAssetId, state)
698698 }
699699
700700
701701 func commonPut (i,slippageTolerance,emitLp) = if ((size(i.payments) != 2))
702702 then throw("exactly 2 payments are expected")
703703 else {
704704 let amAssetPmt = value(i.payments[0])
705705 let prAssetPmt = value(i.payments[1])
706706 let estPut = estimatePutOperation(toBase58String(i.transactionId), slippageTolerance, amAssetPmt.amount, amAssetPmt.assetId, prAssetPmt.amount, prAssetPmt.assetId, toString(i.caller), false, emitLp)
707707 let poolStatus = parseIntValue(estPut._8)
708708 if (if (if (isGlobalShutdown())
709709 then true
710710 else (poolStatus == PoolPutDisabled))
711711 then true
712712 else (poolStatus == PoolShutdown))
713713 then throw(("Put operation is blocked by admin. Status = " + toString(poolStatus)))
714714 else estPut
715715 }
716716
717717
718718 func emit (amount) = {
719719 let emitInv = invoke(factoryContract, "emit", [amount], nil)
720720 if ((emitInv == emitInv))
721721 then {
722722 let emitInvLegacy = match emitInv {
723723 case legacyFactoryContract: Address =>
724724 invoke(legacyFactoryContract, "emit", [amount], nil)
725725 case _ =>
726726 unit
727727 }
728728 if ((emitInvLegacy == emitInvLegacy))
729729 then amount
730730 else throw("Strict value is not equal to itself.")
731731 }
732732 else throw("Strict value is not equal to itself.")
733733 }
734734
735735
736736 func takeFee (amount,fee) = {
737737 let feeAmount = if ((fee == 0))
738738 then 0
739739 else fraction(amount, fee, scale8)
740740 $Tuple2((amount - feeAmount), feeAmount)
741741 }
742742
743743
744744 func calcPutOneToken (paymentAmountRaw,paymentAssetId,userAddress,txId) = {
745745 let isEval = (txId == unit)
746746 let amountBalanceRaw = getAccBalance(assetIdToString(cfgAmountAssetId))
747747 let priceBalanceRaw = getAccBalance(assetIdToString(cfgPriceAssetId))
748748 let paymentInAmountAsset = if ((paymentAssetId == cfgAmountAssetId))
749749 then true
750750 else if ((paymentAssetId == cfgPriceAssetId))
751751 then false
752752 else throwErr("invalid asset")
753753 let $t03257232865 = if (isEval)
754754 then $Tuple2(amountBalanceRaw, priceBalanceRaw)
755755 else if (paymentInAmountAsset)
756756 then $Tuple2((amountBalanceRaw - paymentAmountRaw), priceBalanceRaw)
757757 else $Tuple2(amountBalanceRaw, (priceBalanceRaw - paymentAmountRaw))
758758 let amountBalanceOld = $t03257232865._1
759759 let priceBalanceOld = $t03257232865._2
760760 let $t03286933018 = if (paymentInAmountAsset)
761761 then $Tuple2(paymentAmountRaw, 0)
762762 else $Tuple2(0, paymentAmountRaw)
763763 let amountAssetAmountRaw = $t03286933018._1
764764 let priceAssetAmountRaw = $t03286933018._2
765765 let amountAssetAmount = takeFee(amountAssetAmountRaw, inFee)._1
766766 let priceAssetAmount = takeFee(priceAssetAmountRaw, inFee)._1
767767 let $t03315033214 = takeFee(paymentAmountRaw, inFee)
768768 let paymentAmount = $t03315033214._1
769769 let feeAmount = $t03315033214._2
770770 let amountBalanceNew = (amountBalanceOld + amountAssetAmount)
771771 let priceBalanceNew = (priceBalanceOld + priceAssetAmount)
772772 let priceNewX18 = calcPriceBigInt(toX18(priceBalanceNew, cfgPriceAssetDecimals), toX18(amountBalanceNew, cfgAmountAssetDecimals))
773773 let priceNew = fromX18(priceNewX18, scale8)
774774 let paymentBalance = if (paymentInAmountAsset)
775775 then amountBalanceOld
776776 else priceBalanceOld
777777 let paymentBalanceBigInt = toBigInt(paymentBalance)
778778 let supplyBigInt = toBigInt(valueOrErrorMessage(assetInfo(cfgLpAssetId), (("asset " + toBase58String(cfgLpAssetId)) + " doesn't exist")).quantity)
779779 let chechSupply = if ((supplyBigInt > big0))
780780 then true
781781 else throwErr("initial deposit requires all coins")
782782 if ((chechSupply == chechSupply))
783783 then {
784784 let depositBigInt = toBigInt(paymentAmount)
785785 let issueAmount = max([0, toInt(((supplyBigInt * (sqrtBigInt((scale18 + ((depositBigInt * scale18) / paymentBalanceBigInt)), 18, 18, DOWN) - scale18)) / scale18))])
786786 let commonState = if (isEval)
787787 then nil
788788 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))]
789789 let priceOldX18 = calcPriceBigInt(toX18(priceBalanceOld, cfgPriceAssetDecimals), toX18(amountBalanceOld, cfgAmountAssetDecimals))
790790 let priceOld = fromX18(priceOldX18, scale8)
791791 let loss = {
792792 let $t03489535062 = if (paymentInAmountAsset)
793793 then $Tuple2(amountAssetAmountRaw, amountBalanceOld)
794794 else $Tuple2(priceAssetAmountRaw, priceBalanceOld)
795795 let amount = $t03489535062._1
796796 let balance = $t03489535062._2
797797 let issueAmountBoth = toInt(fraction(supplyBigInt, toBigInt((amount / 2)), toBigInt(balance)))
798798 fraction((issueAmount - issueAmountBoth), scale8, issueAmountBoth)
799799 }
800800 $Tuple5(issueAmount, commonState, feeAmount, loss, paymentInAmountAsset)
801801 }
802802 else throw("Strict value is not equal to itself.")
803803 }
804804
805805
806806 func calcGetOneToken (outAssetId,paymentAmount,paymentAssetId,userAddress,txId) = {
807807 let isEval = (txId == unit)
808808 let cfg = getPoolConfig()
809809 let amtAssetDcm = parseIntValue(cfg[idxAmtAssetDcm])
810810 let priceAssetDcm = parseIntValue(cfg[idxPriceAssetDcm])
811811 let checks = [if ((paymentAssetId == cfgLpAssetId))
812812 then true
813813 else throwErr("invalid lp asset")]
814814 if ((checks == checks))
815815 then {
816816 let outInAmountAsset = if ((outAssetId == cfgAmountAssetId))
817817 then true
818818 else if ((outAssetId == cfgPriceAssetId))
819819 then false
820820 else throwErr("invalid asset")
821821 let balanceBigInt = if (outInAmountAsset)
822822 then toBigInt(getAccBalance(assetIdToString(cfgAmountAssetId)))
823823 else toBigInt(getAccBalance(assetIdToString(cfgPriceAssetId)))
824824 let outInAmountAssetDecimals = if (outInAmountAsset)
825825 then amtAssetDcm
826826 else priceAssetDcm
827827 let amBalanceOld = getAccBalance(assetIdToString(cfgAmountAssetId))
828828 let prBalanceOld = getAccBalance(assetIdToString(cfgPriceAssetId))
829829 let outBalance = if (outInAmountAsset)
830830 then amBalanceOld
831831 else prBalanceOld
832832 let outBalanceBigInt = toBigInt(outBalance)
833833 let supplyBigInt = toBigInt(valueOrErrorMessage(assetInfo(cfgLpAssetId), (("asset " + toBase58String(cfgLpAssetId)) + " doesn't exist")).quantity)
834834 let redeemedBigInt = toBigInt(paymentAmount)
835835 let amountRaw = max([0, toInt(((balanceBigInt * (scale18 - pow((scale18 - ((redeemedBigInt * scale18) / supplyBigInt)), 18, big2, 0, 18, DOWN))) / scale18))])
836836 let $t03714037196 = takeFee(amountRaw, outFee)
837837 let totalAmount = $t03714037196._1
838838 let feeAmount = $t03714037196._2
839839 let $t03720037426 = if (outInAmountAsset)
840840 then $Tuple4(totalAmount, 0, (amBalanceOld - amountRaw), prBalanceOld)
841841 else $Tuple4(0, totalAmount, amBalanceOld, (prBalanceOld - amountRaw))
842842 let outAmAmount = $t03720037426._1
843843 let outPrAmount = $t03720037426._2
844844 let amBalanceNew = $t03720037426._3
845845 let prBalanceNew = $t03720037426._4
846846 let priceNewX18 = calcPriceBigInt(toX18(prBalanceNew, cfgPriceAssetDecimals), toX18(amBalanceNew, cfgAmountAssetDecimals))
847847 let priceNew = fromX18(priceNewX18, scale8)
848848 let commonState = if (isEval)
849849 then nil
850850 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)]
851851 let priceOldX18 = calcPriceBigInt(toX18(prBalanceOld, cfgPriceAssetDecimals), toX18(amBalanceOld, cfgAmountAssetDecimals))
852852 let priceOld = fromX18(priceOldX18, scale8)
853853 let loss = {
854854 let amountBothInPaymentAsset = (toInt(fraction(balanceBigInt, redeemedBigInt, supplyBigInt)) * 2)
855855 fraction((totalAmount - amountBothInPaymentAsset), scale8, amountBothInPaymentAsset)
856856 }
857857 $Tuple5(totalAmount, commonState, feeAmount, loss, outInAmountAsset)
858858 }
859859 else throw("Strict value is not equal to itself.")
860860 }
861861
862862
863863 func managerPublicKeyOrUnit () = match getString(mpk()) {
864864 case s: String =>
865865 fromBase58String(s)
866866 case _: Unit =>
867867 unit
868868 case _ =>
869869 throw("Match error")
870870 }
871871
872872
873873 func pendingManagerPublicKeyOrUnit () = match getString(pmpk()) {
874874 case s: String =>
875875 fromBase58String(s)
876876 case _: Unit =>
877877 unit
878878 case _ =>
879879 throw("Match error")
880880 }
881881
882882
883883 func isManager (i) = match managerPublicKeyOrUnit() {
884884 case pk: ByteVector =>
885885 (i.callerPublicKey == pk)
886886 case _: Unit =>
887887 (i.caller == this)
888888 case _ =>
889889 throw("Match error")
890890 }
891891
892892
893893 func mustManager (i) = {
894894 let pd = throw("Permission denied")
895895 match managerPublicKeyOrUnit() {
896896 case pk: ByteVector =>
897897 if ((i.callerPublicKey == pk))
898898 then true
899899 else pd
900900 case _: Unit =>
901901 if ((i.caller == this))
902902 then true
903903 else pd
904904 case _ =>
905905 throw("Match error")
906906 }
907907 }
908908
909909
910910 @Callable(i)
911911 func rebalance () = (rebalanceAsset(getStringOrFail(this, aa())) ++ rebalanceAsset(getStringOrFail(this, pa())))
912912
913913
914914
915915 @Callable(i)
916916 func calculateAmountOutForSwapREADONLY (cleanAmountIn,isReverse,feePoolAmount) = {
917917 let $t03931239617 = if ((isReverse == false))
918918 then {
919919 let assetOut = getStringOrFail(this, pa())
920920 let assetIn = getStringOrFail(this, aa())
921921 $Tuple2(assetOut, assetIn)
922922 }
923923 else {
924924 let assetOut = getStringOrFail(this, aa())
925925 let assetIn = getStringOrFail(this, pa())
926926 $Tuple2(assetOut, assetIn)
927927 }
928928 let assetOut = $t03931239617._1
929929 let assetIn = $t03931239617._2
930930 let poolAssetInBalance = getAccBalance(assetIn)
931931 let poolAssetOutBalance = getAccBalance(assetOut)
932932 let amountOut = fraction(poolAssetOutBalance, cleanAmountIn, (poolAssetInBalance + cleanAmountIn))
933933 let oldK = (toBigInt(poolAssetInBalance) * toBigInt(poolAssetOutBalance))
934934 let newK = (((toBigInt(getAccBalance(assetIn)) + toBigInt(cleanAmountIn)) + toBigInt(feePoolAmount)) * (toBigInt(getAccBalance(assetOut)) - toBigInt(amountOut)))
935935 let checkK = if ((newK >= oldK))
936936 then true
937937 else throw("new K is fewer error")
938938 if ((checkK == checkK))
939939 then $Tuple2(nil, amountOut)
940940 else throw("Strict value is not equal to itself.")
941941 }
942942
943943
944944
945945 @Callable(i)
946946 func calculateAmountOutForSwapAndSendTokens (cleanAmountIn,isReverse,amountOutMin,addressTo,feePoolAmount) = {
947947 let swapContact = {
948948 let @ = invoke(factoryContract, "getSwapContractREADONLY", nil, nil)
949949 if ($isInstanceOf(@, "String"))
950950 then @
951951 else throw(($getType(@) + " couldn't be cast to String"))
952952 }
953953 let checks = [if ((value(i.payments[0]).amount >= cleanAmountIn))
954954 then true
955955 else throwErr("Wrong amount"), if ((i.caller == addressFromStringValue(swapContact)))
956956 then true
957957 else throwErr("Permission denied")]
958958 if ((checks == checks))
959959 then {
960960 let pmt = value(i.payments[0])
961961 let assetIn = assetIdToString(pmt.assetId)
962962 let assetOut = if ((isReverse == false))
963963 then getStringOrFail(this, pa())
964964 else getStringOrFail(this, aa())
965965 let poolAssetInBalance = (getAccBalance(assetIn) - value(i.payments[0]).amount)
966966 let poolAssetOutBalance = getAccBalance(assetOut)
967967 let amountOut = fraction(poolAssetOutBalance, cleanAmountIn, (poolAssetInBalance + cleanAmountIn))
968968 let oldK = (toBigInt(poolAssetInBalance) * toBigInt(poolAssetOutBalance))
969969 let newK = ((toBigInt(getAccBalance(assetIn)) + toBigInt(feePoolAmount)) * (toBigInt(getAccBalance(assetOut)) - toBigInt(amountOut)))
970970 let checkK = if ((newK >= oldK))
971971 then true
972972 else throw("new K is fewer error")
973973 if ((checkK == checkK))
974974 then {
975975 let checkMin = if ((amountOut >= amountOutMin))
976976 then true
977977 else throw("Exchange result is fewer coins than expected")
978978 if ((checkMin == checkMin))
979979 then {
980- let lsConf = match getLeaseProxyConfig(assetOut) {
981- case a: (Boolean, Int, Int, String, String, Int, String) =>
982- a
983- case _ =>
984- throw("error lease config")
985- }
986980 let withdrawState = getWithdrawAssetState(assetOut, amountOut)
987981 if ((withdrawState == withdrawState))
988982 then $Tuple2((withdrawState ++ [ScriptTransfer(addressFromStringValue(addressTo), amountOut, parseAssetId(assetOut))]), amountOut)
989983 else throw("Strict value is not equal to itself.")
990984 }
991985 else throw("Strict value is not equal to itself.")
992986 }
993987 else throw("Strict value is not equal to itself.")
994988 }
995989 else throw("Strict value is not equal to itself.")
996990 }
997991
998992
999993
1000994 @Callable(i)
1001995 func setManager (pendingManagerPublicKey) = {
1002996 let checkCaller = mustManager(i)
1003997 if ((checkCaller == checkCaller))
1004998 then {
1005999 let checkManagerPublicKey = fromBase58String(pendingManagerPublicKey)
10061000 if ((checkManagerPublicKey == checkManagerPublicKey))
10071001 then [StringEntry(pmpk(), pendingManagerPublicKey)]
10081002 else throw("Strict value is not equal to itself.")
10091003 }
10101004 else throw("Strict value is not equal to itself.")
10111005 }
10121006
10131007
10141008
10151009 @Callable(i)
10161010 func confirmManager () = {
10171011 let pm = pendingManagerPublicKeyOrUnit()
10181012 let hasPM = if (isDefined(pm))
10191013 then true
10201014 else throw("No pending manager")
10211015 if ((hasPM == hasPM))
10221016 then {
10231017 let checkPM = if ((i.callerPublicKey == value(pm)))
10241018 then true
10251019 else throw("You are not pending manager")
10261020 if ((checkPM == checkPM))
10271021 then [StringEntry(mpk(), toBase58String(value(pm))), DeleteEntry(pmpk())]
10281022 else throw("Strict value is not equal to itself.")
10291023 }
10301024 else throw("Strict value is not equal to itself.")
10311025 }
10321026
10331027
10341028
10351029 @Callable(i)
10361030 func put (slippageTolerance,shouldAutoStake) = if ((0 > slippageTolerance))
10371031 then throw("Invalid slippageTolerance passed")
10381032 else {
10391033 let estPut = commonPut(i, slippageTolerance, true)
10401034 let emitLpAmt = estPut._2
10411035 let lpAssetId = estPut._7
10421036 let state = estPut._9
10431037 let amDiff = estPut._10
10441038 let prDiff = estPut._11
10451039 let amId = estPut._12
10461040 let prId = estPut._13
10471041 let amAssetPmt = toBigInt(value(i.payments[0]).amount)
10481042 let prAssetPmt = toBigInt(value(i.payments[1]).amount)
10491043 let currentKLp = calcCurrentKLp(amAssetPmt, prAssetPmt, toBigInt(0))
10501044 if ((currentKLp == currentKLp))
10511045 then {
10521046 let emitInv = invoke(factoryContract, "emit", [emitLpAmt], nil)
10531047 if ((emitInv == emitInv))
10541048 then {
10551049 let emitInvLegacy = match emitInv {
10561050 case legacyFactoryContract: Address =>
10571051 invoke(legacyFactoryContract, "emit", [emitLpAmt], nil)
10581052 case _ =>
10591053 unit
10601054 }
10611055 if ((emitInvLegacy == emitInvLegacy))
10621056 then {
10631057 let slippageAInv = if ((amDiff > 0))
10641058 then invoke(slippageContract, "put", nil, [AttachedPayment(amId, amDiff)])
10651059 else nil
10661060 if ((slippageAInv == slippageAInv))
10671061 then {
10681062 let slippagePInv = if ((prDiff > 0))
10691063 then invoke(slippageContract, "put", nil, [AttachedPayment(prId, prDiff)])
10701064 else nil
10711065 if ((slippagePInv == slippagePInv))
10721066 then {
10731067 let lpTransfer = if (shouldAutoStake)
10741068 then {
10751069 let slpStakeInv = invoke(stakingContract, "stake", nil, [AttachedPayment(lpAssetId, emitLpAmt)])
10761070 if ((slpStakeInv == slpStakeInv))
10771071 then nil
10781072 else throw("Strict value is not equal to itself.")
10791073 }
10801074 else [ScriptTransfer(i.caller, emitLpAmt, lpAssetId)]
1081- let $t04477045232 = refreshKLpInternal(0, 0, 0)
1082- if (($t04477045232 == $t04477045232))
1075+ let $t04459045052 = refreshKLpInternal(0, 0, 0)
1076+ if (($t04459045052 == $t04459045052))
10831077 then {
1084- let updatedKLp = $t04477045232._2
1085- let refreshKLpActions = $t04477045232._1
1078+ let updatedKLp = $t04459045052._2
1079+ let refreshKLpActions = $t04459045052._1
10861080 let isUpdatedKLpValid = validateUpdatedKLp(currentKLp, updatedKLp)
10871081 if ((isUpdatedKLpValid == isUpdatedKLpValid))
10881082 then {
10891083 let reb = invoke(this, "rebalance", nil, nil)
10901084 if ((reb == reb))
10911085 then ((state ++ lpTransfer) ++ refreshKLpActions)
10921086 else throw("Strict value is not equal to itself.")
10931087 }
10941088 else throw("Strict value is not equal to itself.")
10951089 }
10961090 else throw("Strict value is not equal to itself.")
10971091 }
10981092 else throw("Strict value is not equal to itself.")
10991093 }
11001094 else throw("Strict value is not equal to itself.")
11011095 }
11021096 else throw("Strict value is not equal to itself.")
11031097 }
11041098 else throw("Strict value is not equal to itself.")
11051099 }
11061100 else throw("Strict value is not equal to itself.")
11071101 }
11081102
11091103
11101104
11111105 @Callable(i)
11121106 func putForFree (maxSlippage) = if ((0 > maxSlippage))
11131107 then throw("Invalid value passed")
11141108 else {
11151109 let estPut = commonPut(i, maxSlippage, false)
11161110 let state = estPut._9
11171111 let amAssetPmt = toBigInt(value(i.payments[0]).amount)
11181112 let prAssetPmt = toBigInt(value(i.payments[1]).amount)
11191113 let currentKLp = calcCurrentKLp(amAssetPmt, prAssetPmt, toBigInt(0))
11201114 if ((currentKLp == currentKLp))
11211115 then {
1122- let $t04584445909 = refreshKLpInternal(0, 0, 0)
1123- let refreshKLpActions = $t04584445909._1
1124- let updatedKLp = $t04584445909._2
1116+ let $t04566445729 = refreshKLpInternal(0, 0, 0)
1117+ let refreshKLpActions = $t04566445729._1
1118+ let updatedKLp = $t04566445729._2
11251119 let isUpdatedKLpValid = validateUpdatedKLp(currentKLp, updatedKLp)
11261120 if ((isUpdatedKLpValid == isUpdatedKLpValid))
11271121 then (state ++ refreshKLpActions)
11281122 else throw("Strict value is not equal to itself.")
11291123 }
11301124 else throw("Strict value is not equal to itself.")
11311125 }
11321126
11331127
11341128
11351129 @Callable(i)
11361130 func putOneTkn (minOutAmount,autoStake) = {
11371131 let isPoolOneTokenOperationsDisabled = {
11381132 let @ = invoke(factoryContract, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
11391133 if ($isInstanceOf(@, "Boolean"))
11401134 then @
11411135 else throw(($getType(@) + " couldn't be cast to Boolean"))
11421136 }
11431137 let isPutDisabled = if (if (if (isGlobalShutdown())
11441138 then true
11451139 else (cfgPoolStatus == PoolPutDisabled))
11461140 then true
11471141 else (cfgPoolStatus == PoolShutdown))
11481142 then true
11491143 else isPoolOneTokenOperationsDisabled
11501144 let checks = [if (if (!(isPutDisabled))
11511145 then true
11521146 else isManager(i))
11531147 then true
11541148 else throwErr("put operation is blocked by admin"), if ((size(i.payments) == 1))
11551149 then true
11561150 else throwErr("exactly 1 payment are expected")]
11571151 if ((checks == checks))
11581152 then {
11591153 let payment = i.payments[0]
11601154 let paymentAssetId = payment.assetId
11611155 let paymentAmountRaw = payment.amount
11621156 let currentKLp = if ((paymentAssetId == cfgAmountAssetId))
11631157 then calcCurrentKLp(toBigInt(paymentAmountRaw), toBigInt(0), toBigInt(0))
11641158 else if ((paymentAssetId == cfgPriceAssetId))
11651159 then calcCurrentKLp(toBigInt(0), toBigInt(paymentAmountRaw), toBigInt(0))
11661160 else throwErr("payment asset is not supported")
11671161 if ((currentKLp == currentKLp))
11681162 then {
11691163 let userAddress = i.caller
11701164 let txId = i.transactionId
1171- let $t04709747249 = calcPutOneToken(paymentAmountRaw, paymentAssetId, userAddress, txId)
1172- if (($t04709747249 == $t04709747249))
1165+ let $t04691747069 = calcPutOneToken(paymentAmountRaw, paymentAssetId, userAddress, txId)
1166+ if (($t04691747069 == $t04691747069))
11731167 then {
1174- let paymentInAmountAsset = $t04709747249._5
1175- let bonus = $t04709747249._4
1176- let feeAmount = $t04709747249._3
1177- let commonState = $t04709747249._2
1178- let emitAmountEstimated = $t04709747249._1
1168+ let paymentInAmountAsset = $t04691747069._5
1169+ let bonus = $t04691747069._4
1170+ let feeAmount = $t04691747069._3
1171+ let commonState = $t04691747069._2
1172+ let emitAmountEstimated = $t04691747069._1
11791173 let emitAmount = if (if ((minOutAmount > 0))
11801174 then (minOutAmount > emitAmountEstimated)
11811175 else false)
11821176 then throwErr(makeString(["amount to receive is less than ", toString(minOutAmount)], ""))
11831177 else emitAmountEstimated
11841178 let emitInv = emit(emitAmount)
11851179 if ((emitInv == emitInv))
11861180 then {
11871181 let lpTransfer = if (autoStake)
11881182 then {
11891183 let stakeInv = invoke(stakingContract, "stake", nil, [AttachedPayment(cfgLpAssetId, emitAmount)])
11901184 if ((stakeInv == stakeInv))
11911185 then nil
11921186 else throw("Strict value is not equal to itself.")
11931187 }
11941188 else [ScriptTransfer(i.caller, emitAmount, cfgLpAssetId)]
11951189 let sendFee = if ((feeAmount > 0))
11961190 then [ScriptTransfer(feeCollectorAddress, feeAmount, paymentAssetId)]
11971191 else nil
1198- let $t04783548032 = if ((this == feeCollectorAddress))
1192+ let $t04765547852 = if ((this == feeCollectorAddress))
11991193 then $Tuple2(0, 0)
12001194 else if (paymentInAmountAsset)
12011195 then $Tuple2(-(feeAmount), 0)
12021196 else $Tuple2(0, -(feeAmount))
1203- let amountAssetBalanceDelta = $t04783548032._1
1204- let priceAssetBalanceDelta = $t04783548032._2
1205- let $t04803548143 = refreshKLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
1206- let refreshKLpActions = $t04803548143._1
1207- let updatedKLp = $t04803548143._2
1197+ let amountAssetBalanceDelta = $t04765547852._1
1198+ let priceAssetBalanceDelta = $t04765547852._2
1199+ let $t04785547963 = refreshKLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
1200+ let refreshKLpActions = $t04785547963._1
1201+ let updatedKLp = $t04785547963._2
12081202 let kLp = value(getString(keyKLp))
12091203 let isUpdatedKLpValid = validateUpdatedKLp(currentKLp, updatedKLp)
12101204 if ((isUpdatedKLpValid == isUpdatedKLpValid))
12111205 then {
12121206 let reb = invoke(this, "rebalance", nil, nil)
12131207 if ((reb == reb))
12141208 then $Tuple2((((commonState ++ lpTransfer) ++ sendFee) ++ refreshKLpActions), emitAmount)
12151209 else throw("Strict value is not equal to itself.")
12161210 }
12171211 else throw("Strict value is not equal to itself.")
12181212 }
12191213 else throw("Strict value is not equal to itself.")
12201214 }
12211215 else throw("Strict value is not equal to itself.")
12221216 }
12231217 else throw("Strict value is not equal to itself.")
12241218 }
12251219 else throw("Strict value is not equal to itself.")
12261220 }
12271221
12281222
12291223
12301224 @Callable(i)
12311225 func putOneTknREADONLY (paymentAssetId,paymentAmountRaw) = {
1232- let $t04849848655 = calcPutOneToken(paymentAmountRaw, parseAssetId(paymentAssetId), unit, unit)
1233- let emitAmountEstimated = $t04849848655._1
1234- let commonState = $t04849848655._2
1235- let feeAmount = $t04849848655._3
1236- let bonus = $t04849848655._4
1237- let paymentInAmountAsset = $t04849848655._5
1226+ let $t04831848475 = calcPutOneToken(paymentAmountRaw, parseAssetId(paymentAssetId), unit, unit)
1227+ let emitAmountEstimated = $t04831848475._1
1228+ let commonState = $t04831848475._2
1229+ let feeAmount = $t04831848475._3
1230+ let bonus = $t04831848475._4
1231+ let paymentInAmountAsset = $t04831848475._5
12381232 $Tuple2(nil, $Tuple3(emitAmountEstimated, feeAmount, bonus))
12391233 }
12401234
12411235
12421236
12431237 @Callable(i)
12441238 func getOneTkn (outAssetIdStr,minOutAmount) = {
12451239 let isPoolOneTokenOperationsDisabled = {
12461240 let @ = invoke(factoryContract, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
12471241 if ($isInstanceOf(@, "Boolean"))
12481242 then @
12491243 else throw(($getType(@) + " couldn't be cast to Boolean"))
12501244 }
12511245 let isGetDisabled = if (if (isGlobalShutdown())
12521246 then true
12531247 else (cfgPoolStatus == PoolShutdown))
12541248 then true
12551249 else isPoolOneTokenOperationsDisabled
12561250 let checks = [if (if (!(isGetDisabled))
12571251 then true
12581252 else isManager(i))
12591253 then true
12601254 else throwErr("get operation is blocked by admin"), if ((size(i.payments) == 1))
12611255 then true
12621256 else throwErr("exactly 1 payment are expected")]
12631257 if ((checks == checks))
12641258 then {
12651259 let outAssetId = parseAssetId(outAssetIdStr)
12661260 let payment = i.payments[0]
12671261 let paymentAssetId = payment.assetId
12681262 let paymentAmount = payment.amount
12691263 let currentKLp = calcCurrentKLp(toBigInt(0), toBigInt(0), toBigInt(0))
12701264 if ((currentKLp == currentKLp))
12711265 then {
12721266 let userAddress = i.caller
12731267 let txId = i.transactionId
1274- let $t04954049693 = calcGetOneToken(outAssetId, paymentAmount, paymentAssetId, userAddress, txId)
1275- if (($t04954049693 == $t04954049693))
1268+ let $t04936049513 = calcGetOneToken(outAssetId, paymentAmount, paymentAssetId, userAddress, txId)
1269+ if (($t04936049513 == $t04936049513))
12761270 then {
1277- let outInAmountAsset = $t04954049693._5
1278- let bonus = $t04954049693._4
1279- let feeAmount = $t04954049693._3
1280- let commonState = $t04954049693._2
1281- let amountEstimated = $t04954049693._1
1271+ let outInAmountAsset = $t04936049513._5
1272+ let bonus = $t04936049513._4
1273+ let feeAmount = $t04936049513._3
1274+ let commonState = $t04936049513._2
1275+ let amountEstimated = $t04936049513._1
12821276 let amount = if (if ((minOutAmount > 0))
12831277 then (minOutAmount > amountEstimated)
12841278 else false)
12851279 then throwErr(makeString(["amount to receive is less than ", toString(minOutAmount)], ""))
12861280 else amountEstimated
1287- let lsConf = match getLeaseProxyConfig(outAssetIdStr) {
1288- case a: (Boolean, Int, Int, String, String, Int, String) =>
1289- a
1290- case _ =>
1291- throw("error lease config")
1292- }
12931281 let burnInv = invoke(factoryContract, "burn", [paymentAmount], [AttachedPayment(paymentAssetId, paymentAmount)])
12941282 if ((burnInv == burnInv))
12951283 then {
12961284 let withdrawState = getWithdrawAssetState(outAssetIdStr, amount)
12971285 if ((withdrawState == withdrawState))
12981286 then {
12991287 let assetTransfer = [ScriptTransfer(userAddress, amount, outAssetId)]
13001288 let sendFee = if ((feeAmount > 0))
13011289 then [ScriptTransfer(feeCollectorAddress, feeAmount, outAssetId)]
13021290 else nil
1303- let $t05044950696 = {
1291+ let $t05008350330 = {
13041292 let feeAmountForCalc = if ((this == feeCollectorAddress))
13051293 then 0
13061294 else feeAmount
13071295 if (outInAmountAsset)
13081296 then $Tuple2(-((amount + feeAmountForCalc)), 0)
13091297 else $Tuple2(0, -((amount + feeAmountForCalc)))
13101298 }
1311- let amountAssetBalanceDelta = $t05044950696._1
1312- let priceAssetBalanceDelta = $t05044950696._2
1313- let $t05069950807 = refreshKLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
1314- let refreshKLpActions = $t05069950807._1
1315- let updatedKLp = $t05069950807._2
1299+ let amountAssetBalanceDelta = $t05008350330._1
1300+ let priceAssetBalanceDelta = $t05008350330._2
1301+ let $t05033350441 = refreshKLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
1302+ let refreshKLpActions = $t05033350441._1
1303+ let updatedKLp = $t05033350441._2
13161304 let isUpdatedKLpValid = validateUpdatedKLp(currentKLp, updatedKLp)
13171305 if ((isUpdatedKLpValid == isUpdatedKLpValid))
13181306 then $Tuple2(((((commonState ++ withdrawState) ++ assetTransfer) ++ sendFee) ++ refreshKLpActions), amount)
13191307 else throw("Strict value is not equal to itself.")
13201308 }
13211309 else throw("Strict value is not equal to itself.")
13221310 }
13231311 else throw("Strict value is not equal to itself.")
13241312 }
13251313 else throw("Strict value is not equal to itself.")
13261314 }
13271315 else throw("Strict value is not equal to itself.")
13281316 }
13291317 else throw("Strict value is not equal to itself.")
13301318 }
13311319
13321320
13331321
13341322 @Callable(i)
13351323 func getOneTknREADONLY (outAssetId,paymentAmount) = {
1336- let $t05108551241 = calcGetOneToken(parseAssetId(outAssetId), paymentAmount, cfgLpAssetId, unit, unit)
1337- let amountEstimated = $t05108551241._1
1338- let commonState = $t05108551241._2
1339- let feeAmount = $t05108551241._3
1340- let bonus = $t05108551241._4
1341- let outInAmountAsset = $t05108551241._5
1324+ let $t05071950875 = calcGetOneToken(parseAssetId(outAssetId), paymentAmount, cfgLpAssetId, unit, unit)
1325+ let amountEstimated = $t05071950875._1
1326+ let commonState = $t05071950875._2
1327+ let feeAmount = $t05071950875._3
1328+ let bonus = $t05071950875._4
1329+ let outInAmountAsset = $t05071950875._5
13421330 $Tuple2(nil, $Tuple3(amountEstimated, feeAmount, bonus))
13431331 }
13441332
13451333
13461334
13471335 @Callable(i)
13481336 func unstakeAndGetOneTkn (unstakeAmount,outAssetIdStr,minOutAmount) = {
13491337 let isPoolOneTokenOperationsDisabled = {
13501338 let @ = invoke(factoryContract, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
13511339 if ($isInstanceOf(@, "Boolean"))
13521340 then @
13531341 else throw(($getType(@) + " couldn't be cast to Boolean"))
13541342 }
13551343 let isGetDisabled = if (if (isGlobalShutdown())
13561344 then true
13571345 else (cfgPoolStatus == PoolShutdown))
13581346 then true
13591347 else isPoolOneTokenOperationsDisabled
13601348 let checks = [if (if (!(isGetDisabled))
13611349 then true
13621350 else isManager(i))
13631351 then true
13641352 else throwErr("get operation is blocked by admin"), if ((size(i.payments) == 0))
13651353 then true
13661354 else throwErr("no payments are expected")]
13671355 if ((checks == checks))
13681356 then {
13691357 let outAssetId = parseAssetId(outAssetIdStr)
13701358 let userAddress = i.caller
13711359 let txId = i.transactionId
13721360 let currentKLp = calcCurrentKLp(toBigInt(0), toBigInt(0), toBigInt(0))
13731361 if ((currentKLp == currentKLp))
13741362 then {
13751363 let unstakeInv = invoke(stakingContract, "unstake", [toBase58String(cfgLpAssetId), unstakeAmount], nil)
13761364 if ((unstakeInv == unstakeInv))
13771365 then {
1378- let $t05214652297 = calcGetOneToken(outAssetId, unstakeAmount, cfgLpAssetId, userAddress, txId)
1379- if (($t05214652297 == $t05214652297))
1366+ let $t05178051931 = calcGetOneToken(outAssetId, unstakeAmount, cfgLpAssetId, userAddress, txId)
1367+ if (($t05178051931 == $t05178051931))
13801368 then {
1381- let outInAmountAsset = $t05214652297._5
1382- let bonus = $t05214652297._4
1383- let feeAmount = $t05214652297._3
1384- let commonState = $t05214652297._2
1385- let amountEstimated = $t05214652297._1
1369+ let outInAmountAsset = $t05178051931._5
1370+ let bonus = $t05178051931._4
1371+ let feeAmount = $t05178051931._3
1372+ let commonState = $t05178051931._2
1373+ let amountEstimated = $t05178051931._1
13861374 let amount = if (if ((minOutAmount > 0))
13871375 then (minOutAmount > amountEstimated)
13881376 else false)
13891377 then throwErr(makeString(["amount to receive is less than ", toString(minOutAmount)], ""))
13901378 else amountEstimated
13911379 let burnInv = invoke(factoryContract, "burn", [unstakeAmount], [AttachedPayment(cfgLpAssetId, unstakeAmount)])
13921380 if ((burnInv == burnInv))
13931381 then {
13941382 let withdrawState = getWithdrawAssetState(outAssetIdStr, amount)
13951383 if ((withdrawState == withdrawState))
13961384 then {
13971385 let assetTransfer = [ScriptTransfer(i.caller, amount, outAssetId)]
13981386 let sendFee = if ((feeAmount > 0))
13991387 then [ScriptTransfer(feeCollectorAddress, feeAmount, outAssetId)]
14001388 else nil
1401- let $t05286253109 = {
1389+ let $t05249652743 = {
14021390 let feeAmountForCalc = if ((this == feeCollectorAddress))
14031391 then 0
14041392 else feeAmount
14051393 if (outInAmountAsset)
14061394 then $Tuple2(-((amount + feeAmountForCalc)), 0)
14071395 else $Tuple2(0, -((amount + feeAmountForCalc)))
14081396 }
1409- let amountAssetBalanceDelta = $t05286253109._1
1410- let priceAssetBalanceDelta = $t05286253109._2
1411- let $t05311253220 = refreshKLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
1412- let refreshKLpActions = $t05311253220._1
1413- let updatedKLp = $t05311253220._2
1397+ let amountAssetBalanceDelta = $t05249652743._1
1398+ let priceAssetBalanceDelta = $t05249652743._2
1399+ let $t05274652854 = refreshKLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
1400+ let refreshKLpActions = $t05274652854._1
1401+ let updatedKLp = $t05274652854._2
14141402 let isUpdatedKLpValid = validateUpdatedKLp(currentKLp, updatedKLp)
14151403 if ((isUpdatedKLpValid == isUpdatedKLpValid))
14161404 then $Tuple2(((((commonState ++ withdrawState) ++ assetTransfer) ++ sendFee) ++ refreshKLpActions), amount)
14171405 else throw("Strict value is not equal to itself.")
14181406 }
14191407 else throw("Strict value is not equal to itself.")
14201408 }
14211409 else throw("Strict value is not equal to itself.")
14221410 }
14231411 else throw("Strict value is not equal to itself.")
14241412 }
14251413 else throw("Strict value is not equal to itself.")
14261414 }
14271415 else throw("Strict value is not equal to itself.")
14281416 }
14291417 else throw("Strict value is not equal to itself.")
14301418 }
14311419
14321420
14331421
14341422 @Callable(i)
14351423 func get () = {
14361424 let res = commonGet(i)
14371425 let outAmtAmt = res._1
14381426 let outPrAmt = res._2
14391427 let pmtAmt = res._3
14401428 let pmtAssetId = res._4
14411429 let state = res._5
14421430 let currentKLp = calcCurrentKLp(toBigInt(0), toBigInt(0), toBigInt(0))
14431431 if ((currentKLp == currentKLp))
14441432 then {
14451433 let burnLPAssetOnFactory = invoke(factoryContract, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
14461434 if ((burnLPAssetOnFactory == burnLPAssetOnFactory))
14471435 then {
1448- let $t05418754269 = refreshKLpInternal(-(outAmtAmt), -(outPrAmt), 0)
1449- let refreshKLpActions = $t05418754269._1
1450- let updatedKLp = $t05418754269._2
1436+ let $t05382153903 = refreshKLpInternal(-(outAmtAmt), -(outPrAmt), 0)
1437+ let refreshKLpActions = $t05382153903._1
1438+ let updatedKLp = $t05382153903._2
14511439 let isUpdatedKLpValid = validateUpdatedKLp(currentKLp, updatedKLp)
14521440 if ((isUpdatedKLpValid == isUpdatedKLpValid))
14531441 then (state ++ refreshKLpActions)
14541442 else throw("Strict value is not equal to itself.")
14551443 }
14561444 else throw("Strict value is not equal to itself.")
14571445 }
14581446 else throw("Strict value is not equal to itself.")
14591447 }
14601448
14611449
14621450
14631451 @Callable(i)
14641452 func getNoLess (noLessThenAmtAsset,noLessThenPriceAsset) = {
14651453 let res = commonGet(i)
14661454 let outAmAmt = res._1
14671455 let outPrAmt = res._2
14681456 let pmtAmt = res._3
14691457 let pmtAssetId = res._4
14701458 let state = res._5
14711459 if ((noLessThenAmtAsset > outAmAmt))
14721460 then throw(((("noLessThenAmtAsset failed: " + toString(outAmAmt)) + " < ") + toString(noLessThenAmtAsset)))
14731461 else if ((noLessThenPriceAsset > outPrAmt))
14741462 then throw(((("noLessThenPriceAsset failed: " + toString(outPrAmt)) + " < ") + toString(noLessThenPriceAsset)))
14751463 else {
14761464 let currentKLp = calcCurrentKLp(toBigInt(0), toBigInt(0), toBigInt(0))
14771465 if ((currentKLp == currentKLp))
14781466 then {
14791467 let burnLPAssetOnFactory = invoke(factoryContract, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
14801468 if ((burnLPAssetOnFactory == burnLPAssetOnFactory))
14811469 then {
1482- let $t05521855299 = refreshKLpInternal(-(outAmAmt), -(outPrAmt), 0)
1483- let refreshKLpActions = $t05521855299._1
1484- let updatedKLp = $t05521855299._2
1470+ let $t05485254933 = refreshKLpInternal(-(outAmAmt), -(outPrAmt), 0)
1471+ let refreshKLpActions = $t05485254933._1
1472+ let updatedKLp = $t05485254933._2
14851473 let isUpdatedKLpValid = validateUpdatedKLp(currentKLp, updatedKLp)
14861474 if ((isUpdatedKLpValid == isUpdatedKLpValid))
14871475 then (state ++ refreshKLpActions)
14881476 else throw("Strict value is not equal to itself.")
14891477 }
14901478 else throw("Strict value is not equal to itself.")
14911479 }
14921480 else throw("Strict value is not equal to itself.")
14931481 }
14941482 }
14951483
14961484
14971485
14981486 @Callable(i)
14991487 func unstakeAndGet (amount) = {
15001488 let checkPayments = if ((size(i.payments) != 0))
15011489 then throw("No payments are expected")
15021490 else true
15031491 if ((checkPayments == checkPayments))
15041492 then {
15051493 let cfg = getPoolConfig()
15061494 let lpAssetId = fromBase58String(cfg[idxPoolLPAssetId])
15071495 let currentKLp = calcCurrentKLp(toBigInt(0), toBigInt(0), toBigInt(0))
15081496 if ((currentKLp == currentKLp))
15091497 then {
15101498 let unstakeInv = invoke(stakingContract, "unstake", [toBase58String(lpAssetId), amount], nil)
15111499 if ((unstakeInv == unstakeInv))
15121500 then {
15131501 let res = estimateGetOperation(toBase58String(i.transactionId), toBase58String(lpAssetId), amount, i.caller)
15141502 let outAmAmt = res._1
15151503 let outPrAmt = res._2
15161504 let poolStatus = parseIntValue(res._9)
15171505 let state = res._10
15181506 let checkPoolStatus = if (if (isGlobalShutdown())
15191507 then true
15201508 else (poolStatus == PoolShutdown))
15211509 then throw(("Get operation is blocked by admin. Status = " + toString(poolStatus)))
15221510 else true
15231511 if ((checkPoolStatus == checkPoolStatus))
15241512 then {
15251513 let burnLPAssetOnFactory = invoke(factoryContract, "burn", [amount], [AttachedPayment(lpAssetId, amount)])
15261514 if ((burnLPAssetOnFactory == burnLPAssetOnFactory))
15271515 then {
1528- let $t05642556506 = refreshKLpInternal(-(outAmAmt), -(outPrAmt), 0)
1529- let refreshKLpActions = $t05642556506._1
1530- let updatedKLp = $t05642556506._2
1516+ let $t05605956140 = refreshKLpInternal(-(outAmAmt), -(outPrAmt), 0)
1517+ let refreshKLpActions = $t05605956140._1
1518+ let updatedKLp = $t05605956140._2
15311519 let isUpdatedKLpValid = validateUpdatedKLp(currentKLp, updatedKLp)
15321520 if ((isUpdatedKLpValid == isUpdatedKLpValid))
15331521 then (state ++ refreshKLpActions)
15341522 else throw("Strict value is not equal to itself.")
15351523 }
15361524 else throw("Strict value is not equal to itself.")
15371525 }
15381526 else throw("Strict value is not equal to itself.")
15391527 }
15401528 else throw("Strict value is not equal to itself.")
15411529 }
15421530 else throw("Strict value is not equal to itself.")
15431531 }
15441532 else throw("Strict value is not equal to itself.")
15451533 }
15461534
15471535
15481536
15491537 @Callable(i)
15501538 func unstakeAndGetNoLess (unstakeAmount,noLessThenAmountAsset,noLessThenPriceAsset) = {
15511539 let isGetDisabled = if (isGlobalShutdown())
15521540 then true
15531541 else (cfgPoolStatus == PoolShutdown)
15541542 let checks = [if (!(isGetDisabled))
15551543 then true
15561544 else throw("get operation is blocked by admin"), if ((size(i.payments) == 0))
15571545 then true
15581546 else throw("no payments are expected")]
15591547 if ((checks == checks))
15601548 then {
15611549 let currentKLp = calcCurrentKLp(toBigInt(0), toBigInt(0), toBigInt(0))
15621550 if ((currentKLp == currentKLp))
15631551 then {
15641552 let unstakeInv = invoke(stakingContract, "unstake", [toBase58String(cfgLpAssetId), unstakeAmount], nil)
15651553 if ((unstakeInv == unstakeInv))
15661554 then {
15671555 let res = estimateGetOperation(toBase58String(i.transactionId), toBase58String(cfgLpAssetId), unstakeAmount, i.caller)
15681556 let outAmAmt = res._1
15691557 let outPrAmt = res._2
15701558 let state = res._10
15711559 let checkAmounts = [if ((outAmAmt >= noLessThenAmountAsset))
15721560 then true
15731561 else throw(makeString(["amount asset amount to receive is less than ", toString(noLessThenAmountAsset)], "")), if ((outPrAmt >= noLessThenPriceAsset))
15741562 then true
15751563 else throw(makeString(["price asset amount to receive is less than ", toString(noLessThenPriceAsset)], ""))]
15761564 if ((checkAmounts == checkAmounts))
15771565 then {
15781566 let burnLPAssetOnFactory = invoke(factoryContract, "burn", [unstakeAmount], [AttachedPayment(cfgLpAssetId, unstakeAmount)])
15791567 if ((burnLPAssetOnFactory == burnLPAssetOnFactory))
15801568 then {
1581- let $t05780157882 = refreshKLpInternal(-(outAmAmt), -(outPrAmt), 0)
1582- let refreshKLpActions = $t05780157882._1
1583- let updatedKLp = $t05780157882._2
1569+ let $t05743557516 = refreshKLpInternal(-(outAmAmt), -(outPrAmt), 0)
1570+ let refreshKLpActions = $t05743557516._1
1571+ let updatedKLp = $t05743557516._2
15841572 let isUpdatedKLpValid = validateUpdatedKLp(currentKLp, updatedKLp)
15851573 if ((isUpdatedKLpValid == isUpdatedKLpValid))
15861574 then (state ++ refreshKLpActions)
15871575 else throw("Strict value is not equal to itself.")
15881576 }
15891577 else throw("Strict value is not equal to itself.")
15901578 }
15911579 else throw("Strict value is not equal to itself.")
15921580 }
15931581 else throw("Strict value is not equal to itself.")
15941582 }
15951583 else throw("Strict value is not equal to itself.")
15961584 }
15971585 else throw("Strict value is not equal to itself.")
15981586 }
15991587
16001588
16011589
16021590 @Callable(i)
16031591 func activate (amtAssetStr,priceAssetStr) = if ((toString(i.caller) != toString(factoryContract)))
16041592 then throw("permissions denied")
16051593 else $Tuple2([StringEntry(aa(), amtAssetStr), StringEntry(pa(), priceAssetStr)], "success")
16061594
16071595
16081596
16091597 @Callable(i)
16101598 func refreshKLp () = {
16111599 let lastRefreshedBlockHeight = valueOrElse(getInteger(keyKLpRefreshedHeight), 0)
16121600 let checkLastRefreshedBlockHeight = if (((height - lastRefreshedBlockHeight) >= kLpRefreshDelay))
16131601 then unit
16141602 else throwErr(makeString([toString(kLpRefreshDelay), " blocks have not passed since the previous call"], ""))
16151603 if ((checkLastRefreshedBlockHeight == checkLastRefreshedBlockHeight))
16161604 then {
16171605 let kLp = valueOrErrorMessage(parseBigInt(valueOrElse(getString(this, keyKLp), "0")), fmtErr("invalid kLp"))
1618- let $t05906959133 = refreshKLpInternal(0, 0, 0)
1619- let kLpUpdateActions = $t05906959133._1
1620- let updatedKLp = $t05906959133._2
1606+ let $t05870358767 = refreshKLpInternal(0, 0, 0)
1607+ let kLpUpdateActions = $t05870358767._1
1608+ let updatedKLp = $t05870358767._2
16211609 let actions = if ((kLp != updatedKLp))
16221610 then kLpUpdateActions
16231611 else throwErr("nothing to refresh")
16241612 $Tuple2(actions, toString(updatedKLp))
16251613 }
16261614 else throw("Strict value is not equal to itself.")
16271615 }
16281616
16291617
16301618
16311619 @Callable(i)
16321620 func getPoolConfigWrapperREADONLY () = $Tuple2(nil, getPoolConfig())
16331621
16341622
16351623
16361624 @Callable(i)
16371625 func getAccBalanceWrapperREADONLY (assetId) = $Tuple2(nil, getAccBalance(assetId))
16381626
16391627
16401628
16411629 @Callable(i)
16421630 func calcPricesWrapperREADONLY (amAmt,prAmt,lpAmt) = {
16431631 let prices = calcPrices(amAmt, prAmt, lpAmt)
16441632 $Tuple2(nil, [toString(prices[0]), toString(prices[1]), toString(prices[2])])
16451633 }
16461634
16471635
16481636
16491637 @Callable(i)
16501638 func toX18WrapperREADONLY (origVal,origScaleMult) = $Tuple2(nil, toString(toX18(origVal, origScaleMult)))
16511639
16521640
16531641
16541642 @Callable(i)
16551643 func fromX18WrapperREADONLY (val,resultScaleMult) = $Tuple2(nil, fromX18(parseBigIntValue(val), resultScaleMult))
16561644
16571645
16581646
16591647 @Callable(i)
16601648 func calcPriceBigIntWrapperREADONLY (prAmtX18,amAmtX18) = $Tuple2(nil, toString(calcPriceBigInt(parseBigIntValue(prAmtX18), parseBigIntValue(amAmtX18))))
16611649
16621650
16631651
16641652 @Callable(i)
16651653 func estimatePutOperationWrapperREADONLY (txId58,slippageTolerance,inAmAssetAmt,inAmAssetId,inPrAssetAmt,inPrAssetId,userAddress,isEvaluate,emitLp) = $Tuple2(nil, estimatePutOperation(txId58, slippageTolerance, inAmAssetAmt, inAmAssetId, inPrAssetAmt, inPrAssetId, userAddress, isEvaluate, emitLp))
16661654
16671655
16681656
16691657 @Callable(i)
16701658 func estimateGetOperationWrapperREADONLY (txId58,pmtAssetId,pmtLpAmt,userAddress) = {
16711659 let res = estimateGetOperation(txId58, pmtAssetId, pmtLpAmt, addressFromStringValue(userAddress))
16721660 $Tuple2(nil, $Tuple10(res._1, res._2, res._3, res._4, res._5, res._6, res._7, toString(res._8), res._9, res._10))
16731661 }
16741662
16751663
16761664
16771665 @Callable(i)
16781666 func statsREADONLY () = {
16791667 let cfg = getPoolConfig()
16801668 let lpAssetId = fromBase58String(cfg[idxPoolLPAssetId])
16811669 let amtAssetId = cfg[idxAmtAssetId]
16821670 let priceAssetId = cfg[idxPriceAssetId]
16831671 let iAmtAssetId = cfg[idxIAmtAssetId]
16841672 let iPriceAssetId = cfg[idxIPriceAssetId]
16851673 let amtAssetDcm = parseIntValue(cfg[idxAmtAssetDcm])
16861674 let priceAssetDcm = parseIntValue(cfg[idxPriceAssetDcm])
16871675 let poolLPBalance = valueOrErrorMessage(assetInfo(lpAssetId), (("Asset " + toBase58String(lpAssetId)) + " doesn't exist")).quantity
16881676 let accAmtAssetBalance = getAccBalance(amtAssetId)
16891677 let accPriceAssetBalance = getAccBalance(priceAssetId)
16901678 let pricesList = if ((poolLPBalance == 0))
16911679 then [zeroBigInt, zeroBigInt, zeroBigInt]
16921680 else calcPrices(accAmtAssetBalance, accPriceAssetBalance, poolLPBalance)
16931681 let curPrice = 0
16941682 let lpAmtAssetShare = fromX18(pricesList[1], scale8)
16951683 let lpPriceAssetShare = fromX18(pricesList[2], scale8)
16961684 let poolWeight = value(getInteger(factoryContract, keyPoolWeight(toString(this))))
16971685 $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))
16981686 }
16991687
17001688
17011689
17021690 @Callable(i)
17031691 func evaluatePutByAmountAssetREADONLY (inAmAssetAmt) = {
17041692 let cfg = getPoolConfig()
17051693 let lpAssetId = fromBase58String(cfg[idxPoolLPAssetId])
17061694 let amAssetIdStr = cfg[idxAmtAssetId]
17071695 let amAssetId = fromBase58String(amAssetIdStr)
17081696 let prAssetIdStr = cfg[idxPriceAssetId]
17091697 let prAssetId = fromBase58String(prAssetIdStr)
17101698 let amtAssetDcm = parseIntValue(cfg[idxAmtAssetDcm])
17111699 let priceAssetDcm = parseIntValue(cfg[idxPriceAssetDcm])
17121700 let poolStatus = cfg[idxPoolStatus]
17131701 let poolLPBalance = valueOrErrorMessage(assetInfo(lpAssetId), (("Asset " + toBase58String(lpAssetId)) + " doesn't exist")).quantity
17141702 let accAmtAssetBalance = getAccBalance(amAssetIdStr)
17151703 let accPriceAssetBalance = getAccBalance(prAssetIdStr)
17161704 let amtAssetAmtX18 = toX18(accAmtAssetBalance, amtAssetDcm)
17171705 let priceAssetAmtX18 = toX18(accPriceAssetBalance, priceAssetDcm)
17181706 let curPriceX18 = if ((poolLPBalance == 0))
17191707 then zeroBigInt
17201708 else calcPriceBigInt(priceAssetAmtX18, amtAssetAmtX18)
17211709 let inAmAssetAmtX18 = toX18(inAmAssetAmt, amtAssetDcm)
17221710 let inPrAssetAmtX18 = fraction(inAmAssetAmtX18, curPriceX18, scale18)
17231711 let inPrAssetAmt = fromX18(inPrAssetAmtX18, priceAssetDcm)
17241712 let estPut = estimatePutOperation("", 500000, inAmAssetAmt, amAssetId, inPrAssetAmt, prAssetId, "", true, false)
17251713 let calcLpAmt = estPut._1
17261714 let curPriceCalc = estPut._3
17271715 let amBalance = estPut._4
17281716 let prBalance = estPut._5
17291717 let lpEmission = estPut._6
17301718 $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))
17311719 }
17321720
17331721
17341722
17351723 @Callable(i)
17361724 func evaluatePutByPriceAssetREADONLY (inPrAssetAmt) = {
17371725 let cfg = getPoolConfig()
17381726 let lpAssetId = fromBase58String(cfg[idxPoolLPAssetId])
17391727 let amAssetIdStr = cfg[idxAmtAssetId]
17401728 let amAssetId = fromBase58String(amAssetIdStr)
17411729 let prAssetIdStr = cfg[idxPriceAssetId]
17421730 let prAssetId = fromBase58String(prAssetIdStr)
17431731 let amtAssetDcm = parseIntValue(cfg[idxAmtAssetDcm])
17441732 let priceAssetDcm = parseIntValue(cfg[idxPriceAssetDcm])
17451733 let poolStatus = cfg[idxPoolStatus]
17461734 let poolLPBalance = valueOrErrorMessage(assetInfo(lpAssetId), (("Asset " + toBase58String(lpAssetId)) + " doesn't exist")).quantity
17471735 let amBalanceRaw = getAccBalance(amAssetIdStr)
17481736 let prBalanceRaw = getAccBalance(prAssetIdStr)
17491737 let amBalanceRawX18 = toX18(amBalanceRaw, amtAssetDcm)
17501738 let prBalanceRawX18 = toX18(prBalanceRaw, priceAssetDcm)
17511739 let curPriceX18 = if ((poolLPBalance == 0))
17521740 then zeroBigInt
17531741 else calcPriceBigInt(prBalanceRawX18, amBalanceRawX18)
17541742 let inPrAssetAmtX18 = toX18(inPrAssetAmt, priceAssetDcm)
17551743 let inAmAssetAmtX18 = fraction(inPrAssetAmtX18, scale18, curPriceX18)
17561744 let inAmAssetAmt = fromX18(inAmAssetAmtX18, amtAssetDcm)
17571745 let estPut = estimatePutOperation("", 500000, inAmAssetAmt, amAssetId, inPrAssetAmt, prAssetId, "", true, false)
17581746 let calcLpAmt = estPut._1
17591747 let curPriceCalc = estPut._3
17601748 let amBalance = estPut._4
17611749 let prBalance = estPut._5
17621750 let lpEmission = estPut._6
17631751 $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))
17641752 }
17651753
17661754
17671755
17681756 @Callable(i)
17691757 func evaluateGetREADONLY (paymentLpAssetId,paymentLpAmt) = {
17701758 let res = estimateGetOperation("", paymentLpAssetId, paymentLpAmt, this)
17711759 let outAmAmt = res._1
17721760 let outPrAmt = res._2
17731761 let amBalance = res._5
17741762 let prBalance = res._6
17751763 let lpEmission = res._7
17761764 let curPrice = res._8
17771765 let poolStatus = parseIntValue(res._9)
17781766 $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))
17791767 }
17801768
17811769
17821770 @Verifier(tx)
17831771 func verify () = {
17841772 let targetPublicKey = match managerPublicKeyOrUnit() {
17851773 case pk: ByteVector =>
17861774 pk
17871775 case _: Unit =>
17881776 tx.senderPublicKey
17891777 case _ =>
17901778 throw("Match error")
17911779 }
17921780 match tx {
17931781 case order: Order =>
17941782 let matcherPub = getMatcherPubOrFail()
1795- let $t06779567864 = validateMatcherOrderAllowed(order)
1796- let orderValid = $t06779567864._1
1797- let orderValidInfo = $t06779567864._2
1783+ let $t06742967498 = validateMatcherOrderAllowed(order)
1784+ let orderValid = $t06742967498._1
1785+ let orderValidInfo = $t06742967498._2
17981786 let senderValid = sigVerify(order.bodyBytes, order.proofs[0], order.senderPublicKey)
17991787 let matcherValid = sigVerify(order.bodyBytes, order.proofs[1], matcherPub)
18001788 if (if (if (orderValid)
18011789 then senderValid
18021790 else false)
18031791 then matcherValid
18041792 else false)
18051793 then true
18061794 else throwOrderError(orderValid, orderValidInfo, senderValid, matcherValid)
18071795 case s: SetScriptTransaction =>
18081796 if (sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey))
18091797 then true
18101798 else {
18111799 let newHash = blake2b256(value(s.script))
18121800 let allowedHash = fromBase64String(value(getString(factoryContract, keyAllowedLpScriptHash())))
18131801 let currentHash = scriptHash(this)
18141802 if ((allowedHash == newHash))
18151803 then (currentHash != newHash)
18161804 else false
18171805 }
18181806 case _ =>
18191807 sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey)
18201808 }
18211809 }
18221810

github/deemru/w8io/026f985 
200.26 ms