tx · eeeWnHFZyRyAGG52u9yfNpDHFPTwVvxckPxYGRiXfY1 3N8XgqekdDGuNYtWJKPyPzcvDvS5rkM43US: -0.01000000 Waves 2021.08.27 17:04 [1676852] smart account 3N8XgqekdDGuNYtWJKPyPzcvDvS5rkM43US > SELF 0.00000000 Waves
{ "type": 13, "id": "eeeWnHFZyRyAGG52u9yfNpDHFPTwVvxckPxYGRiXfY1", "fee": 1000000, "feeAssetId": null, "timestamp": 1630073110235, "version": 2, "chainId": 84, "sender": "3N8XgqekdDGuNYtWJKPyPzcvDvS5rkM43US", "senderPublicKey": "F3FtzTMSn1qYwwpCKbP3HE2kwptFNTKgMMEkGHmbL49R", "proofs": [ "4MPtfcVTHNWQKTufPgE48EiAhCmx9uiaMViBVYFFjP28vNeq3Ji8nEv6tdznd95FbNgHbqmnBKMd8z7F5BbYt6WZ" ], "script": "base64:AAIFAAAAAAAAACoIAhIDCgEBEgASBgoECAgICBIAEgUKAwEBCBIFCgMBAQgSBQoDCAEIEgAAAAA0AAAAABRmYWN0b3J5QWRkcmVzc1N0cmluZwIAAAAjM043d1dXS2FuckZFd2ptQVY4cGt6OXdWYW9RUnlvamJLREcAAAAACmxQZGVjaW1hbHMAAAAAAAAAAAgAAAAAEWRlY2ltYWxzTXVsdFByaWNlCQAAaAAAAAIJAABoAAAAAgAAAAAAAAAAZAAAAAAAAAAD6AAAAAAAAAAD6AAAAAADU0VQAgAAAAJfXwAAAAAKUG9vbEFjdGl2ZQAAAAAAAAAAAQAAAAAPUG9vbFB1dERpc2FibGVkAAAAAAAAAAACAAAAABNQb29sTWF0Y2hlckRpc2FibGVkAAAAAAAAAAADAAAAAAxQb29sU2h1dGRvd24AAAAAAAAAAAQAAAAADGJ1eU9yZGVyVHlwZQAAAAAAAAAAAAAAAAANc2VsbE9yZGVyVHlwZQAAAAAAAAAAAQAAAAAOaWR4UG9vbEFkZHJlc3MAAAAAAAAAAAEAAAAADWlkeFBvb2xTdGF0dXMAAAAAAAAAAAIAAAAA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AAAAB3Jlc3VsdHMAAAADXzEwCQAETAAAAAIJAAGkAAAAAQgFAAAAB3Jlc3VsdHMAAAADXzExCQAETAAAAAIJAAGkAAAAAQgFAAAAB3Jlc3VsdHMAAAADXzEyCQAETAAAAAIJAAGkAAAAAQgFAAAAB3Jlc3VsdHMAAAADXzEzCQAETAAAAAIIBQAAAAdyZXN1bHRzAAAAA18xNAUAAAADbmlsBQAAAANTRVAAAAABaQEAAAAMaGFzaFJFQURPTkxZAAAAAAkABRQAAAACBQAAAANuaWwJAAJaAAAAAQkBAAAABXZhbHVlAAAAAQkAA/EAAAABBQAAAAR0aGlzAAAAAQAAAAJ0eAEAAAAGdmVyaWZ5AAAAAAQAAAAHJG1hdGNoMAUAAAACdHgDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAABU9yZGVyBAAAAAVvcmRlcgUAAAAHJG1hdGNoMAkAAZEAAAACCQEAAAAbdmFsaWRhdGVNYXRjaGVyT3JkZXJBbGxvd2VkAAAAAQUAAAAFb3JkZXIAAAAAAAAAAAEJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAACAUAAAACdHgAAAAPc2VuZGVyUHVibGljS2V5kWym4Q==", "height": 1676852, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: none Next: 9Wr9Jq4xyUC8JVxoPuaQsxGaeZLNNgWqUKLV1SqKVHiu Full:
Old | New | Differences | |
---|---|---|---|
1 | - | # no script | |
1 | + | {-# STDLIB_VERSION 5 #-} | |
2 | + | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | + | {-# CONTENT_TYPE DAPP #-} | |
4 | + | let factoryAddressString = "3N7wWWKanrFEwjmAV8pkz9wVaoQRyojbKDG" | |
5 | + | ||
6 | + | let lPdecimals = 8 | |
7 | + | ||
8 | + | let decimalsMultPrice = ((100 * 1000) * 1000) | |
9 | + | ||
10 | + | let SEP = "__" | |
11 | + | ||
12 | + | let PoolActive = 1 | |
13 | + | ||
14 | + | let PoolPutDisabled = 2 | |
15 | + | ||
16 | + | let PoolMatcherDisabled = 3 | |
17 | + | ||
18 | + | let PoolShutdown = 4 | |
19 | + | ||
20 | + | let buyOrderType = 0 | |
21 | + | ||
22 | + | let sellOrderType = 1 | |
23 | + | ||
24 | + | let idxPoolAddress = 1 | |
25 | + | ||
26 | + | let idxPoolStatus = 2 | |
27 | + | ||
28 | + | let idxPoolLPAssetId = 3 | |
29 | + | ||
30 | + | let idxAmountAssetId = 4 | |
31 | + | ||
32 | + | let idxPriceAssetId = 5 | |
33 | + | ||
34 | + | let idxAmountAssetDecimals = 6 | |
35 | + | ||
36 | + | let idxPriceAssetDecimals = 7 | |
37 | + | ||
38 | + | let idxAmountAssetInternalId = 8 | |
39 | + | ||
40 | + | let idxPriceAssetInternalId = 9 | |
41 | + | ||
42 | + | let idxLPAssetDecimals = 10 | |
43 | + | ||
44 | + | let idxMatcherPublicKey = 11 | |
45 | + | ||
46 | + | let idxPoolAmountAssetAmt = 1 | |
47 | + | ||
48 | + | let idxPoolPriceAssetAmt = 2 | |
49 | + | ||
50 | + | let idxPoolLPAssetAmt = 3 | |
51 | + | ||
52 | + | func keyPriceLast () = "%s%s__price__last" | |
53 | + | ||
54 | + | ||
55 | + | func keyPriceHistory (h,timestamp) = makeString(["%s%s%d%d__price__history", toString(h), toString(timestamp)], SEP) | |
56 | + | ||
57 | + | ||
58 | + | func keyPoolLiquidity (internalAmountAsset,internalPriceAsset) = (((("%d%d%s__" + internalAmountAsset) + "__") + internalPriceAsset) + "__locked") | |
59 | + | ||
60 | + | ||
61 | + | func keyPoolLiquidityByUser (internalAmountAsset,internalPriceAsset,userAddress) = (((((("%d%d%s%s__" + internalAmountAsset) + "__") + internalPriceAsset) + "__") + userAddress) + "__locked") | |
62 | + | ||
63 | + | ||
64 | + | func keyPutActionByUser (userAddress,txId) = ((("%s%s%s__P__" + userAddress) + "__") + txId) | |
65 | + | ||
66 | + | ||
67 | + | func keyGetActionByUser (userAddress,txId) = ((("%s%s%s__G__" + userAddress) + "__") + txId) | |
68 | + | ||
69 | + | ||
70 | + | func keyAmountAsset () = "%s__amountAsset" | |
71 | + | ||
72 | + | ||
73 | + | func keyPriceAsset () = "%s__priceAsset" | |
74 | + | ||
75 | + | ||
76 | + | func keyMappingPoolContractAddressToPoolAssets (poolContractAddress) = (("%s%s%s__" + poolContractAddress) + "__mappings__poolContract2LpAsset") | |
77 | + | ||
78 | + | ||
79 | + | func keyPoolConfig (amountAssetInternal,priceAssetInternal) = (((("%d%d%s__" + amountAssetInternal) + "__") + priceAssetInternal) + "__config") | |
80 | + | ||
81 | + | ||
82 | + | func keyMappingsBaseAsset2internalId (baseAssetStr) = ("%s%s%s__mappings__baseAsset2internalId__" + baseAssetStr) | |
83 | + | ||
84 | + | ||
85 | + | func keyAllPoolsShutdown () = "%s__shutdown" | |
86 | + | ||
87 | + | ||
88 | + | func keyPoolWeight (contractAddress) = ("%s%d__poolWeight__" + contractAddress) | |
89 | + | ||
90 | + | ||
91 | + | func isGlobalShutdown () = valueOrElse(getBoolean(value(addressFromString(factoryAddressString)), keyAllPoolsShutdown()), false) | |
92 | + | ||
93 | + | ||
94 | + | func getPoolConfig () = { | |
95 | + | let poolAmountAsset = valueOrErrorMessage(getString(keyAmountAsset()), "No config for amount asset found") | |
96 | + | let poolPriceAsset = valueOrErrorMessage(getString(keyPriceAsset()), "No config for price asset found") | |
97 | + | let poolPriceAssetInternal = valueOrErrorMessage(getInteger(value(addressFromString(factoryAddressString)), keyMappingsBaseAsset2internalId(poolPriceAsset)), "No config for internal price asset found") | |
98 | + | let poolAmountAssetInternal = valueOrErrorMessage(getInteger(value(addressFromString(factoryAddressString)), keyMappingsBaseAsset2internalId(poolAmountAsset)), "No config for internal amount asset found") | |
99 | + | split(valueOrErrorMessage(getString(addressFromStringValue(factoryAddressString), keyPoolConfig(toString(poolAmountAssetInternal), toString(poolPriceAssetInternal))), "No factory config found for pool assets."), SEP) | |
100 | + | } | |
101 | + | ||
102 | + | ||
103 | + | func getPoolLiquidity (amountAssetInternalId,priceAssetInternalId) = { | |
104 | + | let currentPoolLiquidityValue = getString(keyPoolLiquidity(amountAssetInternalId, priceAssetInternalId)) | |
105 | + | if (!(isDefined(currentPoolLiquidityValue))) | |
106 | + | then ["", "0", "0", "0"] | |
107 | + | else split(value(currentPoolLiquidityValue), SEP) | |
108 | + | } | |
109 | + | ||
110 | + | ||
111 | + | func getPoolLiquidityByUser (amountAssetInternalId,priceAssetInternalId,userAddress) = { | |
112 | + | let currentPoolLiquidityValue = getString(keyPoolLiquidityByUser(amountAssetInternalId, priceAssetInternalId, userAddress)) | |
113 | + | if (!(isDefined(currentPoolLiquidityValue))) | |
114 | + | then ["", "0", "0", "0", "0"] | |
115 | + | else split(value(currentPoolLiquidityValue), SEP) | |
116 | + | } | |
117 | + | ||
118 | + | ||
119 | + | func dataPoolLiquidity (amountAssetLocked,priceAssetLocked,lpTokenLocked) = makeString(["%d%d%d", toString(amountAssetLocked), toString(priceAssetLocked), toString(lpTokenLocked)], SEP) | |
120 | + | ||
121 | + | ||
122 | + | func dataPoolLiquidityByUser (amountAssetLocked,priceAssetLocked,lpTokenLocked,userAddress) = makeString(["%d%d%d", toString(amountAssetLocked), toString(priceAssetLocked), toString(lpTokenLocked)], SEP) | |
123 | + | ||
124 | + | ||
125 | + | func dataPutActionInfo (inAmountAssetAmt,inPriceAssetAmt,outLpAmt,price,slippageTolerancePassedByUser,slippageToleranceReal,txHeight,txTimestamp) = makeString(["%d%d%d%d%d%d%d", toString(inAmountAssetAmt), toString(inPriceAssetAmt), toString(outLpAmt), toString(price), toString(slippageTolerancePassedByUser), toString(slippageToleranceReal), toString(txHeight), toString(txTimestamp)], SEP) | |
126 | + | ||
127 | + | ||
128 | + | 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) | |
129 | + | ||
130 | + | ||
131 | + | func privateCastAssetToMaxDecimals (assetDecimals,assetAmount) = { | |
132 | + | let decimalsMult = pow(10, 0, (lPdecimals - assetDecimals), 0, 0, DOWN) | |
133 | + | $Tuple2((assetAmount * decimalsMult), decimalsMult) | |
134 | + | } | |
135 | + | ||
136 | + | ||
137 | + | func privateCastAssetToOriginDecimals (assetDecimals,assetAmount) = { | |
138 | + | let decimalsMult = pow(10, 0, (lPdecimals - assetDecimals), 0, 0, DOWN) | |
139 | + | $Tuple2((assetAmount / decimalsMult), decimalsMult) | |
140 | + | } | |
141 | + | ||
142 | + | ||
143 | + | func privateCalculatePrice (amoutAssetDecimals,priceAssetDecimals,amountAssetAmt,priceAssetAmt) = { | |
144 | + | let amountAssetPoolLockedAmt = privateCastAssetToMaxDecimals(amoutAssetDecimals, amountAssetAmt)._1 | |
145 | + | let priceAssetPoolLockedAmt = privateCastAssetToMaxDecimals(priceAssetDecimals, priceAssetAmt)._1 | |
146 | + | fraction(priceAssetPoolLockedAmt, decimalsMultPrice, amountAssetPoolLockedAmt) | |
147 | + | } | |
148 | + | ||
149 | + | ||
150 | + | func privateGetAccountBalance (assetId) = if ((assetId == "WAVES")) | |
151 | + | then wavesBalance(this).available | |
152 | + | else assetBalance(this, fromBase58String(assetId)) | |
153 | + | ||
154 | + | ||
155 | + | func privateEstimateGetOperation (paymentLpAssetId,paymentLpAmount,userAddress) = { | |
156 | + | let poolConfigList = getPoolConfig() | |
157 | + | let lpAssetId = poolConfigList[idxPoolLPAssetId] | |
158 | + | let amountAssetId = poolConfigList[idxAmountAssetId] | |
159 | + | let priceAssetId = poolConfigList[idxPriceAssetId] | |
160 | + | let amountAssetInternalId = poolConfigList[idxAmountAssetInternalId] | |
161 | + | let priceAssetInternalId = poolConfigList[idxPriceAssetInternalId] | |
162 | + | let amoutAssetDecimals = parseIntValue(poolConfigList[idxAmountAssetDecimals]) | |
163 | + | let priceAssetDecimals = parseIntValue(poolConfigList[idxPriceAssetDecimals]) | |
164 | + | let poolStatus = poolConfigList[idxPoolStatus] | |
165 | + | let userLiquidityList = getPoolLiquidityByUser(amountAssetInternalId, priceAssetInternalId, userAddress) | |
166 | + | let userLPBalance = parseIntValue(userLiquidityList[idxPoolLPAssetAmt]) | |
167 | + | let userAmountAssetBalance = parseIntValue(userLiquidityList[idxPoolAmountAssetAmt]) | |
168 | + | let userPriceAssetBalance = parseIntValue(userLiquidityList[idxPoolPriceAssetAmt]) | |
169 | + | let poolLiquidityList = getPoolLiquidity(amountAssetInternalId, priceAssetInternalId) | |
170 | + | let poolLPBalance = parseIntValue(poolLiquidityList[idxPoolLPAssetAmt]) | |
171 | + | let poolAmountAssetBalance = parseIntValue(poolLiquidityList[idxPoolAmountAssetAmt]) | |
172 | + | let poolPriceAssetBalance = parseIntValue(poolLiquidityList[idxPoolPriceAssetAmt]) | |
173 | + | if ((lpAssetId != paymentLpAssetId)) | |
174 | + | then throw("Invalid asset passed.") | |
175 | + | else if ((paymentLpAmount > userLPBalance)) | |
176 | + | then throw("Invalid amount passed. Amount less than available.") | |
177 | + | else { | |
178 | + | let accountAmountAssetBalance = privateGetAccountBalance(amountAssetId) | |
179 | + | let accountPriceAssetBalance = privateGetAccountBalance(priceAssetId) | |
180 | + | let amountAssetPoolLockedAmt = privateCastAssetToMaxDecimals(amoutAssetDecimals, accountAmountAssetBalance)._1 | |
181 | + | let priceAssetPoolLockedAmt = privateCastAssetToMaxDecimals(priceAssetDecimals, accountPriceAssetBalance)._1 | |
182 | + | let outAmountAssetAmt = fraction(amountAssetPoolLockedAmt, paymentLpAmount, poolLPBalance) | |
183 | + | let outPriceAssetAmt = fraction(priceAssetPoolLockedAmt, paymentLpAmount, poolLPBalance) | |
184 | + | let outAmountAssetAmtFinal = privateCastAssetToOriginDecimals(amoutAssetDecimals, outAmountAssetAmt)._1 | |
185 | + | let outPriceAssetAmtFinal = privateCastAssetToOriginDecimals(priceAssetDecimals, outPriceAssetAmt)._1 | |
186 | + | let currentPrice = fraction(priceAssetPoolLockedAmt, decimalsMultPrice, amountAssetPoolLockedAmt) | |
187 | + | $Tuple14(outAmountAssetAmtFinal, outPriceAssetAmtFinal, amountAssetInternalId, priceAssetInternalId, userAmountAssetBalance, amountAssetId, userPriceAssetBalance, priceAssetId, userLPBalance, poolAmountAssetBalance, poolPriceAssetBalance, poolLPBalance, currentPrice, poolStatus) | |
188 | + | } | |
189 | + | } | |
190 | + | ||
191 | + | ||
192 | + | func privateEstimatePutOperation (slippageTolerance,inAmountAssetAmt,inAmountAssetId,inPriceAssetAmt,inPriceAssetId,userAddress) = { | |
193 | + | let poolConfigDataList = getPoolConfig() | |
194 | + | let lpAssetId = fromBase58String(poolConfigDataList[idxPoolLPAssetId]) | |
195 | + | let amountAssetId = poolConfigDataList[idxAmountAssetId] | |
196 | + | let priceAssetId = poolConfigDataList[idxPriceAssetId] | |
197 | + | let amountAssetInternalId = poolConfigDataList[idxAmountAssetInternalId] | |
198 | + | let priceAssetInternalId = poolConfigDataList[idxPriceAssetInternalId] | |
199 | + | let amoutAssetDecimals = parseIntValue(poolConfigDataList[idxAmountAssetDecimals]) | |
200 | + | let priceAssetDecimals = parseIntValue(poolConfigDataList[idxPriceAssetDecimals]) | |
201 | + | let poolStatus = poolConfigDataList[idxPoolStatus] | |
202 | + | let poolLiquidityDataList = getPoolLiquidity(amountAssetInternalId, priceAssetInternalId) | |
203 | + | let poolAmountAssetBalance = parseIntValue(poolLiquidityDataList[idxPoolAmountAssetAmt]) | |
204 | + | let poolPriceAssetBalance = parseIntValue(poolLiquidityDataList[idxPoolPriceAssetAmt]) | |
205 | + | let poolLPBalance = parseIntValue(poolLiquidityDataList[idxPoolLPAssetAmt]) | |
206 | + | let userLiquidityDataList = getPoolLiquidityByUser(amountAssetInternalId, priceAssetInternalId, userAddress) | |
207 | + | let userAmountAssetBalance = parseIntValue(userLiquidityDataList[idxPoolAmountAssetAmt]) | |
208 | + | let userPriceAssetBalance = parseIntValue(userLiquidityDataList[idxPoolPriceAssetAmt]) | |
209 | + | let userLPBalance = parseIntValue(userLiquidityDataList[idxPoolLPAssetAmt]) | |
210 | + | if (if ((amountAssetId != inAmountAssetId)) | |
211 | + | then true | |
212 | + | else (priceAssetId != inPriceAssetId)) | |
213 | + | then throw("Invalid amount or price asset passed.") | |
214 | + | else { | |
215 | + | let accountAmountAssetBalance = privateGetAccountBalance(amountAssetId) | |
216 | + | let accountPriceAssetBalance = privateGetAccountBalance(priceAssetId) | |
217 | + | let inAmountAssetAmtCalculatedTuple = privateCastAssetToMaxDecimals(amoutAssetDecimals, inAmountAssetAmt) | |
218 | + | let inPriceAssetAmtCalculatedTuple = privateCastAssetToMaxDecimals(priceAssetDecimals, inPriceAssetAmt) | |
219 | + | let inAmountAssetAmtCalculated = inAmountAssetAmtCalculatedTuple._1 | |
220 | + | let inPriceAssetAmtCalculated = inPriceAssetAmtCalculatedTuple._1 | |
221 | + | let userPrice = fraction(inPriceAssetAmtCalculated, decimalsMultPrice, inAmountAssetAmtCalculated) | |
222 | + | let amountAssetPoolLockedAmt = (accountAmountAssetBalance * inAmountAssetAmtCalculatedTuple._2) | |
223 | + | let priceAssetPoolLockedAmt = (accountPriceAssetBalance * inPriceAssetAmtCalculatedTuple._2) | |
224 | + | let curentPrice = if ((poolLPBalance == 0)) | |
225 | + | then 0 | |
226 | + | else fraction(priceAssetPoolLockedAmt, decimalsMultPrice, amountAssetPoolLockedAmt) | |
227 | + | let slippage = if ((curentPrice == 0)) | |
228 | + | then 0 | |
229 | + | else if ((curentPrice > userPrice)) | |
230 | + | then fraction((curentPrice - userPrice), 100, curentPrice) | |
231 | + | else fraction((userPrice - curentPrice), 100, curentPrice) | |
232 | + | if (if ((curentPrice != 0)) | |
233 | + | then ((slippage * decimalsMultPrice) > slippageTolerance) | |
234 | + | else false) | |
235 | + | then throw(((("Price slippage " + toString((slippage * decimalsMultPrice))) + " exceeded the passed limit of ") + toString(slippageTolerance))) | |
236 | + | else { | |
237 | + | let finalPrice = fraction((priceAssetPoolLockedAmt + inPriceAssetAmtCalculated), decimalsMultPrice, (amountAssetPoolLockedAmt + inAmountAssetAmtCalculated)) | |
238 | + | let outLpAmount = if ((poolLPBalance == 0)) | |
239 | + | then { | |
240 | + | let partA = pow(inAmountAssetAmtCalculated, 0, 5, 1, 0, DOWN) | |
241 | + | let partB = pow(inPriceAssetAmtCalculated, 0, 5, 1, 0, DOWN) | |
242 | + | (partA * partB) | |
243 | + | } | |
244 | + | else { | |
245 | + | let lpAmtByAmountAsset = fraction(poolLPBalance, inAmountAssetAmtCalculated, amountAssetPoolLockedAmt) | |
246 | + | let lpAmtByPriceAsset = fraction(poolLPBalance, inPriceAssetAmtCalculated, priceAssetPoolLockedAmt) | |
247 | + | if ((lpAmtByPriceAsset > lpAmtByAmountAsset)) | |
248 | + | then lpAmtByAmountAsset | |
249 | + | else lpAmtByPriceAsset | |
250 | + | } | |
251 | + | $Tuple13(outLpAmount, finalPrice, userAmountAssetBalance, userPriceAssetBalance, userLPBalance, poolAmountAssetBalance, poolPriceAssetBalance, poolLPBalance, amountAssetInternalId, priceAssetInternalId, lpAssetId, slippage, poolStatus) | |
252 | + | } | |
253 | + | } | |
254 | + | } | |
255 | + | ||
256 | + | ||
257 | + | func validateMatcherOrderAllowed (order) = { | |
258 | + | let poolConfigDataList = getPoolConfig() | |
259 | + | let amountAssetId = poolConfigDataList[idxAmountAssetId] | |
260 | + | let priceAssetId = poolConfigDataList[idxPriceAssetId] | |
261 | + | let poolStatus = parseIntValue(poolConfigDataList[idxPoolStatus]) | |
262 | + | let matcherPublicKeyStr = poolConfigDataList[idxMatcherPublicKey] | |
263 | + | let amountAssetDecimals = parseIntValue(poolConfigDataList[idxAmountAssetDecimals]) | |
264 | + | let priceAssetDecimals = parseIntValue(poolConfigDataList[idxPriceAssetDecimals]) | |
265 | + | let accountAmountAssetBalance = privateGetAccountBalance(amountAssetId) | |
266 | + | let accountPriceAssetBalance = privateGetAccountBalance(priceAssetId) | |
267 | + | let currentPrice = if ((order.orderType == Buy)) | |
268 | + | then privateCalculatePrice(amountAssetDecimals, priceAssetDecimals, (accountAmountAssetBalance + order.amount), accountPriceAssetBalance) | |
269 | + | else privateCalculatePrice(amountAssetDecimals, priceAssetDecimals, (accountAmountAssetBalance + order.amount), accountPriceAssetBalance) | |
270 | + | let isPoolStatusValid = if (if (if (isGlobalShutdown()) | |
271 | + | then true | |
272 | + | else (poolStatus == PoolMatcherDisabled)) | |
273 | + | then true | |
274 | + | else (poolStatus == PoolShutdown)) | |
275 | + | then false | |
276 | + | else true | |
277 | + | let isValidMatcherSign = true | |
278 | + | let orderAmountAsset = order.assetPair.amountAsset | |
279 | + | let orderAmountAssetStr = if ((orderAmountAsset == unit)) | |
280 | + | then "WAVES" | |
281 | + | else toBase58String(value(orderAmountAsset)) | |
282 | + | let orderPriceAsset = order.assetPair.priceAsset | |
283 | + | let orderPriceAssetStr = if ((orderPriceAsset == unit)) | |
284 | + | then "WAVES" | |
285 | + | else toBase58String(value(orderPriceAsset)) | |
286 | + | let isValidAssetPair = if (if ((orderAmountAssetStr != amountAssetId)) | |
287 | + | then true | |
288 | + | else (orderPriceAssetStr != priceAssetId)) | |
289 | + | then false | |
290 | + | else true | |
291 | + | let orderPrice = order.price | |
292 | + | let priceDecimals = ((8 + priceAssetDecimals) - amountAssetDecimals) | |
293 | + | let castedOrderPrice = privateCastAssetToMaxDecimals(priceDecimals, orderPrice)._1 | |
294 | + | let isOrderPriceValid = if ((order.orderType == Buy)) | |
295 | + | then (currentPrice >= castedOrderPrice) | |
296 | + | else (castedOrderPrice >= currentPrice) | |
297 | + | [if (if (if (isValidAssetPair) | |
298 | + | then isValidMatcherSign | |
299 | + | else false) | |
300 | + | then isPoolStatusValid | |
301 | + | else false) | |
302 | + | then isOrderPriceValid | |
303 | + | else false] | |
304 | + | } | |
305 | + | ||
306 | + | ||
307 | + | @Callable(i) | |
308 | + | func put (slippageTolerance) = { | |
309 | + | let pmtAmountAsset = value(i.payments[0]) | |
310 | + | let inAmountAssetAmt = pmtAmountAsset.amount | |
311 | + | let inAmountAssetId = if (!(isDefined(pmtAmountAsset.assetId))) | |
312 | + | then fromBase58String("WAVES") | |
313 | + | else value(pmtAmountAsset.assetId) | |
314 | + | let pmtPriceAsset = value(i.payments[1]) | |
315 | + | let inPriceAssetAmt = pmtPriceAsset.amount | |
316 | + | let inPriceAssetId = value(pmtPriceAsset.assetId) | |
317 | + | let estimatedPutResults = privateEstimatePutOperation(slippageTolerance, inAmountAssetAmt, toBase58String(inAmountAssetId), inPriceAssetAmt, toBase58String(inPriceAssetId), toString(i.caller)) | |
318 | + | let outLpAmount = estimatedPutResults._1 | |
319 | + | let curentPrice = estimatedPutResults._2 | |
320 | + | let userAmountAssetBalance = estimatedPutResults._3 | |
321 | + | let userPriceAssetBalance = estimatedPutResults._4 | |
322 | + | let userLPBalance = estimatedPutResults._5 | |
323 | + | let poolAmountAssetBalance = estimatedPutResults._6 | |
324 | + | let poolPriceAssetBalance = estimatedPutResults._7 | |
325 | + | let poolLPBalance = estimatedPutResults._8 | |
326 | + | let amountAssetInternalId = estimatedPutResults._9 | |
327 | + | let priceAssetInternalId = estimatedPutResults._10 | |
328 | + | let lpAssetId = estimatedPutResults._11 | |
329 | + | let slippageCalculated = estimatedPutResults._12 | |
330 | + | let poolStatus = parseIntValue(estimatedPutResults._13) | |
331 | + | let emitLPAssetOnFactory = invoke(addressFromStringValue(factoryAddressString), "emit", [outLpAmount], nil) | |
332 | + | if ((emitLPAssetOnFactory == emitLPAssetOnFactory)) | |
333 | + | then if ((emitLPAssetOnFactory != "success")) | |
334 | + | then throw("LP asset reissue failed during emit call on factory.") | |
335 | + | else if (if (if (isGlobalShutdown()) | |
336 | + | then true | |
337 | + | else (poolStatus == PoolPutDisabled)) | |
338 | + | then true | |
339 | + | else (poolStatus == PoolShutdown)) | |
340 | + | then throw(("Put operation is blocked by admin. Status = " + toString(poolStatus))) | |
341 | + | else [StringEntry(keyPriceLast(), ("%s__" + toString(curentPrice))), StringEntry(keyPriceHistory(height, lastBlock.timestamp), ("%s__" + toString(curentPrice))), StringEntry(keyPutActionByUser(toString(i.caller), toBase58String(i.transactionId)), dataPutActionInfo(inAmountAssetAmt, inPriceAssetAmt, outLpAmount, curentPrice, slippageTolerance, slippageCalculated, height, lastBlock.timestamp)), StringEntry(keyPoolLiquidityByUser(amountAssetInternalId, priceAssetInternalId, toString(i.caller)), dataPoolLiquidity((userAmountAssetBalance + inAmountAssetAmt), (userPriceAssetBalance + inPriceAssetAmt), (userLPBalance + outLpAmount))), StringEntry(keyPoolLiquidity(amountAssetInternalId, priceAssetInternalId), dataPoolLiquidity((poolAmountAssetBalance + inAmountAssetAmt), (poolPriceAssetBalance + inPriceAssetAmt), (poolLPBalance + outLpAmount))), ScriptTransfer(i.caller, outLpAmount, lpAssetId)] | |
342 | + | else throw("Strict value is not equal to itself.") | |
343 | + | } | |
344 | + | ||
345 | + | ||
346 | + | ||
347 | + | @Callable(i) | |
348 | + | func get () = { | |
349 | + | let pmtAmountAsset = value(i.payments[0]) | |
350 | + | let pmtAssetId = value(pmtAmountAsset.assetId) | |
351 | + | let pmtAssetAmount = pmtAmountAsset.amount | |
352 | + | let results = privateEstimateGetOperation(toBase58String(pmtAssetId), pmtAssetAmount, toString(i.caller)) | |
353 | + | let outAmountAssetAmt = results._1 | |
354 | + | let outPriceAssetAmt = results._2 | |
355 | + | let amountAssetInternalId = results._3 | |
356 | + | let priceAssetInternalId = results._4 | |
357 | + | let userAmountAssetBalance = results._5 | |
358 | + | let amountAssetId = results._6 | |
359 | + | let userPriceAssetBalance = results._7 | |
360 | + | let priceAssetId = results._8 | |
361 | + | let userLPBalance = results._9 | |
362 | + | let poolAmountAssetBalance = results._10 | |
363 | + | let poolPriceAssetBalance = results._11 | |
364 | + | let poolLPBalance = results._12 | |
365 | + | let currentPrice = results._13 | |
366 | + | let poolStatus = parseIntValue(results._14) | |
367 | + | if (if (isGlobalShutdown()) | |
368 | + | then true | |
369 | + | else (poolStatus == PoolShutdown)) | |
370 | + | then throw(("Get operation is blocked by admin. Status = " + toString(poolStatus))) | |
371 | + | else { | |
372 | + | let burnLPAssetOnFactory = invoke(addressFromStringValue(factoryAddressString), "burn", [pmtAssetAmount], nil) | |
373 | + | if ((burnLPAssetOnFactory == burnLPAssetOnFactory)) | |
374 | + | then if ((burnLPAssetOnFactory != "success")) | |
375 | + | then throw("LP asset burn failed during emit call on factory.") | |
376 | + | else [ScriptTransfer(i.caller, outAmountAssetAmt, if ((amountAssetId == "WAVES")) | |
377 | + | then unit | |
378 | + | else 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)))] | |
379 | + | else throw("Strict value is not equal to itself.") | |
380 | + | } | |
381 | + | } | |
382 | + | ||
383 | + | ||
384 | + | ||
385 | + | @Callable(i) | |
386 | + | func activate (amountAssetStr,priceAssetStr,lpAssetName,lpAssetDescr) = if ((toString(i.caller) != factoryAddressString)) | |
387 | + | then throw("permissions denied") | |
388 | + | else $Tuple2([StringEntry(keyAmountAsset(), amountAssetStr), StringEntry(keyPriceAsset(), priceAssetStr)], "sucess") | |
389 | + | ||
390 | + | ||
391 | + | ||
392 | + | @Callable(i) | |
393 | + | func statsREADONLY () = { | |
394 | + | let poolConfigDataList = getPoolConfig() | |
395 | + | let lpAssetId = fromBase58String(poolConfigDataList[idxPoolLPAssetId]) | |
396 | + | let amountAssetId = poolConfigDataList[idxAmountAssetId] | |
397 | + | let priceAssetId = poolConfigDataList[idxPriceAssetId] | |
398 | + | let amountAssetInternalId = poolConfigDataList[idxAmountAssetInternalId] | |
399 | + | let priceAssetInternalId = poolConfigDataList[idxPriceAssetInternalId] | |
400 | + | let amoutAssetDecimals = parseIntValue(poolConfigDataList[idxAmountAssetDecimals]) | |
401 | + | let priceAssetDecimals = parseIntValue(poolConfigDataList[idxPriceAssetDecimals]) | |
402 | + | let poolLiquidityDataList = getPoolLiquidity(amountAssetInternalId, priceAssetInternalId) | |
403 | + | let poolLPBalance = parseIntValue(poolLiquidityDataList[idxPoolLPAssetAmt]) | |
404 | + | let accountAmountAssetBalance = privateGetAccountBalance(amountAssetId) | |
405 | + | let accountPriceAssetBalance = privateGetAccountBalance(priceAssetId) | |
406 | + | let amountAssetPoolLockedAmt = privateCastAssetToMaxDecimals(amoutAssetDecimals, accountAmountAssetBalance)._1 | |
407 | + | let priceAssetPoolLockedAmt = privateCastAssetToMaxDecimals(priceAssetDecimals, accountPriceAssetBalance)._1 | |
408 | + | let lpPriceInAmountAsset = fraction(amountAssetPoolLockedAmt, (1 * decimalsMultPrice), poolLPBalance) | |
409 | + | let lpPriceInPriceAsset = fraction(priceAssetPoolLockedAmt, (1 * decimalsMultPrice), poolLPBalance) | |
410 | + | let currentPrice = privateCalculatePrice(amoutAssetDecimals, priceAssetDecimals, accountAmountAssetBalance, accountPriceAssetBalance) | |
411 | + | let poolWeight = valueOrElse(getInteger(value(addressFromString(factoryAddressString)), keyPoolWeight(toString(this))), 0) | |
412 | + | $Tuple2(nil, makeString(["%d%d%d%d%d%d%d", toString(accountAmountAssetBalance), toString(accountPriceAssetBalance), toString(poolLPBalance), toString(currentPrice), toString(lpPriceInAmountAsset), toString(lpPriceInPriceAsset), toString(poolWeight)], SEP)) | |
413 | + | } | |
414 | + | ||
415 | + | ||
416 | + | ||
417 | + | @Callable(i) | |
418 | + | func evaluatePutByAmountAssetREADONLY (slippageTolerance,inAmountAssetAmt,userAddress) = { | |
419 | + | let poolConfigDataList = getPoolConfig() | |
420 | + | let lpAssetId = fromBase58String(poolConfigDataList[idxPoolLPAssetId]) | |
421 | + | let amountAssetId = poolConfigDataList[idxAmountAssetId] | |
422 | + | let priceAssetId = poolConfigDataList[idxPriceAssetId] | |
423 | + | let amountAssetInternalId = poolConfigDataList[idxAmountAssetInternalId] | |
424 | + | let priceAssetInternalId = poolConfigDataList[idxPriceAssetInternalId] | |
425 | + | let amoutAssetDecimals = parseIntValue(poolConfigDataList[idxAmountAssetDecimals]) | |
426 | + | let priceAssetDecimals = parseIntValue(poolConfigDataList[idxPriceAssetDecimals]) | |
427 | + | let poolStatus = poolConfigDataList[idxPoolStatus] | |
428 | + | let poolLiquidityDataList = getPoolLiquidity(amountAssetInternalId, priceAssetInternalId) | |
429 | + | let poolLPBalance = parseIntValue(poolLiquidityDataList[idxPoolLPAssetAmt]) | |
430 | + | let accountAmountAssetBalance = privateGetAccountBalance(amountAssetId) | |
431 | + | let accountPriceAssetBalance = privateGetAccountBalance(priceAssetId) | |
432 | + | let amountAssetAmtCalculatedTuple = privateCastAssetToMaxDecimals(amoutAssetDecimals, accountAmountAssetBalance) | |
433 | + | let priceAssetAmtCalculatedTuple = privateCastAssetToMaxDecimals(priceAssetDecimals, accountPriceAssetBalance) | |
434 | + | let curentPrice = if ((poolLPBalance == 0)) | |
435 | + | then 0 | |
436 | + | else fraction(priceAssetAmtCalculatedTuple._1, decimalsMultPrice, amountAssetAmtCalculatedTuple._1) | |
437 | + | let inPriceAssetAmtCalculated = fraction(inAmountAssetAmt, curentPrice, decimalsMultPrice) | |
438 | + | let inPriceAssetAmt = privateCastAssetToOriginDecimals(priceAssetDecimals, inPriceAssetAmtCalculated)._1 | |
439 | + | let results = privateEstimatePutOperation(slippageTolerance, inAmountAssetAmt, amountAssetId, inPriceAssetAmt, priceAssetId, userAddress) | |
440 | + | $Tuple2(nil, makeString(["%d%d%d%d%d%d", toString(results._1), toString(results._2), toString(results._6), toString(results._7), toString(results._8), results._13], SEP)) | |
441 | + | } | |
442 | + | ||
443 | + | ||
444 | + | ||
445 | + | @Callable(i) | |
446 | + | func evaluatePutByPriceAssetREADONLY (slippageTolerance,inPriceAssetAmt,userAddress) = { | |
447 | + | let poolConfigDataList = getPoolConfig() | |
448 | + | let lpAssetId = fromBase58String(poolConfigDataList[idxPoolLPAssetId]) | |
449 | + | let amountAssetId = poolConfigDataList[idxAmountAssetId] | |
450 | + | let priceAssetId = poolConfigDataList[idxPriceAssetId] | |
451 | + | let amountAssetInternalId = poolConfigDataList[idxAmountAssetInternalId] | |
452 | + | let priceAssetInternalId = poolConfigDataList[idxPriceAssetInternalId] | |
453 | + | let amoutAssetDecimals = parseIntValue(poolConfigDataList[idxAmountAssetDecimals]) | |
454 | + | let priceAssetDecimals = parseIntValue(poolConfigDataList[idxPriceAssetDecimals]) | |
455 | + | let poolStatus = poolConfigDataList[idxPoolStatus] | |
456 | + | let poolLiquidityDataList = getPoolLiquidity(amountAssetInternalId, priceAssetInternalId) | |
457 | + | let poolLPBalance = parseIntValue(poolLiquidityDataList[idxPoolLPAssetAmt]) | |
458 | + | let accountAmountAssetBalance = privateGetAccountBalance(amountAssetId) | |
459 | + | let accountPriceAssetBalance = privateGetAccountBalance(priceAssetId) | |
460 | + | let amountAssetAmtCalculatedTuple = privateCastAssetToMaxDecimals(amoutAssetDecimals, accountAmountAssetBalance) | |
461 | + | let priceAssetAmtCalculatedTuple = privateCastAssetToMaxDecimals(priceAssetDecimals, accountPriceAssetBalance) | |
462 | + | let inPriceAssetAmtCalculatedTuple = privateCastAssetToMaxDecimals(priceAssetDecimals, inPriceAssetAmt) | |
463 | + | let curentPrice = if ((poolLPBalance == 0)) | |
464 | + | then 0 | |
465 | + | else fraction(priceAssetAmtCalculatedTuple._1, decimalsMultPrice, amountAssetAmtCalculatedTuple._1) | |
466 | + | let inAmountAssetAmtCalculated = fraction(inPriceAssetAmtCalculatedTuple._1, decimalsMultPrice, curentPrice) | |
467 | + | let inAmountAssetAmt = privateCastAssetToOriginDecimals(amoutAssetDecimals, inAmountAssetAmtCalculated)._1 | |
468 | + | let results = privateEstimatePutOperation(slippageTolerance, inAmountAssetAmt, amountAssetId, inPriceAssetAmt, priceAssetId, userAddress) | |
469 | + | $Tuple2(nil, makeString(["%d%d%d%d%d%d", toString(results._1), toString(results._2), toString(results._6), toString(results._7), toString(results._8), results._13], SEP)) | |
470 | + | } | |
471 | + | ||
472 | + | ||
473 | + | ||
474 | + | @Callable(i) | |
475 | + | func evaluateGetREADONLY (paymentLpAssetId,paymentLpAmount,userAddress) = { | |
476 | + | let results = privateEstimateGetOperation(paymentLpAssetId, paymentLpAmount, userAddress) | |
477 | + | $Tuple2(nil, makeString(["%d%d%d%d%d%s%d%s%d%d%s%d%d", toString(results._1), toString(results._2), toString(results._10), toString(results._11), toString(results._12), toString(results._13), results._14], SEP)) | |
478 | + | } | |
479 | + | ||
480 | + | ||
481 | + | ||
482 | + | @Callable(i) | |
483 | + | func hashREADONLY () = $Tuple2(nil, toBase64String(value(scriptHash(this)))) | |
484 | + | ||
485 | + | ||
486 | + | @Verifier(tx) | |
487 | + | func verify () = match tx { | |
488 | + | case order: Order => | |
489 | + | validateMatcherOrderAllowed(order)[1] | |
490 | + | case _ => | |
491 | + | sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
492 | + | } | |
493 | + |
github/deemru/w8io/026f985 33.85 ms ◑