tx · AVqsmwLuTfVwoTu784h3RwAbShFM6czGY2PtudSBfZt1

3MqjK2SfnefGxk4fiaeRHZaxg6wHAZ6tbd2:  -0.03000000 Waves

2022.11.17 18:16 [2321281] smart account 3MqjK2SfnefGxk4fiaeRHZaxg6wHAZ6tbd2 > SELF 0.00000000 Waves

{ "type": 13, "id": "AVqsmwLuTfVwoTu784h3RwAbShFM6czGY2PtudSBfZt1", "fee": 3000000, "feeAssetId": null, "timestamp": 1668698178213, "version": 1, "sender": "3MqjK2SfnefGxk4fiaeRHZaxg6wHAZ6tbd2", "senderPublicKey": "4eCcSEdDzsn3CVYwcVcGA3AbMH8prX8N1GVuLubC57iy", "proofs": [ "Ntt7M2fwBfhbH18ME6EuvGV1Z8QYQRu94KJPthrBUw2We4yEMYvjB7nNvgtpW1UBRRN9fnLbuGSEF2mkJAjNvrn" ], "script": "base64:BgK8JwgCEgMKAQgSABIECgIBBBIDCgEBEgQKAgEEEgQKAggBEgQKAggBEgQKAggBEgUKAwEIARIAEgQKAgEBEgMKAQESBQoDAQEBEgQKAggIEgASAwoBCBIFCgMBAQESBAoCAQESBAoCCAESBAoCCAgSCwoJCAEBAgECCAQEEgYKBAgIAQgSABIDCgEBEgMKAQESBAoCCAEiCmxQZGVjaW1hbHMiBnNjYWxlOCIMc2NhbGU4QmlnSW50IgdzY2FsZTE4Igp6ZXJvQmlnSW50IgRiaWcwIgRiaWcxIgRiaWcyIgt3YXZlc1N0cmluZyIDU0VQIgpQb29sQWN0aXZlIg9Qb29sUHV0RGlzYWJsZWQiE1Bvb2xNYXRjaGVyRGlzYWJsZWQiDFBvb2xTaHV0ZG93biIOaWR4UG9vbEFkZHJlc3MiDWlkeFBvb2xTdGF0dXMiEGlkeFBvb2xMUEFzc2V0SWQiDWlkeEFtdEFzc2V0SWQiD2lkeFByaWNlQXNzZXRJZCIOaWR4QW10QXNzZXREY20iEGlkeFByaWNlQXNzZXREY20iDmlkeElBbXRBc3NldElkIhBpZHhJUHJpY2VBc3Nld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XMDAwkAAAIFAmZOBQJmTQkBAiE9AgUCZk8FAmZNBwYJAPQDAwgFAmZJCWJvZHlCeXRlcwkAkQMCCAUCZkkGcHJvb2ZzAAAFAmZLCQD0AwMIBQJmSQlib2R5Qnl0ZXMJAJEDAggFAmZJBnByb29mcwAABQJmS0Bl1TM=", "chainId": 84, "height": 2321281, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 5B818rJQHokxFgdhyoixEpB2PhWqMDCK2BDuVLmcsJXE Next: 4L5a6Ar2jCzqLwn5Gb69QVFcNB3MSKtzMXdC28uq6mEQ 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(10, 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 $t075447710 = poolConfigParsed
187187
188188 let cfgPoolAddress = $t075447710._1
189189
190190 let cfgPoolStatus = $t075447710._2
191191
192192 let cfgLpAssetId = $t075447710._3
193193
194194 let cfgAmountAssetId = $t075447710._4
195195
196196 let cfgPriceAssetId = $t075447710._5
197197
198198 let cfgAmountAssetDecimals = $t075447710._6
199199
200200 let cfgPriceAssetDecimals = $t075447710._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 amountBalanceRaw = getAccBalance(assetIdToString(cfgAmountAssetId))
471471 let priceBalanceRaw = getAccBalance(assetIdToString(cfgPriceAssetId))
472472 let paymentInAmountAsset = if ((paymentAssetId == cfgAmountAssetId))
473473 then true
474474 else if ((paymentAssetId == cfgPriceAssetId))
475475 then false
476476 else throwErr("invalid asset")
477477 let $t02257122864 = if (isEval)
478478 then $Tuple2(amountBalanceRaw, priceBalanceRaw)
479479 else if (paymentInAmountAsset)
480480 then $Tuple2((amountBalanceRaw - paymentAmountRaw), priceBalanceRaw)
481481 else $Tuple2(amountBalanceRaw, (priceBalanceRaw - paymentAmountRaw))
482482 let amountBalanceOld = $t02257122864._1
483483 let priceBalanceOld = $t02257122864._2
484484 let $t02286823017 = if (paymentInAmountAsset)
485485 then $Tuple2(paymentAmountRaw, 0)
486486 else $Tuple2(0, paymentAmountRaw)
487487 let amountAssetAmountRaw = $t02286823017._1
488488 let priceAssetAmountRaw = $t02286823017._2
489489 let amountAssetAmount = takeFee(amountAssetAmountRaw)._1
490490 let priceAssetAmount = takeFee(priceAssetAmountRaw)._1
491491 let $t02313923198 = takeFee(paymentAmountRaw)
492492 let paymentAmount = $t02313923198._1
493493 let feeAmount = $t02313923198._2
494494 let amountBalanceNew = (amountBalanceOld + amountAssetAmount)
495495 let priceBalanceNew = (priceBalanceOld + priceAssetAmount)
496496 let priceNewX18 = calcPriceBigInt(toX18(priceBalanceNew, cfgPriceAssetDecimals), toX18(amountBalanceNew, cfgAmountAssetDecimals))
497497 let priceNew = fromX18(priceNewX18, scale8)
498498 let paymentBalance = if (paymentInAmountAsset)
499499 then amountBalanceOld
500500 else priceBalanceOld
501501 let paymentBalanceBigInt = toBigInt(paymentBalance)
502502 let supplyBigInt = toBigInt(valueOrErrorMessage(assetInfo(cfgLpAssetId), (("asset " + toBase58String(cfgLpAssetId)) + " doesn't exist")).quantity)
503503 let chechSupply = if ((supplyBigInt > big0))
504504 then true
505505 else throwErr("initial deposit requires all coins")
506506 if ((chechSupply == chechSupply))
507507 then {
508508 let depositBigInt = toBigInt(paymentAmount)
509509 let issueAmount = max([0, toInt(((supplyBigInt * (sqrtBigInt((scale18 + ((depositBigInt * scale18) / paymentBalanceBigInt)), 18, 18, DOWN) - scale18)) / scale18))])
510510 let commonState = if (isEval)
511511 then nil
512512 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))]
513513 let priceOldX18 = calcPriceBigInt(toX18(priceBalanceOld, cfgPriceAssetDecimals), toX18(amountBalanceOld, cfgAmountAssetDecimals))
514514 let priceOld = fromX18(priceOldX18, scale8)
515515 let loss = {
516516 let $t02467524842 = if (paymentInAmountAsset)
517517 then $Tuple2(amountAssetAmountRaw, amountBalanceOld)
518518 else $Tuple2(priceAssetAmountRaw, priceBalanceOld)
519519 let amount = $t02467524842._1
520520 let balance = $t02467524842._2
521521 let issueAmountBoth = toInt(fraction(supplyBigInt, toBigInt((amount / 2)), toBigInt(balance)))
522522 fraction((issueAmount - issueAmountBoth), scale8, issueAmountBoth)
523523 }
524524 $Tuple4(issueAmount, commonState, feeAmount, loss)
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 checks = [if ((paymentAssetId == cfgLpAssetId))
533533 then true
534534 else throwErr("invalid lp asset")]
535535 if ((checks == checks))
536536 then {
537537 let outInAmountAsset = if ((outAssetId == cfgAmountAssetId))
538538 then true
539539 else if ((outAssetId == cfgPriceAssetId))
540540 then false
541541 else throwErr("invalid asset")
542542 let balanceBigInt = if (outInAmountAsset)
543543 then toBigInt(getAccBalance(assetIdToString(cfgAmountAssetId)))
544544 else toBigInt(getAccBalance(assetIdToString(cfgPriceAssetId)))
545545 let amBalanceOld = getAccBalance(assetIdToString(cfgAmountAssetId))
546546 let prBalanceOld = getAccBalance(assetIdToString(cfgPriceAssetId))
547547 let outBalance = if (outInAmountAsset)
548548 then amBalanceOld
549549 else prBalanceOld
550550 let outBalanceBigInt = toBigInt(outBalance)
551551 let supplyBigInt = toBigInt(valueOrErrorMessage(assetInfo(cfgLpAssetId), (("asset " + toBase58String(cfgLpAssetId)) + " doesn't exist")).quantity)
552552 let redeemedBigInt = toBigInt(paymentAmount)
553553 let amountRaw = max([0, toInt(((balanceBigInt * (scale18 - pow((scale18 - ((redeemedBigInt * scale18) / supplyBigInt)), 18, big2, 0, 18, DOWN))) / scale18))])
554554 let $t02642226472 = takeFee(amountRaw)
555555 let totalAmount = $t02642226472._1
556556 let feeAmount = $t02642226472._2
557557 let $t02647626702 = if (outInAmountAsset)
558558 then $Tuple4(totalAmount, 0, (amBalanceOld - amountRaw), prBalanceOld)
559559 else $Tuple4(0, totalAmount, amBalanceOld, (prBalanceOld - amountRaw))
560560 let outAmAmount = $t02647626702._1
561561 let outPrAmount = $t02647626702._2
562562 let amBalanceNew = $t02647626702._3
563563 let prBalanceNew = $t02647626702._4
564564 let priceNewX18 = calcPriceBigInt(toX18(prBalanceNew, cfgPriceAssetDecimals), toX18(amBalanceNew, cfgAmountAssetDecimals))
565565 let priceNew = fromX18(priceNewX18, scale8)
566566 let commonState = if (isEval)
567567 then nil
568568 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)]
569569 let priceOldX18 = calcPriceBigInt(toX18(prBalanceOld, cfgPriceAssetDecimals), toX18(amBalanceOld, cfgAmountAssetDecimals))
570570 let priceOld = fromX18(priceOldX18, scale8)
571571 let loss = {
572572 let amountBothInPaymentAsset = (toInt(fraction(balanceBigInt, redeemedBigInt, supplyBigInt)) * 2)
573573 fraction((totalAmount - amountBothInPaymentAsset), scale8, amountBothInPaymentAsset)
574574 }
575575 $Tuple4(totalAmount, commonState, feeAmount, loss)
576576 }
577577 else throw("Strict value is not equal to itself.")
578578 }
579579
580580
581581 func managerPublicKeyOrUnit () = match getString(mpk()) {
582582 case s: String =>
583583 fromBase58String(s)
584584 case _: Unit =>
585585 unit
586586 case _ =>
587587 throw("Match error")
588588 }
589589
590590
591591 func pendingManagerPublicKeyOrUnit () = match getString(pmpk()) {
592592 case s: String =>
593593 fromBase58String(s)
594594 case _: Unit =>
595595 unit
596596 case _ =>
597597 throw("Match error")
598598 }
599599
600600
601601 func isManager (i) = match managerPublicKeyOrUnit() {
602602 case pk: ByteVector =>
603603 (i.callerPublicKey == pk)
604604 case _: Unit =>
605605 (i.caller == this)
606606 case _ =>
607607 throw("Match error")
608608 }
609609
610610
611611 func mustManager (i) = {
612612 let pd = throw("Permission denied")
613613 match managerPublicKeyOrUnit() {
614614 case pk: ByteVector =>
615615 if ((i.callerPublicKey == pk))
616616 then true
617617 else pd
618618 case _: Unit =>
619619 if ((i.caller == this))
620620 then true
621621 else pd
622622 case _ =>
623623 throw("Match error")
624624 }
625625 }
626626
627627
628628 @Callable(i)
629629 func setManager (pendingManagerPublicKey) = {
630630 let checkCaller = mustManager(i)
631631 if ((checkCaller == checkCaller))
632632 then {
633633 let checkManagerPublicKey = fromBase58String(pendingManagerPublicKey)
634634 if ((checkManagerPublicKey == checkManagerPublicKey))
635635 then [StringEntry(pmpk(), pendingManagerPublicKey)]
636636 else throw("Strict value is not equal to itself.")
637637 }
638638 else throw("Strict value is not equal to itself.")
639639 }
640640
641641
642642
643643 @Callable(i)
644644 func confirmManager () = {
645645 let pm = pendingManagerPublicKeyOrUnit()
646646 let hasPM = if (isDefined(pm))
647647 then true
648648 else throw("No pending manager")
649649 if ((hasPM == hasPM))
650650 then {
651651 let checkPM = if ((i.callerPublicKey == value(pm)))
652652 then true
653653 else throw("You are not pending manager")
654654 if ((checkPM == checkPM))
655655 then [StringEntry(mpk(), toBase58String(value(pm))), DeleteEntry(pmpk())]
656656 else throw("Strict value is not equal to itself.")
657657 }
658658 else throw("Strict value is not equal to itself.")
659659 }
660660
661661
662662
663663 @Callable(i)
664664 func put (slippageTolerance,shouldAutoStake) = if ((0 > slippageTolerance))
665665 then throw("Invalid slippageTolerance passed")
666666 else {
667667 let estPut = commonPut(i, slippageTolerance, true)
668668 let emitLpAmt = estPut._2
669669 let lpAssetId = estPut._7
670670 let state = estPut._9
671671 let amDiff = estPut._10
672672 let prDiff = estPut._11
673673 let amId = estPut._12
674674 let prId = estPut._13
675675 let emitInv = invoke(factoryContract, "emit", [emitLpAmt], nil)
676676 if ((emitInv == emitInv))
677677 then {
678678 let emitInvLegacy = match emitInv {
679679 case legacyFactoryContract: Address =>
680680 invoke(legacyFactoryContract, "emit", [emitLpAmt], nil)
681681 case _ =>
682682 unit
683683 }
684684 if ((emitInvLegacy == emitInvLegacy))
685685 then {
686686 let slippageAInv = if ((amDiff > 0))
687687 then invoke(slippageContract, "put", nil, [AttachedPayment(amId, amDiff)])
688688 else nil
689689 if ((slippageAInv == slippageAInv))
690690 then {
691691 let slippagePInv = if ((prDiff > 0))
692692 then invoke(slippageContract, "put", nil, [AttachedPayment(prId, prDiff)])
693693 else nil
694694 if ((slippagePInv == slippagePInv))
695695 then {
696696 let lpTransfer = if (shouldAutoStake)
697697 then {
698698 let slpStakeInv = invoke(stakingContract, "stake", nil, [AttachedPayment(lpAssetId, emitLpAmt)])
699699 if ((slpStakeInv == slpStakeInv))
700700 then nil
701701 else throw("Strict value is not equal to itself.")
702702 }
703703 else [ScriptTransfer(i.caller, emitLpAmt, lpAssetId)]
704704 (state ++ lpTransfer)
705705 }
706706 else throw("Strict value is not equal to itself.")
707707 }
708708 else throw("Strict value is not equal to itself.")
709709 }
710710 else throw("Strict value is not equal to itself.")
711711 }
712712 else throw("Strict value is not equal to itself.")
713713 }
714714
715715
716716
717717 @Callable(i)
718718 func putForFree (maxSlippage) = if ((0 > maxSlippage))
719719 then throw("Invalid value passed")
720720 else {
721721 let estPut = commonPut(i, maxSlippage, false)
722722 estPut._9
723723 }
724724
725725
726726
727727 @Callable(i)
728728 func putOneTkn (minOutAmount,autoStake) = {
729729 let isPoolOneTokenOperationsDisabled = {
730730 let @ = invoke(factoryContract, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
731731 if ($isInstanceOf(@, "Boolean"))
732732 then @
733733 else throw(($getType(@) + " couldn't be cast to Boolean"))
734734 }
735735 let isPutDisabled = if (if (if (isGlobalShutdown())
736736 then true
737737 else (cfgPoolStatus == PoolPutDisabled))
738738 then true
739739 else (cfgPoolStatus == PoolShutdown))
740740 then true
741741 else isPoolOneTokenOperationsDisabled
742742 let checks = [if (if (!(isPutDisabled))
743743 then true
744744 else isManager(i))
745745 then true
746746 else throwErr("put operation is blocked by admin"), if ((size(i.payments) == 1))
747747 then true
748748 else throwErr("exactly 1 payment are expected")]
749749 if ((checks == checks))
750750 then {
751751 let payment = i.payments[0]
752752 let paymentAssetId = payment.assetId
753753 let paymentAmountRaw = payment.amount
754754 let userAddress = i.caller
755755 let txId = i.transactionId
756756 let $t03160931739 = calcPutOneToken(paymentAmountRaw, paymentAssetId, userAddress, txId)
757757 if (($t03160931739 == $t03160931739))
758758 then {
759759 let bonus = $t03160931739._4
760760 let feeAmount = $t03160931739._3
761761 let commonState = $t03160931739._2
762762 let emitAmountEstimated = $t03160931739._1
763763 let emitAmount = if (if ((minOutAmount > 0))
764764 then (minOutAmount > emitAmountEstimated)
765765 else false)
766766 then throwErr(makeString(["amount to receive is less than ", toString(minOutAmount)], ""))
767767 else emitAmountEstimated
768768 let emitInv = emit(emitAmount)
769769 if ((emitInv == emitInv))
770770 then {
771771 let lpTransfer = if (autoStake)
772772 then {
773773 let stakeInv = invoke(stakingContract, "stake", nil, [AttachedPayment(cfgLpAssetId, emitAmount)])
774774 if ((stakeInv == stakeInv))
775775 then nil
776776 else throw("Strict value is not equal to itself.")
777777 }
778778 else [ScriptTransfer(i.caller, emitAmount, cfgLpAssetId)]
779779 let sendFee = if ((feeAmount > 0))
780780 then [ScriptTransfer(feeCollectorAddress, feeAmount, paymentAssetId)]
781781 else nil
782782 $Tuple2(((commonState ++ lpTransfer) ++ sendFee), emitAmount)
783783 }
784784 else throw("Strict value is not equal to itself.")
785785 }
786786 else throw("Strict value is not equal to itself.")
787787 }
788788 else throw("Strict value is not equal to itself.")
789789 }
790790
791791
792792
793793 @Callable(i)
794794 func putOneTknREADONLY (paymentAssetId,paymentAmountRaw) = {
795795 let $t03246832603 = calcPutOneToken(paymentAmountRaw, parseAssetId(paymentAssetId), unit, unit)
796796 let emitAmountEstimated = $t03246832603._1
797797 let commonState = $t03246832603._2
798798 let feeAmount = $t03246832603._3
799799 let bonus = $t03246832603._4
800800 $Tuple2(nil, $Tuple3(emitAmountEstimated, feeAmount, bonus))
801801 }
802802
803803
804804
805805 @Callable(i)
806806 func getOneTkn (outAssetIdStr,minOutAmount) = {
807807 let isPoolOneTokenOperationsDisabled = {
808808 let @ = invoke(factoryContract, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
809809 if ($isInstanceOf(@, "Boolean"))
810810 then @
811811 else throw(($getType(@) + " couldn't be cast to Boolean"))
812812 }
813813 let isGetDisabled = if (if (isGlobalShutdown())
814814 then true
815815 else (cfgPoolStatus == PoolShutdown))
816816 then true
817817 else isPoolOneTokenOperationsDisabled
818818 let checks = [if (if (!(isGetDisabled))
819819 then true
820820 else isManager(i))
821821 then true
822822 else throwErr("get operation is blocked by admin"), if ((size(i.payments) == 1))
823823 then true
824824 else throwErr("exactly 1 payment are expected")]
825825 if ((checks == checks))
826826 then {
827827 let outAssetId = parseAssetId(outAssetIdStr)
828828 let payment = i.payments[0]
829829 let paymentAssetId = payment.assetId
830830 let paymentAmount = payment.amount
831831 let userAddress = i.caller
832832 let txId = i.transactionId
833833 let $t03340833543 = calcGetOneToken(outAssetId, paymentAmount, paymentAssetId, userAddress, txId)
834834 if (($t03340833543 == $t03340833543))
835835 then {
836836 let bonus = $t03340833543._4
837837 let feeAmount = $t03340833543._3
838838 let commonState = $t03340833543._2
839839 let amountEstimated = $t03340833543._1
840840 let amount = if (if ((minOutAmount > 0))
841841 then (minOutAmount > amountEstimated)
842842 else false)
843843 then throwErr(makeString(["amount to receive is less than ", toString(minOutAmount)], ""))
844844 else amountEstimated
845845 let burnInv = invoke(factoryContract, "burn", [paymentAmount], [AttachedPayment(paymentAssetId, paymentAmount)])
846846 if ((burnInv == burnInv))
847847 then {
848848 let assetTransfer = [ScriptTransfer(userAddress, amount, outAssetId)]
849849 let sendFee = if ((feeAmount > 0))
850850 then [ScriptTransfer(feeCollectorAddress, feeAmount, outAssetId)]
851851 else nil
852852 $Tuple2(((commonState ++ assetTransfer) ++ sendFee), amount)
853853 }
854854 else throw("Strict value is not equal to itself.")
855855 }
856856 else throw("Strict value is not equal to itself.")
857857 }
858858 else throw("Strict value is not equal to itself.")
859859 }
860860
861861
862862
863863 @Callable(i)
864864 func getOneTknREADONLY (outAssetId,paymentAmount) = {
865865 let $t03417834316 = calcGetOneToken(parseAssetId(outAssetId), paymentAmount, cfgLpAssetId, unit, unit)
866866 let amountEstimated = $t03417834316._1
867867 let commonState = $t03417834316._2
868868 let feeAmount = $t03417834316._3
869869 let bonus = $t03417834316._4
870870 $Tuple2(nil, $Tuple3(amountEstimated, feeAmount, bonus))
871871 }
872872
873873
874874
875875 @Callable(i)
876876 func unstakeAndGetOneTkn (unstakeAmount,outAssetIdStr,minOutAmount) = {
877877 let isPoolOneTokenOperationsDisabled = {
878878 let @ = invoke(factoryContract, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
879879 if ($isInstanceOf(@, "Boolean"))
880880 then @
881881 else throw(($getType(@) + " couldn't be cast to Boolean"))
882882 }
883883 let isGetDisabled = if (if (isGlobalShutdown())
884884 then true
885885 else (cfgPoolStatus == PoolShutdown))
886886 then true
887887 else isPoolOneTokenOperationsDisabled
888888 let checks = [if (if (!(isGetDisabled))
889889 then true
890890 else isManager(i))
891891 then true
892892 else throwErr("get operation is blocked by admin"), if ((size(i.payments) == 0))
893893 then true
894894 else throwErr("no payments are expected")]
895895 if ((checks == checks))
896896 then {
897897 let outAssetId = parseAssetId(outAssetIdStr)
898898 let userAddress = i.caller
899899 let txId = i.transactionId
900900 let unstakeInv = invoke(stakingContract, "unstake", [toBase58String(cfgLpAssetId), unstakeAmount], nil)
901901 if ((unstakeInv == unstakeInv))
902902 then {
903903 let $t03514135271 = calcGetOneToken(outAssetId, unstakeAmount, cfgLpAssetId, userAddress, txId)
904904 let amountEstimated = $t03514135271._1
905905 let commonState = $t03514135271._2
906906 let feeAmount = $t03514135271._3
907907 let bonus = $t03514135271._4
908908 let amount = if (if ((minOutAmount > 0))
909909 then (minOutAmount > amountEstimated)
910910 else false)
911911 then throwErr(makeString(["amount to receive is less than ", toString(minOutAmount)], ""))
912912 else amountEstimated
913913 let burnInv = invoke(factoryContract, "burn", [unstakeAmount], [AttachedPayment(cfgLpAssetId, unstakeAmount)])
914914 if ((burnInv == burnInv))
915915 then {
916916 let assetTransfer = [ScriptTransfer(i.caller, amount, outAssetId)]
917917 let sendFee = if ((feeAmount > 0))
918918 then [ScriptTransfer(feeCollectorAddress, feeAmount, outAssetId)]
919919 else nil
920920 $Tuple2(((commonState ++ assetTransfer) ++ sendFee), amount)
921921 }
922922 else throw("Strict value is not equal to itself.")
923923 }
924924 else throw("Strict value is not equal to itself.")
925925 }
926926 else throw("Strict value is not equal to itself.")
927927 }
928928
929929
930930
931931 @Callable(i)
932932 func get () = {
933933 let res = commonGet(i)
934934 let outAmtAmt = res._1
935935 let outPrAmt = res._2
936936 let pmtAmt = res._3
937937 let pmtAssetId = res._4
938938 let state = res._5
939939 let burnLPAssetOnFactory = invoke(factoryContract, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
940940 if ((burnLPAssetOnFactory == burnLPAssetOnFactory))
941941 then state
942942 else throw("Strict value is not equal to itself.")
943943 }
944944
945945
946946
947947 @Callable(i)
948948 func getNoLess (noLessThenAmtAsset,noLessThenPriceAsset) = {
949949 let res = commonGet(i)
950950 let outAmAmt = res._1
951951 let outPrAmt = res._2
952952 let pmtAmt = res._3
953953 let pmtAssetId = res._4
954954 let state = res._5
955955 if ((noLessThenAmtAsset > outAmAmt))
956956 then throw(((("noLessThenAmtAsset failed: " + toString(outAmAmt)) + " < ") + toString(noLessThenAmtAsset)))
957957 else if ((noLessThenPriceAsset > outPrAmt))
958958 then throw(((("noLessThenPriceAsset failed: " + toString(outPrAmt)) + " < ") + toString(noLessThenPriceAsset)))
959959 else {
960960 let burnLPAssetOnFactory = invoke(factoryContract, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
961961 if ((burnLPAssetOnFactory == burnLPAssetOnFactory))
962962 then state
963963 else throw("Strict value is not equal to itself.")
964964 }
965965 }
966966
967967
968968
969969 @Callable(i)
970970 func unstakeAndGet (amount) = {
971971 let checkPayments = if ((size(i.payments) != 0))
972972 then throw("No payments are expected")
973973 else true
974974 if ((checkPayments == checkPayments))
975975 then {
976976 let cfg = getPoolConfig()
977977 let lpAssetId = fromBase58String(cfg[idxPoolLPAssetId])
978978 let unstakeInv = invoke(stakingContract, "unstake", [toBase58String(lpAssetId), amount], nil)
979979 if ((unstakeInv == unstakeInv))
980980 then {
981981 let res = estimateGetOperation(toBase58String(i.transactionId), toBase58String(lpAssetId), amount, i.caller)
982982 let poolStatus = parseIntValue(res._9)
983983 let state = res._10
984984 let checkPoolStatus = if (if (isGlobalShutdown())
985985 then true
986986 else (poolStatus == PoolShutdown))
987987 then throw(("Get operation is blocked by admin. Status = " + toString(poolStatus)))
988988 else true
989989 if ((checkPoolStatus == checkPoolStatus))
990990 then {
991991 let burnLPAssetOnFactory = invoke(factoryContract, "burn", [amount], [AttachedPayment(lpAssetId, amount)])
992992 if ((burnLPAssetOnFactory == burnLPAssetOnFactory))
993993 then state
994994 else throw("Strict value is not equal to itself.")
995995 }
996996 else throw("Strict value is not equal to itself.")
997997 }
998998 else throw("Strict value is not equal to itself.")
999999 }
10001000 else throw("Strict value is not equal to itself.")
10011001 }
10021002
10031003
10041004
10051005 @Callable(i)
10061006 func unstakeAndGetNoLess (unstakeAmount,noLessThenAmountAsset,noLessThenPriceAsset) = {
10071007 let isGetDisabled = if (isGlobalShutdown())
10081008 then true
10091009 else (cfgPoolStatus == PoolShutdown)
10101010 let checks = [if (!(isGetDisabled))
10111011 then true
10121012 else throw("get operation is blocked by admin"), if ((size(i.payments) == 0))
10131013 then true
10141014 else throw("no payments are expected")]
10151015 if ((checks == checks))
10161016 then {
10171017 let unstakeInv = invoke(stakingContract, "unstake", [toBase58String(cfgLpAssetId), unstakeAmount], nil)
10181018 if ((unstakeInv == unstakeInv))
10191019 then {
10201020 let res = estimateGetOperation(toBase58String(i.transactionId), toBase58String(cfgLpAssetId), unstakeAmount, i.caller)
10211021 let outAmAmt = res._1
10221022 let outPrAmt = res._2
10231023 let state = res._10
10241024 let checkAmounts = [if ((outAmAmt >= noLessThenAmountAsset))
10251025 then true
10261026 else throw(makeString(["amount asset amount to receive is less than ", toString(noLessThenAmountAsset)], "")), if ((outPrAmt >= noLessThenPriceAsset))
10271027 then true
10281028 else throw(makeString(["price asset amount to receive is less than ", toString(noLessThenPriceAsset)], ""))]
10291029 if ((checkAmounts == checkAmounts))
10301030 then {
10311031 let burnLPAssetOnFactory = invoke(factoryContract, "burn", [unstakeAmount], [AttachedPayment(cfgLpAssetId, unstakeAmount)])
10321032 if ((burnLPAssetOnFactory == burnLPAssetOnFactory))
10331033 then state
10341034 else throw("Strict value is not equal to itself.")
10351035 }
10361036 else throw("Strict value is not equal to itself.")
10371037 }
10381038 else throw("Strict value is not equal to itself.")
10391039 }
10401040 else throw("Strict value is not equal to itself.")
10411041 }
10421042
10431043
10441044
10451045 @Callable(i)
10461046 func activate (amtAssetStr,priceAssetStr) = if ((toString(i.caller) != toString(factoryContract)))
10471047 then throw("permissions denied")
10481048 else $Tuple2([StringEntry(aa(), amtAssetStr), StringEntry(pa(), priceAssetStr)], "success")
10491049
10501050
10511051
10521052 @Callable(i)
10531053 func getPoolConfigWrapperREADONLY () = $Tuple2(nil, getPoolConfig())
10541054
10551055
10561056
10571057 @Callable(i)
10581058 func getAccBalanceWrapperREADONLY (assetId) = $Tuple2(nil, getAccBalance(assetId))
10591059
10601060
10611061
10621062 @Callable(i)
10631063 func calcPricesWrapperREADONLY (amAmt,prAmt,lpAmt) = {
10641064 let prices = calcPrices(amAmt, prAmt, lpAmt)
10651065 $Tuple2(nil, [toString(prices[0]), toString(prices[1]), toString(prices[2])])
10661066 }
10671067
10681068
10691069
10701070 @Callable(i)
10711071 func toX18WrapperREADONLY (origVal,origScaleMult) = $Tuple2(nil, toString(toX18(origVal, origScaleMult)))
10721072
10731073
10741074
10751075 @Callable(i)
10761076 func fromX18WrapperREADONLY (val,resultScaleMult) = $Tuple2(nil, fromX18(parseBigIntValue(val), resultScaleMult))
10771077
10781078
10791079
10801080 @Callable(i)
10811081 func calcPriceBigIntWrapperREADONLY (prAmtX18,amAmtX18) = $Tuple2(nil, toString(calcPriceBigInt(parseBigIntValue(prAmtX18), parseBigIntValue(amAmtX18))))
10821082
10831083
10841084
10851085 @Callable(i)
10861086 func estimatePutOperationWrapperREADONLY (txId58,slippageTolerance,inAmAssetAmt,inAmAssetId,inPrAssetAmt,inPrAssetId,userAddress,isEvaluate,emitLp) = $Tuple2(nil, estimatePutOperation(txId58, slippageTolerance, inAmAssetAmt, inAmAssetId, inPrAssetAmt, inPrAssetId, userAddress, isEvaluate, emitLp))
10871087
10881088
10891089
10901090 @Callable(i)
10911091 func estimateGetOperationWrapperREADONLY (txId58,pmtAssetId,pmtLpAmt,userAddress) = {
10921092 let res = estimateGetOperation(txId58, pmtAssetId, pmtLpAmt, addressFromStringValue(userAddress))
10931093 $Tuple2(nil, $Tuple10(res._1, res._2, res._3, res._4, res._5, res._6, res._7, toString(res._8), res._9, res._10))
10941094 }
10951095
10961096
10971097
10981098 @Callable(i)
10991099 func statsREADONLY () = {
11001100 let cfg = getPoolConfig()
11011101 let lpAssetId = fromBase58String(cfg[idxPoolLPAssetId])
11021102 let amtAssetId = cfg[idxAmtAssetId]
11031103 let priceAssetId = cfg[idxPriceAssetId]
11041104 let iAmtAssetId = cfg[idxIAmtAssetId]
11051105 let iPriceAssetId = cfg[idxIPriceAssetId]
11061106 let amtAssetDcm = parseIntValue(cfg[idxAmtAssetDcm])
11071107 let priceAssetDcm = parseIntValue(cfg[idxPriceAssetDcm])
11081108 let poolLPBalance = valueOrErrorMessage(assetInfo(lpAssetId), (("Asset " + toBase58String(lpAssetId)) + " doesn't exist")).quantity
11091109 let accAmtAssetBalance = getAccBalance(amtAssetId)
11101110 let accPriceAssetBalance = getAccBalance(priceAssetId)
11111111 let pricesList = if ((poolLPBalance == 0))
11121112 then [zeroBigInt, zeroBigInt, zeroBigInt]
11131113 else calcPrices(accAmtAssetBalance, accPriceAssetBalance, poolLPBalance)
11141114 let curPrice = 0
11151115 let lpAmtAssetShare = fromX18(pricesList[1], scale8)
11161116 let lpPriceAssetShare = fromX18(pricesList[2], scale8)
11171117 let poolWeight = value(getInteger(factoryContract, keyPoolWeight(toString(this))))
11181118 $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))
11191119 }
11201120
11211121
11221122
11231123 @Callable(i)
11241124 func evaluatePutByAmountAssetREADONLY (inAmAssetAmt) = {
11251125 let cfg = getPoolConfig()
11261126 let lpAssetId = fromBase58String(cfg[idxPoolLPAssetId])
11271127 let amAssetIdStr = cfg[idxAmtAssetId]
11281128 let amAssetId = fromBase58String(amAssetIdStr)
11291129 let prAssetIdStr = cfg[idxPriceAssetId]
11301130 let prAssetId = fromBase58String(prAssetIdStr)
11311131 let amtAssetDcm = parseIntValue(cfg[idxAmtAssetDcm])
11321132 let priceAssetDcm = parseIntValue(cfg[idxPriceAssetDcm])
11331133 let poolStatus = cfg[idxPoolStatus]
11341134 let poolLPBalance = valueOrErrorMessage(assetInfo(lpAssetId), (("Asset " + toBase58String(lpAssetId)) + " doesn't exist")).quantity
11351135 let accAmtAssetBalance = getAccBalance(amAssetIdStr)
11361136 let accPriceAssetBalance = getAccBalance(prAssetIdStr)
11371137 let amtAssetAmtX18 = toX18(accAmtAssetBalance, amtAssetDcm)
11381138 let priceAssetAmtX18 = toX18(accPriceAssetBalance, priceAssetDcm)
11391139 let curPriceX18 = if ((poolLPBalance == 0))
11401140 then zeroBigInt
11411141 else calcPriceBigInt(priceAssetAmtX18, amtAssetAmtX18)
11421142 let inAmAssetAmtX18 = toX18(inAmAssetAmt, amtAssetDcm)
11431143 let inPrAssetAmtX18 = fraction(inAmAssetAmtX18, curPriceX18, scale18)
11441144 let inPrAssetAmt = fromX18(inPrAssetAmtX18, priceAssetDcm)
11451145 let estPut = estimatePutOperation("", 500000, inAmAssetAmt, amAssetId, inPrAssetAmt, prAssetId, "", true, false)
11461146 let calcLpAmt = estPut._1
11471147 let curPriceCalc = estPut._3
11481148 let amBalance = estPut._4
11491149 let prBalance = estPut._5
11501150 let lpEmission = estPut._6
11511151 $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))
11521152 }
11531153
11541154
11551155
11561156 @Callable(i)
11571157 func evaluatePutByPriceAssetREADONLY (inPrAssetAmt) = {
11581158 let cfg = getPoolConfig()
11591159 let lpAssetId = fromBase58String(cfg[idxPoolLPAssetId])
11601160 let amAssetIdStr = cfg[idxAmtAssetId]
11611161 let amAssetId = fromBase58String(amAssetIdStr)
11621162 let prAssetIdStr = cfg[idxPriceAssetId]
11631163 let prAssetId = fromBase58String(prAssetIdStr)
11641164 let amtAssetDcm = parseIntValue(cfg[idxAmtAssetDcm])
11651165 let priceAssetDcm = parseIntValue(cfg[idxPriceAssetDcm])
11661166 let poolStatus = cfg[idxPoolStatus]
11671167 let poolLPBalance = valueOrErrorMessage(assetInfo(lpAssetId), (("Asset " + toBase58String(lpAssetId)) + " doesn't exist")).quantity
11681168 let amBalanceRaw = getAccBalance(amAssetIdStr)
11691169 let prBalanceRaw = getAccBalance(prAssetIdStr)
11701170 let amBalanceRawX18 = toX18(amBalanceRaw, amtAssetDcm)
11711171 let prBalanceRawX18 = toX18(prBalanceRaw, priceAssetDcm)
11721172 let curPriceX18 = if ((poolLPBalance == 0))
11731173 then zeroBigInt
11741174 else calcPriceBigInt(prBalanceRawX18, amBalanceRawX18)
11751175 let inPrAssetAmtX18 = toX18(inPrAssetAmt, priceAssetDcm)
11761176 let inAmAssetAmtX18 = fraction(inPrAssetAmtX18, scale18, curPriceX18)
11771177 let inAmAssetAmt = fromX18(inAmAssetAmtX18, amtAssetDcm)
11781178 let estPut = estimatePutOperation("", 500000, inAmAssetAmt, amAssetId, inPrAssetAmt, prAssetId, "", true, false)
11791179 let calcLpAmt = estPut._1
11801180 let curPriceCalc = estPut._3
11811181 let amBalance = estPut._4
11821182 let prBalance = estPut._5
11831183 let lpEmission = estPut._6
11841184 $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))
11851185 }
11861186
11871187
11881188
11891189 @Callable(i)
11901190 func evaluateGetREADONLY (paymentLpAssetId,paymentLpAmt) = {
11911191 let res = estimateGetOperation("", paymentLpAssetId, paymentLpAmt, this)
11921192 let outAmAmt = res._1
11931193 let outPrAmt = res._2
11941194 let amBalance = res._5
11951195 let prBalance = res._6
11961196 let lpEmission = res._7
11971197 let curPrice = res._8
11981198 let poolStatus = parseIntValue(res._9)
11991199 $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))
12001200 }
12011201
12021202
12031203 @Verifier(tx)
12041204 func verify () = {
12051205 let targetPublicKey = match managerPublicKeyOrUnit() {
12061206 case pk: ByteVector =>
12071207 pk
12081208 case _: Unit =>
12091209 tx.senderPublicKey
12101210 case _ =>
12111211 throw("Match error")
12121212 }
12131213 match tx {
12141214 case order: Order =>
12151215 let matcherPub = getMatcherPubOrFail()
12161216 let orderValid = validateMatcherOrderAllowed(order)
12171217 let senderValid = sigVerify(order.bodyBytes, order.proofs[0], order.senderPublicKey)
12181218 let matcherValid = sigVerify(order.bodyBytes, order.proofs[1], matcherPub)
12191219 if (if (if (orderValid)
12201220 then senderValid
12211221 else false)
12221222 then matcherValid
12231223 else false)
12241224 then true
12251225 else throwOrderError(orderValid, senderValid, matcherValid)
12261226 case s: SetScriptTransaction =>
12271227 let newHash = blake2b256(value(s.script))
12281228 let allowedHash = fromBase64String(value(getString(factoryContract, keyAllowedLpScriptHash())))
12291229 let currentHash = scriptHash(this)
12301230 if (if ((allowedHash == newHash))
12311231 then (currentHash != newHash)
12321232 else false)
12331233 then true
12341234 else sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey)
12351235 case _ =>
12361236 sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey)
12371237 }
12381238 }
12391239

github/deemru/w8io/026f985 
79.57 ms