tx · 5eboxr9J6DV9Enb6Xi65gwVAcsVnUdhbjJmg9JXNjB72 3N1TeiekUQhrqux6LjXWhJjUTrgLPJZxBtT: -0.01000000 Waves 2021.11.02 11:30 [1773126] smart account 3N1TeiekUQhrqux6LjXWhJjUTrgLPJZxBtT > SELF 0.00000000 Waves
{ "type": 13, "id": "5eboxr9J6DV9Enb6Xi65gwVAcsVnUdhbjJmg9JXNjB72", "fee": 1000000, "feeAssetId": null, "timestamp": 1635841840808, "version": 1, "sender": "3N1TeiekUQhrqux6LjXWhJjUTrgLPJZxBtT", "senderPublicKey": "DvHRUamE97xEXsqx1rtLMf6DyHcJkZUs9kwyDVPT4zro", "proofs": [ "5EogKJBmtDPWnHJjSmmJFiTKq4EmkxA5rcArkDoK1rc9rKU5Qu8B9DnMY4iotJ1Jzt5DBccJoPW55ZT3K8WbXv7F" ], "script": "base64:AAIFAAAAAAAAAGgIAhIECgIICBIECgIBBBIDCgEBEgASBAoCAQESBAoCCAgSABIDCgEIEgUKAwEBARIECgIBARIECgIIARIECgIICBILCgkIAQECAQIIBAQSBgoECAgBCBIAEgMKAQESAwoBARIECgIIAQAAAEIAAAAACmxQZGVjaW1hbHMAAAAAAAAAAAgAAAAABnNjYWxlOAAAAAAABfXhAAAAAAAMc2NhbGU4QmlnSW50CQABNgAAAAEAAAAAAAX14QAAAAAAB3NjYWxlMTgJAAE2AAAAAQAN4Lazp2QAAAAAAAAKemVyb0JpZ0ludAkAATYAAAABAAAAAAAAAAAAAAAAAANTRVACAAAAAl9fAAAAAAVFTVBUWQIAAAAAAAAAAApQb29sQWN0aXZlAAAAAAAAAAABAAAAAA9Qb29sUHV0RGlzYWJsZWQAAAAAAAAAAAIAAAAAE1Bvb2xNYXRjaGVyRGlzYWJsZWQAAAAAAAAAAAMAAAAADFBvb2xTaHV0ZG93bgAAAAAAAAAABAAAAAAOaWR4UG9vbEFkZHJlc3MAAAAAAAAAAAEAAAAADWlkeFBvb2xTdGF0dXMAAAAAAAAAAAIAAA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AAAABQAAAAVFTVBUWQMJAAAAAAAAAgUAAAANbWFuYWdlclB1YmxpYwUAAAAFRU1QVFkJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAACAUAAAACdHgAAAAPc2VuZGVyUHVibGljS2V5CQAB9AAAAAMIBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAAkAAlkAAAABBQAAAA1tYW5hZ2VyUHVibGljyEBogw==", "chainId": 84, "height": 1773126, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: none Next: AfjRLnTqNSjGVysMM6JW3xfeCuseSZ4B9SDLwiKC1zZz Full:
Old | New | Differences | |
---|---|---|---|
1 | - | # no script | |
1 | + | {-# STDLIB_VERSION 5 #-} | |
2 | + | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | + | {-# CONTENT_TYPE DAPP #-} | |
4 | + | let lPdecimals = 8 | |
5 | + | ||
6 | + | let scale8 = 100000000 | |
7 | + | ||
8 | + | let scale8BigInt = toBigInt(100000000) | |
9 | + | ||
10 | + | let scale18 = toBigInt(1000000000000000000) | |
11 | + | ||
12 | + | let zeroBigInt = toBigInt(0) | |
13 | + | ||
14 | + | let SEP = "__" | |
15 | + | ||
16 | + | let EMPTY = "" | |
17 | + | ||
18 | + | let PoolActive = 1 | |
19 | + | ||
20 | + | let PoolPutDisabled = 2 | |
21 | + | ||
22 | + | let PoolMatcherDisabled = 3 | |
23 | + | ||
24 | + | let PoolShutdown = 4 | |
25 | + | ||
26 | + | let idxPoolAddress = 1 | |
27 | + | ||
28 | + | let idxPoolStatus = 2 | |
29 | + | ||
30 | + | let idxPoolLPAssetId = 3 | |
31 | + | ||
32 | + | let idxAmtAssetId = 4 | |
33 | + | ||
34 | + | let idxPriceAssetId = 5 | |
35 | + | ||
36 | + | let idxAmtAssetDcm = 6 | |
37 | + | ||
38 | + | let idxPriceAssetDcm = 7 | |
39 | + | ||
40 | + | let idxIAmtAssetId = 8 | |
41 | + | ||
42 | + | let idxIPriceAssetId = 9 | |
43 | + | ||
44 | + | let idxLPAssetDcm = 10 | |
45 | + | ||
46 | + | let idxPoolAmtAssetAmt = 1 | |
47 | + | ||
48 | + | let idxPoolPriceAssetAmt = 2 | |
49 | + | ||
50 | + | let idxPoolLPAssetAmt = 3 | |
51 | + | ||
52 | + | let idxFactoryStakingContract = 1 | |
53 | + | ||
54 | + | let idxFactorySlippageContract = 7 | |
55 | + | ||
56 | + | func toX18 (origVal,origScaleMult) = fraction(toBigInt(origVal), scale18, toBigInt(origScaleMult)) | |
57 | + | ||
58 | + | ||
59 | + | func fromX18 (val,resultScaleMult) = toInt(fraction(val, toBigInt(resultScaleMult), scale18)) | |
60 | + | ||
61 | + | ||
62 | + | func toScale (amt,resScale,curScale) = fraction(amt, resScale, curScale) | |
63 | + | ||
64 | + | ||
65 | + | func abs (val) = if ((zeroBigInt > val)) | |
66 | + | then -(val) | |
67 | + | else val | |
68 | + | ||
69 | + | ||
70 | + | func keyFactoryContract () = "%s__factoryContract" | |
71 | + | ||
72 | + | ||
73 | + | func keyManagerPublicKey () = "%s__managerPublicKey" | |
74 | + | ||
75 | + | ||
76 | + | func keyPriceLast () = "%s%s__price__last" | |
77 | + | ||
78 | + | ||
79 | + | func keyPriceHistory (h,timestamp) = makeString(["%s%s%d%d__price__history", toString(h), toString(timestamp)], SEP) | |
80 | + | ||
81 | + | ||
82 | + | func keyPutActionByUser (userAddress,txId) = ((("%s%s%s__P__" + userAddress) + "__") + txId) | |
83 | + | ||
84 | + | ||
85 | + | func keyGetActionByUser (userAddress,txId) = ((("%s%s%s__G__" + userAddress) + "__") + txId) | |
86 | + | ||
87 | + | ||
88 | + | func keyAmtAsset () = "%s__amountAsset" | |
89 | + | ||
90 | + | ||
91 | + | func keyPriceAsset () = "%s__priceAsset" | |
92 | + | ||
93 | + | ||
94 | + | func keyKHistoric (h,timestamp) = makeString(["%s%s%d%d__K_history", toString(h), toString(timestamp)], SEP) | |
95 | + | ||
96 | + | ||
97 | + | func keyFactoryConfig () = "%s__factoryConfig" | |
98 | + | ||
99 | + | ||
100 | + | func keyMatcherPub () = "%s%s__matcher__publicKey" | |
101 | + | ||
102 | + | ||
103 | + | func keyMappingPoolContractAddressToPoolAssets (poolContractAddress) = (("%s%s%s__" + poolContractAddress) + "__mappings__poolContract2LpAsset") | |
104 | + | ||
105 | + | ||
106 | + | func keyPoolConfig (iAmtAsset,iPriceAsset) = (((("%d%d%s__" + iAmtAsset) + "__") + iPriceAsset) + "__config") | |
107 | + | ||
108 | + | ||
109 | + | func keyMappingsBaseAsset2internalId (baseAssetStr) = ("%s%s%s__mappings__baseAsset2internalId__" + baseAssetStr) | |
110 | + | ||
111 | + | ||
112 | + | func keyAllPoolsShutdown () = "%s__shutdown" | |
113 | + | ||
114 | + | ||
115 | + | func keyPoolWeight (contractAddress) = ("%s%s__poolWeight__" + contractAddress) | |
116 | + | ||
117 | + | ||
118 | + | func throwOrderError (orderValid,senderValid,matcherValid) = throw(((((("order validation failed: orderValid=" + toString(orderValid)) + " senderValid=") + toString(senderValid)) + " matcherValid=") + toString(matcherValid))) | |
119 | + | ||
120 | + | ||
121 | + | func getStringOrFail (address,key) = valueOrErrorMessage(getString(address, key), makeString(["mandatory ", toString(address), ".", key, " is not defined"], "")) | |
122 | + | ||
123 | + | ||
124 | + | func getIntOrFail (address,key) = valueOrErrorMessage(getInteger(address, key), makeString(["mandatory ", toString(address), ".", key, " is not defined"], "")) | |
125 | + | ||
126 | + | ||
127 | + | let factoryContract = addressFromStringValue(getStringOrFail(this, keyFactoryContract())) | |
128 | + | ||
129 | + | func isGlobalShutdown () = valueOrElse(getBoolean(factoryContract, keyAllPoolsShutdown()), false) | |
130 | + | ||
131 | + | ||
132 | + | func getMatcherPubOrFail () = fromBase58String(getStringOrFail(factoryContract, keyMatcherPub())) | |
133 | + | ||
134 | + | ||
135 | + | func getPoolConfig () = { | |
136 | + | let amtAsset = getStringOrFail(this, keyAmtAsset()) | |
137 | + | let priceAsset = getStringOrFail(this, keyPriceAsset()) | |
138 | + | let iPriceAsset = getIntOrFail(factoryContract, keyMappingsBaseAsset2internalId(priceAsset)) | |
139 | + | let iAmtAsset = getIntOrFail(factoryContract, keyMappingsBaseAsset2internalId(amtAsset)) | |
140 | + | split(getStringOrFail(factoryContract, keyPoolConfig(toString(iAmtAsset), toString(iPriceAsset))), SEP) | |
141 | + | } | |
142 | + | ||
143 | + | ||
144 | + | func getFactoryConfig () = split(getStringOrFail(factoryContract, keyFactoryConfig()), SEP) | |
145 | + | ||
146 | + | ||
147 | + | 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) | |
148 | + | ||
149 | + | ||
150 | + | 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) | |
151 | + | ||
152 | + | ||
153 | + | func getAccBalance (assetId) = if ((assetId == "WAVES")) | |
154 | + | then wavesBalance(this).available | |
155 | + | else assetBalance(this, fromBase58String(assetId)) | |
156 | + | ||
157 | + | ||
158 | + | func calcPriceBigInt (prAmtX18,amAmtX18) = fraction(prAmtX18, scale18, amAmtX18) | |
159 | + | ||
160 | + | ||
161 | + | func privateCalcPrice (amAssetDcm,prAssetDcm,amAmt,prAmt) = { | |
162 | + | let amtAssetAmtX18 = toX18(amAmt, amAssetDcm) | |
163 | + | let priceAssetAmtX18 = toX18(prAmt, prAssetDcm) | |
164 | + | calcPriceBigInt(priceAssetAmtX18, amtAssetAmtX18) | |
165 | + | } | |
166 | + | ||
167 | + | ||
168 | + | func calcPrices (amAmt,prAmt,lpAmt) = { | |
169 | + | let cfg = getPoolConfig() | |
170 | + | let amtAssetDcm = parseIntValue(cfg[idxAmtAssetDcm]) | |
171 | + | let priceAssetDcm = parseIntValue(cfg[idxPriceAssetDcm]) | |
172 | + | let priceX18 = privateCalcPrice(amtAssetDcm, priceAssetDcm, amAmt, prAmt) | |
173 | + | let amAmtX18 = toX18(amAmt, amtAssetDcm) | |
174 | + | let prAmtX18 = toX18(prAmt, priceAssetDcm) | |
175 | + | let lpAmtX18 = toX18(lpAmt, scale8) | |
176 | + | let lpPriceInAmAssetX18 = calcPriceBigInt(amAmtX18, lpAmtX18) | |
177 | + | let lpPriceInPrAssetX18 = calcPriceBigInt(prAmtX18, lpAmtX18) | |
178 | + | [priceX18, lpPriceInAmAssetX18, lpPriceInPrAssetX18] | |
179 | + | } | |
180 | + | ||
181 | + | ||
182 | + | func calculatePrices (amAmt,prAmt,lpAmt) = { | |
183 | + | let prices = calcPrices(amAmt, prAmt, lpAmt) | |
184 | + | [fromX18(prices[0], scale8), fromX18(prices[1], scale8), fromX18(prices[2], scale8)] | |
185 | + | } | |
186 | + | ||
187 | + | ||
188 | + | func estimateGetOperation (txId58,pmtAssetId,pmtLpAmt,userAddress) = { | |
189 | + | let cfg = getPoolConfig() | |
190 | + | let lpAssetId = cfg[idxPoolLPAssetId] | |
191 | + | let amAssetId = cfg[idxAmtAssetId] | |
192 | + | let prAssetId = cfg[idxPriceAssetId] | |
193 | + | let amAssetDcm = parseIntValue(cfg[idxAmtAssetDcm]) | |
194 | + | let prAssetDcm = parseIntValue(cfg[idxPriceAssetDcm]) | |
195 | + | let poolStatus = cfg[idxPoolStatus] | |
196 | + | let lpEmission = valueOrErrorMessage(assetInfo(fromBase58String(lpAssetId)), (("Asset " + lpAssetId) + " doesn't exist")).quantity | |
197 | + | if ((lpAssetId != pmtAssetId)) | |
198 | + | then throw("Invalid asset passed.") | |
199 | + | else { | |
200 | + | let amBalance = getAccBalance(amAssetId) | |
201 | + | let amBalanceX18 = toX18(amBalance, amAssetDcm) | |
202 | + | let prBalance = getAccBalance(prAssetId) | |
203 | + | let prBalanceX18 = toX18(prBalance, prAssetDcm) | |
204 | + | let curPriceX18 = calcPriceBigInt(prBalanceX18, amBalanceX18) | |
205 | + | let curPrice = fromX18(curPriceX18, scale8) | |
206 | + | let pmtLpAmtX18 = toX18(pmtLpAmt, scale8) | |
207 | + | let lpEmissionX18 = toX18(lpEmission, scale8) | |
208 | + | let outAmAmtX18 = fraction(amBalanceX18, pmtLpAmtX18, lpEmissionX18) | |
209 | + | let outPrAmtX18 = fraction(prBalanceX18, pmtLpAmtX18, lpEmissionX18) | |
210 | + | let outAmAmt = fromX18(outAmAmtX18, amAssetDcm) | |
211 | + | let outPrAmt = fromX18(outPrAmtX18, prAssetDcm) | |
212 | + | let state = if ((txId58 == "")) | |
213 | + | then nil | |
214 | + | else [ScriptTransfer(userAddress, outAmAmt, if ((amAssetId == "WAVES")) | |
215 | + | then unit | |
216 | + | else fromBase58String(amAssetId)), ScriptTransfer(userAddress, outPrAmt, if ((prAssetId == "WAVES")) | |
217 | + | then unit | |
218 | + | else fromBase58String(prAssetId)), StringEntry(keyGetActionByUser(toString(userAddress), txId58), dataGetActionInfo(outAmAmt, outPrAmt, pmtLpAmt, curPrice, height, lastBlock.timestamp)), IntegerEntry(keyPriceLast(), curPrice), IntegerEntry(keyPriceHistory(height, lastBlock.timestamp), curPrice)] | |
219 | + | $Tuple10(outAmAmt, outPrAmt, amAssetId, prAssetId, amBalance, prBalance, lpEmission, curPriceX18, poolStatus, state) | |
220 | + | } | |
221 | + | } | |
222 | + | ||
223 | + | ||
224 | + | func estimatePutOperation (txId58,slippageTolerance,inAmAssetAmt,inAmAssetId,inPrAssetAmt,inPrAssetId,userAddress,isEvaluate,emitLp) = { | |
225 | + | let cfg = getPoolConfig() | |
226 | + | let lpAssetId = fromBase58String(cfg[idxPoolLPAssetId]) | |
227 | + | let amAssetIdStr = cfg[idxAmtAssetId] | |
228 | + | let prAssetIdStr = cfg[idxPriceAssetId] | |
229 | + | let iAmtAssetId = cfg[idxIAmtAssetId] | |
230 | + | let iPriceAssetId = cfg[idxIPriceAssetId] | |
231 | + | let amtAssetDcm = parseIntValue(cfg[idxAmtAssetDcm]) | |
232 | + | let priceAssetDcm = parseIntValue(cfg[idxPriceAssetDcm]) | |
233 | + | let poolStatus = cfg[idxPoolStatus] | |
234 | + | let lpEmission = valueOrErrorMessage(assetInfo(lpAssetId), (("Asset " + toBase58String(lpAssetId)) + " doesn't exist")).quantity | |
235 | + | let inAmAssetIdStr = toBase58String(valueOrElse(inAmAssetId, fromBase58String("WAVES"))) | |
236 | + | let inPrAssetIdStr = toBase58String(valueOrElse(inPrAssetId, fromBase58String("WAVES"))) | |
237 | + | if (if ((amAssetIdStr != inAmAssetIdStr)) | |
238 | + | then true | |
239 | + | else (prAssetIdStr != inPrAssetIdStr)) | |
240 | + | then throw("Invalid amt or price asset passed.") | |
241 | + | else { | |
242 | + | let amBalance = if (isEvaluate) | |
243 | + | then getAccBalance(amAssetIdStr) | |
244 | + | else (getAccBalance(amAssetIdStr) - inAmAssetAmt) | |
245 | + | let prBalance = if (isEvaluate) | |
246 | + | then getAccBalance(prAssetIdStr) | |
247 | + | else (getAccBalance(prAssetIdStr) - inPrAssetAmt) | |
248 | + | let inAmAssetAmtX18 = toX18(inAmAssetAmt, amtAssetDcm) | |
249 | + | let inPrAssetAmtX18 = toX18(inPrAssetAmt, priceAssetDcm) | |
250 | + | let userPriceX18 = calcPriceBigInt(inPrAssetAmtX18, inAmAssetAmtX18) | |
251 | + | let amBalanceX18 = toX18(amBalance, amtAssetDcm) | |
252 | + | let prBalanceX18 = toX18(prBalance, priceAssetDcm) | |
253 | + | let res = if ((lpEmission == 0)) | |
254 | + | then { | |
255 | + | let curPriceX18 = zeroBigInt | |
256 | + | let slippageX18 = zeroBigInt | |
257 | + | let lpAmtX18 = pow((inAmAssetAmtX18 * inPrAssetAmtX18), 0, toBigInt(5), 1, 0, DOWN) | |
258 | + | $Tuple5(fromX18(lpAmtX18, scale8), fromX18(inAmAssetAmtX18, amtAssetDcm), fromX18(inPrAssetAmtX18, priceAssetDcm), calcPriceBigInt((prBalanceX18 + inPrAssetAmtX18), (amBalanceX18 + inAmAssetAmtX18)), slippageX18) | |
259 | + | } | |
260 | + | else { | |
261 | + | let curPriceX18 = calcPriceBigInt(prBalanceX18, amBalanceX18) | |
262 | + | let slippageX18 = fraction(abs((curPriceX18 - userPriceX18)), scale18, curPriceX18) | |
263 | + | let slippageToleranceX18 = toX18(slippageTolerance, scale8) | |
264 | + | if (if ((curPriceX18 != zeroBigInt)) | |
265 | + | then (slippageX18 > slippageToleranceX18) | |
266 | + | else false) | |
267 | + | then throw(((("Price slippage " + toString(slippageX18)) + " exceeded the passed limit of ") + toString(slippageToleranceX18))) | |
268 | + | else { | |
269 | + | let lpEmissionX18 = toX18(lpEmission, scale8) | |
270 | + | let prViaAmX18 = fraction(inAmAssetAmtX18, curPriceX18, scale18) | |
271 | + | let amViaPrX18 = fraction(inPrAssetAmtX18, scale18, curPriceX18) | |
272 | + | let expectedAmts = if ((prViaAmX18 > inPrAssetAmtX18)) | |
273 | + | then $Tuple2(amViaPrX18, inPrAssetAmtX18) | |
274 | + | else $Tuple2(inAmAssetAmtX18, prViaAmX18) | |
275 | + | let expAmtAssetAmtX18 = expectedAmts._1 | |
276 | + | let expPriceAssetAmtX18 = expectedAmts._2 | |
277 | + | let lpAmtX18 = fraction(lpEmissionX18, expPriceAssetAmtX18, prBalanceX18) | |
278 | + | $Tuple5(fromX18(lpAmtX18, scale8), fromX18(expAmtAssetAmtX18, amtAssetDcm), fromX18(expPriceAssetAmtX18, priceAssetDcm), curPriceX18, slippageX18) | |
279 | + | } | |
280 | + | } | |
281 | + | let calcLpAmt = res._1 | |
282 | + | let calcAmAssetPmt = res._2 | |
283 | + | let calcPrAssetPmt = res._3 | |
284 | + | let curPrice = fromX18(res._4, scale8) | |
285 | + | let slippageCalc = fromX18(res._5, scale8) | |
286 | + | if ((0 >= calcLpAmt)) | |
287 | + | then throw("Invalid calculations. LP calculated is less than zero.") | |
288 | + | else { | |
289 | + | let emitLpAmt = if (!(emitLp)) | |
290 | + | then 0 | |
291 | + | else calcLpAmt | |
292 | + | let amDiff = (inAmAssetAmt - calcAmAssetPmt) | |
293 | + | let prDiff = (inPrAssetAmt - calcPrAssetPmt) | |
294 | + | let commonState = [IntegerEntry(keyPriceLast(), curPrice), IntegerEntry(keyPriceHistory(height, lastBlock.timestamp), curPrice), StringEntry(keyPutActionByUser(userAddress, txId58), dataPutActionInfo(calcAmAssetPmt, calcPrAssetPmt, emitLpAmt, curPrice, slippageTolerance, slippageCalc, height, lastBlock.timestamp, amDiff, prDiff))] | |
295 | + | $Tuple13(calcLpAmt, emitLpAmt, curPrice, amBalance, prBalance, lpEmission, lpAssetId, poolStatus, commonState, amDiff, prDiff, inAmAssetId, inPrAssetId) | |
296 | + | } | |
297 | + | } | |
298 | + | } | |
299 | + | ||
300 | + | ||
301 | + | func validateMatcherOrderAllowed (order) = { | |
302 | + | let cfg = getPoolConfig() | |
303 | + | let amtAssetId = cfg[idxAmtAssetId] | |
304 | + | let priceAssetId = cfg[idxPriceAssetId] | |
305 | + | let poolStatus = parseIntValue(cfg[idxPoolStatus]) | |
306 | + | let amtAssetDcm = parseIntValue(cfg[idxAmtAssetDcm]) | |
307 | + | let priceAssetDcm = parseIntValue(cfg[idxPriceAssetDcm]) | |
308 | + | let accAmtAssetBalance = getAccBalance(amtAssetId) | |
309 | + | let accPriceAssetBalance = getAccBalance(priceAssetId) | |
310 | + | let curPriceX18 = if ((order.orderType == Buy)) | |
311 | + | then privateCalcPrice(amtAssetDcm, priceAssetDcm, (accAmtAssetBalance + order.amount), accPriceAssetBalance) | |
312 | + | else privateCalcPrice(amtAssetDcm, priceAssetDcm, (accAmtAssetBalance - order.amount), accPriceAssetBalance) | |
313 | + | let curPrice = fromX18(curPriceX18, scale8) | |
314 | + | if (if (if (isGlobalShutdown()) | |
315 | + | then true | |
316 | + | else (poolStatus == PoolMatcherDisabled)) | |
317 | + | then true | |
318 | + | else (poolStatus == PoolShutdown)) | |
319 | + | then throw("Exchange operations disabled") | |
320 | + | else { | |
321 | + | let orderAmtAsset = order.assetPair.amountAsset | |
322 | + | let orderAmtAssetStr = if ((orderAmtAsset == unit)) | |
323 | + | then "WAVES" | |
324 | + | else toBase58String(value(orderAmtAsset)) | |
325 | + | let orderPriceAsset = order.assetPair.priceAsset | |
326 | + | let orderPriceAssetStr = if ((orderPriceAsset == unit)) | |
327 | + | then "WAVES" | |
328 | + | else toBase58String(value(orderPriceAsset)) | |
329 | + | if (if ((orderAmtAssetStr != amtAssetId)) | |
330 | + | then true | |
331 | + | else (orderPriceAssetStr != priceAssetId)) | |
332 | + | then throw("Wrong order assets.") | |
333 | + | else { | |
334 | + | let orderPrice = order.price | |
335 | + | let priceDcm = fraction(scale8, priceAssetDcm, amtAssetDcm) | |
336 | + | let castedOrderPrice = toScale(orderPrice, scale8, priceDcm) | |
337 | + | let isOrderPriceValid = if ((order.orderType == Buy)) | |
338 | + | then (curPrice >= castedOrderPrice) | |
339 | + | else (castedOrderPrice >= curPrice) | |
340 | + | true | |
341 | + | } | |
342 | + | } | |
343 | + | } | |
344 | + | ||
345 | + | ||
346 | + | func commonGet (i) = if ((size(i.payments) != 1)) | |
347 | + | then throw("exactly 1 payment is expected") | |
348 | + | else { | |
349 | + | let pmt = value(i.payments[0]) | |
350 | + | let pmtAssetId = value(pmt.assetId) | |
351 | + | let pmtAmt = pmt.amount | |
352 | + | let res = estimateGetOperation(toBase58String(i.transactionId), toBase58String(pmtAssetId), pmtAmt, i.caller) | |
353 | + | let outAmAmt = res._1 | |
354 | + | let outPrAmt = res._2 | |
355 | + | let poolStatus = parseIntValue(res._9) | |
356 | + | let state = res._10 | |
357 | + | if (if (isGlobalShutdown()) | |
358 | + | then true | |
359 | + | else (poolStatus == PoolShutdown)) | |
360 | + | then throw(("Get operation is blocked by admin. Status = " + toString(poolStatus))) | |
361 | + | else $Tuple5(outAmAmt, outPrAmt, pmtAmt, pmtAssetId, state) | |
362 | + | } | |
363 | + | ||
364 | + | ||
365 | + | func commonPut (i,slippageTolerance,emitLp) = if ((size(i.payments) != 2)) | |
366 | + | then throw("exactly 2 payments are expected") | |
367 | + | else { | |
368 | + | let amAssetPmt = value(i.payments[0]) | |
369 | + | let prAssetPmt = value(i.payments[1]) | |
370 | + | let estPut = estimatePutOperation(toBase58String(i.transactionId), slippageTolerance, amAssetPmt.amount, amAssetPmt.assetId, prAssetPmt.amount, prAssetPmt.assetId, toString(i.caller), false, emitLp) | |
371 | + | let poolStatus = parseIntValue(estPut._8) | |
372 | + | if (if (if (isGlobalShutdown()) | |
373 | + | then true | |
374 | + | else (poolStatus == PoolPutDisabled)) | |
375 | + | then true | |
376 | + | else (poolStatus == PoolShutdown)) | |
377 | + | then throw(("Put operation is blocked by admin. Status = " + toString(poolStatus))) | |
378 | + | else estPut | |
379 | + | } | |
380 | + | ||
381 | + | ||
382 | + | @Callable(i) | |
383 | + | func constructor (factoryContract,managerPublicKey) = if ((i.caller != this)) | |
384 | + | then throw("permissions denied") | |
385 | + | else [StringEntry(keyFactoryContract(), factoryContract), StringEntry(keyManagerPublicKey(), managerPublicKey)] | |
386 | + | ||
387 | + | ||
388 | + | ||
389 | + | @Callable(i) | |
390 | + | func put (slippageTolerance,shouldAutoStake) = { | |
391 | + | let factoryCfg = getFactoryConfig() | |
392 | + | let stakingContract = valueOrErrorMessage(addressFromString(factoryCfg[idxFactoryStakingContract]), "Error. Incorrect staking address.") | |
393 | + | let slippageContract = valueOrErrorMessage(addressFromString(factoryCfg[idxFactorySlippageContract]), "Error. Incorrect slippage contract address.") | |
394 | + | if ((0 > slippageTolerance)) | |
395 | + | then throw("Invalid slippageTolerance passed") | |
396 | + | else { | |
397 | + | let estPut = commonPut(i, slippageTolerance, true) | |
398 | + | let emitLpAmt = estPut._2 | |
399 | + | let lpAssetId = estPut._7 | |
400 | + | let state = estPut._9 | |
401 | + | let amDiff = estPut._10 | |
402 | + | let prDiff = estPut._11 | |
403 | + | let amId = estPut._12 | |
404 | + | let prId = estPut._13 | |
405 | + | let emitInv = invoke(factoryContract, "emit", [emitLpAmt], nil) | |
406 | + | if ((emitInv == emitInv)) | |
407 | + | then { | |
408 | + | let slippageAInv = if ((amDiff > 0)) | |
409 | + | then invoke(slippageContract, "put", nil, [AttachedPayment(amId, amDiff)]) | |
410 | + | else nil | |
411 | + | if ((slippageAInv == slippageAInv)) | |
412 | + | then { | |
413 | + | let slippagePInv = if ((prDiff > 0)) | |
414 | + | then invoke(slippageContract, "put", nil, [AttachedPayment(prId, prDiff)]) | |
415 | + | else nil | |
416 | + | if ((slippagePInv == slippagePInv)) | |
417 | + | then { | |
418 | + | let lpTransfer = if (shouldAutoStake) | |
419 | + | then { | |
420 | + | let slpStakeInv = invoke(stakingContract, "stake", nil, [AttachedPayment(lpAssetId, emitLpAmt)]) | |
421 | + | if ((slpStakeInv == slpStakeInv)) | |
422 | + | then nil | |
423 | + | else throw("Strict value is not equal to itself.") | |
424 | + | } | |
425 | + | else [ScriptTransfer(i.caller, emitLpAmt, lpAssetId)] | |
426 | + | (state ++ lpTransfer) | |
427 | + | } | |
428 | + | else throw("Strict value is not equal to itself.") | |
429 | + | } | |
430 | + | else throw("Strict value is not equal to itself.") | |
431 | + | } | |
432 | + | else throw("Strict value is not equal to itself.") | |
433 | + | } | |
434 | + | } | |
435 | + | ||
436 | + | ||
437 | + | ||
438 | + | @Callable(i) | |
439 | + | func putForFree (maxSlippage) = if ((0 > maxSlippage)) | |
440 | + | then throw("Invalid value passed") | |
441 | + | else { | |
442 | + | let estPut = commonPut(i, maxSlippage, false) | |
443 | + | estPut._9 | |
444 | + | } | |
445 | + | ||
446 | + | ||
447 | + | ||
448 | + | @Callable(i) | |
449 | + | func get () = { | |
450 | + | let res = commonGet(i) | |
451 | + | let outAmtAmt = res._1 | |
452 | + | let outPrAmt = res._2 | |
453 | + | let pmtAmt = res._3 | |
454 | + | let pmtAssetId = res._4 | |
455 | + | let state = res._5 | |
456 | + | let burnLPAssetOnFactory = invoke(factoryContract, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)]) | |
457 | + | if ((burnLPAssetOnFactory == burnLPAssetOnFactory)) | |
458 | + | then state | |
459 | + | else throw("Strict value is not equal to itself.") | |
460 | + | } | |
461 | + | ||
462 | + | ||
463 | + | ||
464 | + | @Callable(i) | |
465 | + | func getNoLess (noLessThenAmtAsset,noLessThenPriceAsset) = { | |
466 | + | let res = commonGet(i) | |
467 | + | let outAmAmt = res._1 | |
468 | + | let outPrAmt = res._2 | |
469 | + | let pmtAmt = res._3 | |
470 | + | let pmtAssetId = res._4 | |
471 | + | let state = res._5 | |
472 | + | if ((noLessThenAmtAsset > outAmAmt)) | |
473 | + | then throw(((("noLessThenAmtAsset failed: " + toString(outAmAmt)) + " < ") + toString(noLessThenAmtAsset))) | |
474 | + | else if ((noLessThenPriceAsset > outPrAmt)) | |
475 | + | then throw(((("noLessThenPriceAsset failed: " + toString(outPrAmt)) + " < ") + toString(noLessThenPriceAsset))) | |
476 | + | else { | |
477 | + | let burnLPAssetOnFactory = invoke(factoryContract, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)]) | |
478 | + | if ((burnLPAssetOnFactory == burnLPAssetOnFactory)) | |
479 | + | then state | |
480 | + | else throw("Strict value is not equal to itself.") | |
481 | + | } | |
482 | + | } | |
483 | + | ||
484 | + | ||
485 | + | ||
486 | + | @Callable(i) | |
487 | + | func activate (amtAssetStr,priceAssetStr) = if ((toString(i.caller) != toString(factoryContract))) | |
488 | + | then throw("permissions denied") | |
489 | + | else $Tuple2([StringEntry(keyAmtAsset(), amtAssetStr), StringEntry(keyPriceAsset(), priceAssetStr)], "success") | |
490 | + | ||
491 | + | ||
492 | + | ||
493 | + | @Callable(i) | |
494 | + | func getPoolConfigWrapperREADONLY () = $Tuple2(nil, getPoolConfig()) | |
495 | + | ||
496 | + | ||
497 | + | ||
498 | + | @Callable(i) | |
499 | + | func getAccBalanceWrapperREADONLY (assetId) = $Tuple2(nil, getAccBalance(assetId)) | |
500 | + | ||
501 | + | ||
502 | + | ||
503 | + | @Callable(i) | |
504 | + | func calcPricesWrapperREADONLY (amAmt,prAmt,lpAmt) = { | |
505 | + | let prices = calcPrices(amAmt, prAmt, lpAmt) | |
506 | + | $Tuple2(nil, [toString(prices[0]), toString(prices[1]), toString(prices[2])]) | |
507 | + | } | |
508 | + | ||
509 | + | ||
510 | + | ||
511 | + | @Callable(i) | |
512 | + | func toX18WrapperREADONLY (origVal,origScaleMult) = $Tuple2(nil, toString(toX18(origVal, origScaleMult))) | |
513 | + | ||
514 | + | ||
515 | + | ||
516 | + | @Callable(i) | |
517 | + | func fromX18WrapperREADONLY (val,resultScaleMult) = $Tuple2(nil, fromX18(parseBigIntValue(val), resultScaleMult)) | |
518 | + | ||
519 | + | ||
520 | + | ||
521 | + | @Callable(i) | |
522 | + | func calcPriceBigIntWrapperREADONLY (prAmtX18,amAmtX18) = $Tuple2(nil, toString(calcPriceBigInt(parseBigIntValue(prAmtX18), parseBigIntValue(amAmtX18)))) | |
523 | + | ||
524 | + | ||
525 | + | ||
526 | + | @Callable(i) | |
527 | + | func estimatePutOperationWrapperREADONLY (txId58,slippageTolerance,inAmAssetAmt,inAmAssetId,inPrAssetAmt,inPrAssetId,userAddress,isEvaluate,emitLp) = { | |
528 | + | let estimation = estimatePutOperation(txId58, slippageTolerance, inAmAssetAmt, inAmAssetId, inPrAssetAmt, inPrAssetId, userAddress, isEvaluate, emitLp) | |
529 | + | let $t02583926060 = estimation | |
530 | + | let calcLpAmt = $t02583926060._1 | |
531 | + | let emitLpAmt = $t02583926060._2 | |
532 | + | let curPrice = $t02583926060._3 | |
533 | + | let amBalance = $t02583926060._4 | |
534 | + | let prBalance = $t02583926060._5 | |
535 | + | let lpEmission = $t02583926060._6 | |
536 | + | let lpAssetId = $t02583926060._7 | |
537 | + | let poolStatus = $t02583926060._8 | |
538 | + | let commonState = $t02583926060._9 | |
539 | + | let amDiff = $t02583926060._10 | |
540 | + | let prDiff = $t02583926060._11 | |
541 | + | let inAmtAssetId = $t02583926060._12 | |
542 | + | let inPriceAssetId = $t02583926060._13 | |
543 | + | $Tuple2(nil, $Tuple13(calcLpAmt, emitLpAmt, toString(curPrice), amBalance, prBalance, lpEmission, lpAssetId, poolStatus, commonState, amDiff, prDiff, inAmtAssetId, inPriceAssetId)) | |
544 | + | } | |
545 | + | ||
546 | + | ||
547 | + | ||
548 | + | @Callable(i) | |
549 | + | func estimateGetOperationWrapperREADONLY (txId58,pmtAssetId,pmtLpAmt,userAddress) = { | |
550 | + | let estimation = estimateGetOperation(txId58, pmtAssetId, pmtLpAmt, addressFromStringValue(userAddress)) | |
551 | + | let $t02658826757 = estimation | |
552 | + | let outAmAmt = $t02658826757._1 | |
553 | + | let outPrAmt = $t02658826757._2 | |
554 | + | let amAssetId = $t02658826757._3 | |
555 | + | let prAssetId = $t02658826757._4 | |
556 | + | let amBalance = $t02658826757._5 | |
557 | + | let prBalance = $t02658826757._6 | |
558 | + | let lpEmission = $t02658826757._7 | |
559 | + | let curPriceX18 = $t02658826757._8 | |
560 | + | let poolStatus = $t02658826757._9 | |
561 | + | let state = $t02658826757._10 | |
562 | + | $Tuple2(nil, $Tuple10(outAmAmt, outPrAmt, amAssetId, prAssetId, amBalance, prBalance, lpEmission, toString(curPriceX18), poolStatus, state)) | |
563 | + | } | |
564 | + | ||
565 | + | ||
566 | + | ||
567 | + | @Callable(i) | |
568 | + | func statsREADONLY () = { | |
569 | + | let cfg = getPoolConfig() | |
570 | + | let lpAssetId = fromBase58String(cfg[idxPoolLPAssetId]) | |
571 | + | let amtAssetId = cfg[idxAmtAssetId] | |
572 | + | let priceAssetId = cfg[idxPriceAssetId] | |
573 | + | let iAmtAssetId = cfg[idxIAmtAssetId] | |
574 | + | let iPriceAssetId = cfg[idxIPriceAssetId] | |
575 | + | let amtAssetDcm = parseIntValue(cfg[idxAmtAssetDcm]) | |
576 | + | let priceAssetDcm = parseIntValue(cfg[idxPriceAssetDcm]) | |
577 | + | let poolLPBalance = valueOrErrorMessage(assetInfo(lpAssetId), (("Asset " + toBase58String(lpAssetId)) + " doesn't exist")).quantity | |
578 | + | let accAmtAssetBalance = getAccBalance(amtAssetId) | |
579 | + | let accPriceAssetBalance = getAccBalance(priceAssetId) | |
580 | + | let pricesList = calcPrices(accAmtAssetBalance, accPriceAssetBalance, poolLPBalance) | |
581 | + | let curPrice = 0 | |
582 | + | let lpAmtAssetShare = fromX18(pricesList[1], scale8) | |
583 | + | let lpPriceAssetShare = fromX18(pricesList[2], scale8) | |
584 | + | let poolWeight = value(getInteger(factoryContract, keyPoolWeight(toString(this)))) | |
585 | + | $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)) | |
586 | + | } | |
587 | + | ||
588 | + | ||
589 | + | ||
590 | + | @Callable(i) | |
591 | + | func evaluatePutByAmountAssetREADONLY (inAmAssetAmt) = { | |
592 | + | let cfg = getPoolConfig() | |
593 | + | let lpAssetId = fromBase58String(cfg[idxPoolLPAssetId]) | |
594 | + | let amAssetIdStr = cfg[idxAmtAssetId] | |
595 | + | let amAssetId = fromBase58String(amAssetIdStr) | |
596 | + | let prAssetIdStr = cfg[idxPriceAssetId] | |
597 | + | let prAssetId = fromBase58String(prAssetIdStr) | |
598 | + | let amtAssetDcm = parseIntValue(cfg[idxAmtAssetDcm]) | |
599 | + | let priceAssetDcm = parseIntValue(cfg[idxPriceAssetDcm]) | |
600 | + | let poolStatus = cfg[idxPoolStatus] | |
601 | + | let poolLPBalance = valueOrErrorMessage(assetInfo(lpAssetId), (("Asset " + toBase58String(lpAssetId)) + " doesn't exist")).quantity | |
602 | + | let accAmtAssetBalance = getAccBalance(amAssetIdStr) | |
603 | + | let accPriceAssetBalance = getAccBalance(prAssetIdStr) | |
604 | + | let amtAssetAmtX18 = toX18(accAmtAssetBalance, amtAssetDcm) | |
605 | + | let priceAssetAmtX18 = toX18(accPriceAssetBalance, priceAssetDcm) | |
606 | + | let curPriceX18 = if ((poolLPBalance == 0)) | |
607 | + | then zeroBigInt | |
608 | + | else calcPriceBigInt(priceAssetAmtX18, amtAssetAmtX18) | |
609 | + | let inAmAssetAmtX18 = toX18(inAmAssetAmt, amtAssetDcm) | |
610 | + | let inPrAssetAmtX18 = fraction(inAmAssetAmtX18, curPriceX18, scale18) | |
611 | + | let inPrAssetAmt = fromX18(inPrAssetAmtX18, priceAssetDcm) | |
612 | + | let estPut = estimatePutOperation("", 500000, inAmAssetAmt, amAssetId, inPrAssetAmt, prAssetId, "", true, false) | |
613 | + | let calcLpAmt = estPut._1 | |
614 | + | let curPriceCalc = estPut._3 | |
615 | + | let amBalance = estPut._4 | |
616 | + | let prBalance = estPut._5 | |
617 | + | let lpEmission = estPut._6 | |
618 | + | $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)) | |
619 | + | } | |
620 | + | ||
621 | + | ||
622 | + | ||
623 | + | @Callable(i) | |
624 | + | func evaluatePutByPriceAssetREADONLY (inPrAssetAmt) = { | |
625 | + | let cfg = getPoolConfig() | |
626 | + | let lpAssetId = fromBase58String(cfg[idxPoolLPAssetId]) | |
627 | + | let amAssetIdStr = cfg[idxAmtAssetId] | |
628 | + | let amAssetId = fromBase58String(amAssetIdStr) | |
629 | + | let prAssetIdStr = cfg[idxPriceAssetId] | |
630 | + | let prAssetId = fromBase58String(prAssetIdStr) | |
631 | + | let amtAssetDcm = parseIntValue(cfg[idxAmtAssetDcm]) | |
632 | + | let priceAssetDcm = parseIntValue(cfg[idxPriceAssetDcm]) | |
633 | + | let poolStatus = cfg[idxPoolStatus] | |
634 | + | let poolLPBalance = valueOrErrorMessage(assetInfo(lpAssetId), (("Asset " + toBase58String(lpAssetId)) + " doesn't exist")).quantity | |
635 | + | let amBalanceRaw = getAccBalance(amAssetIdStr) | |
636 | + | let prBalanceRaw = getAccBalance(prAssetIdStr) | |
637 | + | let amBalanceRawX18 = toX18(amBalanceRaw, amtAssetDcm) | |
638 | + | let prBalanceRawX18 = toX18(prBalanceRaw, priceAssetDcm) | |
639 | + | let curPriceX18 = if ((poolLPBalance == 0)) | |
640 | + | then zeroBigInt | |
641 | + | else calcPriceBigInt(prBalanceRawX18, amBalanceRawX18) | |
642 | + | let inPrAssetAmtX18 = toX18(inPrAssetAmt, priceAssetDcm) | |
643 | + | let inAmAssetAmtX18 = fraction(inPrAssetAmtX18, scale18, curPriceX18) | |
644 | + | let inAmAssetAmt = fromX18(inAmAssetAmtX18, amtAssetDcm) | |
645 | + | let estPut = estimatePutOperation("", 500000, inAmAssetAmt, amAssetId, inPrAssetAmt, prAssetId, "", true, false) | |
646 | + | let calcLpAmt = estPut._1 | |
647 | + | let curPriceCalc = estPut._3 | |
648 | + | let amBalance = estPut._4 | |
649 | + | let prBalance = estPut._5 | |
650 | + | let lpEmission = estPut._6 | |
651 | + | $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)) | |
652 | + | } | |
653 | + | ||
654 | + | ||
655 | + | ||
656 | + | @Callable(i) | |
657 | + | func evaluateGetREADONLY (paymentLpAssetId,paymentLpAmt) = { | |
658 | + | let res = estimateGetOperation("", paymentLpAssetId, paymentLpAmt, this) | |
659 | + | let outAmAmt = res._1 | |
660 | + | let outPrAmt = res._2 | |
661 | + | let amBalance = res._5 | |
662 | + | let prBalance = res._6 | |
663 | + | let lpEmission = res._7 | |
664 | + | let curPrice = res._8 | |
665 | + | let poolStatus = parseIntValue(res._9) | |
666 | + | $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)) | |
667 | + | } | |
668 | + | ||
669 | + | ||
670 | + | @Verifier(tx) | |
671 | + | func verify () = match tx { | |
672 | + | case order: Order => | |
673 | + | let matcherPub = getMatcherPubOrFail() | |
674 | + | let orderValid = validateMatcherOrderAllowed(order) | |
675 | + | let senderValid = sigVerify(order.bodyBytes, order.proofs[0], order.senderPublicKey) | |
676 | + | let matcherValid = sigVerify(order.bodyBytes, order.proofs[1], matcherPub) | |
677 | + | if (if (if (orderValid) | |
678 | + | then senderValid | |
679 | + | else false) | |
680 | + | then matcherValid | |
681 | + | else false) | |
682 | + | then true | |
683 | + | else throwOrderError(orderValid, senderValid, matcherValid) | |
684 | + | case _ => | |
685 | + | let managerPublic = valueOrElse(getString(this, keyManagerPublicKey()), EMPTY) | |
686 | + | if ((managerPublic == EMPTY)) | |
687 | + | then sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
688 | + | else sigVerify(tx.bodyBytes, tx.proofs[0], fromBase58String(managerPublic)) | |
689 | + | } | |
690 | + |
github/deemru/w8io/026f985 32.93 ms ◑