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