tx · 4BhVwC9UZj8uuy9aLpqKNEWV8Q8caUsBvRicpePn6Cx5

3MzKSdTH2jFbypLsoNfrH7QgkzSbx3EYwCA:  -0.04200000 Waves

2023.03.22 16:47 [2501298] smart account 3MzKSdTH2jFbypLsoNfrH7QgkzSbx3EYwCA > SELF 0.00000000 Waves

{ "type": 13, "id": "4BhVwC9UZj8uuy9aLpqKNEWV8Q8caUsBvRicpePn6Cx5", "fee": 4200000, "feeAssetId": null, "timestamp": 1679492827963, "version": 2, "chainId": 84, "sender": "3MzKSdTH2jFbypLsoNfrH7QgkzSbx3EYwCA", "senderPublicKey": "35yd3qw1gxKDxKwGAykHN9fANbXNWwseaUwbWDj24o3x", "proofs": [ "3Qoapzb4dnMLY1gh52PaqVqiRXYYKGYFLCjUcUawip7A7aBkK2dL1Udm1JwKJYnVZtorAzrufm1aTZfErt393TcZ" ], "script": "base64:BgK2LAgCEgUKAwEEARIHCgUBBAEIARIDCgEIEgMKAQgSABIECgIBBBIECgIBBBIDCgEBEgASBAoCCAESABIECgIIARIECgIIARIECgIBARIDCgEBEgUKAwEBARIFCgMBCAESBAoCAQgSBAoCAQgSBAoCCAgSBAoCCAgSBAoCCAESABIDCgEIEgUKAwEBARIECgIIARIECgIBARIECgIICBILCgkIAQECAQIIBAQSBgoECAgBCBIAIgZzY2FsZTgiDHNjYWxlOEJpZ0ludCIHc2NhbGUxOCIKemVyb0JpZ0ludCIEYmlnMCIEYmlnMSIEYmlnMiIEYmlnMyIEYmlnNCIKc2xpcHBhZ2U0RCILd2F2ZXNTdHJpbmciBUFtdWx0IgVEY29udiIDU0VQIgVFTVBUWSIKUG9vbEFjdGl2ZSIKUG9vbFB1dERpcyIOUG9vbE1hdGNoZXJEaXMiDFBvb2xTaHV0ZG93biIOaWR4UG9vbEFkZHJlc3MiCWlkeFBvb2xTdCIJaWR4TFBBc0lkIglpZHhBbUFzSWQiCWlkeFByQXNJZCILaWR4QW10QXNEY20iDWlkeFByaWNlQXNEY20iC2lkeElBb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eded", "spentComplexity": 0 } View: original | compacted Prev: Gr3p9Qhi15s1fy39wbe1YWC3wTqL5NjbEEXYi2uJV5Qc Next: 4htzSRK19AtsAK1nKkv94BA88piRP3jerypeaDPp9aBr Diff:
OldNewDifferences
17361736
17371737 @Callable(i)
17381738 func changeAmp () = {
1739- let cfg = split({
1740- let @ = invoke(fca, "getChangeAmpConfigREADONLY", [toString(this)], nil)
1741- if ($isInstanceOf(@, "String"))
1742- then @
1743- else throw(($getType(@) + " couldn't be cast to String"))
1744- }, SEP)
1745- if ((cfg == cfg))
1739+ let cfgRaw = invoke(fca, "getChangeAmpConfigREADONLY", [toString(this)], nil)
1740+ if ((cfgRaw == cfgRaw))
17461741 then {
1747- let delay = parseIntValue(cfg[0])
1748- let delta = parseIntValue(cfg[1])
1749- let target = parseIntValue(cfg[2])
1750- let curAmp = parseIntValue(getStringValue(amp()))
1751- let lastCall = valueOrElse(getInteger(keyChangeAmpLastCall()), 0)
1752- let newAmpRaw = (curAmp + delta)
1753- let newAmp = if ((0 > delta))
1754- then if ((target > newAmpRaw))
1755- then target
1756- else newAmpRaw
1757- else if ((newAmpRaw > target))
1758- then target
1759- else newAmpRaw
1760- let checks = [if ((an > (lastCall + delay)))
1761- then true
1762- else throwErr("try again in few blocks"), if ((curAmp != target))
1763- then true
1764- else throwErr("already reached target")]
1765- if ((checks == checks))
1766- then [IntegerEntry(keyChangeAmpLastCall(), an), StringEntry(amp(), toString(newAmp)), StringEntry(keyAmpHistory(an), toString(newAmp))]
1742+ let cfg = match cfgRaw {
1743+ case s: String =>
1744+ s
1745+ case _ =>
1746+ throw("invalid entry type")
1747+ }
1748+ if ((cfg == cfg))
1749+ then {
1750+ let w = throw("works")
1751+ if ((w == w))
1752+ then {
1753+ let delay = 1
1754+ let delta = 2
1755+ let target = 3
1756+ let curAmp = parseIntValue(getStringValue(amp()))
1757+ let lastCall = valueOrElse(getInteger(keyChangeAmpLastCall()), 0)
1758+ let newAmpRaw = (curAmp + delta)
1759+ let newAmp = if ((0 > delta))
1760+ then if ((target > newAmpRaw))
1761+ then target
1762+ else newAmpRaw
1763+ else if ((newAmpRaw > target))
1764+ then target
1765+ else newAmpRaw
1766+ let checks = [if ((an > (lastCall + delay)))
1767+ then true
1768+ else throwErr("try again in few blocks"), if ((curAmp != target))
1769+ then true
1770+ else throwErr("already reached target")]
1771+ if ((checks == checks))
1772+ then [IntegerEntry(keyChangeAmpLastCall(), an), StringEntry(amp(), toString(newAmp)), StringEntry(keyAmpHistory(an), toString(newAmp))]
1773+ else throw("Strict value is not equal to itself.")
1774+ }
1775+ else throw("Strict value is not equal to itself.")
1776+ }
17671777 else throw("Strict value is not equal to itself.")
17681778 }
17691779 else throw("Strict value is not equal to itself.")
17831793 match tx {
17841794 case order: Order =>
17851795 let matcherPub = mp()
1786- let $t06000160118 = if (skipOrderValidation())
1796+ let $t06004460161 = if (skipOrderValidation())
17871797 then $Tuple2(true, "")
17881798 else validateMatcherOrderAllowed(order)
1789- let orderValid = $t06000160118._1
1790- let orderValidInfo = $t06000160118._2
1799+ let orderValid = $t06004460161._1
1800+ let orderValidInfo = $t06004460161._2
17911801 let senderValid = sigVerify(order.bodyBytes, order.proofs[0], order.senderPublicKey)
17921802 let matcherValid = sigVerify(order.bodyBytes, order.proofs[1], matcherPub)
17931803 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 (height) = ("%s%d__amp__" + toString(height))
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 $t081828411 = poolConfigParsed
244244
245245 let cfgPoolAddress = $t081828411._1
246246
247247 let cfgPoolStatus = $t081828411._2
248248
249249 let cfgLpAssetId = $t081828411._3
250250
251251 let cfgAmountAssetId = $t081828411._4
252252
253253 let cfgPriceAssetId = $t081828411._5
254254
255255 let cfgAmountAssetDecimals = $t081828411._6
256256
257257 let cfgPriceAssetDecimals = $t081828411._7
258258
259259 let cfgInAmountAssedId = $t081828411._8
260260
261261 let cfgInPriceAssetId = $t081828411._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 $t01291612964 = {
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 = $t01291612964._1
397397 let found = $t01291612964._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, an, lastBlock.timestamp)), IntegerEntry(pl(), curPrice), IntegerEntry(ph(an, 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 $t02080321148 = 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 = $t02080321148._1
543543 let writePrAmt = $t02080321148._2
544544 let commonState = [IntegerEntry(pl(), curPrice), IntegerEntry(ph(an, lastBlock.timestamp), curPrice), StringEntry(pau(userAddress, txId58), dataPutActionInfo(writeAmAmt, writePrAmt, emitLpAmt, curPrice, slippage, slippageCalc, an, 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 $t02234322363 = acc
563563 let y = $t02234322363._1
564564 let found = $t02234322363._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 $t02267022717 = {
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 = $t02267022717._1
592592 let found = $t02267022717._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, an), 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 $t02491525127 = if ((order.orderType == Buy))
637637 then $Tuple2(amountAssetAmount, -(priceAssetAmount))
638638 else $Tuple2(-(amountAssetAmount), priceAssetAmount)
639639 let amountAssetBalanceDelta = $t02491525127._1
640640 let priceAssetBalanceDelta = $t02491525127._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 $t02546925569 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
654654 let unusedActions = $t02546925569._1
655655 let dLpNew = $t02546925569._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(an)], "")
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 $t02822528687 = 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 = $t02822528687._1
721721 let prBalanceOld = $t02822528687._2
722722 let $t02869328869 = 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 = $t02869328869._1
728728 let prAmountRaw = $t02869328869._2
729729 let $t02887329127 = 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 = $t02887329127._1
733733 let prAmount = $t02887329127._2
734734 let feeAmount = $t02887329127._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(an, lastBlock.timestamp), curPrice), StringEntry(pau(userAddress, txId), dataPutActionInfo(amAmountRaw, prAmountRaw, toInt(lpAmount), curPrice, 0, 0, an, 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 $t03123931350 = {
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 (($t03123931350 == $t03123931350))
789789 then {
790790 let feeAmount = $t03123931350._2
791791 let totalGet = $t03123931350._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 $t03154031847 = 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 = $t03154031847._1
803803 let outPr = $t03154031847._2
804804 let amBalanceNew = $t03154031847._3
805805 let prBalanceNew = $t03154031847._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, an, lastBlock.timestamp)), IntegerEntry(pl(), curPr), IntegerEntry(ph(an, 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 $t03263232982 = {
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 = $t03263232982._1
832832 let priceAssetBalanceDelta = $t03263232982._2
833833 let $t03298533093 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
834834 let refreshDLpActions = $t03298533093._1
835835 let updatedDLp = $t03298533093._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 $t03454034560 = acc
915915 let y = $t03454034560._1
916916 let found = $t03454034560._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 $t03489134938 = {
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 = $t03489134938._1
944944 let found = $t03489134938._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 $t03529035714 = 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 = $t03529035714._1
968968 let poolAmountInBalance = $t03529035714._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 $t03715037544 = 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 = $t03715037544._1
10201020 let poolAmountInBalance = $t03715037544._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 $t04216342305 = refreshDLpInternal(0, 0, 0)
11611161 let refreshDLpActions = $t04216342305._1
11621162 let updatedDLp = $t04216342305._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 $t04394644104 = calcPutOneTkn(pmtAmt, pmtAssetId, toString(userAddress), toBase58String(i.transactionId), true)
12361236 if (($t04394644104 == $t04394644104))
12371237 then {
12381238 let feeAmount = $t04394644104._3
12391239 let state = $t04394644104._2
12401240 let estimLP = $t04394644104._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 $t04498945338 = 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 = $t04498945338._1
12791279 let priceAssetBalanceDelta = $t04498945338._2
12801280 let $t04534145449 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
12811281 let refreshDLpActions = $t04534145449._1
12821282 let updatedDLp = $t04534145449._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 $t04647946544 = refreshDLpInternal(0, 0, 0)
13151315 let refreshDLpActions = $t04647946544._1
13161316 let updatedDLp = $t04647946544._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 $t04771747799 = refreshDLpInternal(-(outAmtAmt), -(outPrAmt), 0)
13421342 let refreshDLpActions = $t04771747799._1
13431343 let updatedDLp = $t04771747799._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 $t04841748572 = getOneTknV2Internal(outAssetId, minOutAmount, i.payments, i.caller, i.originCaller, i.transactionId)
13791379 let state = $t04841748572._1
13801380 let totalAmount = $t04841748572._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 (((an - 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 $t04909649160 = refreshDLpInternal(0, 0, 0)
13981398 let dLpUpdateActions = $t04909649160._1
13991399 let updatedDLp = $t04909649160._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 $t05017050225 = takeFee(totalGetRaw, outFee)
14281428 let totalGet = $t05017050225._1
14291429 let feeAmount = $t05017050225._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 $t05060050715 = {
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 = $t05060050715._1
14491449 let feeAmount = $t05060050715._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 $t05188151962 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
14841484 let refreshDLpActions = $t05188151962._1
14851485 let updatedDLp = $t05188151962._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 $t05298953070 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
15311531 let refreshDLpActions = $t05298953070._1
15321532 let updatedDLp = $t05298953070._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 $t05432154402 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
15841584 let refreshDLpActions = $t05432154402._1
15851585 let updatedDLp = $t05432154402._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 $t05542455612 = getOneTknV2Internal(outAssetId, minOutAmount, [AttachedPayment(lpAssetId, unstakeAmount)], i.caller, i.originCaller, i.transactionId)
16351635 let state = $t05542455612._1
16361636 let totalAmount = $t05542455612._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 $t05574055843 = calcPutOneTkn(paymentAmountRaw, paymentAssetId, "", "", true)
16491649 let lpAmount = $t05574055843._1
16501650 let state = $t05574055843._2
16511651 let feeAmount = $t05574055843._3
16521652 let bonus = $t05574055843._4
16531653 $Tuple2(nil, $Tuple3(lpAmount, feeAmount, bonus))
16541654 }
16551655
16561656
16571657
16581658 @Callable(i)
16591659 func putOneTknV2WithoutTakeFeeREADONLY (paymentAmountRaw,paymentAssetId) = {
16601660 let $t05599156095 = calcPutOneTkn(paymentAmountRaw, paymentAssetId, "", "", false)
16611661 let lpAmount = $t05599156095._1
16621662 let state = $t05599156095._2
16631663 let feeAmount = $t05599156095._3
16641664 let bonus = $t05599156095._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 () = {
1739- let cfg = split({
1740- let @ = invoke(fca, "getChangeAmpConfigREADONLY", [toString(this)], nil)
1741- if ($isInstanceOf(@, "String"))
1742- then @
1743- else throw(($getType(@) + " couldn't be cast to String"))
1744- }, SEP)
1745- if ((cfg == cfg))
1739+ let cfgRaw = invoke(fca, "getChangeAmpConfigREADONLY", [toString(this)], nil)
1740+ if ((cfgRaw == cfgRaw))
17461741 then {
1747- let delay = parseIntValue(cfg[0])
1748- let delta = parseIntValue(cfg[1])
1749- let target = parseIntValue(cfg[2])
1750- let curAmp = parseIntValue(getStringValue(amp()))
1751- let lastCall = valueOrElse(getInteger(keyChangeAmpLastCall()), 0)
1752- let newAmpRaw = (curAmp + delta)
1753- let newAmp = if ((0 > delta))
1754- then if ((target > newAmpRaw))
1755- then target
1756- else newAmpRaw
1757- else if ((newAmpRaw > target))
1758- then target
1759- else newAmpRaw
1760- let checks = [if ((an > (lastCall + delay)))
1761- then true
1762- else throwErr("try again in few blocks"), if ((curAmp != target))
1763- then true
1764- else throwErr("already reached target")]
1765- if ((checks == checks))
1766- then [IntegerEntry(keyChangeAmpLastCall(), an), StringEntry(amp(), toString(newAmp)), StringEntry(keyAmpHistory(an), toString(newAmp))]
1742+ let cfg = match cfgRaw {
1743+ case s: String =>
1744+ s
1745+ case _ =>
1746+ throw("invalid entry type")
1747+ }
1748+ if ((cfg == cfg))
1749+ then {
1750+ let w = throw("works")
1751+ if ((w == w))
1752+ then {
1753+ let delay = 1
1754+ let delta = 2
1755+ let target = 3
1756+ let curAmp = parseIntValue(getStringValue(amp()))
1757+ let lastCall = valueOrElse(getInteger(keyChangeAmpLastCall()), 0)
1758+ let newAmpRaw = (curAmp + delta)
1759+ let newAmp = if ((0 > delta))
1760+ then if ((target > newAmpRaw))
1761+ then target
1762+ else newAmpRaw
1763+ else if ((newAmpRaw > target))
1764+ then target
1765+ else newAmpRaw
1766+ let checks = [if ((an > (lastCall + delay)))
1767+ then true
1768+ else throwErr("try again in few blocks"), if ((curAmp != target))
1769+ then true
1770+ else throwErr("already reached target")]
1771+ if ((checks == checks))
1772+ then [IntegerEntry(keyChangeAmpLastCall(), an), StringEntry(amp(), toString(newAmp)), StringEntry(keyAmpHistory(an), toString(newAmp))]
1773+ else throw("Strict value is not equal to itself.")
1774+ }
1775+ else throw("Strict value is not equal to itself.")
1776+ }
17671777 else throw("Strict value is not equal to itself.")
17681778 }
17691779 else throw("Strict value is not equal to itself.")
17701780 }
17711781
17721782
17731783 @Verifier(tx)
17741784 func verify () = {
17751785 let targetPublicKey = match m() {
17761786 case pk: ByteVector =>
17771787 pk
17781788 case _: Unit =>
17791789 tx.senderPublicKey
17801790 case _ =>
17811791 throw("Match error")
17821792 }
17831793 match tx {
17841794 case order: Order =>
17851795 let matcherPub = mp()
1786- let $t06000160118 = if (skipOrderValidation())
1796+ let $t06004460161 = if (skipOrderValidation())
17871797 then $Tuple2(true, "")
17881798 else validateMatcherOrderAllowed(order)
1789- let orderValid = $t06000160118._1
1790- let orderValidInfo = $t06000160118._2
1799+ let orderValid = $t06004460161._1
1800+ let orderValidInfo = $t06004460161._2
17911801 let senderValid = sigVerify(order.bodyBytes, order.proofs[0], order.senderPublicKey)
17921802 let matcherValid = sigVerify(order.bodyBytes, order.proofs[1], matcherPub)
17931803 if (if (if (orderValid)
17941804 then senderValid
17951805 else false)
17961806 then matcherValid
17971807 else false)
17981808 then true
17991809 else throwOrderError(orderValid, orderValidInfo, senderValid, matcherValid)
18001810 case s: SetScriptTransaction =>
18011811 if (sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey))
18021812 then true
18031813 else {
18041814 let newHash = blake2b256(value(s.script))
18051815 let allowedHash = fromBase64String(value(getString(fca, keyAllowedLpStableScriptHash())))
18061816 let currentHash = scriptHash(this)
18071817 if ((allowedHash == newHash))
18081818 then (currentHash != newHash)
18091819 else false
18101820 }
18111821 case _ =>
18121822 sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey)
18131823 }
18141824 }
18151825

github/deemru/w8io/026f985 
158.46 ms