tx · 9SE62DHbFfFbbZQXXRaUEGKirf2imixTrqmk9hDGYSKv

3NAefciWv6f9fWvEXdGgpHfanJFG8HqfjuT:  -0.04200000 Waves

2023.09.21 14:42 [2765090] smart account 3NAefciWv6f9fWvEXdGgpHfanJFG8HqfjuT > SELF 0.00000000 Waves

{ "type": 13, "id": "9SE62DHbFfFbbZQXXRaUEGKirf2imixTrqmk9hDGYSKv", "fee": 4200000, "feeAssetId": null, "timestamp": 1695296562694, "version": 2, "chainId": 84, "sender": "3NAefciWv6f9fWvEXdGgpHfanJFG8HqfjuT", "senderPublicKey": "D1BL65meykxFZTCuq7jq9HSGLLnWvQamQPUNrguW5w39", "proofs": [ "3wGFUVuprVMB8MLkLq19BMGmfwk4srtkmpSsd53w4CuWnutpu5t7M8VFjt2q1X7h4E6c71piY6mHPqK3p4CyuTtG" ], "script": "base64:BgKmLQgCEgUKAwEEARIHCgUBBAEIARIDCgEIEgQKAgEEEgQKAgEEEgMKAQESABIECgIIARIAEgQKAggBEgQKAggBEgQKAgEBEgMKAQESBQoDAQEBEgUKAwEIARIECgIBCBIECgIBCBIECgIICBIAEgASAwoBCBIFCgMBAQESBAoCCAESBAoCAQESBAoCCAgSCwoJCAEBAgECCAQEEgYKBAgIAQgSACIGc2NhbGU4IgxzY2FsZThCaWdJbnQiB3NjYWxlMTgiCnplcm9CaWdJbnQiBGJpZzAiBGJpZzEiBGJpZzIiBGJpZzMiBGJpZzQiCnNsaXBwYWdlNEQiC3dhdmVzU3RyaW5nIgphbXBJbml0aWFsIgVBbXVsdCIFRGNvbnYiA1NFUCIFRU1QVFkiClBvb2xBY3RpdmUiClBvb2xQdXREaXMiDlBvb2xNYXRjaGVyRGlzIgxQb29sU2h1dGRvd24iDmlkeFBvb2xBZGRyZXNzIglpZHhQb29sU3QiCWlkeExQQXNJZCIJaWR4QW1Bc0lkIglpZHhQckFzSWQiC2lkeEFtdEFzRGNtIg1pZHhQcmljZUFzRGNtIgtpZHhJQW10QXNJZCINaWR4SV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AQIFAmFRAhRTZXRTY3JpcHRUcmFuc2FjdGlvbgQCYVYFAmFRAwkA9AMDCAUCaXcJYm9keUJ5dGVzCQCRAwIIBQJpdwZwcm9vZnMAAAUCaXkGBAJpQgkA9gMBCQEFdmFsdWUBCAUCYVYGc2NyaXB0BAJpQwkA2wQBCQEFdmFsdWUBCQCdCAIFAmFVCQECYUYABAJpRAkA8QcBBQR0aGlzAwkAAAIFAmlDBQJpQgkBAiE9AgUCaUQFAmlCBwkA9AMDCAUCaXcJYm9keUJ5dGVzCQCRAwIIBQJpdwZwcm9vZnMAAAUCaXnk/Ngq", "height": 2765090, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: Bm7EQn3pnnPWQMvc4XhXcDh5uFDoPtvGNhr7w92ipYPQ Next: GRcFi8nMnpSuK2qCwNkiQC8pSkvtEdqofCaugFZbQnRN Diff:
OldNewDifferences
16761676
16771677
16781678 @Callable(i)
1679+func invert () = {
1680+ let checks = [if ((i.caller == fca))
1681+ then true
1682+ else throwErr("invalid caller")]
1683+ if ((checks == checks))
1684+ then $Tuple2([StringEntry(aa(), assetIdToString(cfgPriceAssetId)), StringEntry(pa(), assetIdToString(cfgAmountAssetId))], unit)
1685+ else throw("Strict value is not equal to itself.")
1686+ }
1687+
1688+
1689+
1690+@Callable(i)
16791691 func getPoolConfigWrapperREADONLY () = $Tuple2(nil, gpc())
16801692
16811693
17241736 @Callable(i)
17251737 func changeAmp () = {
17261738 let cfg = invoke(fca, "getChangeAmpConfigREADONLY", [toString(this)], nil)
1727- let $t05905659255 = match cfg {
1739+ let $t05929759496 = match cfg {
17281740 case list: List[Any] =>
17291741 $Tuple3({
17301742 let @ = list[0]
17451757 case _ =>
17461758 throwErr("invalid entry type")
17471759 }
1748- let delay = $t05905659255._1
1749- let delta = $t05905659255._2
1750- let target = $t05905659255._3
1760+ let delay = $t05929759496._1
1761+ let delta = $t05929759496._2
1762+ let target = $t05929759496._3
17511763 let curAmp = parseIntValue(getStringValue(amp()))
17521764 let newAmpRaw = (curAmp + delta)
17531765 let newAmp = if ((0 > delta))
17831795 match tx {
17841796 case order: Order =>
17851797 let matcherPub = mp()
1786- let $t06018860305 = if (skipOrderValidation())
1798+ let $t06042960546 = if (skipOrderValidation())
17871799 then $Tuple2(true, "")
17881800 else validateMatcherOrderAllowed(order)
1789- let orderValid = $t06018860305._1
1790- let orderValidInfo = $t06018860305._2
1801+ let orderValid = $t06042960546._1
1802+ let orderValidInfo = $t06042960546._2
17911803 let senderValid = sigVerify(order.bodyBytes, order.proofs[0], order.senderPublicKey)
17921804 let matcherValid = sigVerify(order.bodyBytes, order.proofs[1], matcherPub)
17931805 if (if (if (orderValid)
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let scale8 = 100000000
55
66 let scale8BigInt = toBigInt(100000000)
77
88 let scale18 = toBigInt(1000000000000000000)
99
1010 let zeroBigInt = toBigInt(0)
1111
1212 let big0 = toBigInt(0)
1313
1414 let big1 = toBigInt(1)
1515
1616 let big2 = toBigInt(2)
1717
1818 let big3 = toBigInt(3)
1919
2020 let big4 = toBigInt(4)
2121
2222 let slippage4D = toBigInt((scale8 - ((scale8 * 1) / scale8)))
2323
2424 let wavesString = "WAVES"
2525
2626 let ampInitial = 50
2727
2828 let Amult = "100"
2929
3030 let Dconv = "1"
3131
3232 let SEP = "__"
3333
3434 let EMPTY = ""
3535
3636 let PoolActive = 1
3737
3838 let PoolPutDis = 2
3939
4040 let PoolMatcherDis = 3
4141
4242 let PoolShutdown = 4
4343
4444 let idxPoolAddress = 1
4545
4646 let idxPoolSt = 2
4747
4848 let idxLPAsId = 3
4949
5050 let idxAmAsId = 4
5151
5252 let idxPrAsId = 5
5353
5454 let idxAmtAsDcm = 6
5555
5656 let idxPriceAsDcm = 7
5757
5858 let idxIAmtAsId = 8
5959
6060 let idxIPriceAsId = 9
6161
6262 let idxFactStakCntr = 1
6363
6464 let idxFactoryRestCntr = 6
6565
6666 let idxFactSlippCntr = 7
6767
6868 let idxFactGwxRewCntr = 10
6969
7070 let feeDefault = fraction(10, scale8, 10000)
7171
7272 func t1 (origVal,origScaleMult) = fraction(toBigInt(origVal), scale18, toBigInt(origScaleMult))
7373
7474
7575 func t1BigInt (origVal,origScaleMult) = fraction(origVal, scale18, origScaleMult)
7676
7777
7878 func f1 (val,resultScaleMult) = toInt(fraction(val, toBigInt(resultScaleMult), scale18))
7979
8080
8181 func fromX18Round (val,resultScaleMult,round) = toInt(fraction(val, toBigInt(resultScaleMult), scale18, round))
8282
8383
8484 func t2 (origVal,origScaleMult) = fraction(origVal, scale18, toBigInt(origScaleMult))
8585
8686
8787 func f2 (val,resultScaleMult) = fraction(val, toBigInt(resultScaleMult), scale18)
8888
8989
9090 func ts (amt,resScale,curScale) = fraction(amt, resScale, curScale)
9191
9292
9393 func abs (val) = if ((zeroBigInt > val))
9494 then -(val)
9595 else val
9696
9797
9898 func absBigInt (val) = if ((zeroBigInt > val))
9999 then -(val)
100100 else val
101101
102102
103103 func fc () = "%s__factoryContract"
104104
105105
106106 func keyManagerPublicKey () = "%s__managerPublicKey"
107107
108108
109109 func keyManagerVaultAddress () = "%s__managerVaultAddress"
110110
111111
112112 func pl () = "%s%s__price__last"
113113
114114
115115 func ph (h,t) = makeString(["%s%s%d%d__price__history", toString(h), toString(t)], SEP)
116116
117117
118118 func pau (ua,txId) = ((("%s%s%s__P__" + ua) + "__") + txId)
119119
120120
121121 func gau (ua,txId) = ((("%s%s%s__G__" + ua) + "__") + txId)
122122
123123
124124 func aa () = "%s__amountAsset"
125125
126126
127127 func pa () = "%s__priceAsset"
128128
129129
130130 func amp () = "%s__amp"
131131
132132
133133 func keyAmpHistory (heightBlocks) = ("%s%d__amp__" + toString(heightBlocks))
134134
135135
136136 func keyChangeAmpLastCall () = "%s__changeAmpLastCall"
137137
138138
139139 let keyFee = "%s__fee"
140140
141141 let fee = valueOrElse(getInteger(this, keyFee), feeDefault)
142142
143143 let keyDLp = makeString(["%s", "dLp"], SEP)
144144
145145 let keyDLpRefreshedHeight = makeString(["%s", "dLpRefreshedHeight"], SEP)
146146
147147 let keyDLpRefreshDelay = makeString(["%s", "refreshDLpDelay"], SEP)
148148
149149 let dLpRefreshDelayDefault = 30
150150
151151 let dLpRefreshDelay = valueOrElse(getInteger(this, keyDLpRefreshDelay), dLpRefreshDelayDefault)
152152
153153 func fcfg () = "%s__factoryConfig"
154154
155155
156156 func mtpk () = "%s%s__matcher__publicKey"
157157
158158
159159 func pc (iAmtAs,iPrAs) = (((("%d%d%s__" + iAmtAs) + "__") + iPrAs) + "__config")
160160
161161
162162 func mba (bAStr) = ("%s%s%s__mappings__baseAsset2internalId__" + bAStr)
163163
164164
165165 func aps () = "%s__shutdown"
166166
167167
168168 func keyAllowedLpStableScriptHash () = "%s__allowedLpStableScriptHash"
169169
170170
171171 func keyFeeCollectorAddress () = "%s__feeCollectorAddress"
172172
173173
174174 func keySkipOrderValidation (poolAddress) = ("%s%s__skipOrderValidation__" + poolAddress)
175175
176176
177177 func throwOrderError (orderValid,orderValidInfo,senderValid,matcherValid) = throw((((((((("order validation failed: orderValid=" + toString(orderValid)) + " (") + orderValidInfo) + ")") + " senderValid=") + toString(senderValid)) + " matcherValid=") + toString(matcherValid)))
178178
179179
180180 func addressFromStringOrThis (addressString) = match addressFromString(addressString) {
181181 case a: Address =>
182182 a
183183 case _ =>
184184 this
185185 }
186186
187187
188188 func getManagerVaultAddressOrThis () = {
189189 let factoryAddress = match getString(fc()) {
190190 case fca: String =>
191191 addressFromStringOrThis(fca)
192192 case _ =>
193193 this
194194 }
195195 match getString(factoryAddress, keyManagerVaultAddress()) {
196196 case s: String =>
197197 addressFromStringOrThis(s)
198198 case _ =>
199199 this
200200 }
201201 }
202202
203203
204204 func strf (addr,key) = valueOrErrorMessage(getString(addr, key), makeString(["mandatory ", toString(addr), ".", key, " not defined"], ""))
205205
206206
207207 func intf (addr,key) = valueOrErrorMessage(getInteger(addr, key), makeString(["mandatory ", toString(addr), ".", key, " not defined"], ""))
208208
209209
210210 func throwErr (msg) = throw(makeString(["lp_stable.ride:", msg], " "))
211211
212212
213213 func fmtErr (msg) = makeString(["lp_stable.ride:", msg], " ")
214214
215215
216216 let fca = addressFromStringValue(strf(this, fc()))
217217
218218 let inFee = {
219219 let @ = invoke(fca, "getInFeeREADONLY", [toString(this)], nil)
220220 if ($isInstanceOf(@, "Int"))
221221 then @
222222 else throw(($getType(@) + " couldn't be cast to Int"))
223223 }
224224
225225 let outFee = {
226226 let @ = invoke(fca, "getOutFeeREADONLY", [toString(this)], nil)
227227 if ($isInstanceOf(@, "Int"))
228228 then @
229229 else throw(($getType(@) + " couldn't be cast to Int"))
230230 }
231231
232232 let A = strf(this, amp())
233233
234234 func igs () = valueOrElse(getBoolean(fca, aps()), false)
235235
236236
237237 func mp () = fromBase58String(strf(fca, mtpk()))
238238
239239
240240 let feeCollectorAddress = addressFromStringValue(strf(fca, keyFeeCollectorAddress()))
241241
242242 func gpc () = {
243243 let amtAs = strf(this, aa())
244244 let priceAs = strf(this, pa())
245245 let iPriceAs = intf(fca, mba(priceAs))
246246 let iAmtAs = intf(fca, mba(amtAs))
247247 split(strf(fca, pc(toString(iAmtAs), toString(iPriceAs))), SEP)
248248 }
249249
250250
251251 func parseAssetId (input) = if ((input == wavesString))
252252 then unit
253253 else fromBase58String(input)
254254
255255
256256 func assetIdToString (input) = if ((input == unit))
257257 then wavesString
258258 else toBase58String(value(input))
259259
260260
261261 func parsePoolConfig (poolConfig) = $Tuple7(addressFromStringValue(poolConfig[idxPoolAddress]), parseIntValue(poolConfig[idxPoolSt]), fromBase58String(poolConfig[idxLPAsId]), parseAssetId(poolConfig[idxAmAsId]), parseAssetId(poolConfig[idxPrAsId]), parseIntValue(poolConfig[idxAmtAsDcm]), parseIntValue(poolConfig[idxPriceAsDcm]))
262262
263263
264264 let poolConfigParsed = parsePoolConfig(gpc())
265265
266266 let $t086088794 = poolConfigParsed
267267
268268 let cfgPoolAddress = $t086088794._1
269269
270270 let cfgPoolStatus = $t086088794._2
271271
272272 let cfgLpAssetId = $t086088794._3
273273
274274 let cfgAmountAssetId = $t086088794._4
275275
276276 let cfgPriceAssetId = $t086088794._5
277277
278278 let cfgAmountAssetDecimals = $t086088794._6
279279
280280 let cfgPriceAssetDecimals = $t086088794._7
281281
282282 func gfc () = split(strf(fca, fcfg()), SEP)
283283
284284
285285 let factoryConfig = gfc()
286286
287287 let stakingContract = valueOrErrorMessage(addressFromString(factoryConfig[idxFactStakCntr]), "Invalid staking contract address")
288288
289289 let slipageContract = valueOrErrorMessage(addressFromString(factoryConfig[idxFactSlippCntr]), "Invalid slipage contract address")
290290
291291 let gwxContract = valueOrErrorMessage(addressFromString(factoryConfig[idxFactGwxRewCntr]), "Invalid gwx contract address")
292292
293293 let restContract = valueOrErrorMessage(addressFromString(factoryConfig[idxFactoryRestCntr]), "Invalid gwx contract address")
294294
295295 func dataPutActionInfo (inAmtAssetAmt,inPriceAssetAmt,outLpAmt,price,slipByUser,slippageReal,txHeight,txTimestamp,slipageAmAmt,slipagePrAmt) = makeString(["%d%d%d%d%d%d%d%d%d%d", toString(inAmtAssetAmt), toString(inPriceAssetAmt), toString(outLpAmt), toString(price), toString(slipByUser), toString(slippageReal), toString(txHeight), toString(txTimestamp), toString(slipageAmAmt), toString(slipagePrAmt)], SEP)
296296
297297
298298 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)
299299
300300
301301 func getAccBalance (assetId) = if ((assetId == "WAVES"))
302302 then wavesBalance(this).available
303303 else assetBalance(this, fromBase58String(assetId))
304304
305305
306306 func cpbi (prAmtX18,amAmtX18) = fraction(prAmtX18, scale18, amAmtX18)
307307
308308
309309 func cpbir (prAmtX18,amAmtX18,round) = fraction(prAmtX18, scale18, amAmtX18, round)
310310
311311
312312 func vad (A1,A2,slippage) = {
313313 let diff = fraction((A1 - A2), scale8BigInt, A2)
314314 let pass = ((slippage - abs(diff)) > zeroBigInt)
315315 if (!(pass))
316316 then throw(("Big slpg: " + toString(diff)))
317317 else $Tuple2(pass, min([A1, A2]))
318318 }
319319
320320
321321 func vd (D1,D0,slpg) = {
322322 let diff = fraction(D0, scale8BigInt, D1)
323323 let fail = (slpg > diff)
324324 if (if (fail)
325325 then true
326326 else (D0 > D1))
327327 then throw(((((((toString(D0) + " ") + toString(D1)) + " ") + toString(diff)) + " ") + toString(slpg)))
328328 else fail
329329 }
330330
331331
332332 func pcp (amAssetDcm,prAssetDcm,amAmt,prAmt) = {
333333 let amtAsAmtX18 = t1(amAmt, amAssetDcm)
334334 let prAsAmtX18 = t1(prAmt, prAssetDcm)
335335 cpbi(prAsAmtX18, amtAsAmtX18)
336336 }
337337
338338
339339 func calcPrices (amAmt,prAmt,lpAmt) = {
340340 let amtAsDcm = cfgAmountAssetDecimals
341341 let prAsDcm = cfgPriceAssetDecimals
342342 let priceX18 = pcp(amtAsDcm, prAsDcm, amAmt, prAmt)
343343 let amAmtX18 = t1(amAmt, amtAsDcm)
344344 let prAmtX18 = t1(prAmt, prAsDcm)
345345 let lpAmtX18 = t1(lpAmt, scale8)
346346 let lpPrInAmAsX18 = cpbi(amAmtX18, lpAmtX18)
347347 let lpPrInPrAsX18 = cpbi(prAmtX18, lpAmtX18)
348348 [priceX18, lpPrInAmAsX18, lpPrInPrAsX18]
349349 }
350350
351351
352352 func calculatePrices (amAmt,prAmt,lpAmt) = {
353353 let p = calcPrices(amAmt, prAmt, lpAmt)
354354 [f1(p[0], scale8), f1(p[1], scale8), f1(p[2], scale8)]
355355 }
356356
357357
358358 func takeFee (amount,fee) = {
359359 let feeAmount = if ((fee == 0))
360360 then 0
361361 else fraction(amount, fee, scale8)
362362 $Tuple2((amount - feeAmount), feeAmount)
363363 }
364364
365365
366366 func getD (xp) = {
367367 let xp0 = xp[0]
368368 let xp1 = xp[1]
369369 let s = (xp0 + xp1)
370370 if ((s == big0))
371371 then big0
372372 else {
373373 let a = parseIntValue(A)
374374 let ann = (a * 2)
375375 let p = fraction(xp0, xp1, big1)
376376 let xp0_xp1_n_n = fraction(p, big4, big1)
377377 let ann_s = fraction(toBigInt(ann), s, big1)
378378 let ann_1 = toBigInt((ann - 1))
379379 func calcDNext (d) = {
380380 let dd = fraction(d, d, big1)
381381 let ddd = fraction(dd, d, big1)
382382 let dp = fraction(ddd, big1, xp0_xp1_n_n)
383383 fraction((ann_s + fraction(dp, big2, big1)), d, (fraction(ann_1, d, big1) + fraction(big3, dp, big1)))
384384 }
385385
386386 func calc (acc,i) = if (acc._2)
387387 then acc
388388 else {
389389 let d = acc._1
390390 let dNext = calcDNext(d)
391391 let dDiffRaw = (dNext - value(d))
392392 let dDiff = if ((big0 > dDiffRaw))
393393 then -(dDiffRaw)
394394 else dDiffRaw
395395 if ((big1 >= dDiff))
396396 then $Tuple2(dNext, true)
397397 else $Tuple2(dNext, false)
398398 }
399399
400400 let arr = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16]
401401 let $t01329913347 = {
402402 let $l = arr
403403 let $s = size($l)
404404 let $acc0 = $Tuple2(s, false)
405405 func $f0_1 ($a,$i) = if (($i >= $s))
406406 then $a
407407 else calc($a, $l[$i])
408408
409409 func $f0_2 ($a,$i) = if (($i >= $s))
410410 then $a
411411 else throw("List size exceeds 17")
412412
413413 $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17)
414414 }
415415 let d = $t01329913347._1
416416 let found = $t01329913347._2
417417 if (found)
418418 then d
419419 else throw(("D calculation error, D = " + toString(d)))
420420 }
421421 }
422422
423423
424424 func ego (txId58,pmtAssetId,pmtLpAmt,userAddress) = {
425425 let lpId = cfgLpAssetId
426426 let amId = toBase58String(value(cfgAmountAssetId))
427427 let prId = toBase58String(value(cfgPriceAssetId))
428428 let amDcm = cfgAmountAssetDecimals
429429 let prDcm = cfgPriceAssetDecimals
430430 let sts = toString(cfgPoolStatus)
431431 let lpEmiss = valueOrErrorMessage(assetInfo(lpId), "Wrong LP id").quantity
432432 if ((toBase58String(lpId) != pmtAssetId))
433433 then throw("Wrong pmt asset")
434434 else {
435435 let amBalance = getAccBalance(amId)
436436 let amBalanceX18 = t1(amBalance, amDcm)
437437 let prBalance = getAccBalance(prId)
438438 let prBalanceX18 = t1(prBalance, prDcm)
439439 let curPriceX18 = cpbi(prBalanceX18, amBalanceX18)
440440 let curPrice = f1(curPriceX18, scale8)
441441 let pmtLpAmtX18 = t1(pmtLpAmt, scale8)
442442 let lpEmissX18 = t1(lpEmiss, scale8)
443443 let outAmAmtX18 = fraction(amBalanceX18, pmtLpAmtX18, lpEmissX18)
444444 let outPrAmtX18 = fraction(prBalanceX18, pmtLpAmtX18, lpEmissX18)
445445 let outAmAmt = fromX18Round(outAmAmtX18, amDcm, FLOOR)
446446 let outPrAmt = fromX18Round(outPrAmtX18, prDcm, FLOOR)
447447 let state = if ((txId58 == ""))
448448 then nil
449449 else [ScriptTransfer(userAddress, outAmAmt, if ((amId == "WAVES"))
450450 then unit
451451 else fromBase58String(amId)), ScriptTransfer(userAddress, outPrAmt, if ((prId == "WAVES"))
452452 then unit
453453 else fromBase58String(prId)), StringEntry(gau(toString(userAddress), txId58), dataGetActionInfo(outAmAmt, outPrAmt, pmtLpAmt, curPrice, height, lastBlock.timestamp)), IntegerEntry(pl(), curPrice), IntegerEntry(ph(height, lastBlock.timestamp), curPrice)]
454454 $Tuple10(outAmAmt, outPrAmt, amId, prId, amBalance, prBalance, lpEmiss, curPriceX18, sts, state)
455455 }
456456 }
457457
458458
459459 func epo (txId58,slippage,inAmAmt,inAmId,inPrAmt,inPrId,userAddress,isEval,emitLp,isOneAsset,validateSlippage,pmtAmt,pmtId) = {
460460 let lpId = cfgLpAssetId
461461 let amIdStr = toBase58String(value(cfgAmountAssetId))
462462 let prIdStr = toBase58String(value(cfgPriceAssetId))
463463 let amtDcm = cfgAmountAssetDecimals
464464 let priceDcm = cfgPriceAssetDecimals
465465 let sts = toString(cfgPoolStatus)
466466 let lpEm = valueOrErrorMessage(assetInfo(lpId), "Wr lp as").quantity
467467 let amBalance = if (isEval)
468468 then getAccBalance(amIdStr)
469469 else if (if (isOneAsset)
470470 then (pmtId == amIdStr)
471471 else false)
472472 then (getAccBalance(amIdStr) - pmtAmt)
473473 else if (isOneAsset)
474474 then getAccBalance(amIdStr)
475475 else (getAccBalance(amIdStr) - inAmAmt)
476476 let prBalance = if (isEval)
477477 then getAccBalance(prIdStr)
478478 else if (if (isOneAsset)
479479 then (pmtId == prIdStr)
480480 else false)
481481 then (getAccBalance(prIdStr) - pmtAmt)
482482 else if (isOneAsset)
483483 then getAccBalance(prIdStr)
484484 else (getAccBalance(prIdStr) - inPrAmt)
485485 let inAmAssetAmtX18 = t1(inAmAmt, amtDcm)
486486 let inPrAssetAmtX18 = t1(inPrAmt, priceDcm)
487487 let userPriceX18 = cpbi(inPrAssetAmtX18, inAmAssetAmtX18)
488488 let amBalanceX18 = t1(amBalance, amtDcm)
489489 let prBalanceX18 = t1(prBalance, priceDcm)
490490 let D0 = getD([amBalanceX18, prBalanceX18])
491491 let r = if ((lpEm == 0))
492492 then {
493493 let D1 = getD([(amBalanceX18 + inAmAssetAmtX18), (prBalanceX18 + inPrAssetAmtX18)])
494494 let checkD = if ((D1 > D0))
495495 then true
496496 else throw("D1 should be greater than D0")
497497 if ((checkD == checkD))
498498 then {
499499 let curPriceX18 = zeroBigInt
500500 let slippageX18 = zeroBigInt
501501 let lpAmtX18 = D1
502502 $Tuple5(f1(lpAmtX18, scale8), f1(inAmAssetAmtX18, amtDcm), f1(inPrAssetAmtX18, priceDcm), cpbi((prBalanceX18 + inPrAssetAmtX18), (amBalanceX18 + inAmAssetAmtX18)), slippageX18)
503503 }
504504 else throw("Strict value is not equal to itself.")
505505 }
506506 else {
507507 let curPriceX18 = cpbi(prBalanceX18, amBalanceX18)
508508 let slippageRealX18 = fraction(abs((curPriceX18 - userPriceX18)), scale18, curPriceX18)
509509 let slippageX18 = t1(slippage, scale8)
510510 if (if (if (validateSlippage)
511511 then (curPriceX18 != zeroBigInt)
512512 else false)
513513 then (slippageRealX18 > slippageX18)
514514 else false)
515515 then throw(((("Price slippage " + toString(slippageRealX18)) + " > ") + toString(slippageX18)))
516516 else {
517517 let lpEmissionX18 = t1(lpEm, scale8)
518518 let prViaAmX18 = fraction(inAmAssetAmtX18, cpbir(prBalanceX18, amBalanceX18, CEILING), scale18, CEILING)
519519 let amViaPrX18 = fraction(inPrAssetAmtX18, scale18, cpbir(prBalanceX18, amBalanceX18, FLOOR), CEILING)
520520 let expectedAmts = if ((prViaAmX18 > inPrAssetAmtX18))
521521 then $Tuple2(amViaPrX18, inPrAssetAmtX18)
522522 else $Tuple2(inAmAssetAmtX18, prViaAmX18)
523523 let expAmtAssetAmtX18 = expectedAmts._1
524524 let expPriceAssetAmtX18 = expectedAmts._2
525525 let D1 = getD([(amBalanceX18 + expAmtAssetAmtX18), (prBalanceX18 + expPriceAssetAmtX18)])
526526 let checkD = if ((D1 > D0))
527527 then true
528528 else throw("D1 should be greater than D0")
529529 if ((checkD == checkD))
530530 then {
531531 let lpAmtX18 = fraction(lpEmissionX18, (D1 - D0), D0)
532532 $Tuple5(fromX18Round(lpAmtX18, scale8, FLOOR), fromX18Round(expAmtAssetAmtX18, amtDcm, CEILING), fromX18Round(expPriceAssetAmtX18, priceDcm, CEILING), curPriceX18, slippageX18)
533533 }
534534 else throw("Strict value is not equal to itself.")
535535 }
536536 }
537537 let calcLpAmt = r._1
538538 let calcAmAssetPmt = r._2
539539 let calcPrAssetPmt = r._3
540540 let curPrice = f1(r._4, scale8)
541541 let slippageCalc = f1(r._5, scale8)
542542 if ((0 >= calcLpAmt))
543543 then throw("LP <= 0")
544544 else {
545545 let emitLpAmt = if (!(emitLp))
546546 then 0
547547 else calcLpAmt
548548 let amDiff = (inAmAmt - calcAmAssetPmt)
549549 let prDiff = (inPrAmt - calcPrAssetPmt)
550550 let $t02110921454 = if (if (isOneAsset)
551551 then (pmtId == amIdStr)
552552 else false)
553553 then $Tuple2(pmtAmt, 0)
554554 else if (if (isOneAsset)
555555 then (pmtId == prIdStr)
556556 else false)
557557 then $Tuple2(0, pmtAmt)
558558 else $Tuple2(calcAmAssetPmt, calcPrAssetPmt)
559559 let writeAmAmt = $t02110921454._1
560560 let writePrAmt = $t02110921454._2
561561 let commonState = [IntegerEntry(pl(), curPrice), IntegerEntry(ph(height, lastBlock.timestamp), curPrice), StringEntry(pau(userAddress, txId58), dataPutActionInfo(writeAmAmt, writePrAmt, emitLpAmt, curPrice, slippage, slippageCalc, height, lastBlock.timestamp, amDiff, prDiff))]
562562 $Tuple13(calcLpAmt, emitLpAmt, curPrice, amBalance, prBalance, lpEm, lpId, sts, commonState, amDiff, prDiff, inAmId, inPrId)
563563 }
564564 }
565565
566566
567567 func getYD (xp,i,D) = {
568568 let n = big2
569569 let x = xp[if ((i == 0))
570570 then 1
571571 else 0]
572572 let aPrecision = parseBigIntValue(Amult)
573573 let a = (parseBigIntValue(A) * aPrecision)
574574 let s = x
575575 let ann = (a * n)
576576 let c = (((((D * D) / (x * n)) * D) * aPrecision) / (ann * n))
577577 let b = ((s + ((D * aPrecision) / ann)) - D)
578578 func calc (acc,cur) = {
579579 let $t02264922669 = acc
580580 let y = $t02264922669._1
581581 let found = $t02264922669._2
582582 if ((found != unit))
583583 then acc
584584 else {
585585 let yNext = (((y * y) + c) / ((big2 * y) + b))
586586 let yDiff = absBigInt((yNext - value(y)))
587587 if ((big1 >= yDiff))
588588 then $Tuple2(yNext, cur)
589589 else $Tuple2(yNext, unit)
590590 }
591591 }
592592
593593 let arr = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
594594 let $t02297623023 = {
595595 let $l = arr
596596 let $s = size($l)
597597 let $acc0 = $Tuple2(D, unit)
598598 func $f0_1 ($a,$i) = if (($i >= $s))
599599 then $a
600600 else calc($a, $l[$i])
601601
602602 func $f0_2 ($a,$i) = if (($i >= $s))
603603 then $a
604604 else throw("List size exceeds 15")
605605
606606 $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15)
607607 }
608608 let y = $t02297623023._1
609609 let found = $t02297623023._2
610610 if ((found != unit))
611611 then y
612612 else throw(("Y calculation error, Y = " + toString(y)))
613613 }
614614
615615
616616 func calcDLp (amountBalance,priceBalance,lpEmission) = {
617617 let updatedDLp = fraction(getD([t1BigInt(amountBalance, toBigInt(cfgAmountAssetDecimals)), t1BigInt(priceBalance, toBigInt(cfgPriceAssetDecimals))]), scale18, lpEmission)
618618 if ((lpEmission == big0))
619619 then big0
620620 else updatedDLp
621621 }
622622
623623
624624 func calcCurrentDLp (amountAssetDelta,priceAssetDelta,lpAssetEmissionDelta) = {
625625 let amountAssetBalance = (toBigInt(getAccBalance(assetIdToString(cfgAmountAssetId))) - amountAssetDelta)
626626 let priceAssetBalance = (toBigInt(getAccBalance(assetIdToString(cfgPriceAssetId))) - priceAssetDelta)
627627 let lpAssetEmission = (toBigInt(value(assetInfo(cfgLpAssetId)).quantity) - lpAssetEmissionDelta)
628628 let currentDLp = calcDLp(amountAssetBalance, priceAssetBalance, lpAssetEmission)
629629 currentDLp
630630 }
631631
632632
633633 func refreshDLpInternal (amountAssetBalanceDelta,priceAssetBalanceDelta,lpAssetEmissionDelta) = {
634634 let amountAssetBalance = (getAccBalance(assetIdToString(cfgAmountAssetId)) + amountAssetBalanceDelta)
635635 let priceAssetBalance = (getAccBalance(assetIdToString(cfgPriceAssetId)) + priceAssetBalanceDelta)
636636 let lpAssetEmission = (value(assetInfo(cfgLpAssetId)).quantity + lpAssetEmissionDelta)
637637 let updatedDLp = calcDLp(toBigInt(amountAssetBalance), toBigInt(priceAssetBalance), toBigInt(lpAssetEmission))
638638 let actions = [IntegerEntry(keyDLpRefreshedHeight, height), StringEntry(keyDLp, toString(updatedDLp))]
639639 $Tuple2(actions, updatedDLp)
640640 }
641641
642642
643643 func validateUpdatedDLp (oldDLp,updatedDLp) = if ((updatedDLp >= oldDLp))
644644 then true
645645 else throwErr("updated DLp lower than current DLp")
646646
647647
648648 func validateMatcherOrderAllowed (order) = {
649649 let amountAssetBalance = getAccBalance(assetIdToString(cfgAmountAssetId))
650650 let priceAssetBalance = getAccBalance(assetIdToString(cfgPriceAssetId))
651651 let amountAssetAmount = order.amount
652652 let priceAssetAmount = fraction(order.amount, order.price, scale8, FLOOR)
653653 let $t02522125433 = if ((order.orderType == Buy))
654654 then $Tuple2(amountAssetAmount, -(priceAssetAmount))
655655 else $Tuple2(-(amountAssetAmount), priceAssetAmount)
656656 let amountAssetBalanceDelta = $t02522125433._1
657657 let priceAssetBalanceDelta = $t02522125433._2
658658 if (if (if (igs())
659659 then true
660660 else (cfgPoolStatus == PoolMatcherDis))
661661 then true
662662 else (cfgPoolStatus == PoolShutdown))
663663 then throw("Admin blocked")
664664 else if (if ((order.assetPair.amountAsset != cfgAmountAssetId))
665665 then true
666666 else (order.assetPair.priceAsset != cfgPriceAssetId))
667667 then throw("Wr assets")
668668 else {
669669 let dLp = parseBigIntValue(valueOrElse(getString(this, keyDLp), "0"))
670670 let $t02577525875 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
671671 let unusedActions = $t02577525875._1
672672 let dLpNew = $t02577525875._2
673673 let isOrderValid = (dLpNew >= dLp)
674674 let info = makeString(["dLp=", toString(dLp), " dLpNew=", toString(dLpNew), " amountAssetBalance=", toString(amountAssetBalance), " priceAssetBalance=", toString(priceAssetBalance), " amountAssetBalanceDelta=", toString(amountAssetBalanceDelta), " priceAssetBalanceDelta=", toString(priceAssetBalanceDelta), " height=", toString(height)], "")
675675 $Tuple2(isOrderValid, info)
676676 }
677677 }
678678
679679
680680 func cg (i) = if ((size(i.payments) != 1))
681681 then throw("1 pmnt exp")
682682 else {
683683 let pmt = value(i.payments[0])
684684 let pmtAssetId = value(pmt.assetId)
685685 let pmtAmt = pmt.amount
686686 let r = ego(toBase58String(i.transactionId), toBase58String(pmtAssetId), pmtAmt, i.caller)
687687 let outAmAmt = r._1
688688 let outPrAmt = r._2
689689 let sts = parseIntValue(r._9)
690690 let state = r._10
691691 if (if (igs())
692692 then true
693693 else (sts == PoolShutdown))
694694 then throw(("Admin blocked: " + toString(sts)))
695695 else $Tuple5(outAmAmt, outPrAmt, pmtAmt, pmtAssetId, state)
696696 }
697697
698698
699699 func cp (caller,txId,amAsPmt,prAsPmt,slippage,emitLp,isOneAsset,validateSlippage,pmtAmt,pmtId) = {
700700 let r = epo(txId, slippage, value(amAsPmt).amount, value(amAsPmt).assetId, value(prAsPmt).amount, value(prAsPmt).assetId, caller, (txId == ""), emitLp, isOneAsset, validateSlippage, pmtAmt, pmtId)
701701 let sts = parseIntValue(r._8)
702702 if (if (if (igs())
703703 then true
704704 else (sts == PoolPutDis))
705705 then true
706706 else (sts == PoolShutdown))
707707 then throw(("Blocked:" + toString(sts)))
708708 else r
709709 }
710710
711711
712712 func calcPutOneTkn (pmtAmtRaw,pmtAssetId,userAddress,txId,withTakeFee) = {
713713 let amId = toBase58String(value(cfgAmountAssetId))
714714 let prId = toBase58String(value(cfgPriceAssetId))
715715 let lpId = cfgLpAssetId
716716 let amtDcm = cfgAmountAssetDecimals
717717 let priceDcm = cfgPriceAssetDecimals
718718 let lpAssetEmission = toBigInt(valueOrErrorMessage(assetInfo(lpId), "invalid lp asset").quantity)
719719 let chechEmission = if ((lpAssetEmission > big0))
720720 then true
721721 else throw("initial deposit requires all coins")
722722 if ((chechEmission == chechEmission))
723723 then {
724724 let amBalance = getAccBalance(amId)
725725 let prBalance = getAccBalance(prId)
726726 let $t02853128993 = if ((txId == ""))
727727 then $Tuple2(amBalance, prBalance)
728728 else if ((pmtAssetId == amId))
729729 then if ((pmtAmtRaw > amBalance))
730730 then throw("invalid payment amount")
731731 else $Tuple2((amBalance - pmtAmtRaw), prBalance)
732732 else if ((pmtAssetId == prId))
733733 then if ((pmtAmtRaw > prBalance))
734734 then throw("invalid payment amount")
735735 else $Tuple2(amBalance, (prBalance - pmtAmtRaw))
736736 else throw("wrong pmtAssetId")
737737 let amBalanceOld = $t02853128993._1
738738 let prBalanceOld = $t02853128993._2
739739 let $t02899929175 = if ((pmtAssetId == amId))
740740 then $Tuple2(pmtAmtRaw, 0)
741741 else if ((pmtAssetId == prId))
742742 then $Tuple2(0, pmtAmtRaw)
743743 else throw("invalid payment")
744744 let amAmountRaw = $t02899929175._1
745745 let prAmountRaw = $t02899929175._2
746746 let $t02917929433 = if (withTakeFee)
747747 then $Tuple3(takeFee(amAmountRaw, inFee)._1, takeFee(prAmountRaw, inFee)._1, takeFee(pmtAmtRaw, inFee)._2)
748748 else $Tuple3(amAmountRaw, prAmountRaw, 0)
749749 let amAmount = $t02917929433._1
750750 let prAmount = $t02917929433._2
751751 let feeAmount = $t02917929433._3
752752 let amBalanceNew = (amBalanceOld + amAmount)
753753 let prBalanceNew = (prBalanceOld + prAmount)
754754 let D0 = getD([t1(amBalanceOld, cfgAmountAssetDecimals), t1(prBalanceOld, cfgPriceAssetDecimals)])
755755 let D1 = getD([t1(amBalanceNew, cfgAmountAssetDecimals), t1(prBalanceNew, cfgPriceAssetDecimals)])
756756 let checkD = if ((D1 > D0))
757757 then true
758758 else throw()
759759 if ((checkD == checkD))
760760 then {
761761 let lpAmount = fraction(lpAssetEmission, (D1 - D0), D0, FLOOR)
762762 let curPrice = f1(cpbi(t1(prBalanceNew, priceDcm), t1(amBalanceNew, amtDcm)), scale8)
763763 let commonState = [IntegerEntry(pl(), curPrice), IntegerEntry(ph(height, lastBlock.timestamp), curPrice), StringEntry(pau(userAddress, txId), dataPutActionInfo(amAmountRaw, prAmountRaw, toInt(lpAmount), curPrice, 0, 0, height, lastBlock.timestamp, 0, 0))]
764764 let poolProportion = fraction(prBalanceOld, scale8, amBalanceOld)
765765 let amountAssetPart = fraction(pmtAmtRaw, scale8, (poolProportion + scale8))
766766 let priceAssetPart = (pmtAmtRaw - amountAssetPart)
767767 let lpAmtBoth = fraction(lpAssetEmission, toBigInt(priceAssetPart), toBigInt(prBalanceOld))
768768 let bonus = toInt(fraction((lpAmount - lpAmtBoth), scale8BigInt, lpAmtBoth))
769769 $Tuple4(toInt(lpAmount), commonState, feeAmount, bonus)
770770 }
771771 else throw("Strict value is not equal to itself.")
772772 }
773773 else throw("Strict value is not equal to itself.")
774774 }
775775
776776
777777 func getOneTknV2Internal (outAssetId,minOutAmount,payments,caller,originCaller,transactionId) = {
778778 let lpId = toBase58String(value(cfgLpAssetId))
779779 let amId = toBase58String(value(cfgAmountAssetId))
780780 let prId = toBase58String(value(cfgPriceAssetId))
781781 let amDecimals = cfgAmountAssetDecimals
782782 let prDecimals = cfgPriceAssetDecimals
783783 let poolStatus = cfgPoolStatus
784784 let userAddress = if ((caller == restContract))
785785 then originCaller
786786 else caller
787787 let pmt = value(payments[0])
788788 let pmtAssetId = value(pmt.assetId)
789789 let pmtAmt = pmt.amount
790790 let currentDLp = calcCurrentDLp(big0, big0, big0)
791791 if ((currentDLp == currentDLp))
792792 then {
793793 let txId58 = toBase58String(transactionId)
794794 if ((lpId != toBase58String(pmtAssetId)))
795795 then throw("Wrong LP")
796796 else {
797797 let amBalance = getAccBalance(amId)
798798 let prBalance = getAccBalance(prId)
799799 let $t03154531656 = {
800800 let @ = invoke(this, "getOneTknV2READONLY", [outAssetId, pmtAmt], nil)
801801 if ($isInstanceOf(@, "(Int, Int)"))
802802 then @
803803 else throw(($getType(@) + " couldn't be cast to (Int, Int)"))
804804 }
805805 if (($t03154531656 == $t03154531656))
806806 then {
807807 let feeAmount = $t03154531656._2
808808 let totalGet = $t03154531656._1
809809 let totalAmount = if (if ((minOutAmount > 0))
810810 then (minOutAmount > totalGet)
811811 else false)
812812 then throwErr(makeString(["amount to receive is less than ", toString(minOutAmount)], ""))
813813 else totalGet
814814 let $t03184632153 = if ((outAssetId == amId))
815815 then $Tuple4(totalAmount, 0, ((amBalance - totalAmount) - feeAmount), prBalance)
816816 else if ((outAssetId == prId))
817817 then $Tuple4(0, totalAmount, amBalance, ((prBalance - totalAmount) - feeAmount))
818818 else throw("invalid out asset id")
819819 let outAm = $t03184632153._1
820820 let outPr = $t03184632153._2
821821 let amBalanceNew = $t03184632153._3
822822 let prBalanceNew = $t03184632153._4
823823 let curPrX18 = cpbi(t1(prBalanceNew, prDecimals), t1(amBalanceNew, amDecimals))
824824 let curPr = f1(curPrX18, scale8)
825825 let outAssetIdOrWaves = if ((outAssetId == "WAVES"))
826826 then unit
827827 else fromBase58String(outAssetId)
828828 let sendFeeToMatcher = if ((feeAmount > 0))
829829 then [ScriptTransfer(feeCollectorAddress, feeAmount, outAssetIdOrWaves)]
830830 else nil
831831 let state = ([ScriptTransfer(userAddress, totalAmount, outAssetIdOrWaves), StringEntry(gau(toString(userAddress), txId58), dataGetActionInfo(outAm, outPr, pmtAmt, curPr, height, lastBlock.timestamp)), IntegerEntry(pl(), curPr), IntegerEntry(ph(height, lastBlock.timestamp), curPr)] ++ sendFeeToMatcher)
832832 if ((state == state))
833833 then {
834834 let burn = invoke(fca, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
835835 if ((burn == burn))
836836 then {
837837 let $t03293833288 = {
838838 let feeAmountForCalc = if ((this == feeCollectorAddress))
839839 then 0
840840 else feeAmount
841841 let outInAmountAsset = if ((parseAssetId(outAssetId) == cfgAmountAssetId))
842842 then true
843843 else false
844844 if (outInAmountAsset)
845845 then $Tuple2(-((totalGet + feeAmountForCalc)), 0)
846846 else $Tuple2(0, -((totalGet + feeAmountForCalc)))
847847 }
848848 let amountAssetBalanceDelta = $t03293833288._1
849849 let priceAssetBalanceDelta = $t03293833288._2
850850 let $t03329133399 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
851851 let refreshDLpActions = $t03329133399._1
852852 let updatedDLp = $t03329133399._2
853853 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
854854 if ((isUpdatedDLpValid == isUpdatedDLpValid))
855855 then $Tuple2((state ++ refreshDLpActions), totalAmount)
856856 else throw("Strict value is not equal to itself.")
857857 }
858858 else throw("Strict value is not equal to itself.")
859859 }
860860 else throw("Strict value is not equal to itself.")
861861 }
862862 else throw("Strict value is not equal to itself.")
863863 }
864864 }
865865 else throw("Strict value is not equal to itself.")
866866 }
867867
868868
869869 func managerPublicKeyOrUnit () = {
870870 let managerVaultAddress = getManagerVaultAddressOrThis()
871871 match getString(managerVaultAddress, keyManagerPublicKey()) {
872872 case s: String =>
873873 fromBase58String(s)
874874 case _: Unit =>
875875 unit
876876 case _ =>
877877 throw("Match error")
878878 }
879879 }
880880
881881
882882 let pd = throw("Permission denied")
883883
884884 func isManager (i) = match managerPublicKeyOrUnit() {
885885 case pk: ByteVector =>
886886 (i.callerPublicKey == pk)
887887 case _: Unit =>
888888 (i.caller == this)
889889 case _ =>
890890 throw("Match error")
891891 }
892892
893893
894894 func mustManager (i) = match managerPublicKeyOrUnit() {
895895 case pk: ByteVector =>
896896 if ((i.callerPublicKey == pk))
897897 then true
898898 else pd
899899 case _: Unit =>
900900 if ((i.caller == this))
901901 then true
902902 else pd
903903 case _ =>
904904 throw("Match error")
905905 }
906906
907907
908908 func getY (isReverse,D,poolAmountInBalance) = {
909909 let poolConfig = gpc()
910910 let amId = poolConfig[idxAmAsId]
911911 let prId = poolConfig[idxPrAsId]
912912 let n = big2
913913 let aPrecision = parseBigIntValue(Amult)
914914 let a = (parseBigIntValue(A) * aPrecision)
915915 let xp = if ((isReverse == false))
916916 then [(toBigInt(getAccBalance(amId)) + poolAmountInBalance), toBigInt(getAccBalance(prId))]
917917 else [(toBigInt(getAccBalance(prId)) + poolAmountInBalance), toBigInt(getAccBalance(amId))]
918918 let x = xp[0]
919919 let s = x
920920 let ann = (a * n)
921921 let c = (((((D * D) / (x * n)) * D) * aPrecision) / (ann * n))
922922 let b = ((s + ((D * aPrecision) / ann)) - D)
923923 func calc (acc,cur) = {
924924 let $t03488634906 = acc
925925 let y = $t03488634906._1
926926 let found = $t03488634906._2
927927 if ((found != unit))
928928 then acc
929929 else {
930930 let yNext = (((y * y) + c) / ((big2 * y) + b))
931931 let yDiff = absBigInt((yNext - value(y)))
932932 if ((big1 >= yDiff))
933933 then $Tuple2(yNext, cur)
934934 else $Tuple2(yNext, unit)
935935 }
936936 }
937937
938938 let arr = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
939939 let $t03523735284 = {
940940 let $l = arr
941941 let $s = size($l)
942942 let $acc0 = $Tuple2(D, unit)
943943 func $f0_1 ($a,$i) = if (($i >= $s))
944944 then $a
945945 else calc($a, $l[$i])
946946
947947 func $f0_2 ($a,$i) = if (($i >= $s))
948948 then $a
949949 else throw("List size exceeds 15")
950950
951951 $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15)
952952 }
953953 let y = $t03523735284._1
954954 let found = $t03523735284._2
955955 if ((found != unit))
956956 then y
957957 else throw(("Y calculation error, Y = " + toString(y)))
958958 }
959959
960960
961961 func skipOrderValidation () = valueOrElse(getBoolean(fca, keySkipOrderValidation(toString(this))), false)
962962
963963
964964 @Callable(i)
965965 func calculateAmountOutForSwapREADONLY (cleanAmountIn,isReverse,feePoolAmount) = {
966966 let $t03563636060 = if ((isReverse == false))
967967 then {
968968 let assetOut = strf(this, pa())
969969 let poolAmountInBalance = (toBigInt(getAccBalance(strf(this, aa()))) + toBigInt(cleanAmountIn))
970970 $Tuple2(assetOut, poolAmountInBalance)
971971 }
972972 else {
973973 let assetOut = strf(this, aa())
974974 let poolAmountInBalance = (toBigInt(getAccBalance(strf(this, pa()))) + toBigInt(cleanAmountIn))
975975 $Tuple2(assetOut, poolAmountInBalance)
976976 }
977977 let assetOut = $t03563636060._1
978978 let poolAmountInBalance = $t03563636060._2
979979 let poolConfig = gpc()
980980 let amId = poolConfig[idxAmAsId]
981981 let prId = poolConfig[idxPrAsId]
982982 let xp = [toBigInt(getAccBalance(amId)), toBigInt(getAccBalance(prId))]
983983 let D = getD(xp)
984984 let y = getY(isReverse, D, toBigInt(cleanAmountIn))
985985 let dy = ((toBigInt(getAccBalance(assetOut)) - y) - toBigInt(1))
986986 let totalGetRaw = max([0, toInt(dy)])
987987 let newXp = if ((isReverse == false))
988988 then [((toBigInt(getAccBalance(amId)) + toBigInt(cleanAmountIn)) + toBigInt(feePoolAmount)), (toBigInt(getAccBalance(prId)) - dy)]
989989 else [(toBigInt(getAccBalance(amId)) - dy), ((toBigInt(getAccBalance(prId)) + toBigInt(cleanAmountIn)) + toBigInt(feePoolAmount))]
990990 let newD = getD(newXp)
991991 let checkD = if ((newD >= D))
992992 then true
993993 else throw(makeString(["new D is fewer error", toString(D), toString(newD)], "__"))
994994 if ((checkD == checkD))
995995 then $Tuple2(nil, totalGetRaw)
996996 else throw("Strict value is not equal to itself.")
997997 }
998998
999999
10001000
10011001 @Callable(i)
10021002 func calculateAmountOutForSwapAndSendTokens (cleanAmountIn,isReverse,amountOutMin,addressTo,feePoolAmount) = {
10031003 let swapContact = {
10041004 let @ = invoke(fca, "getSwapContractREADONLY", nil, nil)
10051005 if ($isInstanceOf(@, "String"))
10061006 then @
10071007 else throw(($getType(@) + " couldn't be cast to String"))
10081008 }
10091009 let isPoolSwapDisabled = {
10101010 let @ = invoke(fca, "isPoolSwapDisabledREADONLY", [toString(this)], nil)
10111011 if ($isInstanceOf(@, "Boolean"))
10121012 then @
10131013 else throw(($getType(@) + " couldn't be cast to Boolean"))
10141014 }
10151015 let isSwapDisabled = if (if (igs())
10161016 then true
10171017 else (cfgPoolStatus == PoolShutdown))
10181018 then true
10191019 else isPoolSwapDisabled
10201020 let checks = [if (if (!(isSwapDisabled))
10211021 then true
10221022 else isManager(i))
10231023 then true
10241024 else throwErr("swap operation is blocked by admin"), if ((value(i.payments[0]).amount >= cleanAmountIn))
10251025 then true
10261026 else throwErr("Wrong amount"), if ((i.caller == addressFromStringValue(swapContact)))
10271027 then true
10281028 else throwErr("Permission denied")]
10291029 if ((checks == checks))
10301030 then {
10311031 let pmt = value(i.payments[0])
10321032 let assetIn = assetIdToString(pmt.assetId)
10331033 let $t03779538189 = if ((isReverse == false))
10341034 then {
10351035 let assetOut = strf(this, pa())
10361036 let poolAmountInBalance = (getAccBalance(assetIn) - value(i.payments[0]).amount)
10371037 $Tuple2(assetOut, poolAmountInBalance)
10381038 }
10391039 else {
10401040 let assetOut = strf(this, aa())
10411041 let poolAmountInBalance = (getAccBalance(assetIn) - value(i.payments[0]).amount)
10421042 $Tuple2(assetOut, poolAmountInBalance)
10431043 }
10441044 let assetOut = $t03779538189._1
10451045 let poolAmountInBalance = $t03779538189._2
10461046 let poolConfig = gpc()
10471047 let amId = poolConfig[idxAmAsId]
10481048 let prId = poolConfig[idxPrAsId]
10491049 let xp = if ((isReverse == false))
10501050 then [(toBigInt(getAccBalance(amId)) - toBigInt(value(i.payments[0]).amount)), toBigInt(getAccBalance(prId))]
10511051 else [toBigInt(getAccBalance(amId)), (toBigInt(getAccBalance(prId)) - toBigInt(value(i.payments[0]).amount))]
10521052 let D = getD(xp)
10531053 let y = getY(isReverse, D, toBigInt(0))
10541054 let dy = ((toBigInt(getAccBalance(assetOut)) - y) - toBigInt(1))
10551055 let totalGetRaw = max([0, toInt(dy)])
10561056 let checkMin = if ((totalGetRaw >= amountOutMin))
10571057 then true
10581058 else throw("Exchange result is fewer coins than expected")
10591059 if ((checkMin == checkMin))
10601060 then {
10611061 let newXp = if ((isReverse == false))
10621062 then [(toBigInt(getAccBalance(amId)) + toBigInt(feePoolAmount)), (toBigInt(getAccBalance(prId)) - dy)]
10631063 else [(toBigInt(getAccBalance(amId)) - dy), (toBigInt(getAccBalance(prId)) + toBigInt(feePoolAmount))]
10641064 let newD = getD(newXp)
10651065 let checkD = if ((newD >= D))
10661066 then true
10671067 else throw("new D is fewer error")
10681068 if ((checkD == checkD))
10691069 then {
10701070 let amountAssetBalanceDelta = if (isReverse)
10711071 then -(totalGetRaw)
10721072 else feePoolAmount
10731073 let priceAssetBalanceDelta = if (isReverse)
10741074 then feePoolAmount
10751075 else -(totalGetRaw)
10761076 let refreshDLpActions = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)._1
10771077 if ((refreshDLpActions == refreshDLpActions))
10781078 then $Tuple2([ScriptTransfer(addressFromStringValue(addressTo), totalGetRaw, parseAssetId(assetOut))], totalGetRaw)
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
10881088
10891089
10901090 @Callable(i)
10911091 func constructor (fc) = {
10921092 let c = mustManager(i)
10931093 if ((c == c))
10941094 then [StringEntry(fc(), fc)]
10951095 else throw("Strict value is not equal to itself.")
10961096 }
10971097
10981098
10991099
11001100 @Callable(i)
11011101 func put (slip,autoStake) = {
11021102 let factCfg = gfc()
11031103 let stakingCntr = valueOrErrorMessage(addressFromString(factCfg[idxFactStakCntr]), "Wr st addr")
11041104 let slipCntr = valueOrErrorMessage(addressFromString(factCfg[idxFactSlippCntr]), "Wr sl addr")
11051105 if ((0 > slip))
11061106 then throw("Wrong slippage")
11071107 else if ((size(i.payments) != 2))
11081108 then throw("2 pmnts expd")
11091109 else {
11101110 let amAssetPmt = toBigInt(value(i.payments[0]).amount)
11111111 let prAssetPmt = toBigInt(value(i.payments[1]).amount)
11121112 let amountAssetBalance = (toBigInt(getAccBalance(assetIdToString(cfgAmountAssetId))) - amAssetPmt)
11131113 if ((amountAssetBalance == amountAssetBalance))
11141114 then {
11151115 let priceAssetBalance = (toBigInt(getAccBalance(assetIdToString(cfgPriceAssetId))) - prAssetPmt)
11161116 if ((priceAssetBalance == priceAssetBalance))
11171117 then {
11181118 let lpAssetEmission = toBigInt(value(assetInfo(cfgLpAssetId)).quantity)
11191119 if ((lpAssetEmission == lpAssetEmission))
11201120 then {
11211121 let currentDLp = calcCurrentDLp(amAssetPmt, prAssetPmt, toBigInt(0))
11221122 if ((currentDLp == currentDLp))
11231123 then {
11241124 let e = cp(toString(i.caller), toBase58String(i.transactionId), AttachedPayment(value(i.payments[0]).assetId, value(i.payments[0]).amount), i.payments[1], slip, true, false, true, 0, "")
11251125 let emitLpAmt = e._2
11261126 let lpAssetId = e._7
11271127 let state = e._9
11281128 let amDiff = e._10
11291129 let prDiff = e._11
11301130 let amId = e._12
11311131 let prId = e._13
11321132 let r = invoke(fca, "emit", [emitLpAmt], nil)
11331133 if ((r == r))
11341134 then {
11351135 let el = match r {
11361136 case legacy: Address =>
11371137 invoke(legacy, "emit", [emitLpAmt], nil)
11381138 case _ =>
11391139 unit
11401140 }
11411141 if ((el == el))
11421142 then {
11431143 let sa = if ((amDiff > 0))
11441144 then invoke(slipCntr, "put", nil, [AttachedPayment(amId, amDiff)])
11451145 else nil
11461146 if ((sa == sa))
11471147 then {
11481148 let sp = if ((prDiff > 0))
11491149 then invoke(slipCntr, "put", nil, [AttachedPayment(prId, prDiff)])
11501150 else nil
11511151 if ((sp == sp))
11521152 then {
11531153 let lpTrnsfr = if (autoStake)
11541154 then {
11551155 let ss = invoke(stakingCntr, "stake", nil, [AttachedPayment(lpAssetId, emitLpAmt)])
11561156 if ((ss == ss))
11571157 then nil
11581158 else throw("Strict value is not equal to itself.")
11591159 }
11601160 else [ScriptTransfer(i.caller, emitLpAmt, lpAssetId)]
11611161 let $t04264442786 = refreshDLpInternal(0, 0, 0)
11621162 let refreshDLpActions = $t04264442786._1
11631163 let updatedDLp = $t04264442786._2
11641164 let check = if ((updatedDLp >= currentDLp))
11651165 then true
11661166 else throwErr(makeString(["updated DLp lower than current DLp", toString(amountAssetBalance), toString(priceAssetBalance), toString(lpAssetEmission), toString(currentDLp), toString(updatedDLp), toString(amDiff), toString(prDiff)], " "))
11671167 if ((check == check))
11681168 then {
11691169 let lpAssetEmissionAfter = value(assetInfo(cfgLpAssetId)).quantity
11701170 if ((lpAssetEmissionAfter == lpAssetEmissionAfter))
11711171 then ((state ++ lpTrnsfr) ++ refreshDLpActions)
11721172 else throw("Strict value is not equal to itself.")
11731173 }
11741174 else throw("Strict value is not equal to itself.")
11751175 }
11761176 else throw("Strict value is not equal to itself.")
11771177 }
11781178 else throw("Strict value is not equal to itself.")
11791179 }
11801180 else throw("Strict value is not equal to itself.")
11811181 }
11821182 else throw("Strict value is not equal to itself.")
11831183 }
11841184 else throw("Strict value is not equal to itself.")
11851185 }
11861186 else throw("Strict value is not equal to itself.")
11871187 }
11881188 else throw("Strict value is not equal to itself.")
11891189 }
11901190 else throw("Strict value is not equal to itself.")
11911191 }
11921192 }
11931193
11941194
11951195
11961196 @Callable(i)
11971197 func putOneTknV2 (minOutAmount,autoStake) = {
11981198 let isPoolOneTokenOperationsDisabled = {
11991199 let @ = invoke(fca, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
12001200 if ($isInstanceOf(@, "Boolean"))
12011201 then @
12021202 else throw(($getType(@) + " couldn't be cast to Boolean"))
12031203 }
12041204 let isPutDisabled = if (if (if (igs())
12051205 then true
12061206 else (cfgPoolStatus == PoolPutDis))
12071207 then true
12081208 else (cfgPoolStatus == PoolShutdown))
12091209 then true
12101210 else isPoolOneTokenOperationsDisabled
12111211 let checks = [if (if (!(isPutDisabled))
12121212 then true
12131213 else isManager(i))
12141214 then true
12151215 else throwErr("put operation is blocked by admin"), if ((size(i.payments) == 1))
12161216 then true
12171217 else throwErr("exactly 1 payment are expected")]
12181218 if ((checks == checks))
12191219 then {
12201220 let amId = toBase58String(value(cfgAmountAssetId))
12211221 let prId = toBase58String(value(cfgPriceAssetId))
12221222 let lpId = cfgLpAssetId
12231223 let amDecimals = cfgAmountAssetDecimals
12241224 let prDecimals = cfgPriceAssetDecimals
12251225 let userAddress = if ((i.caller == this))
12261226 then i.originCaller
12271227 else i.caller
12281228 let pmt = value(i.payments[0])
12291229 let pmtAssetId = toBase58String(value(pmt.assetId))
12301230 let pmtAmt = pmt.amount
12311231 let currentDLp = if ((pmt.assetId == cfgAmountAssetId))
12321232 then calcCurrentDLp(toBigInt(pmtAmt), toBigInt(0), toBigInt(0))
12331233 else calcCurrentDLp(toBigInt(0), toBigInt(pmtAmt), toBigInt(0))
12341234 if ((currentDLp == currentDLp))
12351235 then {
12361236 let $t04442744585 = calcPutOneTkn(pmtAmt, pmtAssetId, toString(userAddress), toBase58String(i.transactionId), true)
12371237 if (($t04442744585 == $t04442744585))
12381238 then {
12391239 let feeAmount = $t04442744585._3
12401240 let state = $t04442744585._2
12411241 let estimLP = $t04442744585._1
12421242 let emitLpAmt = if (if ((minOutAmount > 0))
12431243 then (minOutAmount > estimLP)
12441244 else false)
12451245 then throwErr(makeString(["amount to receive is less than ", toString(minOutAmount)], ""))
12461246 else estimLP
12471247 let e = invoke(fca, "emit", [emitLpAmt], nil)
12481248 if ((e == e))
12491249 then {
12501250 let el = match e {
12511251 case legacy: Address =>
12521252 invoke(legacy, "emit", [emitLpAmt], nil)
12531253 case _ =>
12541254 unit
12551255 }
12561256 if ((el == el))
12571257 then {
12581258 let lpTrnsfr = if (autoStake)
12591259 then {
12601260 let ss = invoke(stakingContract, "stakeFor", [toString(i.caller)], [AttachedPayment(lpId, emitLpAmt)])
12611261 if ((ss == ss))
12621262 then nil
12631263 else throw("Strict value is not equal to itself.")
12641264 }
12651265 else [ScriptTransfer(i.caller, emitLpAmt, lpId)]
12661266 let sendFeeToMatcher = if ((feeAmount > 0))
12671267 then [ScriptTransfer(feeCollectorAddress, feeAmount, fromBase58String(pmtAssetId))]
12681268 else nil
12691269 let $t04547045819 = if ((this == feeCollectorAddress))
12701270 then $Tuple2(0, 0)
12711271 else {
12721272 let paymentInAmountAsset = if ((pmt.assetId == cfgAmountAssetId))
12731273 then true
12741274 else false
12751275 if (paymentInAmountAsset)
12761276 then $Tuple2(-(feeAmount), 0)
12771277 else $Tuple2(0, -(feeAmount))
12781278 }
12791279 let amountAssetBalanceDelta = $t04547045819._1
12801280 let priceAssetBalanceDelta = $t04547045819._2
12811281 let $t04582245930 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
12821282 let refreshDLpActions = $t04582245930._1
12831283 let updatedDLp = $t04582245930._2
12841284 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
12851285 if ((isUpdatedDLpValid == isUpdatedDLpValid))
12861286 then $Tuple2((((state ++ lpTrnsfr) ++ sendFeeToMatcher) ++ refreshDLpActions), emitLpAmt)
12871287 else throw("Strict value is not equal to itself.")
12881288 }
12891289 else throw("Strict value is not equal to itself.")
12901290 }
12911291 else throw("Strict value is not equal to itself.")
12921292 }
12931293 else throw("Strict value is not equal to itself.")
12941294 }
12951295 else throw("Strict value is not equal to itself.")
12961296 }
12971297 else throw("Strict value is not equal to itself.")
12981298 }
12991299
13001300
13011301
13021302 @Callable(i)
13031303 func putForFree (maxSlpg) = if ((0 > maxSlpg))
13041304 then throw("Wrong slpg")
13051305 else if ((size(i.payments) != 2))
13061306 then throw("2 pmnts expd")
13071307 else {
13081308 let estPut = cp(toString(i.caller), toBase58String(i.transactionId), AttachedPayment(value(i.payments[0]).assetId, value(i.payments[0]).amount), i.payments[1], maxSlpg, false, false, true, 0, "")
13091309 let state = estPut._9
13101310 let amAssetPmt = toBigInt(value(i.payments[0]).amount)
13111311 let prAssetPmt = toBigInt(value(i.payments[1]).amount)
13121312 let currentDLp = calcCurrentDLp(amAssetPmt, prAssetPmt, toBigInt(0))
13131313 if ((currentDLp == currentDLp))
13141314 then {
13151315 let $t04696047025 = refreshDLpInternal(0, 0, 0)
13161316 let refreshDLpActions = $t04696047025._1
13171317 let updatedDLp = $t04696047025._2
13181318 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
13191319 if ((isUpdatedDLpValid == isUpdatedDLpValid))
13201320 then (state ++ refreshDLpActions)
13211321 else throw("Strict value is not equal to itself.")
13221322 }
13231323 else throw("Strict value is not equal to itself.")
13241324 }
13251325
13261326
13271327
13281328 @Callable(i)
13291329 func get () = {
13301330 let currentDLp = calcCurrentDLp(toBigInt(0), toBigInt(0), toBigInt(0))
13311331 if ((currentDLp == currentDLp))
13321332 then {
13331333 let r = cg(i)
13341334 let outAmtAmt = r._1
13351335 let outPrAmt = r._2
13361336 let pmtAmt = r._3
13371337 let pmtAssetId = r._4
13381338 let state = r._5
13391339 let b = invoke(fca, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
13401340 if ((b == b))
13411341 then {
13421342 let $t04819848280 = refreshDLpInternal(-(outAmtAmt), -(outPrAmt), 0)
13431343 let refreshDLpActions = $t04819848280._1
13441344 let updatedDLp = $t04819848280._2
13451345 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
13461346 if ((isUpdatedDLpValid == isUpdatedDLpValid))
13471347 then (state ++ refreshDLpActions)
13481348 else throw("Strict value is not equal to itself.")
13491349 }
13501350 else throw("Strict value is not equal to itself.")
13511351 }
13521352 else throw("Strict value is not equal to itself.")
13531353 }
13541354
13551355
13561356
13571357 @Callable(i)
13581358 func getOneTknV2 (outAssetId,minOutAmount) = {
13591359 let isPoolOneTokenOperationsDisabled = {
13601360 let @ = invoke(fca, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
13611361 if ($isInstanceOf(@, "Boolean"))
13621362 then @
13631363 else throw(($getType(@) + " couldn't be cast to Boolean"))
13641364 }
13651365 let isGetDisabled = if (if (igs())
13661366 then true
13671367 else (cfgPoolStatus == PoolShutdown))
13681368 then true
13691369 else isPoolOneTokenOperationsDisabled
13701370 let checks = [if (if (!(isGetDisabled))
13711371 then true
13721372 else isManager(i))
13731373 then true
13741374 else throwErr("get operation is blocked by admin"), if ((size(i.payments) == 1))
13751375 then true
13761376 else throwErr("exactly 1 payment are expected")]
13771377 if ((checks == checks))
13781378 then {
13791379 let $t04889849053 = getOneTknV2Internal(outAssetId, minOutAmount, i.payments, i.caller, i.originCaller, i.transactionId)
13801380 let state = $t04889849053._1
13811381 let totalAmount = $t04889849053._2
13821382 $Tuple2(state, totalAmount)
13831383 }
13841384 else throw("Strict value is not equal to itself.")
13851385 }
13861386
13871387
13881388
13891389 @Callable(i)
13901390 func refreshDLp () = {
13911391 let lastRefreshedBlockHeight = valueOrElse(getInteger(keyDLpRefreshedHeight), 0)
13921392 let checkLastRefreshedBlockHeight = if (((height - lastRefreshedBlockHeight) >= dLpRefreshDelay))
13931393 then unit
13941394 else throwErr(makeString([toString(dLpRefreshDelay), " blocks have not passed since the previous call"], ""))
13951395 if ((checkLastRefreshedBlockHeight == checkLastRefreshedBlockHeight))
13961396 then {
13971397 let dLp = valueOrErrorMessage(parseBigInt(valueOrElse(getString(this, keyDLp), "0")), fmtErr("invalid dLp"))
13981398 let $t04957749641 = refreshDLpInternal(0, 0, 0)
13991399 let dLpUpdateActions = $t04957749641._1
14001400 let updatedDLp = $t04957749641._2
14011401 let actions = if ((dLp != updatedDLp))
14021402 then dLpUpdateActions
14031403 else throwErr("nothing to refresh")
14041404 $Tuple2(actions, toString(updatedDLp))
14051405 }
14061406 else throw("Strict value is not equal to itself.")
14071407 }
14081408
14091409
14101410
14111411 @Callable(i)
14121412 func getOneTknV2READONLY (outAssetId,lpAssetAmount) = {
14131413 let amId = toBase58String(value(cfgAmountAssetId))
14141414 let prId = toBase58String(value(cfgPriceAssetId))
14151415 let lpId = toBase58String(value(cfgLpAssetId))
14161416 let xp = [toBigInt(getAccBalance(amId)), toBigInt(getAccBalance(prId))]
14171417 let lpEmission = toBigInt(valueOrErrorMessage(assetInfo(fromBase58String(lpId)), "invalid lp asset").quantity)
14181418 let D0 = getD(xp)
14191419 let D1 = (D0 - fraction(toBigInt(lpAssetAmount), D0, lpEmission))
14201420 let index = if ((outAssetId == amId))
14211421 then 0
14221422 else if ((outAssetId == prId))
14231423 then 1
14241424 else throw("invalid out asset id")
14251425 let newY = getYD(xp, index, D1)
14261426 let dy = (xp[index] - newY)
14271427 let totalGetRaw = max([0, toInt((dy - big1))])
14281428 let $t05065150706 = takeFee(totalGetRaw, outFee)
14291429 let totalGet = $t05065150706._1
14301430 let feeAmount = $t05065150706._2
14311431 $Tuple2(nil, $Tuple2(totalGet, feeAmount))
14321432 }
14331433
14341434
14351435
14361436 @Callable(i)
14371437 func getOneTknV2WithBonusREADONLY (outAssetId,lpAssetAmount) = {
14381438 let amId = toBase58String(value(cfgAmountAssetId))
14391439 let prId = toBase58String(value(cfgPriceAssetId))
14401440 let lpId = toBase58String(value(cfgLpAssetId))
14411441 let amBalance = getAccBalance(amId)
14421442 let prBalance = getAccBalance(prId)
14431443 let $t05108151196 = {
14441444 let @ = invoke(this, "getOneTknV2READONLY", [outAssetId, lpAssetAmount], nil)
14451445 if ($isInstanceOf(@, "(Int, Int)"))
14461446 then @
14471447 else throw(($getType(@) + " couldn't be cast to (Int, Int)"))
14481448 }
14491449 let totalGet = $t05108151196._1
14501450 let feeAmount = $t05108151196._2
14511451 let r = ego("", lpId, lpAssetAmount, this)
14521452 let outAmAmt = r._1
14531453 let outPrAmt = r._2
14541454 let sumOfGetAssets = (outAmAmt + outPrAmt)
14551455 let bonus = if ((sumOfGetAssets == 0))
14561456 then if ((totalGet == 0))
14571457 then 0
14581458 else throw("bonus calculation error")
14591459 else fraction((totalGet - sumOfGetAssets), scale8, sumOfGetAssets)
14601460 $Tuple2(nil, $Tuple3(totalGet, feeAmount, bonus))
14611461 }
14621462
14631463
14641464
14651465 @Callable(i)
14661466 func getNoLess (noLessThenAmtAsset,noLessThenPriceAsset) = {
14671467 let r = cg(i)
14681468 let outAmAmt = r._1
14691469 let outPrAmt = r._2
14701470 let pmtAmt = r._3
14711471 let pmtAssetId = r._4
14721472 let state = r._5
14731473 if ((noLessThenAmtAsset > outAmAmt))
14741474 then throw(((("Failed: " + toString(outAmAmt)) + " < ") + toString(noLessThenAmtAsset)))
14751475 else if ((noLessThenPriceAsset > outPrAmt))
14761476 then throw(((("Failed: " + toString(outPrAmt)) + " < ") + toString(noLessThenPriceAsset)))
14771477 else {
14781478 let currentDLp = calcCurrentDLp(toBigInt(0), toBigInt(0), toBigInt(0))
14791479 if ((currentDLp == currentDLp))
14801480 then {
14811481 let burnLPAssetOnFactory = invoke(fca, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
14821482 if ((burnLPAssetOnFactory == burnLPAssetOnFactory))
14831483 then {
14841484 let $t05236252443 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
14851485 let refreshDLpActions = $t05236252443._1
14861486 let updatedDLp = $t05236252443._2
14871487 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
14881488 if ((isUpdatedDLpValid == isUpdatedDLpValid))
14891489 then (state ++ refreshDLpActions)
14901490 else throw("Strict value is not equal to itself.")
14911491 }
14921492 else throw("Strict value is not equal to itself.")
14931493 }
14941494 else throw("Strict value is not equal to itself.")
14951495 }
14961496 }
14971497
14981498
14991499
15001500 @Callable(i)
15011501 func unstakeAndGet (amount) = {
15021502 let checkPayments = if ((size(i.payments) != 0))
15031503 then throw("No pmnts expd")
15041504 else true
15051505 if ((checkPayments == checkPayments))
15061506 then {
15071507 let factoryCfg = gfc()
15081508 let lpAssetId = cfgLpAssetId
15091509 let staking = valueOrErrorMessage(addressFromString(factoryCfg[idxFactStakCntr]), "Wr st addr")
15101510 let currentDLp = calcCurrentDLp(toBigInt(0), toBigInt(0), toBigInt(0))
15111511 if ((currentDLp == currentDLp))
15121512 then {
15131513 let unstakeInv = invoke(staking, "unstake", [toBase58String(lpAssetId), amount], nil)
15141514 if ((unstakeInv == unstakeInv))
15151515 then {
15161516 let r = ego(toBase58String(i.transactionId), toBase58String(lpAssetId), amount, i.caller)
15171517 let outAmAmt = r._1
15181518 let outPrAmt = r._2
15191519 let sts = parseIntValue(r._9)
15201520 let state = r._10
15211521 let v = if (if (igs())
15221522 then true
15231523 else (sts == PoolShutdown))
15241524 then throw(("Blocked: " + toString(sts)))
15251525 else true
15261526 if ((v == v))
15271527 then {
15281528 let burnA = invoke(fca, "burn", [amount], [AttachedPayment(lpAssetId, amount)])
15291529 if ((burnA == burnA))
15301530 then {
15311531 let $t05347053551 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
15321532 let refreshDLpActions = $t05347053551._1
15331533 let updatedDLp = $t05347053551._2
15341534 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
15351535 if ((isUpdatedDLpValid == isUpdatedDLpValid))
15361536 then (state ++ refreshDLpActions)
15371537 else throw("Strict value is not equal to itself.")
15381538 }
15391539 else throw("Strict value is not equal to itself.")
15401540 }
15411541 else throw("Strict value is not equal to itself.")
15421542 }
15431543 else throw("Strict value is not equal to itself.")
15441544 }
15451545 else throw("Strict value is not equal to itself.")
15461546 }
15471547 else throw("Strict value is not equal to itself.")
15481548 }
15491549
15501550
15511551
15521552 @Callable(i)
15531553 func unstakeAndGetNoLess (unstakeAmount,noLessThenAmountAsset,noLessThenPriceAsset) = {
15541554 let isGetDisabled = if (igs())
15551555 then true
15561556 else (cfgPoolStatus == PoolShutdown)
15571557 let checks = [if (!(isGetDisabled))
15581558 then true
15591559 else throw("get operation is blocked by admin"), if ((size(i.payments) == 0))
15601560 then true
15611561 else throw("no payments are expected")]
15621562 if ((checks == checks))
15631563 then {
15641564 let currentDLp = calcCurrentDLp(toBigInt(0), toBigInt(0), toBigInt(0))
15651565 if ((currentDLp == currentDLp))
15661566 then {
15671567 let unstakeInv = invoke(stakingContract, "unstake", [toBase58String(cfgLpAssetId), unstakeAmount], nil)
15681568 if ((unstakeInv == unstakeInv))
15691569 then {
15701570 let res = ego(toBase58String(i.transactionId), toBase58String(cfgLpAssetId), unstakeAmount, i.caller)
15711571 let outAmAmt = res._1
15721572 let outPrAmt = res._2
15731573 let state = res._10
15741574 let checkAmounts = [if ((outAmAmt >= noLessThenAmountAsset))
15751575 then true
15761576 else throw(makeString(["amount asset amount to receive is less than ", toString(noLessThenAmountAsset)], "")), if ((outPrAmt >= noLessThenPriceAsset))
15771577 then true
15781578 else throw(makeString(["price asset amount to receive is less than ", toString(noLessThenPriceAsset)], ""))]
15791579 if ((checkAmounts == checkAmounts))
15801580 then {
15811581 let burnLPAssetOnFactory = invoke(fca, "burn", [unstakeAmount], [AttachedPayment(cfgLpAssetId, unstakeAmount)])
15821582 if ((burnLPAssetOnFactory == burnLPAssetOnFactory))
15831583 then {
15841584 let $t05480254883 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
15851585 let refreshDLpActions = $t05480254883._1
15861586 let updatedDLp = $t05480254883._2
15871587 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
15881588 if ((isUpdatedDLpValid == isUpdatedDLpValid))
15891589 then (state ++ refreshDLpActions)
15901590 else throw("Strict value is not equal to itself.")
15911591 }
15921592 else throw("Strict value is not equal to itself.")
15931593 }
15941594 else throw("Strict value is not equal to itself.")
15951595 }
15961596 else throw("Strict value is not equal to itself.")
15971597 }
15981598 else throw("Strict value is not equal to itself.")
15991599 }
16001600 else throw("Strict value is not equal to itself.")
16011601 }
16021602
16031603
16041604
16051605 @Callable(i)
16061606 func unstakeAndGetOneTknV2 (unstakeAmount,outAssetId,minOutAmount) = {
16071607 let isPoolOneTokenOperationsDisabled = {
16081608 let @ = invoke(fca, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
16091609 if ($isInstanceOf(@, "Boolean"))
16101610 then @
16111611 else throw(($getType(@) + " couldn't be cast to Boolean"))
16121612 }
16131613 let isGetDisabled = if (if (igs())
16141614 then true
16151615 else (cfgPoolStatus == PoolShutdown))
16161616 then true
16171617 else isPoolOneTokenOperationsDisabled
16181618 let checks = [if (if (!(isGetDisabled))
16191619 then true
16201620 else isManager(i))
16211621 then true
16221622 else throwErr("get operation is blocked by admin"), if ((size(i.payments) == 0))
16231623 then true
16241624 else throwErr("no payments are expected")]
16251625 if ((checks == checks))
16261626 then {
16271627 let factoryCfg = gfc()
16281628 let lpAssetId = cfgLpAssetId
16291629 let staking = valueOrErrorMessage(addressFromString(factoryCfg[idxFactStakCntr]), "Wr st addr")
16301630 let userAddress = i.caller
16311631 let lpAssetRecipientAddress = this
16321632 let unstakeInv = invoke(staking, "unstakeINTERNAL", [lpAssetId, unstakeAmount, userAddress.bytes, lpAssetRecipientAddress.bytes], nil)
16331633 if ((unstakeInv == unstakeInv))
16341634 then {
16351635 let $t05590556093 = getOneTknV2Internal(outAssetId, minOutAmount, [AttachedPayment(lpAssetId, unstakeAmount)], i.caller, i.originCaller, i.transactionId)
16361636 let state = $t05590556093._1
16371637 let totalAmount = $t05590556093._2
16381638 $Tuple2(state, totalAmount)
16391639 }
16401640 else throw("Strict value is not equal to itself.")
16411641 }
16421642 else throw("Strict value is not equal to itself.")
16431643 }
16441644
16451645
16461646
16471647 @Callable(i)
16481648 func putOneTknV2WithBonusREADONLY (paymentAmountRaw,paymentAssetId) = {
16491649 let $t05622156324 = calcPutOneTkn(paymentAmountRaw, paymentAssetId, "", "", true)
16501650 let lpAmount = $t05622156324._1
16511651 let state = $t05622156324._2
16521652 let feeAmount = $t05622156324._3
16531653 let bonus = $t05622156324._4
16541654 $Tuple2(nil, $Tuple3(lpAmount, feeAmount, bonus))
16551655 }
16561656
16571657
16581658
16591659 @Callable(i)
16601660 func putOneTknV2WithoutTakeFeeREADONLY (paymentAmountRaw,paymentAssetId) = {
16611661 let $t05647256576 = calcPutOneTkn(paymentAmountRaw, paymentAssetId, "", "", false)
16621662 let lpAmount = $t05647256576._1
16631663 let state = $t05647256576._2
16641664 let feeAmount = $t05647256576._3
16651665 let bonus = $t05647256576._4
16661666 $Tuple2(nil, $Tuple3(lpAmount, feeAmount, bonus))
16671667 }
16681668
16691669
16701670
16711671 @Callable(i)
16721672 func activate (amtAsStr,prAsStr) = if ((toString(i.caller) != toString(fca)))
16731673 then throw("denied")
16741674 else $Tuple2([StringEntry(aa(), amtAsStr), StringEntry(pa(), prAsStr), StringEntry(amp(), toString(ampInitial)), StringEntry(keyAmpHistory(height), toString(ampInitial))], "success")
16751675
16761676
16771677
16781678 @Callable(i)
1679+func invert () = {
1680+ let checks = [if ((i.caller == fca))
1681+ then true
1682+ else throwErr("invalid caller")]
1683+ if ((checks == checks))
1684+ then $Tuple2([StringEntry(aa(), assetIdToString(cfgPriceAssetId)), StringEntry(pa(), assetIdToString(cfgAmountAssetId))], unit)
1685+ else throw("Strict value is not equal to itself.")
1686+ }
1687+
1688+
1689+
1690+@Callable(i)
16791691 func getPoolConfigWrapperREADONLY () = $Tuple2(nil, gpc())
16801692
16811693
16821694
16831695 @Callable(i)
16841696 func getAccBalanceWrapperREADONLY (assetId) = $Tuple2(nil, getAccBalance(assetId))
16851697
16861698
16871699
16881700 @Callable(i)
16891701 func calcPricesWrapperREADONLY (amAmt,prAmt,lpAmt) = {
16901702 let pr = calcPrices(amAmt, prAmt, lpAmt)
16911703 $Tuple2(nil, [toString(pr[0]), toString(pr[1]), toString(pr[2])])
16921704 }
16931705
16941706
16951707
16961708 @Callable(i)
16971709 func fromX18WrapperREADONLY (val,resScaleMult) = $Tuple2(nil, f1(parseBigIntValue(val), resScaleMult))
16981710
16991711
17001712
17011713 @Callable(i)
17021714 func toX18WrapperREADONLY (origVal,origScaleMult) = $Tuple2(nil, toString(t1(origVal, origScaleMult)))
17031715
17041716
17051717
17061718 @Callable(i)
17071719 func calcPriceBigIntWrapperREADONLY (prAmtX18,amAmtX18) = $Tuple2(nil, toString(cpbi(parseBigIntValue(prAmtX18), parseBigIntValue(amAmtX18))))
17081720
17091721
17101722
17111723 @Callable(i)
17121724 func estimatePutOperationWrapperREADONLY (txId58,slippage,inAmAmt,inAmId,inPrAmt,inPrId,usrAddr,isEval,emitLp) = $Tuple2(nil, epo(txId58, slippage, inAmAmt, inAmId, inPrAmt, inPrId, usrAddr, isEval, emitLp, true, false, 0, ""))
17131725
17141726
17151727
17161728 @Callable(i)
17171729 func estimateGetOperationWrapperREADONLY (txId58,pmtAsId,pmtLpAmt,usrAddr) = {
17181730 let r = ego(txId58, pmtAsId, pmtLpAmt, addressFromStringValue(usrAddr))
17191731 $Tuple2(nil, $Tuple10(r._1, r._2, r._3, r._4, r._5, r._6, r._7, toString(r._8), r._9, r._10))
17201732 }
17211733
17221734
17231735
17241736 @Callable(i)
17251737 func changeAmp () = {
17261738 let cfg = invoke(fca, "getChangeAmpConfigREADONLY", [toString(this)], nil)
1727- let $t05905659255 = match cfg {
1739+ let $t05929759496 = match cfg {
17281740 case list: List[Any] =>
17291741 $Tuple3({
17301742 let @ = list[0]
17311743 if ($isInstanceOf(@, "Int"))
17321744 then @
17331745 else throw(($getType(@) + " couldn't be cast to Int"))
17341746 }, {
17351747 let @ = list[1]
17361748 if ($isInstanceOf(@, "Int"))
17371749 then @
17381750 else throw(($getType(@) + " couldn't be cast to Int"))
17391751 }, {
17401752 let @ = list[2]
17411753 if ($isInstanceOf(@, "Int"))
17421754 then @
17431755 else throw(($getType(@) + " couldn't be cast to Int"))
17441756 })
17451757 case _ =>
17461758 throwErr("invalid entry type")
17471759 }
1748- let delay = $t05905659255._1
1749- let delta = $t05905659255._2
1750- let target = $t05905659255._3
1760+ let delay = $t05929759496._1
1761+ let delta = $t05929759496._2
1762+ let target = $t05929759496._3
17511763 let curAmp = parseIntValue(getStringValue(amp()))
17521764 let newAmpRaw = (curAmp + delta)
17531765 let newAmp = if ((0 > delta))
17541766 then if ((target > newAmpRaw))
17551767 then target
17561768 else newAmpRaw
17571769 else if ((newAmpRaw > target))
17581770 then target
17591771 else newAmpRaw
17601772 let lastCall = valueOrElse(getInteger(keyChangeAmpLastCall()), 0)
17611773 let wait = (lastCall + delay)
17621774 let checks = [if ((height > wait))
17631775 then true
17641776 else throwErr("try again in few blocks"), if ((curAmp != newAmp))
17651777 then true
17661778 else throwErr("already reached target")]
17671779 if ((checks == checks))
17681780 then [IntegerEntry(keyChangeAmpLastCall(), height), StringEntry(amp(), toString(newAmp)), StringEntry(keyAmpHistory(height), toString(newAmp))]
17691781 else throw("Strict value is not equal to itself.")
17701782 }
17711783
17721784
17731785 @Verifier(tx)
17741786 func verify () = {
17751787 let targetPublicKey = match managerPublicKeyOrUnit() {
17761788 case pk: ByteVector =>
17771789 pk
17781790 case _: Unit =>
17791791 tx.senderPublicKey
17801792 case _ =>
17811793 throw("Match error")
17821794 }
17831795 match tx {
17841796 case order: Order =>
17851797 let matcherPub = mp()
1786- let $t06018860305 = if (skipOrderValidation())
1798+ let $t06042960546 = if (skipOrderValidation())
17871799 then $Tuple2(true, "")
17881800 else validateMatcherOrderAllowed(order)
1789- let orderValid = $t06018860305._1
1790- let orderValidInfo = $t06018860305._2
1801+ let orderValid = $t06042960546._1
1802+ let orderValidInfo = $t06042960546._2
17911803 let senderValid = sigVerify(order.bodyBytes, order.proofs[0], order.senderPublicKey)
17921804 let matcherValid = sigVerify(order.bodyBytes, order.proofs[1], matcherPub)
17931805 if (if (if (orderValid)
17941806 then senderValid
17951807 else false)
17961808 then matcherValid
17971809 else false)
17981810 then true
17991811 else throwOrderError(orderValid, orderValidInfo, senderValid, matcherValid)
18001812 case s: SetScriptTransaction =>
18011813 if (sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey))
18021814 then true
18031815 else {
18041816 let newHash = blake2b256(value(s.script))
18051817 let allowedHash = fromBase64String(value(getString(fca, keyAllowedLpStableScriptHash())))
18061818 let currentHash = scriptHash(this)
18071819 if ((allowedHash == newHash))
18081820 then (currentHash != newHash)
18091821 else false
18101822 }
18111823 case _ =>
18121824 sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey)
18131825 }
18141826 }
18151827

github/deemru/w8io/169f3d6 
160.76 ms