tx · HbZDEp6yURjrQXz3V6U86Df1ASatxwh4XVWYGsFCCUzB

3MsdLkCCcsf1niGwjyQCMi8aC4CkNbm2Wy9:  -0.03800000 Waves

2023.02.13 12:08 [2447636] smart account 3MsdLkCCcsf1niGwjyQCMi8aC4CkNbm2Wy9 > SELF 0.00000000 Waves

{ "type": 13, "id": "HbZDEp6yURjrQXz3V6U86Df1ASatxwh4XVWYGsFCCUzB", "fee": 3800000, "feeAssetId": null, "timestamp": 1676279306988, "version": 2, "chainId": 84, "sender": "3MsdLkCCcsf1niGwjyQCMi8aC4CkNbm2Wy9", "senderPublicKey": "B4L9D9LnFwCPW8fFVc65SHyFNYjb1KJv6MUQXPGMPSTy", "proofs": [ "5sWcYG5wM8wSBWMxRJjQfrKZicGZRcx98pHhtR58XP3tm1E1GFCWyWmLWxoJvkeuA2W4SGj5TQeMbfE36Y6ekE4U" ], "script": "base64:BgLRLwgCEgQKAgEEEgYKBAEEAQgSAwoBCBIAEgQKAgEEEgMKAQESBAoCAQQSBAoCCAESBAoCCAESBAoCCAESBQoDAQgBEgASBAoCAQESAwoBARIFCgMBAQESBAoCCAgSABIAEgMKAQgSBQoDAQEBEgQKAgEBEgQKAggBEgQKAggIEgsKCQgBAQIBAggEBBIGCgQICAEIEgASAwoBARIDCgEBEgQKAggBIgpsUGRlY2ltYWxzIgZzY2FsZTgiDHNjYWxlOEJpZ0ludCIHc2NhbGUxOCIKemVyb0JpZ0ludCIEYmlnMCIEYmlnMSIEYmlnMiILd2F2ZXNTdHJpbmciA1NFUCIKUG9vbEFjdGl2ZSIPUG9vbFB1dERpc2FibGVkIhNQb29sTWF0Y2hlckRpc2FibGVkIgxQb29sU2h1dGRvd24iDmlkeFBvb2xBZGRyZXNzIg1pZHhQb29sU3RhdHVzIhBpZHhQb29sTFBBc3NldElkIg1pZHhBbXRBc3NldElkIg9pZHhQcmljZUFzc2V0SWQiDmlkeEFtdEFzc2V0RGNtIhBpZHhQcmljZUFzc2V0RGNtIg5pZHhJQ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MDBQJhRAUCYUYHBQJhRwcGCQECYUMEBQJhRAUCYUUFAmFGBQJhRwMJAAECBQJkVwIUU2V0U2NyaXB0VHJhbnNhY3Rpb24EAmZhBQJkVwMJAPQDAwgFAmdZCWJvZHlCeXRlcwkAkQMCCAUCZ1kGcHJvb2ZzAAAFAmhhBgQCaGQJAPYDAQkBBXZhbHVlAQgFAmZhBnNjcmlwdAQCaGUJANsEAQkBBXZhbHVlAQkAnQgCBQJhTwkBAmFBAAQCaGYJAPEHAQUEdGhpcwMJAAACBQJoZQUCaGQJAQIhPQIFAmhmBQJoZAcJAPQDAwgFAmdZCWJvZHlCeXRlcwkAkQMCCAUCZ1kGcHJvb2ZzAAAFAmhhZQflqw==", "height": 2447636, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 66BizL5su8Nr8HVbAPYxXrNzo5BV6ZUmKLnojz6nHwQx Next: 8viHTJwX32AWMHUSYaSxeZ7FiqXTPiaXMLrmAYfPsup2 Diff:
OldNewDifferences
695695
696696 @Callable(i)
697697 func calculateAmountOutForSwapREADONLY (cleanAmountIn,isReverse) = {
698- let $t03195532260 = if ((isReverse == false))
698+ let $t03195732262 = if ((isReverse == false))
699699 then {
700700 let assetOut = getStringOrFail(this, pa())
701701 let assetIn = getStringOrFail(this, aa())
706706 let assetIn = getStringOrFail(this, pa())
707707 $Tuple2(assetOut, assetIn)
708708 }
709- let assetOut = $t03195532260._1
710- let assetIn = $t03195532260._2
709+ let assetOut = $t03195732262._1
710+ let assetIn = $t03195732262._2
711711 let poolAssetInBalance = getAccBalance(assetIn)
712712 let poolAssetOutBalance = getAccBalance(assetOut)
713713 let amountOut = fraction(poolAssetOutBalance, cleanAmountIn, (poolAssetInBalance + cleanAmountIn))
848848 else throw("Strict value is not equal to itself.")
849849 }
850850 else [ScriptTransfer(i.caller, emitLpAmt, lpAssetId)]
851- let $t03706937531 = refreshKLpInternal(0, 0, 0)
852- if (($t03706937531 == $t03706937531))
851+ let $t03707137533 = refreshKLpInternal(0, 0, 0)
852+ if (($t03707137533 == $t03707137533))
853853 then {
854- let updatedKLp = $t03706937531._2
855- let refreshKLpActions = $t03706937531._1
854+ let updatedKLp = $t03707137533._2
855+ let refreshKLpActions = $t03707137533._1
856856 let isUpdatedKLpValid = validateUpdatedKLp(currentKLp, updatedKLp)
857857 if ((isUpdatedKLpValid == isUpdatedKLpValid))
858858 then ((state ++ lpTransfer) ++ refreshKLpActions)
884884 let currentKLp = calcCurrentKLp(amAssetPmt, prAssetPmt, toBigInt(0))
885885 if ((currentKLp == currentKLp))
886886 then {
887- let $t03809338158 = refreshKLpInternal(0, 0, 0)
888- let refreshKLpActions = $t03809338158._1
889- let updatedKLp = $t03809338158._2
887+ let $t03809538160 = refreshKLpInternal(0, 0, 0)
888+ let refreshKLpActions = $t03809538160._1
889+ let updatedKLp = $t03809538160._2
890890 let isUpdatedKLpValid = validateUpdatedKLp(currentKLp, updatedKLp)
891891 if ((isUpdatedKLpValid == isUpdatedKLpValid))
892892 then (state ++ refreshKLpActions)
933933 then {
934934 let userAddress = i.caller
935935 let txId = i.transactionId
936- let $t03934639498 = calcPutOneToken(paymentAmountRaw, paymentAssetId, userAddress, txId)
937- if (($t03934639498 == $t03934639498))
936+ let $t03934839500 = calcPutOneToken(paymentAmountRaw, paymentAssetId, userAddress, txId)
937+ if (($t03934839500 == $t03934839500))
938938 then {
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
939+ let paymentInAmountAsset = $t03934839500._5
940+ let bonus = $t03934839500._4
941+ let feeAmount = $t03934839500._3
942+ let commonState = $t03934839500._2
943+ let emitAmountEstimated = $t03934839500._1
944944 let emitAmount = if (if ((minOutAmount > 0))
945945 then (minOutAmount > emitAmountEstimated)
946946 else false)
960960 let sendFee = if ((feeAmount > 0))
961961 then [ScriptTransfer(feeCollectorAddress, feeAmount, paymentAssetId)]
962962 else nil
963- let $t04008440281 = if ((this == feeCollectorAddress))
963+ let $t04008640283 = if ((this == feeCollectorAddress))
964964 then $Tuple2(0, 0)
965965 else if (paymentInAmountAsset)
966966 then $Tuple2(-(feeAmount), 0)
967967 else $Tuple2(0, -(feeAmount))
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
968+ let amountAssetBalanceDelta = $t04008640283._1
969+ let priceAssetBalanceDelta = $t04008640283._2
970+ let $t04028640394 = refreshKLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
971+ let refreshKLpActions = $t04028640394._1
972+ let updatedKLp = $t04028640394._2
973973 let kLp = value(getString(keyKLp))
974974 let isUpdatedKLpValid = validateUpdatedKLp(currentKLp, updatedKLp)
975975 if ((isUpdatedKLpValid == isUpdatedKLpValid))
989989
990990 @Callable(i)
991991 func putOneTknREADONLY (paymentAssetId,paymentAmountRaw) = {
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
992+ let $t04070040857 = calcPutOneToken(paymentAmountRaw, parseAssetId(paymentAssetId), unit, unit)
993+ let emitAmountEstimated = $t04070040857._1
994+ let commonState = $t04070040857._2
995+ let feeAmount = $t04070040857._3
996+ let bonus = $t04070040857._4
997+ let paymentInAmountAsset = $t04070040857._5
998998 $Tuple2(nil, $Tuple3(emitAmountEstimated, feeAmount, bonus))
999999 }
10001000
10311031 then {
10321032 let userAddress = i.caller
10331033 let txId = i.transactionId
1034- let $t04174041893 = calcGetOneToken(outAssetId, paymentAmount, paymentAssetId, userAddress, txId)
1035- if (($t04174041893 == $t04174041893))
1034+ let $t04174241895 = calcGetOneToken(outAssetId, paymentAmount, paymentAssetId, userAddress, txId)
1035+ if (($t04174241895 == $t04174241895))
10361036 then {
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
1037+ let outInAmountAsset = $t04174241895._5
1038+ let bonus = $t04174241895._4
1039+ let feeAmount = $t04174241895._3
1040+ let commonState = $t04174241895._2
1041+ let amountEstimated = $t04174241895._1
10421042 let amount = if (if ((minOutAmount > 0))
10431043 then (minOutAmount > amountEstimated)
10441044 else false)
10511051 let sendFee = if ((feeAmount > 0))
10521052 then [ScriptTransfer(feeCollectorAddress, feeAmount, outAssetId)]
10531053 else nil
1054- let $t04239342640 = {
1054+ let $t04239542642 = {
10551055 let feeAmountForCalc = if ((this == feeCollectorAddress))
10561056 then 0
10571057 else feeAmount
10591059 then $Tuple2(-((amount + feeAmountForCalc)), 0)
10601060 else $Tuple2(0, -((amount + feeAmountForCalc)))
10611061 }
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
1062+ let amountAssetBalanceDelta = $t04239542642._1
1063+ let priceAssetBalanceDelta = $t04239542642._2
1064+ let $t04264542753 = refreshKLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
1065+ let refreshKLpActions = $t04264542753._1
1066+ let updatedKLp = $t04264542753._2
10671067 let isUpdatedKLpValid = validateUpdatedKLp(currentKLp, updatedKLp)
10681068 if ((isUpdatedKLpValid == isUpdatedKLpValid))
10691069 then $Tuple2((((commonState ++ assetTransfer) ++ sendFee) ++ refreshKLpActions), amount)
10821082
10831083 @Callable(i)
10841084 func getOneTknREADONLY (outAssetId,paymentAmount) = {
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
1085+ let $t04301043166 = calcGetOneToken(parseAssetId(outAssetId), paymentAmount, cfgLpAssetId, unit, unit)
1086+ let amountEstimated = $t04301043166._1
1087+ let commonState = $t04301043166._2
1088+ let feeAmount = $t04301043166._3
1089+ let bonus = $t04301043166._4
1090+ let outInAmountAsset = $t04301043166._5
10911091 $Tuple2(nil, $Tuple3(amountEstimated, feeAmount, bonus))
10921092 }
10931093
11241124 let unstakeInv = invoke(stakingContract, "unstake", [toBase58String(cfgLpAssetId), unstakeAmount], nil)
11251125 if ((unstakeInv == unstakeInv))
11261126 then {
1127- let $t04406944220 = calcGetOneToken(outAssetId, unstakeAmount, cfgLpAssetId, userAddress, txId)
1128- if (($t04406944220 == $t04406944220))
1127+ let $t04407144222 = calcGetOneToken(outAssetId, unstakeAmount, cfgLpAssetId, userAddress, txId)
1128+ if (($t04407144222 == $t04407144222))
11291129 then {
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
1130+ let outInAmountAsset = $t04407144222._5
1131+ let bonus = $t04407144222._4
1132+ let feeAmount = $t04407144222._3
1133+ let commonState = $t04407144222._2
1134+ let amountEstimated = $t04407144222._1
11351135 let amount = if (if ((minOutAmount > 0))
11361136 then (minOutAmount > amountEstimated)
11371137 else false)
11441144 let sendFee = if ((feeAmount > 0))
11451145 then [ScriptTransfer(feeCollectorAddress, feeAmount, outAssetId)]
11461146 else nil
1147- let $t04471544962 = {
1147+ let $t04471744964 = {
11481148 let feeAmountForCalc = if ((this == feeCollectorAddress))
11491149 then 0
11501150 else feeAmount
11521152 then $Tuple2(-((amount + feeAmountForCalc)), 0)
11531153 else $Tuple2(0, -((amount + feeAmountForCalc)))
11541154 }
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
1155+ let amountAssetBalanceDelta = $t04471744964._1
1156+ let priceAssetBalanceDelta = $t04471744964._2
1157+ let $t04496745075 = refreshKLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
1158+ let refreshKLpActions = $t04496745075._1
1159+ let updatedKLp = $t04496745075._2
11601160 let isUpdatedKLpValid = validateUpdatedKLp(currentKLp, updatedKLp)
11611161 if ((isUpdatedKLpValid == isUpdatedKLpValid))
11621162 then $Tuple2((((commonState ++ assetTransfer) ++ sendFee) ++ refreshKLpActions), amount)
11891189 let burnLPAssetOnFactory = invoke(factoryContract, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
11901190 if ((burnLPAssetOnFactory == burnLPAssetOnFactory))
11911191 then {
1192- let $t04601946101 = refreshKLpInternal(-(outAmtAmt), -(outPrAmt), 0)
1193- let refreshKLpActions = $t04601946101._1
1194- let updatedKLp = $t04601946101._2
1192+ let $t04602146103 = refreshKLpInternal(-(outAmtAmt), -(outPrAmt), 0)
1193+ let refreshKLpActions = $t04602146103._1
1194+ let updatedKLp = $t04602146103._2
11951195 let isUpdatedKLpValid = validateUpdatedKLp(currentKLp, updatedKLp)
11961196 if ((isUpdatedKLpValid == isUpdatedKLpValid))
11971197 then (state ++ refreshKLpActions)
12231223 let burnLPAssetOnFactory = invoke(factoryContract, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
12241224 if ((burnLPAssetOnFactory == burnLPAssetOnFactory))
12251225 then {
1226- let $t04705047131 = refreshKLpInternal(-(outAmAmt), -(outPrAmt), 0)
1227- let refreshKLpActions = $t04705047131._1
1228- let updatedKLp = $t04705047131._2
1226+ let $t04705247133 = refreshKLpInternal(-(outAmAmt), -(outPrAmt), 0)
1227+ let refreshKLpActions = $t04705247133._1
1228+ let updatedKLp = $t04705247133._2
12291229 let isUpdatedKLpValid = validateUpdatedKLp(currentKLp, updatedKLp)
12301230 if ((isUpdatedKLpValid == isUpdatedKLpValid))
12311231 then (state ++ refreshKLpActions)
12691269 let burnLPAssetOnFactory = invoke(factoryContract, "burn", [amount], [AttachedPayment(lpAssetId, amount)])
12701270 if ((burnLPAssetOnFactory == burnLPAssetOnFactory))
12711271 then {
1272- let $t04825748338 = refreshKLpInternal(-(outAmAmt), -(outPrAmt), 0)
1273- let refreshKLpActions = $t04825748338._1
1274- let updatedKLp = $t04825748338._2
1272+ let $t04825948340 = refreshKLpInternal(-(outAmAmt), -(outPrAmt), 0)
1273+ let refreshKLpActions = $t04825948340._1
1274+ let updatedKLp = $t04825948340._2
12751275 let isUpdatedKLpValid = validateUpdatedKLp(currentKLp, updatedKLp)
12761276 if ((isUpdatedKLpValid == isUpdatedKLpValid))
12771277 then (state ++ refreshKLpActions)
13221322 let burnLPAssetOnFactory = invoke(factoryContract, "burn", [unstakeAmount], [AttachedPayment(cfgLpAssetId, unstakeAmount)])
13231323 if ((burnLPAssetOnFactory == burnLPAssetOnFactory))
13241324 then {
1325- let $t04963349714 = refreshKLpInternal(-(outAmAmt), -(outPrAmt), 0)
1326- let refreshKLpActions = $t04963349714._1
1327- let updatedKLp = $t04963349714._2
1325+ let $t04963549716 = refreshKLpInternal(-(outAmAmt), -(outPrAmt), 0)
1326+ let refreshKLpActions = $t04963549716._1
1327+ let updatedKLp = $t04963549716._2
13281328 let isUpdatedKLpValid = validateUpdatedKLp(currentKLp, updatedKLp)
13291329 if ((isUpdatedKLpValid == isUpdatedKLpValid))
13301330 then (state ++ refreshKLpActions)
13591359 if ((checkLastRefreshedBlockHeight == checkLastRefreshedBlockHeight))
13601360 then {
13611361 let kLp = valueOrErrorMessage(parseBigInt(valueOrElse(getString(this, keyKLp), "0")), fmtErr("invalid kLp"))
1362- let $t05090150965 = refreshKLpInternal(0, 0, 0)
1363- let kLpUpdateActions = $t05090150965._1
1364- let updatedKLp = $t05090150965._2
1362+ let $t05090350967 = refreshKLpInternal(0, 0, 0)
1363+ let kLpUpdateActions = $t05090350967._1
1364+ let updatedKLp = $t05090350967._2
13651365 let actions = if ((kLp != updatedKLp))
13661366 then kLpUpdateActions
13671367 else throwErr("nothing to refresh")
15361536 match tx {
15371537 case order: Order =>
15381538 let matcherPub = getMatcherPubOrFail()
1539- let $t05962759696 = validateMatcherOrderAllowed(order)
1540- let orderValid = $t05962759696._1
1541- let orderValidInfo = $t05962759696._2
1539+ let $t05962959698 = validateMatcherOrderAllowed(order)
1540+ let orderValid = $t05962959698._1
1541+ let orderValidInfo = $t05962959698._2
15421542 let senderValid = sigVerify(order.bodyBytes, order.proofs[0], order.senderPublicKey)
15431543 let matcherValid = sigVerify(order.bodyBytes, order.proofs[1], matcherPub)
15441544 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) = {
698- let $t03195532260 = if ((isReverse == false))
698+ let $t03195732262 = 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 }
709- let assetOut = $t03195532260._1
710- let assetIn = $t03195532260._2
709+ let assetOut = $t03195732262._1
710+ let assetIn = $t03195732262._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])
742742 let assetIn = assetIdToString(pmt.assetId)
743743 let assetOut = if ((isReverse == false))
744744 then getStringOrFail(this, pa())
745745 else getStringOrFail(this, aa())
746746 let poolAssetInBalance = (getAccBalance(assetIn) - value(i.payments[0]).amount)
747747 let poolAssetOutBalance = getAccBalance(assetOut)
748748 let amountOut = fraction(poolAssetOutBalance, cleanAmountIn, (poolAssetInBalance + cleanAmountIn))
749749 let oldK = (toBigInt(poolAssetInBalance) * toBigInt(poolAssetOutBalance))
750750 let newK = (toBigInt(getAccBalance(assetIn)) * (toBigInt(getAccBalance(assetOut)) - toBigInt(amountOut)))
751751 let checkK = if ((newK >= oldK))
752752 then true
753753 else throw("new K is fewer error")
754754 if ((checkK == checkK))
755755 then {
756756 let checkMin = if ((amountOut >= amountOutMin))
757757 then true
758758 else throw("Exchange result is fewer coins than expected")
759759 if ((checkMin == checkMin))
760760 then $Tuple2([ScriptTransfer(addressFromStringValue(addressTo), amountOut, parseAssetId(assetOut))], amountOut)
761761 else throw("Strict value is not equal to itself.")
762762 }
763763 else throw("Strict value is not equal to itself.")
764764 }
765765 else throw("Strict value is not equal to itself.")
766766 }
767767
768768
769769
770770 @Callable(i)
771771 func setManager (pendingManagerPublicKey) = {
772772 let checkCaller = mustManager(i)
773773 if ((checkCaller == checkCaller))
774774 then {
775775 let checkManagerPublicKey = fromBase58String(pendingManagerPublicKey)
776776 if ((checkManagerPublicKey == checkManagerPublicKey))
777777 then [StringEntry(pmpk(), pendingManagerPublicKey)]
778778 else throw("Strict value is not equal to itself.")
779779 }
780780 else throw("Strict value is not equal to itself.")
781781 }
782782
783783
784784
785785 @Callable(i)
786786 func confirmManager () = {
787787 let pm = pendingManagerPublicKeyOrUnit()
788788 let hasPM = if (isDefined(pm))
789789 then true
790790 else throw("No pending manager")
791791 if ((hasPM == hasPM))
792792 then {
793793 let checkPM = if ((i.callerPublicKey == value(pm)))
794794 then true
795795 else throw("You are not pending manager")
796796 if ((checkPM == checkPM))
797797 then [StringEntry(mpk(), toBase58String(value(pm))), DeleteEntry(pmpk())]
798798 else throw("Strict value is not equal to itself.")
799799 }
800800 else throw("Strict value is not equal to itself.")
801801 }
802802
803803
804804
805805 @Callable(i)
806806 func put (slippageTolerance,shouldAutoStake) = if ((0 > slippageTolerance))
807807 then throw("Invalid slippageTolerance passed")
808808 else {
809809 let estPut = commonPut(i, slippageTolerance, true)
810810 let emitLpAmt = estPut._2
811811 let lpAssetId = estPut._7
812812 let state = estPut._9
813813 let amDiff = estPut._10
814814 let prDiff = estPut._11
815815 let amId = estPut._12
816816 let prId = estPut._13
817817 let amAssetPmt = toBigInt(value(i.payments[0]).amount)
818818 let prAssetPmt = toBigInt(value(i.payments[1]).amount)
819819 let currentKLp = calcCurrentKLp(amAssetPmt, prAssetPmt, toBigInt(0))
820820 if ((currentKLp == currentKLp))
821821 then {
822822 let emitInv = invoke(factoryContract, "emit", [emitLpAmt], nil)
823823 if ((emitInv == emitInv))
824824 then {
825825 let emitInvLegacy = match emitInv {
826826 case legacyFactoryContract: Address =>
827827 invoke(legacyFactoryContract, "emit", [emitLpAmt], nil)
828828 case _ =>
829829 unit
830830 }
831831 if ((emitInvLegacy == emitInvLegacy))
832832 then {
833833 let slippageAInv = if ((amDiff > 0))
834834 then invoke(slippageContract, "put", nil, [AttachedPayment(amId, amDiff)])
835835 else nil
836836 if ((slippageAInv == slippageAInv))
837837 then {
838838 let slippagePInv = if ((prDiff > 0))
839839 then invoke(slippageContract, "put", nil, [AttachedPayment(prId, prDiff)])
840840 else nil
841841 if ((slippagePInv == slippagePInv))
842842 then {
843843 let lpTransfer = if (shouldAutoStake)
844844 then {
845845 let slpStakeInv = invoke(stakingContract, "stake", nil, [AttachedPayment(lpAssetId, emitLpAmt)])
846846 if ((slpStakeInv == slpStakeInv))
847847 then nil
848848 else throw("Strict value is not equal to itself.")
849849 }
850850 else [ScriptTransfer(i.caller, emitLpAmt, lpAssetId)]
851- let $t03706937531 = refreshKLpInternal(0, 0, 0)
852- if (($t03706937531 == $t03706937531))
851+ let $t03707137533 = refreshKLpInternal(0, 0, 0)
852+ if (($t03707137533 == $t03707137533))
853853 then {
854- let updatedKLp = $t03706937531._2
855- let refreshKLpActions = $t03706937531._1
854+ let updatedKLp = $t03707137533._2
855+ let refreshKLpActions = $t03707137533._1
856856 let isUpdatedKLpValid = validateUpdatedKLp(currentKLp, updatedKLp)
857857 if ((isUpdatedKLpValid == isUpdatedKLpValid))
858858 then ((state ++ lpTransfer) ++ refreshKLpActions)
859859 else throw("Strict value is not equal to itself.")
860860 }
861861 else throw("Strict value is not equal to itself.")
862862 }
863863 else throw("Strict value is not equal to itself.")
864864 }
865865 else throw("Strict value is not equal to itself.")
866866 }
867867 else throw("Strict value is not equal to itself.")
868868 }
869869 else throw("Strict value is not equal to itself.")
870870 }
871871 else throw("Strict value is not equal to itself.")
872872 }
873873
874874
875875
876876 @Callable(i)
877877 func putForFree (maxSlippage) = if ((0 > maxSlippage))
878878 then throw("Invalid value passed")
879879 else {
880880 let estPut = commonPut(i, maxSlippage, false)
881881 let state = estPut._9
882882 let amAssetPmt = toBigInt(value(i.payments[0]).amount)
883883 let prAssetPmt = toBigInt(value(i.payments[1]).amount)
884884 let currentKLp = calcCurrentKLp(amAssetPmt, prAssetPmt, toBigInt(0))
885885 if ((currentKLp == currentKLp))
886886 then {
887- let $t03809338158 = refreshKLpInternal(0, 0, 0)
888- let refreshKLpActions = $t03809338158._1
889- let updatedKLp = $t03809338158._2
887+ let $t03809538160 = refreshKLpInternal(0, 0, 0)
888+ let refreshKLpActions = $t03809538160._1
889+ let updatedKLp = $t03809538160._2
890890 let isUpdatedKLpValid = validateUpdatedKLp(currentKLp, updatedKLp)
891891 if ((isUpdatedKLpValid == isUpdatedKLpValid))
892892 then (state ++ refreshKLpActions)
893893 else throw("Strict value is not equal to itself.")
894894 }
895895 else throw("Strict value is not equal to itself.")
896896 }
897897
898898
899899
900900 @Callable(i)
901901 func putOneTkn (minOutAmount,autoStake) = {
902902 let isPoolOneTokenOperationsDisabled = {
903903 let @ = invoke(factoryContract, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
904904 if ($isInstanceOf(@, "Boolean"))
905905 then @
906906 else throw(($getType(@) + " couldn't be cast to Boolean"))
907907 }
908908 let isPutDisabled = if (if (if (isGlobalShutdown())
909909 then true
910910 else (cfgPoolStatus == PoolPutDisabled))
911911 then true
912912 else (cfgPoolStatus == PoolShutdown))
913913 then true
914914 else isPoolOneTokenOperationsDisabled
915915 let checks = [if (if (!(isPutDisabled))
916916 then true
917917 else isManager(i))
918918 then true
919919 else throwErr("put operation is blocked by admin"), if ((size(i.payments) == 1))
920920 then true
921921 else throwErr("exactly 1 payment are expected")]
922922 if ((checks == checks))
923923 then {
924924 let payment = i.payments[0]
925925 let paymentAssetId = payment.assetId
926926 let paymentAmountRaw = payment.amount
927927 let currentKLp = if ((paymentAssetId == cfgAmountAssetId))
928928 then calcCurrentKLp(toBigInt(paymentAmountRaw), toBigInt(0), toBigInt(0))
929929 else if ((paymentAssetId == cfgPriceAssetId))
930930 then calcCurrentKLp(toBigInt(0), toBigInt(paymentAmountRaw), toBigInt(0))
931931 else throwErr("payment asset is not supported")
932932 if ((currentKLp == currentKLp))
933933 then {
934934 let userAddress = i.caller
935935 let txId = i.transactionId
936- let $t03934639498 = calcPutOneToken(paymentAmountRaw, paymentAssetId, userAddress, txId)
937- if (($t03934639498 == $t03934639498))
936+ let $t03934839500 = calcPutOneToken(paymentAmountRaw, paymentAssetId, userAddress, txId)
937+ if (($t03934839500 == $t03934839500))
938938 then {
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
939+ let paymentInAmountAsset = $t03934839500._5
940+ let bonus = $t03934839500._4
941+ let feeAmount = $t03934839500._3
942+ let commonState = $t03934839500._2
943+ let emitAmountEstimated = $t03934839500._1
944944 let emitAmount = if (if ((minOutAmount > 0))
945945 then (minOutAmount > emitAmountEstimated)
946946 else false)
947947 then throwErr(makeString(["amount to receive is less than ", toString(minOutAmount)], ""))
948948 else emitAmountEstimated
949949 let emitInv = emit(emitAmount)
950950 if ((emitInv == emitInv))
951951 then {
952952 let lpTransfer = if (autoStake)
953953 then {
954954 let stakeInv = invoke(stakingContract, "stake", nil, [AttachedPayment(cfgLpAssetId, emitAmount)])
955955 if ((stakeInv == stakeInv))
956956 then nil
957957 else throw("Strict value is not equal to itself.")
958958 }
959959 else [ScriptTransfer(i.caller, emitAmount, cfgLpAssetId)]
960960 let sendFee = if ((feeAmount > 0))
961961 then [ScriptTransfer(feeCollectorAddress, feeAmount, paymentAssetId)]
962962 else nil
963- let $t04008440281 = if ((this == feeCollectorAddress))
963+ let $t04008640283 = if ((this == feeCollectorAddress))
964964 then $Tuple2(0, 0)
965965 else if (paymentInAmountAsset)
966966 then $Tuple2(-(feeAmount), 0)
967967 else $Tuple2(0, -(feeAmount))
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
968+ let amountAssetBalanceDelta = $t04008640283._1
969+ let priceAssetBalanceDelta = $t04008640283._2
970+ let $t04028640394 = refreshKLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
971+ let refreshKLpActions = $t04028640394._1
972+ let updatedKLp = $t04028640394._2
973973 let kLp = value(getString(keyKLp))
974974 let isUpdatedKLpValid = validateUpdatedKLp(currentKLp, updatedKLp)
975975 if ((isUpdatedKLpValid == isUpdatedKLpValid))
976976 then $Tuple2((((commonState ++ lpTransfer) ++ sendFee) ++ refreshKLpActions), emitAmount)
977977 else throw("Strict value is not equal to itself.")
978978 }
979979 else throw("Strict value is not equal to itself.")
980980 }
981981 else throw("Strict value is not equal to itself.")
982982 }
983983 else throw("Strict value is not equal to itself.")
984984 }
985985 else throw("Strict value is not equal to itself.")
986986 }
987987
988988
989989
990990 @Callable(i)
991991 func putOneTknREADONLY (paymentAssetId,paymentAmountRaw) = {
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
992+ let $t04070040857 = calcPutOneToken(paymentAmountRaw, parseAssetId(paymentAssetId), unit, unit)
993+ let emitAmountEstimated = $t04070040857._1
994+ let commonState = $t04070040857._2
995+ let feeAmount = $t04070040857._3
996+ let bonus = $t04070040857._4
997+ let paymentInAmountAsset = $t04070040857._5
998998 $Tuple2(nil, $Tuple3(emitAmountEstimated, feeAmount, bonus))
999999 }
10001000
10011001
10021002
10031003 @Callable(i)
10041004 func getOneTkn (outAssetIdStr,minOutAmount) = {
10051005 let isPoolOneTokenOperationsDisabled = {
10061006 let @ = invoke(factoryContract, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
10071007 if ($isInstanceOf(@, "Boolean"))
10081008 then @
10091009 else throw(($getType(@) + " couldn't be cast to Boolean"))
10101010 }
10111011 let isGetDisabled = if (if (isGlobalShutdown())
10121012 then true
10131013 else (cfgPoolStatus == PoolShutdown))
10141014 then true
10151015 else isPoolOneTokenOperationsDisabled
10161016 let checks = [if (if (!(isGetDisabled))
10171017 then true
10181018 else isManager(i))
10191019 then true
10201020 else throwErr("get operation is blocked by admin"), if ((size(i.payments) == 1))
10211021 then true
10221022 else throwErr("exactly 1 payment are expected")]
10231023 if ((checks == checks))
10241024 then {
10251025 let outAssetId = parseAssetId(outAssetIdStr)
10261026 let payment = i.payments[0]
10271027 let paymentAssetId = payment.assetId
10281028 let paymentAmount = payment.amount
10291029 let currentKLp = calcCurrentKLp(toBigInt(0), toBigInt(0), toBigInt(0))
10301030 if ((currentKLp == currentKLp))
10311031 then {
10321032 let userAddress = i.caller
10331033 let txId = i.transactionId
1034- let $t04174041893 = calcGetOneToken(outAssetId, paymentAmount, paymentAssetId, userAddress, txId)
1035- if (($t04174041893 == $t04174041893))
1034+ let $t04174241895 = calcGetOneToken(outAssetId, paymentAmount, paymentAssetId, userAddress, txId)
1035+ if (($t04174241895 == $t04174241895))
10361036 then {
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
1037+ let outInAmountAsset = $t04174241895._5
1038+ let bonus = $t04174241895._4
1039+ let feeAmount = $t04174241895._3
1040+ let commonState = $t04174241895._2
1041+ let amountEstimated = $t04174241895._1
10421042 let amount = if (if ((minOutAmount > 0))
10431043 then (minOutAmount > amountEstimated)
10441044 else false)
10451045 then throwErr(makeString(["amount to receive is less than ", toString(minOutAmount)], ""))
10461046 else amountEstimated
10471047 let burnInv = invoke(factoryContract, "burn", [paymentAmount], [AttachedPayment(paymentAssetId, paymentAmount)])
10481048 if ((burnInv == burnInv))
10491049 then {
10501050 let assetTransfer = [ScriptTransfer(userAddress, amount, outAssetId)]
10511051 let sendFee = if ((feeAmount > 0))
10521052 then [ScriptTransfer(feeCollectorAddress, feeAmount, outAssetId)]
10531053 else nil
1054- let $t04239342640 = {
1054+ let $t04239542642 = {
10551055 let feeAmountForCalc = if ((this == feeCollectorAddress))
10561056 then 0
10571057 else feeAmount
10581058 if (outInAmountAsset)
10591059 then $Tuple2(-((amount + feeAmountForCalc)), 0)
10601060 else $Tuple2(0, -((amount + feeAmountForCalc)))
10611061 }
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
1062+ let amountAssetBalanceDelta = $t04239542642._1
1063+ let priceAssetBalanceDelta = $t04239542642._2
1064+ let $t04264542753 = refreshKLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
1065+ let refreshKLpActions = $t04264542753._1
1066+ let updatedKLp = $t04264542753._2
10671067 let isUpdatedKLpValid = validateUpdatedKLp(currentKLp, updatedKLp)
10681068 if ((isUpdatedKLpValid == isUpdatedKLpValid))
10691069 then $Tuple2((((commonState ++ assetTransfer) ++ sendFee) ++ refreshKLpActions), amount)
10701070 else throw("Strict value is not equal to itself.")
10711071 }
10721072 else throw("Strict value is not equal to itself.")
10731073 }
10741074 else throw("Strict value is not equal to itself.")
10751075 }
10761076 else throw("Strict value is not equal to itself.")
10771077 }
10781078 else throw("Strict value is not equal to itself.")
10791079 }
10801080
10811081
10821082
10831083 @Callable(i)
10841084 func getOneTknREADONLY (outAssetId,paymentAmount) = {
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
1085+ let $t04301043166 = calcGetOneToken(parseAssetId(outAssetId), paymentAmount, cfgLpAssetId, unit, unit)
1086+ let amountEstimated = $t04301043166._1
1087+ let commonState = $t04301043166._2
1088+ let feeAmount = $t04301043166._3
1089+ let bonus = $t04301043166._4
1090+ let outInAmountAsset = $t04301043166._5
10911091 $Tuple2(nil, $Tuple3(amountEstimated, feeAmount, bonus))
10921092 }
10931093
10941094
10951095
10961096 @Callable(i)
10971097 func unstakeAndGetOneTkn (unstakeAmount,outAssetIdStr,minOutAmount) = {
10981098 let isPoolOneTokenOperationsDisabled = {
10991099 let @ = invoke(factoryContract, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
11001100 if ($isInstanceOf(@, "Boolean"))
11011101 then @
11021102 else throw(($getType(@) + " couldn't be cast to Boolean"))
11031103 }
11041104 let isGetDisabled = if (if (isGlobalShutdown())
11051105 then true
11061106 else (cfgPoolStatus == PoolShutdown))
11071107 then true
11081108 else isPoolOneTokenOperationsDisabled
11091109 let checks = [if (if (!(isGetDisabled))
11101110 then true
11111111 else isManager(i))
11121112 then true
11131113 else throwErr("get operation is blocked by admin"), if ((size(i.payments) == 0))
11141114 then true
11151115 else throwErr("no payments are expected")]
11161116 if ((checks == checks))
11171117 then {
11181118 let outAssetId = parseAssetId(outAssetIdStr)
11191119 let userAddress = i.caller
11201120 let txId = i.transactionId
11211121 let currentKLp = calcCurrentKLp(toBigInt(0), toBigInt(0), toBigInt(0))
11221122 if ((currentKLp == currentKLp))
11231123 then {
11241124 let unstakeInv = invoke(stakingContract, "unstake", [toBase58String(cfgLpAssetId), unstakeAmount], nil)
11251125 if ((unstakeInv == unstakeInv))
11261126 then {
1127- let $t04406944220 = calcGetOneToken(outAssetId, unstakeAmount, cfgLpAssetId, userAddress, txId)
1128- if (($t04406944220 == $t04406944220))
1127+ let $t04407144222 = calcGetOneToken(outAssetId, unstakeAmount, cfgLpAssetId, userAddress, txId)
1128+ if (($t04407144222 == $t04407144222))
11291129 then {
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
1130+ let outInAmountAsset = $t04407144222._5
1131+ let bonus = $t04407144222._4
1132+ let feeAmount = $t04407144222._3
1133+ let commonState = $t04407144222._2
1134+ let amountEstimated = $t04407144222._1
11351135 let amount = if (if ((minOutAmount > 0))
11361136 then (minOutAmount > amountEstimated)
11371137 else false)
11381138 then throwErr(makeString(["amount to receive is less than ", toString(minOutAmount)], ""))
11391139 else amountEstimated
11401140 let burnInv = invoke(factoryContract, "burn", [unstakeAmount], [AttachedPayment(cfgLpAssetId, unstakeAmount)])
11411141 if ((burnInv == burnInv))
11421142 then {
11431143 let assetTransfer = [ScriptTransfer(i.caller, amount, outAssetId)]
11441144 let sendFee = if ((feeAmount > 0))
11451145 then [ScriptTransfer(feeCollectorAddress, feeAmount, outAssetId)]
11461146 else nil
1147- let $t04471544962 = {
1147+ let $t04471744964 = {
11481148 let feeAmountForCalc = if ((this == feeCollectorAddress))
11491149 then 0
11501150 else feeAmount
11511151 if (outInAmountAsset)
11521152 then $Tuple2(-((amount + feeAmountForCalc)), 0)
11531153 else $Tuple2(0, -((amount + feeAmountForCalc)))
11541154 }
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
1155+ let amountAssetBalanceDelta = $t04471744964._1
1156+ let priceAssetBalanceDelta = $t04471744964._2
1157+ let $t04496745075 = refreshKLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
1158+ let refreshKLpActions = $t04496745075._1
1159+ let updatedKLp = $t04496745075._2
11601160 let isUpdatedKLpValid = validateUpdatedKLp(currentKLp, updatedKLp)
11611161 if ((isUpdatedKLpValid == isUpdatedKLpValid))
11621162 then $Tuple2((((commonState ++ assetTransfer) ++ sendFee) ++ refreshKLpActions), amount)
11631163 else throw("Strict value is not equal to itself.")
11641164 }
11651165 else throw("Strict value is not equal to itself.")
11661166 }
11671167 else throw("Strict value is not equal to itself.")
11681168 }
11691169 else throw("Strict value is not equal to itself.")
11701170 }
11711171 else throw("Strict value is not equal to itself.")
11721172 }
11731173 else throw("Strict value is not equal to itself.")
11741174 }
11751175
11761176
11771177
11781178 @Callable(i)
11791179 func get () = {
11801180 let res = commonGet(i)
11811181 let outAmtAmt = res._1
11821182 let outPrAmt = res._2
11831183 let pmtAmt = res._3
11841184 let pmtAssetId = res._4
11851185 let state = res._5
11861186 let currentKLp = calcCurrentKLp(toBigInt(0), toBigInt(0), toBigInt(0))
11871187 if ((currentKLp == currentKLp))
11881188 then {
11891189 let burnLPAssetOnFactory = invoke(factoryContract, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
11901190 if ((burnLPAssetOnFactory == burnLPAssetOnFactory))
11911191 then {
1192- let $t04601946101 = refreshKLpInternal(-(outAmtAmt), -(outPrAmt), 0)
1193- let refreshKLpActions = $t04601946101._1
1194- let updatedKLp = $t04601946101._2
1192+ let $t04602146103 = refreshKLpInternal(-(outAmtAmt), -(outPrAmt), 0)
1193+ let refreshKLpActions = $t04602146103._1
1194+ let updatedKLp = $t04602146103._2
11951195 let isUpdatedKLpValid = validateUpdatedKLp(currentKLp, updatedKLp)
11961196 if ((isUpdatedKLpValid == isUpdatedKLpValid))
11971197 then (state ++ refreshKLpActions)
11981198 else throw("Strict value is not equal to itself.")
11991199 }
12001200 else throw("Strict value is not equal to itself.")
12011201 }
12021202 else throw("Strict value is not equal to itself.")
12031203 }
12041204
12051205
12061206
12071207 @Callable(i)
12081208 func getNoLess (noLessThenAmtAsset,noLessThenPriceAsset) = {
12091209 let res = commonGet(i)
12101210 let outAmAmt = res._1
12111211 let outPrAmt = res._2
12121212 let pmtAmt = res._3
12131213 let pmtAssetId = res._4
12141214 let state = res._5
12151215 if ((noLessThenAmtAsset > outAmAmt))
12161216 then throw(((("noLessThenAmtAsset failed: " + toString(outAmAmt)) + " < ") + toString(noLessThenAmtAsset)))
12171217 else if ((noLessThenPriceAsset > outPrAmt))
12181218 then throw(((("noLessThenPriceAsset failed: " + toString(outPrAmt)) + " < ") + toString(noLessThenPriceAsset)))
12191219 else {
12201220 let currentKLp = calcCurrentKLp(toBigInt(0), toBigInt(0), toBigInt(0))
12211221 if ((currentKLp == currentKLp))
12221222 then {
12231223 let burnLPAssetOnFactory = invoke(factoryContract, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
12241224 if ((burnLPAssetOnFactory == burnLPAssetOnFactory))
12251225 then {
1226- let $t04705047131 = refreshKLpInternal(-(outAmAmt), -(outPrAmt), 0)
1227- let refreshKLpActions = $t04705047131._1
1228- let updatedKLp = $t04705047131._2
1226+ let $t04705247133 = refreshKLpInternal(-(outAmAmt), -(outPrAmt), 0)
1227+ let refreshKLpActions = $t04705247133._1
1228+ let updatedKLp = $t04705247133._2
12291229 let isUpdatedKLpValid = validateUpdatedKLp(currentKLp, updatedKLp)
12301230 if ((isUpdatedKLpValid == isUpdatedKLpValid))
12311231 then (state ++ refreshKLpActions)
12321232 else throw("Strict value is not equal to itself.")
12331233 }
12341234 else throw("Strict value is not equal to itself.")
12351235 }
12361236 else throw("Strict value is not equal to itself.")
12371237 }
12381238 }
12391239
12401240
12411241
12421242 @Callable(i)
12431243 func unstakeAndGet (amount) = {
12441244 let checkPayments = if ((size(i.payments) != 0))
12451245 then throw("No payments are expected")
12461246 else true
12471247 if ((checkPayments == checkPayments))
12481248 then {
12491249 let cfg = getPoolConfig()
12501250 let lpAssetId = fromBase58String(cfg[idxPoolLPAssetId])
12511251 let currentKLp = calcCurrentKLp(toBigInt(0), toBigInt(0), toBigInt(0))
12521252 if ((currentKLp == currentKLp))
12531253 then {
12541254 let unstakeInv = invoke(stakingContract, "unstake", [toBase58String(lpAssetId), amount], nil)
12551255 if ((unstakeInv == unstakeInv))
12561256 then {
12571257 let res = estimateGetOperation(toBase58String(i.transactionId), toBase58String(lpAssetId), amount, i.caller)
12581258 let outAmAmt = res._1
12591259 let outPrAmt = res._2
12601260 let poolStatus = parseIntValue(res._9)
12611261 let state = res._10
12621262 let checkPoolStatus = if (if (isGlobalShutdown())
12631263 then true
12641264 else (poolStatus == PoolShutdown))
12651265 then throw(("Get operation is blocked by admin. Status = " + toString(poolStatus)))
12661266 else true
12671267 if ((checkPoolStatus == checkPoolStatus))
12681268 then {
12691269 let burnLPAssetOnFactory = invoke(factoryContract, "burn", [amount], [AttachedPayment(lpAssetId, amount)])
12701270 if ((burnLPAssetOnFactory == burnLPAssetOnFactory))
12711271 then {
1272- let $t04825748338 = refreshKLpInternal(-(outAmAmt), -(outPrAmt), 0)
1273- let refreshKLpActions = $t04825748338._1
1274- let updatedKLp = $t04825748338._2
1272+ let $t04825948340 = refreshKLpInternal(-(outAmAmt), -(outPrAmt), 0)
1273+ let refreshKLpActions = $t04825948340._1
1274+ let updatedKLp = $t04825948340._2
12751275 let isUpdatedKLpValid = validateUpdatedKLp(currentKLp, updatedKLp)
12761276 if ((isUpdatedKLpValid == isUpdatedKLpValid))
12771277 then (state ++ refreshKLpActions)
12781278 else throw("Strict value is not equal to itself.")
12791279 }
12801280 else throw("Strict value is not equal to itself.")
12811281 }
12821282 else throw("Strict value is not equal to itself.")
12831283 }
12841284 else throw("Strict value is not equal to itself.")
12851285 }
12861286 else throw("Strict value is not equal to itself.")
12871287 }
12881288 else throw("Strict value is not equal to itself.")
12891289 }
12901290
12911291
12921292
12931293 @Callable(i)
12941294 func unstakeAndGetNoLess (unstakeAmount,noLessThenAmountAsset,noLessThenPriceAsset) = {
12951295 let isGetDisabled = if (isGlobalShutdown())
12961296 then true
12971297 else (cfgPoolStatus == PoolShutdown)
12981298 let checks = [if (!(isGetDisabled))
12991299 then true
13001300 else throw("get operation is blocked by admin"), if ((size(i.payments) == 0))
13011301 then true
13021302 else throw("no payments are expected")]
13031303 if ((checks == checks))
13041304 then {
13051305 let currentKLp = calcCurrentKLp(toBigInt(0), toBigInt(0), toBigInt(0))
13061306 if ((currentKLp == currentKLp))
13071307 then {
13081308 let unstakeInv = invoke(stakingContract, "unstake", [toBase58String(cfgLpAssetId), unstakeAmount], nil)
13091309 if ((unstakeInv == unstakeInv))
13101310 then {
13111311 let res = estimateGetOperation(toBase58String(i.transactionId), toBase58String(cfgLpAssetId), unstakeAmount, i.caller)
13121312 let outAmAmt = res._1
13131313 let outPrAmt = res._2
13141314 let state = res._10
13151315 let checkAmounts = [if ((outAmAmt >= noLessThenAmountAsset))
13161316 then true
13171317 else throw(makeString(["amount asset amount to receive is less than ", toString(noLessThenAmountAsset)], "")), if ((outPrAmt >= noLessThenPriceAsset))
13181318 then true
13191319 else throw(makeString(["price asset amount to receive is less than ", toString(noLessThenPriceAsset)], ""))]
13201320 if ((checkAmounts == checkAmounts))
13211321 then {
13221322 let burnLPAssetOnFactory = invoke(factoryContract, "burn", [unstakeAmount], [AttachedPayment(cfgLpAssetId, unstakeAmount)])
13231323 if ((burnLPAssetOnFactory == burnLPAssetOnFactory))
13241324 then {
1325- let $t04963349714 = refreshKLpInternal(-(outAmAmt), -(outPrAmt), 0)
1326- let refreshKLpActions = $t04963349714._1
1327- let updatedKLp = $t04963349714._2
1325+ let $t04963549716 = refreshKLpInternal(-(outAmAmt), -(outPrAmt), 0)
1326+ let refreshKLpActions = $t04963549716._1
1327+ let updatedKLp = $t04963549716._2
13281328 let isUpdatedKLpValid = validateUpdatedKLp(currentKLp, updatedKLp)
13291329 if ((isUpdatedKLpValid == isUpdatedKLpValid))
13301330 then (state ++ refreshKLpActions)
13311331 else throw("Strict value is not equal to itself.")
13321332 }
13331333 else throw("Strict value is not equal to itself.")
13341334 }
13351335 else throw("Strict value is not equal to itself.")
13361336 }
13371337 else throw("Strict value is not equal to itself.")
13381338 }
13391339 else throw("Strict value is not equal to itself.")
13401340 }
13411341 else throw("Strict value is not equal to itself.")
13421342 }
13431343
13441344
13451345
13461346 @Callable(i)
13471347 func activate (amtAssetStr,priceAssetStr) = if ((toString(i.caller) != toString(factoryContract)))
13481348 then throw("permissions denied")
13491349 else $Tuple2([StringEntry(aa(), amtAssetStr), StringEntry(pa(), priceAssetStr)], "success")
13501350
13511351
13521352
13531353 @Callable(i)
13541354 func refreshKLp () = {
13551355 let lastRefreshedBlockHeight = valueOrElse(getInteger(keyKLpRefreshedHeight), 0)
13561356 let checkLastRefreshedBlockHeight = if (((height - lastRefreshedBlockHeight) >= kLpRefreshDelay))
13571357 then unit
13581358 else throwErr(makeString([toString(kLpRefreshDelay), " blocks have not passed since the previous call"], ""))
13591359 if ((checkLastRefreshedBlockHeight == checkLastRefreshedBlockHeight))
13601360 then {
13611361 let kLp = valueOrErrorMessage(parseBigInt(valueOrElse(getString(this, keyKLp), "0")), fmtErr("invalid kLp"))
1362- let $t05090150965 = refreshKLpInternal(0, 0, 0)
1363- let kLpUpdateActions = $t05090150965._1
1364- let updatedKLp = $t05090150965._2
1362+ let $t05090350967 = refreshKLpInternal(0, 0, 0)
1363+ let kLpUpdateActions = $t05090350967._1
1364+ let updatedKLp = $t05090350967._2
13651365 let actions = if ((kLp != updatedKLp))
13661366 then kLpUpdateActions
13671367 else throwErr("nothing to refresh")
13681368 $Tuple2(actions, toString(updatedKLp))
13691369 }
13701370 else throw("Strict value is not equal to itself.")
13711371 }
13721372
13731373
13741374
13751375 @Callable(i)
13761376 func getPoolConfigWrapperREADONLY () = $Tuple2(nil, getPoolConfig())
13771377
13781378
13791379
13801380 @Callable(i)
13811381 func getAccBalanceWrapperREADONLY (assetId) = $Tuple2(nil, getAccBalance(assetId))
13821382
13831383
13841384
13851385 @Callable(i)
13861386 func calcPricesWrapperREADONLY (amAmt,prAmt,lpAmt) = {
13871387 let prices = calcPrices(amAmt, prAmt, lpAmt)
13881388 $Tuple2(nil, [toString(prices[0]), toString(prices[1]), toString(prices[2])])
13891389 }
13901390
13911391
13921392
13931393 @Callable(i)
13941394 func toX18WrapperREADONLY (origVal,origScaleMult) = $Tuple2(nil, toString(toX18(origVal, origScaleMult)))
13951395
13961396
13971397
13981398 @Callable(i)
13991399 func fromX18WrapperREADONLY (val,resultScaleMult) = $Tuple2(nil, fromX18(parseBigIntValue(val), resultScaleMult))
14001400
14011401
14021402
14031403 @Callable(i)
14041404 func calcPriceBigIntWrapperREADONLY (prAmtX18,amAmtX18) = $Tuple2(nil, toString(calcPriceBigInt(parseBigIntValue(prAmtX18), parseBigIntValue(amAmtX18))))
14051405
14061406
14071407
14081408 @Callable(i)
14091409 func estimatePutOperationWrapperREADONLY (txId58,slippageTolerance,inAmAssetAmt,inAmAssetId,inPrAssetAmt,inPrAssetId,userAddress,isEvaluate,emitLp) = $Tuple2(nil, estimatePutOperation(txId58, slippageTolerance, inAmAssetAmt, inAmAssetId, inPrAssetAmt, inPrAssetId, userAddress, isEvaluate, emitLp))
14101410
14111411
14121412
14131413 @Callable(i)
14141414 func estimateGetOperationWrapperREADONLY (txId58,pmtAssetId,pmtLpAmt,userAddress) = {
14151415 let res = estimateGetOperation(txId58, pmtAssetId, pmtLpAmt, addressFromStringValue(userAddress))
14161416 $Tuple2(nil, $Tuple10(res._1, res._2, res._3, res._4, res._5, res._6, res._7, toString(res._8), res._9, res._10))
14171417 }
14181418
14191419
14201420
14211421 @Callable(i)
14221422 func statsREADONLY () = {
14231423 let cfg = getPoolConfig()
14241424 let lpAssetId = fromBase58String(cfg[idxPoolLPAssetId])
14251425 let amtAssetId = cfg[idxAmtAssetId]
14261426 let priceAssetId = cfg[idxPriceAssetId]
14271427 let iAmtAssetId = cfg[idxIAmtAssetId]
14281428 let iPriceAssetId = cfg[idxIPriceAssetId]
14291429 let amtAssetDcm = parseIntValue(cfg[idxAmtAssetDcm])
14301430 let priceAssetDcm = parseIntValue(cfg[idxPriceAssetDcm])
14311431 let poolLPBalance = valueOrErrorMessage(assetInfo(lpAssetId), (("Asset " + toBase58String(lpAssetId)) + " doesn't exist")).quantity
14321432 let accAmtAssetBalance = getAccBalance(amtAssetId)
14331433 let accPriceAssetBalance = getAccBalance(priceAssetId)
14341434 let pricesList = if ((poolLPBalance == 0))
14351435 then [zeroBigInt, zeroBigInt, zeroBigInt]
14361436 else calcPrices(accAmtAssetBalance, accPriceAssetBalance, poolLPBalance)
14371437 let curPrice = 0
14381438 let lpAmtAssetShare = fromX18(pricesList[1], scale8)
14391439 let lpPriceAssetShare = fromX18(pricesList[2], scale8)
14401440 let poolWeight = value(getInteger(factoryContract, keyPoolWeight(toString(this))))
14411441 $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))
14421442 }
14431443
14441444
14451445
14461446 @Callable(i)
14471447 func evaluatePutByAmountAssetREADONLY (inAmAssetAmt) = {
14481448 let cfg = getPoolConfig()
14491449 let lpAssetId = fromBase58String(cfg[idxPoolLPAssetId])
14501450 let amAssetIdStr = cfg[idxAmtAssetId]
14511451 let amAssetId = fromBase58String(amAssetIdStr)
14521452 let prAssetIdStr = cfg[idxPriceAssetId]
14531453 let prAssetId = fromBase58String(prAssetIdStr)
14541454 let amtAssetDcm = parseIntValue(cfg[idxAmtAssetDcm])
14551455 let priceAssetDcm = parseIntValue(cfg[idxPriceAssetDcm])
14561456 let poolStatus = cfg[idxPoolStatus]
14571457 let poolLPBalance = valueOrErrorMessage(assetInfo(lpAssetId), (("Asset " + toBase58String(lpAssetId)) + " doesn't exist")).quantity
14581458 let accAmtAssetBalance = getAccBalance(amAssetIdStr)
14591459 let accPriceAssetBalance = getAccBalance(prAssetIdStr)
14601460 let amtAssetAmtX18 = toX18(accAmtAssetBalance, amtAssetDcm)
14611461 let priceAssetAmtX18 = toX18(accPriceAssetBalance, priceAssetDcm)
14621462 let curPriceX18 = if ((poolLPBalance == 0))
14631463 then zeroBigInt
14641464 else calcPriceBigInt(priceAssetAmtX18, amtAssetAmtX18)
14651465 let inAmAssetAmtX18 = toX18(inAmAssetAmt, amtAssetDcm)
14661466 let inPrAssetAmtX18 = fraction(inAmAssetAmtX18, curPriceX18, scale18)
14671467 let inPrAssetAmt = fromX18(inPrAssetAmtX18, priceAssetDcm)
14681468 let estPut = estimatePutOperation("", 500000, inAmAssetAmt, amAssetId, inPrAssetAmt, prAssetId, "", true, false)
14691469 let calcLpAmt = estPut._1
14701470 let curPriceCalc = estPut._3
14711471 let amBalance = estPut._4
14721472 let prBalance = estPut._5
14731473 let lpEmission = estPut._6
14741474 $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))
14751475 }
14761476
14771477
14781478
14791479 @Callable(i)
14801480 func evaluatePutByPriceAssetREADONLY (inPrAssetAmt) = {
14811481 let cfg = getPoolConfig()
14821482 let lpAssetId = fromBase58String(cfg[idxPoolLPAssetId])
14831483 let amAssetIdStr = cfg[idxAmtAssetId]
14841484 let amAssetId = fromBase58String(amAssetIdStr)
14851485 let prAssetIdStr = cfg[idxPriceAssetId]
14861486 let prAssetId = fromBase58String(prAssetIdStr)
14871487 let amtAssetDcm = parseIntValue(cfg[idxAmtAssetDcm])
14881488 let priceAssetDcm = parseIntValue(cfg[idxPriceAssetDcm])
14891489 let poolStatus = cfg[idxPoolStatus]
14901490 let poolLPBalance = valueOrErrorMessage(assetInfo(lpAssetId), (("Asset " + toBase58String(lpAssetId)) + " doesn't exist")).quantity
14911491 let amBalanceRaw = getAccBalance(amAssetIdStr)
14921492 let prBalanceRaw = getAccBalance(prAssetIdStr)
14931493 let amBalanceRawX18 = toX18(amBalanceRaw, amtAssetDcm)
14941494 let prBalanceRawX18 = toX18(prBalanceRaw, priceAssetDcm)
14951495 let curPriceX18 = if ((poolLPBalance == 0))
14961496 then zeroBigInt
14971497 else calcPriceBigInt(prBalanceRawX18, amBalanceRawX18)
14981498 let inPrAssetAmtX18 = toX18(inPrAssetAmt, priceAssetDcm)
14991499 let inAmAssetAmtX18 = fraction(inPrAssetAmtX18, scale18, curPriceX18)
15001500 let inAmAssetAmt = fromX18(inAmAssetAmtX18, amtAssetDcm)
15011501 let estPut = estimatePutOperation("", 500000, inAmAssetAmt, amAssetId, inPrAssetAmt, prAssetId, "", true, false)
15021502 let calcLpAmt = estPut._1
15031503 let curPriceCalc = estPut._3
15041504 let amBalance = estPut._4
15051505 let prBalance = estPut._5
15061506 let lpEmission = estPut._6
15071507 $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))
15081508 }
15091509
15101510
15111511
15121512 @Callable(i)
15131513 func evaluateGetREADONLY (paymentLpAssetId,paymentLpAmt) = {
15141514 let res = estimateGetOperation("", paymentLpAssetId, paymentLpAmt, this)
15151515 let outAmAmt = res._1
15161516 let outPrAmt = res._2
15171517 let amBalance = res._5
15181518 let prBalance = res._6
15191519 let lpEmission = res._7
15201520 let curPrice = res._8
15211521 let poolStatus = parseIntValue(res._9)
15221522 $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))
15231523 }
15241524
15251525
15261526 @Verifier(tx)
15271527 func verify () = {
15281528 let targetPublicKey = match managerPublicKeyOrUnit() {
15291529 case pk: ByteVector =>
15301530 pk
15311531 case _: Unit =>
15321532 tx.senderPublicKey
15331533 case _ =>
15341534 throw("Match error")
15351535 }
15361536 match tx {
15371537 case order: Order =>
15381538 let matcherPub = getMatcherPubOrFail()
1539- let $t05962759696 = validateMatcherOrderAllowed(order)
1540- let orderValid = $t05962759696._1
1541- let orderValidInfo = $t05962759696._2
1539+ let $t05962959698 = validateMatcherOrderAllowed(order)
1540+ let orderValid = $t05962959698._1
1541+ let orderValidInfo = $t05962959698._2
15421542 let senderValid = sigVerify(order.bodyBytes, order.proofs[0], order.senderPublicKey)
15431543 let matcherValid = sigVerify(order.bodyBytes, order.proofs[1], matcherPub)
15441544 if (if (if (orderValid)
15451545 then senderValid
15461546 else false)
15471547 then matcherValid
15481548 else false)
15491549 then true
15501550 else throwOrderError(orderValid, orderValidInfo, senderValid, matcherValid)
15511551 case s: SetScriptTransaction =>
15521552 if (sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey))
15531553 then true
15541554 else {
15551555 let newHash = blake2b256(value(s.script))
15561556 let allowedHash = fromBase64String(value(getString(factoryContract, keyAllowedLpScriptHash())))
15571557 let currentHash = scriptHash(this)
15581558 if ((allowedHash == newHash))
15591559 then (currentHash != newHash)
15601560 else false
15611561 }
15621562 case _ =>
15631563 sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey)
15641564 }
15651565 }
15661566

github/deemru/w8io/026f985 
188.74 ms