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