tx · DgP56pGyoytmty6JqwLJCYW6Bg5d4qAbJqWcaS3KfaHj

3NCUrmBwKvfQDkfTg1gL8BPKZid8fC4YDx3:  -0.02900000 Waves

2022.10.26 11:07 [2289132] smart account 3NCUrmBwKvfQDkfTg1gL8BPKZid8fC4YDx3 > SELF 0.00000000 Waves

{ "type": 13, "id": "DgP56pGyoytmty6JqwLJCYW6Bg5d4qAbJqWcaS3KfaHj", "fee": 2900000, "feeAssetId": null, "timestamp": 1666771670167, "version": 1, "sender": "3NCUrmBwKvfQDkfTg1gL8BPKZid8fC4YDx3", "senderPublicKey": "DnbhDz6GvchfLCy83fxyPKD7SoAmXD6DrJ5ubi3LXtgM", "proofs": [ "2fwGW4DznJT97ghKEsXLtYp3CMSZM9N9mQ8hdP59ACHPyez8gAsfJbV2JSTnvBH7fy5dDHLhWjNno8CBvzPNDQK9" ], "script": "base64:BgKfJwgCEgMKAQgSABIECgIBBBIDCgEBEgQKAgEEEgQKAggBEgQKAggBEgQKAggBEgUKAwEIARIAEgQKAgEBEgMKAQESBAoCCAgSABIDCgEIEgUKAwEBARIECgIBARIECgIIARIECgIICBILCgkIAQECAQIIBAQSBgoECAgBCBIAEgMKAQESAwoBARIECgIIASIKbFBkZWNpbWFscyIGc2NhbGU4IgxzY2FsZThCaWdJbnQiB3NjYWxlMTgiCnplcm9CaWdJbnQiBGJpZzAiBGJpZzEiBGJpZzIiC3dhdmVzU3RyaW5nIgNTRVAiClBvb2xBY3RpdmUiD1Bvb2xQdXREaXNhYmxlZCITUG9vbE1hdGNoZXJEaXNhYmxlZCIMUG9vbFNodXRkb3duIg5pZHhQb29sQWRkcmVzcyINaWR4UG9vbFN0YXR1cyIQaWR4UG9vbExQQXNzZXRJZCINaWR4QW10QXNzZXRJZCIPaWR4UHJpY2VBc3NldElkIg5pZHhBbXRBc3NldERjbSIQaWR4UHJpY2VBc3NldERjbSIOaWR4SUFtdEFzc2V0SWQiEGlkeElQcmljZUFzc2V0SWQiDWlkeExQQXNzZXRE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ZNBQJmTAkBAiE9AgUCZk4FAmZMBwYJAPQDAwgFAmZICWJvZHlCeXRlcwkAkQMCCAUCZkgGcHJvb2ZzAAAFAmZKCQD0AwMIBQJmSAlib2R5Qnl0ZXMJAJEDAggFAmZIBnByb29mcwAABQJmSnyyoeo=", "chainId": 84, "height": 2289132, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 3iobQbCexFtmt8TQQfpNhvdXzNqwk9HtpGfntGYTwqio Next: 3EmYoS5T68XLFb49AJjdTUdiJnJLEVKn3NjcJyU58FBa Diff:
OldNewDifferences
852852 if ((checks == checks))
853853 then {
854854 let outAssetId = parseAssetId(outAssetIdStr)
855+ let userAddress = i.caller
856+ let txId = i.transactionId
855857 let unstakeInv = invoke(stakingContract, "unstake", [toBase58String(cfgLpAssetId), unstakeAmount], nil)
856858 if ((unstakeInv == unstakeInv))
857859 then {
858- let $t03409134214 = calcGetOneToken(outAssetId, unstakeAmount, cfgLpAssetId, unit, unit)
859- let amountEstimated = $t03409134214._1
860- let commonState = $t03409134214._2
861- let feeAmount = $t03409134214._3
862- let bonus = $t03409134214._4
860+ let $t03414934279 = calcGetOneToken(outAssetId, unstakeAmount, cfgLpAssetId, userAddress, txId)
861+ let amountEstimated = $t03414934279._1
862+ let commonState = $t03414934279._2
863+ let feeAmount = $t03414934279._3
864+ let bonus = $t03414934279._4
863865 let amount = if (if ((minOutAmount > 0))
864866 then (minOutAmount > amountEstimated)
865867 else false)
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let lPdecimals = 8
55
66 let scale8 = 100000000
77
88 let scale8BigInt = toBigInt(100000000)
99
1010 let scale18 = toBigInt(1000000000000000000)
1111
1212 let zeroBigInt = toBigInt(0)
1313
1414 let big0 = toBigInt(0)
1515
1616 let big1 = toBigInt(1)
1717
1818 let big2 = toBigInt(2)
1919
2020 let wavesString = "WAVES"
2121
2222 let SEP = "__"
2323
2424 let PoolActive = 1
2525
2626 let PoolPutDisabled = 2
2727
2828 let PoolMatcherDisabled = 3
2929
3030 let PoolShutdown = 4
3131
3232 let idxPoolAddress = 1
3333
3434 let idxPoolStatus = 2
3535
3636 let idxPoolLPAssetId = 3
3737
3838 let idxAmtAssetId = 4
3939
4040 let idxPriceAssetId = 5
4141
4242 let idxAmtAssetDcm = 6
4343
4444 let idxPriceAssetDcm = 7
4545
4646 let idxIAmtAssetId = 8
4747
4848 let idxIPriceAssetId = 9
4949
5050 let idxLPAssetDcm = 10
5151
5252 let idxPoolAmtAssetAmt = 1
5353
5454 let idxPoolPriceAssetAmt = 2
5555
5656 let idxPoolLPAssetAmt = 3
5757
5858 let idxFactoryStakingContract = 1
5959
6060 let idxFactorySlippageContract = 7
6161
6262 func toX18 (origVal,origScaleMult) = fraction(toBigInt(origVal), scale18, toBigInt(origScaleMult))
6363
6464
6565 func fromX18 (val,resultScaleMult) = toInt(fraction(val, toBigInt(resultScaleMult), scale18))
6666
6767
6868 func toScale (amt,resScale,curScale) = fraction(amt, resScale, curScale)
6969
7070
7171 func abs (val) = if ((0 > val))
7272 then -(val)
7373 else val
7474
7575
7676 func absBigInt (val) = if ((zeroBigInt > val))
7777 then -(val)
7878 else val
7979
8080
8181 func fc () = "%s__factoryContract"
8282
8383
8484 func mpk () = "%s__managerPublicKey"
8585
8686
8787 func pmpk () = "%s__pendingManagerPublicKey"
8888
8989
9090 func pl () = "%s%s__price__last"
9191
9292
9393 func ph (h,timestamp) = makeString(["%s%s%d%d__price__history", toString(h), toString(timestamp)], SEP)
9494
9595
9696 func pau (userAddress,txId) = ((("%s%s%s__P__" + userAddress) + "__") + txId)
9797
9898
9999 func gau (userAddress,txId) = ((("%s%s%s__G__" + userAddress) + "__") + txId)
100100
101101
102102 func aa () = "%s__amountAsset"
103103
104104
105105 func pa () = "%s__priceAsset"
106106
107107
108108 let keyFee = "%s__fee"
109109
110110 let feeDefault = fraction(5, scale8, 10000)
111111
112112 let fee = valueOrElse(getInteger(this, keyFee), feeDefault)
113113
114114 func keyFactoryConfig () = "%s__factoryConfig"
115115
116116
117117 func keyMatcherPub () = "%s%s__matcher__publicKey"
118118
119119
120120 func keyMappingPoolContractAddressToPoolAssets (poolContractAddress) = (("%s%s%s__" + poolContractAddress) + "__mappings__poolContract2LpAsset")
121121
122122
123123 func keyPoolConfig (iAmtAsset,iPriceAsset) = (((("%d%d%s__" + iAmtAsset) + "__") + iPriceAsset) + "__config")
124124
125125
126126 func keyMappingsBaseAsset2internalId (baseAssetStr) = ("%s%s%s__mappings__baseAsset2internalId__" + baseAssetStr)
127127
128128
129129 func keyAllPoolsShutdown () = "%s__shutdown"
130130
131131
132132 func keyPoolWeight (contractAddress) = ("%s%s__poolWeight__" + contractAddress)
133133
134134
135135 func keyAllowedLpScriptHash () = "%s__allowedLpScriptHash"
136136
137137
138138 let keyFeeCollectorAddress = "%s__feeCollectorAddress"
139139
140140 func throwOrderError (orderValid,senderValid,matcherValid) = throw(((((("order validation failed: orderValid=" + toString(orderValid)) + " senderValid=") + toString(senderValid)) + " matcherValid=") + toString(matcherValid)))
141141
142142
143143 func getStringOrFail (address,key) = valueOrErrorMessage(getString(address, key), makeString(["mandatory ", toString(address), ".", key, " is not defined"], ""))
144144
145145
146146 func getIntOrFail (address,key) = valueOrErrorMessage(getInteger(address, key), makeString(["mandatory ", toString(address), ".", key, " is not defined"], ""))
147147
148148
149149 func throwErr (msg) = throw(makeString(["lp.ride:", msg], " "))
150150
151151
152152 let factoryContract = addressFromStringValue(getStringOrFail(this, fc()))
153153
154154 let feeCollectorAddress = addressFromStringValue(getStringOrFail(factoryContract, keyFeeCollectorAddress))
155155
156156 func isGlobalShutdown () = valueOrElse(getBoolean(factoryContract, keyAllPoolsShutdown()), false)
157157
158158
159159 func getMatcherPubOrFail () = fromBase58String(getStringOrFail(factoryContract, keyMatcherPub()))
160160
161161
162162 func getPoolConfig () = {
163163 let amtAsset = getStringOrFail(this, aa())
164164 let priceAsset = getStringOrFail(this, pa())
165165 let iPriceAsset = getIntOrFail(factoryContract, keyMappingsBaseAsset2internalId(priceAsset))
166166 let iAmtAsset = getIntOrFail(factoryContract, keyMappingsBaseAsset2internalId(amtAsset))
167167 split(getStringOrFail(factoryContract, keyPoolConfig(toString(iAmtAsset), toString(iPriceAsset))), SEP)
168168 }
169169
170170
171171 func parseAssetId (input) = if ((input == wavesString))
172172 then unit
173173 else fromBase58String(input)
174174
175175
176176 func assetIdToString (input) = if ((input == unit))
177177 then wavesString
178178 else toBase58String(value(input))
179179
180180
181181 func parsePoolConfig (poolConfig) = $Tuple7(addressFromStringValue(poolConfig[idxPoolAddress]), parseIntValue(poolConfig[idxPoolStatus]), fromBase58String(poolConfig[idxPoolLPAssetId]), parseAssetId(poolConfig[idxAmtAssetId]), parseAssetId(poolConfig[idxPriceAssetId]), parseIntValue(poolConfig[idxAmtAssetDcm]), parseIntValue(poolConfig[idxPriceAssetDcm]))
182182
183183
184184 let poolConfigParsed = parsePoolConfig(getPoolConfig())
185185
186186 let $t075437709 = poolConfigParsed
187187
188188 let cfgPoolAddress = $t075437709._1
189189
190190 let cfgPoolStatus = $t075437709._2
191191
192192 let cfgLpAssetId = $t075437709._3
193193
194194 let cfgAmountAssetId = $t075437709._4
195195
196196 let cfgPriceAssetId = $t075437709._5
197197
198198 let cfgAmountAssetDecimals = $t075437709._6
199199
200200 let cfgPriceAssetDecimals = $t075437709._7
201201
202202 func getFactoryConfig () = split(getStringOrFail(factoryContract, keyFactoryConfig()), SEP)
203203
204204
205205 let stakingContract = valueOrErrorMessage(addressFromString(getFactoryConfig()[idxFactoryStakingContract]), "incorrect staking address")
206206
207207 let slippageContract = valueOrErrorMessage(addressFromString(getFactoryConfig()[idxFactorySlippageContract]), "incorrect staking address")
208208
209209 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)
210210
211211
212212 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)
213213
214214
215215 func getAccBalance (assetId) = if ((assetId == "WAVES"))
216216 then wavesBalance(this).available
217217 else assetBalance(this, fromBase58String(assetId))
218218
219219
220220 func calcPriceBigInt (prAmtX18,amAmtX18) = fraction(prAmtX18, scale18, amAmtX18)
221221
222222
223223 func privateCalcPrice (amAssetDcm,prAssetDcm,amAmt,prAmt) = {
224224 let amtAssetAmtX18 = toX18(amAmt, amAssetDcm)
225225 let priceAssetAmtX18 = toX18(prAmt, prAssetDcm)
226226 calcPriceBigInt(priceAssetAmtX18, amtAssetAmtX18)
227227 }
228228
229229
230230 func calcPrices (amAmt,prAmt,lpAmt) = {
231231 let cfg = getPoolConfig()
232232 let amtAssetDcm = parseIntValue(cfg[idxAmtAssetDcm])
233233 let priceAssetDcm = parseIntValue(cfg[idxPriceAssetDcm])
234234 let priceX18 = privateCalcPrice(amtAssetDcm, priceAssetDcm, amAmt, prAmt)
235235 let amAmtX18 = toX18(amAmt, amtAssetDcm)
236236 let prAmtX18 = toX18(prAmt, priceAssetDcm)
237237 let lpAmtX18 = toX18(lpAmt, scale8)
238238 let lpPriceInAmAssetX18 = calcPriceBigInt(amAmtX18, lpAmtX18)
239239 let lpPriceInPrAssetX18 = calcPriceBigInt(prAmtX18, lpAmtX18)
240240 [priceX18, lpPriceInAmAssetX18, lpPriceInPrAssetX18]
241241 }
242242
243243
244244 func calculatePrices (amAmt,prAmt,lpAmt) = {
245245 let prices = calcPrices(amAmt, prAmt, lpAmt)
246246 [fromX18(prices[0], scale8), fromX18(prices[1], scale8), fromX18(prices[2], scale8)]
247247 }
248248
249249
250250 func estimateGetOperation (txId58,pmtAssetId,pmtLpAmt,userAddress) = {
251251 let cfg = getPoolConfig()
252252 let lpAssetId = cfg[idxPoolLPAssetId]
253253 let amAssetId = cfg[idxAmtAssetId]
254254 let prAssetId = cfg[idxPriceAssetId]
255255 let amAssetDcm = parseIntValue(cfg[idxAmtAssetDcm])
256256 let prAssetDcm = parseIntValue(cfg[idxPriceAssetDcm])
257257 let poolStatus = cfg[idxPoolStatus]
258258 let lpEmission = valueOrErrorMessage(assetInfo(fromBase58String(lpAssetId)), (("Asset " + lpAssetId) + " doesn't exist")).quantity
259259 if ((lpAssetId != pmtAssetId))
260260 then throw("Invalid asset passed.")
261261 else {
262262 let amBalance = getAccBalance(amAssetId)
263263 let amBalanceX18 = toX18(amBalance, amAssetDcm)
264264 let prBalance = getAccBalance(prAssetId)
265265 let prBalanceX18 = toX18(prBalance, prAssetDcm)
266266 let curPriceX18 = calcPriceBigInt(prBalanceX18, amBalanceX18)
267267 let curPrice = fromX18(curPriceX18, scale8)
268268 let pmtLpAmtX18 = toX18(pmtLpAmt, scale8)
269269 let lpEmissionX18 = toX18(lpEmission, scale8)
270270 let outAmAmtX18 = fraction(amBalanceX18, pmtLpAmtX18, lpEmissionX18)
271271 let outPrAmtX18 = fraction(prBalanceX18, pmtLpAmtX18, lpEmissionX18)
272272 let outAmAmt = fromX18(outAmAmtX18, amAssetDcm)
273273 let outPrAmt = fromX18(outPrAmtX18, prAssetDcm)
274274 let state = if ((txId58 == ""))
275275 then nil
276276 else [ScriptTransfer(userAddress, outAmAmt, if ((amAssetId == "WAVES"))
277277 then unit
278278 else fromBase58String(amAssetId)), ScriptTransfer(userAddress, outPrAmt, if ((prAssetId == "WAVES"))
279279 then unit
280280 else fromBase58String(prAssetId)), StringEntry(gau(toString(userAddress), txId58), dataGetActionInfo(outAmAmt, outPrAmt, pmtLpAmt, curPrice, height, lastBlock.timestamp)), IntegerEntry(pl(), curPrice), IntegerEntry(ph(height, lastBlock.timestamp), curPrice)]
281281 $Tuple10(outAmAmt, outPrAmt, amAssetId, prAssetId, amBalance, prBalance, lpEmission, curPriceX18, poolStatus, state)
282282 }
283283 }
284284
285285
286286 func estimatePutOperation (txId58,slippageTolerance,inAmAssetAmt,inAmAssetId,inPrAssetAmt,inPrAssetId,userAddress,isEvaluate,emitLp) = {
287287 let cfg = getPoolConfig()
288288 let lpAssetId = fromBase58String(cfg[idxPoolLPAssetId])
289289 let amAssetIdStr = cfg[idxAmtAssetId]
290290 let prAssetIdStr = cfg[idxPriceAssetId]
291291 let iAmtAssetId = cfg[idxIAmtAssetId]
292292 let iPriceAssetId = cfg[idxIPriceAssetId]
293293 let amtAssetDcm = parseIntValue(cfg[idxAmtAssetDcm])
294294 let priceAssetDcm = parseIntValue(cfg[idxPriceAssetDcm])
295295 let poolStatus = cfg[idxPoolStatus]
296296 let lpEmission = valueOrErrorMessage(assetInfo(lpAssetId), (("Asset " + toBase58String(lpAssetId)) + " doesn't exist")).quantity
297297 let inAmAssetIdStr = toBase58String(valueOrElse(inAmAssetId, fromBase58String("WAVES")))
298298 let inPrAssetIdStr = toBase58String(valueOrElse(inPrAssetId, fromBase58String("WAVES")))
299299 if (if ((amAssetIdStr != inAmAssetIdStr))
300300 then true
301301 else (prAssetIdStr != inPrAssetIdStr))
302302 then throw("Invalid amt or price asset passed.")
303303 else {
304304 let amBalance = if (isEvaluate)
305305 then getAccBalance(amAssetIdStr)
306306 else (getAccBalance(amAssetIdStr) - inAmAssetAmt)
307307 let prBalance = if (isEvaluate)
308308 then getAccBalance(prAssetIdStr)
309309 else (getAccBalance(prAssetIdStr) - inPrAssetAmt)
310310 let inAmAssetAmtX18 = toX18(inAmAssetAmt, amtAssetDcm)
311311 let inPrAssetAmtX18 = toX18(inPrAssetAmt, priceAssetDcm)
312312 let userPriceX18 = calcPriceBigInt(inPrAssetAmtX18, inAmAssetAmtX18)
313313 let amBalanceX18 = toX18(amBalance, amtAssetDcm)
314314 let prBalanceX18 = toX18(prBalance, priceAssetDcm)
315315 let res = if ((lpEmission == 0))
316316 then {
317317 let curPriceX18 = zeroBigInt
318318 let slippageX18 = zeroBigInt
319319 let lpAmtX18 = pow((inAmAssetAmtX18 * inPrAssetAmtX18), 0, toBigInt(5), 1, 0, DOWN)
320320 $Tuple5(fromX18(lpAmtX18, scale8), fromX18(inAmAssetAmtX18, amtAssetDcm), fromX18(inPrAssetAmtX18, priceAssetDcm), calcPriceBigInt((prBalanceX18 + inPrAssetAmtX18), (amBalanceX18 + inAmAssetAmtX18)), slippageX18)
321321 }
322322 else {
323323 let curPriceX18 = calcPriceBigInt(prBalanceX18, amBalanceX18)
324324 let slippageX18 = fraction(absBigInt((curPriceX18 - userPriceX18)), scale18, curPriceX18)
325325 let slippageToleranceX18 = toX18(slippageTolerance, scale8)
326326 if (if ((curPriceX18 != zeroBigInt))
327327 then (slippageX18 > slippageToleranceX18)
328328 else false)
329329 then throw(((("Price slippage " + toString(slippageX18)) + " exceeded the passed limit of ") + toString(slippageToleranceX18)))
330330 else {
331331 let lpEmissionX18 = toX18(lpEmission, scale8)
332332 let prViaAmX18 = fraction(inAmAssetAmtX18, curPriceX18, scale18)
333333 let amViaPrX18 = fraction(inPrAssetAmtX18, scale18, curPriceX18)
334334 let expectedAmts = if ((prViaAmX18 > inPrAssetAmtX18))
335335 then $Tuple2(amViaPrX18, inPrAssetAmtX18)
336336 else $Tuple2(inAmAssetAmtX18, prViaAmX18)
337337 let expAmtAssetAmtX18 = expectedAmts._1
338338 let expPriceAssetAmtX18 = expectedAmts._2
339339 let lpAmtX18 = fraction(lpEmissionX18, expPriceAssetAmtX18, prBalanceX18)
340340 $Tuple5(fromX18(lpAmtX18, scale8), fromX18(expAmtAssetAmtX18, amtAssetDcm), fromX18(expPriceAssetAmtX18, priceAssetDcm), curPriceX18, slippageX18)
341341 }
342342 }
343343 let calcLpAmt = res._1
344344 let calcAmAssetPmt = res._2
345345 let calcPrAssetPmt = res._3
346346 let curPrice = fromX18(res._4, scale8)
347347 let slippageCalc = fromX18(res._5, scale8)
348348 if ((0 >= calcLpAmt))
349349 then throw("Invalid calculations. LP calculated is less than zero.")
350350 else {
351351 let emitLpAmt = if (!(emitLp))
352352 then 0
353353 else calcLpAmt
354354 let amDiff = (inAmAssetAmt - calcAmAssetPmt)
355355 let prDiff = (inPrAssetAmt - calcPrAssetPmt)
356356 let commonState = [IntegerEntry(pl(), curPrice), IntegerEntry(ph(height, lastBlock.timestamp), curPrice), StringEntry(pau(userAddress, txId58), dataPutActionInfo(calcAmAssetPmt, calcPrAssetPmt, emitLpAmt, curPrice, slippageTolerance, slippageCalc, height, lastBlock.timestamp, amDiff, prDiff))]
357357 $Tuple13(calcLpAmt, emitLpAmt, curPrice, amBalance, prBalance, lpEmission, lpAssetId, poolStatus, commonState, amDiff, prDiff, inAmAssetId, inPrAssetId)
358358 }
359359 }
360360 }
361361
362362
363363 func validateMatcherOrderAllowed (order) = {
364364 let cfg = getPoolConfig()
365365 let amtAssetId = cfg[idxAmtAssetId]
366366 let priceAssetId = cfg[idxPriceAssetId]
367367 let poolStatus = parseIntValue(cfg[idxPoolStatus])
368368 let amtAssetDcm = parseIntValue(cfg[idxAmtAssetDcm])
369369 let priceAssetDcm = parseIntValue(cfg[idxPriceAssetDcm])
370370 let accAmtAssetBalance = getAccBalance(amtAssetId)
371371 let accPriceAssetBalance = getAccBalance(priceAssetId)
372372 let curPriceX18 = if ((order.orderType == Buy))
373373 then privateCalcPrice(amtAssetDcm, priceAssetDcm, (accAmtAssetBalance + order.amount), accPriceAssetBalance)
374374 else privateCalcPrice(amtAssetDcm, priceAssetDcm, (accAmtAssetBalance - order.amount), accPriceAssetBalance)
375375 let curPrice = fromX18(curPriceX18, scale8)
376376 if (if (if (isGlobalShutdown())
377377 then true
378378 else (poolStatus == PoolMatcherDisabled))
379379 then true
380380 else (poolStatus == PoolShutdown))
381381 then throw("Exchange operations disabled")
382382 else {
383383 let orderAmtAsset = order.assetPair.amountAsset
384384 let orderAmtAssetStr = if ((orderAmtAsset == unit))
385385 then "WAVES"
386386 else toBase58String(value(orderAmtAsset))
387387 let orderPriceAsset = order.assetPair.priceAsset
388388 let orderPriceAssetStr = if ((orderPriceAsset == unit))
389389 then "WAVES"
390390 else toBase58String(value(orderPriceAsset))
391391 if (if ((orderAmtAssetStr != amtAssetId))
392392 then true
393393 else (orderPriceAssetStr != priceAssetId))
394394 then throw("Wrong order assets.")
395395 else {
396396 let orderPrice = order.price
397397 let priceDcm = fraction(scale8, priceAssetDcm, amtAssetDcm)
398398 let castedOrderPrice = toScale(orderPrice, scale8, priceDcm)
399399 let isOrderPriceValid = if ((order.orderType == Buy))
400400 then (curPrice >= castedOrderPrice)
401401 else (castedOrderPrice >= curPrice)
402402 true
403403 }
404404 }
405405 }
406406
407407
408408 func commonGet (i) = if ((size(i.payments) != 1))
409409 then throw("exactly 1 payment is expected")
410410 else {
411411 let pmt = value(i.payments[0])
412412 let pmtAssetId = value(pmt.assetId)
413413 let pmtAmt = pmt.amount
414414 let res = estimateGetOperation(toBase58String(i.transactionId), toBase58String(pmtAssetId), pmtAmt, i.caller)
415415 let outAmAmt = res._1
416416 let outPrAmt = res._2
417417 let poolStatus = parseIntValue(res._9)
418418 let state = res._10
419419 if (if (isGlobalShutdown())
420420 then true
421421 else (poolStatus == PoolShutdown))
422422 then throw(("Get operation is blocked by admin. Status = " + toString(poolStatus)))
423423 else $Tuple5(outAmAmt, outPrAmt, pmtAmt, pmtAssetId, state)
424424 }
425425
426426
427427 func commonPut (i,slippageTolerance,emitLp) = if ((size(i.payments) != 2))
428428 then throw("exactly 2 payments are expected")
429429 else {
430430 let amAssetPmt = value(i.payments[0])
431431 let prAssetPmt = value(i.payments[1])
432432 let estPut = estimatePutOperation(toBase58String(i.transactionId), slippageTolerance, amAssetPmt.amount, amAssetPmt.assetId, prAssetPmt.amount, prAssetPmt.assetId, toString(i.caller), false, emitLp)
433433 let poolStatus = parseIntValue(estPut._8)
434434 if (if (if (isGlobalShutdown())
435435 then true
436436 else (poolStatus == PoolPutDisabled))
437437 then true
438438 else (poolStatus == PoolShutdown))
439439 then throw(("Put operation is blocked by admin. Status = " + toString(poolStatus)))
440440 else estPut
441441 }
442442
443443
444444 func emit (amount) = {
445445 let emitInv = invoke(factoryContract, "emit", [amount], nil)
446446 if ((emitInv == emitInv))
447447 then {
448448 let emitInvLegacy = match emitInv {
449449 case legacyFactoryContract: Address =>
450450 invoke(legacyFactoryContract, "emit", [amount], nil)
451451 case _ =>
452452 unit
453453 }
454454 if ((emitInvLegacy == emitInvLegacy))
455455 then amount
456456 else throw("Strict value is not equal to itself.")
457457 }
458458 else throw("Strict value is not equal to itself.")
459459 }
460460
461461
462462 func takeFee (amount) = {
463463 let feeAmount = fraction(amount, fee, scale8)
464464 $Tuple2((amount - feeAmount), feeAmount)
465465 }
466466
467467
468468 func calcPutOneToken (paymentAmountRaw,paymentAssetId,userAddress,txId) = {
469469 let isEval = (txId == unit)
470470 let $t02223222410 = parsePoolConfig(getPoolConfig())
471471 let poolAddress = $t02223222410._1
472472 let poolStatus = $t02223222410._2
473473 let lpAssetId = $t02223222410._3
474474 let amountAssetId = $t02223222410._4
475475 let priceAssetId = $t02223222410._5
476476 let amountAssetDecimals = $t02223222410._6
477477 let priceAssetDecimals = $t02223222410._7
478478 let amountBalanceRaw = getAccBalance(assetIdToString(amountAssetId))
479479 let priceBalanceRaw = getAccBalance(assetIdToString(priceAssetId))
480480 let paymentInAmountAsset = if ((paymentAssetId == amountAssetId))
481481 then true
482482 else if ((paymentAssetId == priceAssetId))
483483 then false
484484 else throwErr("invalid asset")
485485 let $t02274023033 = if (isEval)
486486 then $Tuple2(amountBalanceRaw, priceBalanceRaw)
487487 else if (paymentInAmountAsset)
488488 then $Tuple2((amountBalanceRaw - paymentAmountRaw), priceBalanceRaw)
489489 else $Tuple2(amountBalanceRaw, (priceBalanceRaw - paymentAmountRaw))
490490 let amountBalanceOld = $t02274023033._1
491491 let priceBalanceOld = $t02274023033._2
492492 let $t02303723186 = if (paymentInAmountAsset)
493493 then $Tuple2(paymentAmountRaw, 0)
494494 else $Tuple2(0, paymentAmountRaw)
495495 let amountAssetAmountRaw = $t02303723186._1
496496 let priceAssetAmountRaw = $t02303723186._2
497497 let amountAssetAmount = takeFee(amountAssetAmountRaw)._1
498498 let priceAssetAmount = takeFee(priceAssetAmountRaw)._1
499499 let $t02330823367 = takeFee(paymentAmountRaw)
500500 let paymentAmount = $t02330823367._1
501501 let feeAmount = $t02330823367._2
502502 let amountBalanceNew = (amountBalanceOld + amountAssetAmount)
503503 let priceBalanceNew = (priceBalanceOld + priceAssetAmount)
504504 let priceNewX18 = calcPriceBigInt(toX18(priceBalanceNew, priceAssetDecimals), toX18(amountBalanceNew, amountAssetDecimals))
505505 let priceNew = fromX18(priceNewX18, scale8)
506506 let paymentBalance = if (paymentInAmountAsset)
507507 then amountBalanceOld
508508 else priceBalanceOld
509509 let paymentBalanceBigInt = toBigInt(paymentBalance)
510510 let supplyBigInt = toBigInt(valueOrErrorMessage(assetInfo(lpAssetId), (("asset " + toBase58String(lpAssetId)) + " doesn't exist")).quantity)
511511 let chechSupply = if ((supplyBigInt > big0))
512512 then true
513513 else throwErr("initial deposit requires all coins")
514514 if ((chechSupply == chechSupply))
515515 then {
516516 let depositBigInt = toBigInt(paymentAmount)
517517 let issueAmount = max([0, toInt(((supplyBigInt * (sqrtBigInt((scale18 + ((depositBigInt * scale18) / paymentBalanceBigInt)), 18, 18, DOWN) - scale18)) / scale18))])
518518 let commonState = if (isEval)
519519 then nil
520520 else [IntegerEntry(pl(), priceNew), IntegerEntry(ph(height, lastBlock.timestamp), priceNew), StringEntry(pau(toString(value(userAddress)), toBase58String(value(txId))), dataPutActionInfo(amountAssetAmountRaw, priceAssetAmountRaw, issueAmount, priceNew, 0, 0, height, lastBlock.timestamp, 0, 0))]
521521 let priceOldX18 = calcPriceBigInt(toX18(priceBalanceOld, priceAssetDecimals), toX18(amountBalanceOld, amountAssetDecimals))
522522 let priceOld = fromX18(priceOldX18, scale8)
523523 let priceImpact = abs((((priceNew - priceOld) * scale8) / priceOld))
524524 $Tuple4(issueAmount, commonState, feeAmount, priceImpact)
525525 }
526526 else throw("Strict value is not equal to itself.")
527527 }
528528
529529
530530 func calcGetOneToken (outAssetId,paymentAmount,paymentAssetId,userAddress,txId) = {
531531 let isEval = (txId == unit)
532532 let $t02518925350 = parsePoolConfig(getPoolConfig())
533533 let poolAddress = $t02518925350._1
534534 let poolStatus = $t02518925350._2
535535 let lpAssetId = $t02518925350._3
536536 let amountAssetId = $t02518925350._4
537537 let priceAssetId = $t02518925350._5
538538 let amDecimals = $t02518925350._6
539539 let prDecimals = $t02518925350._7
540540 let checks = [if ((paymentAssetId == lpAssetId))
541541 then true
542542 else throwErr("invalid lp asset")]
543543 if ((checks == checks))
544544 then {
545545 let outInAmountAsset = if ((outAssetId == amountAssetId))
546546 then true
547547 else if ((outAssetId == priceAssetId))
548548 then false
549549 else throwErr("invalid asset")
550550 let balanceBigInt = if (outInAmountAsset)
551551 then toBigInt(getAccBalance(assetIdToString(amountAssetId)))
552552 else toBigInt(getAccBalance(assetIdToString(priceAssetId)))
553553 let amBalanceOld = getAccBalance(assetIdToString(amountAssetId))
554554 let prBalanceOld = getAccBalance(assetIdToString(priceAssetId))
555555 let outBalance = if (outInAmountAsset)
556556 then amBalanceOld
557557 else prBalanceOld
558558 let outBalanceBigInt = toBigInt(outBalance)
559559 let supplyBigInt = toBigInt(valueOrErrorMessage(assetInfo(lpAssetId), (("asset " + toBase58String(lpAssetId)) + " doesn't exist")).quantity)
560560 let redeemedBigInt = toBigInt(paymentAmount)
561561 let amountRaw = max([0, toInt(((balanceBigInt * (scale18 - pow((scale18 - ((redeemedBigInt * scale18) / supplyBigInt)), 18, big2, 0, 18, DOWN))) / scale18))])
562562 let $t02642526475 = takeFee(amountRaw)
563563 let totalAmount = $t02642526475._1
564564 let feeAmount = $t02642526475._2
565565 let $t02647926705 = if (outInAmountAsset)
566566 then $Tuple4(totalAmount, 0, (amBalanceOld - amountRaw), prBalanceOld)
567567 else $Tuple4(0, totalAmount, amBalanceOld, (prBalanceOld - amountRaw))
568568 let outAmAmount = $t02647926705._1
569569 let outPrAmount = $t02647926705._2
570570 let amBalanceNew = $t02647926705._3
571571 let prBalanceNew = $t02647926705._4
572572 let priceNewX18 = calcPriceBigInt(toX18(prBalanceNew, prDecimals), toX18(amBalanceNew, amDecimals))
573573 let priceNew = fromX18(priceNewX18, scale8)
574574 let commonState = if (isEval)
575575 then nil
576576 else [StringEntry(gau(toString(value(userAddress)), toBase58String(value(txId))), dataGetActionInfo(outAmAmount, outPrAmount, paymentAmount, priceNew, height, lastBlock.timestamp)), IntegerEntry(pl(), priceNew), IntegerEntry(ph(height, lastBlock.timestamp), priceNew)]
577577 let priceOldX18 = calcPriceBigInt(toX18(prBalanceOld, prDecimals), toX18(amBalanceOld, amDecimals))
578578 let priceOld = fromX18(priceOldX18, scale8)
579579 let priceImpact = abs((((priceNew - priceOld) * scale8) / priceOld))
580580 $Tuple4(totalAmount, commonState, feeAmount, priceImpact)
581581 }
582582 else throw("Strict value is not equal to itself.")
583583 }
584584
585585
586586 func managerPublicKeyOrUnit () = match getString(mpk()) {
587587 case s: String =>
588588 fromBase58String(s)
589589 case _: Unit =>
590590 unit
591591 case _ =>
592592 throw("Match error")
593593 }
594594
595595
596596 func pendingManagerPublicKeyOrUnit () = match getString(pmpk()) {
597597 case s: String =>
598598 fromBase58String(s)
599599 case _: Unit =>
600600 unit
601601 case _ =>
602602 throw("Match error")
603603 }
604604
605605
606606 func mustManager (i) = {
607607 let pd = throw("Permission denied")
608608 match managerPublicKeyOrUnit() {
609609 case pk: ByteVector =>
610610 if ((i.callerPublicKey == pk))
611611 then true
612612 else pd
613613 case _: Unit =>
614614 if ((i.caller == this))
615615 then true
616616 else pd
617617 case _ =>
618618 throw("Match error")
619619 }
620620 }
621621
622622
623623 @Callable(i)
624624 func setManager (pendingManagerPublicKey) = {
625625 let checkCaller = mustManager(i)
626626 if ((checkCaller == checkCaller))
627627 then {
628628 let checkManagerPublicKey = fromBase58String(pendingManagerPublicKey)
629629 if ((checkManagerPublicKey == checkManagerPublicKey))
630630 then [StringEntry(pmpk(), pendingManagerPublicKey)]
631631 else throw("Strict value is not equal to itself.")
632632 }
633633 else throw("Strict value is not equal to itself.")
634634 }
635635
636636
637637
638638 @Callable(i)
639639 func confirmManager () = {
640640 let pm = pendingManagerPublicKeyOrUnit()
641641 let hasPM = if (isDefined(pm))
642642 then true
643643 else throw("No pending manager")
644644 if ((hasPM == hasPM))
645645 then {
646646 let checkPM = if ((i.callerPublicKey == value(pm)))
647647 then true
648648 else throw("You are not pending manager")
649649 if ((checkPM == checkPM))
650650 then [StringEntry(mpk(), toBase58String(value(pm))), DeleteEntry(pmpk())]
651651 else throw("Strict value is not equal to itself.")
652652 }
653653 else throw("Strict value is not equal to itself.")
654654 }
655655
656656
657657
658658 @Callable(i)
659659 func put (slippageTolerance,shouldAutoStake) = if ((0 > slippageTolerance))
660660 then throw("Invalid slippageTolerance passed")
661661 else {
662662 let estPut = commonPut(i, slippageTolerance, true)
663663 let emitLpAmt = estPut._2
664664 let lpAssetId = estPut._7
665665 let state = estPut._9
666666 let amDiff = estPut._10
667667 let prDiff = estPut._11
668668 let amId = estPut._12
669669 let prId = estPut._13
670670 let emitInv = invoke(factoryContract, "emit", [emitLpAmt], nil)
671671 if ((emitInv == emitInv))
672672 then {
673673 let emitInvLegacy = match emitInv {
674674 case legacyFactoryContract: Address =>
675675 invoke(legacyFactoryContract, "emit", [emitLpAmt], nil)
676676 case _ =>
677677 unit
678678 }
679679 if ((emitInvLegacy == emitInvLegacy))
680680 then {
681681 let slippageAInv = if ((amDiff > 0))
682682 then invoke(slippageContract, "put", nil, [AttachedPayment(amId, amDiff)])
683683 else nil
684684 if ((slippageAInv == slippageAInv))
685685 then {
686686 let slippagePInv = if ((prDiff > 0))
687687 then invoke(slippageContract, "put", nil, [AttachedPayment(prId, prDiff)])
688688 else nil
689689 if ((slippagePInv == slippagePInv))
690690 then {
691691 let lpTransfer = if (shouldAutoStake)
692692 then {
693693 let slpStakeInv = invoke(stakingContract, "stake", nil, [AttachedPayment(lpAssetId, emitLpAmt)])
694694 if ((slpStakeInv == slpStakeInv))
695695 then nil
696696 else throw("Strict value is not equal to itself.")
697697 }
698698 else [ScriptTransfer(i.caller, emitLpAmt, lpAssetId)]
699699 (state ++ lpTransfer)
700700 }
701701 else throw("Strict value is not equal to itself.")
702702 }
703703 else throw("Strict value is not equal to itself.")
704704 }
705705 else throw("Strict value is not equal to itself.")
706706 }
707707 else throw("Strict value is not equal to itself.")
708708 }
709709
710710
711711
712712 @Callable(i)
713713 func putForFree (maxSlippage) = if ((0 > maxSlippage))
714714 then throw("Invalid value passed")
715715 else {
716716 let estPut = commonPut(i, maxSlippage, false)
717717 estPut._9
718718 }
719719
720720
721721
722722 @Callable(i)
723723 func putOneTkn (minOutAmount,autoStake) = {
724724 let isPutDisabled = if (if (isGlobalShutdown())
725725 then true
726726 else (cfgPoolStatus == PoolPutDisabled))
727727 then true
728728 else (cfgPoolStatus == PoolShutdown)
729729 let checks = [if (!(isPutDisabled))
730730 then true
731731 else throwErr("put operation is blocked by admin"), if ((size(i.payments) == 1))
732732 then true
733733 else throwErr("exactly 1 payment are expected")]
734734 if ((checks == checks))
735735 then {
736736 let payment = i.payments[0]
737737 let paymentAssetId = payment.assetId
738738 let paymentAmountRaw = payment.amount
739739 let userAddress = i.caller
740740 let txId = i.transactionId
741741 let $t03105731184 = calcPutOneToken(paymentAmountRaw, paymentAssetId, userAddress, txId)
742742 let emitAmountEstimated = $t03105731184._1
743743 let commonState = $t03105731184._2
744744 let feeAmount = $t03105731184._3
745745 let bonus = $t03105731184._4
746746 let emitAmount = if (if ((minOutAmount > 0))
747747 then (minOutAmount > emitAmountEstimated)
748748 else false)
749749 then throwErr(makeString(["amount to receive is less than ", toString(minOutAmount)], ""))
750750 else emitAmountEstimated
751751 let emitInv = emit(emitAmount)
752752 if ((emitInv == emitInv))
753753 then {
754754 let lpTransfer = if (autoStake)
755755 then {
756756 let stakeInv = invoke(stakingContract, "stake", nil, [AttachedPayment(cfgLpAssetId, emitAmount)])
757757 if ((stakeInv == stakeInv))
758758 then nil
759759 else throw("Strict value is not equal to itself.")
760760 }
761761 else [ScriptTransfer(i.caller, emitAmount, cfgLpAssetId)]
762762 let sendFee = if ((feeAmount > 0))
763763 then [ScriptTransfer(feeCollectorAddress, feeAmount, paymentAssetId)]
764764 else nil
765765 $Tuple2(((commonState ++ lpTransfer) ++ sendFee), emitAmount)
766766 }
767767 else throw("Strict value is not equal to itself.")
768768 }
769769 else throw("Strict value is not equal to itself.")
770770 }
771771
772772
773773
774774 @Callable(i)
775775 func putOneTknREADONLY (paymentAssetId,paymentAmountRaw) = {
776776 let $t03191332048 = calcPutOneToken(paymentAmountRaw, parseAssetId(paymentAssetId), unit, unit)
777777 let emitAmountEstimated = $t03191332048._1
778778 let commonState = $t03191332048._2
779779 let feeAmount = $t03191332048._3
780780 let bonus = $t03191332048._4
781781 $Tuple2(nil, $Tuple3(emitAmountEstimated, feeAmount, bonus))
782782 }
783783
784784
785785
786786 @Callable(i)
787787 func getOneTkn (outAssetIdStr,minOutAmount) = {
788788 let isGetDisabled = if (isGlobalShutdown())
789789 then true
790790 else (cfgPoolStatus == PoolShutdown)
791791 let checks = [if (!(isGetDisabled))
792792 then true
793793 else throwErr("get operation is blocked by admin"), if ((size(i.payments) == 1))
794794 then true
795795 else throwErr("exactly 1 payment are expected")]
796796 if ((checks == checks))
797797 then {
798798 let outAssetId = parseAssetId(outAssetIdStr)
799799 let payment = i.payments[0]
800800 let paymentAssetId = payment.assetId
801801 let paymentAmount = payment.amount
802802 let userAddress = i.caller
803803 let txId = i.transactionId
804804 let $t03263632768 = calcGetOneToken(outAssetId, paymentAmount, paymentAssetId, userAddress, txId)
805805 let amountEstimated = $t03263632768._1
806806 let commonState = $t03263632768._2
807807 let feeAmount = $t03263632768._3
808808 let bonus = $t03263632768._4
809809 let amount = if (if ((minOutAmount > 0))
810810 then (minOutAmount > amountEstimated)
811811 else false)
812812 then throwErr(makeString(["amount to receive is less than ", toString(minOutAmount)], ""))
813813 else amountEstimated
814814 let burnInv = invoke(factoryContract, "burn", [paymentAmount], [AttachedPayment(paymentAssetId, paymentAmount)])
815815 if ((burnInv == burnInv))
816816 then {
817817 let assetTransfer = [ScriptTransfer(userAddress, amount, outAssetId)]
818818 let sendFee = if ((feeAmount > 0))
819819 then [ScriptTransfer(feeCollectorAddress, feeAmount, outAssetId)]
820820 else nil
821821 $Tuple2(((commonState ++ assetTransfer) ++ sendFee), amount)
822822 }
823823 else throw("Strict value is not equal to itself.")
824824 }
825825 else throw("Strict value is not equal to itself.")
826826 }
827827
828828
829829
830830 @Callable(i)
831831 func getOneTknREADONLY (outAssetId,paymentAmount) = {
832832 let $t03340333541 = calcGetOneToken(parseAssetId(outAssetId), paymentAmount, cfgLpAssetId, unit, unit)
833833 let amountEstimated = $t03340333541._1
834834 let commonState = $t03340333541._2
835835 let feeAmount = $t03340333541._3
836836 let bonus = $t03340333541._4
837837 $Tuple2(nil, $Tuple3(amountEstimated, feeAmount, bonus))
838838 }
839839
840840
841841
842842 @Callable(i)
843843 func unstakeAndGetOneTkn (unstakeAmount,outAssetIdStr,minOutAmount) = {
844844 let isGetDisabled = if (isGlobalShutdown())
845845 then true
846846 else (cfgPoolStatus == PoolShutdown)
847847 let checks = [if (!(isGetDisabled))
848848 then true
849849 else throwErr("get operation is blocked by admin"), if ((size(i.payments) == 0))
850850 then true
851851 else throwErr("no payments are expected")]
852852 if ((checks == checks))
853853 then {
854854 let outAssetId = parseAssetId(outAssetIdStr)
855+ let userAddress = i.caller
856+ let txId = i.transactionId
855857 let unstakeInv = invoke(stakingContract, "unstake", [toBase58String(cfgLpAssetId), unstakeAmount], nil)
856858 if ((unstakeInv == unstakeInv))
857859 then {
858- let $t03409134214 = calcGetOneToken(outAssetId, unstakeAmount, cfgLpAssetId, unit, unit)
859- let amountEstimated = $t03409134214._1
860- let commonState = $t03409134214._2
861- let feeAmount = $t03409134214._3
862- let bonus = $t03409134214._4
860+ let $t03414934279 = calcGetOneToken(outAssetId, unstakeAmount, cfgLpAssetId, userAddress, txId)
861+ let amountEstimated = $t03414934279._1
862+ let commonState = $t03414934279._2
863+ let feeAmount = $t03414934279._3
864+ let bonus = $t03414934279._4
863865 let amount = if (if ((minOutAmount > 0))
864866 then (minOutAmount > amountEstimated)
865867 else false)
866868 then throwErr(makeString(["amount to receive is less than ", toString(minOutAmount)], ""))
867869 else amountEstimated
868870 let burnInv = invoke(factoryContract, "burn", [unstakeAmount], [AttachedPayment(cfgLpAssetId, unstakeAmount)])
869871 if ((burnInv == burnInv))
870872 then {
871873 let assetTransfer = [ScriptTransfer(i.caller, amount, outAssetId)]
872874 let sendFee = if ((feeAmount > 0))
873875 then [ScriptTransfer(feeCollectorAddress, feeAmount, outAssetId)]
874876 else nil
875877 $Tuple2(((commonState ++ assetTransfer) ++ sendFee), amount)
876878 }
877879 else throw("Strict value is not equal to itself.")
878880 }
879881 else throw("Strict value is not equal to itself.")
880882 }
881883 else throw("Strict value is not equal to itself.")
882884 }
883885
884886
885887
886888 @Callable(i)
887889 func get () = {
888890 let res = commonGet(i)
889891 let outAmtAmt = res._1
890892 let outPrAmt = res._2
891893 let pmtAmt = res._3
892894 let pmtAssetId = res._4
893895 let state = res._5
894896 let burnLPAssetOnFactory = invoke(factoryContract, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
895897 if ((burnLPAssetOnFactory == burnLPAssetOnFactory))
896898 then state
897899 else throw("Strict value is not equal to itself.")
898900 }
899901
900902
901903
902904 @Callable(i)
903905 func getNoLess (noLessThenAmtAsset,noLessThenPriceAsset) = {
904906 let res = commonGet(i)
905907 let outAmAmt = res._1
906908 let outPrAmt = res._2
907909 let pmtAmt = res._3
908910 let pmtAssetId = res._4
909911 let state = res._5
910912 if ((noLessThenAmtAsset > outAmAmt))
911913 then throw(((("noLessThenAmtAsset failed: " + toString(outAmAmt)) + " < ") + toString(noLessThenAmtAsset)))
912914 else if ((noLessThenPriceAsset > outPrAmt))
913915 then throw(((("noLessThenPriceAsset failed: " + toString(outPrAmt)) + " < ") + toString(noLessThenPriceAsset)))
914916 else {
915917 let burnLPAssetOnFactory = invoke(factoryContract, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
916918 if ((burnLPAssetOnFactory == burnLPAssetOnFactory))
917919 then state
918920 else throw("Strict value is not equal to itself.")
919921 }
920922 }
921923
922924
923925
924926 @Callable(i)
925927 func unstakeAndGet (amount) = {
926928 let checkPayments = if ((size(i.payments) != 0))
927929 then throw("No payments are expected")
928930 else true
929931 if ((checkPayments == checkPayments))
930932 then {
931933 let cfg = getPoolConfig()
932934 let lpAssetId = fromBase58String(cfg[idxPoolLPAssetId])
933935 let unstakeInv = invoke(stakingContract, "unstake", [toBase58String(lpAssetId), amount], nil)
934936 if ((unstakeInv == unstakeInv))
935937 then {
936938 let res = estimateGetOperation(toBase58String(i.transactionId), toBase58String(lpAssetId), amount, i.caller)
937939 let poolStatus = parseIntValue(res._9)
938940 let state = res._10
939941 let checkPoolStatus = if (if (isGlobalShutdown())
940942 then true
941943 else (poolStatus == PoolShutdown))
942944 then throw(("Get operation is blocked by admin. Status = " + toString(poolStatus)))
943945 else true
944946 if ((checkPoolStatus == checkPoolStatus))
945947 then {
946948 let burnLPAssetOnFactory = invoke(factoryContract, "burn", [amount], [AttachedPayment(lpAssetId, amount)])
947949 if ((burnLPAssetOnFactory == burnLPAssetOnFactory))
948950 then state
949951 else throw("Strict value is not equal to itself.")
950952 }
951953 else throw("Strict value is not equal to itself.")
952954 }
953955 else throw("Strict value is not equal to itself.")
954956 }
955957 else throw("Strict value is not equal to itself.")
956958 }
957959
958960
959961
960962 @Callable(i)
961963 func activate (amtAssetStr,priceAssetStr) = if ((toString(i.caller) != toString(factoryContract)))
962964 then throw("permissions denied")
963965 else $Tuple2([StringEntry(aa(), amtAssetStr), StringEntry(pa(), priceAssetStr)], "success")
964966
965967
966968
967969 @Callable(i)
968970 func getPoolConfigWrapperREADONLY () = $Tuple2(nil, getPoolConfig())
969971
970972
971973
972974 @Callable(i)
973975 func getAccBalanceWrapperREADONLY (assetId) = $Tuple2(nil, getAccBalance(assetId))
974976
975977
976978
977979 @Callable(i)
978980 func calcPricesWrapperREADONLY (amAmt,prAmt,lpAmt) = {
979981 let prices = calcPrices(amAmt, prAmt, lpAmt)
980982 $Tuple2(nil, [toString(prices[0]), toString(prices[1]), toString(prices[2])])
981983 }
982984
983985
984986
985987 @Callable(i)
986988 func toX18WrapperREADONLY (origVal,origScaleMult) = $Tuple2(nil, toString(toX18(origVal, origScaleMult)))
987989
988990
989991
990992 @Callable(i)
991993 func fromX18WrapperREADONLY (val,resultScaleMult) = $Tuple2(nil, fromX18(parseBigIntValue(val), resultScaleMult))
992994
993995
994996
995997 @Callable(i)
996998 func calcPriceBigIntWrapperREADONLY (prAmtX18,amAmtX18) = $Tuple2(nil, toString(calcPriceBigInt(parseBigIntValue(prAmtX18), parseBigIntValue(amAmtX18))))
997999
9981000
9991001
10001002 @Callable(i)
10011003 func estimatePutOperationWrapperREADONLY (txId58,slippageTolerance,inAmAssetAmt,inAmAssetId,inPrAssetAmt,inPrAssetId,userAddress,isEvaluate,emitLp) = $Tuple2(nil, estimatePutOperation(txId58, slippageTolerance, inAmAssetAmt, inAmAssetId, inPrAssetAmt, inPrAssetId, userAddress, isEvaluate, emitLp))
10021004
10031005
10041006
10051007 @Callable(i)
10061008 func estimateGetOperationWrapperREADONLY (txId58,pmtAssetId,pmtLpAmt,userAddress) = {
10071009 let res = estimateGetOperation(txId58, pmtAssetId, pmtLpAmt, addressFromStringValue(userAddress))
10081010 $Tuple2(nil, $Tuple10(res._1, res._2, res._3, res._4, res._5, res._6, res._7, toString(res._8), res._9, res._10))
10091011 }
10101012
10111013
10121014
10131015 @Callable(i)
10141016 func statsREADONLY () = {
10151017 let cfg = getPoolConfig()
10161018 let lpAssetId = fromBase58String(cfg[idxPoolLPAssetId])
10171019 let amtAssetId = cfg[idxAmtAssetId]
10181020 let priceAssetId = cfg[idxPriceAssetId]
10191021 let iAmtAssetId = cfg[idxIAmtAssetId]
10201022 let iPriceAssetId = cfg[idxIPriceAssetId]
10211023 let amtAssetDcm = parseIntValue(cfg[idxAmtAssetDcm])
10221024 let priceAssetDcm = parseIntValue(cfg[idxPriceAssetDcm])
10231025 let poolLPBalance = valueOrErrorMessage(assetInfo(lpAssetId), (("Asset " + toBase58String(lpAssetId)) + " doesn't exist")).quantity
10241026 let accAmtAssetBalance = getAccBalance(amtAssetId)
10251027 let accPriceAssetBalance = getAccBalance(priceAssetId)
10261028 let pricesList = if ((poolLPBalance == 0))
10271029 then [zeroBigInt, zeroBigInt, zeroBigInt]
10281030 else calcPrices(accAmtAssetBalance, accPriceAssetBalance, poolLPBalance)
10291031 let curPrice = 0
10301032 let lpAmtAssetShare = fromX18(pricesList[1], scale8)
10311033 let lpPriceAssetShare = fromX18(pricesList[2], scale8)
10321034 let poolWeight = value(getInteger(factoryContract, keyPoolWeight(toString(this))))
10331035 $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))
10341036 }
10351037
10361038
10371039
10381040 @Callable(i)
10391041 func evaluatePutByAmountAssetREADONLY (inAmAssetAmt) = {
10401042 let cfg = getPoolConfig()
10411043 let lpAssetId = fromBase58String(cfg[idxPoolLPAssetId])
10421044 let amAssetIdStr = cfg[idxAmtAssetId]
10431045 let amAssetId = fromBase58String(amAssetIdStr)
10441046 let prAssetIdStr = cfg[idxPriceAssetId]
10451047 let prAssetId = fromBase58String(prAssetIdStr)
10461048 let amtAssetDcm = parseIntValue(cfg[idxAmtAssetDcm])
10471049 let priceAssetDcm = parseIntValue(cfg[idxPriceAssetDcm])
10481050 let poolStatus = cfg[idxPoolStatus]
10491051 let poolLPBalance = valueOrErrorMessage(assetInfo(lpAssetId), (("Asset " + toBase58String(lpAssetId)) + " doesn't exist")).quantity
10501052 let accAmtAssetBalance = getAccBalance(amAssetIdStr)
10511053 let accPriceAssetBalance = getAccBalance(prAssetIdStr)
10521054 let amtAssetAmtX18 = toX18(accAmtAssetBalance, amtAssetDcm)
10531055 let priceAssetAmtX18 = toX18(accPriceAssetBalance, priceAssetDcm)
10541056 let curPriceX18 = if ((poolLPBalance == 0))
10551057 then zeroBigInt
10561058 else calcPriceBigInt(priceAssetAmtX18, amtAssetAmtX18)
10571059 let inAmAssetAmtX18 = toX18(inAmAssetAmt, amtAssetDcm)
10581060 let inPrAssetAmtX18 = fraction(inAmAssetAmtX18, curPriceX18, scale18)
10591061 let inPrAssetAmt = fromX18(inPrAssetAmtX18, priceAssetDcm)
10601062 let estPut = estimatePutOperation("", 500000, inAmAssetAmt, amAssetId, inPrAssetAmt, prAssetId, "", true, false)
10611063 let calcLpAmt = estPut._1
10621064 let curPriceCalc = estPut._3
10631065 let amBalance = estPut._4
10641066 let prBalance = estPut._5
10651067 let lpEmission = estPut._6
10661068 $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))
10671069 }
10681070
10691071
10701072
10711073 @Callable(i)
10721074 func evaluatePutByPriceAssetREADONLY (inPrAssetAmt) = {
10731075 let cfg = getPoolConfig()
10741076 let lpAssetId = fromBase58String(cfg[idxPoolLPAssetId])
10751077 let amAssetIdStr = cfg[idxAmtAssetId]
10761078 let amAssetId = fromBase58String(amAssetIdStr)
10771079 let prAssetIdStr = cfg[idxPriceAssetId]
10781080 let prAssetId = fromBase58String(prAssetIdStr)
10791081 let amtAssetDcm = parseIntValue(cfg[idxAmtAssetDcm])
10801082 let priceAssetDcm = parseIntValue(cfg[idxPriceAssetDcm])
10811083 let poolStatus = cfg[idxPoolStatus]
10821084 let poolLPBalance = valueOrErrorMessage(assetInfo(lpAssetId), (("Asset " + toBase58String(lpAssetId)) + " doesn't exist")).quantity
10831085 let amBalanceRaw = getAccBalance(amAssetIdStr)
10841086 let prBalanceRaw = getAccBalance(prAssetIdStr)
10851087 let amBalanceRawX18 = toX18(amBalanceRaw, amtAssetDcm)
10861088 let prBalanceRawX18 = toX18(prBalanceRaw, priceAssetDcm)
10871089 let curPriceX18 = if ((poolLPBalance == 0))
10881090 then zeroBigInt
10891091 else calcPriceBigInt(prBalanceRawX18, amBalanceRawX18)
10901092 let inPrAssetAmtX18 = toX18(inPrAssetAmt, priceAssetDcm)
10911093 let inAmAssetAmtX18 = fraction(inPrAssetAmtX18, scale18, curPriceX18)
10921094 let inAmAssetAmt = fromX18(inAmAssetAmtX18, amtAssetDcm)
10931095 let estPut = estimatePutOperation("", 500000, inAmAssetAmt, amAssetId, inPrAssetAmt, prAssetId, "", true, false)
10941096 let calcLpAmt = estPut._1
10951097 let curPriceCalc = estPut._3
10961098 let amBalance = estPut._4
10971099 let prBalance = estPut._5
10981100 let lpEmission = estPut._6
10991101 $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))
11001102 }
11011103
11021104
11031105
11041106 @Callable(i)
11051107 func evaluateGetREADONLY (paymentLpAssetId,paymentLpAmt) = {
11061108 let res = estimateGetOperation("", paymentLpAssetId, paymentLpAmt, this)
11071109 let outAmAmt = res._1
11081110 let outPrAmt = res._2
11091111 let amBalance = res._5
11101112 let prBalance = res._6
11111113 let lpEmission = res._7
11121114 let curPrice = res._8
11131115 let poolStatus = parseIntValue(res._9)
11141116 $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))
11151117 }
11161118
11171119
11181120 @Verifier(tx)
11191121 func verify () = {
11201122 let targetPublicKey = match managerPublicKeyOrUnit() {
11211123 case pk: ByteVector =>
11221124 pk
11231125 case _: Unit =>
11241126 tx.senderPublicKey
11251127 case _ =>
11261128 throw("Match error")
11271129 }
11281130 match tx {
11291131 case order: Order =>
11301132 let matcherPub = getMatcherPubOrFail()
11311133 let orderValid = validateMatcherOrderAllowed(order)
11321134 let senderValid = sigVerify(order.bodyBytes, order.proofs[0], order.senderPublicKey)
11331135 let matcherValid = sigVerify(order.bodyBytes, order.proofs[1], matcherPub)
11341136 if (if (if (orderValid)
11351137 then senderValid
11361138 else false)
11371139 then matcherValid
11381140 else false)
11391141 then true
11401142 else throwOrderError(orderValid, senderValid, matcherValid)
11411143 case s: SetScriptTransaction =>
11421144 let newHash = blake2b256(value(s.script))
11431145 let allowedHash = fromBase64String(value(getString(factoryContract, keyAllowedLpScriptHash())))
11441146 let currentHash = scriptHash(this)
11451147 if (if ((allowedHash == newHash))
11461148 then (currentHash != newHash)
11471149 else false)
11481150 then true
11491151 else sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey)
11501152 case _ =>
11511153 sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey)
11521154 }
11531155 }
11541156

github/deemru/w8io/026f985 
110.73 ms