tx · nwBDxvd2ntWN7VTDmJr1BEsJdcVJZXjhKfs13WUMoxX 3N5C2THWC3XfNzmC15YBeTBLamjhhCUdeeo: -0.01400000 Waves 2021.10.29 11:29 [1767368] smart account 3N5C2THWC3XfNzmC15YBeTBLamjhhCUdeeo > SELF 0.00000000 Waves
{ "type": 13, "id": "nwBDxvd2ntWN7VTDmJr1BEsJdcVJZXjhKfs13WUMoxX", "fee": 1400000, "feeAssetId": null, "timestamp": 1635496232355, "version": 1, "sender": "3N5C2THWC3XfNzmC15YBeTBLamjhhCUdeeo", "senderPublicKey": "BweqtcaAvG8gdYYQoaMsbUczGmHJAwWBShc9noVdvmWx", "proofs": [ "2fn7a8Kpokvq5LnV1LGaJED6jiTAd21KHnWD6FLGUu6axAunQd5sWk7E3HQSirU9pgEJaRGbg67ZAthzSofpufs6" ], "script": "base64:AAIFAAAAAAAAADMIAhIECgIICBIECgIBBBIDCgEBEgASBAoCAQESBAoCCAgSABIDCgEBEgMKAQESBAoCCAEAAABCAAAAAApsUGRlY2ltYWxzAAAAAAAAAAAIAAAAAAZzY2FsZTgAAAAAAAX14QAAAAAADHNjYWxlOEJpZ0ludAkAATYAAAABAAAAAAAF9eEAAAAAAAdzY2FsZTE4CQABNgAAAAEADeC2s6dkAAAAAAAACnplcm9CaWdJbnQJAAE2AAAAAQAAAAAAAAAAAAAAAAADU0VQAgAAAAJfXwAAAAAFRU1QVFkCAAAAAAAAAAAKUG9vbEFjdGl2ZQAAAAAAAAAAAQAAAAAPUG9vbFB1dERpc2FibGVkAAAAAAAAAAACAAAAABNQb29sTWF0Y2hlckRpc2FibGVkAAAAAAAAAAADAAAAAAxQb29sU2h1dGRvd24AAAAAAAAAAAQAAAAADmlkeFBvb2xBZGRyZXNzAAAAAAAAAAABAAAAAA1pZHhQb29sU3RhdHVzAAAAAAAAAAACAAAAABBpZHhQb29sTFBBc3NldElkAAAAAAAAAAADAAAAAA1pZHhBbXRBc3NldElkAAAAAAAAAAAEAAAAAA9pZHhQc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EAAAACCAUAAAAFb3JkZXIAAAAGcHJvb2ZzAAAAAAAAAAABBQAAAAptYXRjaGVyUHViAwMDBQAAAApvcmRlclZhbGlkBQAAAAtzZW5kZXJWYWxpZAcFAAAADG1hdGNoZXJWYWxpZAcGCQEAAAAPdGhyb3dPcmRlckVycm9yAAAAAwUAAAAKb3JkZXJWYWxpZAUAAAALc2VuZGVyVmFsaWQFAAAADG1hdGNoZXJWYWxpZAQAAAANbWFuYWdlclB1YmxpYwkBAAAAC3ZhbHVlT3JFbHNlAAAAAgkABB0AAAACBQAAAAR0aGlzCQEAAAATa2V5TWFuYWdlclB1YmxpY0tleQAAAAAFAAAABUVNUFRZAwkAAAAAAAACBQAAAA1tYW5hZ2VyUHVibGljBQAAAAVFTVBUWQkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAAIBQAAAAJ0eAAAAA9zZW5kZXJQdWJsaWNLZXkJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAACQACWQAAAAEFAAAADW1hbmFnZXJQdWJsaWNFIpGR", "chainId": 84, "height": 1767368, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: GbsNei7cVKXPjgS2rqms4NFtkVxrGnUjGwE91rv8Du3y Next: AbUKsaoRqwiCac6wPsLBq3LraCVShQSW3vXMehpsz2Jj Diff:
Old | New | Differences | |
---|---|---|---|
97 | 97 | func keyFactoryConfig () = "%s__factoryConfig" | |
98 | 98 | ||
99 | 99 | ||
100 | + | func keyMatcherPub () = "%s%s__matcher__publicKey" | |
101 | + | ||
102 | + | ||
100 | 103 | func keyMappingPoolContractAddressToPoolAssets (poolContractAddress) = (("%s%s%s__" + poolContractAddress) + "__mappings__poolContract2LpAsset") | |
101 | 104 | ||
102 | 105 | ||
112 | 115 | func keyPoolWeight (contractAddress) = ("%s%s__poolWeight__" + contractAddress) | |
113 | 116 | ||
114 | 117 | ||
118 | + | func throwOrderError (orderValid,senderValid,matcherValid) = throw(((((("order validation failed: orderValid=" + toString(orderValid)) + " senderValid=") + toString(senderValid)) + " matcherValid=") + toString(matcherValid))) | |
119 | + | ||
120 | + | ||
115 | 121 | func getStringOrFail (address,key) = valueOrErrorMessage(getString(address, key), makeString(["mandatory ", toString(address), ".", key, " is not defined"], "")) | |
116 | 122 | ||
117 | 123 | ||
121 | 127 | let factoryContract = addressFromStringValue(getStringOrFail(this, keyFactoryContract())) | |
122 | 128 | ||
123 | 129 | func isGlobalShutdown () = valueOrElse(getBoolean(factoryContract, keyAllPoolsShutdown()), false) | |
130 | + | ||
131 | + | ||
132 | + | func getMatcherPubOrFail () = fromBase58String(getStringOrFail(factoryContract, keyMatcherPub())) | |
124 | 133 | ||
125 | 134 | ||
126 | 135 | func getPoolConfig () = { | |
587 | 596 | @Verifier(tx) | |
588 | 597 | func verify () = match tx { | |
589 | 598 | case order: Order => | |
590 | - | if (validateMatcherOrderAllowed(order)) | |
591 | - | then sigVerify(order.bodyBytes, order.proofs[0], order.senderPublicKey) | |
592 | - | else false | |
599 | + | let matcherPub = getMatcherPubOrFail() | |
600 | + | let orderValid = validateMatcherOrderAllowed(order) | |
601 | + | let senderValid = sigVerify(order.bodyBytes, order.proofs[0], order.senderPublicKey) | |
602 | + | let matcherValid = sigVerify(order.bodyBytes, order.proofs[1], matcherPub) | |
603 | + | if (if (if (orderValid) | |
604 | + | then senderValid | |
605 | + | else false) | |
606 | + | then matcherValid | |
607 | + | else false) | |
608 | + | then true | |
609 | + | else throwOrderError(orderValid, senderValid, matcherValid) | |
593 | 610 | case _ => | |
594 | 611 | let managerPublic = valueOrElse(getString(this, keyManagerPublicKey()), EMPTY) | |
595 | 612 | if ((managerPublic == EMPTY)) |
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 | + | func keyMatcherPub () = "%s%s__matcher__publicKey" | |
101 | + | ||
102 | + | ||
100 | 103 | func keyMappingPoolContractAddressToPoolAssets (poolContractAddress) = (("%s%s%s__" + poolContractAddress) + "__mappings__poolContract2LpAsset") | |
101 | 104 | ||
102 | 105 | ||
103 | 106 | func keyPoolConfig (iAmtAsset,iPriceAsset) = (((("%d%d%s__" + iAmtAsset) + "__") + iPriceAsset) + "__config") | |
104 | 107 | ||
105 | 108 | ||
106 | 109 | func keyMappingsBaseAsset2internalId (baseAssetStr) = ("%s%s%s__mappings__baseAsset2internalId__" + baseAssetStr) | |
107 | 110 | ||
108 | 111 | ||
109 | 112 | func keyAllPoolsShutdown () = "%s__shutdown" | |
110 | 113 | ||
111 | 114 | ||
112 | 115 | func keyPoolWeight (contractAddress) = ("%s%s__poolWeight__" + contractAddress) | |
113 | 116 | ||
114 | 117 | ||
118 | + | func throwOrderError (orderValid,senderValid,matcherValid) = throw(((((("order validation failed: orderValid=" + toString(orderValid)) + " senderValid=") + toString(senderValid)) + " matcherValid=") + toString(matcherValid))) | |
119 | + | ||
120 | + | ||
115 | 121 | func getStringOrFail (address,key) = valueOrErrorMessage(getString(address, key), makeString(["mandatory ", toString(address), ".", key, " is not defined"], "")) | |
116 | 122 | ||
117 | 123 | ||
118 | 124 | func getIntOrFail (address,key) = valueOrErrorMessage(getInteger(address, key), makeString(["mandatory ", toString(address), ".", key, " is not defined"], "")) | |
119 | 125 | ||
120 | 126 | ||
121 | 127 | let factoryContract = addressFromStringValue(getStringOrFail(this, keyFactoryContract())) | |
122 | 128 | ||
123 | 129 | func isGlobalShutdown () = valueOrElse(getBoolean(factoryContract, keyAllPoolsShutdown()), false) | |
130 | + | ||
131 | + | ||
132 | + | func getMatcherPubOrFail () = fromBase58String(getStringOrFail(factoryContract, keyMatcherPub())) | |
124 | 133 | ||
125 | 134 | ||
126 | 135 | func getPoolConfig () = { | |
127 | 136 | let amtAsset = getStringOrFail(this, keyAmtAsset()) | |
128 | 137 | let priceAsset = getStringOrFail(this, keyPriceAsset()) | |
129 | 138 | let iPriceAsset = getIntOrFail(factoryContract, keyMappingsBaseAsset2internalId(priceAsset)) | |
130 | 139 | let iAmtAsset = getIntOrFail(factoryContract, keyMappingsBaseAsset2internalId(amtAsset)) | |
131 | 140 | split(getStringOrFail(factoryContract, keyPoolConfig(toString(iAmtAsset), toString(iPriceAsset))), SEP) | |
132 | 141 | } | |
133 | 142 | ||
134 | 143 | ||
135 | 144 | func getFactoryConfig () = split(getStringOrFail(factoryContract, keyFactoryConfig()), SEP) | |
136 | 145 | ||
137 | 146 | ||
138 | 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) | |
139 | 148 | ||
140 | 149 | ||
141 | 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) | |
142 | 151 | ||
143 | 152 | ||
144 | 153 | func getAccBalance (assetId) = if ((assetId == "WAVES")) | |
145 | 154 | then wavesBalance(this).available | |
146 | 155 | else assetBalance(this, fromBase58String(assetId)) | |
147 | 156 | ||
148 | 157 | ||
149 | 158 | func calcPriceBigInt (prAmtX18,amAmtX18) = fraction(prAmtX18, scale18, amAmtX18) | |
150 | 159 | ||
151 | 160 | ||
152 | 161 | func privateCalcPrice (amAssetDcm,prAssetDcm,amAmt,prAmt) = { | |
153 | 162 | let amtAssetAmtX18 = toX18(amAmt, amAssetDcm) | |
154 | 163 | let priceAssetAmtX18 = toX18(prAmt, prAssetDcm) | |
155 | 164 | calcPriceBigInt(priceAssetAmtX18, amtAssetAmtX18) | |
156 | 165 | } | |
157 | 166 | ||
158 | 167 | ||
159 | 168 | func calcPrices (amAmt,prAmt,lpAmt) = { | |
160 | 169 | let cfg = getPoolConfig() | |
161 | 170 | let amtAssetDcm = parseIntValue(cfg[idxAmtAssetDcm]) | |
162 | 171 | let priceAssetDcm = parseIntValue(cfg[idxPriceAssetDcm]) | |
163 | 172 | let priceX18 = privateCalcPrice(amtAssetDcm, priceAssetDcm, amAmt, prAmt) | |
164 | 173 | let amAmtX18 = toX18(amAmt, amtAssetDcm) | |
165 | 174 | let prAmtX18 = toX18(prAmt, priceAssetDcm) | |
166 | 175 | let lpAmtX18 = toX18(lpAmt, scale8) | |
167 | 176 | let lpPriceInAmAssetX18 = calcPriceBigInt(amAmtX18, lpAmtX18) | |
168 | 177 | let lpPriceInPrAssetX18 = calcPriceBigInt(prAmtX18, lpAmtX18) | |
169 | 178 | [priceX18, lpPriceInAmAssetX18, lpPriceInPrAssetX18] | |
170 | 179 | } | |
171 | 180 | ||
172 | 181 | ||
173 | 182 | func calculatePrices (amAmt,prAmt,lpAmt) = { | |
174 | 183 | let prices = calcPrices(amAmt, prAmt, lpAmt) | |
175 | 184 | [fromX18(prices[0], scale8), fromX18(prices[1], scale8), fromX18(prices[2], scale8)] | |
176 | 185 | } | |
177 | 186 | ||
178 | 187 | ||
179 | 188 | func estimateGetOperation (txId58,pmtAssetId,pmtLpAmt,userAddress) = { | |
180 | 189 | let cfg = getPoolConfig() | |
181 | 190 | let lpAssetId = cfg[idxPoolLPAssetId] | |
182 | 191 | let amAssetId = cfg[idxAmtAssetId] | |
183 | 192 | let prAssetId = cfg[idxPriceAssetId] | |
184 | 193 | let amAssetDcm = parseIntValue(cfg[idxAmtAssetDcm]) | |
185 | 194 | let prAssetDcm = parseIntValue(cfg[idxPriceAssetDcm]) | |
186 | 195 | let poolStatus = cfg[idxPoolStatus] | |
187 | 196 | let lpEmission = valueOrErrorMessage(assetInfo(fromBase58String(lpAssetId)), (("Asset " + lpAssetId) + " doesn't exist")).quantity | |
188 | 197 | if ((lpAssetId != pmtAssetId)) | |
189 | 198 | then throw("Invalid asset passed.") | |
190 | 199 | else { | |
191 | 200 | let amBalance = getAccBalance(amAssetId) | |
192 | 201 | let amBalanceX18 = toX18(amBalance, amAssetDcm) | |
193 | 202 | let prBalance = getAccBalance(prAssetId) | |
194 | 203 | let prBalanceX18 = toX18(prBalance, prAssetDcm) | |
195 | 204 | let curPriceX18 = calcPriceBigInt(prBalanceX18, amBalanceX18) | |
196 | 205 | let curPrice = fromX18(curPriceX18, scale8) | |
197 | 206 | let pmtLpAmtX18 = toX18(pmtLpAmt, scale8) | |
198 | 207 | let lpEmissionX18 = toX18(lpEmission, scale8) | |
199 | 208 | let outAmAmtX18 = fraction(amBalanceX18, pmtLpAmtX18, lpEmissionX18) | |
200 | 209 | let outPrAmtX18 = fraction(prBalanceX18, pmtLpAmtX18, lpEmissionX18) | |
201 | 210 | let outAmAmt = fromX18(outAmAmtX18, amAssetDcm) | |
202 | 211 | let outPrAmt = fromX18(outPrAmtX18, prAssetDcm) | |
203 | 212 | let state = if ((txId58 == "")) | |
204 | 213 | then nil | |
205 | 214 | else [ScriptTransfer(userAddress, outAmAmt, if ((amAssetId == "WAVES")) | |
206 | 215 | then unit | |
207 | 216 | else fromBase58String(amAssetId)), ScriptTransfer(userAddress, outPrAmt, if ((prAssetId == "WAVES")) | |
208 | 217 | then unit | |
209 | 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)] | |
210 | 219 | $Tuple10(outAmAmt, outPrAmt, amAssetId, prAssetId, amBalance, prBalance, lpEmission, curPriceX18, poolStatus, state) | |
211 | 220 | } | |
212 | 221 | } | |
213 | 222 | ||
214 | 223 | ||
215 | 224 | func estimatePutOperation (txId58,slippageTolerance,inAmAssetAmt,inAmAssetId,inPrAssetAmt,inPrAssetId,userAddress,isEvaluate,emitLp) = { | |
216 | 225 | let cfg = getPoolConfig() | |
217 | 226 | let lpAssetId = fromBase58String(cfg[idxPoolLPAssetId]) | |
218 | 227 | let amAssetIdStr = cfg[idxAmtAssetId] | |
219 | 228 | let prAssetIdStr = cfg[idxPriceAssetId] | |
220 | 229 | let iAmtAssetId = cfg[idxIAmtAssetId] | |
221 | 230 | let iPriceAssetId = cfg[idxIPriceAssetId] | |
222 | 231 | let amtAssetDcm = parseIntValue(cfg[idxAmtAssetDcm]) | |
223 | 232 | let priceAssetDcm = parseIntValue(cfg[idxPriceAssetDcm]) | |
224 | 233 | let poolStatus = cfg[idxPoolStatus] | |
225 | 234 | let lpEmission = valueOrErrorMessage(assetInfo(lpAssetId), (("Asset " + toBase58String(lpAssetId)) + " doesn't exist")).quantity | |
226 | 235 | let inAmAssetIdStr = toBase58String(valueOrElse(inAmAssetId, fromBase58String("WAVES"))) | |
227 | 236 | let inPrAssetIdStr = toBase58String(valueOrElse(inPrAssetId, fromBase58String("WAVES"))) | |
228 | 237 | if (if ((amAssetIdStr != inAmAssetIdStr)) | |
229 | 238 | then true | |
230 | 239 | else (prAssetIdStr != inPrAssetIdStr)) | |
231 | 240 | then throw("Invalid amt or price asset passed.") | |
232 | 241 | else { | |
233 | 242 | let amBalance = if (isEvaluate) | |
234 | 243 | then getAccBalance(amAssetIdStr) | |
235 | 244 | else (getAccBalance(amAssetIdStr) - inAmAssetAmt) | |
236 | 245 | let prBalance = if (isEvaluate) | |
237 | 246 | then getAccBalance(prAssetIdStr) | |
238 | 247 | else (getAccBalance(prAssetIdStr) - inPrAssetAmt) | |
239 | 248 | let inAmAssetAmtX18 = toX18(inAmAssetAmt, amtAssetDcm) | |
240 | 249 | let inPrAssetAmtX18 = toX18(inPrAssetAmt, priceAssetDcm) | |
241 | 250 | let userPriceX18 = calcPriceBigInt(inPrAssetAmtX18, inAmAssetAmtX18) | |
242 | 251 | let amBalanceX18 = toX18(amBalance, amtAssetDcm) | |
243 | 252 | let prBalanceX18 = toX18(prBalance, priceAssetDcm) | |
244 | 253 | let res = if ((lpEmission == 0)) | |
245 | 254 | then { | |
246 | 255 | let curPriceX18 = zeroBigInt | |
247 | 256 | let slippageX18 = zeroBigInt | |
248 | 257 | let lpAmtX18 = pow((inAmAssetAmtX18 * inPrAssetAmtX18), 0, toBigInt(5), 1, 0, DOWN) | |
249 | 258 | $Tuple5(fromX18(lpAmtX18, scale8), fromX18(inAmAssetAmtX18, amtAssetDcm), fromX18(inPrAssetAmtX18, priceAssetDcm), calcPriceBigInt((prBalanceX18 + inPrAssetAmtX18), (amBalanceX18 + inAmAssetAmtX18)), slippageX18) | |
250 | 259 | } | |
251 | 260 | else { | |
252 | 261 | let curPriceX18 = calcPriceBigInt(prBalanceX18, amBalanceX18) | |
253 | 262 | let slippageX18 = fraction(abs((curPriceX18 - userPriceX18)), scale18, curPriceX18) | |
254 | 263 | let slippageToleranceX18 = toX18(slippageTolerance, scale8) | |
255 | 264 | if (if ((curPriceX18 != zeroBigInt)) | |
256 | 265 | then (slippageX18 > slippageToleranceX18) | |
257 | 266 | else false) | |
258 | 267 | then throw(((("Price slippage " + toString(slippageX18)) + " exceeded the passed limit of ") + toString(slippageToleranceX18))) | |
259 | 268 | else { | |
260 | 269 | let lpEmissionX18 = toX18(lpEmission, scale8) | |
261 | 270 | let prViaAmX18 = fraction(inAmAssetAmtX18, curPriceX18, scale18) | |
262 | 271 | let amViaPrX18 = fraction(inPrAssetAmtX18, scale18, curPriceX18) | |
263 | 272 | let expectedAmts = if ((prViaAmX18 > inPrAssetAmtX18)) | |
264 | 273 | then $Tuple2(amViaPrX18, inPrAssetAmtX18) | |
265 | 274 | else $Tuple2(inAmAssetAmtX18, prViaAmX18) | |
266 | 275 | let expAmtAssetAmtX18 = expectedAmts._1 | |
267 | 276 | let expPriceAssetAmtX18 = expectedAmts._2 | |
268 | 277 | let lpAmtX18 = fraction(lpEmissionX18, expPriceAssetAmtX18, prBalanceX18) | |
269 | 278 | $Tuple5(fromX18(lpAmtX18, scale8), fromX18(expAmtAssetAmtX18, amtAssetDcm), fromX18(expPriceAssetAmtX18, priceAssetDcm), curPriceX18, slippageX18) | |
270 | 279 | } | |
271 | 280 | } | |
272 | 281 | let calcLpAmt = res._1 | |
273 | 282 | let calcAmAssetPmt = res._2 | |
274 | 283 | let calcPrAssetPmt = res._3 | |
275 | 284 | let curPrice = fromX18(res._4, scale8) | |
276 | 285 | let slippageCalc = fromX18(res._5, scale8) | |
277 | 286 | if ((0 >= calcLpAmt)) | |
278 | 287 | then throw("Invalid calculations. LP calculated is less than zero.") | |
279 | 288 | else { | |
280 | 289 | let emitLpAmt = if (!(emitLp)) | |
281 | 290 | then 0 | |
282 | 291 | else calcLpAmt | |
283 | 292 | let amDiff = (inAmAssetAmt - calcAmAssetPmt) | |
284 | 293 | let prDiff = (inPrAssetAmt - calcPrAssetPmt) | |
285 | 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))] | |
286 | 295 | $Tuple13(calcLpAmt, emitLpAmt, curPrice, amBalance, prBalance, lpEmission, lpAssetId, poolStatus, commonState, amDiff, prDiff, inAmAssetId, inPrAssetId) | |
287 | 296 | } | |
288 | 297 | } | |
289 | 298 | } | |
290 | 299 | ||
291 | 300 | ||
292 | 301 | func validateMatcherOrderAllowed (order) = { | |
293 | 302 | let cfg = getPoolConfig() | |
294 | 303 | let amtAssetId = cfg[idxAmtAssetId] | |
295 | 304 | let priceAssetId = cfg[idxPriceAssetId] | |
296 | 305 | let poolStatus = parseIntValue(cfg[idxPoolStatus]) | |
297 | 306 | let amtAssetDcm = parseIntValue(cfg[idxAmtAssetDcm]) | |
298 | 307 | let priceAssetDcm = parseIntValue(cfg[idxPriceAssetDcm]) | |
299 | 308 | let accAmtAssetBalance = getAccBalance(amtAssetId) | |
300 | 309 | let accPriceAssetBalance = getAccBalance(priceAssetId) | |
301 | 310 | let curPriceX18 = if ((order.orderType == Buy)) | |
302 | 311 | then privateCalcPrice(amtAssetDcm, priceAssetDcm, (accAmtAssetBalance + order.amount), accPriceAssetBalance) | |
303 | 312 | else privateCalcPrice(amtAssetDcm, priceAssetDcm, (accAmtAssetBalance - order.amount), accPriceAssetBalance) | |
304 | 313 | let curPrice = fromX18(curPriceX18, scale8) | |
305 | 314 | if (if (if (isGlobalShutdown()) | |
306 | 315 | then true | |
307 | 316 | else (poolStatus == PoolMatcherDisabled)) | |
308 | 317 | then true | |
309 | 318 | else (poolStatus == PoolShutdown)) | |
310 | 319 | then throw("Exchange operations disabled") | |
311 | 320 | else { | |
312 | 321 | let orderAmtAsset = order.assetPair.amountAsset | |
313 | 322 | let orderAmtAssetStr = if ((orderAmtAsset == unit)) | |
314 | 323 | then "WAVES" | |
315 | 324 | else toBase58String(value(orderAmtAsset)) | |
316 | 325 | let orderPriceAsset = order.assetPair.priceAsset | |
317 | 326 | let orderPriceAssetStr = if ((orderPriceAsset == unit)) | |
318 | 327 | then "WAVES" | |
319 | 328 | else toBase58String(value(orderPriceAsset)) | |
320 | 329 | if (if ((orderAmtAssetStr != amtAssetId)) | |
321 | 330 | then true | |
322 | 331 | else (orderPriceAssetStr != priceAssetId)) | |
323 | 332 | then throw("Wrong order assets.") | |
324 | 333 | else { | |
325 | 334 | let orderPrice = order.price | |
326 | 335 | let priceDcm = fraction(scale8, priceAssetDcm, amtAssetDcm) | |
327 | 336 | let castedOrderPrice = toScale(orderPrice, scale8, priceDcm) | |
328 | 337 | let isOrderPriceValid = if ((order.orderType == Buy)) | |
329 | 338 | then (curPrice >= castedOrderPrice) | |
330 | 339 | else (castedOrderPrice >= curPrice) | |
331 | 340 | true | |
332 | 341 | } | |
333 | 342 | } | |
334 | 343 | } | |
335 | 344 | ||
336 | 345 | ||
337 | 346 | func commonGet (i) = if ((size(i.payments) != 1)) | |
338 | 347 | then throw("exactly 1 payment is expected") | |
339 | 348 | else { | |
340 | 349 | let pmt = value(i.payments[0]) | |
341 | 350 | let pmtAssetId = value(pmt.assetId) | |
342 | 351 | let pmtAmt = pmt.amount | |
343 | 352 | let res = estimateGetOperation(toBase58String(i.transactionId), toBase58String(pmtAssetId), pmtAmt, i.caller) | |
344 | 353 | let outAmAmt = res._1 | |
345 | 354 | let outPrAmt = res._2 | |
346 | 355 | let poolStatus = parseIntValue(res._9) | |
347 | 356 | let state = res._10 | |
348 | 357 | if (if (isGlobalShutdown()) | |
349 | 358 | then true | |
350 | 359 | else (poolStatus == PoolShutdown)) | |
351 | 360 | then throw(("Get operation is blocked by admin. Status = " + toString(poolStatus))) | |
352 | 361 | else $Tuple5(outAmAmt, outPrAmt, pmtAmt, pmtAssetId, state) | |
353 | 362 | } | |
354 | 363 | ||
355 | 364 | ||
356 | 365 | func commonPut (i,slippageTolerance,emitLp) = if ((size(i.payments) != 2)) | |
357 | 366 | then throw("exactly 2 payments are expected") | |
358 | 367 | else { | |
359 | 368 | let amAssetPmt = value(i.payments[0]) | |
360 | 369 | let prAssetPmt = value(i.payments[1]) | |
361 | 370 | let estPut = estimatePutOperation(toBase58String(i.transactionId), slippageTolerance, amAssetPmt.amount, amAssetPmt.assetId, prAssetPmt.amount, prAssetPmt.assetId, toString(i.caller), false, emitLp) | |
362 | 371 | let poolStatus = parseIntValue(estPut._8) | |
363 | 372 | if (if (if (isGlobalShutdown()) | |
364 | 373 | then true | |
365 | 374 | else (poolStatus == PoolPutDisabled)) | |
366 | 375 | then true | |
367 | 376 | else (poolStatus == PoolShutdown)) | |
368 | 377 | then throw(("Put operation is blocked by admin. Status = " + toString(poolStatus))) | |
369 | 378 | else estPut | |
370 | 379 | } | |
371 | 380 | ||
372 | 381 | ||
373 | 382 | @Callable(i) | |
374 | 383 | func constructor (factoryContract,managerPublicKey) = if ((i.caller != this)) | |
375 | 384 | then throw("permissions denied") | |
376 | 385 | else [StringEntry(keyFactoryContract(), factoryContract), StringEntry(keyManagerPublicKey(), managerPublicKey)] | |
377 | 386 | ||
378 | 387 | ||
379 | 388 | ||
380 | 389 | @Callable(i) | |
381 | 390 | func put (slippageTolerance,shouldAutoStake) = { | |
382 | 391 | let factoryCfg = getFactoryConfig() | |
383 | 392 | let stakingContract = valueOrErrorMessage(addressFromString(factoryCfg[idxFactoryStakingContract]), "Error. Incorrect staking address.") | |
384 | 393 | let slippageContract = valueOrErrorMessage(addressFromString(factoryCfg[idxFactorySlippageContract]), "Error. Incorrect slippage contract address.") | |
385 | 394 | if ((0 > slippageTolerance)) | |
386 | 395 | then throw("Invalid slippageTolerance passed") | |
387 | 396 | else { | |
388 | 397 | let estPut = commonPut(i, slippageTolerance, true) | |
389 | 398 | let emitLpAmt = estPut._2 | |
390 | 399 | let lpAssetId = estPut._7 | |
391 | 400 | let state = estPut._9 | |
392 | 401 | let amDiff = estPut._10 | |
393 | 402 | let prDiff = estPut._11 | |
394 | 403 | let amId = estPut._12 | |
395 | 404 | let prId = estPut._13 | |
396 | 405 | let emitInv = invoke(factoryContract, "emit", [emitLpAmt], nil) | |
397 | 406 | if ((emitInv == emitInv)) | |
398 | 407 | then { | |
399 | 408 | let slippageAInv = if ((amDiff > 0)) | |
400 | 409 | then invoke(slippageContract, "put", nil, [AttachedPayment(amId, amDiff)]) | |
401 | 410 | else nil | |
402 | 411 | if ((slippageAInv == slippageAInv)) | |
403 | 412 | then { | |
404 | 413 | let slippagePInv = if ((prDiff > 0)) | |
405 | 414 | then invoke(slippageContract, "put", nil, [AttachedPayment(prId, prDiff)]) | |
406 | 415 | else nil | |
407 | 416 | if ((slippagePInv == slippagePInv)) | |
408 | 417 | then { | |
409 | 418 | let lpTransfer = if (shouldAutoStake) | |
410 | 419 | then { | |
411 | 420 | let slpStakeInv = invoke(stakingContract, "stake", nil, [AttachedPayment(lpAssetId, emitLpAmt)]) | |
412 | 421 | if ((slpStakeInv == slpStakeInv)) | |
413 | 422 | then nil | |
414 | 423 | else throw("Strict value is not equal to itself.") | |
415 | 424 | } | |
416 | 425 | else [ScriptTransfer(i.caller, emitLpAmt, lpAssetId)] | |
417 | 426 | (state ++ lpTransfer) | |
418 | 427 | } | |
419 | 428 | else throw("Strict value is not equal to itself.") | |
420 | 429 | } | |
421 | 430 | else throw("Strict value is not equal to itself.") | |
422 | 431 | } | |
423 | 432 | else throw("Strict value is not equal to itself.") | |
424 | 433 | } | |
425 | 434 | } | |
426 | 435 | ||
427 | 436 | ||
428 | 437 | ||
429 | 438 | @Callable(i) | |
430 | 439 | func putForFree (maxSlippage) = if ((0 > maxSlippage)) | |
431 | 440 | then throw("Invalid value passed") | |
432 | 441 | else { | |
433 | 442 | let estPut = commonPut(i, maxSlippage, false) | |
434 | 443 | estPut._9 | |
435 | 444 | } | |
436 | 445 | ||
437 | 446 | ||
438 | 447 | ||
439 | 448 | @Callable(i) | |
440 | 449 | func get () = { | |
441 | 450 | let res = commonGet(i) | |
442 | 451 | let outAmtAmt = res._1 | |
443 | 452 | let outPrAmt = res._2 | |
444 | 453 | let pmtAmt = res._3 | |
445 | 454 | let pmtAssetId = res._4 | |
446 | 455 | let state = res._5 | |
447 | 456 | let burnLPAssetOnFactory = invoke(factoryContract, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)]) | |
448 | 457 | if ((burnLPAssetOnFactory == burnLPAssetOnFactory)) | |
449 | 458 | then state | |
450 | 459 | else throw("Strict value is not equal to itself.") | |
451 | 460 | } | |
452 | 461 | ||
453 | 462 | ||
454 | 463 | ||
455 | 464 | @Callable(i) | |
456 | 465 | func getNoLess (noLessThenAmtAsset,noLessThenPriceAsset) = { | |
457 | 466 | let res = commonGet(i) | |
458 | 467 | let outAmAmt = res._1 | |
459 | 468 | let outPrAmt = res._2 | |
460 | 469 | let pmtAmt = res._3 | |
461 | 470 | let pmtAssetId = res._4 | |
462 | 471 | let state = res._5 | |
463 | 472 | if ((noLessThenAmtAsset > outAmAmt)) | |
464 | 473 | then throw(((("noLessThenAmtAsset failed: " + toString(outAmAmt)) + " < ") + toString(noLessThenAmtAsset))) | |
465 | 474 | else if ((noLessThenPriceAsset > outPrAmt)) | |
466 | 475 | then throw(((("noLessThenPriceAsset failed: " + toString(outPrAmt)) + " < ") + toString(noLessThenPriceAsset))) | |
467 | 476 | else { | |
468 | 477 | let burnLPAssetOnFactory = invoke(factoryContract, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)]) | |
469 | 478 | if ((burnLPAssetOnFactory == burnLPAssetOnFactory)) | |
470 | 479 | then state | |
471 | 480 | else throw("Strict value is not equal to itself.") | |
472 | 481 | } | |
473 | 482 | } | |
474 | 483 | ||
475 | 484 | ||
476 | 485 | ||
477 | 486 | @Callable(i) | |
478 | 487 | func activate (amtAssetStr,priceAssetStr) = if ((toString(i.caller) != toString(factoryContract))) | |
479 | 488 | then throw("permissions denied") | |
480 | 489 | else $Tuple2([StringEntry(keyAmtAsset(), amtAssetStr), StringEntry(keyPriceAsset(), priceAssetStr)], "success") | |
481 | 490 | ||
482 | 491 | ||
483 | 492 | ||
484 | 493 | @Callable(i) | |
485 | 494 | func statsREADONLY () = { | |
486 | 495 | let cfg = getPoolConfig() | |
487 | 496 | let lpAssetId = fromBase58String(cfg[idxPoolLPAssetId]) | |
488 | 497 | let amtAssetId = cfg[idxAmtAssetId] | |
489 | 498 | let priceAssetId = cfg[idxPriceAssetId] | |
490 | 499 | let iAmtAssetId = cfg[idxIAmtAssetId] | |
491 | 500 | let iPriceAssetId = cfg[idxIPriceAssetId] | |
492 | 501 | let amtAssetDcm = parseIntValue(cfg[idxAmtAssetDcm]) | |
493 | 502 | let priceAssetDcm = parseIntValue(cfg[idxPriceAssetDcm]) | |
494 | 503 | let poolLPBalance = valueOrErrorMessage(assetInfo(lpAssetId), (("Asset " + toBase58String(lpAssetId)) + " doesn't exist")).quantity | |
495 | 504 | let accAmtAssetBalance = getAccBalance(amtAssetId) | |
496 | 505 | let accPriceAssetBalance = getAccBalance(priceAssetId) | |
497 | 506 | let pricesList = calcPrices(accAmtAssetBalance, accPriceAssetBalance, poolLPBalance) | |
498 | 507 | let curPrice = 0 | |
499 | 508 | let lpAmtAssetShare = fromX18(pricesList[1], scale8) | |
500 | 509 | let lpPriceAssetShare = fromX18(pricesList[2], scale8) | |
501 | 510 | let poolWeight = value(getInteger(factoryContract, keyPoolWeight(toString(this)))) | |
502 | 511 | $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)) | |
503 | 512 | } | |
504 | 513 | ||
505 | 514 | ||
506 | 515 | ||
507 | 516 | @Callable(i) | |
508 | 517 | func evaluatePutByAmountAssetREADONLY (inAmAssetAmt) = { | |
509 | 518 | let cfg = getPoolConfig() | |
510 | 519 | let lpAssetId = fromBase58String(cfg[idxPoolLPAssetId]) | |
511 | 520 | let amAssetIdStr = cfg[idxAmtAssetId] | |
512 | 521 | let amAssetId = fromBase58String(amAssetIdStr) | |
513 | 522 | let prAssetIdStr = cfg[idxPriceAssetId] | |
514 | 523 | let prAssetId = fromBase58String(prAssetIdStr) | |
515 | 524 | let amtAssetDcm = parseIntValue(cfg[idxAmtAssetDcm]) | |
516 | 525 | let priceAssetDcm = parseIntValue(cfg[idxPriceAssetDcm]) | |
517 | 526 | let poolStatus = cfg[idxPoolStatus] | |
518 | 527 | let poolLPBalance = valueOrErrorMessage(assetInfo(lpAssetId), (("Asset " + toBase58String(lpAssetId)) + " doesn't exist")).quantity | |
519 | 528 | let accAmtAssetBalance = getAccBalance(amAssetIdStr) | |
520 | 529 | let accPriceAssetBalance = getAccBalance(prAssetIdStr) | |
521 | 530 | let amtAssetAmtX18 = toX18(accAmtAssetBalance, amtAssetDcm) | |
522 | 531 | let priceAssetAmtX18 = toX18(accPriceAssetBalance, priceAssetDcm) | |
523 | 532 | let curPriceX18 = if ((poolLPBalance == 0)) | |
524 | 533 | then zeroBigInt | |
525 | 534 | else calcPriceBigInt(priceAssetAmtX18, amtAssetAmtX18) | |
526 | 535 | let inAmAssetAmtX18 = toX18(inAmAssetAmt, amtAssetDcm) | |
527 | 536 | let inPrAssetAmtX18 = fraction(inAmAssetAmtX18, curPriceX18, scale18) | |
528 | 537 | let inPrAssetAmt = fromX18(inPrAssetAmtX18, priceAssetDcm) | |
529 | 538 | let estPut = estimatePutOperation("", 500000, inAmAssetAmt, amAssetId, inPrAssetAmt, prAssetId, "", true, false) | |
530 | 539 | let calcLpAmt = estPut._1 | |
531 | 540 | let curPriceCalc = estPut._3 | |
532 | 541 | let amBalance = estPut._4 | |
533 | 542 | let prBalance = estPut._5 | |
534 | 543 | let lpEmission = estPut._6 | |
535 | 544 | $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)) | |
536 | 545 | } | |
537 | 546 | ||
538 | 547 | ||
539 | 548 | ||
540 | 549 | @Callable(i) | |
541 | 550 | func evaluatePutByPriceAssetREADONLY (inPrAssetAmt) = { | |
542 | 551 | let cfg = getPoolConfig() | |
543 | 552 | let lpAssetId = fromBase58String(cfg[idxPoolLPAssetId]) | |
544 | 553 | let amAssetIdStr = cfg[idxAmtAssetId] | |
545 | 554 | let amAssetId = fromBase58String(amAssetIdStr) | |
546 | 555 | let prAssetIdStr = cfg[idxPriceAssetId] | |
547 | 556 | let prAssetId = fromBase58String(prAssetIdStr) | |
548 | 557 | let amtAssetDcm = parseIntValue(cfg[idxAmtAssetDcm]) | |
549 | 558 | let priceAssetDcm = parseIntValue(cfg[idxPriceAssetDcm]) | |
550 | 559 | let poolStatus = cfg[idxPoolStatus] | |
551 | 560 | let poolLPBalance = valueOrErrorMessage(assetInfo(lpAssetId), (("Asset " + toBase58String(lpAssetId)) + " doesn't exist")).quantity | |
552 | 561 | let amBalanceRaw = getAccBalance(amAssetIdStr) | |
553 | 562 | let prBalanceRaw = getAccBalance(prAssetIdStr) | |
554 | 563 | let amBalanceRawX18 = toX18(amBalanceRaw, amtAssetDcm) | |
555 | 564 | let prBalanceRawX18 = toX18(prBalanceRaw, priceAssetDcm) | |
556 | 565 | let curPriceX18 = if ((poolLPBalance == 0)) | |
557 | 566 | then zeroBigInt | |
558 | 567 | else calcPriceBigInt(prBalanceRawX18, amBalanceRawX18) | |
559 | 568 | let inPrAssetAmtX18 = toX18(inPrAssetAmt, priceAssetDcm) | |
560 | 569 | let inAmAssetAmtX18 = fraction(inPrAssetAmtX18, scale18, curPriceX18) | |
561 | 570 | let inAmAssetAmt = fromX18(inAmAssetAmtX18, amtAssetDcm) | |
562 | 571 | let estPut = estimatePutOperation("", 500000, inAmAssetAmt, amAssetId, inPrAssetAmt, prAssetId, "", true, false) | |
563 | 572 | let calcLpAmt = estPut._1 | |
564 | 573 | let curPriceCalc = estPut._3 | |
565 | 574 | let amBalance = estPut._4 | |
566 | 575 | let prBalance = estPut._5 | |
567 | 576 | let lpEmission = estPut._6 | |
568 | 577 | $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)) | |
569 | 578 | } | |
570 | 579 | ||
571 | 580 | ||
572 | 581 | ||
573 | 582 | @Callable(i) | |
574 | 583 | func evaluateGetREADONLY (paymentLpAssetId,paymentLpAmt) = { | |
575 | 584 | let res = estimateGetOperation("", paymentLpAssetId, paymentLpAmt, this) | |
576 | 585 | let outAmAmt = res._1 | |
577 | 586 | let outPrAmt = res._2 | |
578 | 587 | let amBalance = res._5 | |
579 | 588 | let prBalance = res._6 | |
580 | 589 | let lpEmission = res._7 | |
581 | 590 | let curPrice = res._8 | |
582 | 591 | let poolStatus = parseIntValue(res._9) | |
583 | 592 | $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)) | |
584 | 593 | } | |
585 | 594 | ||
586 | 595 | ||
587 | 596 | @Verifier(tx) | |
588 | 597 | func verify () = match tx { | |
589 | 598 | case order: Order => | |
590 | - | if (validateMatcherOrderAllowed(order)) | |
591 | - | then sigVerify(order.bodyBytes, order.proofs[0], order.senderPublicKey) | |
592 | - | else false | |
599 | + | let matcherPub = getMatcherPubOrFail() | |
600 | + | let orderValid = validateMatcherOrderAllowed(order) | |
601 | + | let senderValid = sigVerify(order.bodyBytes, order.proofs[0], order.senderPublicKey) | |
602 | + | let matcherValid = sigVerify(order.bodyBytes, order.proofs[1], matcherPub) | |
603 | + | if (if (if (orderValid) | |
604 | + | then senderValid | |
605 | + | else false) | |
606 | + | then matcherValid | |
607 | + | else false) | |
608 | + | then true | |
609 | + | else throwOrderError(orderValid, senderValid, matcherValid) | |
593 | 610 | case _ => | |
594 | 611 | let managerPublic = valueOrElse(getString(this, keyManagerPublicKey()), EMPTY) | |
595 | 612 | if ((managerPublic == EMPTY)) | |
596 | 613 | then sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
597 | 614 | else sigVerify(tx.bodyBytes, tx.proofs[0], fromBase58String(managerPublic)) | |
598 | 615 | } | |
599 | 616 |
github/deemru/w8io/026f985 101.13 ms ◑