tx · D54r4EnVkYimfc6wZy9dhQygDnhB3PSu9Rn6NT8hF3hJ 3NAefciWv6f9fWvEXdGgpHfanJFG8HqfjuT: -0.01400000 Waves 2021.12.23 18:13 [1847070] smart account 3NAefciWv6f9fWvEXdGgpHfanJFG8HqfjuT > SELF 0.00000000 Waves
{ "type": 13, "id": "D54r4EnVkYimfc6wZy9dhQygDnhB3PSu9Rn6NT8hF3hJ", "fee": 1400000, "feeAssetId": null, "timestamp": 1640272480412, "version": 1, "sender": "3NAefciWv6f9fWvEXdGgpHfanJFG8HqfjuT", "senderPublicKey": "D1BL65meykxFZTCuq7jq9HSGLLnWvQamQPUNrguW5w39", "proofs": [ "4uyMvCqRqhqWt4BS9MvLrrnY1t6fSJi8AUxnrKdPFzdFSSdM4yhQbinmzxkRXV89fZByagQyAKwNLMYQ71pszSxi" ], "script": "base64:AAIFAAAAAAAAAGoIAhIECgIICBIECgIBBBIFCgMBAQQSAwoBARIAEgYKBAEBAQgSBAoCAQESAwoBARIECgIICBIAEgMKAQgSBQoDAQEBEgQKAggBEgQKAgEBEgQKAggIEgsKCQgBAQIBAggEBBIGCgQICAEIAAAAQQAAAAAKbFBkZWNpbWFscwAAAAAAAAAACAAAAAAGc2NhbGU4AAAAAAAF9eEAAAAAAAxzY2FsZThCaWdJbnQJAAE2AAAAAQAAAAAABfXhAAAAAAAJY2FsY0Vycm9yCQABNgAAAAEAAAAAAAAPQkAAAAAAB3NjYWxlMTgJAAE2AAAAAQAN4Lazp2QAAAAAAAAKemVyb0JpZ0ludAkAATYAAAABAAAAAAAAAAAAAAAAAAlvbmVCaWdJbnQJAAE2AAAAAQAAAAAAAAAAAQAAAAADU0VQAgAAAAJfXwAAAAAFRU1QVFkCAAAAAAAAAAAKUG9vbEFjdGl2ZQAAAAAAAAAAAQAAAAAPUG9vbFB1dERpc2FibGVkAAAAAAAAAAACAAAAABNQb29sTWF0Y2hlckRpc2FibGVkAAAAAAAAAAADAAAAAAxQb29sU2h1dGRvd24AAAAAA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QAAAAIJAAQdAAAAAgUAAAAEdGhpcwkBAAAAE2tleU1hbmFnZXJQdWJsaWNLZXkAAAAABQAAAAVFTVBUWQMJAAAAAAAAAgUAAAANbWFuYWdlclB1YmxpYwUAAAAFRU1QVFkJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAACAUAAAACdHgAAAAPc2VuZGVyUHVibGljS2V5CQAB9AAAAAMIBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAAkAAlkAAAABBQAAAA1tYW5hZ2VyUHVibGljodozkg==", "chainId": 84, "height": 1847070, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 2AVhqgZdK7yK9H5A72uY9trzgVU1JLLkzHY8fAePkJKx Next: 9epkJo2geWwfJX6F29riSq7tgdGEM89Hx3vwZGwcASWB Diff:
Old | New | Differences | |
---|---|---|---|
48 | 48 | let idxFactStakCntr = 1 | |
49 | 49 | ||
50 | 50 | let idxFactSlippCntr = 7 | |
51 | + | ||
52 | + | let idxFactGwxRewCntr = 10 | |
51 | 53 | ||
52 | 54 | func toX18 (origVal,origScaleMult) = fraction(toBigInt(origVal), scale18, toBigInt(origScaleMult)) | |
53 | 55 | ||
106 | 108 | ||
107 | 109 | ||
108 | 110 | func throwOrderError (orderValid,senderValid,matcherValid) = throw(((((("order validation failed: orderValid=" + toString(orderValid)) + " senderValid=") + toString(senderValid)) + " matcherValid=") + toString(matcherValid))) | |
111 | + | ||
112 | + | ||
113 | + | func asString (val) = match val { | |
114 | + | case valStr: String => | |
115 | + | valStr | |
116 | + | case _ => | |
117 | + | throw("fail to cast into Int") | |
118 | + | } | |
109 | 119 | ||
110 | 120 | ||
111 | 121 | func getStringOrFail (address,key) = valueOrErrorMessage(getString(address, key), makeString(["mandatory ", toString(address), ".", key, " is not defined"], "")) | |
357 | 367 | } | |
358 | 368 | ||
359 | 369 | ||
360 | - | func calcD (a,b,lVal) = { | |
361 | - | let l = toBigInt(lVal) | |
362 | - | let val4 = toBigInt(4) | |
363 | - | let val2 = toBigInt(2) | |
364 | - | let val3 = toBigInt(3) | |
365 | - | let ApB = (a + b) | |
366 | - | let AmB = (a * b) | |
367 | - | let l41 = ((val4 * l) - oneBigInt) | |
368 | - | let lApBpow = pow((l * ApB), 0, val2, 0, 0, DOWN) | |
369 | - | let AmbL41pow = (AmB * pow((l41 / val3), 0, val3, 0, 0, DOWN)) | |
370 | - | let lAmpApb = ((l * AmB) * ApB) | |
371 | - | let rPart = (AmB * pow((AmbL41pow + lApBpow), 0, toBigInt(5), 1, 0, DOWN)) | |
372 | - | let M = (val2 * pow((lAmpApb + rPart), 0, toBigInt(333333), 6, 0, DOWN)) | |
373 | - | let divPart = (l41 / (val3 * M)) | |
374 | - | (((toBigInt(-4) * AmB) * divPart) + M) | |
375 | - | } | |
370 | + | func calcD (a,b,lVal) = 1 | |
376 | 371 | ||
377 | 372 | ||
378 | 373 | @Callable(i) | |
438 | 433 | let cfg = getFactoryConfig() | |
439 | 434 | let stakingCntr = valueOrErrorMessage(addressFromString(cfg[idxFactStakCntr]), "Wrong staking address") | |
440 | 435 | let slipCntr = valueOrErrorMessage(addressFromString(cfg[idxFactSlippCntr]), "Wrong slippage address") | |
436 | + | let gwxCntr = valueOrErrorMessage(addressFromString(cfg[idxFactGwxRewCntr]), "Wrong slippage address") | |
441 | 437 | let poolCfg = getPoolConfig() | |
442 | 438 | let amId = poolCfg[idxAmAsId] | |
443 | 439 | let prId = poolCfg[idxPrAsId] | |
455 | 451 | let amBalanceX18 = toX18(amBalance, amDcm) | |
456 | 452 | let prBalance = getAccBalance(prId) | |
457 | 453 | let prBalanceX18 = toX18(prBalance, prDcm) | |
458 | - | let dCur = calcD(toBigInt(amBalance), toBigInt(prBalance), 5000000000) | |
454 | + | let dCur = invoke(gwxCntr, "calcD", [toString(amBalance), toString(prBalance), "50", "100000000", "1"], nil) | |
455 | + | let invLeft = parseBigIntValue(asString(dCur)) | |
459 | 456 | let isValid = if ((pmtAssetId == amId)) | |
460 | 457 | then { | |
461 | 458 | let pmtAmtX18 = toX18(pmtAmt, amDcm) | |
462 | 459 | let prAdiff = prAssetSwapX18 | |
463 | 460 | let amAdiff = (pmtAmtX18 - amAssetSwapX18) | |
464 | - | let dSwap = calcD((toBigInt(amBalance) + toBigInt(fromX18(amAdiff, amDcm))), (toBigInt(prBalance) - toBigInt(fromX18(prAdiff, prDcm))), 5000000000) | |
465 | - | true | |
461 | + | let dSwap = invoke(gwxCntr, "calcD", [toString((toBigInt(amBalance) + toBigInt(fromX18(amAdiff, amDcm)))), toString((toBigInt(prBalance) - toBigInt(fromX18(prAdiff, prDcm)))), "50", "100000000", "1"], nil) | |
462 | + | let invRight = parseBigIntValue(asString(dSwap)) | |
463 | + | let invDiff = fraction((invRight - invLeft), scale8BigInt, invLeft) | |
464 | + | if ((invDiff > toBigInt(1000))) | |
465 | + | then throw("Wrong arguments passed. D decreased.") | |
466 | + | else true | |
466 | 467 | } | |
467 | 468 | else { | |
468 | 469 | let pmtPrX18 = toX18(pmtAmt, prDcm) | |
469 | 470 | let prAdiff = (prAssetSwapX18 - pmtPrX18) | |
470 | 471 | let amAdiff = amAssetSwapX18 | |
471 | - | let dSwap = calcD((toBigInt(amBalance) - toBigInt(fromX18(amAdiff, amDcm))), (toBigInt(prBalance) + toBigInt(fromX18(prAdiff, prDcm))), 50) | |
472 | - | true | |
472 | + | let dSwap = invoke(gwxCntr, "calcD", [toString((toBigInt(amBalance) - toBigInt(fromX18(amAdiff, amDcm)))), toString((toBigInt(prBalance) + toBigInt(fromX18(prAdiff, prDcm)))), "50", "100000000", "1"], nil) | |
473 | + | let invRight = parseBigIntValue(asString(dSwap)) | |
474 | + | let invDiff = fraction((invRight - invLeft), scale8BigInt, invLeft) | |
475 | + | if ((invDiff > toBigInt(1000))) | |
476 | + | then throw("Wrong arguments passed. D decreased.") | |
477 | + | else true | |
473 | 478 | } | |
474 | 479 | if (!(isValid)) | |
475 | 480 | then throw("Errors.") |
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 calcError = toBigInt(1000000) | |
11 | 11 | ||
12 | 12 | let scale18 = toBigInt(1000000000000000000) | |
13 | 13 | ||
14 | 14 | let zeroBigInt = toBigInt(0) | |
15 | 15 | ||
16 | 16 | let oneBigInt = toBigInt(1) | |
17 | 17 | ||
18 | 18 | let SEP = "__" | |
19 | 19 | ||
20 | 20 | let EMPTY = "" | |
21 | 21 | ||
22 | 22 | let PoolActive = 1 | |
23 | 23 | ||
24 | 24 | let PoolPutDisabled = 2 | |
25 | 25 | ||
26 | 26 | let PoolMatcherDisabled = 3 | |
27 | 27 | ||
28 | 28 | let PoolShutdown = 4 | |
29 | 29 | ||
30 | 30 | let idxPoolAddress = 1 | |
31 | 31 | ||
32 | 32 | let idxPoolStatus = 2 | |
33 | 33 | ||
34 | 34 | let idxLPAsId = 3 | |
35 | 35 | ||
36 | 36 | let idxAmAsId = 4 | |
37 | 37 | ||
38 | 38 | let idxPrAsId = 5 | |
39 | 39 | ||
40 | 40 | let idxAmtAsDcm = 6 | |
41 | 41 | ||
42 | 42 | let idxPriceAsDcm = 7 | |
43 | 43 | ||
44 | 44 | let idxIAmtAsId = 8 | |
45 | 45 | ||
46 | 46 | let idxIPriceAsId = 9 | |
47 | 47 | ||
48 | 48 | let idxFactStakCntr = 1 | |
49 | 49 | ||
50 | 50 | let idxFactSlippCntr = 7 | |
51 | + | ||
52 | + | let idxFactGwxRewCntr = 10 | |
51 | 53 | ||
52 | 54 | func toX18 (origVal,origScaleMult) = fraction(toBigInt(origVal), scale18, toBigInt(origScaleMult)) | |
53 | 55 | ||
54 | 56 | ||
55 | 57 | func fromX18 (val,resultScaleMult) = toInt(fraction(val, toBigInt(resultScaleMult), scale18)) | |
56 | 58 | ||
57 | 59 | ||
58 | 60 | func toScale (amt,resScale,curScale) = fraction(amt, resScale, curScale) | |
59 | 61 | ||
60 | 62 | ||
61 | 63 | func abs (val) = if ((zeroBigInt > val)) | |
62 | 64 | then -(val) | |
63 | 65 | else val | |
64 | 66 | ||
65 | 67 | ||
66 | 68 | func keyFactCntr () = "%s__factoryContract" | |
67 | 69 | ||
68 | 70 | ||
69 | 71 | func keyManagerPublicKey () = "%s__managerPublicKey" | |
70 | 72 | ||
71 | 73 | ||
72 | 74 | func keyPriceLast () = "%s%s__price__last" | |
73 | 75 | ||
74 | 76 | ||
75 | 77 | func keyPriceHistory (h,timestamp) = makeString(["%s%s%d%d__price__history", toString(h), toString(timestamp)], SEP) | |
76 | 78 | ||
77 | 79 | ||
78 | 80 | func keyPutActionByUser (userAddress,txId) = ((("%s%s%s__P__" + userAddress) + "__") + txId) | |
79 | 81 | ||
80 | 82 | ||
81 | 83 | func keyGetActionByUser (userAddress,txId) = ((("%s%s%s__G__" + userAddress) + "__") + txId) | |
82 | 84 | ||
83 | 85 | ||
84 | 86 | func keyAmtAsset () = "%s__amountAsset" | |
85 | 87 | ||
86 | 88 | ||
87 | 89 | func keyPriceAsset () = "%s__priceAsset" | |
88 | 90 | ||
89 | 91 | ||
90 | 92 | func keyFactoryConfig () = "%s__factoryConfig" | |
91 | 93 | ||
92 | 94 | ||
93 | 95 | func keyMatcherPub () = "%s%s__matcher__publicKey" | |
94 | 96 | ||
95 | 97 | ||
96 | 98 | func keyPoolConfig (iAmtAsset,iPriceAsset) = (((("%d%d%s__" + iAmtAsset) + "__") + iPriceAsset) + "__config") | |
97 | 99 | ||
98 | 100 | ||
99 | 101 | func keyMappingsBaseAsset2internalId (baseAssetStr) = ("%s%s%s__mappings__baseAsset2internalId__" + baseAssetStr) | |
100 | 102 | ||
101 | 103 | ||
102 | 104 | func keyAllPoolsShutdown () = "%s__shutdown" | |
103 | 105 | ||
104 | 106 | ||
105 | 107 | func keyPoolWeight (contractAddress) = ("%s%s__poolWeight__" + contractAddress) | |
106 | 108 | ||
107 | 109 | ||
108 | 110 | func throwOrderError (orderValid,senderValid,matcherValid) = throw(((((("order validation failed: orderValid=" + toString(orderValid)) + " senderValid=") + toString(senderValid)) + " matcherValid=") + toString(matcherValid))) | |
111 | + | ||
112 | + | ||
113 | + | func asString (val) = match val { | |
114 | + | case valStr: String => | |
115 | + | valStr | |
116 | + | case _ => | |
117 | + | throw("fail to cast into Int") | |
118 | + | } | |
109 | 119 | ||
110 | 120 | ||
111 | 121 | func getStringOrFail (address,key) = valueOrErrorMessage(getString(address, key), makeString(["mandatory ", toString(address), ".", key, " is not defined"], "")) | |
112 | 122 | ||
113 | 123 | ||
114 | 124 | func getIntOrFail (address,key) = valueOrErrorMessage(getInteger(address, key), makeString(["mandatory ", toString(address), ".", key, " is not defined"], "")) | |
115 | 125 | ||
116 | 126 | ||
117 | 127 | let factoryContract = addressFromStringValue(getStringOrFail(this, keyFactCntr())) | |
118 | 128 | ||
119 | 129 | func isGlobalShutdown () = valueOrElse(getBoolean(factoryContract, keyAllPoolsShutdown()), false) | |
120 | 130 | ||
121 | 131 | ||
122 | 132 | func getMatcherPubOrFail () = fromBase58String(getStringOrFail(factoryContract, keyMatcherPub())) | |
123 | 133 | ||
124 | 134 | ||
125 | 135 | func getPoolConfig () = { | |
126 | 136 | let amtAs = getStringOrFail(this, keyAmtAsset()) | |
127 | 137 | let priceAs = getStringOrFail(this, keyPriceAsset()) | |
128 | 138 | let iPriceAs = getIntOrFail(factoryContract, keyMappingsBaseAsset2internalId(priceAs)) | |
129 | 139 | let iAmtAs = getIntOrFail(factoryContract, keyMappingsBaseAsset2internalId(amtAs)) | |
130 | 140 | split(getStringOrFail(factoryContract, keyPoolConfig(toString(iAmtAs), toString(iPriceAs))), SEP) | |
131 | 141 | } | |
132 | 142 | ||
133 | 143 | ||
134 | 144 | func getFactoryConfig () = split(getStringOrFail(factoryContract, keyFactoryConfig()), SEP) | |
135 | 145 | ||
136 | 146 | ||
137 | 147 | func dataPutActionInfo (inAmtAssetAmt,inPriceAssetAmt,outLpAmt,price,slippageByUser,slippageReal,txHeight,txTimestamp,slipageAmAmt,slipagePrAmt) = makeString(["%d%d%d%d%d%d%d%d%d%d", toString(inAmtAssetAmt), toString(inPriceAssetAmt), toString(outLpAmt), toString(price), toString(slippageByUser), toString(slippageReal), toString(txHeight), toString(txTimestamp), toString(slipageAmAmt), toString(slipagePrAmt)], SEP) | |
138 | 148 | ||
139 | 149 | ||
140 | 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) | |
141 | 151 | ||
142 | 152 | ||
143 | 153 | func getAccBalance (assetId) = if ((assetId == "WAVES")) | |
144 | 154 | then wavesBalance(this).available | |
145 | 155 | else assetBalance(this, fromBase58String(assetId)) | |
146 | 156 | ||
147 | 157 | ||
148 | 158 | func calcPriceBigInt (prAmtX18,amAmtX18) = fraction(prAmtX18, scale18, amAmtX18) | |
149 | 159 | ||
150 | 160 | ||
151 | 161 | func privateCalcPrice (amAssetDcm,prAssetDcm,amAmt,prAmt) = { | |
152 | 162 | let amtAsAmtX18 = toX18(amAmt, amAssetDcm) | |
153 | 163 | let prAsAmtX18 = toX18(prAmt, prAssetDcm) | |
154 | 164 | calcPriceBigInt(prAsAmtX18, amtAsAmtX18) | |
155 | 165 | } | |
156 | 166 | ||
157 | 167 | ||
158 | 168 | func calcPrices (amAmt,prAmt,lpAmt) = { | |
159 | 169 | let cfg = getPoolConfig() | |
160 | 170 | let amtAsDcm = parseIntValue(cfg[idxAmtAsDcm]) | |
161 | 171 | let prAsDcm = parseIntValue(cfg[idxPriceAsDcm]) | |
162 | 172 | let priceX18 = privateCalcPrice(amtAsDcm, prAsDcm, amAmt, prAmt) | |
163 | 173 | let amAmtX18 = toX18(amAmt, amtAsDcm) | |
164 | 174 | let prAmtX18 = toX18(prAmt, prAsDcm) | |
165 | 175 | let lpAmtX18 = toX18(lpAmt, scale8) | |
166 | 176 | let lpPrInAmAsX18 = calcPriceBigInt(amAmtX18, lpAmtX18) | |
167 | 177 | let lpPrInPrAsX18 = calcPriceBigInt(prAmtX18, lpAmtX18) | |
168 | 178 | [priceX18, lpPrInAmAsX18, lpPrInPrAsX18] | |
169 | 179 | } | |
170 | 180 | ||
171 | 181 | ||
172 | 182 | func calculatePrices (amAmt,prAmt,lpAmt) = { | |
173 | 183 | let prices = calcPrices(amAmt, prAmt, lpAmt) | |
174 | 184 | [fromX18(prices[0], scale8), fromX18(prices[1], scale8), fromX18(prices[2], scale8)] | |
175 | 185 | } | |
176 | 186 | ||
177 | 187 | ||
178 | 188 | func estimateGetOperation (txId58,pmtAssetId,pmtLpAmt,userAddress) = { | |
179 | 189 | let cfg = getPoolConfig() | |
180 | 190 | let lpId = cfg[idxLPAsId] | |
181 | 191 | let amId = cfg[idxAmAsId] | |
182 | 192 | let prId = cfg[idxPrAsId] | |
183 | 193 | let amDcm = parseIntValue(cfg[idxAmtAsDcm]) | |
184 | 194 | let prDcm = parseIntValue(cfg[idxPriceAsDcm]) | |
185 | 195 | let poolStatus = cfg[idxPoolStatus] | |
186 | 196 | let lpEmission = valueOrErrorMessage(assetInfo(fromBase58String(lpId)), (("Asset " + lpId) + " doesn't exist")).quantity | |
187 | 197 | if ((lpId != pmtAssetId)) | |
188 | 198 | then throw("Invalid asset passed.") | |
189 | 199 | else { | |
190 | 200 | let amBalance = getAccBalance(amId) | |
191 | 201 | let amBalanceX18 = toX18(amBalance, amDcm) | |
192 | 202 | let prBalance = getAccBalance(prId) | |
193 | 203 | let prBalanceX18 = toX18(prBalance, prDcm) | |
194 | 204 | let curPriceX18 = calcPriceBigInt(prBalanceX18, amBalanceX18) | |
195 | 205 | let curPrice = fromX18(curPriceX18, scale8) | |
196 | 206 | let pmtLpAmtX18 = toX18(pmtLpAmt, scale8) | |
197 | 207 | let lpEmissionX18 = toX18(lpEmission, scale8) | |
198 | 208 | let outAmAmtX18 = fraction(amBalanceX18, pmtLpAmtX18, lpEmissionX18) | |
199 | 209 | let outPrAmtX18 = fraction(prBalanceX18, pmtLpAmtX18, lpEmissionX18) | |
200 | 210 | let outAmAmt = fromX18(outAmAmtX18, amDcm) | |
201 | 211 | let outPrAmt = fromX18(outPrAmtX18, prDcm) | |
202 | 212 | let state = if ((txId58 == "")) | |
203 | 213 | then nil | |
204 | 214 | else [ScriptTransfer(userAddress, outAmAmt, if ((amId == "WAVES")) | |
205 | 215 | then unit | |
206 | 216 | else fromBase58String(amId)), ScriptTransfer(userAddress, outPrAmt, if ((prId == "WAVES")) | |
207 | 217 | then unit | |
208 | 218 | else fromBase58String(prId)), StringEntry(keyGetActionByUser(toString(userAddress), txId58), dataGetActionInfo(outAmAmt, outPrAmt, pmtLpAmt, curPrice, height, lastBlock.timestamp)), IntegerEntry(keyPriceLast(), curPrice), IntegerEntry(keyPriceHistory(height, lastBlock.timestamp), curPrice)] | |
209 | 219 | $Tuple10(outAmAmt, outPrAmt, amId, prId, amBalance, prBalance, lpEmission, curPriceX18, poolStatus, state) | |
210 | 220 | } | |
211 | 221 | } | |
212 | 222 | ||
213 | 223 | ||
214 | 224 | func estimatePutOperation (txId58,slippage,inAmAmt,inAmId,inPrAmt,inPrId,userAddress,isEvaluate,emitLp) = { | |
215 | 225 | let cfg = getPoolConfig() | |
216 | 226 | let lpId = fromBase58String(cfg[idxLPAsId]) | |
217 | 227 | let amIdStr = cfg[idxAmAsId] | |
218 | 228 | let prIdStr = cfg[idxPrAsId] | |
219 | 229 | let inAmIdStr = cfg[idxIAmtAsId] | |
220 | 230 | let inPrIdStr = cfg[idxIPriceAsId] | |
221 | 231 | let amtDcm = parseIntValue(cfg[idxAmtAsDcm]) | |
222 | 232 | let priceDcm = parseIntValue(cfg[idxPriceAsDcm]) | |
223 | 233 | let poolStatus = cfg[idxPoolStatus] | |
224 | 234 | let lpEmission = valueOrErrorMessage(assetInfo(lpId), "Wrong lp asset.").quantity | |
225 | 235 | let amBalance = if (isEvaluate) | |
226 | 236 | then getAccBalance(amIdStr) | |
227 | 237 | else (getAccBalance(amIdStr) - inAmAmt) | |
228 | 238 | let prBalance = if (isEvaluate) | |
229 | 239 | then getAccBalance(prIdStr) | |
230 | 240 | else (getAccBalance(prIdStr) - inPrAmt) | |
231 | 241 | let inAmAssetAmtX18 = toX18(inAmAmt, amtDcm) | |
232 | 242 | let inPrAssetAmtX18 = toX18(inPrAmt, priceDcm) | |
233 | 243 | let userPriceX18 = calcPriceBigInt(inPrAssetAmtX18, inAmAssetAmtX18) | |
234 | 244 | let amBalanceX18 = toX18(amBalance, amtDcm) | |
235 | 245 | let prBalanceX18 = toX18(prBalance, priceDcm) | |
236 | 246 | let res = if ((lpEmission == 0)) | |
237 | 247 | then { | |
238 | 248 | let curPriceX18 = zeroBigInt | |
239 | 249 | let slippageX18 = zeroBigInt | |
240 | 250 | let lpAmtX18 = pow((inAmAssetAmtX18 * inPrAssetAmtX18), 0, toBigInt(5), 1, 0, DOWN) | |
241 | 251 | $Tuple5(fromX18(lpAmtX18, scale8), fromX18(inAmAssetAmtX18, amtDcm), fromX18(inPrAssetAmtX18, priceDcm), calcPriceBigInt((prBalanceX18 + inPrAssetAmtX18), (amBalanceX18 + inAmAssetAmtX18)), slippageX18) | |
242 | 252 | } | |
243 | 253 | else { | |
244 | 254 | let curPriceX18 = calcPriceBigInt(prBalanceX18, amBalanceX18) | |
245 | 255 | let slippageRealX18 = fraction(abs((curPriceX18 - userPriceX18)), scale18, curPriceX18) | |
246 | 256 | let slippageX18 = toX18(slippage, scale8) | |
247 | 257 | if (if ((curPriceX18 != zeroBigInt)) | |
248 | 258 | then (slippageRealX18 > slippageX18) | |
249 | 259 | else false) | |
250 | 260 | then throw(((("Price slippage " + toString(slippageRealX18)) + " exceeded ") + toString(slippageX18))) | |
251 | 261 | else { | |
252 | 262 | let lpEmissionX18 = toX18(lpEmission, scale8) | |
253 | 263 | let prViaAmX18 = fraction(inAmAssetAmtX18, curPriceX18, scale18) | |
254 | 264 | let amViaPrX18 = fraction(inPrAssetAmtX18, scale18, curPriceX18) | |
255 | 265 | let expectedAmts = if ((prViaAmX18 > inPrAssetAmtX18)) | |
256 | 266 | then $Tuple2(amViaPrX18, inPrAssetAmtX18) | |
257 | 267 | else $Tuple2(inAmAssetAmtX18, prViaAmX18) | |
258 | 268 | let expAmtAssetAmtX18 = expectedAmts._1 | |
259 | 269 | let expPriceAssetAmtX18 = expectedAmts._2 | |
260 | 270 | let lpAmtX18 = fraction(lpEmissionX18, expPriceAssetAmtX18, prBalanceX18) | |
261 | 271 | $Tuple5(fromX18(lpAmtX18, scale8), fromX18(expAmtAssetAmtX18, amtDcm), fromX18(expPriceAssetAmtX18, priceDcm), curPriceX18, slippageX18) | |
262 | 272 | } | |
263 | 273 | } | |
264 | 274 | let calcLpAmt = res._1 | |
265 | 275 | let calcAmAssetPmt = res._2 | |
266 | 276 | let calcPrAssetPmt = res._3 | |
267 | 277 | let curPrice = fromX18(res._4, scale8) | |
268 | 278 | let slippageCalc = fromX18(res._5, scale8) | |
269 | 279 | if ((0 >= calcLpAmt)) | |
270 | 280 | then throw("LP is less than zero.") | |
271 | 281 | else { | |
272 | 282 | let emitLpAmt = if (!(emitLp)) | |
273 | 283 | then 0 | |
274 | 284 | else calcLpAmt | |
275 | 285 | let amDiff = (inAmAmt - calcAmAssetPmt) | |
276 | 286 | let prDiff = (inPrAmt - calcPrAssetPmt) | |
277 | 287 | let commonState = [IntegerEntry(keyPriceLast(), curPrice), IntegerEntry(keyPriceHistory(height, lastBlock.timestamp), curPrice), StringEntry(keyPutActionByUser(userAddress, txId58), dataPutActionInfo(calcAmAssetPmt, calcPrAssetPmt, emitLpAmt, curPrice, slippage, slippageCalc, height, lastBlock.timestamp, amDiff, prDiff))] | |
278 | 288 | $Tuple13(calcLpAmt, emitLpAmt, curPrice, amBalance, prBalance, lpEmission, lpId, poolStatus, commonState, amDiff, prDiff, inAmId, inPrId) | |
279 | 289 | } | |
280 | 290 | } | |
281 | 291 | ||
282 | 292 | ||
283 | 293 | func validateMatcherOrderAllowed (order) = { | |
284 | 294 | let cfg = getPoolConfig() | |
285 | 295 | let amtAssetId = cfg[idxAmAsId] | |
286 | 296 | let priceAssetId = cfg[idxPrAsId] | |
287 | 297 | let poolStatus = parseIntValue(cfg[idxPoolStatus]) | |
288 | 298 | let amtAssetDcm = parseIntValue(cfg[idxAmtAsDcm]) | |
289 | 299 | let priceAssetDcm = parseIntValue(cfg[idxPriceAsDcm]) | |
290 | 300 | let accAmtAssetBalance = getAccBalance(amtAssetId) | |
291 | 301 | let accPriceAssetBalance = getAccBalance(priceAssetId) | |
292 | 302 | let curPriceX18 = if ((order.orderType == Buy)) | |
293 | 303 | then privateCalcPrice(amtAssetDcm, priceAssetDcm, (accAmtAssetBalance + order.amount), accPriceAssetBalance) | |
294 | 304 | else privateCalcPrice(amtAssetDcm, priceAssetDcm, (accAmtAssetBalance - order.amount), accPriceAssetBalance) | |
295 | 305 | let curPrice = fromX18(curPriceX18, scale8) | |
296 | 306 | if (if (if (isGlobalShutdown()) | |
297 | 307 | then true | |
298 | 308 | else (poolStatus == PoolMatcherDisabled)) | |
299 | 309 | then true | |
300 | 310 | else (poolStatus == PoolShutdown)) | |
301 | 311 | then throw("Exchange operations disabled") | |
302 | 312 | else { | |
303 | 313 | let orderAmtAsset = order.assetPair.amountAsset | |
304 | 314 | let orderAmtAssetStr = if ((orderAmtAsset == unit)) | |
305 | 315 | then "WAVES" | |
306 | 316 | else toBase58String(value(orderAmtAsset)) | |
307 | 317 | let orderPriceAsset = order.assetPair.priceAsset | |
308 | 318 | let orderPriceAssetStr = if ((orderPriceAsset == unit)) | |
309 | 319 | then "WAVES" | |
310 | 320 | else toBase58String(value(orderPriceAsset)) | |
311 | 321 | if (if ((orderAmtAssetStr != amtAssetId)) | |
312 | 322 | then true | |
313 | 323 | else (orderPriceAssetStr != priceAssetId)) | |
314 | 324 | then throw("Wrong order assets.") | |
315 | 325 | else { | |
316 | 326 | let orderPrice = order.price | |
317 | 327 | let priceDcm = fraction(scale8, priceAssetDcm, amtAssetDcm) | |
318 | 328 | let castedOrderPrice = toScale(orderPrice, scale8, priceDcm) | |
319 | 329 | let isOrderPriceValid = if ((order.orderType == Buy)) | |
320 | 330 | then (curPrice >= castedOrderPrice) | |
321 | 331 | else (castedOrderPrice >= curPrice) | |
322 | 332 | true | |
323 | 333 | } | |
324 | 334 | } | |
325 | 335 | } | |
326 | 336 | ||
327 | 337 | ||
328 | 338 | func commonGet (i) = if ((size(i.payments) != 1)) | |
329 | 339 | then throw("exactly 1 payment is expected") | |
330 | 340 | else { | |
331 | 341 | let pmt = value(i.payments[0]) | |
332 | 342 | let pmtAssetId = value(pmt.assetId) | |
333 | 343 | let pmtAmt = pmt.amount | |
334 | 344 | let res = estimateGetOperation(toBase58String(i.transactionId), toBase58String(pmtAssetId), pmtAmt, i.caller) | |
335 | 345 | let outAmAmt = res._1 | |
336 | 346 | let outPrAmt = res._2 | |
337 | 347 | let poolStatus = parseIntValue(res._9) | |
338 | 348 | let state = res._10 | |
339 | 349 | if (if (isGlobalShutdown()) | |
340 | 350 | then true | |
341 | 351 | else (poolStatus == PoolShutdown)) | |
342 | 352 | then throw(("Get operation is blocked by admin. Status = " + toString(poolStatus))) | |
343 | 353 | else $Tuple5(outAmAmt, outPrAmt, pmtAmt, pmtAssetId, state) | |
344 | 354 | } | |
345 | 355 | ||
346 | 356 | ||
347 | 357 | func commonPut (caller,txId,amAsPmt,prAsPmt,slippage,emitLp) = { | |
348 | 358 | let estPut = estimatePutOperation(txId, slippage, value(amAsPmt).amount, value(amAsPmt).assetId, value(prAsPmt).amount, value(prAsPmt).assetId, caller, false, emitLp) | |
349 | 359 | let status = parseIntValue(estPut._8) | |
350 | 360 | if (if (if (isGlobalShutdown()) | |
351 | 361 | then true | |
352 | 362 | else (status == PoolPutDisabled)) | |
353 | 363 | then true | |
354 | 364 | else (status == PoolShutdown)) | |
355 | 365 | then throw(("Put operation is blocked by admin. Status = " + toString(status))) | |
356 | 366 | else estPut | |
357 | 367 | } | |
358 | 368 | ||
359 | 369 | ||
360 | - | func calcD (a,b,lVal) = { | |
361 | - | let l = toBigInt(lVal) | |
362 | - | let val4 = toBigInt(4) | |
363 | - | let val2 = toBigInt(2) | |
364 | - | let val3 = toBigInt(3) | |
365 | - | let ApB = (a + b) | |
366 | - | let AmB = (a * b) | |
367 | - | let l41 = ((val4 * l) - oneBigInt) | |
368 | - | let lApBpow = pow((l * ApB), 0, val2, 0, 0, DOWN) | |
369 | - | let AmbL41pow = (AmB * pow((l41 / val3), 0, val3, 0, 0, DOWN)) | |
370 | - | let lAmpApb = ((l * AmB) * ApB) | |
371 | - | let rPart = (AmB * pow((AmbL41pow + lApBpow), 0, toBigInt(5), 1, 0, DOWN)) | |
372 | - | let M = (val2 * pow((lAmpApb + rPart), 0, toBigInt(333333), 6, 0, DOWN)) | |
373 | - | let divPart = (l41 / (val3 * M)) | |
374 | - | (((toBigInt(-4) * AmB) * divPart) + M) | |
375 | - | } | |
370 | + | func calcD (a,b,lVal) = 1 | |
376 | 371 | ||
377 | 372 | ||
378 | 373 | @Callable(i) | |
379 | 374 | func constructor (factoryContract,managerPublicKey) = if ((i.caller != this)) | |
380 | 375 | then throw("permissions denied") | |
381 | 376 | else [StringEntry(keyFactCntr(), factoryContract), StringEntry(keyManagerPublicKey(), managerPublicKey)] | |
382 | 377 | ||
383 | 378 | ||
384 | 379 | ||
385 | 380 | @Callable(i) | |
386 | 381 | func put (slip,autoStake) = { | |
387 | 382 | let factCfg = getFactoryConfig() | |
388 | 383 | let stakingCntr = valueOrErrorMessage(addressFromString(factCfg[idxFactStakCntr]), "Incorrect staking address.") | |
389 | 384 | let slipCntr = valueOrErrorMessage(addressFromString(factCfg[idxFactSlippCntr]), "Incorrect slippage address.") | |
390 | 385 | if ((0 > slip)) | |
391 | 386 | then throw("Invalid slippage.") | |
392 | 387 | else if ((size(i.payments) != 2)) | |
393 | 388 | then throw("2 payments are expected") | |
394 | 389 | else { | |
395 | 390 | let estPut = commonPut(toString(i.caller), toBase58String(i.transactionId), AttachedPayment(value(i.payments[0]).assetId, value(i.payments[0]).amount), i.payments[1], slip, true) | |
396 | 391 | let emitLpAmt = estPut._2 | |
397 | 392 | let lpAssetId = estPut._7 | |
398 | 393 | let state = estPut._9 | |
399 | 394 | let amDiff = estPut._10 | |
400 | 395 | let prDiff = estPut._11 | |
401 | 396 | let amId = estPut._12 | |
402 | 397 | let prId = estPut._13 | |
403 | 398 | let emitInv = invoke(factoryContract, "emit", [emitLpAmt], nil) | |
404 | 399 | if ((emitInv == emitInv)) | |
405 | 400 | then { | |
406 | 401 | let slippageAInv = if ((amDiff > 0)) | |
407 | 402 | then invoke(slipCntr, "put", nil, [AttachedPayment(amId, amDiff)]) | |
408 | 403 | else nil | |
409 | 404 | if ((slippageAInv == slippageAInv)) | |
410 | 405 | then { | |
411 | 406 | let slippagePInv = if ((prDiff > 0)) | |
412 | 407 | then invoke(slipCntr, "put", nil, [AttachedPayment(prId, prDiff)]) | |
413 | 408 | else nil | |
414 | 409 | if ((slippagePInv == slippagePInv)) | |
415 | 410 | then { | |
416 | 411 | let lpTrnsfr = if (autoStake) | |
417 | 412 | then { | |
418 | 413 | let slpStakeInv = invoke(stakingCntr, "stake", nil, [AttachedPayment(lpAssetId, emitLpAmt)]) | |
419 | 414 | if ((slpStakeInv == slpStakeInv)) | |
420 | 415 | then nil | |
421 | 416 | else throw("Strict value is not equal to itself.") | |
422 | 417 | } | |
423 | 418 | else [ScriptTransfer(i.caller, emitLpAmt, lpAssetId)] | |
424 | 419 | (state ++ lpTrnsfr) | |
425 | 420 | } | |
426 | 421 | else throw("Strict value is not equal to itself.") | |
427 | 422 | } | |
428 | 423 | else throw("Strict value is not equal to itself.") | |
429 | 424 | } | |
430 | 425 | else throw("Strict value is not equal to itself.") | |
431 | 426 | } | |
432 | 427 | } | |
433 | 428 | ||
434 | 429 | ||
435 | 430 | ||
436 | 431 | @Callable(i) | |
437 | 432 | func putOneTkn (inAmtAmount,inPrAmount,autoStake) = { | |
438 | 433 | let cfg = getFactoryConfig() | |
439 | 434 | let stakingCntr = valueOrErrorMessage(addressFromString(cfg[idxFactStakCntr]), "Wrong staking address") | |
440 | 435 | let slipCntr = valueOrErrorMessage(addressFromString(cfg[idxFactSlippCntr]), "Wrong slippage address") | |
436 | + | let gwxCntr = valueOrErrorMessage(addressFromString(cfg[idxFactGwxRewCntr]), "Wrong slippage address") | |
441 | 437 | let poolCfg = getPoolConfig() | |
442 | 438 | let amId = poolCfg[idxAmAsId] | |
443 | 439 | let prId = poolCfg[idxPrAsId] | |
444 | 440 | let amDcm = parseIntValue(poolCfg[idxAmtAsDcm]) | |
445 | 441 | let prDcm = parseIntValue(poolCfg[idxPriceAsDcm]) | |
446 | 442 | if ((size(i.payments) != 1)) | |
447 | 443 | then throw("exactly 1 payment is expected") | |
448 | 444 | else { | |
449 | 445 | let pmt = value(i.payments[0]) | |
450 | 446 | let pmtAssetId = toBase58String(value(pmt.assetId)) | |
451 | 447 | let pmtAmt = pmt.amount | |
452 | 448 | let amAssetSwapX18 = toX18(inAmtAmount, amDcm) | |
453 | 449 | let prAssetSwapX18 = toX18(inPrAmount, prDcm) | |
454 | 450 | let amBalance = getAccBalance(amId) | |
455 | 451 | let amBalanceX18 = toX18(amBalance, amDcm) | |
456 | 452 | let prBalance = getAccBalance(prId) | |
457 | 453 | let prBalanceX18 = toX18(prBalance, prDcm) | |
458 | - | let dCur = calcD(toBigInt(amBalance), toBigInt(prBalance), 5000000000) | |
454 | + | let dCur = invoke(gwxCntr, "calcD", [toString(amBalance), toString(prBalance), "50", "100000000", "1"], nil) | |
455 | + | let invLeft = parseBigIntValue(asString(dCur)) | |
459 | 456 | let isValid = if ((pmtAssetId == amId)) | |
460 | 457 | then { | |
461 | 458 | let pmtAmtX18 = toX18(pmtAmt, amDcm) | |
462 | 459 | let prAdiff = prAssetSwapX18 | |
463 | 460 | let amAdiff = (pmtAmtX18 - amAssetSwapX18) | |
464 | - | let dSwap = calcD((toBigInt(amBalance) + toBigInt(fromX18(amAdiff, amDcm))), (toBigInt(prBalance) - toBigInt(fromX18(prAdiff, prDcm))), 5000000000) | |
465 | - | true | |
461 | + | let dSwap = invoke(gwxCntr, "calcD", [toString((toBigInt(amBalance) + toBigInt(fromX18(amAdiff, amDcm)))), toString((toBigInt(prBalance) - toBigInt(fromX18(prAdiff, prDcm)))), "50", "100000000", "1"], nil) | |
462 | + | let invRight = parseBigIntValue(asString(dSwap)) | |
463 | + | let invDiff = fraction((invRight - invLeft), scale8BigInt, invLeft) | |
464 | + | if ((invDiff > toBigInt(1000))) | |
465 | + | then throw("Wrong arguments passed. D decreased.") | |
466 | + | else true | |
466 | 467 | } | |
467 | 468 | else { | |
468 | 469 | let pmtPrX18 = toX18(pmtAmt, prDcm) | |
469 | 470 | let prAdiff = (prAssetSwapX18 - pmtPrX18) | |
470 | 471 | let amAdiff = amAssetSwapX18 | |
471 | - | let dSwap = calcD((toBigInt(amBalance) - toBigInt(fromX18(amAdiff, amDcm))), (toBigInt(prBalance) + toBigInt(fromX18(prAdiff, prDcm))), 50) | |
472 | - | true | |
472 | + | let dSwap = invoke(gwxCntr, "calcD", [toString((toBigInt(amBalance) - toBigInt(fromX18(amAdiff, amDcm)))), toString((toBigInt(prBalance) + toBigInt(fromX18(prAdiff, prDcm)))), "50", "100000000", "1"], nil) | |
473 | + | let invRight = parseBigIntValue(asString(dSwap)) | |
474 | + | let invDiff = fraction((invRight - invLeft), scale8BigInt, invLeft) | |
475 | + | if ((invDiff > toBigInt(1000))) | |
476 | + | then throw("Wrong arguments passed. D decreased.") | |
477 | + | else true | |
473 | 478 | } | |
474 | 479 | if (!(isValid)) | |
475 | 480 | then throw("Errors.") | |
476 | 481 | else { | |
477 | 482 | let estPut = commonPut(toString(i.caller), toBase58String(i.transactionId), AttachedPayment(fromBase58String(amId), inAmtAmount), AttachedPayment(fromBase58String(prId), inPrAmount), 50000000000, true) | |
478 | 483 | let emitLpAmt = estPut._2 | |
479 | 484 | let lpAssetId = estPut._7 | |
480 | 485 | let state = estPut._9 | |
481 | 486 | let amDiff = estPut._10 | |
482 | 487 | let prDiff = estPut._11 | |
483 | 488 | let emitInv = invoke(factoryContract, "emit", [emitLpAmt], nil) | |
484 | 489 | if ((emitInv == emitInv)) | |
485 | 490 | then { | |
486 | 491 | let slippageAInv = if ((amDiff > 0)) | |
487 | 492 | then invoke(slipCntr, "put", nil, [AttachedPayment(fromBase58String(amId), amDiff)]) | |
488 | 493 | else nil | |
489 | 494 | if ((slippageAInv == slippageAInv)) | |
490 | 495 | then { | |
491 | 496 | let slippagePInv = if ((prDiff > 0)) | |
492 | 497 | then invoke(slipCntr, "put", nil, [AttachedPayment(fromBase58String(prId), prDiff)]) | |
493 | 498 | else nil | |
494 | 499 | if ((slippagePInv == slippagePInv)) | |
495 | 500 | then { | |
496 | 501 | let lpTrnsfr = if (autoStake) | |
497 | 502 | then { | |
498 | 503 | let slpStakeInv = invoke(stakingCntr, "stake", nil, [AttachedPayment(lpAssetId, emitLpAmt)]) | |
499 | 504 | if ((slpStakeInv == slpStakeInv)) | |
500 | 505 | then nil | |
501 | 506 | else throw("Strict value is not equal to itself.") | |
502 | 507 | } | |
503 | 508 | else [ScriptTransfer(i.caller, emitLpAmt, lpAssetId)] | |
504 | 509 | (state ++ lpTrnsfr) | |
505 | 510 | } | |
506 | 511 | else throw("Strict value is not equal to itself.") | |
507 | 512 | } | |
508 | 513 | else throw("Strict value is not equal to itself.") | |
509 | 514 | } | |
510 | 515 | else throw("Strict value is not equal to itself.") | |
511 | 516 | } | |
512 | 517 | } | |
513 | 518 | } | |
514 | 519 | ||
515 | 520 | ||
516 | 521 | ||
517 | 522 | @Callable(i) | |
518 | 523 | func putForFree (maxSlippage) = if ((0 > maxSlippage)) | |
519 | 524 | then throw("Invalid value passed") | |
520 | 525 | else if ((size(i.payments) != 2)) | |
521 | 526 | then throw("exactly 2 payments are expected") | |
522 | 527 | else { | |
523 | 528 | let estPut = commonPut(toString(i.caller), toBase58String(i.transactionId), AttachedPayment(value(i.payments[0]).assetId, value(i.payments[0]).amount), i.payments[1], maxSlippage, false) | |
524 | 529 | estPut._9 | |
525 | 530 | } | |
526 | 531 | ||
527 | 532 | ||
528 | 533 | ||
529 | 534 | @Callable(i) | |
530 | 535 | func get () = { | |
531 | 536 | let res = commonGet(i) | |
532 | 537 | let outAmtAmt = res._1 | |
533 | 538 | let outPrAmt = res._2 | |
534 | 539 | let pmtAmt = res._3 | |
535 | 540 | let pmtAssetId = res._4 | |
536 | 541 | let state = res._5 | |
537 | 542 | let burnLPAssetOnFactory = invoke(factoryContract, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)]) | |
538 | 543 | if ((burnLPAssetOnFactory == burnLPAssetOnFactory)) | |
539 | 544 | then state | |
540 | 545 | else throw("Strict value is not equal to itself.") | |
541 | 546 | } | |
542 | 547 | ||
543 | 548 | ||
544 | 549 | ||
545 | 550 | @Callable(i) | |
546 | 551 | func getOneTkn (amAssetSwap,prAssetSwap,outAmount,outAssetId) = if ((size(i.payments) != 1)) | |
547 | 552 | then throw("exactly 1 payment is expected") | |
548 | 553 | else { | |
549 | 554 | let cfg = getPoolConfig() | |
550 | 555 | let lpId = cfg[idxLPAsId] | |
551 | 556 | let amId = cfg[idxAmAsId] | |
552 | 557 | let prId = cfg[idxPrAsId] | |
553 | 558 | let amDcm = parseIntValue(cfg[idxAmtAsDcm]) | |
554 | 559 | let prDcm = parseIntValue(cfg[idxPriceAsDcm]) | |
555 | 560 | let poolStatus = cfg[idxPoolStatus] | |
556 | 561 | if (if ((outAssetId != amId)) | |
557 | 562 | then (outAssetId != prId) | |
558 | 563 | else false) | |
559 | 564 | then throw(("Incorrect out asset id passed: " + outAssetId)) | |
560 | 565 | else { | |
561 | 566 | let resultAssetId = if ((outAssetId == amId)) | |
562 | 567 | then amId | |
563 | 568 | else prId | |
564 | 569 | let resultAmtAmount = if ((outAssetId == amId)) | |
565 | 570 | then outAmount | |
566 | 571 | else 0 | |
567 | 572 | let resultPrAmount = if ((outAssetId == prId)) | |
568 | 573 | then outAmount | |
569 | 574 | else 0 | |
570 | 575 | let pmt = value(i.payments[0]) | |
571 | 576 | let userAddress = i.caller | |
572 | 577 | let txId58 = toBase58String(i.transactionId) | |
573 | 578 | let pmtAssetId = value(pmt.assetId) | |
574 | 579 | let pmtAmt = pmt.amount | |
575 | 580 | if ((lpId != toBase58String(pmtAssetId))) | |
576 | 581 | then throw("Invalid asset passed.") | |
577 | 582 | else { | |
578 | 583 | let amAssetSwapX18 = toX18(amAssetSwap, amDcm) | |
579 | 584 | let prAssetSwapX18 = toX18(prAssetSwap, prDcm) | |
580 | 585 | let swapPriceX18 = calcPriceBigInt(prAssetSwapX18, amAssetSwapX18) | |
581 | 586 | let r = estimateGetOperation(toBase58String(i.transactionId), toBase58String(pmtAssetId), pmtAmt, i.caller) | |
582 | 587 | let outAmAmt = r._1 | |
583 | 588 | let outPrAmt = r._2 | |
584 | 589 | let totalR = if ((outAssetId == amId)) | |
585 | 590 | then { | |
586 | 591 | let amtAsRes = fromX18(fraction(toX18(outPrAmt, prDcm), scale18, swapPriceX18), amDcm) | |
587 | 592 | (amtAsRes + outAmAmt) | |
588 | 593 | } | |
589 | 594 | else { | |
590 | 595 | let amSwopPartInPriceAsset = (resultPrAmount - outPrAmt) | |
591 | 596 | let convRes = fraction(toX18(amSwopPartInPriceAsset, amDcm), scale18, swapPriceX18) | |
592 | 597 | let prAsRes = fromX18(fraction(toX18(outAmAmt, amDcm), swapPriceX18, scale18), prDcm) | |
593 | 598 | let amAssetDiff = fraction((convRes - amAssetSwapX18), scale8BigInt, amAssetSwapX18) | |
594 | 599 | (prAsRes + outPrAmt) | |
595 | 600 | } | |
596 | 601 | let amBalance = getAccBalance(amId) | |
597 | 602 | let amBalanceX18 = toX18(amBalance, amDcm) | |
598 | 603 | let prBalance = getAccBalance(prId) | |
599 | 604 | let prBalanceX18 = toX18(prBalance, prDcm) | |
600 | 605 | let curPriceX18 = calcPriceBigInt(prBalanceX18, amBalanceX18) | |
601 | 606 | let curPrice = fromX18(curPriceX18, scale8) | |
602 | 607 | let state = [ScriptTransfer(userAddress, totalR, if ((resultAssetId == "WAVES")) | |
603 | 608 | then unit | |
604 | 609 | else fromBase58String(resultAssetId)), StringEntry(keyGetActionByUser(toString(userAddress), txId58), dataGetActionInfo(resultAmtAmount, resultPrAmount, pmtAmt, curPrice, height, lastBlock.timestamp)), IntegerEntry(keyPriceLast(), curPrice), IntegerEntry(keyPriceHistory(height, lastBlock.timestamp), curPrice)] | |
605 | 610 | let burn = invoke(factoryContract, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)]) | |
606 | 611 | if ((burn == burn)) | |
607 | 612 | then state | |
608 | 613 | else throw("Strict value is not equal to itself.") | |
609 | 614 | } | |
610 | 615 | } | |
611 | 616 | } | |
612 | 617 | ||
613 | 618 | ||
614 | 619 | ||
615 | 620 | @Callable(i) | |
616 | 621 | func getNoLess (noLessThenAmtAsset,noLessThenPriceAsset) = { | |
617 | 622 | let res = commonGet(i) | |
618 | 623 | let outAmAmt = res._1 | |
619 | 624 | let outPrAmt = res._2 | |
620 | 625 | let pmtAmt = res._3 | |
621 | 626 | let pmtAssetId = res._4 | |
622 | 627 | let state = res._5 | |
623 | 628 | if ((noLessThenAmtAsset > outAmAmt)) | |
624 | 629 | then throw(((("noLessThenAmtAsset failed: " + toString(outAmAmt)) + " < ") + toString(noLessThenAmtAsset))) | |
625 | 630 | else if ((noLessThenPriceAsset > outPrAmt)) | |
626 | 631 | then throw(((("noLessThenPriceAsset failed: " + toString(outPrAmt)) + " < ") + toString(noLessThenPriceAsset))) | |
627 | 632 | else { | |
628 | 633 | let burnLPAssetOnFactory = invoke(factoryContract, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)]) | |
629 | 634 | if ((burnLPAssetOnFactory == burnLPAssetOnFactory)) | |
630 | 635 | then state | |
631 | 636 | else throw("Strict value is not equal to itself.") | |
632 | 637 | } | |
633 | 638 | } | |
634 | 639 | ||
635 | 640 | ||
636 | 641 | ||
637 | 642 | @Callable(i) | |
638 | 643 | func unstakeAndGet (amount) = { | |
639 | 644 | let checkPayments = if ((size(i.payments) != 0)) | |
640 | 645 | then throw("No payments are expected") | |
641 | 646 | else true | |
642 | 647 | if ((checkPayments == checkPayments)) | |
643 | 648 | then { | |
644 | 649 | let cfg = getPoolConfig() | |
645 | 650 | let factoryCfg = getFactoryConfig() | |
646 | 651 | let lpAssetId = fromBase58String(cfg[idxLPAsId]) | |
647 | 652 | let stakingContract = valueOrErrorMessage(addressFromString(factoryCfg[idxFactStakCntr]), "Error. Incorrect staking address.") | |
648 | 653 | let unstakeInv = invoke(stakingContract, "unstake", [toBase58String(lpAssetId), amount], nil) | |
649 | 654 | if ((unstakeInv == unstakeInv)) | |
650 | 655 | then { | |
651 | 656 | let res = estimateGetOperation(toBase58String(i.transactionId), toBase58String(lpAssetId), amount, i.caller) | |
652 | 657 | let poolStatus = parseIntValue(res._9) | |
653 | 658 | let state = res._10 | |
654 | 659 | let checkPoolStatus = if (if (isGlobalShutdown()) | |
655 | 660 | then true | |
656 | 661 | else (poolStatus == PoolShutdown)) | |
657 | 662 | then throw(("Get operation is blocked by admin. Status = " + toString(poolStatus))) | |
658 | 663 | else true | |
659 | 664 | if ((checkPoolStatus == checkPoolStatus)) | |
660 | 665 | then { | |
661 | 666 | let burnLPAssetOnFactory = invoke(factoryContract, "burn", [amount], [AttachedPayment(lpAssetId, amount)]) | |
662 | 667 | if ((burnLPAssetOnFactory == burnLPAssetOnFactory)) | |
663 | 668 | then state | |
664 | 669 | else throw("Strict value is not equal to itself.") | |
665 | 670 | } | |
666 | 671 | else throw("Strict value is not equal to itself.") | |
667 | 672 | } | |
668 | 673 | else throw("Strict value is not equal to itself.") | |
669 | 674 | } | |
670 | 675 | else throw("Strict value is not equal to itself.") | |
671 | 676 | } | |
672 | 677 | ||
673 | 678 | ||
674 | 679 | ||
675 | 680 | @Callable(i) | |
676 | 681 | func activate (amtAssetStr,priceAssetStr) = if ((toString(i.caller) != toString(factoryContract))) | |
677 | 682 | then throw("permissions denied") | |
678 | 683 | else $Tuple2([StringEntry(keyAmtAsset(), amtAssetStr), StringEntry(keyPriceAsset(), priceAssetStr)], "success") | |
679 | 684 | ||
680 | 685 | ||
681 | 686 | ||
682 | 687 | @Callable(i) | |
683 | 688 | func getPoolConfigWrapperREADONLY () = $Tuple2(nil, getPoolConfig()) | |
684 | 689 | ||
685 | 690 | ||
686 | 691 | ||
687 | 692 | @Callable(i) | |
688 | 693 | func getAccBalanceWrapperREADONLY (assetId) = $Tuple2(nil, getAccBalance(assetId)) | |
689 | 694 | ||
690 | 695 | ||
691 | 696 | ||
692 | 697 | @Callable(i) | |
693 | 698 | func calcPricesWrapperREADONLY (amAmt,prAmt,lpAmt) = { | |
694 | 699 | let prices = calcPrices(amAmt, prAmt, lpAmt) | |
695 | 700 | $Tuple2(nil, [toString(prices[0]), toString(prices[1]), toString(prices[2])]) | |
696 | 701 | } | |
697 | 702 | ||
698 | 703 | ||
699 | 704 | ||
700 | 705 | @Callable(i) | |
701 | 706 | func fromX18WrapperREADONLY (val,resultScaleMult) = $Tuple2(nil, fromX18(parseBigIntValue(val), resultScaleMult)) | |
702 | 707 | ||
703 | 708 | ||
704 | 709 | ||
705 | 710 | @Callable(i) | |
706 | 711 | func toX18WrapperREADONLY (origVal,origScaleMult) = $Tuple2(nil, toString(toX18(origVal, origScaleMult))) | |
707 | 712 | ||
708 | 713 | ||
709 | 714 | ||
710 | 715 | @Callable(i) | |
711 | 716 | func calcPriceBigIntWrapperREADONLY (prAmtX18,amAmtX18) = $Tuple2(nil, toString(calcPriceBigInt(parseBigIntValue(prAmtX18), parseBigIntValue(amAmtX18)))) | |
712 | 717 | ||
713 | 718 | ||
714 | 719 | ||
715 | 720 | @Callable(i) | |
716 | 721 | func estimatePutOperationWrapperREADONLY (txId58,slippage,inAmAmt,inAmId,inPrAmt,inPrId,userAddress,isEvaluate,emitLp) = $Tuple2(nil, estimatePutOperation(txId58, slippage, inAmAmt, inAmId, inPrAmt, inPrId, userAddress, isEvaluate, emitLp)) | |
717 | 722 | ||
718 | 723 | ||
719 | 724 | ||
720 | 725 | @Callable(i) | |
721 | 726 | func estimateGetOperationWrapperREADONLY (txId58,pmtAssetId,pmtLpAmt,userAddress) = { | |
722 | 727 | let res = estimateGetOperation(txId58, pmtAssetId, pmtLpAmt, addressFromStringValue(userAddress)) | |
723 | 728 | $Tuple2(nil, $Tuple10(res._1, res._2, res._3, res._4, res._5, res._6, res._7, toString(res._8), res._9, res._10)) | |
724 | 729 | } | |
725 | 730 | ||
726 | 731 | ||
727 | 732 | @Verifier(tx) | |
728 | 733 | func verify () = match tx { | |
729 | 734 | case order: Order => | |
730 | 735 | let matcherPub = getMatcherPubOrFail() | |
731 | 736 | let orderValid = validateMatcherOrderAllowed(order) | |
732 | 737 | let senderValid = sigVerify(order.bodyBytes, order.proofs[0], order.senderPublicKey) | |
733 | 738 | let matcherValid = sigVerify(order.bodyBytes, order.proofs[1], matcherPub) | |
734 | 739 | if (if (if (orderValid) | |
735 | 740 | then senderValid | |
736 | 741 | else false) | |
737 | 742 | then matcherValid | |
738 | 743 | else false) | |
739 | 744 | then true | |
740 | 745 | else throwOrderError(orderValid, senderValid, matcherValid) | |
741 | 746 | case _ => | |
742 | 747 | let managerPublic = valueOrElse(getString(this, keyManagerPublicKey()), EMPTY) | |
743 | 748 | if ((managerPublic == EMPTY)) | |
744 | 749 | then sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
745 | 750 | else sigVerify(tx.bodyBytes, tx.proofs[0], fromBase58String(managerPublic)) | |
746 | 751 | } | |
747 | 752 |
github/deemru/w8io/026f985 104.37 ms ◑