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