tx · ENQoFVrHPYm4U8hMRTxzHRdA7FqJFdjnmFXsWcbMrWSn

3MsryPHGVR5NWpGqXNw1LbqEYUx3Vk88yxN:  -0.05000000 Waves

2021.08.10 23:40 [1652748] smart account 3MsryPHGVR5NWpGqXNw1LbqEYUx3Vk88yxN > SELF 0.00000000 Waves

{ "type": 13, "id": "ENQoFVrHPYm4U8hMRTxzHRdA7FqJFdjnmFXsWcbMrWSn", "fee": 5000000, "feeAssetId": null, "timestamp": 1628628025563, "version": 2, "chainId": 84, "sender": "3MsryPHGVR5NWpGqXNw1LbqEYUx3Vk88yxN", "senderPublicKey": "EkxY8bYYRAdDeo26yCeHLGSzDnPpuye9m2yxFRQGpXVy", "proofs": [ "4sBrLTtRNuGu3m48t4QMgYRtE5Ph5mtHxSJgJEwSbmWEGneEQH9PgQhEvg62PEYZwbb2poFgi7QqsFQnaD9Nsfep" ], "script": "base64:AAIFAAAAAAAAACMIAhIAEgMKAQESABIAEgcKBQgICAgBEgMKAQESABIAEgASAAAAACUAAAAACmxQZGVjaW1hbHMAAAAAAAAAAAgAAAAAEWRlY2ltYWxzTXVsdFByaWNlCQAAaAAAAAIJAABoAAAAAgAAAAAAAAAAZAAAAAAAAAAD6AAAAAAAAAAD6AAAAAADU0VQAgAAAAJfXwAAAAAKUG9vbEFjdGl2ZQAAAAAAAAAAAQAAAAAPUG9vbFB1dERpc2FibGVkAAAAAAAAAAACAAAAABNQb29sTWF0Y2hlckRpc2FibGVkAAAAAAAAAAADAAAAAAxQb29sU2h1dGRvd24AAAAAAAAAAAQAAAAAEGZhY3RvcnlQdWJsaWNLZXkJAAJZAAAAAQIAAAArTWltUXRCeDdhemhTdEFIMlI1UVY3VWs4aFdFYm03cTg5NzkzZmsxajFtaAAAAAAOaWR4UG9vbEFkZHJlc3MAAAAAAAAAAAEAAAAADWlkeFBvb2xTdGF0dXMAAAAAAAAAAAIAAAAAEGlkeFBvb2xMUEFzc2V0SWQAAAAAAAAAAAMAAAAAEGlkeEFtb3V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AAAAAQUAAAANcHJpY2VBc3NldFN0cgQAAAAScHJpY2VBc3NldERlY2ltYWxzCAkBAAAABXZhbHVlAAAAAQkAA+wAAAABBQAAAAxwcmljZUFzc2V0SWQAAAAIZGVjaW1hbHMEAAAAEmxwQXNzZXRJc3N1ZUFjdGlvbgkABEIAAAAFBQAAAAtscEFzc2V0TmFtZQUAAAAMbHBBc3NldERlc2NyAAAAAAAAAAABAAAAAAAAAAAIBgQAAAAJbHBBc3NldElkCQAEOAAAAAEFAAAAEmxwQXNzZXRJc3N1ZUFjdGlvbgQAAAARbHBBc3NldElkQXNTdHJpbmcJAAJYAAAAAQUAAAAJbHBBc3NldElkCQAFFAAAAAIJAARMAAAAAgUAAAASbHBBc3NldElzc3VlQWN0aW9uCQAETAAAAAIJAQAAAARCdXJuAAAAAgUAAAAJbHBBc3NldElkAAAAAAAAAAABBQAAAANuaWwFAAAAEWxwQXNzZXRJZEFzU3RyaW5nAAAAAWkBAAAABm1hbmFnZQAAAAEAAAAGc3RhdHVzBQAAAANuaWwAAAABaQEAAAAMZXN0aW1hdGVkUHV0AAAAAAUAAAADbmlsAAAAAWkBAAAABXN0YXRzAAAAAAUAAAADbmlsAAAAAWkBAAAADGVzdGltYXRlZEdldAAAAAAFAAAAA25pbAAAAAFpAQAAAAVwcmljZQAAAAAFAAAAA25pbAAAAAEAAAACdHgBAAAABnZlcmlmeQAAAAAJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAACAUAAAACdHgAAAAPc2VuZGVyUHVibGljS2V5u/+TuA==", "height": 1652748, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 2341xv3RVWDi7DfbWAi1tR1X5xkWPbVjVKNuoipDB1gi Next: 4dj4LUg9j9qCwdrtHb6WDPMUySaFsUviMnDUHawsnsuT Diff:
OldNewDifferences
161161 let inAmountAssetAmtCalculated = (inAmountAssetAmt * decimalsMult4AmountAsset)
162162 let inPriceAssetAmtCalculated = (inPriceAssetAmt * decimalsMult4PriceAsset)
163163 let expectedUserPrice = fraction(inPriceAssetAmtCalculated, decimalsMultPrice, inAmountAssetAmtCalculated)
164+ let amountAssetPoolLockedAmt = (poolAmountAssetBalance * decimalsMult4AmountAsset)
165+ let priceAssetPoolLockedAmt = (poolPriceAssetBalance * decimalsMult4PriceAsset)
166+ let currentPoolPrice = fraction(priceAssetPoolLockedAmt, decimalsMultPrice, amountAssetPoolLockedAmt)
164167 if (true)
165- then throw("DEBUG")
166- else {
167- let amountAssetPoolLockedAmt = (poolAmountAssetBalance * decimalsMult4AmountAsset)
168- let priceAssetPoolLockedAmt = (poolPriceAssetBalance * decimalsMult4PriceAsset)
169- let currentPoolPrice = fraction(priceAssetPoolLockedAmt, decimalsMultPrice, amountAssetPoolLockedAmt)
170- if (true)
171- then throw(toString(currentPoolPrice))
172- else if ((size(poolLiquidityDataList) == 0))
173- then {
174- let partA = pow(inAmountAssetAmtCalculated, 0, 0, 50, 1, DOWN)
175- let partB = pow(inPriceAssetAmtCalculated, 0, 0, 50, 1, DOWN)
176- let lpAssetsToReturn = (partA * partB)
168+ then throw(toString(currentPoolPrice))
169+ else if ((size(poolLiquidityDataList) == 0))
170+ then {
171+ let partA = pow(inAmountAssetAmtCalculated, 0, 0, 50, 1, DOWN)
172+ let partB = pow(inPriceAssetAmtCalculated, 0, 0, 50, 1, DOWN)
173+ let lpAssetsToReturn = (partA * partB)
177174 [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)]
175+ }
176+ else {
177+ let slippage = fraction(currentPoolPrice, 100, expectedUserPrice)
178+ if ((slippage > slippageTolerance))
179+ then throw(((("Price slippage " + toString(slippage)) + " exceeded the passed limit of ") + toString(slippageTolerance)))
180+ else {
181+ let lpAmtByAmountAsset = fraction(poolLPBalance, inAmountAssetAmtCalculated, amountAssetPoolLockedAmt)
182+ let lpAmtByPriceAsset = fraction(poolLPBalance, inPriceAssetAmtCalculated, priceAssetPoolLockedAmt)
183+ let totalLp4User = if ((lpAmtByPriceAsset > lpAmtByAmountAsset))
184+ then lpAmtByAmountAsset
185+ else lpAmtByPriceAsset
186+[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)]
178187 }
179- else {
180- let slippage = fraction(currentPoolPrice, 100, expectedUserPrice)
181- if ((slippage > slippageTolerance))
182- then throw(((("Price slippage " + toString(slippage)) + " exceeded the passed limit of ") + toString(slippageTolerance)))
183- else {
184- let lpAmtByAmountAsset = fraction(poolLPBalance, inAmountAssetAmtCalculated, amountAssetPoolLockedAmt)
185- let lpAmtByPriceAsset = fraction(poolLPBalance, inPriceAssetAmtCalculated, priceAssetPoolLockedAmt)
186- let totalLp4User = if ((lpAmtByPriceAsset > lpAmtByAmountAsset))
187- then lpAmtByAmountAsset
188- else lpAmtByPriceAsset
189-[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)]
190- }
191- }
192- }
188+ }
193189 }
194190 }
195191
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 = 1
2121
2222 let idxPoolStatus = 2
2323
2424 let idxPoolLPAssetId = 3
2525
2626 let idxAmountAssetId = 4
2727
2828 let idxPriceAssetId = 5
2929
3030 let idxAmountAssetDecimals = 6
3131
3232 let idxPriceAssetDecimals = 7
3333
3434 let idxAmountAssetInternalId = 8
3535
3636 let idxPriceAssetInternalId = 9
3737
3838 let idxPoolWeight = 10
3939
4040 let idxPoolAmountAssetAmt = 1
4141
4242 let idxPoolPriceAssetAmt = 2
4343
4444 let idxPoolLPAssetAmt = 3
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) = (((("%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[1], currentPoolAssets[2])), "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", "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])
150150 let userLiquidityDataList = getPoolLiquidityByUser(amountAssetInternalId, priceAssetInternalId, toString(i.caller))
151151 let userAmountAssetBalance = parseIntValue(userLiquidityDataList[idxPoolAmountAssetAmt])
152152 let userPriceAssetBalance = parseIntValue(userLiquidityDataList[idxPoolPriceAssetAmt])
153153 let userLPBalance = parseIntValue(userLiquidityDataList[idxPoolLPAssetAmt])
154154 if (if ((amountAssetId != toBase58String(inAmountAssetId)))
155155 then true
156156 else (priceAssetId != toBase58String(inPriceAssetId)))
157157 then throw("Invalid amount or price asset passed.")
158158 else {
159159 let decimalsMult4AmountAsset = pow(10, 0, (lPdecimals - amoutAssetDecimals), 0, 0, DOWN)
160160 let decimalsMult4PriceAsset = pow(10, 0, (lPdecimals - priceAssetDecimals), 0, 0, DOWN)
161161 let inAmountAssetAmtCalculated = (inAmountAssetAmt * decimalsMult4AmountAsset)
162162 let inPriceAssetAmtCalculated = (inPriceAssetAmt * decimalsMult4PriceAsset)
163163 let expectedUserPrice = fraction(inPriceAssetAmtCalculated, decimalsMultPrice, inAmountAssetAmtCalculated)
164+ let amountAssetPoolLockedAmt = (poolAmountAssetBalance * decimalsMult4AmountAsset)
165+ let priceAssetPoolLockedAmt = (poolPriceAssetBalance * decimalsMult4PriceAsset)
166+ let currentPoolPrice = fraction(priceAssetPoolLockedAmt, decimalsMultPrice, amountAssetPoolLockedAmt)
164167 if (true)
165- then throw("DEBUG")
166- else {
167- let amountAssetPoolLockedAmt = (poolAmountAssetBalance * decimalsMult4AmountAsset)
168- let priceAssetPoolLockedAmt = (poolPriceAssetBalance * decimalsMult4PriceAsset)
169- let currentPoolPrice = fraction(priceAssetPoolLockedAmt, decimalsMultPrice, amountAssetPoolLockedAmt)
170- if (true)
171- then throw(toString(currentPoolPrice))
172- else if ((size(poolLiquidityDataList) == 0))
173- then {
174- let partA = pow(inAmountAssetAmtCalculated, 0, 0, 50, 1, DOWN)
175- let partB = pow(inPriceAssetAmtCalculated, 0, 0, 50, 1, DOWN)
176- let lpAssetsToReturn = (partA * partB)
168+ then throw(toString(currentPoolPrice))
169+ else if ((size(poolLiquidityDataList) == 0))
170+ then {
171+ let partA = pow(inAmountAssetAmtCalculated, 0, 0, 50, 1, DOWN)
172+ let partB = pow(inPriceAssetAmtCalculated, 0, 0, 50, 1, DOWN)
173+ let lpAssetsToReturn = (partA * partB)
177174 [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)]
175+ }
176+ else {
177+ let slippage = fraction(currentPoolPrice, 100, expectedUserPrice)
178+ if ((slippage > slippageTolerance))
179+ then throw(((("Price slippage " + toString(slippage)) + " exceeded the passed limit of ") + toString(slippageTolerance)))
180+ else {
181+ let lpAmtByAmountAsset = fraction(poolLPBalance, inAmountAssetAmtCalculated, amountAssetPoolLockedAmt)
182+ let lpAmtByPriceAsset = fraction(poolLPBalance, inPriceAssetAmtCalculated, priceAssetPoolLockedAmt)
183+ let totalLp4User = if ((lpAmtByPriceAsset > lpAmtByAmountAsset))
184+ then lpAmtByAmountAsset
185+ else lpAmtByPriceAsset
186+[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)]
178187 }
179- else {
180- let slippage = fraction(currentPoolPrice, 100, expectedUserPrice)
181- if ((slippage > slippageTolerance))
182- then throw(((("Price slippage " + toString(slippage)) + " exceeded the passed limit of ") + toString(slippageTolerance)))
183- else {
184- let lpAmtByAmountAsset = fraction(poolLPBalance, inAmountAssetAmtCalculated, amountAssetPoolLockedAmt)
185- let lpAmtByPriceAsset = fraction(poolLPBalance, inPriceAssetAmtCalculated, priceAssetPoolLockedAmt)
186- let totalLp4User = if ((lpAmtByPriceAsset > lpAmtByAmountAsset))
187- then lpAmtByAmountAsset
188- else lpAmtByPriceAsset
189-[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)]
190- }
191- }
192- }
188+ }
193189 }
194190 }
195191
196192
197193
198194 @Callable(i)
199195 func get () = {
200196 let poolConfigList = getPoolConfig()
201197 let lpAssetId = poolConfigList[idxPoolLPAssetId]
202198 let amountAssetId = poolConfigList[idxAmountAssetId]
203199 let priceAssetId = poolConfigList[idxPriceAssetId]
204200 let amountAssetInternalId = poolConfigList[idxAmountAssetInternalId]
205201 let priceAssetInternalId = poolConfigList[idxPriceAssetInternalId]
206202 let userLiquidityList = getPoolLiquidityByUser(amountAssetInternalId, priceAssetInternalId, toString(i.caller))
207203 let userLPBalance = parseIntValue(userLiquidityList[idxPoolLPAssetAmt])
208204 let userAmountAssetBalance = parseIntValue(userLiquidityList[idxPoolAmountAssetAmt])
209205 let userPriceAssetBalance = parseIntValue(userLiquidityList[idxPoolPriceAssetAmt])
210206 let poolLiquidityList = getPoolLiquidity(amountAssetInternalId, priceAssetInternalId)
211207 let poolLPBalance = parseIntValue(poolLiquidityList[idxPoolLPAssetAmt])
212208 let poolAmountAssetBalance = parseIntValue(poolLiquidityList[idxPoolAmountAssetAmt])
213209 let poolPriceAssetBalance = parseIntValue(poolLiquidityList[idxPoolPriceAssetAmt])
214210 let pmtAmountAsset = value(i.payments[0])
215211 let pmtAssetId = value(pmtAmountAsset.assetId)
216212 let pmtAssetAmount = pmtAmountAsset.amount
217213 if ((lpAssetId != toBase58String(pmtAssetId)))
218214 then throw("Invalid asset passed.")
219215 else if ((pmtAssetAmount > userLPBalance))
220216 then throw("Invalid amount passed. Amount less than available.")
221217 else {
222218 let outAmountAssetAmt = fraction(poolAmountAssetBalance, pmtAssetAmount, poolLPBalance)
223219 let outPriceAssetAmt = fraction(poolPriceAssetBalance, pmtAssetAmount, poolLPBalance)
224220 let currentPrice = fraction(poolPriceAssetBalance, decimalsMultPrice, poolAmountAssetBalance)
225221 [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)))]
226222 }
227223 }
228224
229225
230226
231227 @Callable(i)
232228 func topup () = nil
233229
234230
235231
236232 @Callable(i)
237233 func activate (amountAssetStr,priceAssetStr,lpAssetName,lpAssetDescr,poolWeight) = if ((i.callerPublicKey != factoryPublicKey))
238234 then throw("permissions denied")
239235 else {
240236 let amountAssetId = fromBase58String(amountAssetStr)
241237 let amountAssetDecimals = value(assetInfo(amountAssetId)).decimals
242238 let priceAssetId = fromBase58String(priceAssetStr)
243239 let priceAssetDecimals = value(assetInfo(priceAssetId)).decimals
244240 let lpAssetIssueAction = Issue(lpAssetName, lpAssetDescr, 1, 8, true)
245241 let lpAssetId = calculateAssetId(lpAssetIssueAction)
246242 let lpAssetIdAsString = toBase58String(lpAssetId)
247243 $Tuple2([lpAssetIssueAction, Burn(lpAssetId, 1)], lpAssetIdAsString)
248244 }
249245
250246
251247
252248 @Callable(i)
253249 func manage (status) = nil
254250
255251
256252
257253 @Callable(i)
258254 func estimatedPut () = nil
259255
260256
261257
262258 @Callable(i)
263259 func stats () = nil
264260
265261
266262
267263 @Callable(i)
268264 func estimatedGet () = nil
269265
270266
271267
272268 @Callable(i)
273269 func price () = nil
274270
275271
276272 @Verifier(tx)
277273 func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
278274

github/deemru/w8io/026f985 
47.79 ms