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