tx · 7pCV147TdoGbd6RAhkKvMaMFCbJLTLPNBuRQHUD7TisZ 3NAefciWv6f9fWvEXdGgpHfanJFG8HqfjuT: -0.01400000 Waves 2021.12.19 17:58 [1841288] smart account 3NAefciWv6f9fWvEXdGgpHfanJFG8HqfjuT > SELF 0.00000000 Waves
{ "type": 13, "id": "7pCV147TdoGbd6RAhkKvMaMFCbJLTLPNBuRQHUD7TisZ", "fee": 1400000, "feeAssetId": null, "timestamp": 1639925928001, "version": 1, "sender": "3NAefciWv6f9fWvEXdGgpHfanJFG8HqfjuT", "senderPublicKey": "D1BL65meykxFZTCuq7jq9HSGLLnWvQamQPUNrguW5w39", "proofs": [ "2sAWzMn6K36ruihZp7wKzmUM6ZUyqB9dfGKG9DZ6oL3wUEXbMZYG8Z13eCRy3TaFF16hdsEiGyMRCuZNw91Uf4R6" ], "script": "base64:AAIFAAAAAAAAAGsIAhIECgIICBIECgIBBBIFCgMBAQQSAwoBARIAEgYKBAEBAQgSBAoCAQESAwoBARIECgIICBIAEgMKAQgSBQoDAQEBEgQKAggBEgQKAgEBEgQKAggIEgwKCggBAQIBAggEBAQSBgoECAgBCAAAAEIAAAAACmxQZGVjaW1hbHMAAAAAAAAAAAgAAAAABnNjYWxlOAAAAAAABfXhAAAAAAAMc2NhbGU4QmlnSW50CQABNgAAAAEAAAAAAAX14QAAAAAAB3NjYWxlMTgJAAE2AAAAAQAN4Lazp2QAAAAAAAAKemVyb0JpZ0ludAkAATYAAAABAAAAAAAAAAAAAAAAAANTRVACAAAAAl9fAAAAAAVFTVBUWQIAAAAAAAAAAApQb29sQWN0aXZlAAAAAAAAAAABAAAAAA9Qb29sUHV0RGlzYWJsZWQAAAAAAAAAAAIAAAAAE1Bvb2xNYXRjaGVyRGlzYWJsZWQAAAAAAAAAAAMAAAAADFBvb2xTaHV0ZG93bgAAAAAAAAAABAAAAAAOaWR4UG9vbEFkZHJlc3MAAAAAAAAAAAEAAAAADWlkeFBvb2xTdGF0dXMAAAAAAAAAAA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gAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAABW9yZGVyAAAABnByb29mcwAAAAAAAAAAAQUAAAAKbWF0Y2hlclB1YgMDAwUAAAAKb3JkZXJWYWxpZAUAAAALc2VuZGVyVmFsaWQHBQAAAAxtYXRjaGVyVmFsaWQHBgkBAAAAD3Rocm93T3JkZXJFcnJvcgAAAAMFAAAACm9yZGVyVmFsaWQFAAAAC3NlbmRlclZhbGlkBQAAAAxtYXRjaGVyVmFsaWQEAAAADW1hbmFnZXJQdWJsaWMJAQAAAAt2YWx1ZU9yRWxzZQAAAAIJAAQdAAAAAgUAAAAEdGhpcwkBAAAAE2tleU1hbmFnZXJQdWJsaWNLZXkAAAAABQAAAAVFTVBUWQMJAAAAAAAAAgUAAAANbWFuYWdlclB1YmxpYwUAAAAFRU1QVFkJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAACAUAAAACdHgAAAAPc2VuZGVyUHVibGljS2V5CQAB9AAAAAMIBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAAkAAlkAAAABBQAAAA1tYW5hZ2VyUHVibGljnSl4og==", "chainId": 84, "height": 1841288, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 2mwuqFbCHxVqWCswiqC8Ty97pWUZpu4kpGc3umZdWuFW Next: H4qs1BNEtJ9Jg1mWxehA8NVkvWrL2Hxu1LDoLMN6vKi6 Diff:
Old | New | Differences | |
---|---|---|---|
545 | 545 | let outAmAmt = r._1 | |
546 | 546 | let outPrAmt = r._2 | |
547 | 547 | let isValid = if ((outAssetId == amAssetId)) | |
548 | - | then { | |
549 | - | let prSwopPartInAmountAsset = (resultAmtAmount - outAmAmt) | |
550 | - | let convRes = fraction(toX18((resultAmtAmount - outAmAmt), amAssetDcm), scale18, swapPriceX18) | |
551 | - | let prAssetDiff = fraction((convRes - prAssetSwapX18), scale8BigInt, prAssetSwapX18) | |
552 | - | let passed = if (true) | |
553 | - | then throw(((((("Wrong calculation. Passed prAssetSwapX18 = " + toString(prAssetSwapX18)) + ", calculated prAsset = ") + toString(convRes)) + ", diff=") + toString(prAssetDiff))) | |
554 | - | else true | |
555 | - | throw(((((("Passed prAssetSwapX18 = " + toString(prAssetSwapX18)) + ", calculated prAsset = ") + toString(convRes)) + ", diff=") + toString(prAssetDiff))) | |
556 | - | } | |
557 | - | else { | |
558 | - | let amwopPartInPriceAsset = (resultPrAmount - outPrAmt) | |
559 | - | let convRes = fraction(toX18((resultPrAmount - outPrAmt), prAssetDcm), swapPriceX18, scale18) | |
560 | - | let amAssetDiff = fraction((convRes - amAssetSwapX18), scale8BigInt, amAssetSwapX18) | |
561 | - | let passed = if (true) | |
562 | - | then throw(((((("Wrong calculation. Passed amAssetSwapX18 = " + toString(amAssetSwapX18)) + ", calculated amtAsset = ") + toString(convRes)) + ", diff=") + toString(amAssetDiff))) | |
563 | - | else true | |
564 | - | throw(((((("Passed amAssetSwapX18 = " + toString(amAssetSwapX18)) + ", calculated amtAsset = ") + toString(convRes)) + ", diff=") + toString(amAssetDiff))) | |
565 | - | } | |
548 | + | then if (true) | |
549 | + | then throw("amount") | |
550 | + | else { | |
551 | + | let prSwopPartInAmountAsset = (resultAmtAmount - outAmAmt) | |
552 | + | let convRes = fraction(toX18((resultAmtAmount - outAmAmt), amAssetDcm), scale18, swapPriceX18) | |
553 | + | let prAssetDiff = fraction((convRes - prAssetSwapX18), scale8BigInt, prAssetSwapX18) | |
554 | + | let passed = if (true) | |
555 | + | then throw(((((("Wrong calculation. Passed prAssetSwapX18 = " + toString(prAssetSwapX18)) + ", calculated prAsset = ") + toString(convRes)) + ", diff=") + toString(prAssetDiff))) | |
556 | + | else true | |
557 | + | throw(((((("Passed prAssetSwapX18 = " + toString(prAssetSwapX18)) + ", calculated prAsset = ") + toString(convRes)) + ", diff=") + toString(prAssetDiff))) | |
558 | + | } | |
559 | + | else if (true) | |
560 | + | then throw("price") | |
561 | + | else { | |
562 | + | let amwopPartInPriceAsset = (resultPrAmount - outPrAmt) | |
563 | + | let convRes = fraction(toX18((resultPrAmount - outPrAmt), prAssetDcm), swapPriceX18, scale18) | |
564 | + | let amAssetDiff = fraction((convRes - amAssetSwapX18), scale8BigInt, amAssetSwapX18) | |
565 | + | let passed = if (true) | |
566 | + | then throw(((((("Wrong calculation. Passed amAssetSwapX18 = " + toString(amAssetSwapX18)) + ", calculated amtAsset = ") + toString(convRes)) + ", diff=") + toString(amAssetDiff))) | |
567 | + | else true | |
568 | + | throw(((((("Passed amAssetSwapX18 = " + toString(amAssetSwapX18)) + ", calculated amtAsset = ") + toString(convRes)) + ", diff=") + toString(amAssetDiff))) | |
569 | + | } | |
566 | 570 | let amBalance = getAccBalance(amAssetId) | |
567 | 571 | let amBalanceX18 = toX18(amBalance, amAssetDcm) | |
568 | 572 | let prBalance = getAccBalance(prAssetId) | |
570 | 574 | let curPriceX18 = calcPriceBigInt(prBalanceX18, amBalanceX18) | |
571 | 575 | let curPrice = fromX18(curPriceX18, scale8) | |
572 | 576 | if (true) | |
573 | - | then throw("Error") | |
577 | + | then throw(("Error. isValid = " + isValid)) | |
574 | 578 | else { | |
575 | 579 | let state = [ScriptTransfer(userAddress, outAmount, if ((resultAssetId == "WAVES")) | |
576 | 580 | then unit |
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,isOneAsset) = { | |
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 inAmAssetIdStr = cfg[idxIAmtAssetId] | |
230 | 230 | let inPrAssetIdStr = 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 amBalance = if (isEvaluate) | |
236 | 236 | then getAccBalance(amAssetIdStr) | |
237 | 237 | else (getAccBalance(amAssetIdStr) - inAmAssetAmt) | |
238 | 238 | let prBalance = if (isEvaluate) | |
239 | 239 | then getAccBalance(prAssetIdStr) | |
240 | 240 | else (getAccBalance(prAssetIdStr) - inPrAssetAmt) | |
241 | 241 | let inAmAssetAmtX18 = toX18(inAmAssetAmt, amtAssetDcm) | |
242 | 242 | let inPrAssetAmtX18 = toX18(inPrAssetAmt, priceAssetDcm) | |
243 | 243 | let userPriceX18 = calcPriceBigInt(inPrAssetAmtX18, inAmAssetAmtX18) | |
244 | 244 | let amBalanceX18 = toX18(amBalance, amtAssetDcm) | |
245 | 245 | let prBalanceX18 = toX18(prBalance, priceAssetDcm) | |
246 | 246 | let res = if ((lpEmission == 0)) | |
247 | 247 | then { | |
248 | 248 | let curPriceX18 = zeroBigInt | |
249 | 249 | let slippageX18 = zeroBigInt | |
250 | 250 | let lpAmtX18 = pow((inAmAssetAmtX18 * inPrAssetAmtX18), 0, toBigInt(5), 1, 0, DOWN) | |
251 | 251 | $Tuple5(fromX18(lpAmtX18, scale8), fromX18(inAmAssetAmtX18, amtAssetDcm), fromX18(inPrAssetAmtX18, priceAssetDcm), calcPriceBigInt((prBalanceX18 + inPrAssetAmtX18), (amBalanceX18 + inAmAssetAmtX18)), slippageX18) | |
252 | 252 | } | |
253 | 253 | else { | |
254 | 254 | let tRes = if (isOneAsset) | |
255 | 255 | then { | |
256 | 256 | let lpEmissionX18 = toX18(lpEmission, scale8) | |
257 | 257 | let sumInAssets = (inAmAssetAmtX18 + inPrAssetAmtX18) | |
258 | 258 | let sumPoolBalances = (amBalanceX18 + prBalanceX18) | |
259 | 259 | let lpAmtX18 = fraction(lpEmissionX18, sumInAssets, sumPoolBalances) | |
260 | 260 | let curPriceX18 = calcPriceBigInt(prBalanceX18, amBalanceX18) | |
261 | 261 | $Tuple5(fromX18(lpAmtX18, scale8), inAmAssetAmt, inPrAssetAmt, curPriceX18, toBigInt(0)) | |
262 | 262 | } | |
263 | 263 | else { | |
264 | 264 | let curPriceX18 = calcPriceBigInt(prBalanceX18, amBalanceX18) | |
265 | 265 | let slippageX18 = fraction(abs((curPriceX18 - userPriceX18)), scale18, curPriceX18) | |
266 | 266 | let slippageToleranceX18 = toX18(slippageTolerance, scale8) | |
267 | 267 | if (if ((curPriceX18 != zeroBigInt)) | |
268 | 268 | then (slippageX18 > slippageToleranceX18) | |
269 | 269 | else false) | |
270 | 270 | then throw(((("Price slippage " + toString(slippageX18)) + " exceeded the passed limit of ") + toString(slippageToleranceX18))) | |
271 | 271 | else { | |
272 | 272 | let lpEmissionX18 = toX18(lpEmission, scale8) | |
273 | 273 | let prViaAmX18 = fraction(inAmAssetAmtX18, curPriceX18, scale18) | |
274 | 274 | let amViaPrX18 = fraction(inPrAssetAmtX18, scale18, curPriceX18) | |
275 | 275 | let expectedAmts = if ((prViaAmX18 > inPrAssetAmtX18)) | |
276 | 276 | then $Tuple2(amViaPrX18, inPrAssetAmtX18) | |
277 | 277 | else $Tuple2(inAmAssetAmtX18, prViaAmX18) | |
278 | 278 | let expAmtAssetAmtX18 = expectedAmts._1 | |
279 | 279 | let expPriceAssetAmtX18 = expectedAmts._2 | |
280 | 280 | let lpAmtX18 = fraction(lpEmissionX18, expPriceAssetAmtX18, prBalanceX18) | |
281 | 281 | $Tuple5(fromX18(lpAmtX18, scale8), fromX18(expAmtAssetAmtX18, amtAssetDcm), fromX18(expPriceAssetAmtX18, priceAssetDcm), curPriceX18, slippageX18) | |
282 | 282 | } | |
283 | 283 | } | |
284 | 284 | tRes | |
285 | 285 | } | |
286 | 286 | let calcLpAmt = res._1 | |
287 | 287 | let calcAmAssetPmt = res._2 | |
288 | 288 | let calcPrAssetPmt = res._3 | |
289 | 289 | let curPrice = fromX18(res._4, scale8) | |
290 | 290 | let slippageCalc = fromX18(res._5, scale8) | |
291 | 291 | if ((0 >= calcLpAmt)) | |
292 | 292 | then throw("Invalid calculations. LP calculated is less than zero.") | |
293 | 293 | else { | |
294 | 294 | let emitLpAmt = if (!(emitLp)) | |
295 | 295 | then 0 | |
296 | 296 | else calcLpAmt | |
297 | 297 | let amDiff = (inAmAssetAmt - calcAmAssetPmt) | |
298 | 298 | let prDiff = (inPrAssetAmt - calcPrAssetPmt) | |
299 | 299 | 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))] | |
300 | 300 | $Tuple13(calcLpAmt, emitLpAmt, curPrice, amBalance, prBalance, lpEmission, lpAssetId, poolStatus, commonState, amDiff, prDiff, inAmAssetId, inPrAssetId) | |
301 | 301 | } | |
302 | 302 | } | |
303 | 303 | ||
304 | 304 | ||
305 | 305 | func validateMatcherOrderAllowed (order) = { | |
306 | 306 | let cfg = getPoolConfig() | |
307 | 307 | let amtAssetId = cfg[idxAmtAssetId] | |
308 | 308 | let priceAssetId = cfg[idxPriceAssetId] | |
309 | 309 | let poolStatus = parseIntValue(cfg[idxPoolStatus]) | |
310 | 310 | let amtAssetDcm = parseIntValue(cfg[idxAmtAssetDcm]) | |
311 | 311 | let priceAssetDcm = parseIntValue(cfg[idxPriceAssetDcm]) | |
312 | 312 | let accAmtAssetBalance = getAccBalance(amtAssetId) | |
313 | 313 | let accPriceAssetBalance = getAccBalance(priceAssetId) | |
314 | 314 | let curPriceX18 = if ((order.orderType == Buy)) | |
315 | 315 | then privateCalcPrice(amtAssetDcm, priceAssetDcm, (accAmtAssetBalance + order.amount), accPriceAssetBalance) | |
316 | 316 | else privateCalcPrice(amtAssetDcm, priceAssetDcm, (accAmtAssetBalance - order.amount), accPriceAssetBalance) | |
317 | 317 | let curPrice = fromX18(curPriceX18, scale8) | |
318 | 318 | if (if (if (isGlobalShutdown()) | |
319 | 319 | then true | |
320 | 320 | else (poolStatus == PoolMatcherDisabled)) | |
321 | 321 | then true | |
322 | 322 | else (poolStatus == PoolShutdown)) | |
323 | 323 | then throw("Exchange operations disabled") | |
324 | 324 | else { | |
325 | 325 | let orderAmtAsset = order.assetPair.amountAsset | |
326 | 326 | let orderAmtAssetStr = if ((orderAmtAsset == unit)) | |
327 | 327 | then "WAVES" | |
328 | 328 | else toBase58String(value(orderAmtAsset)) | |
329 | 329 | let orderPriceAsset = order.assetPair.priceAsset | |
330 | 330 | let orderPriceAssetStr = if ((orderPriceAsset == unit)) | |
331 | 331 | then "WAVES" | |
332 | 332 | else toBase58String(value(orderPriceAsset)) | |
333 | 333 | if (if ((orderAmtAssetStr != amtAssetId)) | |
334 | 334 | then true | |
335 | 335 | else (orderPriceAssetStr != priceAssetId)) | |
336 | 336 | then throw("Wrong order assets.") | |
337 | 337 | else { | |
338 | 338 | let orderPrice = order.price | |
339 | 339 | let priceDcm = fraction(scale8, priceAssetDcm, amtAssetDcm) | |
340 | 340 | let castedOrderPrice = toScale(orderPrice, scale8, priceDcm) | |
341 | 341 | let isOrderPriceValid = if ((order.orderType == Buy)) | |
342 | 342 | then (curPrice >= castedOrderPrice) | |
343 | 343 | else (castedOrderPrice >= curPrice) | |
344 | 344 | true | |
345 | 345 | } | |
346 | 346 | } | |
347 | 347 | } | |
348 | 348 | ||
349 | 349 | ||
350 | 350 | func commonGet (i) = if ((size(i.payments) != 1)) | |
351 | 351 | then throw("exactly 1 payment is expected") | |
352 | 352 | else { | |
353 | 353 | let pmt = value(i.payments[0]) | |
354 | 354 | let pmtAssetId = value(pmt.assetId) | |
355 | 355 | let pmtAmt = pmt.amount | |
356 | 356 | let res = estimateGetOperation(toBase58String(i.transactionId), toBase58String(pmtAssetId), pmtAmt, i.caller) | |
357 | 357 | let outAmAmt = res._1 | |
358 | 358 | let outPrAmt = res._2 | |
359 | 359 | let poolStatus = parseIntValue(res._9) | |
360 | 360 | let state = res._10 | |
361 | 361 | if (if (isGlobalShutdown()) | |
362 | 362 | then true | |
363 | 363 | else (poolStatus == PoolShutdown)) | |
364 | 364 | then throw(("Get operation is blocked by admin. Status = " + toString(poolStatus))) | |
365 | 365 | else $Tuple5(outAmAmt, outPrAmt, pmtAmt, pmtAssetId, state) | |
366 | 366 | } | |
367 | 367 | ||
368 | 368 | ||
369 | 369 | func commonPut (i,slippageTolerance,emitLp) = if ((size(i.payments) != 2)) | |
370 | 370 | then throw("exactly 2 payments are expected") | |
371 | 371 | else { | |
372 | 372 | let amAssetPmt = value(i.payments[0]) | |
373 | 373 | let prAssetPmt = value(i.payments[1]) | |
374 | 374 | let estPut = estimatePutOperation(toBase58String(i.transactionId), slippageTolerance, amAssetPmt.amount, amAssetPmt.assetId, prAssetPmt.amount, prAssetPmt.assetId, toString(i.caller), false, emitLp, false) | |
375 | 375 | let status = parseIntValue(estPut._8) | |
376 | 376 | if (if (if (isGlobalShutdown()) | |
377 | 377 | then true | |
378 | 378 | else (status == PoolPutDisabled)) | |
379 | 379 | then true | |
380 | 380 | else (status == PoolShutdown)) | |
381 | 381 | then throw(("Put operation is blocked by admin. Status = " + toString(status))) | |
382 | 382 | else estPut | |
383 | 383 | } | |
384 | 384 | ||
385 | 385 | ||
386 | 386 | @Callable(i) | |
387 | 387 | func constructor (factoryContract,managerPublicKey) = if ((i.caller != this)) | |
388 | 388 | then throw("permissions denied") | |
389 | 389 | else [StringEntry(keyFactoryContract(), factoryContract), StringEntry(keyManagerPublicKey(), managerPublicKey)] | |
390 | 390 | ||
391 | 391 | ||
392 | 392 | ||
393 | 393 | @Callable(i) | |
394 | 394 | func put (slippageTolerance,autoStake) = { | |
395 | 395 | let factoryCfg = getFactoryConfig() | |
396 | 396 | let stakingContract = valueOrErrorMessage(addressFromString(factoryCfg[idxFactoryStakingContract]), "Error. Incorrect staking address.") | |
397 | 397 | let slippageContract = valueOrErrorMessage(addressFromString(factoryCfg[idxFactorySlippageContract]), "Error. Incorrect slippage contract address.") | |
398 | 398 | if ((0 > slippageTolerance)) | |
399 | 399 | then throw("Invalid slippageTolerance passed") | |
400 | 400 | else { | |
401 | 401 | let estPut = commonPut(i, slippageTolerance, true) | |
402 | 402 | let emitLpAmt = estPut._2 | |
403 | 403 | let lpAssetId = estPut._7 | |
404 | 404 | let state = estPut._9 | |
405 | 405 | let amDiff = estPut._10 | |
406 | 406 | let prDiff = estPut._11 | |
407 | 407 | let amId = estPut._12 | |
408 | 408 | let prId = estPut._13 | |
409 | 409 | let emitInv = invoke(factoryContract, "emit", [emitLpAmt], nil) | |
410 | 410 | if ((emitInv == emitInv)) | |
411 | 411 | then { | |
412 | 412 | let slippageAInv = if ((amDiff > 0)) | |
413 | 413 | then invoke(slippageContract, "put", nil, [AttachedPayment(amId, amDiff)]) | |
414 | 414 | else nil | |
415 | 415 | if ((slippageAInv == slippageAInv)) | |
416 | 416 | then { | |
417 | 417 | let slippagePInv = if ((prDiff > 0)) | |
418 | 418 | then invoke(slippageContract, "put", nil, [AttachedPayment(prId, prDiff)]) | |
419 | 419 | else nil | |
420 | 420 | if ((slippagePInv == slippagePInv)) | |
421 | 421 | then { | |
422 | 422 | let lpTrnsfr = if (autoStake) | |
423 | 423 | then { | |
424 | 424 | let slpStakeInv = invoke(stakingContract, "stake", nil, [AttachedPayment(lpAssetId, emitLpAmt)]) | |
425 | 425 | if ((slpStakeInv == slpStakeInv)) | |
426 | 426 | then nil | |
427 | 427 | else throw("Strict value is not equal to itself.") | |
428 | 428 | } | |
429 | 429 | else [ScriptTransfer(i.caller, emitLpAmt, lpAssetId)] | |
430 | 430 | (state ++ lpTrnsfr) | |
431 | 431 | } | |
432 | 432 | else throw("Strict value is not equal to itself.") | |
433 | 433 | } | |
434 | 434 | else throw("Strict value is not equal to itself.") | |
435 | 435 | } | |
436 | 436 | else throw("Strict value is not equal to itself.") | |
437 | 437 | } | |
438 | 438 | } | |
439 | 439 | ||
440 | 440 | ||
441 | 441 | ||
442 | 442 | @Callable(i) | |
443 | 443 | func putOneTkn (inAmtAmount,inPrAmount,autoStake) = { | |
444 | 444 | let cfg = getFactoryConfig() | |
445 | 445 | let amAssetIdStr = cfg[idxAmtAssetId] | |
446 | 446 | let prAssetIdStr = cfg[idxPriceAssetId] | |
447 | 447 | let stakingContract = valueOrErrorMessage(addressFromString(cfg[idxFactoryStakingContract]), "Error. Incorrect staking address.") | |
448 | 448 | if ((size(i.payments) != 1)) | |
449 | 449 | then throw("exactly 1 payment are expected") | |
450 | 450 | else { | |
451 | 451 | let estPut = estimatePutOperation(toBase58String(i.transactionId), 0, inAmtAmount, fromBase58String(amAssetIdStr), inPrAmount, fromBase58String(prAssetIdStr), toString(i.caller), false, true, true) | |
452 | 452 | let emitLpAmt = estPut._2 | |
453 | 453 | let lpAssetId = estPut._7 | |
454 | 454 | let status = parseIntValue(estPut._8) | |
455 | 455 | if (if (if (isGlobalShutdown()) | |
456 | 456 | then true | |
457 | 457 | else (status == PoolPutDisabled)) | |
458 | 458 | then true | |
459 | 459 | else (status == PoolShutdown)) | |
460 | 460 | then throw(("Put operation is blocked by admin. Status = " + toString(status))) | |
461 | 461 | else { | |
462 | 462 | let emitInv = invoke(factoryContract, "emit", [emitLpAmt], nil) | |
463 | 463 | if ((emitInv == emitInv)) | |
464 | 464 | then { | |
465 | 465 | let lpTrnsfr = if (autoStake) | |
466 | 466 | then { | |
467 | 467 | let stakeInv = invoke(stakingContract, "stake", nil, [AttachedPayment(lpAssetId, emitLpAmt)]) | |
468 | 468 | if ((stakeInv == stakeInv)) | |
469 | 469 | then nil | |
470 | 470 | else throw("Strict value is not equal to itself.") | |
471 | 471 | } | |
472 | 472 | else [ScriptTransfer(i.caller, emitLpAmt, lpAssetId)] | |
473 | 473 | (estPut._9 ++ lpTrnsfr) | |
474 | 474 | } | |
475 | 475 | else throw("Strict value is not equal to itself.") | |
476 | 476 | } | |
477 | 477 | } | |
478 | 478 | } | |
479 | 479 | ||
480 | 480 | ||
481 | 481 | ||
482 | 482 | @Callable(i) | |
483 | 483 | func putForFree (maxSlippage) = if ((0 > maxSlippage)) | |
484 | 484 | then throw("Invalid value passed") | |
485 | 485 | else { | |
486 | 486 | let estPut = commonPut(i, maxSlippage, false) | |
487 | 487 | estPut._9 | |
488 | 488 | } | |
489 | 489 | ||
490 | 490 | ||
491 | 491 | ||
492 | 492 | @Callable(i) | |
493 | 493 | func get () = { | |
494 | 494 | let res = commonGet(i) | |
495 | 495 | let outAmtAmt = res._1 | |
496 | 496 | let outPrAmt = res._2 | |
497 | 497 | let pmtAmt = res._3 | |
498 | 498 | let pmtAssetId = res._4 | |
499 | 499 | let state = res._5 | |
500 | 500 | let burnLPAssetOnFactory = invoke(factoryContract, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)]) | |
501 | 501 | if ((burnLPAssetOnFactory == burnLPAssetOnFactory)) | |
502 | 502 | then state | |
503 | 503 | else throw("Strict value is not equal to itself.") | |
504 | 504 | } | |
505 | 505 | ||
506 | 506 | ||
507 | 507 | ||
508 | 508 | @Callable(i) | |
509 | 509 | func getOneTkn (amAssetSwap,prAssetSwap,outAmount,outAssetId) = if ((size(i.payments) != 1)) | |
510 | 510 | then throw("exactly 1 payment is expected") | |
511 | 511 | else { | |
512 | 512 | let cfg = getPoolConfig() | |
513 | 513 | let lpAssetId = cfg[idxPoolLPAssetId] | |
514 | 514 | let amAssetId = cfg[idxAmtAssetId] | |
515 | 515 | let prAssetId = cfg[idxPriceAssetId] | |
516 | 516 | let amAssetDcm = parseIntValue(cfg[idxAmtAssetDcm]) | |
517 | 517 | let prAssetDcm = parseIntValue(cfg[idxPriceAssetDcm]) | |
518 | 518 | let poolStatus = cfg[idxPoolStatus] | |
519 | 519 | if (if ((outAssetId != amAssetId)) | |
520 | 520 | then (outAssetId != prAssetId) | |
521 | 521 | else false) | |
522 | 522 | then throw(("Incorrect out asset id passed: " + outAssetId)) | |
523 | 523 | else { | |
524 | 524 | let resultAssetId = if ((outAssetId == amAssetId)) | |
525 | 525 | then amAssetId | |
526 | 526 | else prAssetId | |
527 | 527 | let resultAmtAmount = if ((outAssetId == amAssetId)) | |
528 | 528 | then outAmount | |
529 | 529 | else 0 | |
530 | 530 | let resultPrAmount = if ((outAssetId == prAssetId)) | |
531 | 531 | then outAmount | |
532 | 532 | else 0 | |
533 | 533 | let pmt = value(i.payments[0]) | |
534 | 534 | let userAddress = i.caller | |
535 | 535 | let txId58 = toBase58String(i.transactionId) | |
536 | 536 | let pmtAssetId = value(pmt.assetId) | |
537 | 537 | let pmtAmt = pmt.amount | |
538 | 538 | if ((lpAssetId != toBase58String(pmtAssetId))) | |
539 | 539 | then throw("Invalid asset passed.") | |
540 | 540 | else { | |
541 | 541 | let amAssetSwapX18 = toX18(amAssetSwap, amAssetDcm) | |
542 | 542 | let prAssetSwapX18 = toX18(prAssetSwap, prAssetDcm) | |
543 | 543 | let swapPriceX18 = calcPriceBigInt(prAssetSwapX18, amAssetSwapX18) | |
544 | 544 | let r = estimateGetOperation(toBase58String(i.transactionId), toBase58String(pmtAssetId), pmtAmt, i.caller) | |
545 | 545 | let outAmAmt = r._1 | |
546 | 546 | let outPrAmt = r._2 | |
547 | 547 | let isValid = if ((outAssetId == amAssetId)) | |
548 | - | then { | |
549 | - | let prSwopPartInAmountAsset = (resultAmtAmount - outAmAmt) | |
550 | - | let convRes = fraction(toX18((resultAmtAmount - outAmAmt), amAssetDcm), scale18, swapPriceX18) | |
551 | - | let prAssetDiff = fraction((convRes - prAssetSwapX18), scale8BigInt, prAssetSwapX18) | |
552 | - | let passed = if (true) | |
553 | - | then throw(((((("Wrong calculation. Passed prAssetSwapX18 = " + toString(prAssetSwapX18)) + ", calculated prAsset = ") + toString(convRes)) + ", diff=") + toString(prAssetDiff))) | |
554 | - | else true | |
555 | - | throw(((((("Passed prAssetSwapX18 = " + toString(prAssetSwapX18)) + ", calculated prAsset = ") + toString(convRes)) + ", diff=") + toString(prAssetDiff))) | |
556 | - | } | |
557 | - | else { | |
558 | - | let amwopPartInPriceAsset = (resultPrAmount - outPrAmt) | |
559 | - | let convRes = fraction(toX18((resultPrAmount - outPrAmt), prAssetDcm), swapPriceX18, scale18) | |
560 | - | let amAssetDiff = fraction((convRes - amAssetSwapX18), scale8BigInt, amAssetSwapX18) | |
561 | - | let passed = if (true) | |
562 | - | then throw(((((("Wrong calculation. Passed amAssetSwapX18 = " + toString(amAssetSwapX18)) + ", calculated amtAsset = ") + toString(convRes)) + ", diff=") + toString(amAssetDiff))) | |
563 | - | else true | |
564 | - | throw(((((("Passed amAssetSwapX18 = " + toString(amAssetSwapX18)) + ", calculated amtAsset = ") + toString(convRes)) + ", diff=") + toString(amAssetDiff))) | |
565 | - | } | |
548 | + | then if (true) | |
549 | + | then throw("amount") | |
550 | + | else { | |
551 | + | let prSwopPartInAmountAsset = (resultAmtAmount - outAmAmt) | |
552 | + | let convRes = fraction(toX18((resultAmtAmount - outAmAmt), amAssetDcm), scale18, swapPriceX18) | |
553 | + | let prAssetDiff = fraction((convRes - prAssetSwapX18), scale8BigInt, prAssetSwapX18) | |
554 | + | let passed = if (true) | |
555 | + | then throw(((((("Wrong calculation. Passed prAssetSwapX18 = " + toString(prAssetSwapX18)) + ", calculated prAsset = ") + toString(convRes)) + ", diff=") + toString(prAssetDiff))) | |
556 | + | else true | |
557 | + | throw(((((("Passed prAssetSwapX18 = " + toString(prAssetSwapX18)) + ", calculated prAsset = ") + toString(convRes)) + ", diff=") + toString(prAssetDiff))) | |
558 | + | } | |
559 | + | else if (true) | |
560 | + | then throw("price") | |
561 | + | else { | |
562 | + | let amwopPartInPriceAsset = (resultPrAmount - outPrAmt) | |
563 | + | let convRes = fraction(toX18((resultPrAmount - outPrAmt), prAssetDcm), swapPriceX18, scale18) | |
564 | + | let amAssetDiff = fraction((convRes - amAssetSwapX18), scale8BigInt, amAssetSwapX18) | |
565 | + | let passed = if (true) | |
566 | + | then throw(((((("Wrong calculation. Passed amAssetSwapX18 = " + toString(amAssetSwapX18)) + ", calculated amtAsset = ") + toString(convRes)) + ", diff=") + toString(amAssetDiff))) | |
567 | + | else true | |
568 | + | throw(((((("Passed amAssetSwapX18 = " + toString(amAssetSwapX18)) + ", calculated amtAsset = ") + toString(convRes)) + ", diff=") + toString(amAssetDiff))) | |
569 | + | } | |
566 | 570 | let amBalance = getAccBalance(amAssetId) | |
567 | 571 | let amBalanceX18 = toX18(amBalance, amAssetDcm) | |
568 | 572 | let prBalance = getAccBalance(prAssetId) | |
569 | 573 | let prBalanceX18 = toX18(prBalance, prAssetDcm) | |
570 | 574 | let curPriceX18 = calcPriceBigInt(prBalanceX18, amBalanceX18) | |
571 | 575 | let curPrice = fromX18(curPriceX18, scale8) | |
572 | 576 | if (true) | |
573 | - | then throw("Error") | |
577 | + | then throw(("Error. isValid = " + isValid)) | |
574 | 578 | else { | |
575 | 579 | let state = [ScriptTransfer(userAddress, outAmount, if ((resultAssetId == "WAVES")) | |
576 | 580 | then unit | |
577 | 581 | else fromBase58String(resultAssetId)), StringEntry(keyGetActionByUser(toString(userAddress), txId58), dataGetActionInfo(resultAmtAmount, resultPrAmount, pmtAmt, curPrice, height, lastBlock.timestamp)), IntegerEntry(keyPriceLast(), curPrice), IntegerEntry(keyPriceHistory(height, lastBlock.timestamp), curPrice)] | |
578 | 582 | let burn = invoke(factoryContract, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)]) | |
579 | 583 | if ((burn == burn)) | |
580 | 584 | then state | |
581 | 585 | else throw("Strict value is not equal to itself.") | |
582 | 586 | } | |
583 | 587 | } | |
584 | 588 | } | |
585 | 589 | } | |
586 | 590 | ||
587 | 591 | ||
588 | 592 | ||
589 | 593 | @Callable(i) | |
590 | 594 | func getNoLess (noLessThenAmtAsset,noLessThenPriceAsset) = { | |
591 | 595 | let res = commonGet(i) | |
592 | 596 | let outAmAmt = res._1 | |
593 | 597 | let outPrAmt = res._2 | |
594 | 598 | let pmtAmt = res._3 | |
595 | 599 | let pmtAssetId = res._4 | |
596 | 600 | let state = res._5 | |
597 | 601 | if ((noLessThenAmtAsset > outAmAmt)) | |
598 | 602 | then throw(((("noLessThenAmtAsset failed: " + toString(outAmAmt)) + " < ") + toString(noLessThenAmtAsset))) | |
599 | 603 | else if ((noLessThenPriceAsset > outPrAmt)) | |
600 | 604 | then throw(((("noLessThenPriceAsset failed: " + toString(outPrAmt)) + " < ") + toString(noLessThenPriceAsset))) | |
601 | 605 | else { | |
602 | 606 | let burnLPAssetOnFactory = invoke(factoryContract, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)]) | |
603 | 607 | if ((burnLPAssetOnFactory == burnLPAssetOnFactory)) | |
604 | 608 | then state | |
605 | 609 | else throw("Strict value is not equal to itself.") | |
606 | 610 | } | |
607 | 611 | } | |
608 | 612 | ||
609 | 613 | ||
610 | 614 | ||
611 | 615 | @Callable(i) | |
612 | 616 | func unstakeAndGet (amount) = { | |
613 | 617 | let checkPayments = if ((size(i.payments) != 0)) | |
614 | 618 | then throw("No payments are expected") | |
615 | 619 | else true | |
616 | 620 | if ((checkPayments == checkPayments)) | |
617 | 621 | then { | |
618 | 622 | let cfg = getPoolConfig() | |
619 | 623 | let factoryCfg = getFactoryConfig() | |
620 | 624 | let lpAssetId = fromBase58String(cfg[idxPoolLPAssetId]) | |
621 | 625 | let stakingContract = valueOrErrorMessage(addressFromString(factoryCfg[idxFactoryStakingContract]), "Error. Incorrect staking address.") | |
622 | 626 | let unstakeInv = invoke(stakingContract, "unstake", [toBase58String(lpAssetId), amount], nil) | |
623 | 627 | if ((unstakeInv == unstakeInv)) | |
624 | 628 | then { | |
625 | 629 | let res = estimateGetOperation(toBase58String(i.transactionId), toBase58String(lpAssetId), amount, i.caller) | |
626 | 630 | let poolStatus = parseIntValue(res._9) | |
627 | 631 | let state = res._10 | |
628 | 632 | let checkPoolStatus = if (if (isGlobalShutdown()) | |
629 | 633 | then true | |
630 | 634 | else (poolStatus == PoolShutdown)) | |
631 | 635 | then throw(("Get operation is blocked by admin. Status = " + toString(poolStatus))) | |
632 | 636 | else true | |
633 | 637 | if ((checkPoolStatus == checkPoolStatus)) | |
634 | 638 | then { | |
635 | 639 | let burnLPAssetOnFactory = invoke(factoryContract, "burn", [amount], [AttachedPayment(lpAssetId, amount)]) | |
636 | 640 | if ((burnLPAssetOnFactory == burnLPAssetOnFactory)) | |
637 | 641 | then state | |
638 | 642 | else throw("Strict value is not equal to itself.") | |
639 | 643 | } | |
640 | 644 | else throw("Strict value is not equal to itself.") | |
641 | 645 | } | |
642 | 646 | else throw("Strict value is not equal to itself.") | |
643 | 647 | } | |
644 | 648 | else throw("Strict value is not equal to itself.") | |
645 | 649 | } | |
646 | 650 | ||
647 | 651 | ||
648 | 652 | ||
649 | 653 | @Callable(i) | |
650 | 654 | func activate (amtAssetStr,priceAssetStr) = if ((toString(i.caller) != toString(factoryContract))) | |
651 | 655 | then throw("permissions denied") | |
652 | 656 | else $Tuple2([StringEntry(keyAmtAsset(), amtAssetStr), StringEntry(keyPriceAsset(), priceAssetStr)], "success") | |
653 | 657 | ||
654 | 658 | ||
655 | 659 | ||
656 | 660 | @Callable(i) | |
657 | 661 | func getPoolConfigWrapperREADONLY () = $Tuple2(nil, getPoolConfig()) | |
658 | 662 | ||
659 | 663 | ||
660 | 664 | ||
661 | 665 | @Callable(i) | |
662 | 666 | func getAccBalanceWrapperREADONLY (assetId) = $Tuple2(nil, getAccBalance(assetId)) | |
663 | 667 | ||
664 | 668 | ||
665 | 669 | ||
666 | 670 | @Callable(i) | |
667 | 671 | func calcPricesWrapperREADONLY (amAmt,prAmt,lpAmt) = { | |
668 | 672 | let prices = calcPrices(amAmt, prAmt, lpAmt) | |
669 | 673 | $Tuple2(nil, [toString(prices[0]), toString(prices[1]), toString(prices[2])]) | |
670 | 674 | } | |
671 | 675 | ||
672 | 676 | ||
673 | 677 | ||
674 | 678 | @Callable(i) | |
675 | 679 | func fromX18WrapperREADONLY (val,resultScaleMult) = $Tuple2(nil, fromX18(parseBigIntValue(val), resultScaleMult)) | |
676 | 680 | ||
677 | 681 | ||
678 | 682 | ||
679 | 683 | @Callable(i) | |
680 | 684 | func toX18WrapperREADONLY (origVal,origScaleMult) = $Tuple2(nil, toString(toX18(origVal, origScaleMult))) | |
681 | 685 | ||
682 | 686 | ||
683 | 687 | ||
684 | 688 | @Callable(i) | |
685 | 689 | func calcPriceBigIntWrapperREADONLY (prAmtX18,amAmtX18) = $Tuple2(nil, toString(calcPriceBigInt(parseBigIntValue(prAmtX18), parseBigIntValue(amAmtX18)))) | |
686 | 690 | ||
687 | 691 | ||
688 | 692 | ||
689 | 693 | @Callable(i) | |
690 | 694 | func estimatePutOperationWrapperREADONLY (txId58,slippageTolerance,inAmAssetAmt,inAmAssetId,inPrAssetAmt,inPrAssetId,userAddress,isEvaluate,emitLp,isOneAsset) = $Tuple2(nil, estimatePutOperation(txId58, slippageTolerance, inAmAssetAmt, inAmAssetId, inPrAssetAmt, inPrAssetId, userAddress, isEvaluate, emitLp, isOneAsset)) | |
691 | 695 | ||
692 | 696 | ||
693 | 697 | ||
694 | 698 | @Callable(i) | |
695 | 699 | func estimateGetOperationWrapperREADONLY (txId58,pmtAssetId,pmtLpAmt,userAddress) = { | |
696 | 700 | let res = estimateGetOperation(txId58, pmtAssetId, pmtLpAmt, addressFromStringValue(userAddress)) | |
697 | 701 | $Tuple2(nil, $Tuple10(res._1, res._2, res._3, res._4, res._5, res._6, res._7, toString(res._8), res._9, res._10)) | |
698 | 702 | } | |
699 | 703 | ||
700 | 704 | ||
701 | 705 | @Verifier(tx) | |
702 | 706 | func verify () = match tx { | |
703 | 707 | case order: Order => | |
704 | 708 | let matcherPub = getMatcherPubOrFail() | |
705 | 709 | let orderValid = validateMatcherOrderAllowed(order) | |
706 | 710 | let senderValid = sigVerify(order.bodyBytes, order.proofs[0], order.senderPublicKey) | |
707 | 711 | let matcherValid = sigVerify(order.bodyBytes, order.proofs[1], matcherPub) | |
708 | 712 | if (if (if (orderValid) | |
709 | 713 | then senderValid | |
710 | 714 | else false) | |
711 | 715 | then matcherValid | |
712 | 716 | else false) | |
713 | 717 | then true | |
714 | 718 | else throwOrderError(orderValid, senderValid, matcherValid) | |
715 | 719 | case _ => | |
716 | 720 | let managerPublic = valueOrElse(getString(this, keyManagerPublicKey()), EMPTY) | |
717 | 721 | if ((managerPublic == EMPTY)) | |
718 | 722 | then sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
719 | 723 | else sigVerify(tx.bodyBytes, tx.proofs[0], fromBase58String(managerPublic)) | |
720 | 724 | } | |
721 | 725 |
github/deemru/w8io/169f3d6 125.22 ms ◑