tx · 3144A81qGqqqr52oB9PDorBJW3aVctiHPmwNQGMtnK8s

3N8iNNRC4UfDK4aJctSvHajiZ81fzSumCeP:  -0.04300000 Waves

2023.09.21 14:38 [2765087] smart account 3N8iNNRC4UfDK4aJctSvHajiZ81fzSumCeP > SELF 0.00000000 Waves

{ "type": 13, "id": "3144A81qGqqqr52oB9PDorBJW3aVctiHPmwNQGMtnK8s", "fee": 4300000, "feeAssetId": null, "timestamp": 1695296374616, "version": 2, "chainId": 84, "sender": "3N8iNNRC4UfDK4aJctSvHajiZ81fzSumCeP", "senderPublicKey": "F7NZd812aXMUyDcj1XaB3wgMJXJfUsq3RhPhrEZ9b6ND", "proofs": [ "vwu2pawAcJfLyzY9T2hros9PwPRM5GNaG4X2bf4EPd36trBGfuWF7MpwAhrYQn7QViibH7Z6GkoYHtLphQ6wbGw" ], "script": "base64:BgK4OAgCEgASBQoDAQQBEgcKBQEEAQgBEgQKAgEEEgMKAQESBAoCAQQSBAoCCAESBAoCCAESBAoCCAESBQoDAQgBEgASBAoCAQESAwoBARIFCgMBAQESBAoCCAgSABIAEgASAwoBCBIFCgMBAQESBAoCAQESBAoCCAESBAoCCAgSCwoJCAEBAgECCAQEEgYKBAgIAQgSABIDCgEBEgMKAQESBAoCCAEiCmxQZGVjaW1hbHMiBnNjYWxlOCIMc2NhbGU4QmlnSW50IgdzY2FsZTE4Igp6ZXJvQmlnSW50IgRiaWcwIgRiaWcxIgRiaWcyIgt3YXZlc1N0cmluZyIDU0VQIgpQb29sQWN0aXZlIg9Qb29sUHV0RGlzYWJsZWQiE1Bvb2xNYXRjaGVyRGlzYWJsZWQiDFBvb2xTaHV0ZG93biIOaWR4UG9vbEFkZHJlc3MiDWlkeFBvb2xTdGF0dXMiEGlkeFBvb2xMUEFzc2V0SWQiDWlkeEFtdEFzc2V0SWQiD2lkeFByaWNlQXNzZXRJZCIOaWR4QW10QXNzZXREY20iEGlkeFByaWNlQXNzZXREY20iDmlkeElBbXRBc3NldElkIhBpZHh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EAmluCQECYmoABAJpbwMJAQJlTQAJAJQKAgYCAAkBAmVQAQUCZVEEAmFLCAUCaW8CXzEEAmFMCAUCaW8CXzIEAmFNCQD0AwMIBQJlUQlib2R5Qnl0ZXMJAJEDAggFAmVRBnByb29mcwAACAUCZVEPc2VuZGVyUHVibGljS2V5BAJhTgkA9AMDCAUCZVEJYm9keUJ5dGVzCQCRAwIIBQJlUQZwcm9vZnMAAQUCaW4DAwMFAmFLBQJhTQcFAmFOBwYJAQJhSgQFAmFLBQJhTAUCYU0FAmFOAwkAAQIFAmFRAhRTZXRTY3JpcHRUcmFuc2FjdGlvbgQCYVYFAmFRAwkA9AMDCAUCaWsJYm9keUJ5dGVzCQCRAwIIBQJpawZwcm9vZnMAAAUCaW0GBAJpcAkA9gMBCQEFdmFsdWUBCAUCYVYGc2NyaXB0BAJpcQkA2wQBCQEFdmFsdWUBCQCdCAIFAmJkCQECYUYABAJpcgkA8QcBBQR0aGlzAwkAAAIFAmlxBQJpcAkBAiE9AgUCaXIFAmlwBwkA9AMDCAUCaWsJYm9keUJ5dGVzCQCRAwIIBQJpawZwcm9vZnMAAAUCaW1+ZcYd", "height": 2765087, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 5MxAXW9gaMJ2kBVQKBDatvq8Ty6CyX4ppWKn9JHsDmGH Next: BdV2bGBxQ1ZnnQKGmfXGjn65XXfNfBV7BgMoUbUn3TBe Diff:
OldNewDifferences
15841584
15851585
15861586 @Callable(i)
1587+func invert () = {
1588+ let checks = [if ((i.caller == factoryContract))
1589+ then true
1590+ else throwErr("invalid caller")]
1591+ if ((checks == checks))
1592+ then $Tuple2([StringEntry(aa(), assetIdToString(cfgPriceAssetId)), StringEntry(pa(), assetIdToString(cfgAmountAssetId))], unit)
1593+ else throw("Strict value is not equal to itself.")
1594+ }
1595+
1596+
1597+
1598+@Callable(i)
15871599 func refreshKLp () = {
15881600 let lastRefreshedBlockHeight = valueOrElse(getInteger(keyKLpRefreshedHeight), 0)
15891601 let checkLastRefreshedBlockHeight = if (((height - lastRefreshedBlockHeight) >= kLpRefreshDelay))
15921604 if ((checkLastRefreshedBlockHeight == checkLastRefreshedBlockHeight))
15931605 then {
15941606 let kLp = valueOrErrorMessage(parseBigInt(valueOrElse(getString(this, keyKLp), "0")), fmtErr("invalid kLp"))
1595- let $t05989059954 = refreshKLpInternal(0, 0, 0)
1596- let kLpUpdateActions = $t05989059954._1
1597- let updatedKLp = $t05989059954._2
1607+ let $t06014360207 = refreshKLpInternal(0, 0, 0)
1608+ let kLpUpdateActions = $t06014360207._1
1609+ let updatedKLp = $t06014360207._2
15981610 let actions = if ((kLp != updatedKLp))
15991611 then kLpUpdateActions
16001612 else throwErr("nothing to refresh")
17691781 match tx {
17701782 case order: Order =>
17711783 let matcherPub = getMatcherPubOrFail()
1772- let $t06861668733 = if (skipOrderValidation())
1784+ let $t06886968986 = if (skipOrderValidation())
17731785 then $Tuple2(true, "")
17741786 else validateMatcherOrderAllowed(order)
1775- let orderValid = $t06861668733._1
1776- let orderValidInfo = $t06861668733._2
1787+ let orderValid = $t06886968986._1
1788+ let orderValidInfo = $t06886968986._2
17771789 let senderValid = sigVerify(order.bodyBytes, order.proofs[0], order.senderPublicKey)
17781790 let matcherValid = sigVerify(order.bodyBytes, order.proofs[1], matcherPub)
17791791 if (if (if (orderValid)
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 toX18BigInt (origVal,origScaleMult) = fraction(origVal, scale18, origScaleMult)
6666
6767
6868 func fromX18 (val,resultScaleMult) = toInt(fraction(val, toBigInt(resultScaleMult), scale18))
6969
7070
7171 func fromX18Round (val,resultScaleMult,round) = toInt(fraction(val, toBigInt(resultScaleMult), scale18, round))
7272
7373
7474 func toScale (amt,resScale,curScale) = fraction(amt, resScale, curScale)
7575
7676
7777 func abs (val) = if ((0 > val))
7878 then -(val)
7979 else val
8080
8181
8282 func absBigInt (val) = if ((zeroBigInt > val))
8383 then -(val)
8484 else val
8585
8686
8787 func swapContract () = "%s__swapContract"
8888
8989
9090 func fc () = "%s__factoryContract"
9191
9292
9393 func keyManagerPublicKey () = "%s__managerPublicKey"
9494
9595
9696 func keyManagerVaultAddress () = "%s__managerVaultAddress"
9797
9898
9999 func pl () = "%s%s__price__last"
100100
101101
102102 func ph (h,timestamp) = makeString(["%s%s%d%d__price__history", toString(h), toString(timestamp)], SEP)
103103
104104
105105 func pau (userAddress,txId) = ((("%s%s%s__P__" + userAddress) + "__") + txId)
106106
107107
108108 func gau (userAddress,txId) = ((("%s%s%s__G__" + userAddress) + "__") + txId)
109109
110110
111111 func aa () = "%s__amountAsset"
112112
113113
114114 func pa () = "%s__priceAsset"
115115
116116
117117 let keyFee = "%s__fee"
118118
119119 let feeDefault = fraction(10, scale8, 10000)
120120
121121 let fee = valueOrElse(getInteger(this, keyFee), feeDefault)
122122
123123 let keyKLp = makeString(["%s", "kLp"], SEP)
124124
125125 let keyKLpRefreshedHeight = makeString(["%s", "kLpRefreshedHeight"], SEP)
126126
127127 let keyKLpRefreshDelay = makeString(["%s", "refreshKLpDelay"], SEP)
128128
129129 let kLpRefreshDelayDefault = 30
130130
131131 let kLpRefreshDelay = valueOrElse(getInteger(this, keyKLpRefreshDelay), kLpRefreshDelayDefault)
132132
133133 func keyAdditionalBalance (assetId) = makeString(["%s%s", "stakedBalance", assetId], SEP)
134134
135135
136136 func keyStakingAssetBalance (assetId) = makeString(["%s%s", "shareAssetBalance", assetId], SEP)
137137
138138
139139 func getAdditionalBalanceOrZero (assetId) = valueOrElse(getInteger(this, keyAdditionalBalance(assetId)), 0)
140140
141141
142142 func getStakingAssetBalanceOrZero (assetId) = valueOrElse(getInteger(this, keyStakingAssetBalance(assetId)), 0)
143143
144144
145145 func keyFactoryConfig () = "%s__factoryConfig"
146146
147147
148148 func keyMatcherPub () = "%s%s__matcher__publicKey"
149149
150150
151151 func keyMappingPoolContractAddressToPoolAssets (poolContractAddress) = (("%s%s%s__" + poolContractAddress) + "__mappings__poolContract2LpAsset")
152152
153153
154154 func keyPoolConfig (iAmtAsset,iPriceAsset) = (((("%d%d%s__" + iAmtAsset) + "__") + iPriceAsset) + "__config")
155155
156156
157157 func keyMappingsBaseAsset2internalId (baseAssetStr) = ("%s%s%s__mappings__baseAsset2internalId__" + baseAssetStr)
158158
159159
160160 func keyAllPoolsShutdown () = "%s__shutdown"
161161
162162
163163 func keyPoolWeight (contractAddress) = ("%s%s__poolWeight__" + contractAddress)
164164
165165
166166 func keyAllowedLpScriptHash () = "%s__allowedLpScriptHash"
167167
168168
169169 let keyFeeCollectorAddress = "%s__feeCollectorAddress"
170170
171171 func keySkipOrderValidation (poolAddress) = ("%s%s__skipOrderValidation__" + poolAddress)
172172
173173
174174 func throwOrderError (orderValid,orderValidInfo,senderValid,matcherValid) = throw((((((((("order validation failed: orderValid=" + toString(orderValid)) + " (") + orderValidInfo) + ")") + " senderValid=") + toString(senderValid)) + " matcherValid=") + toString(matcherValid)))
175175
176176
177177 func addressFromStringOrThis (addressString) = match addressFromString(addressString) {
178178 case a: Address =>
179179 a
180180 case _ =>
181181 this
182182 }
183183
184184
185185 func getManagerVaultAddressOrThis () = {
186186 let factoryAddress = match getString(fc()) {
187187 case fca: String =>
188188 addressFromStringOrThis(fca)
189189 case _ =>
190190 this
191191 }
192192 match getString(factoryAddress, keyManagerVaultAddress()) {
193193 case s: String =>
194194 addressFromStringOrThis(s)
195195 case _ =>
196196 this
197197 }
198198 }
199199
200200
201201 func getStringOrFail (address,key) = valueOrErrorMessage(getString(address, key), makeString(["mandatory ", toString(address), ".", key, " is not defined"], ""))
202202
203203
204204 func getIntOrFail (address,key) = valueOrErrorMessage(getInteger(address, key), makeString(["mandatory ", toString(address), ".", key, " is not defined"], ""))
205205
206206
207207 func throwErr (msg) = throw(makeString(["lp.ride:", msg], " "))
208208
209209
210210 func fmtErr (msg) = makeString(["lp.ride:", msg], " ")
211211
212212
213213 let factoryContract = addressFromStringValue(getStringOrFail(this, fc()))
214214
215215 let feeCollectorAddress = addressFromStringValue(getStringOrFail(factoryContract, keyFeeCollectorAddress))
216216
217217 let inFee = {
218218 let @ = invoke(factoryContract, "getInFeeREADONLY", [toString(this)], nil)
219219 if ($isInstanceOf(@, "Int"))
220220 then @
221221 else throw(($getType(@) + " couldn't be cast to Int"))
222222 }
223223
224224 let outFee = {
225225 let @ = invoke(factoryContract, "getOutFeeREADONLY", [toString(this)], nil)
226226 if ($isInstanceOf(@, "Int"))
227227 then @
228228 else throw(($getType(@) + " couldn't be cast to Int"))
229229 }
230230
231231 func isGlobalShutdown () = valueOrElse(getBoolean(factoryContract, keyAllPoolsShutdown()), false)
232232
233233
234234 func getMatcherPubOrFail () = fromBase58String(getStringOrFail(factoryContract, keyMatcherPub()))
235235
236236
237237 func getPoolConfig () = {
238238 let amtAsset = getStringOrFail(this, aa())
239239 let priceAsset = getStringOrFail(this, pa())
240240 let iPriceAsset = getIntOrFail(factoryContract, keyMappingsBaseAsset2internalId(priceAsset))
241241 let iAmtAsset = getIntOrFail(factoryContract, keyMappingsBaseAsset2internalId(amtAsset))
242242 split(getStringOrFail(factoryContract, keyPoolConfig(toString(iAmtAsset), toString(iPriceAsset))), SEP)
243243 }
244244
245245
246246 func parseAssetId (input) = if ((input == wavesString))
247247 then unit
248248 else fromBase58String(input)
249249
250250
251251 func assetIdToString (input) = if ((input == unit))
252252 then wavesString
253253 else toBase58String(value(input))
254254
255255
256256 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]))
257257
258258
259259 let poolConfigParsed = parsePoolConfig(getPoolConfig())
260260
261261 let $t095299695 = poolConfigParsed
262262
263263 let cfgPoolAddress = $t095299695._1
264264
265265 let cfgPoolStatus = $t095299695._2
266266
267267 let cfgLpAssetId = $t095299695._3
268268
269269 let cfgAmountAssetId = $t095299695._4
270270
271271 let cfgPriceAssetId = $t095299695._5
272272
273273 let cfgAmountAssetDecimals = $t095299695._6
274274
275275 let cfgPriceAssetDecimals = $t095299695._7
276276
277277 func getFactoryConfig () = split(getStringOrFail(factoryContract, keyFactoryConfig()), SEP)
278278
279279
280280 let stakingContract = valueOrErrorMessage(addressFromString(getFactoryConfig()[idxFactoryStakingContract]), "incorrect staking address")
281281
282282 let slippageContract = valueOrErrorMessage(addressFromString(getFactoryConfig()[idxFactorySlippageContract]), "incorrect staking address")
283283
284284 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)
285285
286286
287287 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)
288288
289289
290290 func getAccBalance (assetId) = {
291291 let balanceOnPool = if ((assetId == "WAVES"))
292292 then wavesBalance(this).available
293293 else assetBalance(this, fromBase58String(assetId))
294294 let totalBalance = ((balanceOnPool + getAdditionalBalanceOrZero(assetId)) - getStakingAssetBalanceOrZero(assetId))
295295 max([0, totalBalance])
296296 }
297297
298298
299299 func calcPriceBigInt (prAmtX18,amAmtX18) = fraction(prAmtX18, scale18, amAmtX18)
300300
301301
302302 func calcPriceBigIntRound (prAmtX18,amAmtX18,round) = fraction(prAmtX18, scale18, amAmtX18, round)
303303
304304
305305 func getRate (proxy) = {
306306 let inv = invoke(proxy, "getRate", nil, nil)
307307 if ((inv == inv))
308308 then match inv {
309309 case r: Int =>
310310 r
311311 case _ =>
312312 throwErr("proxy.getRate() unexpected value")
313313 }
314314 else throw("Strict value is not equal to itself.")
315315 }
316316
317317
318318 func deposit (assetId,amount,stakingAssetId,proxy) = {
319319 let currentAdditionalBalance = getAdditionalBalanceOrZero(assetId)
320320 if ((currentAdditionalBalance == currentAdditionalBalance))
321321 then {
322322 let currentStakingAssetBalance = getStakingAssetBalanceOrZero(stakingAssetId)
323323 if ((currentStakingAssetBalance == currentStakingAssetBalance))
324324 then {
325325 let asset = parseAssetId(assetId)
326326 if ((amount > 0))
327327 then {
328328 let depositInvoke = invoke(proxy, "deposit", nil, [AttachedPayment(asset, amount)])
329329 if ((depositInvoke == depositInvoke))
330330 then match depositInvoke {
331331 case receivedStakingAsset: Int =>
332332 let newAdditionalBalance = (currentAdditionalBalance + amount)
333333 let newStakingAssetBalance = (currentStakingAssetBalance + receivedStakingAsset)
334334 [IntegerEntry(keyAdditionalBalance(assetId), newAdditionalBalance), IntegerEntry(keyStakingAssetBalance(stakingAssetId), newStakingAssetBalance)]
335335 case _ =>
336336 nil
337337 }
338338 else throw("Strict value is not equal to itself.")
339339 }
340340 else nil
341341 }
342342 else throw("Strict value is not equal to itself.")
343343 }
344344 else throw("Strict value is not equal to itself.")
345345 }
346346
347347
348348 func withdraw (assetId,amount,stakingAssetId,proxy,proxyRateMul,profitAddress) = {
349349 let currentAdditionalBalance = getAdditionalBalanceOrZero(assetId)
350350 if ((currentAdditionalBalance == currentAdditionalBalance))
351351 then {
352352 let currentStakingAssetBalance = getStakingAssetBalanceOrZero(stakingAssetId)
353353 if ((currentStakingAssetBalance == currentStakingAssetBalance))
354354 then {
355355 let currentProxyRate = getRate(proxy)
356356 if ((currentProxyRate == currentProxyRate))
357357 then {
358358 let oldRate = fraction(proxyRateMul, currentAdditionalBalance, currentStakingAssetBalance)
359359 let stakingAsset = parseAssetId(stakingAssetId)
360360 let oldSendStakingAmount = fraction(proxyRateMul, amount, oldRate)
361361 let sendStakingAssetAmount = fraction(proxyRateMul, amount, currentProxyRate)
362362 let profitAmount = max([0, (oldSendStakingAmount - sendStakingAssetAmount)])
363363 if ((sendStakingAssetAmount > 0))
364364 then {
365365 let withdrawInvoke = invoke(proxy, "withdraw", nil, [AttachedPayment(stakingAsset, sendStakingAssetAmount)])
366366 if ((withdrawInvoke == withdrawInvoke))
367367 then match withdrawInvoke {
368368 case receivedAssets: Int =>
369369 let newAdditionalBalance = (currentAdditionalBalance - receivedAssets)
370370 let newStakingAssetBalance = ((currentStakingAssetBalance - sendStakingAssetAmount) - profitAmount)
371371 [IntegerEntry(keyAdditionalBalance(assetId), newAdditionalBalance), IntegerEntry(keyStakingAssetBalance(stakingAssetId), newStakingAssetBalance), ScriptTransfer(profitAddress, profitAmount, parseAssetId(stakingAssetId))]
372372 case _ =>
373373 nil
374374 }
375375 else throw("Strict value is not equal to itself.")
376376 }
377377 else nil
378378 }
379379 else throw("Strict value is not equal to itself.")
380380 }
381381 else throw("Strict value is not equal to itself.")
382382 }
383383 else throw("Strict value is not equal to itself.")
384384 }
385385
386386
387387 func getLeaseProxyConfig (assetId) = match invoke(factoryContract, "getPoolLeaseConfigREADONLY", [toString(this), assetId], nil) {
388388 case a: (Boolean, Int, Int, String, String, Int, String) =>
389389 a
390390 case _ =>
391391 throwErr((("[" + assetId) + "] getLeaseProxyConfig() error"))
392392 }
393393
394394
395395 func rebalanceInternal (targetRatio,assetId,stakingAssetId,minBalance,proxy,proxyRateMul,profitAddress) = {
396396 let currentAdditionalBalance = getAdditionalBalanceOrZero(assetId)
397397 if ((currentAdditionalBalance == currentAdditionalBalance))
398398 then {
399399 let currentStakingAssetBalance = getStakingAssetBalanceOrZero(stakingAssetId)
400400 if ((currentStakingAssetBalance == currentStakingAssetBalance))
401401 then {
402402 let leasableTotalBalance = max([0, (getAccBalance(assetId) - minBalance)])
403403 let targetAdditionalBalance = fraction(targetRatio, leasableTotalBalance, 100)
404404 let diff = (currentAdditionalBalance - targetAdditionalBalance)
405405 if ((diff == 0))
406406 then nil
407407 else if ((0 > diff))
408408 then {
409409 let sendAssetAmount = -(diff)
410410 deposit(assetId, sendAssetAmount, stakingAssetId, proxy)
411411 }
412412 else {
413413 let getAssetAmount = diff
414414 withdraw(assetId, getAssetAmount, stakingAssetId, proxy, proxyRateMul, profitAddress)
415415 }
416416 }
417417 else throw("Strict value is not equal to itself.")
418418 }
419419 else throw("Strict value is not equal to itself.")
420420 }
421421
422422
423423 func rebalanceAsset (assetId) = {
424424 let $t01593116067 = getLeaseProxyConfig(assetId)
425425 let isLeasable = $t01593116067._1
426426 let leasedRatio = $t01593116067._2
427427 let minBalance = $t01593116067._3
428428 let proxyAddress = $t01593116067._4
429429 let proxyAssetId = $t01593116067._5
430430 let proxyRateMul = $t01593116067._6
431431 let stakingProfitAddress = $t01593116067._7
432432 if (isLeasable)
433433 then rebalanceInternal(leasedRatio, assetId, proxyAssetId, minBalance, addressFromStringValue(proxyAddress), proxyRateMul, addressFromStringValue(stakingProfitAddress))
434434 else nil
435435 }
436436
437437
438438 func withdrawAndRebalanceAsset (assetId,getAmount) = {
439439 let $t01646616602 = getLeaseProxyConfig(assetId)
440440 let isLeasable = $t01646616602._1
441441 let leasedRatio = $t01646616602._2
442442 let minBalance = $t01646616602._3
443443 let proxyAddress = $t01646616602._4
444444 let proxyAssetId = $t01646616602._5
445445 let proxyRateMul = $t01646616602._6
446446 let stakingProfitAddress = $t01646616602._7
447447 if (isLeasable)
448448 then {
449449 let newTotalLeasableBalance = max([0, ((getAccBalance(assetId) - getAmount) - minBalance)])
450450 if ((newTotalLeasableBalance == newTotalLeasableBalance))
451451 then {
452452 let newAdditionalBalance = fraction(leasedRatio, newTotalLeasableBalance, 100)
453453 if ((newAdditionalBalance == newAdditionalBalance))
454454 then {
455455 let withdrawAmount = (getAdditionalBalanceOrZero(assetId) - newAdditionalBalance)
456456 if ((withdrawAmount == withdrawAmount))
457457 then if ((0 > withdrawAmount))
458458 then deposit(assetId, -(withdrawAmount), proxyAssetId, addressFromStringValue(proxyAddress))
459459 else withdraw(assetId, withdrawAmount, proxyAssetId, addressFromStringValue(proxyAddress), proxyRateMul, addressFromStringValue(stakingProfitAddress))
460460 else throw("Strict value is not equal to itself.")
461461 }
462462 else throw("Strict value is not equal to itself.")
463463 }
464464 else throw("Strict value is not equal to itself.")
465465 }
466466 else nil
467467 }
468468
469469
470470 func withdrawAndRebalanceAll (amountAssetOutAmount,priceAssetOutAmount) = {
471471 let AmAmtWithdrawState = withdrawAndRebalanceAsset(getStringOrFail(this, aa()), amountAssetOutAmount)
472472 let PrAmtWithdrawState = withdrawAndRebalanceAsset(getStringOrFail(this, pa()), priceAssetOutAmount)
473473 (AmAmtWithdrawState ++ PrAmtWithdrawState)
474474 }
475475
476476
477477 func privateCalcPrice (amAssetDcm,prAssetDcm,amAmt,prAmt) = {
478478 let amtAssetAmtX18 = toX18(amAmt, amAssetDcm)
479479 let priceAssetAmtX18 = toX18(prAmt, prAssetDcm)
480480 calcPriceBigInt(priceAssetAmtX18, amtAssetAmtX18)
481481 }
482482
483483
484484 func calcPrices (amAmt,prAmt,lpAmt) = {
485485 let cfg = getPoolConfig()
486486 let amtAssetDcm = parseIntValue(cfg[idxAmtAssetDcm])
487487 let priceAssetDcm = parseIntValue(cfg[idxPriceAssetDcm])
488488 let priceX18 = privateCalcPrice(amtAssetDcm, priceAssetDcm, amAmt, prAmt)
489489 let amAmtX18 = toX18(amAmt, amtAssetDcm)
490490 let prAmtX18 = toX18(prAmt, priceAssetDcm)
491491 let lpAmtX18 = toX18(lpAmt, scale8)
492492 let lpPriceInAmAssetX18 = calcPriceBigInt(amAmtX18, lpAmtX18)
493493 let lpPriceInPrAssetX18 = calcPriceBigInt(prAmtX18, lpAmtX18)
494494 [priceX18, lpPriceInAmAssetX18, lpPriceInPrAssetX18]
495495 }
496496
497497
498498 func calculatePrices (amAmt,prAmt,lpAmt) = {
499499 let prices = calcPrices(amAmt, prAmt, lpAmt)
500500 [fromX18(prices[0], scale8), fromX18(prices[1], scale8), fromX18(prices[2], scale8)]
501501 }
502502
503503
504504 func estimateGetOperation (txId58,pmtAssetId,pmtLpAmt,userAddress) = {
505505 let cfg = getPoolConfig()
506506 let lpAssetId = cfg[idxPoolLPAssetId]
507507 let amAssetId = cfg[idxAmtAssetId]
508508 let prAssetId = cfg[idxPriceAssetId]
509509 let amAssetDcm = parseIntValue(cfg[idxAmtAssetDcm])
510510 let prAssetDcm = parseIntValue(cfg[idxPriceAssetDcm])
511511 let poolStatus = cfg[idxPoolStatus]
512512 let lpEmission = valueOrErrorMessage(assetInfo(fromBase58String(lpAssetId)), (("Asset " + lpAssetId) + " doesn't exist")).quantity
513513 if ((lpAssetId != pmtAssetId))
514514 then throw("Invalid asset passed.")
515515 else {
516516 let amBalance = getAccBalance(amAssetId)
517517 let amBalanceX18 = toX18(amBalance, amAssetDcm)
518518 let prBalance = getAccBalance(prAssetId)
519519 let prBalanceX18 = toX18(prBalance, prAssetDcm)
520520 let curPriceX18 = calcPriceBigInt(prBalanceX18, amBalanceX18)
521521 let curPrice = fromX18(curPriceX18, scale8)
522522 let pmtLpAmtX18 = toX18(pmtLpAmt, scale8)
523523 let lpEmissionX18 = toX18(lpEmission, scale8)
524524 let outAmAmtX18 = fraction(amBalanceX18, pmtLpAmtX18, lpEmissionX18)
525525 let outPrAmtX18 = fraction(prBalanceX18, pmtLpAmtX18, lpEmissionX18)
526526 let outAmAmt = fromX18Round(outAmAmtX18, amAssetDcm, FLOOR)
527527 let outPrAmt = fromX18Round(outPrAmtX18, prAssetDcm, FLOOR)
528528 let state = if ((txId58 == ""))
529529 then nil
530530 else [ScriptTransfer(userAddress, outAmAmt, if ((amAssetId == "WAVES"))
531531 then unit
532532 else fromBase58String(amAssetId)), ScriptTransfer(userAddress, outPrAmt, if ((prAssetId == "WAVES"))
533533 then unit
534534 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)]
535535 $Tuple10(outAmAmt, outPrAmt, amAssetId, prAssetId, amBalance, prBalance, lpEmission, curPriceX18, poolStatus, state)
536536 }
537537 }
538538
539539
540540 func estimatePutOperation (txId58,slippageTolerance,inAmAssetAmt,inAmAssetId,inPrAssetAmt,inPrAssetId,userAddress,isEvaluate,emitLp) = {
541541 let cfg = getPoolConfig()
542542 let lpAssetId = fromBase58String(cfg[idxPoolLPAssetId])
543543 let amAssetIdStr = cfg[idxAmtAssetId]
544544 let prAssetIdStr = cfg[idxPriceAssetId]
545545 let iAmtAssetId = cfg[idxIAmtAssetId]
546546 let iPriceAssetId = cfg[idxIPriceAssetId]
547547 let amtAssetDcm = parseIntValue(cfg[idxAmtAssetDcm])
548548 let priceAssetDcm = parseIntValue(cfg[idxPriceAssetDcm])
549549 let poolStatus = cfg[idxPoolStatus]
550550 let lpEmission = valueOrErrorMessage(assetInfo(lpAssetId), (("Asset " + toBase58String(lpAssetId)) + " doesn't exist")).quantity
551551 let inAmAssetIdStr = toBase58String(valueOrElse(inAmAssetId, fromBase58String("WAVES")))
552552 let inPrAssetIdStr = toBase58String(valueOrElse(inPrAssetId, fromBase58String("WAVES")))
553553 if (if ((amAssetIdStr != inAmAssetIdStr))
554554 then true
555555 else (prAssetIdStr != inPrAssetIdStr))
556556 then throw("Invalid amt or price asset passed.")
557557 else {
558558 let amBalance = if (isEvaluate)
559559 then getAccBalance(amAssetIdStr)
560560 else (getAccBalance(amAssetIdStr) - inAmAssetAmt)
561561 let prBalance = if (isEvaluate)
562562 then getAccBalance(prAssetIdStr)
563563 else (getAccBalance(prAssetIdStr) - inPrAssetAmt)
564564 let inAmAssetAmtX18 = toX18(inAmAssetAmt, amtAssetDcm)
565565 let inPrAssetAmtX18 = toX18(inPrAssetAmt, priceAssetDcm)
566566 let userPriceX18 = calcPriceBigInt(inPrAssetAmtX18, inAmAssetAmtX18)
567567 let amBalanceX18 = toX18(amBalance, amtAssetDcm)
568568 let prBalanceX18 = toX18(prBalance, priceAssetDcm)
569569 let res = if ((lpEmission == 0))
570570 then {
571571 let curPriceX18 = zeroBigInt
572572 let slippageX18 = zeroBigInt
573573 let lpAmtX18 = pow((inAmAssetAmtX18 * inPrAssetAmtX18), 0, toBigInt(5), 1, 0, DOWN)
574574 $Tuple5(fromX18(lpAmtX18, scale8), fromX18(inAmAssetAmtX18, amtAssetDcm), fromX18(inPrAssetAmtX18, priceAssetDcm), calcPriceBigInt((prBalanceX18 + inPrAssetAmtX18), (amBalanceX18 + inAmAssetAmtX18)), slippageX18)
575575 }
576576 else {
577577 let curPriceX18 = calcPriceBigInt(prBalanceX18, amBalanceX18)
578578 let slippageX18 = fraction(absBigInt((curPriceX18 - userPriceX18)), scale18, curPriceX18)
579579 let slippageToleranceX18 = toX18(slippageTolerance, scale8)
580580 if (if ((curPriceX18 != zeroBigInt))
581581 then (slippageX18 > slippageToleranceX18)
582582 else false)
583583 then throw(((("Price slippage " + toString(slippageX18)) + " exceeded the passed limit of ") + toString(slippageToleranceX18)))
584584 else {
585585 let lpEmissionX18 = toX18(lpEmission, scale8)
586586 let prViaAmX18 = fraction(inAmAssetAmtX18, calcPriceBigIntRound(prBalanceX18, amBalanceX18, CEILING), scale18, CEILING)
587587 let amViaPrX18 = fraction(inPrAssetAmtX18, scale18, calcPriceBigIntRound(prBalanceX18, amBalanceX18, FLOOR), CEILING)
588588 let expectedAmts = if ((prViaAmX18 > inPrAssetAmtX18))
589589 then $Tuple2(amViaPrX18, inPrAssetAmtX18)
590590 else $Tuple2(inAmAssetAmtX18, prViaAmX18)
591591 let expAmtAssetAmtX18 = expectedAmts._1
592592 let expPriceAssetAmtX18 = expectedAmts._2
593593 let lpAmtX18 = fraction(lpEmissionX18, expPriceAssetAmtX18, prBalanceX18, FLOOR)
594594 $Tuple5(fromX18Round(lpAmtX18, scale8, FLOOR), fromX18Round(expAmtAssetAmtX18, amtAssetDcm, CEILING), fromX18Round(expPriceAssetAmtX18, priceAssetDcm, CEILING), curPriceX18, slippageX18)
595595 }
596596 }
597597 let calcLpAmt = res._1
598598 let calcAmAssetPmt = res._2
599599 let calcPrAssetPmt = res._3
600600 let curPrice = fromX18(res._4, scale8)
601601 let slippageCalc = fromX18(res._5, scale8)
602602 if ((0 >= calcLpAmt))
603603 then throw("Invalid calculations. LP calculated is less than zero.")
604604 else {
605605 let emitLpAmt = if (!(emitLp))
606606 then 0
607607 else calcLpAmt
608608 let amDiff = (inAmAssetAmt - calcAmAssetPmt)
609609 let prDiff = (inPrAssetAmt - calcPrAssetPmt)
610610 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))]
611611 $Tuple13(calcLpAmt, emitLpAmt, curPrice, amBalance, prBalance, lpEmission, lpAssetId, poolStatus, commonState, amDiff, prDiff, inAmAssetId, inPrAssetId)
612612 }
613613 }
614614 }
615615
616616
617617 func calcKLp (amountBalance,priceBalance,lpEmission) = {
618618 let amountBalanceX18 = toX18BigInt(amountBalance, toBigInt(cfgAmountAssetDecimals))
619619 let priceBalanceX18 = toX18BigInt(priceBalance, toBigInt(cfgPriceAssetDecimals))
620620 let updatedKLp = fraction(pow((amountBalanceX18 * priceBalanceX18), 0, toBigInt(5), 1, 18, DOWN), big1, lpEmission)
621621 if ((lpEmission == big0))
622622 then big0
623623 else updatedKLp
624624 }
625625
626626
627627 func calcCurrentKLp (amountAssetDelta,priceAssetDelta,lpAssetEmissionDelta) = {
628628 let amountAssetBalance = (toBigInt(getAccBalance(assetIdToString(cfgAmountAssetId))) - amountAssetDelta)
629629 let priceAssetBalance = (toBigInt(getAccBalance(assetIdToString(cfgPriceAssetId))) - priceAssetDelta)
630630 let lpAssetEmission = (toBigInt(value(assetInfo(cfgLpAssetId)).quantity) - lpAssetEmissionDelta)
631631 let currentKLp = calcKLp(amountAssetBalance, priceAssetBalance, lpAssetEmission)
632632 currentKLp
633633 }
634634
635635
636636 func refreshKLpInternal (amountAssetBalanceDelta,priceAssetBalanceDelta,lpAssetEmissionDelta) = {
637637 let amountAssetBalance = (getAccBalance(assetIdToString(cfgAmountAssetId)) + amountAssetBalanceDelta)
638638 let priceAssetBalance = (getAccBalance(assetIdToString(cfgPriceAssetId)) + priceAssetBalanceDelta)
639639 let lpAssetEmission = (value(assetInfo(cfgLpAssetId)).quantity + lpAssetEmissionDelta)
640640 let updatedKLp = calcKLp(toBigInt(amountAssetBalance), toBigInt(priceAssetBalance), toBigInt(lpAssetEmission))
641641 let actions = [IntegerEntry(keyKLpRefreshedHeight, height), StringEntry(keyKLp, toString(updatedKLp))]
642642 $Tuple2(actions, updatedKLp)
643643 }
644644
645645
646646 func skipOrderValidation () = valueOrElse(getBoolean(factoryContract, keySkipOrderValidation(toString(this))), false)
647647
648648
649649 func validateUpdatedKLp (oldKLp,updatedKLp) = if ((updatedKLp >= oldKLp))
650650 then true
651651 else throwErr(makeString(["updated KLp lower than current KLp", toString(oldKLp), toString(updatedKLp)], " "))
652652
653653
654654 func validateMatcherOrderAllowed (order) = {
655655 let amountAssetBalance = getAccBalance(assetIdToString(cfgAmountAssetId))
656656 let priceAssetBalance = getAccBalance(assetIdToString(cfgPriceAssetId))
657657 let amountAssetAmount = order.amount
658658 let priceAssetAmount = fraction(order.amount, order.price, scale8, FLOOR)
659659 let $t02899129203 = if ((order.orderType == Buy))
660660 then $Tuple2(amountAssetAmount, -(priceAssetAmount))
661661 else $Tuple2(-(amountAssetAmount), priceAssetAmount)
662662 let amountAssetBalanceDelta = $t02899129203._1
663663 let priceAssetBalanceDelta = $t02899129203._2
664664 if (if (if (isGlobalShutdown())
665665 then true
666666 else (cfgPoolStatus == PoolMatcherDisabled))
667667 then true
668668 else (cfgPoolStatus == PoolShutdown))
669669 then throw("Exchange operations disabled")
670670 else if (if ((order.assetPair.amountAsset != cfgAmountAssetId))
671671 then true
672672 else (order.assetPair.priceAsset != cfgPriceAssetId))
673673 then throw("Wrong order assets.")
674674 else {
675675 let kLp = valueOrErrorMessage(parseBigInt(valueOrElse(getString(this, keyKLp), "0")), fmtErr("invalid kLp"))
676676 let $t02964329743 = refreshKLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
677677 let unusedActions = $t02964329743._1
678678 let kLpNew = $t02964329743._2
679679 let isOrderValid = (kLpNew >= kLp)
680680 let info = makeString(["kLp=", toString(kLp), " kLpNew=", toString(kLpNew), " amountAssetBalance=", toString(amountAssetBalance), " priceAssetBalance=", toString(priceAssetBalance), " amountAssetBalanceDelta=", toString(amountAssetBalanceDelta), " priceAssetBalanceDelta=", toString(priceAssetBalanceDelta), " height=", toString(height)], "")
681681 $Tuple2(isOrderValid, info)
682682 }
683683 }
684684
685685
686686 func commonGet (i) = if ((size(i.payments) != 1))
687687 then throw("exactly 1 payment is expected")
688688 else {
689689 let pmt = value(i.payments[0])
690690 let pmtAssetId = value(pmt.assetId)
691691 let pmtAmt = pmt.amount
692692 let res = estimateGetOperation(toBase58String(i.transactionId), toBase58String(pmtAssetId), pmtAmt, i.caller)
693693 let outAmAmt = res._1
694694 let outPrAmt = res._2
695695 let poolStatus = parseIntValue(res._9)
696696 let state = res._10
697697 if (if (isGlobalShutdown())
698698 then true
699699 else (poolStatus == PoolShutdown))
700700 then throw(("Get operation is blocked by admin. Status = " + toString(poolStatus)))
701701 else $Tuple5(outAmAmt, outPrAmt, pmtAmt, pmtAssetId, state)
702702 }
703703
704704
705705 func commonPut (i,slippageTolerance,emitLp) = if ((size(i.payments) != 2))
706706 then throw("exactly 2 payments are expected")
707707 else {
708708 let amAssetPmt = value(i.payments[0])
709709 let prAssetPmt = value(i.payments[1])
710710 let estPut = estimatePutOperation(toBase58String(i.transactionId), slippageTolerance, amAssetPmt.amount, amAssetPmt.assetId, prAssetPmt.amount, prAssetPmt.assetId, toString(i.caller), false, emitLp)
711711 let poolStatus = parseIntValue(estPut._8)
712712 if (if (if (isGlobalShutdown())
713713 then true
714714 else (poolStatus == PoolPutDisabled))
715715 then true
716716 else (poolStatus == PoolShutdown))
717717 then throw(("Put operation is blocked by admin. Status = " + toString(poolStatus)))
718718 else estPut
719719 }
720720
721721
722722 func emit (amount) = {
723723 let emitInv = invoke(factoryContract, "emit", [amount], nil)
724724 if ((emitInv == emitInv))
725725 then {
726726 let emitInvLegacy = match emitInv {
727727 case legacyFactoryContract: Address =>
728728 invoke(legacyFactoryContract, "emit", [amount], nil)
729729 case _ =>
730730 unit
731731 }
732732 if ((emitInvLegacy == emitInvLegacy))
733733 then amount
734734 else throw("Strict value is not equal to itself.")
735735 }
736736 else throw("Strict value is not equal to itself.")
737737 }
738738
739739
740740 func takeFee (amount,fee) = {
741741 let feeAmount = if ((fee == 0))
742742 then 0
743743 else fraction(amount, fee, scale8)
744744 $Tuple2((amount - feeAmount), feeAmount)
745745 }
746746
747747
748748 func calcPutOneToken (paymentAmountRaw,paymentAssetId,userAddress,txId) = {
749749 let isEval = (txId == unit)
750750 let amountBalanceRaw = getAccBalance(assetIdToString(cfgAmountAssetId))
751751 let priceBalanceRaw = getAccBalance(assetIdToString(cfgPriceAssetId))
752752 let paymentInAmountAsset = if ((paymentAssetId == cfgAmountAssetId))
753753 then true
754754 else if ((paymentAssetId == cfgPriceAssetId))
755755 then false
756756 else throwErr("invalid asset")
757757 let $t03285633149 = if (isEval)
758758 then $Tuple2(amountBalanceRaw, priceBalanceRaw)
759759 else if (paymentInAmountAsset)
760760 then $Tuple2((amountBalanceRaw - paymentAmountRaw), priceBalanceRaw)
761761 else $Tuple2(amountBalanceRaw, (priceBalanceRaw - paymentAmountRaw))
762762 let amountBalanceOld = $t03285633149._1
763763 let priceBalanceOld = $t03285633149._2
764764 let $t03315333302 = if (paymentInAmountAsset)
765765 then $Tuple2(paymentAmountRaw, 0)
766766 else $Tuple2(0, paymentAmountRaw)
767767 let amountAssetAmountRaw = $t03315333302._1
768768 let priceAssetAmountRaw = $t03315333302._2
769769 let amountAssetAmount = takeFee(amountAssetAmountRaw, inFee)._1
770770 let priceAssetAmount = takeFee(priceAssetAmountRaw, inFee)._1
771771 let $t03343433498 = takeFee(paymentAmountRaw, inFee)
772772 let paymentAmount = $t03343433498._1
773773 let feeAmount = $t03343433498._2
774774 let amountBalanceNew = (amountBalanceOld + amountAssetAmount)
775775 let priceBalanceNew = (priceBalanceOld + priceAssetAmount)
776776 let priceNewX18 = calcPriceBigInt(toX18(priceBalanceNew, cfgPriceAssetDecimals), toX18(amountBalanceNew, cfgAmountAssetDecimals))
777777 let priceNew = fromX18(priceNewX18, scale8)
778778 let paymentBalance = if (paymentInAmountAsset)
779779 then amountBalanceOld
780780 else priceBalanceOld
781781 let paymentBalanceBigInt = toBigInt(paymentBalance)
782782 let supplyBigInt = toBigInt(valueOrErrorMessage(assetInfo(cfgLpAssetId), (("asset " + toBase58String(cfgLpAssetId)) + " doesn't exist")).quantity)
783783 let chechSupply = if ((supplyBigInt > big0))
784784 then true
785785 else throwErr("initial deposit requires all coins")
786786 if ((chechSupply == chechSupply))
787787 then {
788788 let depositBigInt = toBigInt(paymentAmount)
789789 let issueAmount = max([0, toInt(((supplyBigInt * (sqrtBigInt((scale18 + ((depositBigInt * scale18) / paymentBalanceBigInt)), 18, 18, DOWN) - scale18)) / scale18))])
790790 let commonState = if (isEval)
791791 then nil
792792 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))]
793793 let priceOldX18 = calcPriceBigInt(toX18(priceBalanceOld, cfgPriceAssetDecimals), toX18(amountBalanceOld, cfgAmountAssetDecimals))
794794 let priceOld = fromX18(priceOldX18, scale8)
795795 let loss = {
796796 let $t03517935346 = if (paymentInAmountAsset)
797797 then $Tuple2(amountAssetAmountRaw, amountBalanceOld)
798798 else $Tuple2(priceAssetAmountRaw, priceBalanceOld)
799799 let amount = $t03517935346._1
800800 let balance = $t03517935346._2
801801 let issueAmountBoth = toInt(fraction(supplyBigInt, toBigInt((amount / 2)), toBigInt(balance)))
802802 fraction((issueAmount - issueAmountBoth), scale8, issueAmountBoth)
803803 }
804804 $Tuple5(issueAmount, commonState, feeAmount, loss, paymentInAmountAsset)
805805 }
806806 else throw("Strict value is not equal to itself.")
807807 }
808808
809809
810810 func calcGetOneToken (outAssetId,paymentAmount,paymentAssetId,userAddress,txId) = {
811811 let isEval = (txId == unit)
812812 let cfg = getPoolConfig()
813813 let amtAssetDcm = parseIntValue(cfg[idxAmtAssetDcm])
814814 let priceAssetDcm = parseIntValue(cfg[idxPriceAssetDcm])
815815 let checks = [if ((paymentAssetId == cfgLpAssetId))
816816 then true
817817 else throwErr("invalid lp asset")]
818818 if ((checks == checks))
819819 then {
820820 let outInAmountAsset = if ((outAssetId == cfgAmountAssetId))
821821 then true
822822 else if ((outAssetId == cfgPriceAssetId))
823823 then false
824824 else throwErr("invalid asset")
825825 let balanceBigInt = if (outInAmountAsset)
826826 then toBigInt(getAccBalance(assetIdToString(cfgAmountAssetId)))
827827 else toBigInt(getAccBalance(assetIdToString(cfgPriceAssetId)))
828828 let outInAmountAssetDecimals = if (outInAmountAsset)
829829 then amtAssetDcm
830830 else priceAssetDcm
831831 let amBalanceOld = getAccBalance(assetIdToString(cfgAmountAssetId))
832832 let prBalanceOld = getAccBalance(assetIdToString(cfgPriceAssetId))
833833 let outBalance = if (outInAmountAsset)
834834 then amBalanceOld
835835 else prBalanceOld
836836 let outBalanceBigInt = toBigInt(outBalance)
837837 let supplyBigInt = toBigInt(valueOrErrorMessage(assetInfo(cfgLpAssetId), (("asset " + toBase58String(cfgLpAssetId)) + " doesn't exist")).quantity)
838838 let redeemedBigInt = toBigInt(paymentAmount)
839839 let amountRaw = max([0, toInt(((balanceBigInt * (scale18 - pow((scale18 - ((redeemedBigInt * scale18) / supplyBigInt)), 18, big2, 0, 18, DOWN))) / scale18))])
840840 let $t03742437480 = takeFee(amountRaw, outFee)
841841 let totalAmount = $t03742437480._1
842842 let feeAmount = $t03742437480._2
843843 let $t03748437710 = if (outInAmountAsset)
844844 then $Tuple4(totalAmount, 0, (amBalanceOld - amountRaw), prBalanceOld)
845845 else $Tuple4(0, totalAmount, amBalanceOld, (prBalanceOld - amountRaw))
846846 let outAmAmount = $t03748437710._1
847847 let outPrAmount = $t03748437710._2
848848 let amBalanceNew = $t03748437710._3
849849 let prBalanceNew = $t03748437710._4
850850 let priceNewX18 = calcPriceBigInt(toX18(prBalanceNew, cfgPriceAssetDecimals), toX18(amBalanceNew, cfgAmountAssetDecimals))
851851 let priceNew = fromX18(priceNewX18, scale8)
852852 let commonState = if (isEval)
853853 then nil
854854 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)]
855855 let priceOldX18 = calcPriceBigInt(toX18(prBalanceOld, cfgPriceAssetDecimals), toX18(amBalanceOld, cfgAmountAssetDecimals))
856856 let priceOld = fromX18(priceOldX18, scale8)
857857 let loss = {
858858 let amountBothInPaymentAsset = (toInt(fraction(balanceBigInt, redeemedBigInt, supplyBigInt)) * 2)
859859 fraction((totalAmount - amountBothInPaymentAsset), scale8, amountBothInPaymentAsset)
860860 }
861861 $Tuple5(totalAmount, commonState, feeAmount, loss, outInAmountAsset)
862862 }
863863 else throw("Strict value is not equal to itself.")
864864 }
865865
866866
867867 func managerPublicKeyOrUnit () = {
868868 let managerVaultAddress = getManagerVaultAddressOrThis()
869869 match getString(managerVaultAddress, keyManagerPublicKey()) {
870870 case s: String =>
871871 fromBase58String(s)
872872 case _: Unit =>
873873 unit
874874 case _ =>
875875 throw("Match error")
876876 }
877877 }
878878
879879
880880 func isManager (i) = match managerPublicKeyOrUnit() {
881881 case pk: ByteVector =>
882882 (i.callerPublicKey == pk)
883883 case _: Unit =>
884884 (i.caller == this)
885885 case _ =>
886886 throw("Match error")
887887 }
888888
889889
890890 func mustManager (i) = {
891891 let pd = throw("Permission denied")
892892 match managerPublicKeyOrUnit() {
893893 case pk: ByteVector =>
894894 if ((i.callerPublicKey == pk))
895895 then true
896896 else pd
897897 case _: Unit =>
898898 if ((i.caller == this))
899899 then true
900900 else pd
901901 case _ =>
902902 throw("Match error")
903903 }
904904 }
905905
906906
907907 @Callable(i)
908908 func rebalance () = (rebalanceAsset(getStringOrFail(this, aa())) ++ rebalanceAsset(getStringOrFail(this, pa())))
909909
910910
911911
912912 @Callable(i)
913913 func calculateAmountOutForSwapREADONLY (cleanAmountIn,isReverse,feePoolAmount) = {
914914 let $t03956839873 = if ((isReverse == false))
915915 then {
916916 let assetOut = getStringOrFail(this, pa())
917917 let assetIn = getStringOrFail(this, aa())
918918 $Tuple2(assetOut, assetIn)
919919 }
920920 else {
921921 let assetOut = getStringOrFail(this, aa())
922922 let assetIn = getStringOrFail(this, pa())
923923 $Tuple2(assetOut, assetIn)
924924 }
925925 let assetOut = $t03956839873._1
926926 let assetIn = $t03956839873._2
927927 let poolAssetInBalance = getAccBalance(assetIn)
928928 let poolAssetOutBalance = getAccBalance(assetOut)
929929 let amountOut = fraction(poolAssetOutBalance, cleanAmountIn, (poolAssetInBalance + cleanAmountIn))
930930 let oldK = (toBigInt(poolAssetInBalance) * toBigInt(poolAssetOutBalance))
931931 let newK = (((toBigInt(getAccBalance(assetIn)) + toBigInt(cleanAmountIn)) + toBigInt(feePoolAmount)) * (toBigInt(getAccBalance(assetOut)) - toBigInt(amountOut)))
932932 let checkK = if ((newK >= oldK))
933933 then true
934934 else throw("new K is fewer error")
935935 if ((checkK == checkK))
936936 then $Tuple2(nil, amountOut)
937937 else throw("Strict value is not equal to itself.")
938938 }
939939
940940
941941
942942 @Callable(i)
943943 func calculateAmountOutForSwapAndSendTokens (cleanAmountIn,isReverse,amountOutMin,addressTo,feePoolAmount) = {
944944 let swapContact = {
945945 let @ = invoke(factoryContract, "getSwapContractREADONLY", nil, nil)
946946 if ($isInstanceOf(@, "String"))
947947 then @
948948 else throw(($getType(@) + " couldn't be cast to String"))
949949 }
950950 let isPoolSwapDisabled = {
951951 let @ = invoke(factoryContract, "isPoolSwapDisabledREADONLY", [toString(this)], nil)
952952 if ($isInstanceOf(@, "Boolean"))
953953 then @
954954 else throw(($getType(@) + " couldn't be cast to Boolean"))
955955 }
956956 let isSwapDisabled = if (if (isGlobalShutdown())
957957 then true
958958 else (cfgPoolStatus == PoolShutdown))
959959 then true
960960 else isPoolSwapDisabled
961961 let checks = [if (if (!(isSwapDisabled))
962962 then true
963963 else isManager(i))
964964 then true
965965 else throwErr("swap operation is blocked by admin"), if ((value(i.payments[0]).amount >= cleanAmountIn))
966966 then true
967967 else throwErr("Wrong amount"), if ((i.caller == addressFromStringValue(swapContact)))
968968 then true
969969 else throwErr("Permission denied")]
970970 if ((checks == checks))
971971 then {
972972 let pmt = value(i.payments[0])
973973 let assetIn = assetIdToString(pmt.assetId)
974974 let assetOut = if ((isReverse == false))
975975 then getStringOrFail(this, pa())
976976 else getStringOrFail(this, aa())
977977 let poolAssetInBalance = ((getAccBalance(assetIn) - value(i.payments[0]).amount) - feePoolAmount)
978978 let poolAssetOutBalance = getAccBalance(assetOut)
979979 let amountOut = fraction(poolAssetOutBalance, cleanAmountIn, (poolAssetInBalance + cleanAmountIn))
980980 let oldK = (toBigInt(poolAssetInBalance) * toBigInt(poolAssetOutBalance))
981981 let newK = ((toBigInt(getAccBalance(assetIn)) + toBigInt(feePoolAmount)) * (toBigInt(getAccBalance(assetOut)) - toBigInt(amountOut)))
982982 let checkK = if ((newK >= oldK))
983983 then true
984984 else throw("new K is fewer error")
985985 if ((checkK == checkK))
986986 then {
987987 let checkMin = if ((amountOut >= amountOutMin))
988988 then true
989989 else throw("Exchange result is fewer coins than expected")
990990 if ((checkMin == checkMin))
991991 then {
992992 let amountAssetBalanceDelta = if (isReverse)
993993 then -(amountOut)
994994 else feePoolAmount
995995 let priceAssetBalanceDelta = if (isReverse)
996996 then feePoolAmount
997997 else -(amountOut)
998998 let refreshKLpActions = refreshKLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)._1
999999 if ((refreshKLpActions == refreshKLpActions))
10001000 then {
10011001 let rebalanceState = rebalanceAsset(assetIn)
10021002 if ((rebalanceState == rebalanceState))
10031003 then {
10041004 let withdrawState = withdrawAndRebalanceAsset(assetOut, amountOut)
10051005 if ((withdrawState == withdrawState))
10061006 then $Tuple2(((withdrawState ++ rebalanceState) ++ [ScriptTransfer(addressFromStringValue(addressTo), amountOut, parseAssetId(assetOut))]), amountOut)
10071007 else throw("Strict value is not equal to itself.")
10081008 }
10091009 else throw("Strict value is not equal to itself.")
10101010 }
10111011 else throw("Strict value is not equal to itself.")
10121012 }
10131013 else throw("Strict value is not equal to itself.")
10141014 }
10151015 else throw("Strict value is not equal to itself.")
10161016 }
10171017 else throw("Strict value is not equal to itself.")
10181018 }
10191019
10201020
10211021
10221022 @Callable(i)
10231023 func put (slippageTolerance,shouldAutoStake) = if ((0 > slippageTolerance))
10241024 then throw("Invalid slippageTolerance passed")
10251025 else {
10261026 let estPut = commonPut(i, slippageTolerance, true)
10271027 let emitLpAmt = estPut._2
10281028 let lpAssetId = estPut._7
10291029 let state = estPut._9
10301030 let amDiff = estPut._10
10311031 let prDiff = estPut._11
10321032 let amId = estPut._12
10331033 let prId = estPut._13
10341034 let amAssetPmt = toBigInt(value(i.payments[0]).amount)
10351035 let prAssetPmt = toBigInt(value(i.payments[1]).amount)
10361036 let currentKLp = calcCurrentKLp(amAssetPmt, prAssetPmt, toBigInt(0))
10371037 if ((currentKLp == currentKLp))
10381038 then {
10391039 let emitInv = invoke(factoryContract, "emit", [emitLpAmt], nil)
10401040 if ((emitInv == emitInv))
10411041 then {
10421042 let emitInvLegacy = match emitInv {
10431043 case legacyFactoryContract: Address =>
10441044 invoke(legacyFactoryContract, "emit", [emitLpAmt], nil)
10451045 case _ =>
10461046 unit
10471047 }
10481048 if ((emitInvLegacy == emitInvLegacy))
10491049 then {
10501050 let slippageAInv = if ((amDiff > 0))
10511051 then invoke(slippageContract, "put", nil, [AttachedPayment(amId, amDiff)])
10521052 else nil
10531053 if ((slippageAInv == slippageAInv))
10541054 then {
10551055 let slippagePInv = if ((prDiff > 0))
10561056 then invoke(slippageContract, "put", nil, [AttachedPayment(prId, prDiff)])
10571057 else nil
10581058 if ((slippagePInv == slippagePInv))
10591059 then {
10601060 let lpTransfer = if (shouldAutoStake)
10611061 then {
10621062 let slpStakeInv = invoke(stakingContract, "stake", nil, [AttachedPayment(lpAssetId, emitLpAmt)])
10631063 if ((slpStakeInv == slpStakeInv))
10641064 then nil
10651065 else throw("Strict value is not equal to itself.")
10661066 }
10671067 else [ScriptTransfer(i.caller, emitLpAmt, lpAssetId)]
10681068 let $t04500745469 = refreshKLpInternal(0, 0, 0)
10691069 if (($t04500745469 == $t04500745469))
10701070 then {
10711071 let updatedKLp = $t04500745469._2
10721072 let refreshKLpActions = $t04500745469._1
10731073 let isUpdatedKLpValid = validateUpdatedKLp(currentKLp, updatedKLp)
10741074 if ((isUpdatedKLpValid == isUpdatedKLpValid))
10751075 then {
10761076 let reb = invoke(this, "rebalance", nil, nil)
10771077 if ((reb == reb))
10781078 then ((state ++ lpTransfer) ++ refreshKLpActions)
10791079 else throw("Strict value is not equal to itself.")
10801080 }
10811081 else throw("Strict value is not equal to itself.")
10821082 }
10831083 else throw("Strict value is not equal to itself.")
10841084 }
10851085 else throw("Strict value is not equal to itself.")
10861086 }
10871087 else throw("Strict value is not equal to itself.")
10881088 }
10891089 else throw("Strict value is not equal to itself.")
10901090 }
10911091 else throw("Strict value is not equal to itself.")
10921092 }
10931093 else throw("Strict value is not equal to itself.")
10941094 }
10951095
10961096
10971097
10981098 @Callable(i)
10991099 func putForFree (maxSlippage) = if ((0 > maxSlippage))
11001100 then throw("Invalid value passed")
11011101 else {
11021102 let estPut = commonPut(i, maxSlippage, false)
11031103 let state = estPut._9
11041104 let amAssetPmt = toBigInt(value(i.payments[0]).amount)
11051105 let prAssetPmt = toBigInt(value(i.payments[1]).amount)
11061106 let currentKLp = calcCurrentKLp(amAssetPmt, prAssetPmt, toBigInt(0))
11071107 if ((currentKLp == currentKLp))
11081108 then {
11091109 let $t04608146146 = refreshKLpInternal(0, 0, 0)
11101110 let refreshKLpActions = $t04608146146._1
11111111 let updatedKLp = $t04608146146._2
11121112 let isUpdatedKLpValid = validateUpdatedKLp(currentKLp, updatedKLp)
11131113 if ((isUpdatedKLpValid == isUpdatedKLpValid))
11141114 then (state ++ refreshKLpActions)
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 putOneTkn (minOutAmount,autoStake) = {
11241124 let isPoolOneTokenOperationsDisabled = {
11251125 let @ = invoke(factoryContract, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
11261126 if ($isInstanceOf(@, "Boolean"))
11271127 then @
11281128 else throw(($getType(@) + " couldn't be cast to Boolean"))
11291129 }
11301130 let isPutDisabled = if (if (if (isGlobalShutdown())
11311131 then true
11321132 else (cfgPoolStatus == PoolPutDisabled))
11331133 then true
11341134 else (cfgPoolStatus == PoolShutdown))
11351135 then true
11361136 else isPoolOneTokenOperationsDisabled
11371137 let checks = [if (if (!(isPutDisabled))
11381138 then true
11391139 else isManager(i))
11401140 then true
11411141 else throwErr("put operation is blocked by admin"), if ((size(i.payments) == 1))
11421142 then true
11431143 else throwErr("exactly 1 payment are expected")]
11441144 if ((checks == checks))
11451145 then {
11461146 let payment = i.payments[0]
11471147 let paymentAssetId = payment.assetId
11481148 let paymentAmountRaw = payment.amount
11491149 let currentKLp = if ((paymentAssetId == cfgAmountAssetId))
11501150 then calcCurrentKLp(toBigInt(paymentAmountRaw), toBigInt(0), toBigInt(0))
11511151 else if ((paymentAssetId == cfgPriceAssetId))
11521152 then calcCurrentKLp(toBigInt(0), toBigInt(paymentAmountRaw), toBigInt(0))
11531153 else throwErr("payment asset is not supported")
11541154 if ((currentKLp == currentKLp))
11551155 then {
11561156 let userAddress = i.caller
11571157 let txId = i.transactionId
11581158 let $t04733447486 = calcPutOneToken(paymentAmountRaw, paymentAssetId, userAddress, txId)
11591159 if (($t04733447486 == $t04733447486))
11601160 then {
11611161 let paymentInAmountAsset = $t04733447486._5
11621162 let bonus = $t04733447486._4
11631163 let feeAmount = $t04733447486._3
11641164 let commonState = $t04733447486._2
11651165 let emitAmountEstimated = $t04733447486._1
11661166 let emitAmount = if (if ((minOutAmount > 0))
11671167 then (minOutAmount > emitAmountEstimated)
11681168 else false)
11691169 then throwErr(makeString(["amount to receive is less than ", toString(minOutAmount)], ""))
11701170 else emitAmountEstimated
11711171 let emitInv = emit(emitAmount)
11721172 if ((emitInv == emitInv))
11731173 then {
11741174 let lpTransfer = if (autoStake)
11751175 then {
11761176 let stakeInv = invoke(stakingContract, "stake", nil, [AttachedPayment(cfgLpAssetId, emitAmount)])
11771177 if ((stakeInv == stakeInv))
11781178 then nil
11791179 else throw("Strict value is not equal to itself.")
11801180 }
11811181 else [ScriptTransfer(i.caller, emitAmount, cfgLpAssetId)]
11821182 let sendFee = if ((feeAmount > 0))
11831183 then [ScriptTransfer(feeCollectorAddress, feeAmount, paymentAssetId)]
11841184 else nil
11851185 let $t04807248269 = if ((this == feeCollectorAddress))
11861186 then $Tuple2(0, 0)
11871187 else if (paymentInAmountAsset)
11881188 then $Tuple2(-(feeAmount), 0)
11891189 else $Tuple2(0, -(feeAmount))
11901190 let amountAssetBalanceDelta = $t04807248269._1
11911191 let priceAssetBalanceDelta = $t04807248269._2
11921192 let $t04827248380 = refreshKLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
11931193 let refreshKLpActions = $t04827248380._1
11941194 let updatedKLp = $t04827248380._2
11951195 let kLp = value(getString(keyKLp))
11961196 let isUpdatedKLpValid = validateUpdatedKLp(currentKLp, updatedKLp)
11971197 if ((isUpdatedKLpValid == isUpdatedKLpValid))
11981198 then {
11991199 let reb = invoke(this, "rebalance", nil, nil)
12001200 if ((reb == reb))
12011201 then $Tuple2((((commonState ++ lpTransfer) ++ sendFee) ++ refreshKLpActions), emitAmount)
12021202 else throw("Strict value is not equal to itself.")
12031203 }
12041204 else throw("Strict value is not equal to itself.")
12051205 }
12061206 else throw("Strict value is not equal to itself.")
12071207 }
12081208 else throw("Strict value is not equal to itself.")
12091209 }
12101210 else throw("Strict value is not equal to itself.")
12111211 }
12121212 else throw("Strict value is not equal to itself.")
12131213 }
12141214
12151215
12161216
12171217 @Callable(i)
12181218 func putOneTknREADONLY (paymentAssetId,paymentAmountRaw) = {
12191219 let $t04873548892 = calcPutOneToken(paymentAmountRaw, parseAssetId(paymentAssetId), unit, unit)
12201220 let emitAmountEstimated = $t04873548892._1
12211221 let commonState = $t04873548892._2
12221222 let feeAmount = $t04873548892._3
12231223 let bonus = $t04873548892._4
12241224 let paymentInAmountAsset = $t04873548892._5
12251225 $Tuple2(nil, $Tuple3(emitAmountEstimated, feeAmount, bonus))
12261226 }
12271227
12281228
12291229
12301230 @Callable(i)
12311231 func getOneTkn (outAssetIdStr,minOutAmount) = {
12321232 let isPoolOneTokenOperationsDisabled = {
12331233 let @ = invoke(factoryContract, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
12341234 if ($isInstanceOf(@, "Boolean"))
12351235 then @
12361236 else throw(($getType(@) + " couldn't be cast to Boolean"))
12371237 }
12381238 let isGetDisabled = if (if (isGlobalShutdown())
12391239 then true
12401240 else (cfgPoolStatus == PoolShutdown))
12411241 then true
12421242 else isPoolOneTokenOperationsDisabled
12431243 let checks = [if (if (!(isGetDisabled))
12441244 then true
12451245 else isManager(i))
12461246 then true
12471247 else throwErr("get operation is blocked by admin"), if ((size(i.payments) == 1))
12481248 then true
12491249 else throwErr("exactly 1 payment are expected")]
12501250 if ((checks == checks))
12511251 then {
12521252 let outAssetId = parseAssetId(outAssetIdStr)
12531253 let payment = i.payments[0]
12541254 let paymentAssetId = payment.assetId
12551255 let paymentAmount = payment.amount
12561256 let currentKLp = calcCurrentKLp(toBigInt(0), toBigInt(0), toBigInt(0))
12571257 if ((currentKLp == currentKLp))
12581258 then {
12591259 let userAddress = i.caller
12601260 let txId = i.transactionId
12611261 let $t04977749930 = calcGetOneToken(outAssetId, paymentAmount, paymentAssetId, userAddress, txId)
12621262 if (($t04977749930 == $t04977749930))
12631263 then {
12641264 let outInAmountAsset = $t04977749930._5
12651265 let bonus = $t04977749930._4
12661266 let feeAmount = $t04977749930._3
12671267 let commonState = $t04977749930._2
12681268 let amountEstimated = $t04977749930._1
12691269 let amount = if (if ((minOutAmount > 0))
12701270 then (minOutAmount > amountEstimated)
12711271 else false)
12721272 then throwErr(makeString(["amount to receive is less than ", toString(minOutAmount)], ""))
12731273 else amountEstimated
12741274 let burnInv = invoke(factoryContract, "burn", [paymentAmount], [AttachedPayment(paymentAssetId, paymentAmount)])
12751275 if ((burnInv == burnInv))
12761276 then {
12771277 let withdrawState = withdrawAndRebalanceAsset(outAssetIdStr, (amount + max([0, feeAmount])))
12781278 let assetTransfer = [ScriptTransfer(userAddress, amount, outAssetId)]
12791279 let sendFee = if ((feeAmount > 0))
12801280 then [ScriptTransfer(feeCollectorAddress, feeAmount, outAssetId)]
12811281 else nil
12821282 let $t05059450841 = {
12831283 let feeAmountForCalc = if ((this == feeCollectorAddress))
12841284 then 0
12851285 else feeAmount
12861286 if (outInAmountAsset)
12871287 then $Tuple2(-((amount + feeAmountForCalc)), 0)
12881288 else $Tuple2(0, -((amount + feeAmountForCalc)))
12891289 }
12901290 let amountAssetBalanceDelta = $t05059450841._1
12911291 let priceAssetBalanceDelta = $t05059450841._2
12921292 let $t05084450952 = refreshKLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
12931293 let refreshKLpActions = $t05084450952._1
12941294 let updatedKLp = $t05084450952._2
12951295 let isUpdatedKLpValid = validateUpdatedKLp(currentKLp, updatedKLp)
12961296 if ((isUpdatedKLpValid == isUpdatedKLpValid))
12971297 then $Tuple2(((((commonState ++ withdrawState) ++ assetTransfer) ++ sendFee) ++ refreshKLpActions), amount)
12981298 else throw("Strict value is not equal to itself.")
12991299 }
13001300 else throw("Strict value is not equal to itself.")
13011301 }
13021302 else throw("Strict value is not equal to itself.")
13031303 }
13041304 else throw("Strict value is not equal to itself.")
13051305 }
13061306 else throw("Strict value is not equal to itself.")
13071307 }
13081308
13091309
13101310
13111311 @Callable(i)
13121312 func getOneTknREADONLY (outAssetId,paymentAmount) = {
13131313 let $t05123051386 = calcGetOneToken(parseAssetId(outAssetId), paymentAmount, cfgLpAssetId, unit, unit)
13141314 let amountEstimated = $t05123051386._1
13151315 let commonState = $t05123051386._2
13161316 let feeAmount = $t05123051386._3
13171317 let bonus = $t05123051386._4
13181318 let outInAmountAsset = $t05123051386._5
13191319 $Tuple2(nil, $Tuple3(amountEstimated, feeAmount, bonus))
13201320 }
13211321
13221322
13231323
13241324 @Callable(i)
13251325 func unstakeAndGetOneTkn (unstakeAmount,outAssetIdStr,minOutAmount) = {
13261326 let isPoolOneTokenOperationsDisabled = {
13271327 let @ = invoke(factoryContract, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
13281328 if ($isInstanceOf(@, "Boolean"))
13291329 then @
13301330 else throw(($getType(@) + " couldn't be cast to Boolean"))
13311331 }
13321332 let isGetDisabled = if (if (isGlobalShutdown())
13331333 then true
13341334 else (cfgPoolStatus == PoolShutdown))
13351335 then true
13361336 else isPoolOneTokenOperationsDisabled
13371337 let checks = [if (if (!(isGetDisabled))
13381338 then true
13391339 else isManager(i))
13401340 then true
13411341 else throwErr("get operation is blocked by admin"), if ((size(i.payments) == 0))
13421342 then true
13431343 else throwErr("no payments are expected")]
13441344 if ((checks == checks))
13451345 then {
13461346 let outAssetId = parseAssetId(outAssetIdStr)
13471347 let userAddress = i.caller
13481348 let txId = i.transactionId
13491349 let currentKLp = calcCurrentKLp(toBigInt(0), toBigInt(0), toBigInt(0))
13501350 if ((currentKLp == currentKLp))
13511351 then {
13521352 let unstakeInv = invoke(stakingContract, "unstake", [toBase58String(cfgLpAssetId), unstakeAmount], nil)
13531353 if ((unstakeInv == unstakeInv))
13541354 then {
13551355 let $t05229152442 = calcGetOneToken(outAssetId, unstakeAmount, cfgLpAssetId, userAddress, txId)
13561356 if (($t05229152442 == $t05229152442))
13571357 then {
13581358 let outInAmountAsset = $t05229152442._5
13591359 let bonus = $t05229152442._4
13601360 let feeAmount = $t05229152442._3
13611361 let commonState = $t05229152442._2
13621362 let amountEstimated = $t05229152442._1
13631363 let amount = if (if ((minOutAmount > 0))
13641364 then (minOutAmount > amountEstimated)
13651365 else false)
13661366 then throwErr(makeString(["amount to receive is less than ", toString(minOutAmount)], ""))
13671367 else amountEstimated
13681368 let burnInv = invoke(factoryContract, "burn", [unstakeAmount], [AttachedPayment(cfgLpAssetId, unstakeAmount)])
13691369 if ((burnInv == burnInv))
13701370 then {
13711371 let withdrawState = withdrawAndRebalanceAsset(outAssetIdStr, (amount + max([0, feeAmount])))
13721372 let assetTransfer = [ScriptTransfer(i.caller, amount, outAssetId)]
13731373 let sendFee = if ((feeAmount > 0))
13741374 then [ScriptTransfer(feeCollectorAddress, feeAmount, outAssetId)]
13751375 else nil
13761376 let $t05310153348 = {
13771377 let feeAmountForCalc = if ((this == feeCollectorAddress))
13781378 then 0
13791379 else feeAmount
13801380 if (outInAmountAsset)
13811381 then $Tuple2(-((amount + feeAmountForCalc)), 0)
13821382 else $Tuple2(0, -((amount + feeAmountForCalc)))
13831383 }
13841384 let amountAssetBalanceDelta = $t05310153348._1
13851385 let priceAssetBalanceDelta = $t05310153348._2
13861386 let $t05335153459 = refreshKLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
13871387 let refreshKLpActions = $t05335153459._1
13881388 let updatedKLp = $t05335153459._2
13891389 let isUpdatedKLpValid = validateUpdatedKLp(currentKLp, updatedKLp)
13901390 if ((isUpdatedKLpValid == isUpdatedKLpValid))
13911391 then $Tuple2(((((commonState ++ withdrawState) ++ assetTransfer) ++ sendFee) ++ refreshKLpActions), amount)
13921392 else throw("Strict value is not equal to itself.")
13931393 }
13941394 else throw("Strict value is not equal to itself.")
13951395 }
13961396 else throw("Strict value is not equal to itself.")
13971397 }
13981398 else throw("Strict value is not equal to itself.")
13991399 }
14001400 else throw("Strict value is not equal to itself.")
14011401 }
14021402 else throw("Strict value is not equal to itself.")
14031403 }
14041404
14051405
14061406
14071407 @Callable(i)
14081408 func get () = {
14091409 let res = commonGet(i)
14101410 let outAmAmt = res._1
14111411 let outPrAmt = res._2
14121412 let pmtAmt = res._3
14131413 let pmtAssetId = res._4
14141414 let state = res._5
14151415 let withdrawState = withdrawAndRebalanceAll(outAmAmt, outPrAmt)
14161416 let currentKLp = calcCurrentKLp(toBigInt(0), toBigInt(0), toBigInt(0))
14171417 if ((currentKLp == currentKLp))
14181418 then {
14191419 let burnLPAssetOnFactory = invoke(factoryContract, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
14201420 if ((burnLPAssetOnFactory == burnLPAssetOnFactory))
14211421 then {
14221422 let $t05455454635 = refreshKLpInternal(-(outAmAmt), -(outPrAmt), 0)
14231423 let refreshKLpActions = $t05455454635._1
14241424 let updatedKLp = $t05455454635._2
14251425 let isUpdatedKLpValid = validateUpdatedKLp(currentKLp, updatedKLp)
14261426 if ((isUpdatedKLpValid == isUpdatedKLpValid))
14271427 then ((withdrawState ++ state) ++ refreshKLpActions)
14281428 else throw("Strict value is not equal to itself.")
14291429 }
14301430 else throw("Strict value is not equal to itself.")
14311431 }
14321432 else throw("Strict value is not equal to itself.")
14331433 }
14341434
14351435
14361436
14371437 @Callable(i)
14381438 func getNoLess (noLessThenAmtAsset,noLessThenPriceAsset) = {
14391439 let res = commonGet(i)
14401440 let outAmAmt = res._1
14411441 let outPrAmt = res._2
14421442 let pmtAmt = res._3
14431443 let pmtAssetId = res._4
14441444 let state = res._5
14451445 if ((noLessThenAmtAsset > outAmAmt))
14461446 then throw(((("noLessThenAmtAsset failed: " + toString(outAmAmt)) + " < ") + toString(noLessThenAmtAsset)))
14471447 else if ((noLessThenPriceAsset > outPrAmt))
14481448 then throw(((("noLessThenPriceAsset failed: " + toString(outPrAmt)) + " < ") + toString(noLessThenPriceAsset)))
14491449 else {
14501450 let withdrawState = withdrawAndRebalanceAll(outAmAmt, outPrAmt)
14511451 let currentKLp = calcCurrentKLp(toBigInt(0), toBigInt(0), toBigInt(0))
14521452 if ((currentKLp == currentKLp))
14531453 then {
14541454 let burnLPAssetOnFactory = invoke(factoryContract, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
14551455 if ((burnLPAssetOnFactory == burnLPAssetOnFactory))
14561456 then {
14571457 let $t05573055811 = refreshKLpInternal(-(outAmAmt), -(outPrAmt), 0)
14581458 let refreshKLpActions = $t05573055811._1
14591459 let updatedKLp = $t05573055811._2
14601460 let isUpdatedKLpValid = validateUpdatedKLp(currentKLp, updatedKLp)
14611461 if ((isUpdatedKLpValid == isUpdatedKLpValid))
14621462 then ((withdrawState ++ state) ++ refreshKLpActions)
14631463 else throw("Strict value is not equal to itself.")
14641464 }
14651465 else throw("Strict value is not equal to itself.")
14661466 }
14671467 else throw("Strict value is not equal to itself.")
14681468 }
14691469 }
14701470
14711471
14721472
14731473 @Callable(i)
14741474 func unstakeAndGet (amount) = {
14751475 let checkPayments = if ((size(i.payments) != 0))
14761476 then throw("No payments are expected")
14771477 else true
14781478 if ((checkPayments == checkPayments))
14791479 then {
14801480 let cfg = getPoolConfig()
14811481 let lpAssetId = fromBase58String(cfg[idxPoolLPAssetId])
14821482 let currentKLp = calcCurrentKLp(toBigInt(0), toBigInt(0), toBigInt(0))
14831483 if ((currentKLp == currentKLp))
14841484 then {
14851485 let unstakeInv = invoke(stakingContract, "unstake", [toBase58String(lpAssetId), amount], nil)
14861486 if ((unstakeInv == unstakeInv))
14871487 then {
14881488 let res = estimateGetOperation(toBase58String(i.transactionId), toBase58String(lpAssetId), amount, i.caller)
14891489 let outAmAmt = res._1
14901490 let outPrAmt = res._2
14911491 let poolStatus = parseIntValue(res._9)
14921492 let state = res._10
14931493 let withdrawState = withdrawAndRebalanceAll(outAmAmt, outPrAmt)
14941494 let checkPoolStatus = if (if (isGlobalShutdown())
14951495 then true
14961496 else (poolStatus == PoolShutdown))
14971497 then throw(("Get operation is blocked by admin. Status = " + toString(poolStatus)))
14981498 else true
14991499 if ((checkPoolStatus == checkPoolStatus))
15001500 then {
15011501 let burnLPAssetOnFactory = invoke(factoryContract, "burn", [amount], [AttachedPayment(lpAssetId, amount)])
15021502 if ((burnLPAssetOnFactory == burnLPAssetOnFactory))
15031503 then {
15041504 let $t05708357164 = refreshKLpInternal(-(outAmAmt), -(outPrAmt), 0)
15051505 let refreshKLpActions = $t05708357164._1
15061506 let updatedKLp = $t05708357164._2
15071507 let isUpdatedKLpValid = validateUpdatedKLp(currentKLp, updatedKLp)
15081508 if ((isUpdatedKLpValid == isUpdatedKLpValid))
15091509 then ((withdrawState ++ state) ++ refreshKLpActions)
15101510 else throw("Strict value is not equal to itself.")
15111511 }
15121512 else throw("Strict value is not equal to itself.")
15131513 }
15141514 else throw("Strict value is not equal to itself.")
15151515 }
15161516 else throw("Strict value is not equal to itself.")
15171517 }
15181518 else throw("Strict value is not equal to itself.")
15191519 }
15201520 else throw("Strict value is not equal to itself.")
15211521 }
15221522
15231523
15241524
15251525 @Callable(i)
15261526 func unstakeAndGetNoLess (unstakeAmount,noLessThenAmountAsset,noLessThenPriceAsset) = {
15271527 let isGetDisabled = if (isGlobalShutdown())
15281528 then true
15291529 else (cfgPoolStatus == PoolShutdown)
15301530 let checks = [if (!(isGetDisabled))
15311531 then true
15321532 else throw("get operation is blocked by admin"), if ((size(i.payments) == 0))
15331533 then true
15341534 else throw("no payments are expected")]
15351535 if ((checks == checks))
15361536 then {
15371537 let currentKLp = calcCurrentKLp(toBigInt(0), toBigInt(0), toBigInt(0))
15381538 if ((currentKLp == currentKLp))
15391539 then {
15401540 let unstakeInv = invoke(stakingContract, "unstake", [toBase58String(cfgLpAssetId), unstakeAmount], nil)
15411541 if ((unstakeInv == unstakeInv))
15421542 then {
15431543 let res = estimateGetOperation(toBase58String(i.transactionId), toBase58String(cfgLpAssetId), unstakeAmount, i.caller)
15441544 let outAmAmt = res._1
15451545 let outPrAmt = res._2
15461546 let state = res._10
15471547 let withdrawState = withdrawAndRebalanceAll(outAmAmt, outPrAmt)
15481548 let checkAmounts = [if ((outAmAmt >= noLessThenAmountAsset))
15491549 then true
15501550 else throw(makeString(["amount asset amount to receive is less than ", toString(noLessThenAmountAsset)], "")), if ((outPrAmt >= noLessThenPriceAsset))
15511551 then true
15521552 else throw(makeString(["price asset amount to receive is less than ", toString(noLessThenPriceAsset)], ""))]
15531553 if ((checkAmounts == checkAmounts))
15541554 then {
15551555 let burnLPAssetOnFactory = invoke(factoryContract, "burn", [unstakeAmount], [AttachedPayment(cfgLpAssetId, unstakeAmount)])
15561556 if ((burnLPAssetOnFactory == burnLPAssetOnFactory))
15571557 then {
15581558 let $t05860558686 = refreshKLpInternal(-(outAmAmt), -(outPrAmt), 0)
15591559 let refreshKLpActions = $t05860558686._1
15601560 let updatedKLp = $t05860558686._2
15611561 let isUpdatedKLpValid = validateUpdatedKLp(currentKLp, updatedKLp)
15621562 if ((isUpdatedKLpValid == isUpdatedKLpValid))
15631563 then ((withdrawState ++ state) ++ refreshKLpActions)
15641564 else throw("Strict value is not equal to itself.")
15651565 }
15661566 else throw("Strict value is not equal to itself.")
15671567 }
15681568 else throw("Strict value is not equal to itself.")
15691569 }
15701570 else throw("Strict value is not equal to itself.")
15711571 }
15721572 else throw("Strict value is not equal to itself.")
15731573 }
15741574 else throw("Strict value is not equal to itself.")
15751575 }
15761576
15771577
15781578
15791579 @Callable(i)
15801580 func activate (amtAssetStr,priceAssetStr) = if ((toString(i.caller) != toString(factoryContract)))
15811581 then throw("permissions denied")
15821582 else $Tuple2([StringEntry(aa(), amtAssetStr), StringEntry(pa(), priceAssetStr)], "success")
15831583
15841584
15851585
15861586 @Callable(i)
1587+func invert () = {
1588+ let checks = [if ((i.caller == factoryContract))
1589+ then true
1590+ else throwErr("invalid caller")]
1591+ if ((checks == checks))
1592+ then $Tuple2([StringEntry(aa(), assetIdToString(cfgPriceAssetId)), StringEntry(pa(), assetIdToString(cfgAmountAssetId))], unit)
1593+ else throw("Strict value is not equal to itself.")
1594+ }
1595+
1596+
1597+
1598+@Callable(i)
15871599 func refreshKLp () = {
15881600 let lastRefreshedBlockHeight = valueOrElse(getInteger(keyKLpRefreshedHeight), 0)
15891601 let checkLastRefreshedBlockHeight = if (((height - lastRefreshedBlockHeight) >= kLpRefreshDelay))
15901602 then unit
15911603 else throwErr(makeString([toString(kLpRefreshDelay), " blocks have not passed since the previous call"], ""))
15921604 if ((checkLastRefreshedBlockHeight == checkLastRefreshedBlockHeight))
15931605 then {
15941606 let kLp = valueOrErrorMessage(parseBigInt(valueOrElse(getString(this, keyKLp), "0")), fmtErr("invalid kLp"))
1595- let $t05989059954 = refreshKLpInternal(0, 0, 0)
1596- let kLpUpdateActions = $t05989059954._1
1597- let updatedKLp = $t05989059954._2
1607+ let $t06014360207 = refreshKLpInternal(0, 0, 0)
1608+ let kLpUpdateActions = $t06014360207._1
1609+ let updatedKLp = $t06014360207._2
15981610 let actions = if ((kLp != updatedKLp))
15991611 then kLpUpdateActions
16001612 else throwErr("nothing to refresh")
16011613 $Tuple2(actions, toString(updatedKLp))
16021614 }
16031615 else throw("Strict value is not equal to itself.")
16041616 }
16051617
16061618
16071619
16081620 @Callable(i)
16091621 func getPoolConfigWrapperREADONLY () = $Tuple2(nil, getPoolConfig())
16101622
16111623
16121624
16131625 @Callable(i)
16141626 func getAccBalanceWrapperREADONLY (assetId) = $Tuple2(nil, getAccBalance(assetId))
16151627
16161628
16171629
16181630 @Callable(i)
16191631 func calcPricesWrapperREADONLY (amAmt,prAmt,lpAmt) = {
16201632 let prices = calcPrices(amAmt, prAmt, lpAmt)
16211633 $Tuple2(nil, [toString(prices[0]), toString(prices[1]), toString(prices[2])])
16221634 }
16231635
16241636
16251637
16261638 @Callable(i)
16271639 func toX18WrapperREADONLY (origVal,origScaleMult) = $Tuple2(nil, toString(toX18(origVal, origScaleMult)))
16281640
16291641
16301642
16311643 @Callable(i)
16321644 func fromX18WrapperREADONLY (val,resultScaleMult) = $Tuple2(nil, fromX18(parseBigIntValue(val), resultScaleMult))
16331645
16341646
16351647
16361648 @Callable(i)
16371649 func calcPriceBigIntWrapperREADONLY (prAmtX18,amAmtX18) = $Tuple2(nil, toString(calcPriceBigInt(parseBigIntValue(prAmtX18), parseBigIntValue(amAmtX18))))
16381650
16391651
16401652
16411653 @Callable(i)
16421654 func estimatePutOperationWrapperREADONLY (txId58,slippageTolerance,inAmAssetAmt,inAmAssetId,inPrAssetAmt,inPrAssetId,userAddress,isEvaluate,emitLp) = $Tuple2(nil, estimatePutOperation(txId58, slippageTolerance, inAmAssetAmt, inAmAssetId, inPrAssetAmt, inPrAssetId, userAddress, isEvaluate, emitLp))
16431655
16441656
16451657
16461658 @Callable(i)
16471659 func estimateGetOperationWrapperREADONLY (txId58,pmtAssetId,pmtLpAmt,userAddress) = {
16481660 let res = estimateGetOperation(txId58, pmtAssetId, pmtLpAmt, addressFromStringValue(userAddress))
16491661 $Tuple2(nil, $Tuple10(res._1, res._2, res._3, res._4, res._5, res._6, res._7, toString(res._8), res._9, res._10))
16501662 }
16511663
16521664
16531665
16541666 @Callable(i)
16551667 func statsREADONLY () = {
16561668 let cfg = getPoolConfig()
16571669 let lpAssetId = fromBase58String(cfg[idxPoolLPAssetId])
16581670 let amtAssetId = cfg[idxAmtAssetId]
16591671 let priceAssetId = cfg[idxPriceAssetId]
16601672 let iAmtAssetId = cfg[idxIAmtAssetId]
16611673 let iPriceAssetId = cfg[idxIPriceAssetId]
16621674 let amtAssetDcm = parseIntValue(cfg[idxAmtAssetDcm])
16631675 let priceAssetDcm = parseIntValue(cfg[idxPriceAssetDcm])
16641676 let poolLPBalance = valueOrErrorMessage(assetInfo(lpAssetId), (("Asset " + toBase58String(lpAssetId)) + " doesn't exist")).quantity
16651677 let accAmtAssetBalance = getAccBalance(amtAssetId)
16661678 let accPriceAssetBalance = getAccBalance(priceAssetId)
16671679 let pricesList = if ((poolLPBalance == 0))
16681680 then [zeroBigInt, zeroBigInt, zeroBigInt]
16691681 else calcPrices(accAmtAssetBalance, accPriceAssetBalance, poolLPBalance)
16701682 let curPrice = 0
16711683 let lpAmtAssetShare = fromX18(pricesList[1], scale8)
16721684 let lpPriceAssetShare = fromX18(pricesList[2], scale8)
16731685 let poolWeight = value(getInteger(factoryContract, keyPoolWeight(toString(this))))
16741686 $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))
16751687 }
16761688
16771689
16781690
16791691 @Callable(i)
16801692 func evaluatePutByAmountAssetREADONLY (inAmAssetAmt) = {
16811693 let cfg = getPoolConfig()
16821694 let lpAssetId = fromBase58String(cfg[idxPoolLPAssetId])
16831695 let amAssetIdStr = cfg[idxAmtAssetId]
16841696 let amAssetId = fromBase58String(amAssetIdStr)
16851697 let prAssetIdStr = cfg[idxPriceAssetId]
16861698 let prAssetId = fromBase58String(prAssetIdStr)
16871699 let amtAssetDcm = parseIntValue(cfg[idxAmtAssetDcm])
16881700 let priceAssetDcm = parseIntValue(cfg[idxPriceAssetDcm])
16891701 let poolStatus = cfg[idxPoolStatus]
16901702 let poolLPBalance = valueOrErrorMessage(assetInfo(lpAssetId), (("Asset " + toBase58String(lpAssetId)) + " doesn't exist")).quantity
16911703 let accAmtAssetBalance = getAccBalance(amAssetIdStr)
16921704 let accPriceAssetBalance = getAccBalance(prAssetIdStr)
16931705 let amtAssetAmtX18 = toX18(accAmtAssetBalance, amtAssetDcm)
16941706 let priceAssetAmtX18 = toX18(accPriceAssetBalance, priceAssetDcm)
16951707 let curPriceX18 = if ((poolLPBalance == 0))
16961708 then zeroBigInt
16971709 else calcPriceBigInt(priceAssetAmtX18, amtAssetAmtX18)
16981710 let inAmAssetAmtX18 = toX18(inAmAssetAmt, amtAssetDcm)
16991711 let inPrAssetAmtX18 = fraction(inAmAssetAmtX18, curPriceX18, scale18)
17001712 let inPrAssetAmt = fromX18(inPrAssetAmtX18, priceAssetDcm)
17011713 let estPut = estimatePutOperation("", 500000, inAmAssetAmt, amAssetId, inPrAssetAmt, prAssetId, "", true, false)
17021714 let calcLpAmt = estPut._1
17031715 let curPriceCalc = estPut._3
17041716 let amBalance = estPut._4
17051717 let prBalance = estPut._5
17061718 let lpEmission = estPut._6
17071719 $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))
17081720 }
17091721
17101722
17111723
17121724 @Callable(i)
17131725 func evaluatePutByPriceAssetREADONLY (inPrAssetAmt) = {
17141726 let cfg = getPoolConfig()
17151727 let lpAssetId = fromBase58String(cfg[idxPoolLPAssetId])
17161728 let amAssetIdStr = cfg[idxAmtAssetId]
17171729 let amAssetId = fromBase58String(amAssetIdStr)
17181730 let prAssetIdStr = cfg[idxPriceAssetId]
17191731 let prAssetId = fromBase58String(prAssetIdStr)
17201732 let amtAssetDcm = parseIntValue(cfg[idxAmtAssetDcm])
17211733 let priceAssetDcm = parseIntValue(cfg[idxPriceAssetDcm])
17221734 let poolStatus = cfg[idxPoolStatus]
17231735 let poolLPBalance = valueOrErrorMessage(assetInfo(lpAssetId), (("Asset " + toBase58String(lpAssetId)) + " doesn't exist")).quantity
17241736 let amBalanceRaw = getAccBalance(amAssetIdStr)
17251737 let prBalanceRaw = getAccBalance(prAssetIdStr)
17261738 let amBalanceRawX18 = toX18(amBalanceRaw, amtAssetDcm)
17271739 let prBalanceRawX18 = toX18(prBalanceRaw, priceAssetDcm)
17281740 let curPriceX18 = if ((poolLPBalance == 0))
17291741 then zeroBigInt
17301742 else calcPriceBigInt(prBalanceRawX18, amBalanceRawX18)
17311743 let inPrAssetAmtX18 = toX18(inPrAssetAmt, priceAssetDcm)
17321744 let inAmAssetAmtX18 = fraction(inPrAssetAmtX18, scale18, curPriceX18)
17331745 let inAmAssetAmt = fromX18(inAmAssetAmtX18, amtAssetDcm)
17341746 let estPut = estimatePutOperation("", 500000, inAmAssetAmt, amAssetId, inPrAssetAmt, prAssetId, "", true, false)
17351747 let calcLpAmt = estPut._1
17361748 let curPriceCalc = estPut._3
17371749 let amBalance = estPut._4
17381750 let prBalance = estPut._5
17391751 let lpEmission = estPut._6
17401752 $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))
17411753 }
17421754
17431755
17441756
17451757 @Callable(i)
17461758 func evaluateGetREADONLY (paymentLpAssetId,paymentLpAmt) = {
17471759 let res = estimateGetOperation("", paymentLpAssetId, paymentLpAmt, this)
17481760 let outAmAmt = res._1
17491761 let outPrAmt = res._2
17501762 let amBalance = res._5
17511763 let prBalance = res._6
17521764 let lpEmission = res._7
17531765 let curPrice = res._8
17541766 let poolStatus = parseIntValue(res._9)
17551767 $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))
17561768 }
17571769
17581770
17591771 @Verifier(tx)
17601772 func verify () = {
17611773 let targetPublicKey = match managerPublicKeyOrUnit() {
17621774 case pk: ByteVector =>
17631775 pk
17641776 case _: Unit =>
17651777 tx.senderPublicKey
17661778 case _ =>
17671779 throw("Match error")
17681780 }
17691781 match tx {
17701782 case order: Order =>
17711783 let matcherPub = getMatcherPubOrFail()
1772- let $t06861668733 = if (skipOrderValidation())
1784+ let $t06886968986 = if (skipOrderValidation())
17731785 then $Tuple2(true, "")
17741786 else validateMatcherOrderAllowed(order)
1775- let orderValid = $t06861668733._1
1776- let orderValidInfo = $t06861668733._2
1787+ let orderValid = $t06886968986._1
1788+ let orderValidInfo = $t06886968986._2
17771789 let senderValid = sigVerify(order.bodyBytes, order.proofs[0], order.senderPublicKey)
17781790 let matcherValid = sigVerify(order.bodyBytes, order.proofs[1], matcherPub)
17791791 if (if (if (orderValid)
17801792 then senderValid
17811793 else false)
17821794 then matcherValid
17831795 else false)
17841796 then true
17851797 else throwOrderError(orderValid, orderValidInfo, senderValid, matcherValid)
17861798 case s: SetScriptTransaction =>
17871799 if (sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey))
17881800 then true
17891801 else {
17901802 let newHash = blake2b256(value(s.script))
17911803 let allowedHash = fromBase64String(value(getString(factoryContract, keyAllowedLpScriptHash())))
17921804 let currentHash = scriptHash(this)
17931805 if ((allowedHash == newHash))
17941806 then (currentHash != newHash)
17951807 else false
17961808 }
17971809 case _ =>
17981810 sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey)
17991811 }
18001812 }
18011813

github/deemru/w8io/026f985 
167.01 ms