tx · DjWqCXDs2PxEJ9e3uhkY8cktU6etxhZnZFam6DtZ7JxY

3N3Z7gchiV3BnVbnBxxbA8mzQtHVtAiJXoK:  -0.03600000 Waves

2023.01.19 12:39 [2411639] smart account 3N3Z7gchiV3BnVbnBxxbA8mzQtHVtAiJXoK > SELF 0.00000000 Waves

{ "type": 13, "id": "DjWqCXDs2PxEJ9e3uhkY8cktU6etxhZnZFam6DtZ7JxY", "fee": 3600000, "feeAssetId": null, "timestamp": 1674121195072, "version": 1, "sender": "3N3Z7gchiV3BnVbnBxxbA8mzQtHVtAiJXoK", "senderPublicKey": "eJ2g5D64ACno4HGhPaYy876FpMDrsDdePwmBzJUuYgk", "proofs": [ "2W2y5v2X3ppUeyfjfEXJzZhjD76vKRL4x6S4QDWc2k9xs7wyG9kuWQRmUEReN1fHFdd9odqFK3BCE8DHdc2V55z" ], "script": "base64:BgKsLQgCEgMKAQgSABIECgIBBBIDCgEBEgQKAgEEEgQKAggBEgQKAggBEgQKAggBEgUKAwEIARIAEgQKAgEBEgMKAQESBQoDAQEBEgQKAggIEgASABIDCgEIEgUKAwEBARIECgIBARIECgIIARIECgIICBILCgkIAQECAQIIBAQSBgoECAgBCBIAEgMKAQESAwoBARIECgIIASIKbFBkZWNpbWFscyIGc2NhbGU4IgxzY2FsZThCaWdJbnQiB3NjYWxlMTgiCnplcm9CaWdJbnQiBGJpZzAiBGJpZzEiBGJpZzIiC3dhdmVzU3RyaW5nIgNTRVAiClBvb2xBY3RpdmUiD1Bvb2xQdXREaXNhYmxlZCITUG9vbE1hdGNoZXJEaXNhYmxlZCIMUG9vbFNodXRkb3duIg5pZHhQb29sQWRkcmVzcyINaWR4UG9vbFN0YXR1cyIQaWR4UG9vbExQQXNzZXRJZCINaWR4QW10QXNzZXRJZCIPaWR4UHJpY2VBc3NldElkIg5pZHhBbXRBc3NldERjbSIQaWR4UHJpY2VBc3NldERjbSIOaWR4SUFtdEFzc2V0SWQiEGlkeElQcmljZUFzc2V0SWQiDWlke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2VuZGVyUHVibGljS2V5CQACAQILTWF0Y2ggZXJyb3IEAmRRBQJnRAMJAAECBQJkUQIFT3JkZXIEAmR2BQJkUQQCZ0cJAQJhUgAEAmFCCQECZHUBBQJkdgQCYUMJAPQDAwgFAmR2CWJvZHlCeXRlcwkAkQMCCAUCZHYGcHJvb2ZzAAAIBQJkdg9zZW5kZXJQdWJsaWNLZXkEAmFECQD0AwMIBQJkdglib2R5Qnl0ZXMJAJEDAggFAmR2BnByb29mcwABBQJnRwMDAwUCYUIFAmFDBwUCYUQHBgkBAmFBAwUCYUIFAmFDBQJhRAMJAAECBQJkUQIUU2V0U2NyaXB0VHJhbnNhY3Rpb24EAmVVBQJkUQQCZ0gJAPYDAQkBBXZhbHVlAQgFAmVVBnNjcmlwdAQCZ0kJANsEAQkBBXZhbHVlAQkAnQgCBQJhTAkBAmF5AAQCZ0oJAPEHAQUEdGhpcwMDCQAAAgUCZ0kFAmdICQECIT0CBQJnSgUCZ0gHBgkA9AMDCAUCZ0QJYm9keUJ5dGVzCQCRAwIIBQJnRAZwcm9vZnMAAAUCZ0YJAPQDAwgFAmdECWJvZHlCeXRlcwkAkQMCCAUCZ0QGcHJvb2ZzAAAFAmdGigMyEw==", "chainId": 84, "height": 2411639, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: D952AU4LNHktShQ5kYsNodW5UNCQiHvcuBCi7mb28wz Next: 8azTB2nQb8URoY8V4D1gCNS1fQpLHugLfeYDFrBptM8o 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 fromX18Round (val,resultScaleMult,round) = toInt(fraction(val, toBigInt(resultScaleMult), scale18, round))
6969
7070
7171 func toScale (amt,resScale,curScale) = fraction(amt, resScale, curScale)
7272
7373
7474 func abs (val) = if ((0 > val))
7575 then -(val)
7676 else val
7777
7878
7979 func absBigInt (val) = if ((zeroBigInt > val))
8080 then -(val)
8181 else val
8282
8383
8484 func fc () = "%s__factoryContract"
8585
8686
8787 func mpk () = "%s__managerPublicKey"
8888
8989
9090 func pmpk () = "%s__pendingManagerPublicKey"
9191
9292
9393 func pl () = "%s%s__price__last"
9494
9595
9696 func ph (h,timestamp) = makeString(["%s%s%d%d__price__history", toString(h), toString(timestamp)], SEP)
9797
9898
9999 func pau (userAddress,txId) = ((("%s%s%s__P__" + userAddress) + "__") + txId)
100100
101101
102102 func gau (userAddress,txId) = ((("%s%s%s__G__" + userAddress) + "__") + txId)
103103
104104
105105 func aa () = "%s__amountAsset"
106106
107107
108108 func pa () = "%s__priceAsset"
109109
110110
111111 let keyFee = "%s__fee"
112112
113113 let feeDefault = fraction(10, scale8, 10000)
114114
115115 let fee = valueOrElse(getInteger(this, keyFee), feeDefault)
116116
117117 let keyKLp = makeString(["%s", "kLp"], SEP)
118118
119119 let keyKLpRefreshedHeight = makeString(["%s", "kLpRefreshedHeight"], SEP)
120120
121121 let keyKLpRefreshDelay = makeString(["%s", "refreshKLpDelay"], SEP)
122122
123123 let kLpRefreshDelayDefault = 30
124124
125125 let kLpRefreshDelay = valueOrElse(getInteger(this, keyKLpRefreshDelay), kLpRefreshDelayDefault)
126126
127127 func keyFactoryConfig () = "%s__factoryConfig"
128128
129129
130130 func keyMatcherPub () = "%s%s__matcher__publicKey"
131131
132132
133133 func keyMappingPoolContractAddressToPoolAssets (poolContractAddress) = (("%s%s%s__" + poolContractAddress) + "__mappings__poolContract2LpAsset")
134134
135135
136136 func keyPoolConfig (iAmtAsset,iPriceAsset) = (((("%d%d%s__" + iAmtAsset) + "__") + iPriceAsset) + "__config")
137137
138138
139139 func keyMappingsBaseAsset2internalId (baseAssetStr) = ("%s%s%s__mappings__baseAsset2internalId__" + baseAssetStr)
140140
141141
142142 func keyAllPoolsShutdown () = "%s__shutdown"
143143
144144
145145 func keyPoolWeight (contractAddress) = ("%s%s__poolWeight__" + contractAddress)
146146
147147
148148 func keyAllowedLpScriptHash () = "%s__allowedLpScriptHash"
149149
150150
151151 let keyFeeCollectorAddress = "%s__feeCollectorAddress"
152152
153153 func throwOrderError (orderValid,senderValid,matcherValid) = throw(((((("order validation failed: orderValid=" + toString(orderValid)) + " senderValid=") + toString(senderValid)) + " matcherValid=") + toString(matcherValid)))
154154
155155
156156 func getStringOrFail (address,key) = valueOrErrorMessage(getString(address, key), makeString(["mandatory ", toString(address), ".", key, " is not defined"], ""))
157157
158158
159159 func getIntOrFail (address,key) = valueOrErrorMessage(getInteger(address, key), makeString(["mandatory ", toString(address), ".", key, " is not defined"], ""))
160160
161161
162162 func throwErr (msg) = throw(makeString(["lp.ride:", msg], " "))
163163
164164
165165 func fmtErr (msg) = makeString(["lp.ride:", msg], " ")
166166
167167
168168 let factoryContract = addressFromStringValue(getStringOrFail(this, fc()))
169169
170170 let feeCollectorAddress = addressFromStringValue(getStringOrFail(factoryContract, keyFeeCollectorAddress))
171171
172172 let inFee = {
173173 let @ = invoke(factoryContract, "getInFeeREADONLY", [toString(this)], nil)
174174 if ($isInstanceOf(@, "Int"))
175175 then @
176176 else throw(($getType(@) + " couldn't be cast to Int"))
177177 }
178178
179179 let outFee = {
180180 let @ = invoke(factoryContract, "getOutFeeREADONLY", [toString(this)], nil)
181181 if ($isInstanceOf(@, "Int"))
182182 then @
183183 else throw(($getType(@) + " couldn't be cast to Int"))
184184 }
185185
186186 func isGlobalShutdown () = valueOrElse(getBoolean(factoryContract, keyAllPoolsShutdown()), false)
187187
188188
189189 func getMatcherPubOrFail () = fromBase58String(getStringOrFail(factoryContract, keyMatcherPub()))
190190
191191
192192 func getPoolConfig () = {
193193 let amtAsset = getStringOrFail(this, aa())
194194 let priceAsset = getStringOrFail(this, pa())
195195 let iPriceAsset = getIntOrFail(factoryContract, keyMappingsBaseAsset2internalId(priceAsset))
196196 let iAmtAsset = getIntOrFail(factoryContract, keyMappingsBaseAsset2internalId(amtAsset))
197197 split(getStringOrFail(factoryContract, keyPoolConfig(toString(iAmtAsset), toString(iPriceAsset))), SEP)
198198 }
199199
200200
201201 func parseAssetId (input) = if ((input == wavesString))
202202 then unit
203203 else fromBase58String(input)
204204
205205
206206 func assetIdToString (input) = if ((input == unit))
207207 then wavesString
208208 else toBase58String(value(input))
209209
210210
211211 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]))
212212
213213
214214 let poolConfigParsed = parsePoolConfig(getPoolConfig())
215215
216216 let $t082438409 = poolConfigParsed
217217
218218 let cfgPoolAddress = $t082438409._1
219219
220220 let cfgPoolStatus = $t082438409._2
221221
222222 let cfgLpAssetId = $t082438409._3
223223
224224 let cfgAmountAssetId = $t082438409._4
225225
226226 let cfgPriceAssetId = $t082438409._5
227227
228228 let cfgAmountAssetDecimals = $t082438409._6
229229
230230 let cfgPriceAssetDecimals = $t082438409._7
231231
232232 func getFactoryConfig () = split(getStringOrFail(factoryContract, keyFactoryConfig()), SEP)
233233
234234
235235 let stakingContract = valueOrErrorMessage(addressFromString(getFactoryConfig()[idxFactoryStakingContract]), "incorrect staking address")
236236
237237 let slippageContract = valueOrErrorMessage(addressFromString(getFactoryConfig()[idxFactorySlippageContract]), "incorrect staking address")
238238
239239 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)
240240
241241
242242 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)
243243
244244
245245 func getAccBalance (assetId) = if ((assetId == "WAVES"))
246246 then wavesBalance(this).available
247247 else assetBalance(this, fromBase58String(assetId))
248248
249249
250250 func calcPriceBigInt (prAmtX18,amAmtX18) = fraction(prAmtX18, scale18, amAmtX18)
251251
252252
253253 func calcPriceBigIntRound (prAmtX18,amAmtX18,round) = fraction(prAmtX18, scale18, amAmtX18, round)
254254
255255
256256 func privateCalcPrice (amAssetDcm,prAssetDcm,amAmt,prAmt) = {
257257 let amtAssetAmtX18 = toX18(amAmt, amAssetDcm)
258258 let priceAssetAmtX18 = toX18(prAmt, prAssetDcm)
259259 calcPriceBigInt(priceAssetAmtX18, amtAssetAmtX18)
260260 }
261261
262262
263263 func calcPrices (amAmt,prAmt,lpAmt) = {
264264 let cfg = getPoolConfig()
265265 let amtAssetDcm = parseIntValue(cfg[idxAmtAssetDcm])
266266 let priceAssetDcm = parseIntValue(cfg[idxPriceAssetDcm])
267267 let priceX18 = privateCalcPrice(amtAssetDcm, priceAssetDcm, amAmt, prAmt)
268268 let amAmtX18 = toX18(amAmt, amtAssetDcm)
269269 let prAmtX18 = toX18(prAmt, priceAssetDcm)
270270 let lpAmtX18 = toX18(lpAmt, scale8)
271271 let lpPriceInAmAssetX18 = calcPriceBigInt(amAmtX18, lpAmtX18)
272272 let lpPriceInPrAssetX18 = calcPriceBigInt(prAmtX18, lpAmtX18)
273273 [priceX18, lpPriceInAmAssetX18, lpPriceInPrAssetX18]
274274 }
275275
276276
277277 func calculatePrices (amAmt,prAmt,lpAmt) = {
278278 let prices = calcPrices(amAmt, prAmt, lpAmt)
279279 [fromX18(prices[0], scale8), fromX18(prices[1], scale8), fromX18(prices[2], scale8)]
280280 }
281281
282282
283283 func estimateGetOperation (txId58,pmtAssetId,pmtLpAmt,userAddress) = {
284284 let cfg = getPoolConfig()
285285 let lpAssetId = cfg[idxPoolLPAssetId]
286286 let amAssetId = cfg[idxAmtAssetId]
287287 let prAssetId = cfg[idxPriceAssetId]
288288 let amAssetDcm = parseIntValue(cfg[idxAmtAssetDcm])
289289 let prAssetDcm = parseIntValue(cfg[idxPriceAssetDcm])
290290 let poolStatus = cfg[idxPoolStatus]
291291 let lpEmission = valueOrErrorMessage(assetInfo(fromBase58String(lpAssetId)), (("Asset " + lpAssetId) + " doesn't exist")).quantity
292292 if ((lpAssetId != pmtAssetId))
293293 then throw("Invalid asset passed.")
294294 else {
295295 let amBalance = getAccBalance(amAssetId)
296296 let amBalanceX18 = toX18(amBalance, amAssetDcm)
297297 let prBalance = getAccBalance(prAssetId)
298298 let prBalanceX18 = toX18(prBalance, prAssetDcm)
299299 let curPriceX18 = calcPriceBigInt(prBalanceX18, amBalanceX18)
300300 let curPrice = fromX18(curPriceX18, scale8)
301301 let pmtLpAmtX18 = toX18(pmtLpAmt, scale8)
302302 let lpEmissionX18 = toX18(lpEmission, scale8)
303303 let outAmAmtX18 = fraction(amBalanceX18, pmtLpAmtX18, lpEmissionX18)
304304 let outPrAmtX18 = fraction(prBalanceX18, pmtLpAmtX18, lpEmissionX18)
305305 let outAmAmt = fromX18Round(outAmAmtX18, amAssetDcm, FLOOR)
306306 let outPrAmt = fromX18Round(outPrAmtX18, prAssetDcm, FLOOR)
307307 let state = if ((txId58 == ""))
308308 then nil
309309 else [ScriptTransfer(userAddress, outAmAmt, if ((amAssetId == "WAVES"))
310310 then unit
311311 else fromBase58String(amAssetId)), ScriptTransfer(userAddress, outPrAmt, if ((prAssetId == "WAVES"))
312312 then unit
313313 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)]
314314 $Tuple10(outAmAmt, outPrAmt, amAssetId, prAssetId, amBalance, prBalance, lpEmission, curPriceX18, poolStatus, state)
315315 }
316316 }
317317
318318
319319 func estimatePutOperation (txId58,slippageTolerance,inAmAssetAmt,inAmAssetId,inPrAssetAmt,inPrAssetId,userAddress,isEvaluate,emitLp) = {
320320 let cfg = getPoolConfig()
321321 let lpAssetId = fromBase58String(cfg[idxPoolLPAssetId])
322322 let amAssetIdStr = cfg[idxAmtAssetId]
323323 let prAssetIdStr = cfg[idxPriceAssetId]
324324 let iAmtAssetId = cfg[idxIAmtAssetId]
325325 let iPriceAssetId = cfg[idxIPriceAssetId]
326326 let amtAssetDcm = parseIntValue(cfg[idxAmtAssetDcm])
327327 let priceAssetDcm = parseIntValue(cfg[idxPriceAssetDcm])
328328 let poolStatus = cfg[idxPoolStatus]
329329 let lpEmission = valueOrErrorMessage(assetInfo(lpAssetId), (("Asset " + toBase58String(lpAssetId)) + " doesn't exist")).quantity
330330 let inAmAssetIdStr = toBase58String(valueOrElse(inAmAssetId, fromBase58String("WAVES")))
331331 let inPrAssetIdStr = toBase58String(valueOrElse(inPrAssetId, fromBase58String("WAVES")))
332332 if (if ((amAssetIdStr != inAmAssetIdStr))
333333 then true
334334 else (prAssetIdStr != inPrAssetIdStr))
335335 then throw("Invalid amt or price asset passed.")
336336 else {
337337 let amBalance = if (isEvaluate)
338338 then getAccBalance(amAssetIdStr)
339339 else (getAccBalance(amAssetIdStr) - inAmAssetAmt)
340340 let prBalance = if (isEvaluate)
341341 then getAccBalance(prAssetIdStr)
342342 else (getAccBalance(prAssetIdStr) - inPrAssetAmt)
343343 let inAmAssetAmtX18 = toX18(inAmAssetAmt, amtAssetDcm)
344344 let inPrAssetAmtX18 = toX18(inPrAssetAmt, priceAssetDcm)
345345 let userPriceX18 = calcPriceBigInt(inPrAssetAmtX18, inAmAssetAmtX18)
346346 let amBalanceX18 = toX18(amBalance, amtAssetDcm)
347347 let prBalanceX18 = toX18(prBalance, priceAssetDcm)
348348 let res = if ((lpEmission == 0))
349349 then {
350350 let curPriceX18 = zeroBigInt
351351 let slippageX18 = zeroBigInt
352352 let lpAmtX18 = pow((inAmAssetAmtX18 * inPrAssetAmtX18), 0, toBigInt(5), 1, 0, DOWN)
353353 $Tuple5(fromX18(lpAmtX18, scale8), fromX18(inAmAssetAmtX18, amtAssetDcm), fromX18(inPrAssetAmtX18, priceAssetDcm), calcPriceBigInt((prBalanceX18 + inPrAssetAmtX18), (amBalanceX18 + inAmAssetAmtX18)), slippageX18)
354354 }
355355 else {
356356 let curPriceX18 = calcPriceBigInt(prBalanceX18, amBalanceX18)
357357 let slippageX18 = fraction(absBigInt((curPriceX18 - userPriceX18)), scale18, curPriceX18)
358358 let slippageToleranceX18 = toX18(slippageTolerance, scale8)
359359 if (if ((curPriceX18 != zeroBigInt))
360360 then (slippageX18 > slippageToleranceX18)
361361 else false)
362362 then throw(((("Price slippage " + toString(slippageX18)) + " exceeded the passed limit of ") + toString(slippageToleranceX18)))
363363 else {
364364 let lpEmissionX18 = toX18(lpEmission, scale8)
365365 let prViaAmX18 = fraction(inAmAssetAmtX18, calcPriceBigIntRound(prBalanceX18, amBalanceX18, CEILING), scale18, CEILING)
366366 let amViaPrX18 = fraction(inPrAssetAmtX18, scale18, calcPriceBigIntRound(prBalanceX18, amBalanceX18, FLOOR), CEILING)
367367 let expectedAmts = if ((prViaAmX18 > inPrAssetAmtX18))
368368 then $Tuple2(amViaPrX18, inPrAssetAmtX18)
369369 else $Tuple2(inAmAssetAmtX18, prViaAmX18)
370370 let expAmtAssetAmtX18 = expectedAmts._1
371371 let expPriceAssetAmtX18 = expectedAmts._2
372372 let lpAmtX18 = fraction(lpEmissionX18, expPriceAssetAmtX18, prBalanceX18, FLOOR)
373373 $Tuple5(fromX18Round(lpAmtX18, scale8, FLOOR), fromX18Round(expAmtAssetAmtX18, amtAssetDcm, CEILING), fromX18Round(expPriceAssetAmtX18, priceAssetDcm, CEILING), curPriceX18, slippageX18)
374374 }
375375 }
376376 let calcLpAmt = res._1
377377 let calcAmAssetPmt = res._2
378378 let calcPrAssetPmt = res._3
379379 let curPrice = fromX18(res._4, scale8)
380380 let slippageCalc = fromX18(res._5, scale8)
381381 if ((0 >= calcLpAmt))
382382 then throw("Invalid calculations. LP calculated is less than zero.")
383383 else {
384384 let emitLpAmt = if (!(emitLp))
385385 then 0
386386 else calcLpAmt
387387 let amDiff = (inAmAssetAmt - calcAmAssetPmt)
388388 let prDiff = (inPrAssetAmt - calcPrAssetPmt)
389389 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))]
390390 $Tuple13(calcLpAmt, emitLpAmt, curPrice, amBalance, prBalance, lpEmission, lpAssetId, poolStatus, commonState, amDiff, prDiff, inAmAssetId, inPrAssetId)
391391 }
392392 }
393393 }
394394
395395
396396 func calcKLp (amountBalance,priceBalance,lpEmission) = {
397397 let updatedKLp = fraction(pow((amountBalance * priceBalance), 0, toBigInt(5), 1, 18, DOWN), big1, lpEmission)
398398 if ((lpEmission == big0))
399399 then big0
400400 else updatedKLp
401401 }
402402
403403
404404 func calcCurrentKLp (amountAssetDelta,priceAssetDelta,lpAssetEmissionDelta) = {
405405 let amountAssetBalance = (toBigInt(getAccBalance(assetIdToString(cfgAmountAssetId))) - amountAssetDelta)
406406 let priceAssetBalance = (toBigInt(getAccBalance(assetIdToString(cfgPriceAssetId))) - priceAssetDelta)
407407 let lpAssetEmission = (toBigInt(value(assetInfo(cfgLpAssetId)).quantity) - lpAssetEmissionDelta)
408408 let currentKLp = calcKLp(amountAssetBalance, priceAssetBalance, lpAssetEmission)
409409 currentKLp
410410 }
411411
412412
413413 func refreshKLpInternal (amountAssetBalanceDelta,priceAssetBalanceDelta,lpAssetEmissionDelta) = {
414414 let amountAssetBalance = (getAccBalance(assetIdToString(cfgAmountAssetId)) + amountAssetBalanceDelta)
415415 let priceAssetBalance = (getAccBalance(assetIdToString(cfgPriceAssetId)) + priceAssetBalanceDelta)
416416 let lpAssetEmission = (value(assetInfo(cfgLpAssetId)).quantity + lpAssetEmissionDelta)
417417 let updatedKLp = calcKLp(toBigInt(amountAssetBalance), toBigInt(priceAssetBalance), toBigInt(lpAssetEmission))
418418 let actions = [IntegerEntry(keyKLpRefreshedHeight, height), StringEntry(keyKLp, toString(updatedKLp))]
419419 $Tuple2(actions, updatedKLp)
420420 }
421421
422422
423423 func validateUpdatedKLp (oldKLp,updatedKLp) = if ((updatedKLp >= oldKLp))
424424 then true
425425 else throwErr(makeString(["updated KLp lower than current KLp", toString(oldKLp), toString(updatedKLp)], " "))
426426
427427
428428 func validateMatcherOrderAllowed (order) = {
429429 let amountAssetAmount = order.amount
430430 let priceAssetAmount = fraction(order.amount, order.price, scale8, FLOOR)
431431 let $t02098621198 = if ((order.orderType == Buy))
432432 then $Tuple2(amountAssetAmount, -(priceAssetAmount))
433433 else $Tuple2(-(amountAssetAmount), priceAssetAmount)
434434 let amountAssetBalanceDelta = $t02098621198._1
435435 let priceAssetBalanceDelta = $t02098621198._2
436436 if (if (if (isGlobalShutdown())
437437 then true
438438 else (cfgPoolStatus == PoolMatcherDisabled))
439439 then true
440440 else (cfgPoolStatus == PoolShutdown))
441441 then throw("Exchange operations disabled")
442442 else if (if ((order.assetPair.amountAsset != cfgAmountAssetId))
443443 then true
444444 else (order.assetPair.priceAsset != cfgPriceAssetId))
445445 then throw("Wrong order assets.")
446446 else {
447447 let kLp = valueOrErrorMessage(parseBigInt(valueOrErrorMessage(getString(this, keyKLp), fmtErr("kLp is required"))), fmtErr("invalid kLp"))
448448 let $t02166921769 = refreshKLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
449449 let unusedActions = $t02166921769._1
450450 let kLpNew = $t02166921769._2
451451 let isOrderValid = (kLpNew >= kLp)
452452 isOrderValid
453453 }
454454 }
455455
456456
457457 func commonGet (i) = if ((size(i.payments) != 1))
458458 then throw("exactly 1 payment is expected")
459459 else {
460460 let pmt = value(i.payments[0])
461461 let pmtAssetId = value(pmt.assetId)
462462 let pmtAmt = pmt.amount
463463 let res = estimateGetOperation(toBase58String(i.transactionId), toBase58String(pmtAssetId), pmtAmt, i.caller)
464464 let outAmAmt = res._1
465465 let outPrAmt = res._2
466466 let poolStatus = parseIntValue(res._9)
467467 let state = res._10
468468 if (if (isGlobalShutdown())
469469 then true
470470 else (poolStatus == PoolShutdown))
471471 then throw(("Get operation is blocked by admin. Status = " + toString(poolStatus)))
472472 else $Tuple5(outAmAmt, outPrAmt, pmtAmt, pmtAssetId, state)
473473 }
474474
475475
476476 func commonPut (i,slippageTolerance,emitLp) = if ((size(i.payments) != 2))
477477 then throw("exactly 2 payments are expected")
478478 else {
479479 let amAssetPmt = value(i.payments[0])
480480 let prAssetPmt = value(i.payments[1])
481481 let estPut = estimatePutOperation(toBase58String(i.transactionId), slippageTolerance, amAssetPmt.amount, amAssetPmt.assetId, prAssetPmt.amount, prAssetPmt.assetId, toString(i.caller), false, emitLp)
482482 let poolStatus = parseIntValue(estPut._8)
483483 if (if (if (isGlobalShutdown())
484484 then true
485485 else (poolStatus == PoolPutDisabled))
486486 then true
487487 else (poolStatus == PoolShutdown))
488488 then throw(("Put operation is blocked by admin. Status = " + toString(poolStatus)))
489489 else estPut
490490 }
491491
492492
493493 func emit (amount) = {
494494 let emitInv = invoke(factoryContract, "emit", [amount], nil)
495495 if ((emitInv == emitInv))
496496 then {
497497 let emitInvLegacy = match emitInv {
498498 case legacyFactoryContract: Address =>
499499 invoke(legacyFactoryContract, "emit", [amount], nil)
500500 case _ =>
501501 unit
502502 }
503503 if ((emitInvLegacy == emitInvLegacy))
504504 then amount
505505 else throw("Strict value is not equal to itself.")
506506 }
507507 else throw("Strict value is not equal to itself.")
508508 }
509509
510510
511511 func takeFee (amount,fee) = {
512512 let feeAmount = if ((fee == 0))
513513 then 0
514514 else fraction(amount, fee, scale8)
515515 $Tuple2((amount - feeAmount), feeAmount)
516516 }
517517
518518
519519 func calcPutOneToken (paymentAmountRaw,paymentAssetId,userAddress,txId) = {
520520 let isEval = (txId == unit)
521521 let amountBalanceRaw = getAccBalance(assetIdToString(cfgAmountAssetId))
522522 let priceBalanceRaw = getAccBalance(assetIdToString(cfgPriceAssetId))
523523 let paymentInAmountAsset = if ((paymentAssetId == cfgAmountAssetId))
524524 then true
525525 else if ((paymentAssetId == cfgPriceAssetId))
526526 then false
527527 else throwErr("invalid asset")
528528 let $t02449024783 = if (isEval)
529529 then $Tuple2(amountBalanceRaw, priceBalanceRaw)
530530 else if (paymentInAmountAsset)
531531 then $Tuple2((amountBalanceRaw - paymentAmountRaw), priceBalanceRaw)
532532 else $Tuple2(amountBalanceRaw, (priceBalanceRaw - paymentAmountRaw))
533533 let amountBalanceOld = $t02449024783._1
534534 let priceBalanceOld = $t02449024783._2
535535 let $t02478724936 = if (paymentInAmountAsset)
536536 then $Tuple2(paymentAmountRaw, 0)
537537 else $Tuple2(0, paymentAmountRaw)
538538 let amountAssetAmountRaw = $t02478724936._1
539539 let priceAssetAmountRaw = $t02478724936._2
540540 let amountAssetAmount = takeFee(amountAssetAmountRaw, inFee)._1
541541 let priceAssetAmount = takeFee(priceAssetAmountRaw, inFee)._1
542542 let $t02506825132 = takeFee(paymentAmountRaw, inFee)
543543 let paymentAmount = $t02506825132._1
544544 let feeAmount = $t02506825132._2
545545 let amountBalanceNew = (amountBalanceOld + amountAssetAmount)
546546 let priceBalanceNew = (priceBalanceOld + priceAssetAmount)
547547 let priceNewX18 = calcPriceBigInt(toX18(priceBalanceNew, cfgPriceAssetDecimals), toX18(amountBalanceNew, cfgAmountAssetDecimals))
548548 let priceNew = fromX18(priceNewX18, scale8)
549549 let paymentBalance = if (paymentInAmountAsset)
550550 then amountBalanceOld
551551 else priceBalanceOld
552552 let paymentBalanceBigInt = toBigInt(paymentBalance)
553553 let supplyBigInt = toBigInt(valueOrErrorMessage(assetInfo(cfgLpAssetId), (("asset " + toBase58String(cfgLpAssetId)) + " doesn't exist")).quantity)
554554 let chechSupply = if ((supplyBigInt > big0))
555555 then true
556556 else throwErr("initial deposit requires all coins")
557557 if ((chechSupply == chechSupply))
558558 then {
559559 let depositBigInt = toBigInt(paymentAmount)
560560 let issueAmount = max([0, toInt(((supplyBigInt * (sqrtBigInt((scale18 + ((depositBigInt * scale18) / paymentBalanceBigInt)), 18, 18, DOWN) - scale18)) / scale18))])
561561 let commonState = if (isEval)
562562 then nil
563563 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))]
564564 let priceOldX18 = calcPriceBigInt(toX18(priceBalanceOld, cfgPriceAssetDecimals), toX18(amountBalanceOld, cfgAmountAssetDecimals))
565565 let priceOld = fromX18(priceOldX18, scale8)
566566 let loss = {
567567 let $t02681326980 = if (paymentInAmountAsset)
568568 then $Tuple2(amountAssetAmountRaw, amountBalanceOld)
569569 else $Tuple2(priceAssetAmountRaw, priceBalanceOld)
570570 let amount = $t02681326980._1
571571 let balance = $t02681326980._2
572572 let issueAmountBoth = toInt(fraction(supplyBigInt, toBigInt((amount / 2)), toBigInt(balance)))
573573 fraction((issueAmount - issueAmountBoth), scale8, issueAmountBoth)
574574 }
575575 $Tuple5(issueAmount, commonState, feeAmount, loss, paymentInAmountAsset)
576576 }
577577 else throw("Strict value is not equal to itself.")
578578 }
579579
580580
581581 func calcGetOneToken (outAssetId,paymentAmount,paymentAssetId,userAddress,txId) = {
582582 let isEval = (txId == unit)
583583 let cfg = getPoolConfig()
584584 let amtAssetDcm = parseIntValue(cfg[idxAmtAssetDcm])
585585 let priceAssetDcm = parseIntValue(cfg[idxPriceAssetDcm])
586586 let checks = [if ((paymentAssetId == cfgLpAssetId))
587587 then true
588588 else throwErr("invalid lp asset")]
589589 if ((checks == checks))
590590 then {
591591 let outInAmountAsset = if ((outAssetId == cfgAmountAssetId))
592592 then true
593593 else if ((outAssetId == cfgPriceAssetId))
594594 then false
595595 else throwErr("invalid asset")
596596 let balanceBigInt = if (outInAmountAsset)
597597 then toBigInt(getAccBalance(assetIdToString(cfgAmountAssetId)))
598598 else toBigInt(getAccBalance(assetIdToString(cfgPriceAssetId)))
599599 let outInAmountAssetDecimals = if (outInAmountAsset)
600600 then amtAssetDcm
601601 else priceAssetDcm
602602 let amBalanceOld = getAccBalance(assetIdToString(cfgAmountAssetId))
603603 let prBalanceOld = getAccBalance(assetIdToString(cfgPriceAssetId))
604604 let outBalance = if (outInAmountAsset)
605605 then amBalanceOld
606606 else prBalanceOld
607607 let outBalanceBigInt = toBigInt(outBalance)
608608 let supplyBigInt = toBigInt(valueOrErrorMessage(assetInfo(cfgLpAssetId), (("asset " + toBase58String(cfgLpAssetId)) + " doesn't exist")).quantity)
609609 let redeemedBigInt = toBigInt(paymentAmount)
610610 let amountRaw = max([0, toInt(((balanceBigInt * (scale18 - pow((scale18 - ((redeemedBigInt * scale18) / supplyBigInt)), 18, big2, 0, 18, DOWN))) / scale18))])
611611 let $t02905829114 = takeFee(amountRaw, outFee)
612612 let totalAmount = $t02905829114._1
613613 let feeAmount = $t02905829114._2
614614 let $t02911829344 = if (outInAmountAsset)
615615 then $Tuple4(totalAmount, 0, (amBalanceOld - amountRaw), prBalanceOld)
616616 else $Tuple4(0, totalAmount, amBalanceOld, (prBalanceOld - amountRaw))
617617 let outAmAmount = $t02911829344._1
618618 let outPrAmount = $t02911829344._2
619619 let amBalanceNew = $t02911829344._3
620620 let prBalanceNew = $t02911829344._4
621621 let priceNewX18 = calcPriceBigInt(toX18(prBalanceNew, cfgPriceAssetDecimals), toX18(amBalanceNew, cfgAmountAssetDecimals))
622622 let priceNew = fromX18(priceNewX18, scale8)
623623 let commonState = if (isEval)
624624 then nil
625625 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)]
626626 let priceOldX18 = calcPriceBigInt(toX18(prBalanceOld, cfgPriceAssetDecimals), toX18(amBalanceOld, cfgAmountAssetDecimals))
627627 let priceOld = fromX18(priceOldX18, scale8)
628628 let loss = {
629629 let amountBothInPaymentAsset = (toInt(fraction(balanceBigInt, redeemedBigInt, supplyBigInt)) * 2)
630630 fraction((totalAmount - amountBothInPaymentAsset), scale8, amountBothInPaymentAsset)
631631 }
632632 $Tuple5(totalAmount, commonState, feeAmount, loss, outInAmountAsset)
633633 }
634634 else throw("Strict value is not equal to itself.")
635635 }
636636
637637
638638 func managerPublicKeyOrUnit () = match getString(mpk()) {
639639 case s: String =>
640640 fromBase58String(s)
641641 case _: Unit =>
642642 unit
643643 case _ =>
644644 throw("Match error")
645645 }
646646
647647
648648 func pendingManagerPublicKeyOrUnit () = match getString(pmpk()) {
649649 case s: String =>
650650 fromBase58String(s)
651651 case _: Unit =>
652652 unit
653653 case _ =>
654654 throw("Match error")
655655 }
656656
657657
658658 func isManager (i) = match managerPublicKeyOrUnit() {
659659 case pk: ByteVector =>
660660 (i.callerPublicKey == pk)
661661 case _: Unit =>
662662 (i.caller == this)
663663 case _ =>
664664 throw("Match error")
665665 }
666666
667667
668668 func mustManager (i) = {
669669 let pd = throw("Permission denied")
670670 match managerPublicKeyOrUnit() {
671671 case pk: ByteVector =>
672672 if ((i.callerPublicKey == pk))
673673 then true
674674 else pd
675675 case _: Unit =>
676676 if ((i.caller == this))
677677 then true
678678 else pd
679679 case _ =>
680680 throw("Match error")
681681 }
682682 }
683683
684684
685685 @Callable(i)
686686 func setManager (pendingManagerPublicKey) = {
687687 let checkCaller = mustManager(i)
688688 if ((checkCaller == checkCaller))
689689 then {
690690 let checkManagerPublicKey = fromBase58String(pendingManagerPublicKey)
691691 if ((checkManagerPublicKey == checkManagerPublicKey))
692692 then [StringEntry(pmpk(), pendingManagerPublicKey)]
693693 else throw("Strict value is not equal to itself.")
694694 }
695695 else throw("Strict value is not equal to itself.")
696696 }
697697
698698
699699
700700 @Callable(i)
701701 func confirmManager () = {
702702 let pm = pendingManagerPublicKeyOrUnit()
703703 let hasPM = if (isDefined(pm))
704704 then true
705705 else throw("No pending manager")
706706 if ((hasPM == hasPM))
707707 then {
708708 let checkPM = if ((i.callerPublicKey == value(pm)))
709709 then true
710710 else throw("You are not pending manager")
711711 if ((checkPM == checkPM))
712712 then [StringEntry(mpk(), toBase58String(value(pm))), DeleteEntry(pmpk())]
713713 else throw("Strict value is not equal to itself.")
714714 }
715715 else throw("Strict value is not equal to itself.")
716716 }
717717
718718
719719
720720 @Callable(i)
721721 func put (slippageTolerance,shouldAutoStake) = if ((0 > slippageTolerance))
722722 then throw("Invalid slippageTolerance passed")
723723 else {
724724 let estPut = commonPut(i, slippageTolerance, true)
725725 let emitLpAmt = estPut._2
726726 let lpAssetId = estPut._7
727727 let state = estPut._9
728728 let amDiff = estPut._10
729729 let prDiff = estPut._11
730730 let amId = estPut._12
731731 let prId = estPut._13
732732 let amAssetPmt = toBigInt(value(i.payments[0]).amount)
733733 let prAssetPmt = toBigInt(value(i.payments[1]).amount)
734734 let currentKLp = calcCurrentKLp(amAssetPmt, prAssetPmt, toBigInt(0))
735735 if ((currentKLp == currentKLp))
736736 then {
737737 let emitInv = invoke(factoryContract, "emit", [emitLpAmt], nil)
738738 if ((emitInv == emitInv))
739739 then {
740740 let emitInvLegacy = match emitInv {
741741 case legacyFactoryContract: Address =>
742742 invoke(legacyFactoryContract, "emit", [emitLpAmt], nil)
743743 case _ =>
744744 unit
745745 }
746746 if ((emitInvLegacy == emitInvLegacy))
747747 then {
748748 let slippageAInv = if ((amDiff > 0))
749749 then invoke(slippageContract, "put", nil, [AttachedPayment(amId, amDiff)])
750750 else nil
751751 if ((slippageAInv == slippageAInv))
752752 then {
753753 let slippagePInv = if ((prDiff > 0))
754754 then invoke(slippageContract, "put", nil, [AttachedPayment(prId, prDiff)])
755755 else nil
756756 if ((slippagePInv == slippagePInv))
757757 then {
758758 let lpTransfer = if (shouldAutoStake)
759759 then {
760760 let slpStakeInv = invoke(stakingContract, "stake", nil, [AttachedPayment(lpAssetId, emitLpAmt)])
761761 if ((slpStakeInv == slpStakeInv))
762762 then nil
763763 else throw("Strict value is not equal to itself.")
764764 }
765765 else [ScriptTransfer(i.caller, emitLpAmt, lpAssetId)]
766766 let $t03387234334 = refreshKLpInternal(0, 0, 0)
767767 if (($t03387234334 == $t03387234334))
768768 then {
769769 let updatedKLp = $t03387234334._2
770770 let refreshKLpActions = $t03387234334._1
771771 let isUpdatedKLpValid = validateUpdatedKLp(currentKLp, updatedKLp)
772772 if ((isUpdatedKLpValid == isUpdatedKLpValid))
773773 then ((state ++ lpTransfer) ++ refreshKLpActions)
774774 else throw("Strict value is not equal to itself.")
775775 }
776776 else throw("Strict value is not equal to itself.")
777777 }
778778 else throw("Strict value is not equal to itself.")
779779 }
780780 else throw("Strict value is not equal to itself.")
781781 }
782782 else throw("Strict value is not equal to itself.")
783783 }
784784 else throw("Strict value is not equal to itself.")
785785 }
786786 else throw("Strict value is not equal to itself.")
787787 }
788788
789789
790790
791791 @Callable(i)
792792 func putForFree (maxSlippage) = if ((0 > maxSlippage))
793793 then throw("Invalid value passed")
794794 else {
795795 let estPut = commonPut(i, maxSlippage, false)
796796 let state = estPut._9
797797 let amAssetPmt = toBigInt(value(i.payments[0]).amount)
798798 let prAssetPmt = toBigInt(value(i.payments[1]).amount)
799799 let currentKLp = calcCurrentKLp(amAssetPmt, prAssetPmt, toBigInt(0))
800800 if ((currentKLp == currentKLp))
801801 then {
802802 let $t03489634961 = refreshKLpInternal(0, 0, 0)
803803 let refreshKLpActions = $t03489634961._1
804804 let updatedKLp = $t03489634961._2
805805 let isUpdatedKLpValid = validateUpdatedKLp(currentKLp, updatedKLp)
806806 if ((isUpdatedKLpValid == isUpdatedKLpValid))
807807 then (state ++ refreshKLpActions)
808808 else throw("Strict value is not equal to itself.")
809809 }
810810 else throw("Strict value is not equal to itself.")
811811 }
812812
813813
814814
815815 @Callable(i)
816816 func putOneTkn (minOutAmount,autoStake) = {
817817 let isPoolOneTokenOperationsDisabled = {
818818 let @ = invoke(factoryContract, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
819819 if ($isInstanceOf(@, "Boolean"))
820820 then @
821821 else throw(($getType(@) + " couldn't be cast to Boolean"))
822822 }
823823 let isPutDisabled = if (if (if (isGlobalShutdown())
824824 then true
825825 else (cfgPoolStatus == PoolPutDisabled))
826826 then true
827827 else (cfgPoolStatus == PoolShutdown))
828828 then true
829829 else isPoolOneTokenOperationsDisabled
830830 let checks = [if (if (!(isPutDisabled))
831831 then true
832832 else isManager(i))
833833 then true
834834 else throwErr("put operation is blocked by admin"), if ((size(i.payments) == 1))
835835 then true
836836 else throwErr("exactly 1 payment are expected")]
837837 if ((checks == checks))
838838 then {
839839 let payment = i.payments[0]
840840 let paymentAssetId = payment.assetId
841841 let paymentAmountRaw = payment.amount
842842 let currentKLp = if ((paymentAssetId == cfgAmountAssetId))
843843 then calcCurrentKLp(toBigInt(paymentAmountRaw), toBigInt(0), toBigInt(0))
844844 else if ((paymentAssetId == cfgPriceAssetId))
845845 then calcCurrentKLp(toBigInt(0), toBigInt(paymentAmountRaw), toBigInt(0))
846846 else throwErr("payment asset is not supported")
847847 if ((currentKLp == currentKLp))
848848 then {
849849 let userAddress = i.caller
850850 let txId = i.transactionId
851851 let $t03614936301 = calcPutOneToken(paymentAmountRaw, paymentAssetId, userAddress, txId)
852852 if (($t03614936301 == $t03614936301))
853853 then {
854854 let paymentInAmountAsset = $t03614936301._5
855855 let bonus = $t03614936301._4
856856 let feeAmount = $t03614936301._3
857857 let commonState = $t03614936301._2
858858 let emitAmountEstimated = $t03614936301._1
859859 let emitAmount = if (if ((minOutAmount > 0))
860860 then (minOutAmount > emitAmountEstimated)
861861 else false)
862862 then throwErr(makeString(["amount to receive is less than ", toString(minOutAmount)], ""))
863863 else emitAmountEstimated
864864 let emitInv = emit(emitAmount)
865865 if ((emitInv == emitInv))
866866 then {
867867 let lpTransfer = if (autoStake)
868868 then {
869869 let stakeInv = invoke(stakingContract, "stake", nil, [AttachedPayment(cfgLpAssetId, emitAmount)])
870870 if ((stakeInv == stakeInv))
871871 then nil
872872 else throw("Strict value is not equal to itself.")
873873 }
874874 else [ScriptTransfer(i.caller, emitAmount, cfgLpAssetId)]
875875 let sendFee = if ((feeAmount > 0))
876876 then [ScriptTransfer(feeCollectorAddress, feeAmount, paymentAssetId)]
877877 else nil
878878 let $t03688737084 = if ((this == feeCollectorAddress))
879879 then $Tuple2(0, 0)
880880 else if (paymentInAmountAsset)
881881 then $Tuple2(-(feeAmount), 0)
882882 else $Tuple2(0, -(feeAmount))
883883 let amountAssetBalanceDelta = $t03688737084._1
884884 let priceAssetBalanceDelta = $t03688737084._2
885885 let $t03708737195 = refreshKLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
886886 let refreshKLpActions = $t03708737195._1
887887 let updatedKLp = $t03708737195._2
888888 let kLp = value(getString(keyKLp))
889889 let isUpdatedKLpValid = validateUpdatedKLp(currentKLp, updatedKLp)
890890 if ((isUpdatedKLpValid == isUpdatedKLpValid))
891891 then $Tuple2((((commonState ++ lpTransfer) ++ sendFee) ++ refreshKLpActions), emitAmount)
892892 else throw("Strict value is not equal to itself.")
893893 }
894894 else throw("Strict value is not equal to itself.")
895895 }
896896 else throw("Strict value is not equal to itself.")
897897 }
898898 else throw("Strict value is not equal to itself.")
899899 }
900900 else throw("Strict value is not equal to itself.")
901901 }
902902
903903
904904
905905 @Callable(i)
906906 func putOneTknREADONLY (paymentAssetId,paymentAmountRaw) = {
907907 let $t03750137658 = calcPutOneToken(paymentAmountRaw, parseAssetId(paymentAssetId), unit, unit)
908908 let emitAmountEstimated = $t03750137658._1
909909 let commonState = $t03750137658._2
910910 let feeAmount = $t03750137658._3
911911 let bonus = $t03750137658._4
912912 let paymentInAmountAsset = $t03750137658._5
913913 $Tuple2(nil, $Tuple3(emitAmountEstimated, feeAmount, bonus))
914914 }
915915
916916
917917
918918 @Callable(i)
919919 func getOneTkn (outAssetIdStr,minOutAmount) = {
920920 let isPoolOneTokenOperationsDisabled = {
921921 let @ = invoke(factoryContract, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
922922 if ($isInstanceOf(@, "Boolean"))
923923 then @
924924 else throw(($getType(@) + " couldn't be cast to Boolean"))
925925 }
926926 let isGetDisabled = if (if (isGlobalShutdown())
927927 then true
928928 else (cfgPoolStatus == PoolShutdown))
929929 then true
930930 else isPoolOneTokenOperationsDisabled
931931 let checks = [if (if (!(isGetDisabled))
932932 then true
933933 else isManager(i))
934934 then true
935935 else throwErr("get operation is blocked by admin"), if ((size(i.payments) == 1))
936936 then true
937937 else throwErr("exactly 1 payment are expected")]
938938 if ((checks == checks))
939939 then {
940940 let outAssetId = parseAssetId(outAssetIdStr)
941941 let payment = i.payments[0]
942942 let paymentAssetId = payment.assetId
943943 let paymentAmount = payment.amount
944944 let currentKLp = calcCurrentKLp(toBigInt(0), toBigInt(0), toBigInt(0))
945945 if ((currentKLp == currentKLp))
946946 then {
947947 let userAddress = i.caller
948948 let txId = i.transactionId
949949 let $t03854338696 = calcGetOneToken(outAssetId, paymentAmount, paymentAssetId, userAddress, txId)
950950 if (($t03854338696 == $t03854338696))
951951 then {
952952 let outInAmountAsset = $t03854338696._5
953953 let bonus = $t03854338696._4
954954 let feeAmount = $t03854338696._3
955955 let commonState = $t03854338696._2
956956 let amountEstimated = $t03854338696._1
957957 let amount = if (if ((minOutAmount > 0))
958958 then (minOutAmount > amountEstimated)
959959 else false)
960960 then throwErr(makeString(["amount to receive is less than ", toString(minOutAmount)], ""))
961961 else amountEstimated
962962 let burnInv = invoke(factoryContract, "burn", [paymentAmount], [AttachedPayment(paymentAssetId, paymentAmount)])
963963 if ((burnInv == burnInv))
964964 then {
965965 let assetTransfer = [ScriptTransfer(userAddress, amount, outAssetId)]
966966 let sendFee = if ((feeAmount > 0))
967967 then [ScriptTransfer(feeCollectorAddress, feeAmount, outAssetId)]
968968 else nil
969969 let $t03919639443 = {
970970 let feeAmountForCalc = if ((this == feeCollectorAddress))
971971 then 0
972972 else feeAmount
973973 if (outInAmountAsset)
974974 then $Tuple2(-((amount + feeAmountForCalc)), 0)
975975 else $Tuple2(0, -((amount + feeAmountForCalc)))
976976 }
977977 let amountAssetBalanceDelta = $t03919639443._1
978978 let priceAssetBalanceDelta = $t03919639443._2
979979 let $t03944639554 = refreshKLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
980980 let refreshKLpActions = $t03944639554._1
981981 let updatedKLp = $t03944639554._2
982982 let isUpdatedKLpValid = validateUpdatedKLp(currentKLp, updatedKLp)
983983 if ((isUpdatedKLpValid == isUpdatedKLpValid))
984984 then $Tuple2((((commonState ++ assetTransfer) ++ sendFee) ++ refreshKLpActions), amount)
985985 else throw("Strict value is not equal to itself.")
986986 }
987987 else throw("Strict value is not equal to itself.")
988988 }
989989 else throw("Strict value is not equal to itself.")
990990 }
991991 else throw("Strict value is not equal to itself.")
992992 }
993993 else throw("Strict value is not equal to itself.")
994994 }
995995
996996
997997
998998 @Callable(i)
999999 func getOneTknREADONLY (outAssetId,paymentAmount) = {
10001000 let $t03981139967 = calcGetOneToken(parseAssetId(outAssetId), paymentAmount, cfgLpAssetId, unit, unit)
10011001 let amountEstimated = $t03981139967._1
10021002 let commonState = $t03981139967._2
10031003 let feeAmount = $t03981139967._3
10041004 let bonus = $t03981139967._4
10051005 let outInAmountAsset = $t03981139967._5
10061006 $Tuple2(nil, $Tuple3(amountEstimated, feeAmount, bonus))
10071007 }
10081008
10091009
10101010
10111011 @Callable(i)
10121012 func unstakeAndGetOneTkn (unstakeAmount,outAssetIdStr,minOutAmount) = {
10131013 let isPoolOneTokenOperationsDisabled = {
10141014 let @ = invoke(factoryContract, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
10151015 if ($isInstanceOf(@, "Boolean"))
10161016 then @
10171017 else throw(($getType(@) + " couldn't be cast to Boolean"))
10181018 }
10191019 let isGetDisabled = if (if (isGlobalShutdown())
10201020 then true
10211021 else (cfgPoolStatus == PoolShutdown))
10221022 then true
10231023 else isPoolOneTokenOperationsDisabled
10241024 let checks = [if (if (!(isGetDisabled))
10251025 then true
10261026 else isManager(i))
10271027 then true
10281028 else throwErr("get operation is blocked by admin"), if ((size(i.payments) == 0))
10291029 then true
10301030 else throwErr("no payments are expected")]
10311031 if ((checks == checks))
10321032 then {
10331033 let outAssetId = parseAssetId(outAssetIdStr)
10341034 let userAddress = i.caller
10351035 let txId = i.transactionId
10361036 let currentKLp = calcCurrentKLp(toBigInt(0), toBigInt(0), toBigInt(0))
10371037 if ((currentKLp == currentKLp))
10381038 then {
10391039 let unstakeInv = invoke(stakingContract, "unstake", [toBase58String(cfgLpAssetId), unstakeAmount], nil)
10401040 if ((unstakeInv == unstakeInv))
10411041 then {
10421042 let $t04087241023 = calcGetOneToken(outAssetId, unstakeAmount, cfgLpAssetId, userAddress, txId)
10431043 if (($t04087241023 == $t04087241023))
10441044 then {
10451045 let outInAmountAsset = $t04087241023._5
10461046 let bonus = $t04087241023._4
10471047 let feeAmount = $t04087241023._3
10481048 let commonState = $t04087241023._2
10491049 let amountEstimated = $t04087241023._1
10501050 let amount = if (if ((minOutAmount > 0))
10511051 then (minOutAmount > amountEstimated)
10521052 else false)
10531053 then throwErr(makeString(["amount to receive is less than ", toString(minOutAmount)], ""))
10541054 else amountEstimated
10551055 let burnInv = invoke(factoryContract, "burn", [unstakeAmount], [AttachedPayment(cfgLpAssetId, unstakeAmount)])
10561056 if ((burnInv == burnInv))
10571057 then {
10581058 let assetTransfer = [ScriptTransfer(i.caller, amount, outAssetId)]
10591059 let sendFee = if ((feeAmount > 0))
10601060 then [ScriptTransfer(feeCollectorAddress, feeAmount, outAssetId)]
10611061 else nil
10621062 let $t04151841765 = {
10631063 let feeAmountForCalc = if ((this == feeCollectorAddress))
10641064 then 0
10651065 else feeAmount
10661066 if (outInAmountAsset)
10671067 then $Tuple2(-((amount + feeAmountForCalc)), 0)
10681068 else $Tuple2(0, -((amount + feeAmountForCalc)))
10691069 }
10701070 let amountAssetBalanceDelta = $t04151841765._1
10711071 let priceAssetBalanceDelta = $t04151841765._2
10721072 let $t04176841876 = refreshKLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
10731073 let refreshKLpActions = $t04176841876._1
10741074 let updatedKLp = $t04176841876._2
10751075 let isUpdatedKLpValid = validateUpdatedKLp(currentKLp, updatedKLp)
10761076 if ((isUpdatedKLpValid == isUpdatedKLpValid))
10771077 then $Tuple2((((commonState ++ assetTransfer) ++ sendFee) ++ refreshKLpActions), amount)
10781078 else throw("Strict value is not equal to itself.")
10791079 }
10801080 else throw("Strict value is not equal to itself.")
10811081 }
10821082 else throw("Strict value is not equal to itself.")
10831083 }
10841084 else throw("Strict value is not equal to itself.")
10851085 }
10861086 else throw("Strict value is not equal to itself.")
10871087 }
10881088 else throw("Strict value is not equal to itself.")
10891089 }
10901090
10911091
10921092
10931093 @Callable(i)
10941094 func get () = {
10951095 let res = commonGet(i)
10961096 let outAmtAmt = res._1
10971097 let outPrAmt = res._2
10981098 let pmtAmt = res._3
10991099 let pmtAssetId = res._4
11001100 let state = res._5
11011101 let currentKLp = calcCurrentKLp(toBigInt(0), toBigInt(0), toBigInt(0))
11021102 if ((currentKLp == currentKLp))
11031103 then {
11041104 let burnLPAssetOnFactory = invoke(factoryContract, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
11051105 if ((burnLPAssetOnFactory == burnLPAssetOnFactory))
11061106 then {
11071107 let $t04282242904 = refreshKLpInternal(-(outAmtAmt), -(outPrAmt), 0)
11081108 let refreshKLpActions = $t04282242904._1
11091109 let updatedKLp = $t04282242904._2
11101110 let isUpdatedKLpValid = validateUpdatedKLp(currentKLp, updatedKLp)
11111111 if ((isUpdatedKLpValid == isUpdatedKLpValid))
11121112 then (state ++ refreshKLpActions)
11131113 else throw("Strict value is not equal to itself.")
11141114 }
11151115 else throw("Strict value is not equal to itself.")
11161116 }
11171117 else throw("Strict value is not equal to itself.")
11181118 }
11191119
11201120
11211121
11221122 @Callable(i)
11231123 func getNoLess (noLessThenAmtAsset,noLessThenPriceAsset) = {
11241124 let res = commonGet(i)
11251125 let outAmAmt = res._1
11261126 let outPrAmt = res._2
11271127 let pmtAmt = res._3
11281128 let pmtAssetId = res._4
11291129 let state = res._5
11301130 if ((noLessThenAmtAsset > outAmAmt))
11311131 then throw(((("noLessThenAmtAsset failed: " + toString(outAmAmt)) + " < ") + toString(noLessThenAmtAsset)))
11321132 else if ((noLessThenPriceAsset > outPrAmt))
11331133 then throw(((("noLessThenPriceAsset failed: " + toString(outPrAmt)) + " < ") + toString(noLessThenPriceAsset)))
11341134 else {
11351135 let currentKLp = calcCurrentKLp(toBigInt(0), toBigInt(0), toBigInt(0))
11361136 if ((currentKLp == currentKLp))
11371137 then {
11381138 let burnLPAssetOnFactory = invoke(factoryContract, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
11391139 if ((burnLPAssetOnFactory == burnLPAssetOnFactory))
11401140 then {
11411141 let $t04385343934 = refreshKLpInternal(-(outAmAmt), -(outPrAmt), 0)
11421142 let refreshKLpActions = $t04385343934._1
11431143 let updatedKLp = $t04385343934._2
11441144 let isUpdatedKLpValid = validateUpdatedKLp(currentKLp, updatedKLp)
11451145 if ((isUpdatedKLpValid == isUpdatedKLpValid))
11461146 then (state ++ refreshKLpActions)
11471147 else throw("Strict value is not equal to itself.")
11481148 }
11491149 else throw("Strict value is not equal to itself.")
11501150 }
11511151 else throw("Strict value is not equal to itself.")
11521152 }
11531153 }
11541154
11551155
11561156
11571157 @Callable(i)
11581158 func unstakeAndGet (amount) = {
11591159 let checkPayments = if ((size(i.payments) != 0))
11601160 then throw("No payments are expected")
11611161 else true
11621162 if ((checkPayments == checkPayments))
11631163 then {
11641164 let cfg = getPoolConfig()
11651165 let lpAssetId = fromBase58String(cfg[idxPoolLPAssetId])
11661166 let currentKLp = calcCurrentKLp(toBigInt(0), toBigInt(0), toBigInt(0))
11671167 if ((currentKLp == currentKLp))
11681168 then {
11691169 let unstakeInv = invoke(stakingContract, "unstake", [toBase58String(lpAssetId), amount], nil)
11701170 if ((unstakeInv == unstakeInv))
11711171 then {
11721172 let res = estimateGetOperation(toBase58String(i.transactionId), toBase58String(lpAssetId), amount, i.caller)
11731173 let outAmAmt = res._1
11741174 let outPrAmt = res._2
11751175 let poolStatus = parseIntValue(res._9)
11761176 let state = res._10
11771177 let checkPoolStatus = if (if (isGlobalShutdown())
11781178 then true
11791179 else (poolStatus == PoolShutdown))
11801180 then throw(("Get operation is blocked by admin. Status = " + toString(poolStatus)))
11811181 else true
11821182 if ((checkPoolStatus == checkPoolStatus))
11831183 then {
11841184 let burnLPAssetOnFactory = invoke(factoryContract, "burn", [amount], [AttachedPayment(lpAssetId, amount)])
11851185 if ((burnLPAssetOnFactory == burnLPAssetOnFactory))
11861186 then {
11871187 let $t04506045141 = refreshKLpInternal(-(outAmAmt), -(outPrAmt), 0)
11881188 let refreshKLpActions = $t04506045141._1
11891189 let updatedKLp = $t04506045141._2
11901190 let isUpdatedKLpValid = validateUpdatedKLp(currentKLp, updatedKLp)
11911191 if ((isUpdatedKLpValid == isUpdatedKLpValid))
11921192 then (state ++ refreshKLpActions)
11931193 else throw("Strict value is not equal to itself.")
11941194 }
11951195 else throw("Strict value is not equal to itself.")
11961196 }
11971197 else throw("Strict value is not equal to itself.")
11981198 }
11991199 else throw("Strict value is not equal to itself.")
12001200 }
12011201 else throw("Strict value is not equal to itself.")
12021202 }
12031203 else throw("Strict value is not equal to itself.")
12041204 }
12051205
12061206
12071207
12081208 @Callable(i)
12091209 func unstakeAndGetNoLess (unstakeAmount,noLessThenAmountAsset,noLessThenPriceAsset) = {
12101210 let isGetDisabled = if (isGlobalShutdown())
12111211 then true
12121212 else (cfgPoolStatus == PoolShutdown)
12131213 let checks = [if (!(isGetDisabled))
12141214 then true
12151215 else throw("get operation is blocked by admin"), if ((size(i.payments) == 0))
12161216 then true
12171217 else throw("no payments are expected")]
12181218 if ((checks == checks))
12191219 then {
12201220 let currentKLp = calcCurrentKLp(toBigInt(0), toBigInt(0), toBigInt(0))
12211221 if ((currentKLp == currentKLp))
12221222 then {
12231223 let unstakeInv = invoke(stakingContract, "unstake", [toBase58String(cfgLpAssetId), unstakeAmount], nil)
12241224 if ((unstakeInv == unstakeInv))
12251225 then {
12261226 let res = estimateGetOperation(toBase58String(i.transactionId), toBase58String(cfgLpAssetId), unstakeAmount, i.caller)
12271227 let outAmAmt = res._1
12281228 let outPrAmt = res._2
12291229 let state = res._10
12301230 let checkAmounts = [if ((outAmAmt >= noLessThenAmountAsset))
12311231 then true
12321232 else throw(makeString(["amount asset amount to receive is less than ", toString(noLessThenAmountAsset)], "")), if ((outPrAmt >= noLessThenPriceAsset))
12331233 then true
12341234 else throw(makeString(["price asset amount to receive is less than ", toString(noLessThenPriceAsset)], ""))]
12351235 if ((checkAmounts == checkAmounts))
12361236 then {
12371237 let burnLPAssetOnFactory = invoke(factoryContract, "burn", [unstakeAmount], [AttachedPayment(cfgLpAssetId, unstakeAmount)])
12381238 if ((burnLPAssetOnFactory == burnLPAssetOnFactory))
12391239 then {
12401240 let $t04643646517 = refreshKLpInternal(-(outAmAmt), -(outPrAmt), 0)
12411241 let refreshKLpActions = $t04643646517._1
12421242 let updatedKLp = $t04643646517._2
12431243 let isUpdatedKLpValid = validateUpdatedKLp(currentKLp, updatedKLp)
12441244 if ((isUpdatedKLpValid == isUpdatedKLpValid))
12451245 then (state ++ refreshKLpActions)
12461246 else throw("Strict value is not equal to itself.")
12471247 }
12481248 else throw("Strict value is not equal to itself.")
12491249 }
12501250 else throw("Strict value is not equal to itself.")
12511251 }
12521252 else throw("Strict value is not equal to itself.")
12531253 }
12541254 else throw("Strict value is not equal to itself.")
12551255 }
12561256 else throw("Strict value is not equal to itself.")
12571257 }
12581258
12591259
12601260
12611261 @Callable(i)
12621262 func activate (amtAssetStr,priceAssetStr) = if ((toString(i.caller) != toString(factoryContract)))
12631263 then throw("permissions denied")
12641264 else $Tuple2([StringEntry(aa(), amtAssetStr), StringEntry(pa(), priceAssetStr)], "success")
12651265
12661266
12671267
12681268 @Callable(i)
12691269 func refreshKLp () = {
12701270 let lastRefreshedBlockHeight = valueOrElse(getInteger(keyKLpRefreshedHeight), 0)
12711271 let checkLastRefreshedBlockHeight = if (((height - lastRefreshedBlockHeight) >= kLpRefreshDelay))
12721272 then unit
12731273 else throwErr(makeString([toString(kLpRefreshDelay), " blocks have not passed since the previous call"], ""))
12741274 if ((checkLastRefreshedBlockHeight == checkLastRefreshedBlockHeight))
12751275 then {
12761276 let kLp = valueOrErrorMessage(parseBigInt(valueOrElse(getString(this, keyKLp), "0")), fmtErr("invalid kLp"))
12771277 let $t04770447768 = refreshKLpInternal(0, 0, 0)
12781278 let kLpUpdateActions = $t04770447768._1
12791279 let updatedKLp = $t04770447768._2
12801280 let actions = if ((kLp != updatedKLp))
12811281 then kLpUpdateActions
12821282 else throwErr("nothing to refresh")
12831283 $Tuple2(actions, toString(updatedKLp))
12841284 }
12851285 else throw("Strict value is not equal to itself.")
12861286 }
12871287
12881288
12891289
12901290 @Callable(i)
12911291 func getPoolConfigWrapperREADONLY () = $Tuple2(nil, getPoolConfig())
12921292
12931293
12941294
12951295 @Callable(i)
12961296 func getAccBalanceWrapperREADONLY (assetId) = $Tuple2(nil, getAccBalance(assetId))
12971297
12981298
12991299
13001300 @Callable(i)
13011301 func calcPricesWrapperREADONLY (amAmt,prAmt,lpAmt) = {
13021302 let prices = calcPrices(amAmt, prAmt, lpAmt)
13031303 $Tuple2(nil, [toString(prices[0]), toString(prices[1]), toString(prices[2])])
13041304 }
13051305
13061306
13071307
13081308 @Callable(i)
13091309 func toX18WrapperREADONLY (origVal,origScaleMult) = $Tuple2(nil, toString(toX18(origVal, origScaleMult)))
13101310
13111311
13121312
13131313 @Callable(i)
13141314 func fromX18WrapperREADONLY (val,resultScaleMult) = $Tuple2(nil, fromX18(parseBigIntValue(val), resultScaleMult))
13151315
13161316
13171317
13181318 @Callable(i)
13191319 func calcPriceBigIntWrapperREADONLY (prAmtX18,amAmtX18) = $Tuple2(nil, toString(calcPriceBigInt(parseBigIntValue(prAmtX18), parseBigIntValue(amAmtX18))))
13201320
13211321
13221322
13231323 @Callable(i)
13241324 func estimatePutOperationWrapperREADONLY (txId58,slippageTolerance,inAmAssetAmt,inAmAssetId,inPrAssetAmt,inPrAssetId,userAddress,isEvaluate,emitLp) = $Tuple2(nil, estimatePutOperation(txId58, slippageTolerance, inAmAssetAmt, inAmAssetId, inPrAssetAmt, inPrAssetId, userAddress, isEvaluate, emitLp))
13251325
13261326
13271327
13281328 @Callable(i)
13291329 func estimateGetOperationWrapperREADONLY (txId58,pmtAssetId,pmtLpAmt,userAddress) = {
13301330 let res = estimateGetOperation(txId58, pmtAssetId, pmtLpAmt, addressFromStringValue(userAddress))
13311331 $Tuple2(nil, $Tuple10(res._1, res._2, res._3, res._4, res._5, res._6, res._7, toString(res._8), res._9, res._10))
13321332 }
13331333
13341334
13351335
13361336 @Callable(i)
13371337 func statsREADONLY () = {
13381338 let cfg = getPoolConfig()
13391339 let lpAssetId = fromBase58String(cfg[idxPoolLPAssetId])
13401340 let amtAssetId = cfg[idxAmtAssetId]
13411341 let priceAssetId = cfg[idxPriceAssetId]
13421342 let iAmtAssetId = cfg[idxIAmtAssetId]
13431343 let iPriceAssetId = cfg[idxIPriceAssetId]
13441344 let amtAssetDcm = parseIntValue(cfg[idxAmtAssetDcm])
13451345 let priceAssetDcm = parseIntValue(cfg[idxPriceAssetDcm])
13461346 let poolLPBalance = valueOrErrorMessage(assetInfo(lpAssetId), (("Asset " + toBase58String(lpAssetId)) + " doesn't exist")).quantity
13471347 let accAmtAssetBalance = getAccBalance(amtAssetId)
13481348 let accPriceAssetBalance = getAccBalance(priceAssetId)
13491349 let pricesList = if ((poolLPBalance == 0))
13501350 then [zeroBigInt, zeroBigInt, zeroBigInt]
13511351 else calcPrices(accAmtAssetBalance, accPriceAssetBalance, poolLPBalance)
13521352 let curPrice = 0
13531353 let lpAmtAssetShare = fromX18(pricesList[1], scale8)
13541354 let lpPriceAssetShare = fromX18(pricesList[2], scale8)
13551355 let poolWeight = value(getInteger(factoryContract, keyPoolWeight(toString(this))))
13561356 $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))
13571357 }
13581358
13591359
13601360
13611361 @Callable(i)
13621362 func evaluatePutByAmountAssetREADONLY (inAmAssetAmt) = {
13631363 let cfg = getPoolConfig()
13641364 let lpAssetId = fromBase58String(cfg[idxPoolLPAssetId])
13651365 let amAssetIdStr = cfg[idxAmtAssetId]
13661366 let amAssetId = fromBase58String(amAssetIdStr)
13671367 let prAssetIdStr = cfg[idxPriceAssetId]
13681368 let prAssetId = fromBase58String(prAssetIdStr)
13691369 let amtAssetDcm = parseIntValue(cfg[idxAmtAssetDcm])
13701370 let priceAssetDcm = parseIntValue(cfg[idxPriceAssetDcm])
13711371 let poolStatus = cfg[idxPoolStatus]
13721372 let poolLPBalance = valueOrErrorMessage(assetInfo(lpAssetId), (("Asset " + toBase58String(lpAssetId)) + " doesn't exist")).quantity
13731373 let accAmtAssetBalance = getAccBalance(amAssetIdStr)
13741374 let accPriceAssetBalance = getAccBalance(prAssetIdStr)
13751375 let amtAssetAmtX18 = toX18(accAmtAssetBalance, amtAssetDcm)
13761376 let priceAssetAmtX18 = toX18(accPriceAssetBalance, priceAssetDcm)
13771377 let curPriceX18 = if ((poolLPBalance == 0))
13781378 then zeroBigInt
13791379 else calcPriceBigInt(priceAssetAmtX18, amtAssetAmtX18)
13801380 let inAmAssetAmtX18 = toX18(inAmAssetAmt, amtAssetDcm)
13811381 let inPrAssetAmtX18 = fraction(inAmAssetAmtX18, curPriceX18, scale18)
13821382 let inPrAssetAmt = fromX18(inPrAssetAmtX18, priceAssetDcm)
13831383 let estPut = estimatePutOperation("", 500000, inAmAssetAmt, amAssetId, inPrAssetAmt, prAssetId, "", true, false)
13841384 let calcLpAmt = estPut._1
13851385 let curPriceCalc = estPut._3
13861386 let amBalance = estPut._4
13871387 let prBalance = estPut._5
13881388 let lpEmission = estPut._6
13891389 $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))
13901390 }
13911391
13921392
13931393
13941394 @Callable(i)
13951395 func evaluatePutByPriceAssetREADONLY (inPrAssetAmt) = {
13961396 let cfg = getPoolConfig()
13971397 let lpAssetId = fromBase58String(cfg[idxPoolLPAssetId])
13981398 let amAssetIdStr = cfg[idxAmtAssetId]
13991399 let amAssetId = fromBase58String(amAssetIdStr)
14001400 let prAssetIdStr = cfg[idxPriceAssetId]
14011401 let prAssetId = fromBase58String(prAssetIdStr)
14021402 let amtAssetDcm = parseIntValue(cfg[idxAmtAssetDcm])
14031403 let priceAssetDcm = parseIntValue(cfg[idxPriceAssetDcm])
14041404 let poolStatus = cfg[idxPoolStatus]
14051405 let poolLPBalance = valueOrErrorMessage(assetInfo(lpAssetId), (("Asset " + toBase58String(lpAssetId)) + " doesn't exist")).quantity
14061406 let amBalanceRaw = getAccBalance(amAssetIdStr)
14071407 let prBalanceRaw = getAccBalance(prAssetIdStr)
14081408 let amBalanceRawX18 = toX18(amBalanceRaw, amtAssetDcm)
14091409 let prBalanceRawX18 = toX18(prBalanceRaw, priceAssetDcm)
14101410 let curPriceX18 = if ((poolLPBalance == 0))
14111411 then zeroBigInt
14121412 else calcPriceBigInt(prBalanceRawX18, amBalanceRawX18)
14131413 let inPrAssetAmtX18 = toX18(inPrAssetAmt, priceAssetDcm)
14141414 let inAmAssetAmtX18 = fraction(inPrAssetAmtX18, scale18, curPriceX18)
14151415 let inAmAssetAmt = fromX18(inAmAssetAmtX18, amtAssetDcm)
14161416 let estPut = estimatePutOperation("", 500000, inAmAssetAmt, amAssetId, inPrAssetAmt, prAssetId, "", true, false)
14171417 let calcLpAmt = estPut._1
14181418 let curPriceCalc = estPut._3
14191419 let amBalance = estPut._4
14201420 let prBalance = estPut._5
14211421 let lpEmission = estPut._6
14221422 $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))
14231423 }
14241424
14251425
14261426
14271427 @Callable(i)
14281428 func evaluateGetREADONLY (paymentLpAssetId,paymentLpAmt) = {
14291429 let res = estimateGetOperation("", paymentLpAssetId, paymentLpAmt, this)
14301430 let outAmAmt = res._1
14311431 let outPrAmt = res._2
14321432 let amBalance = res._5
14331433 let prBalance = res._6
14341434 let lpEmission = res._7
14351435 let curPrice = res._8
14361436 let poolStatus = parseIntValue(res._9)
14371437 $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))
14381438 }
14391439
14401440
14411441 @Verifier(tx)
14421442 func verify () = {
14431443 let targetPublicKey = match managerPublicKeyOrUnit() {
14441444 case pk: ByteVector =>
14451445 pk
14461446 case _: Unit =>
14471447 tx.senderPublicKey
14481448 case _ =>
14491449 throw("Match error")
14501450 }
14511451 match tx {
14521452 case order: Order =>
14531453 let matcherPub = getMatcherPubOrFail()
14541454 let orderValid = validateMatcherOrderAllowed(order)
14551455 let senderValid = sigVerify(order.bodyBytes, order.proofs[0], order.senderPublicKey)
14561456 let matcherValid = sigVerify(order.bodyBytes, order.proofs[1], matcherPub)
14571457 if (if (if (orderValid)
14581458 then senderValid
14591459 else false)
14601460 then matcherValid
14611461 else false)
14621462 then true
14631463 else throwOrderError(orderValid, senderValid, matcherValid)
14641464 case s: SetScriptTransaction =>
14651465 let newHash = blake2b256(value(s.script))
14661466 let allowedHash = fromBase64String(value(getString(factoryContract, keyAllowedLpScriptHash())))
14671467 let currentHash = scriptHash(this)
14681468 if (if ((allowedHash == newHash))
14691469 then (currentHash != newHash)
14701470 else false)
14711471 then true
14721472 else sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey)
14731473 case _ =>
14741474 sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey)
14751475 }
14761476 }
14771477

github/deemru/w8io/169f3d6 
221.83 ms