tx · 5kDJmud9SyjyN5ghCQKoGuz2sVTBvPMd9mPFTkWT7BQE 3NA1WkpXVwkF5rfBHYa2jVxEtvRAegByp8d: -0.05000000 Waves 2021.08.26 15:27 [1675315] smart account 3NA1WkpXVwkF5rfBHYa2jVxEtvRAegByp8d > SELF 0.00000000 Waves
{ "type": 13, "id": "5kDJmud9SyjyN5ghCQKoGuz2sVTBvPMd9mPFTkWT7BQE", "fee": 5000000, "feeAssetId": null, "timestamp": 1629980823691, "version": 2, "chainId": 84, "sender": "3NA1WkpXVwkF5rfBHYa2jVxEtvRAegByp8d", "senderPublicKey": "615yniDC45NYY2NsuB59jc63RDdX3aZoKVK1G8bZt9jh", "proofs": [ "5tditY97CH9ir2hD6gosqffE51vEU786Yw4Xu3yNJYZ417aPkK1VJhafFkPfD4ZKXDDQnvDhjQNXZH52A7yux2Lx" ], "script": "base64:AAIFAAAAAAAAACsIAhIDCgEBEgASBwoFCAgICAESABIFCgMBAQgSBQoDAQEIEgUKAwgBCBIAAAAANAAAAAAUZmFjdG9yeUFkZHJlc3NTdHJpbmcCAAAAIzNON1ExQTg1VUpZc0ZrS3M3Z1ROeWtWdEpVUDhyU2hIeHpRAAAAAApsUGRlY2ltYWxzAAAAAAAAAAAIAAAAABFkZWNpbWFsc011bHRQcmljZQkAAGgAAAACCQAAaAAAAAIAAAAAAAAAAGQAAAAAAAAAA+gAAAAAAAAAA+gAAAAAA1NFUAIAAAACX18AAAAAClBvb2xBY3RpdmUAAAAAAAAAAAEAAAAAD1Bvb2xQdXREaXNhYmxlZAAAAAAAAAAAAgAAAAATUG9vbE1hdGNoZXJEaXNhYmxlZAAAAAAAAAAAAwAAAAAMUG9vbFNodXRkb3duAAAAAAAAAAAEAAAAAAxidXlPcmRlclR5cGUAAAAAAAAAAAAAAAAADXNlbGxPcmRlclR5cGUAAAAAAAAAAAEAAAAADmlkeFBvb2xBZGRyZXNzAAAAAAAAAAABAAAAAA1pZHhQb29sU3RhdHVzAAAAAAAAAAACAAAA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AAAdyZXN1bHRzAAAAA18xMgkABEwAAAACCQABpAAAAAEIBQAAAAdyZXN1bHRzAAAAA18xMwkABEwAAAACCAUAAAAHcmVzdWx0cwAAAANfMTQFAAAAA25pbAUAAAADU0VQAAAAAWkBAAAADGhhc2hSRUFET05MWQAAAAAJAAUUAAAAAgUAAAADbmlsCQACWgAAAAEJAQAAAAV2YWx1ZQAAAAEJAAPxAAAAAQUAAAAEdGhpcwAAAAEAAAACdHgBAAAABnZlcmlmeQAAAAAEAAAAByRtYXRjaDAFAAAAAnR4AwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAAVPcmRlcgQAAAAFb3JkZXIFAAAAByRtYXRjaDAJAAGRAAAAAgkBAAAAG3ZhbGlkYXRlTWF0Y2hlck9yZGVyQWxsb3dlZAAAAAEFAAAABW9yZGVyAAAAAAAAAAABCQAB9AAAAAMIBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAAgFAAAAAnR4AAAAD3NlbmRlclB1YmxpY0tleZmXLcg=", "height": 1675315, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: G74kfTzLKFJTau1SZg2KgyyJQkUfgMPydX2uoBy6hKJV Next: none Diff:
Old | New | Differences | |
---|---|---|---|
39 | 39 | ||
40 | 40 | let idxPriceAssetInternalId = 9 | |
41 | 41 | ||
42 | - | let | |
42 | + | let idxLPAssetDecimals = 10 | |
43 | 43 | ||
44 | - | let idxLPAssetDecimals = 11 | |
45 | - | ||
46 | - | let idxMatcherPublicKey = 12 | |
44 | + | let idxMatcherPublicKey = 11 | |
47 | 45 | ||
48 | 46 | let idxPoolAmountAssetAmt = 1 | |
49 | 47 | ||
85 | 83 | ||
86 | 84 | ||
87 | 85 | func keyAllPoolsShutdown () = "%s__shutdown" | |
86 | + | ||
87 | + | ||
88 | + | func keyPoolWeight (contractAddress) = ("%s%d__poolWeight__" + contractAddress) | |
88 | 89 | ||
89 | 90 | ||
90 | 91 | func isGlobalShutdown () = valueOrElse(getBoolean(value(addressFromString(factoryAddressString)), keyAllPoolsShutdown()), false) | |
404 | 405 | let lpPriceInAmountAsset = fraction(amountAssetPoolLockedAmt, (1 * decimalsMultPrice), poolLPBalance) | |
405 | 406 | let lpPriceInPriceAsset = fraction(priceAssetPoolLockedAmt, (1 * decimalsMultPrice), poolLPBalance) | |
406 | 407 | let currentPrice = privateCalculatePrice(amoutAssetDecimals, priceAssetDecimals, accountAmountAssetBalance, accountPriceAssetBalance) | |
407 | - | $Tuple2(nil, makeString(["%d%d%d%d%d%d", toString(accountAmountAssetBalance), toString(accountPriceAssetBalance), toString(poolLPBalance), toString(currentPrice), toString(lpPriceInAmountAsset), toString(lpPriceInPriceAsset)], SEP)) | |
408 | + | let poolWeight = valueOrElse(getInteger(value(addressFromString(factoryAddressString)), keyPoolWeight(toString(this))), 0) | |
409 | + | $Tuple2(nil, makeString(["%d%d%d%d%d%d%d", toString(accountAmountAssetBalance), toString(accountPriceAssetBalance), toString(poolLPBalance), toString(currentPrice), toString(lpPriceInAmountAsset), toString(lpPriceInPriceAsset), toString(poolWeight)], SEP)) | |
408 | 410 | } | |
409 | 411 | ||
410 | 412 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let factoryAddressString = "3N7Q1A85UJYsFkKs7gTNykVtJUP8rShHxzQ" | |
5 | 5 | ||
6 | 6 | let lPdecimals = 8 | |
7 | 7 | ||
8 | 8 | let decimalsMultPrice = ((100 * 1000) * 1000) | |
9 | 9 | ||
10 | 10 | let SEP = "__" | |
11 | 11 | ||
12 | 12 | let PoolActive = 1 | |
13 | 13 | ||
14 | 14 | let PoolPutDisabled = 2 | |
15 | 15 | ||
16 | 16 | let PoolMatcherDisabled = 3 | |
17 | 17 | ||
18 | 18 | let PoolShutdown = 4 | |
19 | 19 | ||
20 | 20 | let buyOrderType = 0 | |
21 | 21 | ||
22 | 22 | let sellOrderType = 1 | |
23 | 23 | ||
24 | 24 | let idxPoolAddress = 1 | |
25 | 25 | ||
26 | 26 | let idxPoolStatus = 2 | |
27 | 27 | ||
28 | 28 | let idxPoolLPAssetId = 3 | |
29 | 29 | ||
30 | 30 | let idxAmountAssetId = 4 | |
31 | 31 | ||
32 | 32 | let idxPriceAssetId = 5 | |
33 | 33 | ||
34 | 34 | let idxAmountAssetDecimals = 6 | |
35 | 35 | ||
36 | 36 | let idxPriceAssetDecimals = 7 | |
37 | 37 | ||
38 | 38 | let idxAmountAssetInternalId = 8 | |
39 | 39 | ||
40 | 40 | let idxPriceAssetInternalId = 9 | |
41 | 41 | ||
42 | - | let | |
42 | + | let idxLPAssetDecimals = 10 | |
43 | 43 | ||
44 | - | let idxLPAssetDecimals = 11 | |
45 | - | ||
46 | - | let idxMatcherPublicKey = 12 | |
44 | + | let idxMatcherPublicKey = 11 | |
47 | 45 | ||
48 | 46 | let idxPoolAmountAssetAmt = 1 | |
49 | 47 | ||
50 | 48 | let idxPoolPriceAssetAmt = 2 | |
51 | 49 | ||
52 | 50 | let idxPoolLPAssetAmt = 3 | |
53 | 51 | ||
54 | 52 | func keyPriceLast () = "%s%s__price__last" | |
55 | 53 | ||
56 | 54 | ||
57 | 55 | func keyPriceHistory (h,timestamp) = makeString(["%s%s%d%d__price__history", toString(h), toString(timestamp)], SEP) | |
58 | 56 | ||
59 | 57 | ||
60 | 58 | func keyPoolLiquidity (internalAmountAsset,internalPriceAsset) = (((("%d%d%s__" + internalAmountAsset) + "__") + internalPriceAsset) + "__locked") | |
61 | 59 | ||
62 | 60 | ||
63 | 61 | func keyPoolLiquidityByUser (internalAmountAsset,internalPriceAsset,userAddress) = (((((("%d%d%s%s__" + internalAmountAsset) + "__") + internalPriceAsset) + "__") + userAddress) + "__locked") | |
64 | 62 | ||
65 | 63 | ||
66 | 64 | func keyPutActionByUser (userAddress,txId) = ((("%s%s%s__P__" + userAddress) + "__") + txId) | |
67 | 65 | ||
68 | 66 | ||
69 | 67 | func keyGetActionByUser (userAddress,txId) = ((("%s%s%s__G__" + userAddress) + "__") + txId) | |
70 | 68 | ||
71 | 69 | ||
72 | 70 | func keyAmountAsset () = "%s__amountAsset" | |
73 | 71 | ||
74 | 72 | ||
75 | 73 | func keyPriceAsset () = "%s__priceAsset" | |
76 | 74 | ||
77 | 75 | ||
78 | 76 | func keyMappingPoolContractAddressToPoolAssets (poolContractAddress) = (("%s%s%s__" + poolContractAddress) + "__mappings__poolContract2LpAsset") | |
79 | 77 | ||
80 | 78 | ||
81 | 79 | func keyPoolConfig (amountAssetInternal,priceAssetInternal) = (((("%d%d%s__" + amountAssetInternal) + "__") + priceAssetInternal) + "__config") | |
82 | 80 | ||
83 | 81 | ||
84 | 82 | func keyMappingsBaseAsset2internalId (baseAssetStr) = ("%s%s%s__mappings__baseAsset2internalId__" + baseAssetStr) | |
85 | 83 | ||
86 | 84 | ||
87 | 85 | func keyAllPoolsShutdown () = "%s__shutdown" | |
86 | + | ||
87 | + | ||
88 | + | func keyPoolWeight (contractAddress) = ("%s%d__poolWeight__" + contractAddress) | |
88 | 89 | ||
89 | 90 | ||
90 | 91 | func isGlobalShutdown () = valueOrElse(getBoolean(value(addressFromString(factoryAddressString)), keyAllPoolsShutdown()), false) | |
91 | 92 | ||
92 | 93 | ||
93 | 94 | func getPoolConfig () = { | |
94 | 95 | let poolAmountAsset = valueOrErrorMessage(getString(keyAmountAsset()), "No config for amount asset found") | |
95 | 96 | let poolPriceAsset = valueOrErrorMessage(getString(keyPriceAsset()), "No config for price asset found") | |
96 | 97 | let poolPriceAssetInternal = valueOrErrorMessage(getInteger(value(addressFromString(factoryAddressString)), keyMappingsBaseAsset2internalId(poolPriceAsset)), "No config for internal price asset found") | |
97 | 98 | let poolAmountAssetInternal = valueOrErrorMessage(getInteger(value(addressFromString(factoryAddressString)), keyMappingsBaseAsset2internalId(poolAmountAsset)), "No config for internal amount asset found") | |
98 | 99 | split(valueOrErrorMessage(getString(addressFromStringValue(factoryAddressString), keyPoolConfig(toString(poolAmountAssetInternal), toString(poolPriceAssetInternal))), "No factory config found for pool assets."), SEP) | |
99 | 100 | } | |
100 | 101 | ||
101 | 102 | ||
102 | 103 | func getPoolLiquidity (amountAssetInternalId,priceAssetInternalId) = { | |
103 | 104 | let currentPoolLiquidityValue = getString(keyPoolLiquidity(amountAssetInternalId, priceAssetInternalId)) | |
104 | 105 | if (!(isDefined(currentPoolLiquidityValue))) | |
105 | 106 | then ["", "0", "0", "0"] | |
106 | 107 | else split(value(currentPoolLiquidityValue), SEP) | |
107 | 108 | } | |
108 | 109 | ||
109 | 110 | ||
110 | 111 | func getPoolLiquidityByUser (amountAssetInternalId,priceAssetInternalId,userAddress) = { | |
111 | 112 | let currentPoolLiquidityValue = getString(keyPoolLiquidityByUser(amountAssetInternalId, priceAssetInternalId, userAddress)) | |
112 | 113 | if (!(isDefined(currentPoolLiquidityValue))) | |
113 | 114 | then ["", "0", "0", "0", "0"] | |
114 | 115 | else split(value(currentPoolLiquidityValue), SEP) | |
115 | 116 | } | |
116 | 117 | ||
117 | 118 | ||
118 | 119 | func dataPoolLiquidity (amountAssetLocked,priceAssetLocked,lpTokenLocked) = makeString(["%d%d%d", toString(amountAssetLocked), toString(priceAssetLocked), toString(lpTokenLocked)], SEP) | |
119 | 120 | ||
120 | 121 | ||
121 | 122 | func dataPoolLiquidityByUser (amountAssetLocked,priceAssetLocked,lpTokenLocked,userAddress) = makeString(["%d%d%d", toString(amountAssetLocked), toString(priceAssetLocked), toString(lpTokenLocked)], SEP) | |
122 | 123 | ||
123 | 124 | ||
124 | 125 | func dataPutActionInfo (inAmountAssetAmt,inPriceAssetAmt,outLpAmt,price,slippageTolerancePassedByUser,slippageToleranceReal,txHeight,txTimestamp) = makeString(["%d%d%d%d%d%d%d", toString(inAmountAssetAmt), toString(inPriceAssetAmt), toString(outLpAmt), toString(price), toString(slippageTolerancePassedByUser), toString(slippageToleranceReal), toString(txHeight), toString(txTimestamp)], SEP) | |
125 | 126 | ||
126 | 127 | ||
127 | 128 | func dataGetActionInfo (outAmountAssetAmt,outPriceAssetAmt,inLpAmt,price,txHeight,txTimestamp) = makeString(["%d%d%d%d%d%d", toString(outAmountAssetAmt), toString(outPriceAssetAmt), toString(inLpAmt), toString(price), toString(txHeight), toString(txTimestamp)], SEP) | |
128 | 129 | ||
129 | 130 | ||
130 | 131 | func privateCastAssetToMaxDecimals (assetDecimals,assetAmount) = { | |
131 | 132 | let decimalsMult = pow(10, 0, (lPdecimals - assetDecimals), 0, 0, DOWN) | |
132 | 133 | $Tuple2((assetAmount * decimalsMult), decimalsMult) | |
133 | 134 | } | |
134 | 135 | ||
135 | 136 | ||
136 | 137 | func privateCastAssetToOriginDecimals (assetDecimals,assetAmount) = { | |
137 | 138 | let decimalsMult = pow(10, 0, (lPdecimals - assetDecimals), 0, 0, DOWN) | |
138 | 139 | $Tuple2((assetAmount / decimalsMult), decimalsMult) | |
139 | 140 | } | |
140 | 141 | ||
141 | 142 | ||
142 | 143 | func privateCalculatePrice (amoutAssetDecimals,priceAssetDecimals,amountAssetAmt,priceAssetAmt) = { | |
143 | 144 | let amountAssetPoolLockedAmt = privateCastAssetToMaxDecimals(amoutAssetDecimals, amountAssetAmt)._1 | |
144 | 145 | let priceAssetPoolLockedAmt = privateCastAssetToMaxDecimals(priceAssetDecimals, priceAssetAmt)._1 | |
145 | 146 | fraction(priceAssetPoolLockedAmt, decimalsMultPrice, amountAssetPoolLockedAmt) | |
146 | 147 | } | |
147 | 148 | ||
148 | 149 | ||
149 | 150 | func privateGetAccountBalance (assetId) = if ((assetId == "WAVES")) | |
150 | 151 | then wavesBalance(this).available | |
151 | 152 | else assetBalance(this, fromBase58String(assetId)) | |
152 | 153 | ||
153 | 154 | ||
154 | 155 | func privateEstimateGetOperation (paymentLpAssetId,paymentLpAmount,userAddress) = { | |
155 | 156 | let poolConfigList = getPoolConfig() | |
156 | 157 | let lpAssetId = poolConfigList[idxPoolLPAssetId] | |
157 | 158 | let amountAssetId = poolConfigList[idxAmountAssetId] | |
158 | 159 | let priceAssetId = poolConfigList[idxPriceAssetId] | |
159 | 160 | let amountAssetInternalId = poolConfigList[idxAmountAssetInternalId] | |
160 | 161 | let priceAssetInternalId = poolConfigList[idxPriceAssetInternalId] | |
161 | 162 | let amoutAssetDecimals = parseIntValue(poolConfigList[idxAmountAssetDecimals]) | |
162 | 163 | let priceAssetDecimals = parseIntValue(poolConfigList[idxPriceAssetDecimals]) | |
163 | 164 | let poolStatus = poolConfigList[idxPoolStatus] | |
164 | 165 | let userLiquidityList = getPoolLiquidityByUser(amountAssetInternalId, priceAssetInternalId, userAddress) | |
165 | 166 | let userLPBalance = parseIntValue(userLiquidityList[idxPoolLPAssetAmt]) | |
166 | 167 | let userAmountAssetBalance = parseIntValue(userLiquidityList[idxPoolAmountAssetAmt]) | |
167 | 168 | let userPriceAssetBalance = parseIntValue(userLiquidityList[idxPoolPriceAssetAmt]) | |
168 | 169 | let poolLiquidityList = getPoolLiquidity(amountAssetInternalId, priceAssetInternalId) | |
169 | 170 | let poolLPBalance = parseIntValue(poolLiquidityList[idxPoolLPAssetAmt]) | |
170 | 171 | let poolAmountAssetBalance = parseIntValue(poolLiquidityList[idxPoolAmountAssetAmt]) | |
171 | 172 | let poolPriceAssetBalance = parseIntValue(poolLiquidityList[idxPoolPriceAssetAmt]) | |
172 | 173 | if ((lpAssetId != paymentLpAssetId)) | |
173 | 174 | then throw("Invalid asset passed.") | |
174 | 175 | else if ((paymentLpAmount > userLPBalance)) | |
175 | 176 | then throw("Invalid amount passed. Amount less than available.") | |
176 | 177 | else { | |
177 | 178 | let accountAmountAssetBalance = privateGetAccountBalance(amountAssetId) | |
178 | 179 | let accountPriceAssetBalance = privateGetAccountBalance(priceAssetId) | |
179 | 180 | let amountAssetPoolLockedAmt = privateCastAssetToMaxDecimals(amoutAssetDecimals, accountAmountAssetBalance)._1 | |
180 | 181 | let priceAssetPoolLockedAmt = privateCastAssetToMaxDecimals(priceAssetDecimals, accountPriceAssetBalance)._1 | |
181 | 182 | let outAmountAssetAmt = fraction(amountAssetPoolLockedAmt, paymentLpAmount, poolLPBalance) | |
182 | 183 | let outPriceAssetAmt = fraction(priceAssetPoolLockedAmt, paymentLpAmount, poolLPBalance) | |
183 | 184 | let outAmountAssetAmtFinal = privateCastAssetToOriginDecimals(amoutAssetDecimals, outAmountAssetAmt)._1 | |
184 | 185 | let outPriceAssetAmtFinal = privateCastAssetToOriginDecimals(priceAssetDecimals, outPriceAssetAmt)._1 | |
185 | 186 | let currentPrice = fraction(priceAssetPoolLockedAmt, decimalsMultPrice, amountAssetPoolLockedAmt) | |
186 | 187 | $Tuple14(outAmountAssetAmtFinal, outPriceAssetAmtFinal, amountAssetInternalId, priceAssetInternalId, userAmountAssetBalance, amountAssetId, userPriceAssetBalance, priceAssetId, userLPBalance, poolAmountAssetBalance, poolPriceAssetBalance, poolLPBalance, currentPrice, poolStatus) | |
187 | 188 | } | |
188 | 189 | } | |
189 | 190 | ||
190 | 191 | ||
191 | 192 | func privateEstimatePutOperation (slippageTolerance,inAmountAssetAmt,inAmountAssetId,inPriceAssetAmt,inPriceAssetId,userAddress) = { | |
192 | 193 | let poolConfigDataList = getPoolConfig() | |
193 | 194 | let lpAssetId = fromBase58String(poolConfigDataList[idxPoolLPAssetId]) | |
194 | 195 | let amountAssetId = poolConfigDataList[idxAmountAssetId] | |
195 | 196 | let priceAssetId = poolConfigDataList[idxPriceAssetId] | |
196 | 197 | let amountAssetInternalId = poolConfigDataList[idxAmountAssetInternalId] | |
197 | 198 | let priceAssetInternalId = poolConfigDataList[idxPriceAssetInternalId] | |
198 | 199 | let amoutAssetDecimals = parseIntValue(poolConfigDataList[idxAmountAssetDecimals]) | |
199 | 200 | let priceAssetDecimals = parseIntValue(poolConfigDataList[idxPriceAssetDecimals]) | |
200 | 201 | let poolStatus = poolConfigDataList[idxPoolStatus] | |
201 | 202 | let poolLiquidityDataList = getPoolLiquidity(amountAssetInternalId, priceAssetInternalId) | |
202 | 203 | let poolAmountAssetBalance = parseIntValue(poolLiquidityDataList[idxPoolAmountAssetAmt]) | |
203 | 204 | let poolPriceAssetBalance = parseIntValue(poolLiquidityDataList[idxPoolPriceAssetAmt]) | |
204 | 205 | let poolLPBalance = parseIntValue(poolLiquidityDataList[idxPoolLPAssetAmt]) | |
205 | 206 | let userLiquidityDataList = getPoolLiquidityByUser(amountAssetInternalId, priceAssetInternalId, userAddress) | |
206 | 207 | let userAmountAssetBalance = parseIntValue(userLiquidityDataList[idxPoolAmountAssetAmt]) | |
207 | 208 | let userPriceAssetBalance = parseIntValue(userLiquidityDataList[idxPoolPriceAssetAmt]) | |
208 | 209 | let userLPBalance = parseIntValue(userLiquidityDataList[idxPoolLPAssetAmt]) | |
209 | 210 | if (if ((amountAssetId != inAmountAssetId)) | |
210 | 211 | then true | |
211 | 212 | else (priceAssetId != inPriceAssetId)) | |
212 | 213 | then throw("Invalid amount or price asset passed.") | |
213 | 214 | else { | |
214 | 215 | let accountAmountAssetBalance = privateGetAccountBalance(amountAssetId) | |
215 | 216 | let accountPriceAssetBalance = privateGetAccountBalance(priceAssetId) | |
216 | 217 | let inAmountAssetAmtCalculatedTuple = privateCastAssetToMaxDecimals(amoutAssetDecimals, inAmountAssetAmt) | |
217 | 218 | let inPriceAssetAmtCalculatedTuple = privateCastAssetToMaxDecimals(priceAssetDecimals, inPriceAssetAmt) | |
218 | 219 | let inAmountAssetAmtCalculated = inAmountAssetAmtCalculatedTuple._1 | |
219 | 220 | let inPriceAssetAmtCalculated = inPriceAssetAmtCalculatedTuple._1 | |
220 | 221 | let userPrice = fraction(inPriceAssetAmtCalculated, decimalsMultPrice, inAmountAssetAmtCalculated) | |
221 | 222 | let amountAssetPoolLockedAmt = (accountAmountAssetBalance * inAmountAssetAmtCalculatedTuple._2) | |
222 | 223 | let priceAssetPoolLockedAmt = (accountPriceAssetBalance * inPriceAssetAmtCalculatedTuple._2) | |
223 | 224 | let curentPrice = if ((poolLPBalance == 0)) | |
224 | 225 | then 0 | |
225 | 226 | else fraction(priceAssetPoolLockedAmt, decimalsMultPrice, amountAssetPoolLockedAmt) | |
226 | 227 | let slippage = if ((curentPrice == 0)) | |
227 | 228 | then 0 | |
228 | 229 | else if ((curentPrice > userPrice)) | |
229 | 230 | then fraction((curentPrice - userPrice), 100, curentPrice) | |
230 | 231 | else fraction((userPrice - curentPrice), 100, curentPrice) | |
231 | 232 | if (if ((curentPrice != 0)) | |
232 | 233 | then ((slippage * decimalsMultPrice) > slippageTolerance) | |
233 | 234 | else false) | |
234 | 235 | then throw(((("Price slippage " + toString((slippage * decimalsMultPrice))) + " exceeded the passed limit of ") + toString(slippageTolerance))) | |
235 | 236 | else { | |
236 | 237 | let finalPrice = fraction((priceAssetPoolLockedAmt + inPriceAssetAmtCalculated), decimalsMultPrice, (amountAssetPoolLockedAmt + inAmountAssetAmtCalculated)) | |
237 | 238 | let outLpAmount = if ((poolLPBalance == 0)) | |
238 | 239 | then { | |
239 | 240 | let partA = pow(inAmountAssetAmtCalculated, 0, 5, 1, 0, DOWN) | |
240 | 241 | let partB = pow(inPriceAssetAmtCalculated, 0, 5, 1, 0, DOWN) | |
241 | 242 | (partA * partB) | |
242 | 243 | } | |
243 | 244 | else { | |
244 | 245 | let lpAmtByAmountAsset = fraction(poolLPBalance, inAmountAssetAmtCalculated, amountAssetPoolLockedAmt) | |
245 | 246 | let lpAmtByPriceAsset = fraction(poolLPBalance, inPriceAssetAmtCalculated, priceAssetPoolLockedAmt) | |
246 | 247 | if ((lpAmtByPriceAsset > lpAmtByAmountAsset)) | |
247 | 248 | then lpAmtByAmountAsset | |
248 | 249 | else lpAmtByPriceAsset | |
249 | 250 | } | |
250 | 251 | $Tuple13(outLpAmount, finalPrice, userAmountAssetBalance, userPriceAssetBalance, userLPBalance, poolAmountAssetBalance, poolPriceAssetBalance, poolLPBalance, amountAssetInternalId, priceAssetInternalId, lpAssetId, slippage, poolStatus) | |
251 | 252 | } | |
252 | 253 | } | |
253 | 254 | } | |
254 | 255 | ||
255 | 256 | ||
256 | 257 | func validateMatcherOrderAllowed (order) = { | |
257 | 258 | let poolConfigDataList = getPoolConfig() | |
258 | 259 | let amountAssetId = poolConfigDataList[idxAmountAssetId] | |
259 | 260 | let priceAssetId = poolConfigDataList[idxPriceAssetId] | |
260 | 261 | let poolStatus = parseIntValue(poolConfigDataList[idxPoolStatus]) | |
261 | 262 | let matcherPublicKeyStr = poolConfigDataList[idxMatcherPublicKey] | |
262 | 263 | let amountAssetDecimals = parseIntValue(poolConfigDataList[idxAmountAssetDecimals]) | |
263 | 264 | let priceAssetDecimals = parseIntValue(poolConfigDataList[idxPriceAssetDecimals]) | |
264 | 265 | let accountAmountAssetBalance = privateGetAccountBalance(amountAssetId) | |
265 | 266 | let accountPriceAssetBalance = privateGetAccountBalance(priceAssetId) | |
266 | 267 | let currentPrice = if ((order.orderType == Buy)) | |
267 | 268 | then privateCalculatePrice(amountAssetDecimals, priceAssetDecimals, (accountAmountAssetBalance + order.amount), accountPriceAssetBalance) | |
268 | 269 | else privateCalculatePrice(amountAssetDecimals, priceAssetDecimals, (accountAmountAssetBalance + order.amount), accountPriceAssetBalance) | |
269 | 270 | let isPoolStatusValid = if (if (if (isGlobalShutdown()) | |
270 | 271 | then true | |
271 | 272 | else (poolStatus == PoolMatcherDisabled)) | |
272 | 273 | then true | |
273 | 274 | else (poolStatus == PoolShutdown)) | |
274 | 275 | then false | |
275 | 276 | else true | |
276 | 277 | let isValidMatcherSign = true | |
277 | 278 | let orderAmountAsset = order.assetPair.amountAsset | |
278 | 279 | let orderAmountAssetStr = if ((orderAmountAsset == unit)) | |
279 | 280 | then "WAVES" | |
280 | 281 | else toBase58String(value(orderAmountAsset)) | |
281 | 282 | let orderPriceAsset = order.assetPair.priceAsset | |
282 | 283 | let orderPriceAssetStr = if ((orderPriceAsset == unit)) | |
283 | 284 | then "WAVES" | |
284 | 285 | else toBase58String(value(orderPriceAsset)) | |
285 | 286 | let isValidAssetPair = if (if ((orderAmountAssetStr != amountAssetId)) | |
286 | 287 | then true | |
287 | 288 | else (orderPriceAssetStr != priceAssetId)) | |
288 | 289 | then false | |
289 | 290 | else true | |
290 | 291 | let orderPrice = order.price | |
291 | 292 | let priceDecimals = ((8 + priceAssetDecimals) - amountAssetDecimals) | |
292 | 293 | let castedOrderPrice = privateCastAssetToMaxDecimals(priceDecimals, orderPrice)._1 | |
293 | 294 | let isOrderPriceValid = if ((order.orderType == Buy)) | |
294 | 295 | then (currentPrice >= castedOrderPrice) | |
295 | 296 | else (castedOrderPrice >= currentPrice) | |
296 | 297 | [if (if (if (isValidAssetPair) | |
297 | 298 | then isValidMatcherSign | |
298 | 299 | else false) | |
299 | 300 | then isPoolStatusValid | |
300 | 301 | else false) | |
301 | 302 | then isOrderPriceValid | |
302 | 303 | else false] | |
303 | 304 | } | |
304 | 305 | ||
305 | 306 | ||
306 | 307 | @Callable(i) | |
307 | 308 | func put (slippageTolerance) = { | |
308 | 309 | let pmtAmountAsset = value(i.payments[0]) | |
309 | 310 | let inAmountAssetAmt = pmtAmountAsset.amount | |
310 | 311 | let inAmountAssetId = if (!(isDefined(pmtAmountAsset.assetId))) | |
311 | 312 | then fromBase58String("WAVES") | |
312 | 313 | else value(pmtAmountAsset.assetId) | |
313 | 314 | let pmtPriceAsset = value(i.payments[1]) | |
314 | 315 | let inPriceAssetAmt = pmtPriceAsset.amount | |
315 | 316 | let inPriceAssetId = value(pmtPriceAsset.assetId) | |
316 | 317 | let estimatedPutResults = privateEstimatePutOperation(slippageTolerance, inAmountAssetAmt, toBase58String(inAmountAssetId), inPriceAssetAmt, toBase58String(inPriceAssetId), toString(i.caller)) | |
317 | 318 | let outLpAmount = estimatedPutResults._1 | |
318 | 319 | let curentPrice = estimatedPutResults._2 | |
319 | 320 | let userAmountAssetBalance = estimatedPutResults._3 | |
320 | 321 | let userPriceAssetBalance = estimatedPutResults._4 | |
321 | 322 | let userLPBalance = estimatedPutResults._5 | |
322 | 323 | let poolAmountAssetBalance = estimatedPutResults._6 | |
323 | 324 | let poolPriceAssetBalance = estimatedPutResults._7 | |
324 | 325 | let poolLPBalance = estimatedPutResults._8 | |
325 | 326 | let amountAssetInternalId = estimatedPutResults._9 | |
326 | 327 | let priceAssetInternalId = estimatedPutResults._10 | |
327 | 328 | let lpAssetId = estimatedPutResults._11 | |
328 | 329 | let slippageCalculated = estimatedPutResults._12 | |
329 | 330 | let poolStatus = parseIntValue(estimatedPutResults._13) | |
330 | 331 | if (if (if (isGlobalShutdown()) | |
331 | 332 | then true | |
332 | 333 | else (poolStatus == PoolPutDisabled)) | |
333 | 334 | then true | |
334 | 335 | else (poolStatus == PoolShutdown)) | |
335 | 336 | then throw(("Put operation is blocked by admin. Status = " + toString(poolStatus))) | |
336 | 337 | else [StringEntry(keyPriceLast(), ("%s__" + toString(curentPrice))), StringEntry(keyPriceHistory(height, lastBlock.timestamp), ("%s__" + toString(curentPrice))), StringEntry(keyPutActionByUser(toString(i.caller), toBase58String(i.transactionId)), dataPutActionInfo(inAmountAssetAmt, inPriceAssetAmt, outLpAmount, curentPrice, slippageTolerance, slippageCalculated, height, lastBlock.timestamp)), StringEntry(keyPoolLiquidityByUser(amountAssetInternalId, priceAssetInternalId, toString(i.caller)), dataPoolLiquidity((userAmountAssetBalance + inAmountAssetAmt), (userPriceAssetBalance + inPriceAssetAmt), (userLPBalance + outLpAmount))), StringEntry(keyPoolLiquidity(amountAssetInternalId, priceAssetInternalId), dataPoolLiquidity((poolAmountAssetBalance + inAmountAssetAmt), (poolPriceAssetBalance + inPriceAssetAmt), (poolLPBalance + outLpAmount))), Reissue(lpAssetId, outLpAmount, true), ScriptTransfer(i.caller, outLpAmount, lpAssetId)] | |
337 | 338 | } | |
338 | 339 | ||
339 | 340 | ||
340 | 341 | ||
341 | 342 | @Callable(i) | |
342 | 343 | func get () = { | |
343 | 344 | let pmtAmountAsset = value(i.payments[0]) | |
344 | 345 | let pmtAssetId = value(pmtAmountAsset.assetId) | |
345 | 346 | let pmtAssetAmount = pmtAmountAsset.amount | |
346 | 347 | let results = privateEstimateGetOperation(toBase58String(pmtAssetId), pmtAssetAmount, toString(i.caller)) | |
347 | 348 | let outAmountAssetAmt = results._1 | |
348 | 349 | let outPriceAssetAmt = results._2 | |
349 | 350 | let amountAssetInternalId = results._3 | |
350 | 351 | let priceAssetInternalId = results._4 | |
351 | 352 | let userAmountAssetBalance = results._5 | |
352 | 353 | let amountAssetId = results._6 | |
353 | 354 | let userPriceAssetBalance = results._7 | |
354 | 355 | let priceAssetId = results._8 | |
355 | 356 | let userLPBalance = results._9 | |
356 | 357 | let poolAmountAssetBalance = results._10 | |
357 | 358 | let poolPriceAssetBalance = results._11 | |
358 | 359 | let poolLPBalance = results._12 | |
359 | 360 | let currentPrice = results._13 | |
360 | 361 | let poolStatus = parseIntValue(results._14) | |
361 | 362 | if (if (isGlobalShutdown()) | |
362 | 363 | then true | |
363 | 364 | else (poolStatus == PoolShutdown)) | |
364 | 365 | then throw(("Get operation is blocked by admin. Status = " + toString(poolStatus))) | |
365 | 366 | else [Burn(pmtAssetId, pmtAssetAmount), ScriptTransfer(i.caller, outAmountAssetAmt, if ((amountAssetId == "WAVES")) | |
366 | 367 | then unit | |
367 | 368 | else fromBase58String(amountAssetId)), ScriptTransfer(i.caller, outPriceAssetAmt, fromBase58String(priceAssetId)), StringEntry(keyPoolLiquidityByUser(amountAssetInternalId, priceAssetInternalId, toString(i.caller)), dataPoolLiquidity((userAmountAssetBalance - outAmountAssetAmt), (userPriceAssetBalance - outPriceAssetAmt), (userLPBalance - pmtAssetAmount))), StringEntry(keyPoolLiquidity(amountAssetInternalId, priceAssetInternalId), dataPoolLiquidity((poolAmountAssetBalance - outAmountAssetAmt), (poolPriceAssetBalance - outPriceAssetAmt), (poolLPBalance - pmtAssetAmount))), StringEntry(keyGetActionByUser(toString(i.caller), toBase58String(i.transactionId)), dataGetActionInfo(outAmountAssetAmt, outPriceAssetAmt, pmtAssetAmount, currentPrice, height, lastBlock.timestamp)), StringEntry(keyPriceLast(), ("%s__" + toString(currentPrice))), StringEntry(keyPriceHistory(height, lastBlock.timestamp), ("%s__" + toString(currentPrice)))] | |
368 | 369 | } | |
369 | 370 | ||
370 | 371 | ||
371 | 372 | ||
372 | 373 | @Callable(i) | |
373 | 374 | func activate (amountAssetStr,priceAssetStr,lpAssetName,lpAssetDescr,poolWeight) = if ((toString(i.caller) != factoryAddressString)) | |
374 | 375 | then throw("permissions denied") | |
375 | 376 | else { | |
376 | 377 | let amountAssetId = fromBase58String(amountAssetStr) | |
377 | 378 | let amountAssetDecimals = value(assetInfo(amountAssetId)).decimals | |
378 | 379 | let priceAssetId = fromBase58String(priceAssetStr) | |
379 | 380 | let priceAssetDecimals = value(assetInfo(priceAssetId)).decimals | |
380 | 381 | let lpAssetIssueAction = Issue(lpAssetName, lpAssetDescr, 1, 8, true) | |
381 | 382 | let lpAssetId = calculateAssetId(lpAssetIssueAction) | |
382 | 383 | let lpAssetIdAsString = toBase58String(lpAssetId) | |
383 | 384 | $Tuple2([lpAssetIssueAction, Burn(lpAssetId, 1), StringEntry(keyAmountAsset(), amountAssetStr), StringEntry(keyPriceAsset(), priceAssetStr)], lpAssetIdAsString) | |
384 | 385 | } | |
385 | 386 | ||
386 | 387 | ||
387 | 388 | ||
388 | 389 | @Callable(i) | |
389 | 390 | func statsREADONLY () = { | |
390 | 391 | let poolConfigDataList = getPoolConfig() | |
391 | 392 | let lpAssetId = fromBase58String(poolConfigDataList[idxPoolLPAssetId]) | |
392 | 393 | let amountAssetId = poolConfigDataList[idxAmountAssetId] | |
393 | 394 | let priceAssetId = poolConfigDataList[idxPriceAssetId] | |
394 | 395 | let amountAssetInternalId = poolConfigDataList[idxAmountAssetInternalId] | |
395 | 396 | let priceAssetInternalId = poolConfigDataList[idxPriceAssetInternalId] | |
396 | 397 | let amoutAssetDecimals = parseIntValue(poolConfigDataList[idxAmountAssetDecimals]) | |
397 | 398 | let priceAssetDecimals = parseIntValue(poolConfigDataList[idxPriceAssetDecimals]) | |
398 | 399 | let poolLiquidityDataList = getPoolLiquidity(amountAssetInternalId, priceAssetInternalId) | |
399 | 400 | let poolLPBalance = parseIntValue(poolLiquidityDataList[idxPoolLPAssetAmt]) | |
400 | 401 | let accountAmountAssetBalance = privateGetAccountBalance(amountAssetId) | |
401 | 402 | let accountPriceAssetBalance = privateGetAccountBalance(priceAssetId) | |
402 | 403 | let amountAssetPoolLockedAmt = privateCastAssetToMaxDecimals(amoutAssetDecimals, accountAmountAssetBalance)._1 | |
403 | 404 | let priceAssetPoolLockedAmt = privateCastAssetToMaxDecimals(priceAssetDecimals, accountPriceAssetBalance)._1 | |
404 | 405 | let lpPriceInAmountAsset = fraction(amountAssetPoolLockedAmt, (1 * decimalsMultPrice), poolLPBalance) | |
405 | 406 | let lpPriceInPriceAsset = fraction(priceAssetPoolLockedAmt, (1 * decimalsMultPrice), poolLPBalance) | |
406 | 407 | let currentPrice = privateCalculatePrice(amoutAssetDecimals, priceAssetDecimals, accountAmountAssetBalance, accountPriceAssetBalance) | |
407 | - | $Tuple2(nil, makeString(["%d%d%d%d%d%d", toString(accountAmountAssetBalance), toString(accountPriceAssetBalance), toString(poolLPBalance), toString(currentPrice), toString(lpPriceInAmountAsset), toString(lpPriceInPriceAsset)], SEP)) | |
408 | + | let poolWeight = valueOrElse(getInteger(value(addressFromString(factoryAddressString)), keyPoolWeight(toString(this))), 0) | |
409 | + | $Tuple2(nil, makeString(["%d%d%d%d%d%d%d", toString(accountAmountAssetBalance), toString(accountPriceAssetBalance), toString(poolLPBalance), toString(currentPrice), toString(lpPriceInAmountAsset), toString(lpPriceInPriceAsset), toString(poolWeight)], SEP)) | |
408 | 410 | } | |
409 | 411 | ||
410 | 412 | ||
411 | 413 | ||
412 | 414 | @Callable(i) | |
413 | 415 | func evaluatePutByAmountAssetREADONLY (slippageTolerance,inAmountAssetAmt,userAddress) = { | |
414 | 416 | let poolConfigDataList = getPoolConfig() | |
415 | 417 | let lpAssetId = fromBase58String(poolConfigDataList[idxPoolLPAssetId]) | |
416 | 418 | let amountAssetId = poolConfigDataList[idxAmountAssetId] | |
417 | 419 | let priceAssetId = poolConfigDataList[idxPriceAssetId] | |
418 | 420 | let amountAssetInternalId = poolConfigDataList[idxAmountAssetInternalId] | |
419 | 421 | let priceAssetInternalId = poolConfigDataList[idxPriceAssetInternalId] | |
420 | 422 | let amoutAssetDecimals = parseIntValue(poolConfigDataList[idxAmountAssetDecimals]) | |
421 | 423 | let priceAssetDecimals = parseIntValue(poolConfigDataList[idxPriceAssetDecimals]) | |
422 | 424 | let poolStatus = poolConfigDataList[idxPoolStatus] | |
423 | 425 | let poolLiquidityDataList = getPoolLiquidity(amountAssetInternalId, priceAssetInternalId) | |
424 | 426 | let poolLPBalance = parseIntValue(poolLiquidityDataList[idxPoolLPAssetAmt]) | |
425 | 427 | let accountAmountAssetBalance = privateGetAccountBalance(amountAssetId) | |
426 | 428 | let accountPriceAssetBalance = privateGetAccountBalance(priceAssetId) | |
427 | 429 | let amountAssetAmtCalculatedTuple = privateCastAssetToMaxDecimals(amoutAssetDecimals, accountAmountAssetBalance) | |
428 | 430 | let priceAssetAmtCalculatedTuple = privateCastAssetToMaxDecimals(priceAssetDecimals, accountPriceAssetBalance) | |
429 | 431 | let curentPrice = if ((poolLPBalance == 0)) | |
430 | 432 | then 0 | |
431 | 433 | else fraction(priceAssetAmtCalculatedTuple._1, decimalsMultPrice, amountAssetAmtCalculatedTuple._1) | |
432 | 434 | let inPriceAssetAmtCalculated = fraction(inAmountAssetAmt, curentPrice, decimalsMultPrice) | |
433 | 435 | let inPriceAssetAmt = privateCastAssetToOriginDecimals(priceAssetDecimals, inPriceAssetAmtCalculated)._1 | |
434 | 436 | let results = privateEstimatePutOperation(slippageTolerance, inAmountAssetAmt, amountAssetId, inPriceAssetAmt, priceAssetId, userAddress) | |
435 | 437 | $Tuple2(nil, makeString(["%d%d%d%d%d%d", toString(results._1), toString(results._2), toString(results._6), toString(results._7), toString(results._8), results._13], SEP)) | |
436 | 438 | } | |
437 | 439 | ||
438 | 440 | ||
439 | 441 | ||
440 | 442 | @Callable(i) | |
441 | 443 | func evaluatePutByPriceAssetREADONLY (slippageTolerance,inPriceAssetAmt,userAddress) = { | |
442 | 444 | let poolConfigDataList = getPoolConfig() | |
443 | 445 | let lpAssetId = fromBase58String(poolConfigDataList[idxPoolLPAssetId]) | |
444 | 446 | let amountAssetId = poolConfigDataList[idxAmountAssetId] | |
445 | 447 | let priceAssetId = poolConfigDataList[idxPriceAssetId] | |
446 | 448 | let amountAssetInternalId = poolConfigDataList[idxAmountAssetInternalId] | |
447 | 449 | let priceAssetInternalId = poolConfigDataList[idxPriceAssetInternalId] | |
448 | 450 | let amoutAssetDecimals = parseIntValue(poolConfigDataList[idxAmountAssetDecimals]) | |
449 | 451 | let priceAssetDecimals = parseIntValue(poolConfigDataList[idxPriceAssetDecimals]) | |
450 | 452 | let poolStatus = poolConfigDataList[idxPoolStatus] | |
451 | 453 | let poolLiquidityDataList = getPoolLiquidity(amountAssetInternalId, priceAssetInternalId) | |
452 | 454 | let poolLPBalance = parseIntValue(poolLiquidityDataList[idxPoolLPAssetAmt]) | |
453 | 455 | let accountAmountAssetBalance = privateGetAccountBalance(amountAssetId) | |
454 | 456 | let accountPriceAssetBalance = privateGetAccountBalance(priceAssetId) | |
455 | 457 | let amountAssetAmtCalculatedTuple = privateCastAssetToMaxDecimals(amoutAssetDecimals, accountAmountAssetBalance) | |
456 | 458 | let priceAssetAmtCalculatedTuple = privateCastAssetToMaxDecimals(priceAssetDecimals, accountPriceAssetBalance) | |
457 | 459 | let inPriceAssetAmtCalculatedTuple = privateCastAssetToMaxDecimals(priceAssetDecimals, inPriceAssetAmt) | |
458 | 460 | let curentPrice = if ((poolLPBalance == 0)) | |
459 | 461 | then 0 | |
460 | 462 | else fraction(priceAssetAmtCalculatedTuple._1, decimalsMultPrice, amountAssetAmtCalculatedTuple._1) | |
461 | 463 | let inAmountAssetAmtCalculated = fraction(inPriceAssetAmtCalculatedTuple._1, decimalsMultPrice, curentPrice) | |
462 | 464 | let inAmountAssetAmt = privateCastAssetToOriginDecimals(amoutAssetDecimals, inAmountAssetAmtCalculated)._1 | |
463 | 465 | let results = privateEstimatePutOperation(slippageTolerance, inAmountAssetAmt, amountAssetId, inPriceAssetAmt, priceAssetId, userAddress) | |
464 | 466 | $Tuple2(nil, makeString(["%d%d%d%d%d%d", toString(results._1), toString(results._2), toString(results._6), toString(results._7), toString(results._8), results._13], SEP)) | |
465 | 467 | } | |
466 | 468 | ||
467 | 469 | ||
468 | 470 | ||
469 | 471 | @Callable(i) | |
470 | 472 | func evaluateGetREADONLY (paymentLpAssetId,paymentLpAmount,userAddress) = { | |
471 | 473 | let results = privateEstimateGetOperation(paymentLpAssetId, paymentLpAmount, userAddress) | |
472 | 474 | $Tuple2(nil, makeString(["%d%d%d%d%d%s%d%s%d%d%s%d%d", toString(results._1), toString(results._2), toString(results._10), toString(results._11), toString(results._12), toString(results._13), results._14], SEP)) | |
473 | 475 | } | |
474 | 476 | ||
475 | 477 | ||
476 | 478 | ||
477 | 479 | @Callable(i) | |
478 | 480 | func hashREADONLY () = $Tuple2(nil, toBase64String(value(scriptHash(this)))) | |
479 | 481 | ||
480 | 482 | ||
481 | 483 | @Verifier(tx) | |
482 | 484 | func verify () = match tx { | |
483 | 485 | case order: Order => | |
484 | 486 | validateMatcherOrderAllowed(order)[1] | |
485 | 487 | case _ => | |
486 | 488 | sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
487 | 489 | } | |
488 | 490 |
github/deemru/w8io/169f3d6 60.18 ms ◑