tx · FNDWQgACqbnPFxcRw99WZLe6UFZG753sLRkhhFKsFk1A

3MrULQRLc52GWrJF1tMcAm4M78fPe57o9Kt:  -0.03800000 Waves

2023.02.13 10:12 [2447516] smart account 3MrULQRLc52GWrJF1tMcAm4M78fPe57o9Kt > SELF 0.00000000 Waves

{ "type": 13, "id": "FNDWQgACqbnPFxcRw99WZLe6UFZG753sLRkhhFKsFk1A", "fee": 3800000, "feeAssetId": null, "timestamp": 1676272377586, "version": 2, "chainId": 84, "sender": "3MrULQRLc52GWrJF1tMcAm4M78fPe57o9Kt", "senderPublicKey": "Aig94J3pRT3J41eXw33rJrs67gTCECiMVRZrbtuoARit", "proofs": [ "5xEyeB6esknJvwTdUWdSNHugyZRKeRoSCCok5FcBvA8D6yRCrtwtQuRbxQnbCh2ZUwc5CCrKzewWwD183UmY9R1w" ], "script": "base64:BgLRLwgCEgQKAgEEEgYKBAEEAQgSAwoBCBIAEgQKAgEEEgMKAQESBAoCAQQSBAoCCAESBAoCCAESBAoCCAESBQoDAQgBEgASBAoCAQESAwoBARIFCgMBAQESBAoCCAgSABIAEgMKAQgSBQoDAQEBEgQKAgEBEgQKAggBEgQKAggIEgsKCQgBAQIBAggEBBIGCgQICAEIEgASAwoBARIDCgEBEgQKAggBIgpsUGRlY2ltYWxzIgZzY2FsZTgiDHNjYWxlOEJpZ0ludCIHc2NhbGUxOCIKemVyb0JpZ0ludCIEYmlnMCIEYmlnMSIEYmlnMiILd2F2ZXNTdHJpbmciA1NFUCIKUG9vbEFjdGl2ZSIPUG9vbFB1dERpc2FibGVkIhNQb29sTWF0Y2hlckRpc2FibGVkIgxQb29sU2h1dGRvd24iDmlkeFBvb2xBZGRyZXNzIg1pZHhQb29sU3RhdHVzIhBpZHhQb29sTFBBc3NldElkIg1pZHhBbXRBc3NldElkIg9pZHhQcmljZUFzc2V0SWQiDmlkeEFtdEFzc2V0RGNtIhBpZHhQcmljZUFzc2V0RGNtIg5pZHhJQW10QXNzZXRJZCIQaWR4SVBy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wcGCQECYUMEBQJhRAUCYUUFAmFGBQJhRwMJAAECBQJkVwIUU2V0U2NyaXB0VHJhbnNhY3Rpb24EAmZhBQJkVwMJAPQDAwgFAmdZCWJvZHlCeXRlcwkAkQMCCAUCZ1kGcHJvb2ZzAAAFAmhhBgQCaGQJAPYDAQkBBXZhbHVlAQgFAmZhBnNjcmlwdAQCaGUJANsEAQkBBXZhbHVlAQkAnQgCBQJhTwkBAmFBAAQCaGYJAPEHAQUEdGhpcwMJAAACBQJoZQUCaGQJAQIhPQIFAmhmBQJoZAcJAPQDAwgFAmdZCWJvZHlCeXRlcwkAkQMCCAUCZ1kGcHJvb2ZzAAAFAmhhV7eRkw==", "height": 2447516, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 5n6Lq1rt6PqMEEABZaqoKynoFU3mSPn93aD3HhVis3yQ Next: EHNqT4UVTLL1mAofzgRzmgbomNA2wQNrtRPrfeakDEvs Diff:
OldNewDifferences
739739 if ((checks == checks))
740740 then {
741741 let pmt = value(i.payments[0])
742- let assetIn = if ((pmt.assetId == unit))
743- then toBase58String(toBytes("WAVES"))
744- else toBase58String(value(pmt.assetId))
742+ let assetIn = assetIdToString(pmt.assetId)
745743 let assetOut = if ((isReverse == false))
746744 then getStringOrFail(this, pa())
747745 else getStringOrFail(this, aa())
850848 else throw("Strict value is not equal to itself.")
851849 }
852850 else [ScriptTransfer(i.caller, emitLpAmt, lpAssetId)]
853- let $t03714537607 = refreshKLpInternal(0, 0, 0)
854- if (($t03714537607 == $t03714537607))
851+ let $t03706937531 = refreshKLpInternal(0, 0, 0)
852+ if (($t03706937531 == $t03706937531))
855853 then {
856- let updatedKLp = $t03714537607._2
857- let refreshKLpActions = $t03714537607._1
854+ let updatedKLp = $t03706937531._2
855+ let refreshKLpActions = $t03706937531._1
858856 let isUpdatedKLpValid = validateUpdatedKLp(currentKLp, updatedKLp)
859857 if ((isUpdatedKLpValid == isUpdatedKLpValid))
860858 then ((state ++ lpTransfer) ++ refreshKLpActions)
886884 let currentKLp = calcCurrentKLp(amAssetPmt, prAssetPmt, toBigInt(0))
887885 if ((currentKLp == currentKLp))
888886 then {
889- let $t03816938234 = refreshKLpInternal(0, 0, 0)
890- let refreshKLpActions = $t03816938234._1
891- let updatedKLp = $t03816938234._2
887+ let $t03809338158 = refreshKLpInternal(0, 0, 0)
888+ let refreshKLpActions = $t03809338158._1
889+ let updatedKLp = $t03809338158._2
892890 let isUpdatedKLpValid = validateUpdatedKLp(currentKLp, updatedKLp)
893891 if ((isUpdatedKLpValid == isUpdatedKLpValid))
894892 then (state ++ refreshKLpActions)
935933 then {
936934 let userAddress = i.caller
937935 let txId = i.transactionId
938- let $t03942239574 = calcPutOneToken(paymentAmountRaw, paymentAssetId, userAddress, txId)
939- if (($t03942239574 == $t03942239574))
936+ let $t03934639498 = calcPutOneToken(paymentAmountRaw, paymentAssetId, userAddress, txId)
937+ if (($t03934639498 == $t03934639498))
940938 then {
941- let paymentInAmountAsset = $t03942239574._5
942- let bonus = $t03942239574._4
943- let feeAmount = $t03942239574._3
944- let commonState = $t03942239574._2
945- let emitAmountEstimated = $t03942239574._1
939+ let paymentInAmountAsset = $t03934639498._5
940+ let bonus = $t03934639498._4
941+ let feeAmount = $t03934639498._3
942+ let commonState = $t03934639498._2
943+ let emitAmountEstimated = $t03934639498._1
946944 let emitAmount = if (if ((minOutAmount > 0))
947945 then (minOutAmount > emitAmountEstimated)
948946 else false)
962960 let sendFee = if ((feeAmount > 0))
963961 then [ScriptTransfer(feeCollectorAddress, feeAmount, paymentAssetId)]
964962 else nil
965- let $t04016040357 = if ((this == feeCollectorAddress))
963+ let $t04008440281 = if ((this == feeCollectorAddress))
966964 then $Tuple2(0, 0)
967965 else if (paymentInAmountAsset)
968966 then $Tuple2(-(feeAmount), 0)
969967 else $Tuple2(0, -(feeAmount))
970- let amountAssetBalanceDelta = $t04016040357._1
971- let priceAssetBalanceDelta = $t04016040357._2
972- let $t04036040468 = refreshKLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
973- let refreshKLpActions = $t04036040468._1
974- let updatedKLp = $t04036040468._2
968+ let amountAssetBalanceDelta = $t04008440281._1
969+ let priceAssetBalanceDelta = $t04008440281._2
970+ let $t04028440392 = refreshKLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
971+ let refreshKLpActions = $t04028440392._1
972+ let updatedKLp = $t04028440392._2
975973 let kLp = value(getString(keyKLp))
976974 let isUpdatedKLpValid = validateUpdatedKLp(currentKLp, updatedKLp)
977975 if ((isUpdatedKLpValid == isUpdatedKLpValid))
991989
992990 @Callable(i)
993991 func putOneTknREADONLY (paymentAssetId,paymentAmountRaw) = {
994- let $t04077440931 = calcPutOneToken(paymentAmountRaw, parseAssetId(paymentAssetId), unit, unit)
995- let emitAmountEstimated = $t04077440931._1
996- let commonState = $t04077440931._2
997- let feeAmount = $t04077440931._3
998- let bonus = $t04077440931._4
999- let paymentInAmountAsset = $t04077440931._5
992+ let $t04069840855 = calcPutOneToken(paymentAmountRaw, parseAssetId(paymentAssetId), unit, unit)
993+ let emitAmountEstimated = $t04069840855._1
994+ let commonState = $t04069840855._2
995+ let feeAmount = $t04069840855._3
996+ let bonus = $t04069840855._4
997+ let paymentInAmountAsset = $t04069840855._5
1000998 $Tuple2(nil, $Tuple3(emitAmountEstimated, feeAmount, bonus))
1001999 }
10021000
10331031 then {
10341032 let userAddress = i.caller
10351033 let txId = i.transactionId
1036- let $t04181641969 = calcGetOneToken(outAssetId, paymentAmount, paymentAssetId, userAddress, txId)
1037- if (($t04181641969 == $t04181641969))
1034+ let $t04174041893 = calcGetOneToken(outAssetId, paymentAmount, paymentAssetId, userAddress, txId)
1035+ if (($t04174041893 == $t04174041893))
10381036 then {
1039- let outInAmountAsset = $t04181641969._5
1040- let bonus = $t04181641969._4
1041- let feeAmount = $t04181641969._3
1042- let commonState = $t04181641969._2
1043- let amountEstimated = $t04181641969._1
1037+ let outInAmountAsset = $t04174041893._5
1038+ let bonus = $t04174041893._4
1039+ let feeAmount = $t04174041893._3
1040+ let commonState = $t04174041893._2
1041+ let amountEstimated = $t04174041893._1
10441042 let amount = if (if ((minOutAmount > 0))
10451043 then (minOutAmount > amountEstimated)
10461044 else false)
10531051 let sendFee = if ((feeAmount > 0))
10541052 then [ScriptTransfer(feeCollectorAddress, feeAmount, outAssetId)]
10551053 else nil
1056- let $t04246942716 = {
1054+ let $t04239342640 = {
10571055 let feeAmountForCalc = if ((this == feeCollectorAddress))
10581056 then 0
10591057 else feeAmount
10611059 then $Tuple2(-((amount + feeAmountForCalc)), 0)
10621060 else $Tuple2(0, -((amount + feeAmountForCalc)))
10631061 }
1064- let amountAssetBalanceDelta = $t04246942716._1
1065- let priceAssetBalanceDelta = $t04246942716._2
1066- let $t04271942827 = refreshKLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
1067- let refreshKLpActions = $t04271942827._1
1068- let updatedKLp = $t04271942827._2
1062+ let amountAssetBalanceDelta = $t04239342640._1
1063+ let priceAssetBalanceDelta = $t04239342640._2
1064+ let $t04264342751 = refreshKLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
1065+ let refreshKLpActions = $t04264342751._1
1066+ let updatedKLp = $t04264342751._2
10691067 let isUpdatedKLpValid = validateUpdatedKLp(currentKLp, updatedKLp)
10701068 if ((isUpdatedKLpValid == isUpdatedKLpValid))
10711069 then $Tuple2((((commonState ++ assetTransfer) ++ sendFee) ++ refreshKLpActions), amount)
10841082
10851083 @Callable(i)
10861084 func getOneTknREADONLY (outAssetId,paymentAmount) = {
1087- let $t04308443240 = calcGetOneToken(parseAssetId(outAssetId), paymentAmount, cfgLpAssetId, unit, unit)
1088- let amountEstimated = $t04308443240._1
1089- let commonState = $t04308443240._2
1090- let feeAmount = $t04308443240._3
1091- let bonus = $t04308443240._4
1092- let outInAmountAsset = $t04308443240._5
1085+ let $t04300843164 = calcGetOneToken(parseAssetId(outAssetId), paymentAmount, cfgLpAssetId, unit, unit)
1086+ let amountEstimated = $t04300843164._1
1087+ let commonState = $t04300843164._2
1088+ let feeAmount = $t04300843164._3
1089+ let bonus = $t04300843164._4
1090+ let outInAmountAsset = $t04300843164._5
10931091 $Tuple2(nil, $Tuple3(amountEstimated, feeAmount, bonus))
10941092 }
10951093
11261124 let unstakeInv = invoke(stakingContract, "unstake", [toBase58String(cfgLpAssetId), unstakeAmount], nil)
11271125 if ((unstakeInv == unstakeInv))
11281126 then {
1129- let $t04414544296 = calcGetOneToken(outAssetId, unstakeAmount, cfgLpAssetId, userAddress, txId)
1130- if (($t04414544296 == $t04414544296))
1127+ let $t04406944220 = calcGetOneToken(outAssetId, unstakeAmount, cfgLpAssetId, userAddress, txId)
1128+ if (($t04406944220 == $t04406944220))
11311129 then {
1132- let outInAmountAsset = $t04414544296._5
1133- let bonus = $t04414544296._4
1134- let feeAmount = $t04414544296._3
1135- let commonState = $t04414544296._2
1136- let amountEstimated = $t04414544296._1
1130+ let outInAmountAsset = $t04406944220._5
1131+ let bonus = $t04406944220._4
1132+ let feeAmount = $t04406944220._3
1133+ let commonState = $t04406944220._2
1134+ let amountEstimated = $t04406944220._1
11371135 let amount = if (if ((minOutAmount > 0))
11381136 then (minOutAmount > amountEstimated)
11391137 else false)
11461144 let sendFee = if ((feeAmount > 0))
11471145 then [ScriptTransfer(feeCollectorAddress, feeAmount, outAssetId)]
11481146 else nil
1149- let $t04479145038 = {
1147+ let $t04471544962 = {
11501148 let feeAmountForCalc = if ((this == feeCollectorAddress))
11511149 then 0
11521150 else feeAmount
11541152 then $Tuple2(-((amount + feeAmountForCalc)), 0)
11551153 else $Tuple2(0, -((amount + feeAmountForCalc)))
11561154 }
1157- let amountAssetBalanceDelta = $t04479145038._1
1158- let priceAssetBalanceDelta = $t04479145038._2
1159- let $t04504145149 = refreshKLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
1160- let refreshKLpActions = $t04504145149._1
1161- let updatedKLp = $t04504145149._2
1155+ let amountAssetBalanceDelta = $t04471544962._1
1156+ let priceAssetBalanceDelta = $t04471544962._2
1157+ let $t04496545073 = refreshKLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
1158+ let refreshKLpActions = $t04496545073._1
1159+ let updatedKLp = $t04496545073._2
11621160 let isUpdatedKLpValid = validateUpdatedKLp(currentKLp, updatedKLp)
11631161 if ((isUpdatedKLpValid == isUpdatedKLpValid))
11641162 then $Tuple2((((commonState ++ assetTransfer) ++ sendFee) ++ refreshKLpActions), amount)
11911189 let burnLPAssetOnFactory = invoke(factoryContract, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
11921190 if ((burnLPAssetOnFactory == burnLPAssetOnFactory))
11931191 then {
1194- let $t04609546177 = refreshKLpInternal(-(outAmtAmt), -(outPrAmt), 0)
1195- let refreshKLpActions = $t04609546177._1
1196- let updatedKLp = $t04609546177._2
1192+ let $t04601946101 = refreshKLpInternal(-(outAmtAmt), -(outPrAmt), 0)
1193+ let refreshKLpActions = $t04601946101._1
1194+ let updatedKLp = $t04601946101._2
11971195 let isUpdatedKLpValid = validateUpdatedKLp(currentKLp, updatedKLp)
11981196 if ((isUpdatedKLpValid == isUpdatedKLpValid))
11991197 then (state ++ refreshKLpActions)
12251223 let burnLPAssetOnFactory = invoke(factoryContract, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
12261224 if ((burnLPAssetOnFactory == burnLPAssetOnFactory))
12271225 then {
1228- let $t04712647207 = refreshKLpInternal(-(outAmAmt), -(outPrAmt), 0)
1229- let refreshKLpActions = $t04712647207._1
1230- let updatedKLp = $t04712647207._2
1226+ let $t04705047131 = refreshKLpInternal(-(outAmAmt), -(outPrAmt), 0)
1227+ let refreshKLpActions = $t04705047131._1
1228+ let updatedKLp = $t04705047131._2
12311229 let isUpdatedKLpValid = validateUpdatedKLp(currentKLp, updatedKLp)
12321230 if ((isUpdatedKLpValid == isUpdatedKLpValid))
12331231 then (state ++ refreshKLpActions)
12711269 let burnLPAssetOnFactory = invoke(factoryContract, "burn", [amount], [AttachedPayment(lpAssetId, amount)])
12721270 if ((burnLPAssetOnFactory == burnLPAssetOnFactory))
12731271 then {
1274- let $t04833348414 = refreshKLpInternal(-(outAmAmt), -(outPrAmt), 0)
1275- let refreshKLpActions = $t04833348414._1
1276- let updatedKLp = $t04833348414._2
1272+ let $t04825748338 = refreshKLpInternal(-(outAmAmt), -(outPrAmt), 0)
1273+ let refreshKLpActions = $t04825748338._1
1274+ let updatedKLp = $t04825748338._2
12771275 let isUpdatedKLpValid = validateUpdatedKLp(currentKLp, updatedKLp)
12781276 if ((isUpdatedKLpValid == isUpdatedKLpValid))
12791277 then (state ++ refreshKLpActions)
13241322 let burnLPAssetOnFactory = invoke(factoryContract, "burn", [unstakeAmount], [AttachedPayment(cfgLpAssetId, unstakeAmount)])
13251323 if ((burnLPAssetOnFactory == burnLPAssetOnFactory))
13261324 then {
1327- let $t04970949790 = refreshKLpInternal(-(outAmAmt), -(outPrAmt), 0)
1328- let refreshKLpActions = $t04970949790._1
1329- let updatedKLp = $t04970949790._2
1325+ let $t04963349714 = refreshKLpInternal(-(outAmAmt), -(outPrAmt), 0)
1326+ let refreshKLpActions = $t04963349714._1
1327+ let updatedKLp = $t04963349714._2
13301328 let isUpdatedKLpValid = validateUpdatedKLp(currentKLp, updatedKLp)
13311329 if ((isUpdatedKLpValid == isUpdatedKLpValid))
13321330 then (state ++ refreshKLpActions)
13611359 if ((checkLastRefreshedBlockHeight == checkLastRefreshedBlockHeight))
13621360 then {
13631361 let kLp = valueOrErrorMessage(parseBigInt(valueOrElse(getString(this, keyKLp), "0")), fmtErr("invalid kLp"))
1364- let $t05097751041 = refreshKLpInternal(0, 0, 0)
1365- let kLpUpdateActions = $t05097751041._1
1366- let updatedKLp = $t05097751041._2
1362+ let $t05090150965 = refreshKLpInternal(0, 0, 0)
1363+ let kLpUpdateActions = $t05090150965._1
1364+ let updatedKLp = $t05090150965._2
13671365 let actions = if ((kLp != updatedKLp))
13681366 then kLpUpdateActions
13691367 else throwErr("nothing to refresh")
15381536 match tx {
15391537 case order: Order =>
15401538 let matcherPub = getMatcherPubOrFail()
1541- let $t05970359772 = validateMatcherOrderAllowed(order)
1542- let orderValid = $t05970359772._1
1543- let orderValidInfo = $t05970359772._2
1539+ let $t05962759696 = validateMatcherOrderAllowed(order)
1540+ let orderValid = $t05962759696._1
1541+ let orderValidInfo = $t05962759696._2
15441542 let senderValid = sigVerify(order.bodyBytes, order.proofs[0], order.senderPublicKey)
15451543 let matcherValid = sigVerify(order.bodyBytes, order.proofs[1], matcherPub)
15461544 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 keyFactoryConfig () = "%s__factoryConfig"
134134
135135
136136 func keyMatcherPub () = "%s%s__matcher__publicKey"
137137
138138
139139 func keyMappingPoolContractAddressToPoolAssets (poolContractAddress) = (("%s%s%s__" + poolContractAddress) + "__mappings__poolContract2LpAsset")
140140
141141
142142 func keyPoolConfig (iAmtAsset,iPriceAsset) = (((("%d%d%s__" + iAmtAsset) + "__") + iPriceAsset) + "__config")
143143
144144
145145 func keyMappingsBaseAsset2internalId (baseAssetStr) = ("%s%s%s__mappings__baseAsset2internalId__" + baseAssetStr)
146146
147147
148148 func keyAllPoolsShutdown () = "%s__shutdown"
149149
150150
151151 func keyPoolWeight (contractAddress) = ("%s%s__poolWeight__" + contractAddress)
152152
153153
154154 func keyAllowedLpScriptHash () = "%s__allowedLpScriptHash"
155155
156156
157157 let keyFeeCollectorAddress = "%s__feeCollectorAddress"
158158
159159 func throwOrderError (orderValid,orderValidInfo,senderValid,matcherValid) = throw((((((((("order validation failed: orderValid=" + toString(orderValid)) + " (") + orderValidInfo) + ")") + " senderValid=") + toString(senderValid)) + " matcherValid=") + toString(matcherValid)))
160160
161161
162162 func getStringOrFail (address,key) = valueOrErrorMessage(getString(address, key), makeString(["mandatory ", toString(address), ".", key, " is not defined"], ""))
163163
164164
165165 func getIntOrFail (address,key) = valueOrErrorMessage(getInteger(address, key), makeString(["mandatory ", toString(address), ".", key, " is not defined"], ""))
166166
167167
168168 func throwErr (msg) = throw(makeString(["lp.ride:", msg], " "))
169169
170170
171171 func fmtErr (msg) = makeString(["lp.ride:", msg], " ")
172172
173173
174174 let factoryContract = addressFromStringValue(getStringOrFail(this, fc()))
175175
176176 let feeCollectorAddress = addressFromStringValue(getStringOrFail(factoryContract, keyFeeCollectorAddress))
177177
178178 let inFee = {
179179 let @ = invoke(factoryContract, "getInFeeREADONLY", [toString(this)], nil)
180180 if ($isInstanceOf(@, "Int"))
181181 then @
182182 else throw(($getType(@) + " couldn't be cast to Int"))
183183 }
184184
185185 let outFee = {
186186 let @ = invoke(factoryContract, "getOutFeeREADONLY", [toString(this)], nil)
187187 if ($isInstanceOf(@, "Int"))
188188 then @
189189 else throw(($getType(@) + " couldn't be cast to Int"))
190190 }
191191
192192 func isGlobalShutdown () = valueOrElse(getBoolean(factoryContract, keyAllPoolsShutdown()), false)
193193
194194
195195 func getMatcherPubOrFail () = fromBase58String(getStringOrFail(factoryContract, keyMatcherPub()))
196196
197197
198198 func getPoolConfig () = {
199199 let amtAsset = getStringOrFail(this, aa())
200200 let priceAsset = getStringOrFail(this, pa())
201201 let iPriceAsset = getIntOrFail(factoryContract, keyMappingsBaseAsset2internalId(priceAsset))
202202 let iAmtAsset = getIntOrFail(factoryContract, keyMappingsBaseAsset2internalId(amtAsset))
203203 split(getStringOrFail(factoryContract, keyPoolConfig(toString(iAmtAsset), toString(iPriceAsset))), SEP)
204204 }
205205
206206
207207 func parseAssetId (input) = if ((input == wavesString))
208208 then unit
209209 else fromBase58String(input)
210210
211211
212212 func assetIdToString (input) = if ((input == unit))
213213 then wavesString
214214 else toBase58String(value(input))
215215
216216
217217 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]))
218218
219219
220220 let poolConfigParsed = parsePoolConfig(getPoolConfig())
221221
222222 let $t084698635 = poolConfigParsed
223223
224224 let cfgPoolAddress = $t084698635._1
225225
226226 let cfgPoolStatus = $t084698635._2
227227
228228 let cfgLpAssetId = $t084698635._3
229229
230230 let cfgAmountAssetId = $t084698635._4
231231
232232 let cfgPriceAssetId = $t084698635._5
233233
234234 let cfgAmountAssetDecimals = $t084698635._6
235235
236236 let cfgPriceAssetDecimals = $t084698635._7
237237
238238 func getFactoryConfig () = split(getStringOrFail(factoryContract, keyFactoryConfig()), SEP)
239239
240240
241241 let stakingContract = valueOrErrorMessage(addressFromString(getFactoryConfig()[idxFactoryStakingContract]), "incorrect staking address")
242242
243243 let slippageContract = valueOrErrorMessage(addressFromString(getFactoryConfig()[idxFactorySlippageContract]), "incorrect staking address")
244244
245245 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)
246246
247247
248248 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)
249249
250250
251251 func getAccBalance (assetId) = if ((assetId == "WAVES"))
252252 then wavesBalance(this).available
253253 else assetBalance(this, fromBase58String(assetId))
254254
255255
256256 func calcPriceBigInt (prAmtX18,amAmtX18) = fraction(prAmtX18, scale18, amAmtX18)
257257
258258
259259 func calcPriceBigIntRound (prAmtX18,amAmtX18,round) = fraction(prAmtX18, scale18, amAmtX18, round)
260260
261261
262262 func privateCalcPrice (amAssetDcm,prAssetDcm,amAmt,prAmt) = {
263263 let amtAssetAmtX18 = toX18(amAmt, amAssetDcm)
264264 let priceAssetAmtX18 = toX18(prAmt, prAssetDcm)
265265 calcPriceBigInt(priceAssetAmtX18, amtAssetAmtX18)
266266 }
267267
268268
269269 func calcPrices (amAmt,prAmt,lpAmt) = {
270270 let cfg = getPoolConfig()
271271 let amtAssetDcm = parseIntValue(cfg[idxAmtAssetDcm])
272272 let priceAssetDcm = parseIntValue(cfg[idxPriceAssetDcm])
273273 let priceX18 = privateCalcPrice(amtAssetDcm, priceAssetDcm, amAmt, prAmt)
274274 let amAmtX18 = toX18(amAmt, amtAssetDcm)
275275 let prAmtX18 = toX18(prAmt, priceAssetDcm)
276276 let lpAmtX18 = toX18(lpAmt, scale8)
277277 let lpPriceInAmAssetX18 = calcPriceBigInt(amAmtX18, lpAmtX18)
278278 let lpPriceInPrAssetX18 = calcPriceBigInt(prAmtX18, lpAmtX18)
279279 [priceX18, lpPriceInAmAssetX18, lpPriceInPrAssetX18]
280280 }
281281
282282
283283 func calculatePrices (amAmt,prAmt,lpAmt) = {
284284 let prices = calcPrices(amAmt, prAmt, lpAmt)
285285 [fromX18(prices[0], scale8), fromX18(prices[1], scale8), fromX18(prices[2], scale8)]
286286 }
287287
288288
289289 func estimateGetOperation (txId58,pmtAssetId,pmtLpAmt,userAddress) = {
290290 let cfg = getPoolConfig()
291291 let lpAssetId = cfg[idxPoolLPAssetId]
292292 let amAssetId = cfg[idxAmtAssetId]
293293 let prAssetId = cfg[idxPriceAssetId]
294294 let amAssetDcm = parseIntValue(cfg[idxAmtAssetDcm])
295295 let prAssetDcm = parseIntValue(cfg[idxPriceAssetDcm])
296296 let poolStatus = cfg[idxPoolStatus]
297297 let lpEmission = valueOrErrorMessage(assetInfo(fromBase58String(lpAssetId)), (("Asset " + lpAssetId) + " doesn't exist")).quantity
298298 if ((lpAssetId != pmtAssetId))
299299 then throw("Invalid asset passed.")
300300 else {
301301 let amBalance = getAccBalance(amAssetId)
302302 let amBalanceX18 = toX18(amBalance, amAssetDcm)
303303 let prBalance = getAccBalance(prAssetId)
304304 let prBalanceX18 = toX18(prBalance, prAssetDcm)
305305 let curPriceX18 = calcPriceBigInt(prBalanceX18, amBalanceX18)
306306 let curPrice = fromX18(curPriceX18, scale8)
307307 let pmtLpAmtX18 = toX18(pmtLpAmt, scale8)
308308 let lpEmissionX18 = toX18(lpEmission, scale8)
309309 let outAmAmtX18 = fraction(amBalanceX18, pmtLpAmtX18, lpEmissionX18)
310310 let outPrAmtX18 = fraction(prBalanceX18, pmtLpAmtX18, lpEmissionX18)
311311 let outAmAmt = fromX18Round(outAmAmtX18, amAssetDcm, FLOOR)
312312 let outPrAmt = fromX18Round(outPrAmtX18, prAssetDcm, FLOOR)
313313 let state = if ((txId58 == ""))
314314 then nil
315315 else [ScriptTransfer(userAddress, outAmAmt, if ((amAssetId == "WAVES"))
316316 then unit
317317 else fromBase58String(amAssetId)), ScriptTransfer(userAddress, outPrAmt, if ((prAssetId == "WAVES"))
318318 then unit
319319 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)]
320320 $Tuple10(outAmAmt, outPrAmt, amAssetId, prAssetId, amBalance, prBalance, lpEmission, curPriceX18, poolStatus, state)
321321 }
322322 }
323323
324324
325325 func estimatePutOperation (txId58,slippageTolerance,inAmAssetAmt,inAmAssetId,inPrAssetAmt,inPrAssetId,userAddress,isEvaluate,emitLp) = {
326326 let cfg = getPoolConfig()
327327 let lpAssetId = fromBase58String(cfg[idxPoolLPAssetId])
328328 let amAssetIdStr = cfg[idxAmtAssetId]
329329 let prAssetIdStr = cfg[idxPriceAssetId]
330330 let iAmtAssetId = cfg[idxIAmtAssetId]
331331 let iPriceAssetId = cfg[idxIPriceAssetId]
332332 let amtAssetDcm = parseIntValue(cfg[idxAmtAssetDcm])
333333 let priceAssetDcm = parseIntValue(cfg[idxPriceAssetDcm])
334334 let poolStatus = cfg[idxPoolStatus]
335335 let lpEmission = valueOrErrorMessage(assetInfo(lpAssetId), (("Asset " + toBase58String(lpAssetId)) + " doesn't exist")).quantity
336336 let inAmAssetIdStr = toBase58String(valueOrElse(inAmAssetId, fromBase58String("WAVES")))
337337 let inPrAssetIdStr = toBase58String(valueOrElse(inPrAssetId, fromBase58String("WAVES")))
338338 if (if ((amAssetIdStr != inAmAssetIdStr))
339339 then true
340340 else (prAssetIdStr != inPrAssetIdStr))
341341 then throw("Invalid amt or price asset passed.")
342342 else {
343343 let amBalance = if (isEvaluate)
344344 then getAccBalance(amAssetIdStr)
345345 else (getAccBalance(amAssetIdStr) - inAmAssetAmt)
346346 let prBalance = if (isEvaluate)
347347 then getAccBalance(prAssetIdStr)
348348 else (getAccBalance(prAssetIdStr) - inPrAssetAmt)
349349 let inAmAssetAmtX18 = toX18(inAmAssetAmt, amtAssetDcm)
350350 let inPrAssetAmtX18 = toX18(inPrAssetAmt, priceAssetDcm)
351351 let userPriceX18 = calcPriceBigInt(inPrAssetAmtX18, inAmAssetAmtX18)
352352 let amBalanceX18 = toX18(amBalance, amtAssetDcm)
353353 let prBalanceX18 = toX18(prBalance, priceAssetDcm)
354354 let res = if ((lpEmission == 0))
355355 then {
356356 let curPriceX18 = zeroBigInt
357357 let slippageX18 = zeroBigInt
358358 let lpAmtX18 = pow((inAmAssetAmtX18 * inPrAssetAmtX18), 0, toBigInt(5), 1, 0, DOWN)
359359 $Tuple5(fromX18(lpAmtX18, scale8), fromX18(inAmAssetAmtX18, amtAssetDcm), fromX18(inPrAssetAmtX18, priceAssetDcm), calcPriceBigInt((prBalanceX18 + inPrAssetAmtX18), (amBalanceX18 + inAmAssetAmtX18)), slippageX18)
360360 }
361361 else {
362362 let curPriceX18 = calcPriceBigInt(prBalanceX18, amBalanceX18)
363363 let slippageX18 = fraction(absBigInt((curPriceX18 - userPriceX18)), scale18, curPriceX18)
364364 let slippageToleranceX18 = toX18(slippageTolerance, scale8)
365365 if (if ((curPriceX18 != zeroBigInt))
366366 then (slippageX18 > slippageToleranceX18)
367367 else false)
368368 then throw(((("Price slippage " + toString(slippageX18)) + " exceeded the passed limit of ") + toString(slippageToleranceX18)))
369369 else {
370370 let lpEmissionX18 = toX18(lpEmission, scale8)
371371 let prViaAmX18 = fraction(inAmAssetAmtX18, calcPriceBigIntRound(prBalanceX18, amBalanceX18, CEILING), scale18, CEILING)
372372 let amViaPrX18 = fraction(inPrAssetAmtX18, scale18, calcPriceBigIntRound(prBalanceX18, amBalanceX18, FLOOR), CEILING)
373373 let expectedAmts = if ((prViaAmX18 > inPrAssetAmtX18))
374374 then $Tuple2(amViaPrX18, inPrAssetAmtX18)
375375 else $Tuple2(inAmAssetAmtX18, prViaAmX18)
376376 let expAmtAssetAmtX18 = expectedAmts._1
377377 let expPriceAssetAmtX18 = expectedAmts._2
378378 let lpAmtX18 = fraction(lpEmissionX18, expPriceAssetAmtX18, prBalanceX18, FLOOR)
379379 $Tuple5(fromX18Round(lpAmtX18, scale8, FLOOR), fromX18Round(expAmtAssetAmtX18, amtAssetDcm, CEILING), fromX18Round(expPriceAssetAmtX18, priceAssetDcm, CEILING), curPriceX18, slippageX18)
380380 }
381381 }
382382 let calcLpAmt = res._1
383383 let calcAmAssetPmt = res._2
384384 let calcPrAssetPmt = res._3
385385 let curPrice = fromX18(res._4, scale8)
386386 let slippageCalc = fromX18(res._5, scale8)
387387 if ((0 >= calcLpAmt))
388388 then throw("Invalid calculations. LP calculated is less than zero.")
389389 else {
390390 let emitLpAmt = if (!(emitLp))
391391 then 0
392392 else calcLpAmt
393393 let amDiff = (inAmAssetAmt - calcAmAssetPmt)
394394 let prDiff = (inPrAssetAmt - calcPrAssetPmt)
395395 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))]
396396 $Tuple13(calcLpAmt, emitLpAmt, curPrice, amBalance, prBalance, lpEmission, lpAssetId, poolStatus, commonState, amDiff, prDiff, inAmAssetId, inPrAssetId)
397397 }
398398 }
399399 }
400400
401401
402402 func calcKLp (amountBalance,priceBalance,lpEmission) = {
403403 let amountBalanceX18 = toX18BigInt(amountBalance, toBigInt(cfgAmountAssetDecimals))
404404 let priceBalanceX18 = toX18BigInt(priceBalance, toBigInt(cfgPriceAssetDecimals))
405405 let updatedKLp = fraction(pow((amountBalanceX18 * priceBalanceX18), 0, toBigInt(5), 1, 18, DOWN), big1, lpEmission)
406406 if ((lpEmission == big0))
407407 then big0
408408 else updatedKLp
409409 }
410410
411411
412412 func calcCurrentKLp (amountAssetDelta,priceAssetDelta,lpAssetEmissionDelta) = {
413413 let amountAssetBalance = (toBigInt(getAccBalance(assetIdToString(cfgAmountAssetId))) - amountAssetDelta)
414414 let priceAssetBalance = (toBigInt(getAccBalance(assetIdToString(cfgPriceAssetId))) - priceAssetDelta)
415415 let lpAssetEmission = (toBigInt(value(assetInfo(cfgLpAssetId)).quantity) - lpAssetEmissionDelta)
416416 let currentKLp = calcKLp(amountAssetBalance, priceAssetBalance, lpAssetEmission)
417417 currentKLp
418418 }
419419
420420
421421 func refreshKLpInternal (amountAssetBalanceDelta,priceAssetBalanceDelta,lpAssetEmissionDelta) = {
422422 let amountAssetBalance = (getAccBalance(assetIdToString(cfgAmountAssetId)) + amountAssetBalanceDelta)
423423 let priceAssetBalance = (getAccBalance(assetIdToString(cfgPriceAssetId)) + priceAssetBalanceDelta)
424424 let lpAssetEmission = (value(assetInfo(cfgLpAssetId)).quantity + lpAssetEmissionDelta)
425425 let updatedKLp = calcKLp(toBigInt(amountAssetBalance), toBigInt(priceAssetBalance), toBigInt(lpAssetEmission))
426426 let actions = [IntegerEntry(keyKLpRefreshedHeight, height), StringEntry(keyKLp, toString(updatedKLp))]
427427 $Tuple2(actions, updatedKLp)
428428 }
429429
430430
431431 func validateUpdatedKLp (oldKLp,updatedKLp) = if ((updatedKLp >= oldKLp))
432432 then true
433433 else throwErr(makeString(["updated KLp lower than current KLp", toString(oldKLp), toString(updatedKLp)], " "))
434434
435435
436436 func validateMatcherOrderAllowed (order) = {
437437 let amountAssetBalance = getAccBalance(assetIdToString(cfgAmountAssetId))
438438 let priceAssetBalance = getAccBalance(assetIdToString(cfgPriceAssetId))
439439 let amountAssetAmount = order.amount
440440 let priceAssetAmount = fraction(order.amount, order.price, scale8, FLOOR)
441441 let $t02154121753 = if ((order.orderType == Buy))
442442 then $Tuple2(amountAssetAmount, -(priceAssetAmount))
443443 else $Tuple2(-(amountAssetAmount), priceAssetAmount)
444444 let amountAssetBalanceDelta = $t02154121753._1
445445 let priceAssetBalanceDelta = $t02154121753._2
446446 if (if (if (isGlobalShutdown())
447447 then true
448448 else (cfgPoolStatus == PoolMatcherDisabled))
449449 then true
450450 else (cfgPoolStatus == PoolShutdown))
451451 then throw("Exchange operations disabled")
452452 else if (if ((order.assetPair.amountAsset != cfgAmountAssetId))
453453 then true
454454 else (order.assetPair.priceAsset != cfgPriceAssetId))
455455 then throw("Wrong order assets.")
456456 else {
457457 let kLp = valueOrErrorMessage(parseBigInt(valueOrElse(getString(this, keyKLp), "0")), fmtErr("invalid kLp"))
458458 let $t02219322293 = refreshKLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
459459 let unusedActions = $t02219322293._1
460460 let kLpNew = $t02219322293._2
461461 let isOrderValid = (kLpNew >= kLp)
462462 let info = makeString(["kLp=", toString(kLp), " kLpNew=", toString(kLpNew), " amountAssetBalance=", toString(amountAssetBalance), " priceAssetBalance=", toString(priceAssetBalance), " amountAssetBalanceDelta=", toString(amountAssetBalanceDelta), " priceAssetBalanceDelta=", toString(priceAssetBalanceDelta), " height=", toString(height)], "")
463463 $Tuple2(isOrderValid, info)
464464 }
465465 }
466466
467467
468468 func commonGet (i) = if ((size(i.payments) != 1))
469469 then throw("exactly 1 payment is expected")
470470 else {
471471 let pmt = value(i.payments[0])
472472 let pmtAssetId = value(pmt.assetId)
473473 let pmtAmt = pmt.amount
474474 let res = estimateGetOperation(toBase58String(i.transactionId), toBase58String(pmtAssetId), pmtAmt, i.caller)
475475 let outAmAmt = res._1
476476 let outPrAmt = res._2
477477 let poolStatus = parseIntValue(res._9)
478478 let state = res._10
479479 if (if (isGlobalShutdown())
480480 then true
481481 else (poolStatus == PoolShutdown))
482482 then throw(("Get operation is blocked by admin. Status = " + toString(poolStatus)))
483483 else $Tuple5(outAmAmt, outPrAmt, pmtAmt, pmtAssetId, state)
484484 }
485485
486486
487487 func commonPut (i,slippageTolerance,emitLp) = if ((size(i.payments) != 2))
488488 then throw("exactly 2 payments are expected")
489489 else {
490490 let amAssetPmt = value(i.payments[0])
491491 let prAssetPmt = value(i.payments[1])
492492 let estPut = estimatePutOperation(toBase58String(i.transactionId), slippageTolerance, amAssetPmt.amount, amAssetPmt.assetId, prAssetPmt.amount, prAssetPmt.assetId, toString(i.caller), false, emitLp)
493493 let poolStatus = parseIntValue(estPut._8)
494494 if (if (if (isGlobalShutdown())
495495 then true
496496 else (poolStatus == PoolPutDisabled))
497497 then true
498498 else (poolStatus == PoolShutdown))
499499 then throw(("Put operation is blocked by admin. Status = " + toString(poolStatus)))
500500 else estPut
501501 }
502502
503503
504504 func emit (amount) = {
505505 let emitInv = invoke(factoryContract, "emit", [amount], nil)
506506 if ((emitInv == emitInv))
507507 then {
508508 let emitInvLegacy = match emitInv {
509509 case legacyFactoryContract: Address =>
510510 invoke(legacyFactoryContract, "emit", [amount], nil)
511511 case _ =>
512512 unit
513513 }
514514 if ((emitInvLegacy == emitInvLegacy))
515515 then amount
516516 else throw("Strict value is not equal to itself.")
517517 }
518518 else throw("Strict value is not equal to itself.")
519519 }
520520
521521
522522 func takeFee (amount,fee) = {
523523 let feeAmount = if ((fee == 0))
524524 then 0
525525 else fraction(amount, fee, scale8)
526526 $Tuple2((amount - feeAmount), feeAmount)
527527 }
528528
529529
530530 func calcPutOneToken (paymentAmountRaw,paymentAssetId,userAddress,txId) = {
531531 let isEval = (txId == unit)
532532 let amountBalanceRaw = getAccBalance(assetIdToString(cfgAmountAssetId))
533533 let priceBalanceRaw = getAccBalance(assetIdToString(cfgPriceAssetId))
534534 let paymentInAmountAsset = if ((paymentAssetId == cfgAmountAssetId))
535535 then true
536536 else if ((paymentAssetId == cfgPriceAssetId))
537537 then false
538538 else throwErr("invalid asset")
539539 let $t02540625699 = if (isEval)
540540 then $Tuple2(amountBalanceRaw, priceBalanceRaw)
541541 else if (paymentInAmountAsset)
542542 then $Tuple2((amountBalanceRaw - paymentAmountRaw), priceBalanceRaw)
543543 else $Tuple2(amountBalanceRaw, (priceBalanceRaw - paymentAmountRaw))
544544 let amountBalanceOld = $t02540625699._1
545545 let priceBalanceOld = $t02540625699._2
546546 let $t02570325852 = if (paymentInAmountAsset)
547547 then $Tuple2(paymentAmountRaw, 0)
548548 else $Tuple2(0, paymentAmountRaw)
549549 let amountAssetAmountRaw = $t02570325852._1
550550 let priceAssetAmountRaw = $t02570325852._2
551551 let amountAssetAmount = takeFee(amountAssetAmountRaw, inFee)._1
552552 let priceAssetAmount = takeFee(priceAssetAmountRaw, inFee)._1
553553 let $t02598426048 = takeFee(paymentAmountRaw, inFee)
554554 let paymentAmount = $t02598426048._1
555555 let feeAmount = $t02598426048._2
556556 let amountBalanceNew = (amountBalanceOld + amountAssetAmount)
557557 let priceBalanceNew = (priceBalanceOld + priceAssetAmount)
558558 let priceNewX18 = calcPriceBigInt(toX18(priceBalanceNew, cfgPriceAssetDecimals), toX18(amountBalanceNew, cfgAmountAssetDecimals))
559559 let priceNew = fromX18(priceNewX18, scale8)
560560 let paymentBalance = if (paymentInAmountAsset)
561561 then amountBalanceOld
562562 else priceBalanceOld
563563 let paymentBalanceBigInt = toBigInt(paymentBalance)
564564 let supplyBigInt = toBigInt(valueOrErrorMessage(assetInfo(cfgLpAssetId), (("asset " + toBase58String(cfgLpAssetId)) + " doesn't exist")).quantity)
565565 let chechSupply = if ((supplyBigInt > big0))
566566 then true
567567 else throwErr("initial deposit requires all coins")
568568 if ((chechSupply == chechSupply))
569569 then {
570570 let depositBigInt = toBigInt(paymentAmount)
571571 let issueAmount = max([0, toInt(((supplyBigInt * (sqrtBigInt((scale18 + ((depositBigInt * scale18) / paymentBalanceBigInt)), 18, 18, DOWN) - scale18)) / scale18))])
572572 let commonState = if (isEval)
573573 then nil
574574 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))]
575575 let priceOldX18 = calcPriceBigInt(toX18(priceBalanceOld, cfgPriceAssetDecimals), toX18(amountBalanceOld, cfgAmountAssetDecimals))
576576 let priceOld = fromX18(priceOldX18, scale8)
577577 let loss = {
578578 let $t02772927896 = if (paymentInAmountAsset)
579579 then $Tuple2(amountAssetAmountRaw, amountBalanceOld)
580580 else $Tuple2(priceAssetAmountRaw, priceBalanceOld)
581581 let amount = $t02772927896._1
582582 let balance = $t02772927896._2
583583 let issueAmountBoth = toInt(fraction(supplyBigInt, toBigInt((amount / 2)), toBigInt(balance)))
584584 fraction((issueAmount - issueAmountBoth), scale8, issueAmountBoth)
585585 }
586586 $Tuple5(issueAmount, commonState, feeAmount, loss, paymentInAmountAsset)
587587 }
588588 else throw("Strict value is not equal to itself.")
589589 }
590590
591591
592592 func calcGetOneToken (outAssetId,paymentAmount,paymentAssetId,userAddress,txId) = {
593593 let isEval = (txId == unit)
594594 let cfg = getPoolConfig()
595595 let amtAssetDcm = parseIntValue(cfg[idxAmtAssetDcm])
596596 let priceAssetDcm = parseIntValue(cfg[idxPriceAssetDcm])
597597 let checks = [if ((paymentAssetId == cfgLpAssetId))
598598 then true
599599 else throwErr("invalid lp asset")]
600600 if ((checks == checks))
601601 then {
602602 let outInAmountAsset = if ((outAssetId == cfgAmountAssetId))
603603 then true
604604 else if ((outAssetId == cfgPriceAssetId))
605605 then false
606606 else throwErr("invalid asset")
607607 let balanceBigInt = if (outInAmountAsset)
608608 then toBigInt(getAccBalance(assetIdToString(cfgAmountAssetId)))
609609 else toBigInt(getAccBalance(assetIdToString(cfgPriceAssetId)))
610610 let outInAmountAssetDecimals = if (outInAmountAsset)
611611 then amtAssetDcm
612612 else priceAssetDcm
613613 let amBalanceOld = getAccBalance(assetIdToString(cfgAmountAssetId))
614614 let prBalanceOld = getAccBalance(assetIdToString(cfgPriceAssetId))
615615 let outBalance = if (outInAmountAsset)
616616 then amBalanceOld
617617 else prBalanceOld
618618 let outBalanceBigInt = toBigInt(outBalance)
619619 let supplyBigInt = toBigInt(valueOrErrorMessage(assetInfo(cfgLpAssetId), (("asset " + toBase58String(cfgLpAssetId)) + " doesn't exist")).quantity)
620620 let redeemedBigInt = toBigInt(paymentAmount)
621621 let amountRaw = max([0, toInt(((balanceBigInt * (scale18 - pow((scale18 - ((redeemedBigInt * scale18) / supplyBigInt)), 18, big2, 0, 18, DOWN))) / scale18))])
622622 let $t02997430030 = takeFee(amountRaw, outFee)
623623 let totalAmount = $t02997430030._1
624624 let feeAmount = $t02997430030._2
625625 let $t03003430260 = if (outInAmountAsset)
626626 then $Tuple4(totalAmount, 0, (amBalanceOld - amountRaw), prBalanceOld)
627627 else $Tuple4(0, totalAmount, amBalanceOld, (prBalanceOld - amountRaw))
628628 let outAmAmount = $t03003430260._1
629629 let outPrAmount = $t03003430260._2
630630 let amBalanceNew = $t03003430260._3
631631 let prBalanceNew = $t03003430260._4
632632 let priceNewX18 = calcPriceBigInt(toX18(prBalanceNew, cfgPriceAssetDecimals), toX18(amBalanceNew, cfgAmountAssetDecimals))
633633 let priceNew = fromX18(priceNewX18, scale8)
634634 let commonState = if (isEval)
635635 then nil
636636 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)]
637637 let priceOldX18 = calcPriceBigInt(toX18(prBalanceOld, cfgPriceAssetDecimals), toX18(amBalanceOld, cfgAmountAssetDecimals))
638638 let priceOld = fromX18(priceOldX18, scale8)
639639 let loss = {
640640 let amountBothInPaymentAsset = (toInt(fraction(balanceBigInt, redeemedBigInt, supplyBigInt)) * 2)
641641 fraction((totalAmount - amountBothInPaymentAsset), scale8, amountBothInPaymentAsset)
642642 }
643643 $Tuple5(totalAmount, commonState, feeAmount, loss, outInAmountAsset)
644644 }
645645 else throw("Strict value is not equal to itself.")
646646 }
647647
648648
649649 func managerPublicKeyOrUnit () = match getString(mpk()) {
650650 case s: String =>
651651 fromBase58String(s)
652652 case _: Unit =>
653653 unit
654654 case _ =>
655655 throw("Match error")
656656 }
657657
658658
659659 func pendingManagerPublicKeyOrUnit () = match getString(pmpk()) {
660660 case s: String =>
661661 fromBase58String(s)
662662 case _: Unit =>
663663 unit
664664 case _ =>
665665 throw("Match error")
666666 }
667667
668668
669669 func isManager (i) = match managerPublicKeyOrUnit() {
670670 case pk: ByteVector =>
671671 (i.callerPublicKey == pk)
672672 case _: Unit =>
673673 (i.caller == this)
674674 case _ =>
675675 throw("Match error")
676676 }
677677
678678
679679 func mustManager (i) = {
680680 let pd = throw("Permission denied")
681681 match managerPublicKeyOrUnit() {
682682 case pk: ByteVector =>
683683 if ((i.callerPublicKey == pk))
684684 then true
685685 else pd
686686 case _: Unit =>
687687 if ((i.caller == this))
688688 then true
689689 else pd
690690 case _ =>
691691 throw("Match error")
692692 }
693693 }
694694
695695
696696 @Callable(i)
697697 func calculateAmountOutForSwapREADONLY (cleanAmountIn,isReverse) = {
698698 let $t03195532260 = if ((isReverse == false))
699699 then {
700700 let assetOut = getStringOrFail(this, pa())
701701 let assetIn = getStringOrFail(this, aa())
702702 $Tuple2(assetOut, assetIn)
703703 }
704704 else {
705705 let assetOut = getStringOrFail(this, aa())
706706 let assetIn = getStringOrFail(this, pa())
707707 $Tuple2(assetOut, assetIn)
708708 }
709709 let assetOut = $t03195532260._1
710710 let assetIn = $t03195532260._2
711711 let poolAssetInBalance = getAccBalance(assetIn)
712712 let poolAssetOutBalance = getAccBalance(assetOut)
713713 let amountOut = fraction(poolAssetOutBalance, cleanAmountIn, (poolAssetInBalance + cleanAmountIn))
714714 let oldK = (toBigInt(poolAssetInBalance) * toBigInt(poolAssetOutBalance))
715715 let newK = ((toBigInt(getAccBalance(assetIn)) + toBigInt(cleanAmountIn)) * (toBigInt(getAccBalance(assetOut)) - toBigInt(amountOut)))
716716 let checkK = if ((newK >= oldK))
717717 then true
718718 else throw("new K is fewer error")
719719 if ((checkK == checkK))
720720 then $Tuple2(nil, amountOut)
721721 else throw("Strict value is not equal to itself.")
722722 }
723723
724724
725725
726726 @Callable(i)
727727 func calculateAmountOutForSwapAndSendTokens (cleanAmountIn,isReverse,amountOutMin,addressTo) = {
728728 let swapContact = {
729729 let @ = invoke(factoryContract, "getSwapContractREADONLY", nil, nil)
730730 if ($isInstanceOf(@, "String"))
731731 then @
732732 else throw(($getType(@) + " couldn't be cast to String"))
733733 }
734734 let checks = [if ((value(i.payments[0]).amount >= cleanAmountIn))
735735 then true
736736 else throwErr("Wrong amount"), if ((i.caller == addressFromStringValue(swapContact)))
737737 then true
738738 else throwErr("Permission denied")]
739739 if ((checks == checks))
740740 then {
741741 let pmt = value(i.payments[0])
742- let assetIn = if ((pmt.assetId == unit))
743- then toBase58String(toBytes("WAVES"))
744- else toBase58String(value(pmt.assetId))
742+ let assetIn = assetIdToString(pmt.assetId)
745743 let assetOut = if ((isReverse == false))
746744 then getStringOrFail(this, pa())
747745 else getStringOrFail(this, aa())
748746 let poolAssetInBalance = (getAccBalance(assetIn) - value(i.payments[0]).amount)
749747 let poolAssetOutBalance = getAccBalance(assetOut)
750748 let amountOut = fraction(poolAssetOutBalance, cleanAmountIn, (poolAssetInBalance + cleanAmountIn))
751749 let oldK = (toBigInt(poolAssetInBalance) * toBigInt(poolAssetOutBalance))
752750 let newK = (toBigInt(getAccBalance(assetIn)) * (toBigInt(getAccBalance(assetOut)) - toBigInt(amountOut)))
753751 let checkK = if ((newK >= oldK))
754752 then true
755753 else throw("new K is fewer error")
756754 if ((checkK == checkK))
757755 then {
758756 let checkMin = if ((amountOut >= amountOutMin))
759757 then true
760758 else throw("Exchange result is fewer coins than expected")
761759 if ((checkMin == checkMin))
762760 then $Tuple2([ScriptTransfer(addressFromStringValue(addressTo), amountOut, parseAssetId(assetOut))], amountOut)
763761 else throw("Strict value is not equal to itself.")
764762 }
765763 else throw("Strict value is not equal to itself.")
766764 }
767765 else throw("Strict value is not equal to itself.")
768766 }
769767
770768
771769
772770 @Callable(i)
773771 func setManager (pendingManagerPublicKey) = {
774772 let checkCaller = mustManager(i)
775773 if ((checkCaller == checkCaller))
776774 then {
777775 let checkManagerPublicKey = fromBase58String(pendingManagerPublicKey)
778776 if ((checkManagerPublicKey == checkManagerPublicKey))
779777 then [StringEntry(pmpk(), pendingManagerPublicKey)]
780778 else throw("Strict value is not equal to itself.")
781779 }
782780 else throw("Strict value is not equal to itself.")
783781 }
784782
785783
786784
787785 @Callable(i)
788786 func confirmManager () = {
789787 let pm = pendingManagerPublicKeyOrUnit()
790788 let hasPM = if (isDefined(pm))
791789 then true
792790 else throw("No pending manager")
793791 if ((hasPM == hasPM))
794792 then {
795793 let checkPM = if ((i.callerPublicKey == value(pm)))
796794 then true
797795 else throw("You are not pending manager")
798796 if ((checkPM == checkPM))
799797 then [StringEntry(mpk(), toBase58String(value(pm))), DeleteEntry(pmpk())]
800798 else throw("Strict value is not equal to itself.")
801799 }
802800 else throw("Strict value is not equal to itself.")
803801 }
804802
805803
806804
807805 @Callable(i)
808806 func put (slippageTolerance,shouldAutoStake) = if ((0 > slippageTolerance))
809807 then throw("Invalid slippageTolerance passed")
810808 else {
811809 let estPut = commonPut(i, slippageTolerance, true)
812810 let emitLpAmt = estPut._2
813811 let lpAssetId = estPut._7
814812 let state = estPut._9
815813 let amDiff = estPut._10
816814 let prDiff = estPut._11
817815 let amId = estPut._12
818816 let prId = estPut._13
819817 let amAssetPmt = toBigInt(value(i.payments[0]).amount)
820818 let prAssetPmt = toBigInt(value(i.payments[1]).amount)
821819 let currentKLp = calcCurrentKLp(amAssetPmt, prAssetPmt, toBigInt(0))
822820 if ((currentKLp == currentKLp))
823821 then {
824822 let emitInv = invoke(factoryContract, "emit", [emitLpAmt], nil)
825823 if ((emitInv == emitInv))
826824 then {
827825 let emitInvLegacy = match emitInv {
828826 case legacyFactoryContract: Address =>
829827 invoke(legacyFactoryContract, "emit", [emitLpAmt], nil)
830828 case _ =>
831829 unit
832830 }
833831 if ((emitInvLegacy == emitInvLegacy))
834832 then {
835833 let slippageAInv = if ((amDiff > 0))
836834 then invoke(slippageContract, "put", nil, [AttachedPayment(amId, amDiff)])
837835 else nil
838836 if ((slippageAInv == slippageAInv))
839837 then {
840838 let slippagePInv = if ((prDiff > 0))
841839 then invoke(slippageContract, "put", nil, [AttachedPayment(prId, prDiff)])
842840 else nil
843841 if ((slippagePInv == slippagePInv))
844842 then {
845843 let lpTransfer = if (shouldAutoStake)
846844 then {
847845 let slpStakeInv = invoke(stakingContract, "stake", nil, [AttachedPayment(lpAssetId, emitLpAmt)])
848846 if ((slpStakeInv == slpStakeInv))
849847 then nil
850848 else throw("Strict value is not equal to itself.")
851849 }
852850 else [ScriptTransfer(i.caller, emitLpAmt, lpAssetId)]
853- let $t03714537607 = refreshKLpInternal(0, 0, 0)
854- if (($t03714537607 == $t03714537607))
851+ let $t03706937531 = refreshKLpInternal(0, 0, 0)
852+ if (($t03706937531 == $t03706937531))
855853 then {
856- let updatedKLp = $t03714537607._2
857- let refreshKLpActions = $t03714537607._1
854+ let updatedKLp = $t03706937531._2
855+ let refreshKLpActions = $t03706937531._1
858856 let isUpdatedKLpValid = validateUpdatedKLp(currentKLp, updatedKLp)
859857 if ((isUpdatedKLpValid == isUpdatedKLpValid))
860858 then ((state ++ lpTransfer) ++ refreshKLpActions)
861859 else throw("Strict value is not equal to itself.")
862860 }
863861 else throw("Strict value is not equal to itself.")
864862 }
865863 else throw("Strict value is not equal to itself.")
866864 }
867865 else throw("Strict value is not equal to itself.")
868866 }
869867 else throw("Strict value is not equal to itself.")
870868 }
871869 else throw("Strict value is not equal to itself.")
872870 }
873871 else throw("Strict value is not equal to itself.")
874872 }
875873
876874
877875
878876 @Callable(i)
879877 func putForFree (maxSlippage) = if ((0 > maxSlippage))
880878 then throw("Invalid value passed")
881879 else {
882880 let estPut = commonPut(i, maxSlippage, false)
883881 let state = estPut._9
884882 let amAssetPmt = toBigInt(value(i.payments[0]).amount)
885883 let prAssetPmt = toBigInt(value(i.payments[1]).amount)
886884 let currentKLp = calcCurrentKLp(amAssetPmt, prAssetPmt, toBigInt(0))
887885 if ((currentKLp == currentKLp))
888886 then {
889- let $t03816938234 = refreshKLpInternal(0, 0, 0)
890- let refreshKLpActions = $t03816938234._1
891- let updatedKLp = $t03816938234._2
887+ let $t03809338158 = refreshKLpInternal(0, 0, 0)
888+ let refreshKLpActions = $t03809338158._1
889+ let updatedKLp = $t03809338158._2
892890 let isUpdatedKLpValid = validateUpdatedKLp(currentKLp, updatedKLp)
893891 if ((isUpdatedKLpValid == isUpdatedKLpValid))
894892 then (state ++ refreshKLpActions)
895893 else throw("Strict value is not equal to itself.")
896894 }
897895 else throw("Strict value is not equal to itself.")
898896 }
899897
900898
901899
902900 @Callable(i)
903901 func putOneTkn (minOutAmount,autoStake) = {
904902 let isPoolOneTokenOperationsDisabled = {
905903 let @ = invoke(factoryContract, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
906904 if ($isInstanceOf(@, "Boolean"))
907905 then @
908906 else throw(($getType(@) + " couldn't be cast to Boolean"))
909907 }
910908 let isPutDisabled = if (if (if (isGlobalShutdown())
911909 then true
912910 else (cfgPoolStatus == PoolPutDisabled))
913911 then true
914912 else (cfgPoolStatus == PoolShutdown))
915913 then true
916914 else isPoolOneTokenOperationsDisabled
917915 let checks = [if (if (!(isPutDisabled))
918916 then true
919917 else isManager(i))
920918 then true
921919 else throwErr("put operation is blocked by admin"), if ((size(i.payments) == 1))
922920 then true
923921 else throwErr("exactly 1 payment are expected")]
924922 if ((checks == checks))
925923 then {
926924 let payment = i.payments[0]
927925 let paymentAssetId = payment.assetId
928926 let paymentAmountRaw = payment.amount
929927 let currentKLp = if ((paymentAssetId == cfgAmountAssetId))
930928 then calcCurrentKLp(toBigInt(paymentAmountRaw), toBigInt(0), toBigInt(0))
931929 else if ((paymentAssetId == cfgPriceAssetId))
932930 then calcCurrentKLp(toBigInt(0), toBigInt(paymentAmountRaw), toBigInt(0))
933931 else throwErr("payment asset is not supported")
934932 if ((currentKLp == currentKLp))
935933 then {
936934 let userAddress = i.caller
937935 let txId = i.transactionId
938- let $t03942239574 = calcPutOneToken(paymentAmountRaw, paymentAssetId, userAddress, txId)
939- if (($t03942239574 == $t03942239574))
936+ let $t03934639498 = calcPutOneToken(paymentAmountRaw, paymentAssetId, userAddress, txId)
937+ if (($t03934639498 == $t03934639498))
940938 then {
941- let paymentInAmountAsset = $t03942239574._5
942- let bonus = $t03942239574._4
943- let feeAmount = $t03942239574._3
944- let commonState = $t03942239574._2
945- let emitAmountEstimated = $t03942239574._1
939+ let paymentInAmountAsset = $t03934639498._5
940+ let bonus = $t03934639498._4
941+ let feeAmount = $t03934639498._3
942+ let commonState = $t03934639498._2
943+ let emitAmountEstimated = $t03934639498._1
946944 let emitAmount = if (if ((minOutAmount > 0))
947945 then (minOutAmount > emitAmountEstimated)
948946 else false)
949947 then throwErr(makeString(["amount to receive is less than ", toString(minOutAmount)], ""))
950948 else emitAmountEstimated
951949 let emitInv = emit(emitAmount)
952950 if ((emitInv == emitInv))
953951 then {
954952 let lpTransfer = if (autoStake)
955953 then {
956954 let stakeInv = invoke(stakingContract, "stake", nil, [AttachedPayment(cfgLpAssetId, emitAmount)])
957955 if ((stakeInv == stakeInv))
958956 then nil
959957 else throw("Strict value is not equal to itself.")
960958 }
961959 else [ScriptTransfer(i.caller, emitAmount, cfgLpAssetId)]
962960 let sendFee = if ((feeAmount > 0))
963961 then [ScriptTransfer(feeCollectorAddress, feeAmount, paymentAssetId)]
964962 else nil
965- let $t04016040357 = if ((this == feeCollectorAddress))
963+ let $t04008440281 = if ((this == feeCollectorAddress))
966964 then $Tuple2(0, 0)
967965 else if (paymentInAmountAsset)
968966 then $Tuple2(-(feeAmount), 0)
969967 else $Tuple2(0, -(feeAmount))
970- let amountAssetBalanceDelta = $t04016040357._1
971- let priceAssetBalanceDelta = $t04016040357._2
972- let $t04036040468 = refreshKLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
973- let refreshKLpActions = $t04036040468._1
974- let updatedKLp = $t04036040468._2
968+ let amountAssetBalanceDelta = $t04008440281._1
969+ let priceAssetBalanceDelta = $t04008440281._2
970+ let $t04028440392 = refreshKLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
971+ let refreshKLpActions = $t04028440392._1
972+ let updatedKLp = $t04028440392._2
975973 let kLp = value(getString(keyKLp))
976974 let isUpdatedKLpValid = validateUpdatedKLp(currentKLp, updatedKLp)
977975 if ((isUpdatedKLpValid == isUpdatedKLpValid))
978976 then $Tuple2((((commonState ++ lpTransfer) ++ sendFee) ++ refreshKLpActions), emitAmount)
979977 else throw("Strict value is not equal to itself.")
980978 }
981979 else throw("Strict value is not equal to itself.")
982980 }
983981 else throw("Strict value is not equal to itself.")
984982 }
985983 else throw("Strict value is not equal to itself.")
986984 }
987985 else throw("Strict value is not equal to itself.")
988986 }
989987
990988
991989
992990 @Callable(i)
993991 func putOneTknREADONLY (paymentAssetId,paymentAmountRaw) = {
994- let $t04077440931 = calcPutOneToken(paymentAmountRaw, parseAssetId(paymentAssetId), unit, unit)
995- let emitAmountEstimated = $t04077440931._1
996- let commonState = $t04077440931._2
997- let feeAmount = $t04077440931._3
998- let bonus = $t04077440931._4
999- let paymentInAmountAsset = $t04077440931._5
992+ let $t04069840855 = calcPutOneToken(paymentAmountRaw, parseAssetId(paymentAssetId), unit, unit)
993+ let emitAmountEstimated = $t04069840855._1
994+ let commonState = $t04069840855._2
995+ let feeAmount = $t04069840855._3
996+ let bonus = $t04069840855._4
997+ let paymentInAmountAsset = $t04069840855._5
1000998 $Tuple2(nil, $Tuple3(emitAmountEstimated, feeAmount, bonus))
1001999 }
10021000
10031001
10041002
10051003 @Callable(i)
10061004 func getOneTkn (outAssetIdStr,minOutAmount) = {
10071005 let isPoolOneTokenOperationsDisabled = {
10081006 let @ = invoke(factoryContract, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
10091007 if ($isInstanceOf(@, "Boolean"))
10101008 then @
10111009 else throw(($getType(@) + " couldn't be cast to Boolean"))
10121010 }
10131011 let isGetDisabled = if (if (isGlobalShutdown())
10141012 then true
10151013 else (cfgPoolStatus == PoolShutdown))
10161014 then true
10171015 else isPoolOneTokenOperationsDisabled
10181016 let checks = [if (if (!(isGetDisabled))
10191017 then true
10201018 else isManager(i))
10211019 then true
10221020 else throwErr("get operation is blocked by admin"), if ((size(i.payments) == 1))
10231021 then true
10241022 else throwErr("exactly 1 payment are expected")]
10251023 if ((checks == checks))
10261024 then {
10271025 let outAssetId = parseAssetId(outAssetIdStr)
10281026 let payment = i.payments[0]
10291027 let paymentAssetId = payment.assetId
10301028 let paymentAmount = payment.amount
10311029 let currentKLp = calcCurrentKLp(toBigInt(0), toBigInt(0), toBigInt(0))
10321030 if ((currentKLp == currentKLp))
10331031 then {
10341032 let userAddress = i.caller
10351033 let txId = i.transactionId
1036- let $t04181641969 = calcGetOneToken(outAssetId, paymentAmount, paymentAssetId, userAddress, txId)
1037- if (($t04181641969 == $t04181641969))
1034+ let $t04174041893 = calcGetOneToken(outAssetId, paymentAmount, paymentAssetId, userAddress, txId)
1035+ if (($t04174041893 == $t04174041893))
10381036 then {
1039- let outInAmountAsset = $t04181641969._5
1040- let bonus = $t04181641969._4
1041- let feeAmount = $t04181641969._3
1042- let commonState = $t04181641969._2
1043- let amountEstimated = $t04181641969._1
1037+ let outInAmountAsset = $t04174041893._5
1038+ let bonus = $t04174041893._4
1039+ let feeAmount = $t04174041893._3
1040+ let commonState = $t04174041893._2
1041+ let amountEstimated = $t04174041893._1
10441042 let amount = if (if ((minOutAmount > 0))
10451043 then (minOutAmount > amountEstimated)
10461044 else false)
10471045 then throwErr(makeString(["amount to receive is less than ", toString(minOutAmount)], ""))
10481046 else amountEstimated
10491047 let burnInv = invoke(factoryContract, "burn", [paymentAmount], [AttachedPayment(paymentAssetId, paymentAmount)])
10501048 if ((burnInv == burnInv))
10511049 then {
10521050 let assetTransfer = [ScriptTransfer(userAddress, amount, outAssetId)]
10531051 let sendFee = if ((feeAmount > 0))
10541052 then [ScriptTransfer(feeCollectorAddress, feeAmount, outAssetId)]
10551053 else nil
1056- let $t04246942716 = {
1054+ let $t04239342640 = {
10571055 let feeAmountForCalc = if ((this == feeCollectorAddress))
10581056 then 0
10591057 else feeAmount
10601058 if (outInAmountAsset)
10611059 then $Tuple2(-((amount + feeAmountForCalc)), 0)
10621060 else $Tuple2(0, -((amount + feeAmountForCalc)))
10631061 }
1064- let amountAssetBalanceDelta = $t04246942716._1
1065- let priceAssetBalanceDelta = $t04246942716._2
1066- let $t04271942827 = refreshKLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
1067- let refreshKLpActions = $t04271942827._1
1068- let updatedKLp = $t04271942827._2
1062+ let amountAssetBalanceDelta = $t04239342640._1
1063+ let priceAssetBalanceDelta = $t04239342640._2
1064+ let $t04264342751 = refreshKLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
1065+ let refreshKLpActions = $t04264342751._1
1066+ let updatedKLp = $t04264342751._2
10691067 let isUpdatedKLpValid = validateUpdatedKLp(currentKLp, updatedKLp)
10701068 if ((isUpdatedKLpValid == isUpdatedKLpValid))
10711069 then $Tuple2((((commonState ++ assetTransfer) ++ sendFee) ++ refreshKLpActions), amount)
10721070 else throw("Strict value is not equal to itself.")
10731071 }
10741072 else throw("Strict value is not equal to itself.")
10751073 }
10761074 else throw("Strict value is not equal to itself.")
10771075 }
10781076 else throw("Strict value is not equal to itself.")
10791077 }
10801078 else throw("Strict value is not equal to itself.")
10811079 }
10821080
10831081
10841082
10851083 @Callable(i)
10861084 func getOneTknREADONLY (outAssetId,paymentAmount) = {
1087- let $t04308443240 = calcGetOneToken(parseAssetId(outAssetId), paymentAmount, cfgLpAssetId, unit, unit)
1088- let amountEstimated = $t04308443240._1
1089- let commonState = $t04308443240._2
1090- let feeAmount = $t04308443240._3
1091- let bonus = $t04308443240._4
1092- let outInAmountAsset = $t04308443240._5
1085+ let $t04300843164 = calcGetOneToken(parseAssetId(outAssetId), paymentAmount, cfgLpAssetId, unit, unit)
1086+ let amountEstimated = $t04300843164._1
1087+ let commonState = $t04300843164._2
1088+ let feeAmount = $t04300843164._3
1089+ let bonus = $t04300843164._4
1090+ let outInAmountAsset = $t04300843164._5
10931091 $Tuple2(nil, $Tuple3(amountEstimated, feeAmount, bonus))
10941092 }
10951093
10961094
10971095
10981096 @Callable(i)
10991097 func unstakeAndGetOneTkn (unstakeAmount,outAssetIdStr,minOutAmount) = {
11001098 let isPoolOneTokenOperationsDisabled = {
11011099 let @ = invoke(factoryContract, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
11021100 if ($isInstanceOf(@, "Boolean"))
11031101 then @
11041102 else throw(($getType(@) + " couldn't be cast to Boolean"))
11051103 }
11061104 let isGetDisabled = if (if (isGlobalShutdown())
11071105 then true
11081106 else (cfgPoolStatus == PoolShutdown))
11091107 then true
11101108 else isPoolOneTokenOperationsDisabled
11111109 let checks = [if (if (!(isGetDisabled))
11121110 then true
11131111 else isManager(i))
11141112 then true
11151113 else throwErr("get operation is blocked by admin"), if ((size(i.payments) == 0))
11161114 then true
11171115 else throwErr("no payments are expected")]
11181116 if ((checks == checks))
11191117 then {
11201118 let outAssetId = parseAssetId(outAssetIdStr)
11211119 let userAddress = i.caller
11221120 let txId = i.transactionId
11231121 let currentKLp = calcCurrentKLp(toBigInt(0), toBigInt(0), toBigInt(0))
11241122 if ((currentKLp == currentKLp))
11251123 then {
11261124 let unstakeInv = invoke(stakingContract, "unstake", [toBase58String(cfgLpAssetId), unstakeAmount], nil)
11271125 if ((unstakeInv == unstakeInv))
11281126 then {
1129- let $t04414544296 = calcGetOneToken(outAssetId, unstakeAmount, cfgLpAssetId, userAddress, txId)
1130- if (($t04414544296 == $t04414544296))
1127+ let $t04406944220 = calcGetOneToken(outAssetId, unstakeAmount, cfgLpAssetId, userAddress, txId)
1128+ if (($t04406944220 == $t04406944220))
11311129 then {
1132- let outInAmountAsset = $t04414544296._5
1133- let bonus = $t04414544296._4
1134- let feeAmount = $t04414544296._3
1135- let commonState = $t04414544296._2
1136- let amountEstimated = $t04414544296._1
1130+ let outInAmountAsset = $t04406944220._5
1131+ let bonus = $t04406944220._4
1132+ let feeAmount = $t04406944220._3
1133+ let commonState = $t04406944220._2
1134+ let amountEstimated = $t04406944220._1
11371135 let amount = if (if ((minOutAmount > 0))
11381136 then (minOutAmount > amountEstimated)
11391137 else false)
11401138 then throwErr(makeString(["amount to receive is less than ", toString(minOutAmount)], ""))
11411139 else amountEstimated
11421140 let burnInv = invoke(factoryContract, "burn", [unstakeAmount], [AttachedPayment(cfgLpAssetId, unstakeAmount)])
11431141 if ((burnInv == burnInv))
11441142 then {
11451143 let assetTransfer = [ScriptTransfer(i.caller, amount, outAssetId)]
11461144 let sendFee = if ((feeAmount > 0))
11471145 then [ScriptTransfer(feeCollectorAddress, feeAmount, outAssetId)]
11481146 else nil
1149- let $t04479145038 = {
1147+ let $t04471544962 = {
11501148 let feeAmountForCalc = if ((this == feeCollectorAddress))
11511149 then 0
11521150 else feeAmount
11531151 if (outInAmountAsset)
11541152 then $Tuple2(-((amount + feeAmountForCalc)), 0)
11551153 else $Tuple2(0, -((amount + feeAmountForCalc)))
11561154 }
1157- let amountAssetBalanceDelta = $t04479145038._1
1158- let priceAssetBalanceDelta = $t04479145038._2
1159- let $t04504145149 = refreshKLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
1160- let refreshKLpActions = $t04504145149._1
1161- let updatedKLp = $t04504145149._2
1155+ let amountAssetBalanceDelta = $t04471544962._1
1156+ let priceAssetBalanceDelta = $t04471544962._2
1157+ let $t04496545073 = refreshKLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
1158+ let refreshKLpActions = $t04496545073._1
1159+ let updatedKLp = $t04496545073._2
11621160 let isUpdatedKLpValid = validateUpdatedKLp(currentKLp, updatedKLp)
11631161 if ((isUpdatedKLpValid == isUpdatedKLpValid))
11641162 then $Tuple2((((commonState ++ assetTransfer) ++ sendFee) ++ refreshKLpActions), amount)
11651163 else throw("Strict value is not equal to itself.")
11661164 }
11671165 else throw("Strict value is not equal to itself.")
11681166 }
11691167 else throw("Strict value is not equal to itself.")
11701168 }
11711169 else throw("Strict value is not equal to itself.")
11721170 }
11731171 else throw("Strict value is not equal to itself.")
11741172 }
11751173 else throw("Strict value is not equal to itself.")
11761174 }
11771175
11781176
11791177
11801178 @Callable(i)
11811179 func get () = {
11821180 let res = commonGet(i)
11831181 let outAmtAmt = res._1
11841182 let outPrAmt = res._2
11851183 let pmtAmt = res._3
11861184 let pmtAssetId = res._4
11871185 let state = res._5
11881186 let currentKLp = calcCurrentKLp(toBigInt(0), toBigInt(0), toBigInt(0))
11891187 if ((currentKLp == currentKLp))
11901188 then {
11911189 let burnLPAssetOnFactory = invoke(factoryContract, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
11921190 if ((burnLPAssetOnFactory == burnLPAssetOnFactory))
11931191 then {
1194- let $t04609546177 = refreshKLpInternal(-(outAmtAmt), -(outPrAmt), 0)
1195- let refreshKLpActions = $t04609546177._1
1196- let updatedKLp = $t04609546177._2
1192+ let $t04601946101 = refreshKLpInternal(-(outAmtAmt), -(outPrAmt), 0)
1193+ let refreshKLpActions = $t04601946101._1
1194+ let updatedKLp = $t04601946101._2
11971195 let isUpdatedKLpValid = validateUpdatedKLp(currentKLp, updatedKLp)
11981196 if ((isUpdatedKLpValid == isUpdatedKLpValid))
11991197 then (state ++ refreshKLpActions)
12001198 else throw("Strict value is not equal to itself.")
12011199 }
12021200 else throw("Strict value is not equal to itself.")
12031201 }
12041202 else throw("Strict value is not equal to itself.")
12051203 }
12061204
12071205
12081206
12091207 @Callable(i)
12101208 func getNoLess (noLessThenAmtAsset,noLessThenPriceAsset) = {
12111209 let res = commonGet(i)
12121210 let outAmAmt = res._1
12131211 let outPrAmt = res._2
12141212 let pmtAmt = res._3
12151213 let pmtAssetId = res._4
12161214 let state = res._5
12171215 if ((noLessThenAmtAsset > outAmAmt))
12181216 then throw(((("noLessThenAmtAsset failed: " + toString(outAmAmt)) + " < ") + toString(noLessThenAmtAsset)))
12191217 else if ((noLessThenPriceAsset > outPrAmt))
12201218 then throw(((("noLessThenPriceAsset failed: " + toString(outPrAmt)) + " < ") + toString(noLessThenPriceAsset)))
12211219 else {
12221220 let currentKLp = calcCurrentKLp(toBigInt(0), toBigInt(0), toBigInt(0))
12231221 if ((currentKLp == currentKLp))
12241222 then {
12251223 let burnLPAssetOnFactory = invoke(factoryContract, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
12261224 if ((burnLPAssetOnFactory == burnLPAssetOnFactory))
12271225 then {
1228- let $t04712647207 = refreshKLpInternal(-(outAmAmt), -(outPrAmt), 0)
1229- let refreshKLpActions = $t04712647207._1
1230- let updatedKLp = $t04712647207._2
1226+ let $t04705047131 = refreshKLpInternal(-(outAmAmt), -(outPrAmt), 0)
1227+ let refreshKLpActions = $t04705047131._1
1228+ let updatedKLp = $t04705047131._2
12311229 let isUpdatedKLpValid = validateUpdatedKLp(currentKLp, updatedKLp)
12321230 if ((isUpdatedKLpValid == isUpdatedKLpValid))
12331231 then (state ++ refreshKLpActions)
12341232 else throw("Strict value is not equal to itself.")
12351233 }
12361234 else throw("Strict value is not equal to itself.")
12371235 }
12381236 else throw("Strict value is not equal to itself.")
12391237 }
12401238 }
12411239
12421240
12431241
12441242 @Callable(i)
12451243 func unstakeAndGet (amount) = {
12461244 let checkPayments = if ((size(i.payments) != 0))
12471245 then throw("No payments are expected")
12481246 else true
12491247 if ((checkPayments == checkPayments))
12501248 then {
12511249 let cfg = getPoolConfig()
12521250 let lpAssetId = fromBase58String(cfg[idxPoolLPAssetId])
12531251 let currentKLp = calcCurrentKLp(toBigInt(0), toBigInt(0), toBigInt(0))
12541252 if ((currentKLp == currentKLp))
12551253 then {
12561254 let unstakeInv = invoke(stakingContract, "unstake", [toBase58String(lpAssetId), amount], nil)
12571255 if ((unstakeInv == unstakeInv))
12581256 then {
12591257 let res = estimateGetOperation(toBase58String(i.transactionId), toBase58String(lpAssetId), amount, i.caller)
12601258 let outAmAmt = res._1
12611259 let outPrAmt = res._2
12621260 let poolStatus = parseIntValue(res._9)
12631261 let state = res._10
12641262 let checkPoolStatus = if (if (isGlobalShutdown())
12651263 then true
12661264 else (poolStatus == PoolShutdown))
12671265 then throw(("Get operation is blocked by admin. Status = " + toString(poolStatus)))
12681266 else true
12691267 if ((checkPoolStatus == checkPoolStatus))
12701268 then {
12711269 let burnLPAssetOnFactory = invoke(factoryContract, "burn", [amount], [AttachedPayment(lpAssetId, amount)])
12721270 if ((burnLPAssetOnFactory == burnLPAssetOnFactory))
12731271 then {
1274- let $t04833348414 = refreshKLpInternal(-(outAmAmt), -(outPrAmt), 0)
1275- let refreshKLpActions = $t04833348414._1
1276- let updatedKLp = $t04833348414._2
1272+ let $t04825748338 = refreshKLpInternal(-(outAmAmt), -(outPrAmt), 0)
1273+ let refreshKLpActions = $t04825748338._1
1274+ let updatedKLp = $t04825748338._2
12771275 let isUpdatedKLpValid = validateUpdatedKLp(currentKLp, updatedKLp)
12781276 if ((isUpdatedKLpValid == isUpdatedKLpValid))
12791277 then (state ++ refreshKLpActions)
12801278 else throw("Strict value is not equal to itself.")
12811279 }
12821280 else throw("Strict value is not equal to itself.")
12831281 }
12841282 else throw("Strict value is not equal to itself.")
12851283 }
12861284 else throw("Strict value is not equal to itself.")
12871285 }
12881286 else throw("Strict value is not equal to itself.")
12891287 }
12901288 else throw("Strict value is not equal to itself.")
12911289 }
12921290
12931291
12941292
12951293 @Callable(i)
12961294 func unstakeAndGetNoLess (unstakeAmount,noLessThenAmountAsset,noLessThenPriceAsset) = {
12971295 let isGetDisabled = if (isGlobalShutdown())
12981296 then true
12991297 else (cfgPoolStatus == PoolShutdown)
13001298 let checks = [if (!(isGetDisabled))
13011299 then true
13021300 else throw("get operation is blocked by admin"), if ((size(i.payments) == 0))
13031301 then true
13041302 else throw("no payments are expected")]
13051303 if ((checks == checks))
13061304 then {
13071305 let currentKLp = calcCurrentKLp(toBigInt(0), toBigInt(0), toBigInt(0))
13081306 if ((currentKLp == currentKLp))
13091307 then {
13101308 let unstakeInv = invoke(stakingContract, "unstake", [toBase58String(cfgLpAssetId), unstakeAmount], nil)
13111309 if ((unstakeInv == unstakeInv))
13121310 then {
13131311 let res = estimateGetOperation(toBase58String(i.transactionId), toBase58String(cfgLpAssetId), unstakeAmount, i.caller)
13141312 let outAmAmt = res._1
13151313 let outPrAmt = res._2
13161314 let state = res._10
13171315 let checkAmounts = [if ((outAmAmt >= noLessThenAmountAsset))
13181316 then true
13191317 else throw(makeString(["amount asset amount to receive is less than ", toString(noLessThenAmountAsset)], "")), if ((outPrAmt >= noLessThenPriceAsset))
13201318 then true
13211319 else throw(makeString(["price asset amount to receive is less than ", toString(noLessThenPriceAsset)], ""))]
13221320 if ((checkAmounts == checkAmounts))
13231321 then {
13241322 let burnLPAssetOnFactory = invoke(factoryContract, "burn", [unstakeAmount], [AttachedPayment(cfgLpAssetId, unstakeAmount)])
13251323 if ((burnLPAssetOnFactory == burnLPAssetOnFactory))
13261324 then {
1327- let $t04970949790 = refreshKLpInternal(-(outAmAmt), -(outPrAmt), 0)
1328- let refreshKLpActions = $t04970949790._1
1329- let updatedKLp = $t04970949790._2
1325+ let $t04963349714 = refreshKLpInternal(-(outAmAmt), -(outPrAmt), 0)
1326+ let refreshKLpActions = $t04963349714._1
1327+ let updatedKLp = $t04963349714._2
13301328 let isUpdatedKLpValid = validateUpdatedKLp(currentKLp, updatedKLp)
13311329 if ((isUpdatedKLpValid == isUpdatedKLpValid))
13321330 then (state ++ refreshKLpActions)
13331331 else throw("Strict value is not equal to itself.")
13341332 }
13351333 else throw("Strict value is not equal to itself.")
13361334 }
13371335 else throw("Strict value is not equal to itself.")
13381336 }
13391337 else throw("Strict value is not equal to itself.")
13401338 }
13411339 else throw("Strict value is not equal to itself.")
13421340 }
13431341 else throw("Strict value is not equal to itself.")
13441342 }
13451343
13461344
13471345
13481346 @Callable(i)
13491347 func activate (amtAssetStr,priceAssetStr) = if ((toString(i.caller) != toString(factoryContract)))
13501348 then throw("permissions denied")
13511349 else $Tuple2([StringEntry(aa(), amtAssetStr), StringEntry(pa(), priceAssetStr)], "success")
13521350
13531351
13541352
13551353 @Callable(i)
13561354 func refreshKLp () = {
13571355 let lastRefreshedBlockHeight = valueOrElse(getInteger(keyKLpRefreshedHeight), 0)
13581356 let checkLastRefreshedBlockHeight = if (((height - lastRefreshedBlockHeight) >= kLpRefreshDelay))
13591357 then unit
13601358 else throwErr(makeString([toString(kLpRefreshDelay), " blocks have not passed since the previous call"], ""))
13611359 if ((checkLastRefreshedBlockHeight == checkLastRefreshedBlockHeight))
13621360 then {
13631361 let kLp = valueOrErrorMessage(parseBigInt(valueOrElse(getString(this, keyKLp), "0")), fmtErr("invalid kLp"))
1364- let $t05097751041 = refreshKLpInternal(0, 0, 0)
1365- let kLpUpdateActions = $t05097751041._1
1366- let updatedKLp = $t05097751041._2
1362+ let $t05090150965 = refreshKLpInternal(0, 0, 0)
1363+ let kLpUpdateActions = $t05090150965._1
1364+ let updatedKLp = $t05090150965._2
13671365 let actions = if ((kLp != updatedKLp))
13681366 then kLpUpdateActions
13691367 else throwErr("nothing to refresh")
13701368 $Tuple2(actions, toString(updatedKLp))
13711369 }
13721370 else throw("Strict value is not equal to itself.")
13731371 }
13741372
13751373
13761374
13771375 @Callable(i)
13781376 func getPoolConfigWrapperREADONLY () = $Tuple2(nil, getPoolConfig())
13791377
13801378
13811379
13821380 @Callable(i)
13831381 func getAccBalanceWrapperREADONLY (assetId) = $Tuple2(nil, getAccBalance(assetId))
13841382
13851383
13861384
13871385 @Callable(i)
13881386 func calcPricesWrapperREADONLY (amAmt,prAmt,lpAmt) = {
13891387 let prices = calcPrices(amAmt, prAmt, lpAmt)
13901388 $Tuple2(nil, [toString(prices[0]), toString(prices[1]), toString(prices[2])])
13911389 }
13921390
13931391
13941392
13951393 @Callable(i)
13961394 func toX18WrapperREADONLY (origVal,origScaleMult) = $Tuple2(nil, toString(toX18(origVal, origScaleMult)))
13971395
13981396
13991397
14001398 @Callable(i)
14011399 func fromX18WrapperREADONLY (val,resultScaleMult) = $Tuple2(nil, fromX18(parseBigIntValue(val), resultScaleMult))
14021400
14031401
14041402
14051403 @Callable(i)
14061404 func calcPriceBigIntWrapperREADONLY (prAmtX18,amAmtX18) = $Tuple2(nil, toString(calcPriceBigInt(parseBigIntValue(prAmtX18), parseBigIntValue(amAmtX18))))
14071405
14081406
14091407
14101408 @Callable(i)
14111409 func estimatePutOperationWrapperREADONLY (txId58,slippageTolerance,inAmAssetAmt,inAmAssetId,inPrAssetAmt,inPrAssetId,userAddress,isEvaluate,emitLp) = $Tuple2(nil, estimatePutOperation(txId58, slippageTolerance, inAmAssetAmt, inAmAssetId, inPrAssetAmt, inPrAssetId, userAddress, isEvaluate, emitLp))
14121410
14131411
14141412
14151413 @Callable(i)
14161414 func estimateGetOperationWrapperREADONLY (txId58,pmtAssetId,pmtLpAmt,userAddress) = {
14171415 let res = estimateGetOperation(txId58, pmtAssetId, pmtLpAmt, addressFromStringValue(userAddress))
14181416 $Tuple2(nil, $Tuple10(res._1, res._2, res._3, res._4, res._5, res._6, res._7, toString(res._8), res._9, res._10))
14191417 }
14201418
14211419
14221420
14231421 @Callable(i)
14241422 func statsREADONLY () = {
14251423 let cfg = getPoolConfig()
14261424 let lpAssetId = fromBase58String(cfg[idxPoolLPAssetId])
14271425 let amtAssetId = cfg[idxAmtAssetId]
14281426 let priceAssetId = cfg[idxPriceAssetId]
14291427 let iAmtAssetId = cfg[idxIAmtAssetId]
14301428 let iPriceAssetId = cfg[idxIPriceAssetId]
14311429 let amtAssetDcm = parseIntValue(cfg[idxAmtAssetDcm])
14321430 let priceAssetDcm = parseIntValue(cfg[idxPriceAssetDcm])
14331431 let poolLPBalance = valueOrErrorMessage(assetInfo(lpAssetId), (("Asset " + toBase58String(lpAssetId)) + " doesn't exist")).quantity
14341432 let accAmtAssetBalance = getAccBalance(amtAssetId)
14351433 let accPriceAssetBalance = getAccBalance(priceAssetId)
14361434 let pricesList = if ((poolLPBalance == 0))
14371435 then [zeroBigInt, zeroBigInt, zeroBigInt]
14381436 else calcPrices(accAmtAssetBalance, accPriceAssetBalance, poolLPBalance)
14391437 let curPrice = 0
14401438 let lpAmtAssetShare = fromX18(pricesList[1], scale8)
14411439 let lpPriceAssetShare = fromX18(pricesList[2], scale8)
14421440 let poolWeight = value(getInteger(factoryContract, keyPoolWeight(toString(this))))
14431441 $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))
14441442 }
14451443
14461444
14471445
14481446 @Callable(i)
14491447 func evaluatePutByAmountAssetREADONLY (inAmAssetAmt) = {
14501448 let cfg = getPoolConfig()
14511449 let lpAssetId = fromBase58String(cfg[idxPoolLPAssetId])
14521450 let amAssetIdStr = cfg[idxAmtAssetId]
14531451 let amAssetId = fromBase58String(amAssetIdStr)
14541452 let prAssetIdStr = cfg[idxPriceAssetId]
14551453 let prAssetId = fromBase58String(prAssetIdStr)
14561454 let amtAssetDcm = parseIntValue(cfg[idxAmtAssetDcm])
14571455 let priceAssetDcm = parseIntValue(cfg[idxPriceAssetDcm])
14581456 let poolStatus = cfg[idxPoolStatus]
14591457 let poolLPBalance = valueOrErrorMessage(assetInfo(lpAssetId), (("Asset " + toBase58String(lpAssetId)) + " doesn't exist")).quantity
14601458 let accAmtAssetBalance = getAccBalance(amAssetIdStr)
14611459 let accPriceAssetBalance = getAccBalance(prAssetIdStr)
14621460 let amtAssetAmtX18 = toX18(accAmtAssetBalance, amtAssetDcm)
14631461 let priceAssetAmtX18 = toX18(accPriceAssetBalance, priceAssetDcm)
14641462 let curPriceX18 = if ((poolLPBalance == 0))
14651463 then zeroBigInt
14661464 else calcPriceBigInt(priceAssetAmtX18, amtAssetAmtX18)
14671465 let inAmAssetAmtX18 = toX18(inAmAssetAmt, amtAssetDcm)
14681466 let inPrAssetAmtX18 = fraction(inAmAssetAmtX18, curPriceX18, scale18)
14691467 let inPrAssetAmt = fromX18(inPrAssetAmtX18, priceAssetDcm)
14701468 let estPut = estimatePutOperation("", 500000, inAmAssetAmt, amAssetId, inPrAssetAmt, prAssetId, "", true, false)
14711469 let calcLpAmt = estPut._1
14721470 let curPriceCalc = estPut._3
14731471 let amBalance = estPut._4
14741472 let prBalance = estPut._5
14751473 let lpEmission = estPut._6
14761474 $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))
14771475 }
14781476
14791477
14801478
14811479 @Callable(i)
14821480 func evaluatePutByPriceAssetREADONLY (inPrAssetAmt) = {
14831481 let cfg = getPoolConfig()
14841482 let lpAssetId = fromBase58String(cfg[idxPoolLPAssetId])
14851483 let amAssetIdStr = cfg[idxAmtAssetId]
14861484 let amAssetId = fromBase58String(amAssetIdStr)
14871485 let prAssetIdStr = cfg[idxPriceAssetId]
14881486 let prAssetId = fromBase58String(prAssetIdStr)
14891487 let amtAssetDcm = parseIntValue(cfg[idxAmtAssetDcm])
14901488 let priceAssetDcm = parseIntValue(cfg[idxPriceAssetDcm])
14911489 let poolStatus = cfg[idxPoolStatus]
14921490 let poolLPBalance = valueOrErrorMessage(assetInfo(lpAssetId), (("Asset " + toBase58String(lpAssetId)) + " doesn't exist")).quantity
14931491 let amBalanceRaw = getAccBalance(amAssetIdStr)
14941492 let prBalanceRaw = getAccBalance(prAssetIdStr)
14951493 let amBalanceRawX18 = toX18(amBalanceRaw, amtAssetDcm)
14961494 let prBalanceRawX18 = toX18(prBalanceRaw, priceAssetDcm)
14971495 let curPriceX18 = if ((poolLPBalance == 0))
14981496 then zeroBigInt
14991497 else calcPriceBigInt(prBalanceRawX18, amBalanceRawX18)
15001498 let inPrAssetAmtX18 = toX18(inPrAssetAmt, priceAssetDcm)
15011499 let inAmAssetAmtX18 = fraction(inPrAssetAmtX18, scale18, curPriceX18)
15021500 let inAmAssetAmt = fromX18(inAmAssetAmtX18, amtAssetDcm)
15031501 let estPut = estimatePutOperation("", 500000, inAmAssetAmt, amAssetId, inPrAssetAmt, prAssetId, "", true, false)
15041502 let calcLpAmt = estPut._1
15051503 let curPriceCalc = estPut._3
15061504 let amBalance = estPut._4
15071505 let prBalance = estPut._5
15081506 let lpEmission = estPut._6
15091507 $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))
15101508 }
15111509
15121510
15131511
15141512 @Callable(i)
15151513 func evaluateGetREADONLY (paymentLpAssetId,paymentLpAmt) = {
15161514 let res = estimateGetOperation("", paymentLpAssetId, paymentLpAmt, this)
15171515 let outAmAmt = res._1
15181516 let outPrAmt = res._2
15191517 let amBalance = res._5
15201518 let prBalance = res._6
15211519 let lpEmission = res._7
15221520 let curPrice = res._8
15231521 let poolStatus = parseIntValue(res._9)
15241522 $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))
15251523 }
15261524
15271525
15281526 @Verifier(tx)
15291527 func verify () = {
15301528 let targetPublicKey = match managerPublicKeyOrUnit() {
15311529 case pk: ByteVector =>
15321530 pk
15331531 case _: Unit =>
15341532 tx.senderPublicKey
15351533 case _ =>
15361534 throw("Match error")
15371535 }
15381536 match tx {
15391537 case order: Order =>
15401538 let matcherPub = getMatcherPubOrFail()
1541- let $t05970359772 = validateMatcherOrderAllowed(order)
1542- let orderValid = $t05970359772._1
1543- let orderValidInfo = $t05970359772._2
1539+ let $t05962759696 = validateMatcherOrderAllowed(order)
1540+ let orderValid = $t05962759696._1
1541+ let orderValidInfo = $t05962759696._2
15441542 let senderValid = sigVerify(order.bodyBytes, order.proofs[0], order.senderPublicKey)
15451543 let matcherValid = sigVerify(order.bodyBytes, order.proofs[1], matcherPub)
15461544 if (if (if (orderValid)
15471545 then senderValid
15481546 else false)
15491547 then matcherValid
15501548 else false)
15511549 then true
15521550 else throwOrderError(orderValid, orderValidInfo, senderValid, matcherValid)
15531551 case s: SetScriptTransaction =>
15541552 if (sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey))
15551553 then true
15561554 else {
15571555 let newHash = blake2b256(value(s.script))
15581556 let allowedHash = fromBase64String(value(getString(factoryContract, keyAllowedLpScriptHash())))
15591557 let currentHash = scriptHash(this)
15601558 if ((allowedHash == newHash))
15611559 then (currentHash != newHash)
15621560 else false
15631561 }
15641562 case _ =>
15651563 sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey)
15661564 }
15671565 }
15681566

github/deemru/w8io/026f985 
194.39 ms