tx · 3azmmVnXKB5938sxa1QspqXg8GAmc4bTbrUKxQ9icSVL

3NAefciWv6f9fWvEXdGgpHfanJFG8HqfjuT:  -0.04200000 Waves

2023.03.22 19:37 [2501467] smart account 3NAefciWv6f9fWvEXdGgpHfanJFG8HqfjuT > SELF 0.00000000 Waves

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

github/deemru/w8io/169f3d6 
161.02 ms