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