tx · EdBPmXbumHx8gGuxoCbAPHrkTPicSK8XbTmtxjpLRxen

3MsryPHGVR5NWpGqXNw1LbqEYUx3Vk88yxN:  -0.05000000 Waves

2021.08.10 20:08 [1652526] smart account 3MsryPHGVR5NWpGqXNw1LbqEYUx3Vk88yxN > SELF 0.00000000 Waves

{ "type": 13, "id": "EdBPmXbumHx8gGuxoCbAPHrkTPicSK8XbTmtxjpLRxen", "fee": 5000000, "feeAssetId": null, "timestamp": 1628615338115, "version": 2, "chainId": 84, "sender": "3MsryPHGVR5NWpGqXNw1LbqEYUx3Vk88yxN", "senderPublicKey": "EkxY8bYYRAdDeo26yCeHLGSzDnPpuye9m2yxFRQGpXVy", "proofs": [ "29qqn8YoGvoB1ZRUtYWJrQqT6ndEXrM2eB2LkZn6KTLT3cKXRWjk6pVKzhDhuNKt1ru2KnnedQP8Ci6DSXb1USMC" ], "script": "base64:AAIFAAAAAAAAACMIAhIAEgMKAQESABIAEgcKBQgICAgBEgMKAQESABIAEgASAAAAACUAAAAACmxQZGVjaW1hbHMAAAAAAAAAAAgAAAAAEWRlY2ltYWxzTXVsdFByaWNlCQAAaAAAAAIJAABoAAAAAgAAAAAAAAAAZAAAAAAAAAAD6AAAAAAAAAAD6AAAAAADU0VQAgAAAAJfXwAAAAAKUG9vbEFjdGl2ZQAAAAAAAAAAAQAAAAAPUG9vbFB1dERpc2FibGVkAAAAAAAAAAACAAAAABNQb29sTWF0Y2hlckRpc2FibGVkAAAAAAAAAAADAAAAAAxQb29sU2h1dGRvd24AAAAAAAAAAAQAAAAAEGZhY3RvcnlQdWJsaWNLZXkJAAJZAAAAAQIAAAArTWltUXRCeDdhemhTdEFIMlI1UVY3VWs4aFdFYm03cTg5NzkzZmsxajFtaAAAAAAOaWR4UG9vbEFkZHJlc3MAAAAAAAAAAAIAAAAADWlkeFBvb2xTdGF0dXMAAAAAAAAAAAMAAAAAEGlkeFBvb2xMUEFzc2V0SWQAAAAAAAAAAAQAAAAAEGlkeEFtb3VudEFz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A1wcmljZUFzc2V0U3RyBAAAABJwcmljZUFzc2V0RGVjaW1hbHMICQEAAAAFdmFsdWUAAAABCQAD7AAAAAEFAAAADHByaWNlQXNzZXRJZAAAAAhkZWNpbWFscwQAAAASbHBBc3NldElzc3VlQWN0aW9uCQAEQgAAAAUFAAAAC2xwQXNzZXROYW1lBQAAAAxscEFzc2V0RGVzY3IAAAAAAAAAAAEAAAAAAAAAAAgGBAAAAAlscEFzc2V0SWQJAAQ4AAAAAQUAAAASbHBBc3NldElzc3VlQWN0aW9uBAAAABFscEFzc2V0SWRBc1N0cmluZwkAAlgAAAABBQAAAAlscEFzc2V0SWQJAAUUAAAAAgkABEwAAAACBQAAABJscEFzc2V0SXNzdWVBY3Rpb24JAARMAAAAAgkBAAAABEJ1cm4AAAACBQAAAAlscEFzc2V0SWQAAAAAAAAAAAEFAAAAA25pbAUAAAARbHBBc3NldElkQXNTdHJpbmcAAAABaQEAAAAGbWFuYWdlAAAAAQAAAAZzdGF0dXMFAAAAA25pbAAAAAFpAQAAAAxlc3RpbWF0ZWRQdXQAAAAABQAAAANuaWwAAAABaQEAAAAFc3RhdHMAAAAABQAAAANuaWwAAAABaQEAAAAMZXN0aW1hdGVkR2V0AAAAAAUAAAADbmlsAAAAAWkBAAAABXByaWNlAAAAAAUAAAADbmlsAAAAAQAAAAJ0eAEAAAAGdmVyaWZ5AAAAAAkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAAIBQAAAAJ0eAAAAA9zZW5kZXJQdWJsaWNLZXk1XgEz", "height": 1652526, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 2ggmzP9oYwWpkVrP42mg2vkGmqU5WH1kwXrTkAKp4FLM Next: CECMuG6w2Ut58RJhRkS2KbnXpatHCxvFQYivVLgYAuSr Diff:
OldNewDifferences
147147 let poolAmountAssetBalance = parseIntValue(poolLiquidityDataList[idxPoolAmountAssetAmt])
148148 let poolPriceAssetBalance = parseIntValue(poolLiquidityDataList[idxPoolPriceAssetAmt])
149149 let poolLPBalance = parseIntValue(poolLiquidityDataList[idxPoolLPAssetAmt])
150- let userLiquidityDataList = getPoolLiquidityByUser(amountAssetInternalId, priceAssetInternalId, toString(i.caller))
151- let userAmountAssetBalance = parseIntValue(userLiquidityDataList[idxPoolAmountAssetAmt])
152- let userPriceAssetBalance = parseIntValue(userLiquidityDataList[idxPoolPriceAssetAmt])
153- let userLPBalance = parseIntValue(userLiquidityDataList[idxPoolLPAssetAmt])
154- if (if ((amountAssetId != toBase58String(inAmountAssetId)))
155- then true
156- else (priceAssetId != toBase58String(inPriceAssetId)))
157- then throw("Invalid amount or price asset passed.")
150+ if (true)
151+ then throw("DEBUG")
158152 else {
159- let decimalsMult4AmountAsset = pow(10, 0, (lPdecimals - amoutAssetDecimals), 0, 0, DOWN)
160- let decimalsMult4PriceAsset = pow(10, 0, (lPdecimals - priceAssetDecimals), 0, 0, DOWN)
161- let inAmountAssetAmtCalculated = (inAmountAssetAmt * decimalsMult4AmountAsset)
162- let inPriceAssetAmtCalculated = (inPriceAssetAmt * decimalsMult4PriceAsset)
163- let expectedUserPrice = fraction(inPriceAssetAmtCalculated, decimalsMultPrice, inAmountAssetAmtCalculated)
164- let amountAssetPoolLockedAmt = (poolAmountAssetBalance * decimalsMult4AmountAsset)
165- let priceAssetPoolLockedAmt = (poolPriceAssetBalance * decimalsMult4PriceAsset)
166- let currentPoolPrice = fraction(priceAssetPoolLockedAmt, decimalsMultPrice, amountAssetPoolLockedAmt)
167- if ((size(poolLiquidityDataList) == 0))
168- then {
169- let partA = pow(inAmountAssetAmtCalculated, 0, 0, 50, 1, DOWN)
170- let partB = pow(inPriceAssetAmtCalculated, 0, 0, 50, 1, DOWN)
171- let lpAssetsToReturn = (partA * partB)
153+ let userLiquidityDataList = getPoolLiquidityByUser(amountAssetInternalId, priceAssetInternalId, toString(i.caller))
154+ let userAmountAssetBalance = parseIntValue(userLiquidityDataList[idxPoolAmountAssetAmt])
155+ let userPriceAssetBalance = parseIntValue(userLiquidityDataList[idxPoolPriceAssetAmt])
156+ let userLPBalance = parseIntValue(userLiquidityDataList[idxPoolLPAssetAmt])
157+ if (if ((amountAssetId != toBase58String(inAmountAssetId)))
158+ then true
159+ else (priceAssetId != toBase58String(inPriceAssetId)))
160+ then throw("Invalid amount or price asset passed.")
161+ else {
162+ let decimalsMult4AmountAsset = pow(10, 0, (lPdecimals - amoutAssetDecimals), 0, 0, DOWN)
163+ let decimalsMult4PriceAsset = pow(10, 0, (lPdecimals - priceAssetDecimals), 0, 0, DOWN)
164+ let inAmountAssetAmtCalculated = (inAmountAssetAmt * decimalsMult4AmountAsset)
165+ let inPriceAssetAmtCalculated = (inPriceAssetAmt * decimalsMult4PriceAsset)
166+ let expectedUserPrice = fraction(inPriceAssetAmtCalculated, decimalsMultPrice, inAmountAssetAmtCalculated)
167+ let amountAssetPoolLockedAmt = (poolAmountAssetBalance * decimalsMult4AmountAsset)
168+ let priceAssetPoolLockedAmt = (poolPriceAssetBalance * decimalsMult4PriceAsset)
169+ let currentPoolPrice = fraction(priceAssetPoolLockedAmt, decimalsMultPrice, amountAssetPoolLockedAmt)
170+ if ((size(poolLiquidityDataList) == 0))
171+ then {
172+ let partA = pow(inAmountAssetAmtCalculated, 0, 0, 50, 1, DOWN)
173+ let partB = pow(inPriceAssetAmtCalculated, 0, 0, 50, 1, DOWN)
174+ let lpAssetsToReturn = (partA * partB)
172175 [StringEntry(keyPriceLast(), ("%s__" + toString(currentPoolPrice))), StringEntry(keyPriceHistory(height, lastBlock.timestamp), ("%s__" + toString(currentPoolPrice))), StringEntry(keyPutActionByUser(toString(i.caller), toBase58String(i.transactionId)), dataPutActionInfo(inAmountAssetAmt, inPriceAssetAmt, lpAssetsToReturn, currentPoolPrice, slippageTolerance, height, lastBlock.timestamp)), StringEntry(keyPoolLiquidityByUser(amountAssetInternalId, priceAssetInternalId, toString(i.caller)), dataPoolLiquidity(inAmountAssetAmt, inPriceAssetAmt, lpAssetsToReturn)), StringEntry(keyPoolLiquidity(amountAssetInternalId, priceAssetInternalId), dataPoolLiquidity(inAmountAssetAmt, inPriceAssetAmt, lpAssetsToReturn)), Reissue(lpAssetId, lpAssetsToReturn, true), ScriptTransfer(i.caller, lpAssetsToReturn, lpAssetId)]
173- }
174- else {
175- let slippage = fraction(currentPoolPrice, 100, expectedUserPrice)
176- if ((slippage > slippageTolerance))
177- then throw(((("Price slippage " + toString(slippage)) + " exceeded the passed limit of ") + toString(slippageTolerance)))
176+ }
178177 else {
179- let lpAmtByAmountAsset = fraction(poolLPBalance, inAmountAssetAmtCalculated, amountAssetPoolLockedAmt)
180- let lpAmtByPriceAsset = fraction(poolLPBalance, inPriceAssetAmtCalculated, priceAssetPoolLockedAmt)
181- let totalLp4User = if ((lpAmtByPriceAsset > lpAmtByAmountAsset))
182- then lpAmtByAmountAsset
183- else lpAmtByPriceAsset
178+ let slippage = fraction(currentPoolPrice, 100, expectedUserPrice)
179+ if ((slippage > slippageTolerance))
180+ then throw(((("Price slippage " + toString(slippage)) + " exceeded the passed limit of ") + toString(slippageTolerance)))
181+ else {
182+ let lpAmtByAmountAsset = fraction(poolLPBalance, inAmountAssetAmtCalculated, amountAssetPoolLockedAmt)
183+ let lpAmtByPriceAsset = fraction(poolLPBalance, inPriceAssetAmtCalculated, priceAssetPoolLockedAmt)
184+ let totalLp4User = if ((lpAmtByPriceAsset > lpAmtByAmountAsset))
185+ then lpAmtByAmountAsset
186+ else lpAmtByPriceAsset
184187 [StringEntry(keyPriceLast(), ("%s__" + toString(currentPoolPrice))), StringEntry(keyPriceHistory(height, lastBlock.timestamp), ("%s__" + toString(currentPoolPrice))), StringEntry(keyPutActionByUser(toString(i.caller), toBase58String(i.transactionId)), dataPutActionInfo(inAmountAssetAmt, inPriceAssetAmt, totalLp4User, currentPoolPrice, slippageTolerance, height, lastBlock.timestamp)), StringEntry(keyPoolLiquidityByUser(amountAssetInternalId, priceAssetInternalId, toString(i.caller)), dataPoolLiquidity((userAmountAssetBalance + inAmountAssetAmt), (userPriceAssetBalance + inPriceAssetAmt), (userLPBalance + totalLp4User))), StringEntry(keyPoolLiquidity(amountAssetInternalId, priceAssetInternalId), dataPoolLiquidity((poolAmountAssetBalance + inAmountAssetAmt), (poolPriceAssetBalance + inPriceAssetAmt), (poolLPBalance + totalLp4User))), Reissue(lpAssetId, totalLp4User, true), ScriptTransfer(i.caller, totalLp4User, lpAssetId)]
188+ }
185189 }
186190 }
187191 }
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let lPdecimals = 8
55
66 let decimalsMultPrice = ((100 * 1000) * 1000)
77
88 let SEP = "__"
99
1010 let PoolActive = 1
1111
1212 let PoolPutDisabled = 2
1313
1414 let PoolMatcherDisabled = 3
1515
1616 let PoolShutdown = 4
1717
1818 let factoryPublicKey = fromBase58String("MimQtBx7azhStAH2R5QV7Uk8hWEbm7q89793fk1j1mh")
1919
2020 let idxPoolAddress = 2
2121
2222 let idxPoolStatus = 3
2323
2424 let idxPoolLPAssetId = 4
2525
2626 let idxAmountAssetId = 5
2727
2828 let idxPriceAssetId = 6
2929
3030 let idxAmountAssetDecimals = 7
3131
3232 let idxPriceAssetDecimals = 8
3333
3434 let idxAmountAssetInternalId = 9
3535
3636 let idxPriceAssetInternalId = 10
3737
3838 let idxPoolWeight = 11
3939
4040 let idxPoolAmountAssetAmt = 2
4141
4242 let idxPoolPriceAssetAmt = 3
4343
4444 let idxPoolLPAssetAmt = 4
4545
4646 func keyPriceLast () = "%s%s__price__last"
4747
4848
4949 func keyPriceHistory (h,timestamp) = makeString(["%s%s%d%d__price__history", toString(h), toString(timestamp)], SEP)
5050
5151
5252 func keyPoolLiquidity (internalAmountAsset,internalPriceAsset) = (((("%d%d%s__" + internalAmountAsset) + "__") + internalPriceAsset) + "__locked")
5353
5454
5555 func keyPoolLiquidityByUser (internalAmountAsset,internalPriceAsset,userAddress) = (((((("%d%d%s%s__" + internalAmountAsset) + "__") + internalPriceAsset) + "__") + userAddress) + "__locked")
5656
5757
5858 func keyPutActionByUser (userAddress,txId) = ((("%s%s%s__P__" + userAddress) + "__") + txId)
5959
6060
6161 func keyGetActionByUser (userAddress,txId) = ((("%s%s%s__G__" + userAddress) + "__") + txId)
6262
6363
6464 func keyMappingPoolContractAddressToPoolAssets (poolContractAddress) = (("%s%s%s__" + poolContractAddress) + "__mappings__poolContract2LpAsset")
6565
6666
6767 func keyPoolConfig (amountAssetInternal,priceAssetInternal) = (((("%s%d%d%s__" + amountAssetInternal) + "__") + priceAssetInternal) + "__config")
6868
6969
7070 func getPoolConfig () = {
7171 let factoryAddress = addressFromPublicKey(factoryPublicKey)
7272 let currentPoolAssets = split(valueOrErrorMessage(getString(factoryAddress, keyMappingPoolContractAddressToPoolAssets(toString(this))), "No factory config found for pool address."), SEP)
7373 let currentPoolConfig = split(valueOrErrorMessage(getString(factoryAddress, keyPoolConfig(currentPoolAssets[2], currentPoolAssets[3])), "No factory config found for pool assets."), SEP)
7474 currentPoolConfig
7575 }
7676
7777
7878 func getPoolLiquidity (amountAssetInternalId,priceAssetInternalId) = {
7979 let currentPoolLiquidityValue = getString(keyPoolLiquidity(amountAssetInternalId, priceAssetInternalId))
8080 if (!(isDefined(currentPoolLiquidityValue)))
8181 then nil
8282 else {
8383 let currentPoolLiquidity = split(value(currentPoolLiquidityValue), SEP)
8484 currentPoolLiquidity
8585 }
8686 }
8787
8888
8989 func getPoolLiquidityByUser (amountAssetInternalId,priceAssetInternalId,userAddress) = {
9090 let currentPoolLiquidityValue = getString(keyPoolLiquidityByUser(amountAssetInternalId, priceAssetInternalId, userAddress))
9191 if (!(isDefined(currentPoolLiquidityValue)))
9292 then ["", "0", "0", "0"]
9393 else {
9494 let currentPoolLiquidity = split(value(currentPoolLiquidityValue), SEP)
9595 currentPoolLiquidity
9696 }
9797 }
9898
9999
100100 func dataPoolLiquidity (amountAssetLocked,priceAssetLocked,lpTokenLocked) = makeString(["%d%d%d", toString(amountAssetLocked), toString(priceAssetLocked), toString(lpTokenLocked)], SEP)
101101
102102
103103 func dataPutActionInfo (inAmountAssetAmt,inPriceAssetAmt,outLpAmt,price,slippageTolerancePassedByUser,txHeight,txTimestamp) = makeString(["%d%d%d%d%d%d%d", toString(inAmountAssetAmt), toString(inPriceAssetAmt), toString(outLpAmt), toString(price), toString(slippageTolerancePassedByUser), toString(txHeight), toString(txTimestamp)], SEP)
104104
105105
106106 func dataGetActionInfo (outAmountAssetAmt,outPriceAssetAmt,inLpAmt,price,txHeight,txTimestamp) = makeString(["%d%d%d%d%d%d", toString(outAmountAssetAmt), toString(outPriceAssetAmt), toString(inLpAmt), toString(price), toString(txHeight), toString(txTimestamp)], SEP)
107107
108108
109109 func dataPoolLiquidityByUser (amountAssetLocked,priceAssetLocked,lpTokenLocked,userAddress) = makeString(["%d%d%d", toString(amountAssetLocked), toString(priceAssetLocked), toString(lpTokenLocked)], SEP)
110110
111111
112112 func calculatePrice (amountAssetAmt,amountAssetDecimals,priceAssetAmt,priceAssetDecimals) = {
113113 let decimalsMult4AmountAsset = pow(10, 0, (lPdecimals - amountAssetDecimals), 0, 0, DOWN)
114114 let decimalsMult4PriceAsset = pow(10, 0, (lPdecimals - priceAssetDecimals), 0, 0, DOWN)
115115 let inAmountAssetAmtFinal = (amountAssetAmt * decimalsMult4AmountAsset)
116116 let inPriceAmtFinal = (priceAssetAmt * decimalsMult4PriceAsset)
117117 let price = fraction(inPriceAmtFinal, decimalsMultPrice, inAmountAssetAmtFinal)
118118 price
119119 }
120120
121121
122122 @Callable(i)
123123 func getScriptHash () = {
124124 let hash = toBase64String(value(scriptHash(this)))
125125 throw(hash)
126126 }
127127
128128
129129
130130 @Callable(i)
131131 func put (slippageTolerance) = {
132132 let poolConfigDataList = getPoolConfig()
133133 let lpAssetId = fromBase58String(poolConfigDataList[idxPoolLPAssetId])
134134 let amountAssetId = poolConfigDataList[idxAmountAssetId]
135135 let priceAssetId = poolConfigDataList[idxPriceAssetId]
136136 let amountAssetInternalId = poolConfigDataList[idxAmountAssetInternalId]
137137 let priceAssetInternalId = poolConfigDataList[idxPriceAssetInternalId]
138138 let amoutAssetDecimals = parseIntValue(poolConfigDataList[idxAmountAssetDecimals])
139139 let priceAssetDecimals = parseIntValue(poolConfigDataList[idxPriceAssetDecimals])
140140 let pmtAmountAsset = value(i.payments[0])
141141 let inAmountAssetAmt = pmtAmountAsset.amount
142142 let inAmountAssetId = value(pmtAmountAsset.assetId)
143143 let pmtPriceAsset = value(i.payments[1])
144144 let inPriceAssetAmt = pmtPriceAsset.amount
145145 let inPriceAssetId = value(pmtPriceAsset.assetId)
146146 let poolLiquidityDataList = getPoolLiquidity(amountAssetInternalId, priceAssetInternalId)
147147 let poolAmountAssetBalance = parseIntValue(poolLiquidityDataList[idxPoolAmountAssetAmt])
148148 let poolPriceAssetBalance = parseIntValue(poolLiquidityDataList[idxPoolPriceAssetAmt])
149149 let poolLPBalance = parseIntValue(poolLiquidityDataList[idxPoolLPAssetAmt])
150- let userLiquidityDataList = getPoolLiquidityByUser(amountAssetInternalId, priceAssetInternalId, toString(i.caller))
151- let userAmountAssetBalance = parseIntValue(userLiquidityDataList[idxPoolAmountAssetAmt])
152- let userPriceAssetBalance = parseIntValue(userLiquidityDataList[idxPoolPriceAssetAmt])
153- let userLPBalance = parseIntValue(userLiquidityDataList[idxPoolLPAssetAmt])
154- if (if ((amountAssetId != toBase58String(inAmountAssetId)))
155- then true
156- else (priceAssetId != toBase58String(inPriceAssetId)))
157- then throw("Invalid amount or price asset passed.")
150+ if (true)
151+ then throw("DEBUG")
158152 else {
159- let decimalsMult4AmountAsset = pow(10, 0, (lPdecimals - amoutAssetDecimals), 0, 0, DOWN)
160- let decimalsMult4PriceAsset = pow(10, 0, (lPdecimals - priceAssetDecimals), 0, 0, DOWN)
161- let inAmountAssetAmtCalculated = (inAmountAssetAmt * decimalsMult4AmountAsset)
162- let inPriceAssetAmtCalculated = (inPriceAssetAmt * decimalsMult4PriceAsset)
163- let expectedUserPrice = fraction(inPriceAssetAmtCalculated, decimalsMultPrice, inAmountAssetAmtCalculated)
164- let amountAssetPoolLockedAmt = (poolAmountAssetBalance * decimalsMult4AmountAsset)
165- let priceAssetPoolLockedAmt = (poolPriceAssetBalance * decimalsMult4PriceAsset)
166- let currentPoolPrice = fraction(priceAssetPoolLockedAmt, decimalsMultPrice, amountAssetPoolLockedAmt)
167- if ((size(poolLiquidityDataList) == 0))
168- then {
169- let partA = pow(inAmountAssetAmtCalculated, 0, 0, 50, 1, DOWN)
170- let partB = pow(inPriceAssetAmtCalculated, 0, 0, 50, 1, DOWN)
171- let lpAssetsToReturn = (partA * partB)
153+ let userLiquidityDataList = getPoolLiquidityByUser(amountAssetInternalId, priceAssetInternalId, toString(i.caller))
154+ let userAmountAssetBalance = parseIntValue(userLiquidityDataList[idxPoolAmountAssetAmt])
155+ let userPriceAssetBalance = parseIntValue(userLiquidityDataList[idxPoolPriceAssetAmt])
156+ let userLPBalance = parseIntValue(userLiquidityDataList[idxPoolLPAssetAmt])
157+ if (if ((amountAssetId != toBase58String(inAmountAssetId)))
158+ then true
159+ else (priceAssetId != toBase58String(inPriceAssetId)))
160+ then throw("Invalid amount or price asset passed.")
161+ else {
162+ let decimalsMult4AmountAsset = pow(10, 0, (lPdecimals - amoutAssetDecimals), 0, 0, DOWN)
163+ let decimalsMult4PriceAsset = pow(10, 0, (lPdecimals - priceAssetDecimals), 0, 0, DOWN)
164+ let inAmountAssetAmtCalculated = (inAmountAssetAmt * decimalsMult4AmountAsset)
165+ let inPriceAssetAmtCalculated = (inPriceAssetAmt * decimalsMult4PriceAsset)
166+ let expectedUserPrice = fraction(inPriceAssetAmtCalculated, decimalsMultPrice, inAmountAssetAmtCalculated)
167+ let amountAssetPoolLockedAmt = (poolAmountAssetBalance * decimalsMult4AmountAsset)
168+ let priceAssetPoolLockedAmt = (poolPriceAssetBalance * decimalsMult4PriceAsset)
169+ let currentPoolPrice = fraction(priceAssetPoolLockedAmt, decimalsMultPrice, amountAssetPoolLockedAmt)
170+ if ((size(poolLiquidityDataList) == 0))
171+ then {
172+ let partA = pow(inAmountAssetAmtCalculated, 0, 0, 50, 1, DOWN)
173+ let partB = pow(inPriceAssetAmtCalculated, 0, 0, 50, 1, DOWN)
174+ let lpAssetsToReturn = (partA * partB)
172175 [StringEntry(keyPriceLast(), ("%s__" + toString(currentPoolPrice))), StringEntry(keyPriceHistory(height, lastBlock.timestamp), ("%s__" + toString(currentPoolPrice))), StringEntry(keyPutActionByUser(toString(i.caller), toBase58String(i.transactionId)), dataPutActionInfo(inAmountAssetAmt, inPriceAssetAmt, lpAssetsToReturn, currentPoolPrice, slippageTolerance, height, lastBlock.timestamp)), StringEntry(keyPoolLiquidityByUser(amountAssetInternalId, priceAssetInternalId, toString(i.caller)), dataPoolLiquidity(inAmountAssetAmt, inPriceAssetAmt, lpAssetsToReturn)), StringEntry(keyPoolLiquidity(amountAssetInternalId, priceAssetInternalId), dataPoolLiquidity(inAmountAssetAmt, inPriceAssetAmt, lpAssetsToReturn)), Reissue(lpAssetId, lpAssetsToReturn, true), ScriptTransfer(i.caller, lpAssetsToReturn, lpAssetId)]
173- }
174- else {
175- let slippage = fraction(currentPoolPrice, 100, expectedUserPrice)
176- if ((slippage > slippageTolerance))
177- then throw(((("Price slippage " + toString(slippage)) + " exceeded the passed limit of ") + toString(slippageTolerance)))
176+ }
178177 else {
179- let lpAmtByAmountAsset = fraction(poolLPBalance, inAmountAssetAmtCalculated, amountAssetPoolLockedAmt)
180- let lpAmtByPriceAsset = fraction(poolLPBalance, inPriceAssetAmtCalculated, priceAssetPoolLockedAmt)
181- let totalLp4User = if ((lpAmtByPriceAsset > lpAmtByAmountAsset))
182- then lpAmtByAmountAsset
183- else lpAmtByPriceAsset
178+ let slippage = fraction(currentPoolPrice, 100, expectedUserPrice)
179+ if ((slippage > slippageTolerance))
180+ then throw(((("Price slippage " + toString(slippage)) + " exceeded the passed limit of ") + toString(slippageTolerance)))
181+ else {
182+ let lpAmtByAmountAsset = fraction(poolLPBalance, inAmountAssetAmtCalculated, amountAssetPoolLockedAmt)
183+ let lpAmtByPriceAsset = fraction(poolLPBalance, inPriceAssetAmtCalculated, priceAssetPoolLockedAmt)
184+ let totalLp4User = if ((lpAmtByPriceAsset > lpAmtByAmountAsset))
185+ then lpAmtByAmountAsset
186+ else lpAmtByPriceAsset
184187 [StringEntry(keyPriceLast(), ("%s__" + toString(currentPoolPrice))), StringEntry(keyPriceHistory(height, lastBlock.timestamp), ("%s__" + toString(currentPoolPrice))), StringEntry(keyPutActionByUser(toString(i.caller), toBase58String(i.transactionId)), dataPutActionInfo(inAmountAssetAmt, inPriceAssetAmt, totalLp4User, currentPoolPrice, slippageTolerance, height, lastBlock.timestamp)), StringEntry(keyPoolLiquidityByUser(amountAssetInternalId, priceAssetInternalId, toString(i.caller)), dataPoolLiquidity((userAmountAssetBalance + inAmountAssetAmt), (userPriceAssetBalance + inPriceAssetAmt), (userLPBalance + totalLp4User))), StringEntry(keyPoolLiquidity(amountAssetInternalId, priceAssetInternalId), dataPoolLiquidity((poolAmountAssetBalance + inAmountAssetAmt), (poolPriceAssetBalance + inPriceAssetAmt), (poolLPBalance + totalLp4User))), Reissue(lpAssetId, totalLp4User, true), ScriptTransfer(i.caller, totalLp4User, lpAssetId)]
188+ }
185189 }
186190 }
187191 }
188192 }
189193
190194
191195
192196 @Callable(i)
193197 func get () = {
194198 let poolConfigList = getPoolConfig()
195199 let lpAssetId = poolConfigList[idxPoolLPAssetId]
196200 let amountAssetId = poolConfigList[idxAmountAssetId]
197201 let priceAssetId = poolConfigList[idxPriceAssetId]
198202 let amountAssetInternalId = poolConfigList[idxAmountAssetInternalId]
199203 let priceAssetInternalId = poolConfigList[idxPriceAssetInternalId]
200204 let userLiquidityList = getPoolLiquidityByUser(amountAssetInternalId, priceAssetInternalId, toString(i.caller))
201205 let userLPBalance = parseIntValue(userLiquidityList[idxPoolLPAssetAmt])
202206 let userAmountAssetBalance = parseIntValue(userLiquidityList[idxPoolAmountAssetAmt])
203207 let userPriceAssetBalance = parseIntValue(userLiquidityList[idxPoolPriceAssetAmt])
204208 let poolLiquidityList = getPoolLiquidity(amountAssetInternalId, priceAssetInternalId)
205209 let poolLPBalance = parseIntValue(poolLiquidityList[idxPoolLPAssetAmt])
206210 let poolAmountAssetBalance = parseIntValue(poolLiquidityList[idxPoolAmountAssetAmt])
207211 let poolPriceAssetBalance = parseIntValue(poolLiquidityList[idxPoolPriceAssetAmt])
208212 let pmtAmountAsset = value(i.payments[0])
209213 let pmtAssetId = value(pmtAmountAsset.assetId)
210214 let pmtAssetAmount = pmtAmountAsset.amount
211215 if ((lpAssetId != toBase58String(pmtAssetId)))
212216 then throw("Invalid asset passed.")
213217 else if ((pmtAssetAmount > userLPBalance))
214218 then throw("Invalid amount passed. Amount less than available.")
215219 else {
216220 let outAmountAssetAmt = fraction(poolAmountAssetBalance, pmtAssetAmount, poolLPBalance)
217221 let outPriceAssetAmt = fraction(poolPriceAssetBalance, pmtAssetAmount, poolLPBalance)
218222 let currentPrice = fraction(poolPriceAssetBalance, decimalsMultPrice, poolAmountAssetBalance)
219223 [Burn(pmtAssetId, pmtAssetAmount), ScriptTransfer(i.caller, outAmountAssetAmt, fromBase58String(amountAssetId)), ScriptTransfer(i.caller, outPriceAssetAmt, fromBase58String(priceAssetId)), StringEntry(keyPoolLiquidityByUser(amountAssetInternalId, priceAssetInternalId, toString(i.caller)), dataPoolLiquidity((userAmountAssetBalance - outAmountAssetAmt), (userPriceAssetBalance - outPriceAssetAmt), (userLPBalance - pmtAssetAmount))), StringEntry(keyPoolLiquidity(amountAssetInternalId, priceAssetInternalId), dataPoolLiquidity((poolAmountAssetBalance - outAmountAssetAmt), (poolPriceAssetBalance - outPriceAssetAmt), (poolLPBalance - pmtAssetAmount))), StringEntry(keyGetActionByUser(toString(i.caller), toBase58String(i.transactionId)), dataGetActionInfo(outAmountAssetAmt, outPriceAssetAmt, pmtAssetAmount, currentPrice, height, lastBlock.timestamp)), StringEntry(keyPriceLast(), ("%s__" + toString(currentPrice))), StringEntry(keyPriceHistory(height, lastBlock.timestamp), ("%s__" + toString(currentPrice)))]
220224 }
221225 }
222226
223227
224228
225229 @Callable(i)
226230 func topup () = nil
227231
228232
229233
230234 @Callable(i)
231235 func activate (amountAssetStr,priceAssetStr,lpAssetName,lpAssetDescr,poolWeight) = if ((i.callerPublicKey != factoryPublicKey))
232236 then throw("permissions denied")
233237 else {
234238 let amountAssetId = fromBase58String(amountAssetStr)
235239 let amountAssetDecimals = value(assetInfo(amountAssetId)).decimals
236240 let priceAssetId = fromBase58String(priceAssetStr)
237241 let priceAssetDecimals = value(assetInfo(priceAssetId)).decimals
238242 let lpAssetIssueAction = Issue(lpAssetName, lpAssetDescr, 1, 8, true)
239243 let lpAssetId = calculateAssetId(lpAssetIssueAction)
240244 let lpAssetIdAsString = toBase58String(lpAssetId)
241245 $Tuple2([lpAssetIssueAction, Burn(lpAssetId, 1)], lpAssetIdAsString)
242246 }
243247
244248
245249
246250 @Callable(i)
247251 func manage (status) = nil
248252
249253
250254
251255 @Callable(i)
252256 func estimatedPut () = nil
253257
254258
255259
256260 @Callable(i)
257261 func stats () = nil
258262
259263
260264
261265 @Callable(i)
262266 func estimatedGet () = nil
263267
264268
265269
266270 @Callable(i)
267271 func price () = nil
268272
269273
270274 @Verifier(tx)
271275 func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
272276

github/deemru/w8io/026f985 
38.98 ms