tx · BUaUbouNtcJFNd9t2A4gyxL76b3rZHzADjL53CZ35mLK

3NAefciWv6f9fWvEXdGgpHfanJFG8HqfjuT:  -0.04000000 Waves

2023.02.28 14:13 [2469478] smart account 3NAefciWv6f9fWvEXdGgpHfanJFG8HqfjuT > SELF 0.00000000 Waves

{ "type": 13, "id": "BUaUbouNtcJFNd9t2A4gyxL76b3rZHzADjL53CZ35mLK", "fee": 4000000, "feeAssetId": null, "timestamp": 1677582898006, "version": 2, "chainId": 84, "sender": "3NAefciWv6f9fWvEXdGgpHfanJFG8HqfjuT", "senderPublicKey": "D1BL65meykxFZTCuq7jq9HSGLLnWvQamQPUNrguW5w39", "proofs": [ "3GB6toUKstfLW7GsjWaqWgLkxNQYLQjq3vcGFXHLwyJymNS3SfPFyvt6cDab9LdaY33nWKqHPsTVQfwr1QJFwvJD" ], "script": "base64:BgLpKggCEgUKAwEEARIHCgUBBAEIARIDCgEIEgMKAQgSABIECgIBBBIECgIBBBIDCgEBEgASBAoCCAESABIECgIIARIECgIIARIECgIBARIDCgEBEgUKAwEBARIFCgMBCAESBAoCAQgSBAoCAQgSBAoCCAgSBAoCCAgSBAoCCAESABIDCgEIEgUKAwEBARIECgIIARIECgIBARIECgIICBILCgkIAQECAQIIBAQSBgoECAgBCCIGc2NhbGU4IgxzY2FsZThCaWdJbnQiB3NjYWxlMTgiCnplcm9CaWdJbnQiBGJpZzAiBGJpZzEiBGJpZzIiBGJpZzMiBGJpZzQiCnNsaXBwYWdlNEQiC3dhdmVzU3RyaW5nIgVBbXVsdCIFRGNvbnYiA1NFUCIFRU1QVFkiClBvb2xBY3RpdmUiClBvb2xQdXREaXMiDlBvb2xNYXRjaGVyRGlzIgxQb29sU2h1dGRvd24iDmlkeFBvb2xBZGRyZXNzIglpZHhQb29sU3QiCWlkeExQQXNJZCIJaWR4QW1Bc0lkIglpZHhQckFzSWQiC2lkeEFtdEFzRGNtIg1pZHhQcmljZUFzRGNtIgtpZHhJQW10QXNJZCINaWR4SVBya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dsBAJpawkBAmFXAAQCaWwJAQJlWQEFAmVaBAJhRggFAmlsAl8xBAJhRwgFAmlsAl8yBAJhSAkA9AMDCAUCZVoJYm9keUJ5dGVzCQCRAwIIBQJlWgZwcm9vZnMAAAgFAmVaD3NlbmRlclB1YmxpY0tleQQCYUkJAPQDAwgFAmVaCWJvZHlCeXRlcwkAkQMCCAUCZVoGcHJvb2ZzAAEFAmlrAwMDBQJhRgUCYUgHBQJhSQcGCQECYUUEBQJhRgUCYUcFAmFIBQJhSQMJAAECBQJnbAIUU2V0U2NyaXB0VHJhbnNhY3Rpb24EAmNDBQJnbAMJAPQDAwgFAmloCWJvZHlCeXRlcwkAkQMCCAUCaWgGcHJvb2ZzAAAFAmlqBgQCaW0JAPYDAQkBBXZhbHVlAQgFAmNDBnNjcmlwdAQCaW4JANsEAQkBBXZhbHVlAQkAnQgCBQJhUQkBAmFDAAQCaW8JAPEHAQUEdGhpcwMJAAACBQJpbgUCaW0JAQIhPQIFAmlvBQJpbQcJAPQDAwgFAmloCWJvZHlCeXRlcwkAkQMCCAUCaWgGcHJvb2ZzAAAFAmlq7ZEuMw==", "height": 2469478, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: Gm59MEY78Hw4gwPA5rhY7dMdDAVeZw3BX9kVG1962tmP Next: 3W4FmiJsb7PGsPADT9spxKL8KJZYpCci19RRW7PsTiJ5 Diff:
OldNewDifferences
16141614 let factoryCfg = gfc()
16151615 let lpAssetId = cfgLpAssetId
16161616 let staking = valueOrErrorMessage(addressFromString(factoryCfg[idxFactStakCntr]), "Wr st addr")
1617- let userAddress = i.caller
1618- let lpAssetRecipientAddress = this
1619- let unstakeInv = invoke(staking, "unstakeINTERNAL", [lpAssetId, unstakeAmount, userAddress.bytes, lpAssetRecipientAddress.bytes], nil)
1617+ let unstakeInv = invoke(staking, "unstake", [toBase58String(lpAssetId), unstakeAmount], nil)
16201618 if ((unstakeInv == unstakeInv))
16211619 then {
1622- let $t05503055218 = getOneTknV2Internal(outAssetId, minOutAmount, [AttachedPayment(lpAssetId, unstakeAmount)], i.caller, i.originCaller, i.transactionId)
1623- let state = $t05503055218._1
1624- let totalAmount = $t05503055218._2
1620+ let $t05490355091 = getOneTknV2Internal(outAssetId, minOutAmount, [AttachedPayment(lpAssetId, unstakeAmount)], i.caller, i.originCaller, i.transactionId)
1621+ let state = $t05490355091._1
1622+ let totalAmount = $t05490355091._2
16251623 $Tuple2(state, totalAmount)
16261624 }
16271625 else throw("Strict value is not equal to itself.")
16331631
16341632 @Callable(i)
16351633 func putOneTknV2WithBonusREADONLY (paymentAmountRaw,paymentAssetId) = {
1636- let $t05534655449 = calcPutOneTkn(paymentAmountRaw, paymentAssetId, "", "", true)
1637- let lpAmount = $t05534655449._1
1638- let state = $t05534655449._2
1639- let feeAmount = $t05534655449._3
1640- let bonus = $t05534655449._4
1634+ let $t05521955322 = calcPutOneTkn(paymentAmountRaw, paymentAssetId, "", "", true)
1635+ let lpAmount = $t05521955322._1
1636+ let state = $t05521955322._2
1637+ let feeAmount = $t05521955322._3
1638+ let bonus = $t05521955322._4
16411639 $Tuple2(nil, $Tuple3(lpAmount, feeAmount, bonus))
16421640 }
16431641
16451643
16461644 @Callable(i)
16471645 func putOneTknV2WithoutTakeFeeREADONLY (paymentAmountRaw,paymentAssetId) = {
1648- let $t05559755701 = calcPutOneTkn(paymentAmountRaw, paymentAssetId, "", "", false)
1649- let lpAmount = $t05559755701._1
1650- let state = $t05559755701._2
1651- let feeAmount = $t05559755701._3
1652- let bonus = $t05559755701._4
1646+ let $t05547055574 = calcPutOneTkn(paymentAmountRaw, paymentAssetId, "", "", false)
1647+ let lpAmount = $t05547055574._1
1648+ let state = $t05547055574._2
1649+ let feeAmount = $t05547055574._3
1650+ let bonus = $t05547055574._4
16531651 $Tuple2(nil, $Tuple3(lpAmount, feeAmount, bonus))
16541652 }
16551653
17341732 match tx {
17351733 case order: Order =>
17361734 let matcherPub = mp()
1737- let $t05849358562 = validateMatcherOrderAllowed(order)
1738- let orderValid = $t05849358562._1
1739- let orderValidInfo = $t05849358562._2
1735+ let $t05836658435 = validateMatcherOrderAllowed(order)
1736+ let orderValid = $t05836658435._1
1737+ let orderValidInfo = $t05836658435._2
17401738 let senderValid = sigVerify(order.bodyBytes, order.proofs[0], order.senderPublicKey)
17411739 let matcherValid = sigVerify(order.bodyBytes, order.proofs[1], matcherPub)
17421740 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 ada () = "%s__addonAddr"
132132
133133
134134 let keyFee = "%s__fee"
135135
136136 let fee = valueOrElse(getInteger(this, keyFee), feeDefault)
137137
138138 let keyDLp = makeString(["%s", "dLp"], SEP)
139139
140140 let keyDLpRefreshedHeight = makeString(["%s", "dLpRefreshedHeight"], SEP)
141141
142142 let keyDLpRefreshDelay = makeString(["%s", "refreshDLpDelay"], SEP)
143143
144144 let dLpRefreshDelayDefault = 30
145145
146146 let dLpRefreshDelay = valueOrElse(getInteger(this, keyDLpRefreshDelay), dLpRefreshDelayDefault)
147147
148148 func fcfg () = "%s__factoryConfig"
149149
150150
151151 func mtpk () = "%s%s__matcher__publicKey"
152152
153153
154154 func pc (iAmtAs,iPrAs) = (((("%d%d%s__" + iAmtAs) + "__") + iPrAs) + "__config")
155155
156156
157157 func mba (bAStr) = ("%s%s%s__mappings__baseAsset2internalId__" + bAStr)
158158
159159
160160 func aps () = "%s__shutdown"
161161
162162
163163 func keyAllowedLpStableScriptHash () = "%s__allowedLpStableScriptHash"
164164
165165
166166 func keyFeeCollectorAddress () = "%s__feeCollectorAddress"
167167
168168
169169 func throwOrderError (orderValid,orderValidInfo,senderValid,matcherValid) = throw((((((((("order validation failed: orderValid=" + toString(orderValid)) + " (") + orderValidInfo) + ")") + " senderValid=") + toString(senderValid)) + " matcherValid=") + toString(matcherValid)))
170170
171171
172172 func strf (addr,key) = valueOrErrorMessage(getString(addr, key), makeString(["mandatory ", toString(addr), ".", key, " not defined"], ""))
173173
174174
175175 func intf (addr,key) = valueOrErrorMessage(getInteger(addr, key), makeString(["mandatory ", toString(addr), ".", key, " not defined"], ""))
176176
177177
178178 func throwErr (msg) = throw(makeString(["lp_stable.ride:", msg], " "))
179179
180180
181181 func fmtErr (msg) = makeString(["lp_stable.ride:", msg], " ")
182182
183183
184184 let fca = addressFromStringValue(strf(this, fc()))
185185
186186 let inFee = {
187187 let @ = invoke(fca, "getInFeeREADONLY", [toString(this)], nil)
188188 if ($isInstanceOf(@, "Int"))
189189 then @
190190 else throw(($getType(@) + " couldn't be cast to Int"))
191191 }
192192
193193 let outFee = {
194194 let @ = invoke(fca, "getOutFeeREADONLY", [toString(this)], nil)
195195 if ($isInstanceOf(@, "Int"))
196196 then @
197197 else throw(($getType(@) + " couldn't be cast to Int"))
198198 }
199199
200200 let A = strf(this, amp())
201201
202202 func igs () = valueOrElse(getBoolean(fca, aps()), false)
203203
204204
205205 func mp () = fromBase58String(strf(fca, mtpk()))
206206
207207
208208 let feeCollectorAddress = addressFromStringValue(strf(fca, keyFeeCollectorAddress()))
209209
210210 func gpc () = {
211211 let amtAs = strf(this, aa())
212212 let priceAs = strf(this, pa())
213213 let iPriceAs = intf(fca, mba(priceAs))
214214 let iAmtAs = intf(fca, mba(amtAs))
215215 split(strf(fca, pc(toString(iAmtAs), toString(iPriceAs))), SEP)
216216 }
217217
218218
219219 func parseAssetId (input) = if ((input == wavesString))
220220 then unit
221221 else fromBase58String(input)
222222
223223
224224 func assetIdToString (input) = if ((input == unit))
225225 then wavesString
226226 else toBase58String(value(input))
227227
228228
229229 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]))
230230
231231
232232 let poolConfigParsed = parsePoolConfig(gpc())
233233
234234 let $t079658194 = poolConfigParsed
235235
236236 let cfgPoolAddress = $t079658194._1
237237
238238 let cfgPoolStatus = $t079658194._2
239239
240240 let cfgLpAssetId = $t079658194._3
241241
242242 let cfgAmountAssetId = $t079658194._4
243243
244244 let cfgPriceAssetId = $t079658194._5
245245
246246 let cfgAmountAssetDecimals = $t079658194._6
247247
248248 let cfgPriceAssetDecimals = $t079658194._7
249249
250250 let cfgInAmountAssedId = $t079658194._8
251251
252252 let cfgInPriceAssetId = $t079658194._9
253253
254254 func gfc () = split(strf(fca, fcfg()), SEP)
255255
256256
257257 let factoryConfig = gfc()
258258
259259 let stakingContract = valueOrErrorMessage(addressFromString(factoryConfig[idxFactStakCntr]), "Invalid staking contract address")
260260
261261 let slipageContract = valueOrErrorMessage(addressFromString(factoryConfig[idxFactSlippCntr]), "Invalid slipage contract address")
262262
263263 let gwxContract = valueOrErrorMessage(addressFromString(factoryConfig[idxFactGwxRewCntr]), "Invalid gwx contract address")
264264
265265 let restContract = valueOrErrorMessage(addressFromString(factoryConfig[idxFactoryRestCntr]), "Invalid gwx contract address")
266266
267267 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)
268268
269269
270270 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)
271271
272272
273273 func getAccBalance (assetId) = if ((assetId == "WAVES"))
274274 then wavesBalance(this).available
275275 else assetBalance(this, fromBase58String(assetId))
276276
277277
278278 func cpbi (prAmtX18,amAmtX18) = fraction(prAmtX18, scale18, amAmtX18)
279279
280280
281281 func cpbir (prAmtX18,amAmtX18,round) = fraction(prAmtX18, scale18, amAmtX18, round)
282282
283283
284284 func vad (A1,A2,slippage) = {
285285 let diff = fraction((A1 - A2), scale8BigInt, A2)
286286 let pass = ((slippage - abs(diff)) > zeroBigInt)
287287 if (!(pass))
288288 then throw(("Big slpg: " + toString(diff)))
289289 else $Tuple2(pass, min([A1, A2]))
290290 }
291291
292292
293293 func vd (D1,D0,slpg) = {
294294 let diff = fraction(D0, scale8BigInt, D1)
295295 let fail = (slpg > diff)
296296 if (if (fail)
297297 then true
298298 else (D0 > D1))
299299 then throw(((((((toString(D0) + " ") + toString(D1)) + " ") + toString(diff)) + " ") + toString(slpg)))
300300 else fail
301301 }
302302
303303
304304 func pcp (amAssetDcm,prAssetDcm,amAmt,prAmt) = {
305305 let amtAsAmtX18 = t1(amAmt, amAssetDcm)
306306 let prAsAmtX18 = t1(prAmt, prAssetDcm)
307307 cpbi(prAsAmtX18, amtAsAmtX18)
308308 }
309309
310310
311311 func calcPrices (amAmt,prAmt,lpAmt) = {
312312 let amtAsDcm = cfgAmountAssetDecimals
313313 let prAsDcm = cfgPriceAssetDecimals
314314 let priceX18 = pcp(amtAsDcm, prAsDcm, amAmt, prAmt)
315315 let amAmtX18 = t1(amAmt, amtAsDcm)
316316 let prAmtX18 = t1(prAmt, prAsDcm)
317317 let lpAmtX18 = t1(lpAmt, scale8)
318318 let lpPrInAmAsX18 = cpbi(amAmtX18, lpAmtX18)
319319 let lpPrInPrAsX18 = cpbi(prAmtX18, lpAmtX18)
320320 [priceX18, lpPrInAmAsX18, lpPrInPrAsX18]
321321 }
322322
323323
324324 func calculatePrices (amAmt,prAmt,lpAmt) = {
325325 let p = calcPrices(amAmt, prAmt, lpAmt)
326326 [f1(p[0], scale8), f1(p[1], scale8), f1(p[2], scale8)]
327327 }
328328
329329
330330 func takeFee (amount,fee) = {
331331 let feeAmount = if ((fee == 0))
332332 then 0
333333 else fraction(amount, fee, scale8)
334334 $Tuple2((amount - feeAmount), feeAmount)
335335 }
336336
337337
338338 func getD (xp) = {
339339 let xp0 = xp[0]
340340 let xp1 = xp[1]
341341 let s = (xp0 + xp1)
342342 if ((s == big0))
343343 then big0
344344 else {
345345 let a = parseIntValue(A)
346346 let ann = (a * 2)
347347 let p = fraction(xp0, xp1, big1)
348348 let xp0_xp1_n_n = fraction(p, big4, big1)
349349 let ann_s = fraction(toBigInt(ann), s, big1)
350350 let ann_1 = toBigInt((ann - 1))
351351 func calcDNext (d) = {
352352 let dd = fraction(d, d, big1)
353353 let ddd = fraction(dd, d, big1)
354354 let dp = fraction(ddd, big1, xp0_xp1_n_n)
355355 fraction((ann_s + fraction(dp, big2, big1)), d, (fraction(ann_1, d, big1) + fraction(big3, dp, big1)))
356356 }
357357
358358 func calc (acc,i) = if (acc._2)
359359 then acc
360360 else {
361361 let d = acc._1
362362 let dNext = calcDNext(d)
363363 let dDiffRaw = (dNext - value(d))
364364 let dDiff = if ((big0 > dDiffRaw))
365365 then -(dDiffRaw)
366366 else dDiffRaw
367367 if ((big1 >= dDiff))
368368 then $Tuple2(dNext, true)
369369 else $Tuple2(dNext, false)
370370 }
371371
372372 let arr = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17]
373373 let $t01270312751 = {
374374 let $l = arr
375375 let $s = size($l)
376376 let $acc0 = $Tuple2(s, false)
377377 func $f0_1 ($a,$i) = if (($i >= $s))
378378 then $a
379379 else calc($a, $l[$i])
380380
381381 func $f0_2 ($a,$i) = if (($i >= $s))
382382 then $a
383383 else throw("List size exceeds 18")
384384
385385 $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($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18)
386386 }
387387 let d = $t01270312751._1
388388 let found = $t01270312751._2
389389 if (found)
390390 then d
391391 else throw(("D calculation error, D = " + toString(d)))
392392 }
393393 }
394394
395395
396396 func ego (txId58,pmtAssetId,pmtLpAmt,userAddress) = {
397397 let lpId = cfgLpAssetId
398398 let amId = toBase58String(value(cfgAmountAssetId))
399399 let prId = toBase58String(value(cfgPriceAssetId))
400400 let amDcm = cfgAmountAssetDecimals
401401 let prDcm = cfgPriceAssetDecimals
402402 let sts = toString(cfgPoolStatus)
403403 let lpEmiss = valueOrErrorMessage(assetInfo(lpId), "Wrong LP id").quantity
404404 if ((toBase58String(lpId) != pmtAssetId))
405405 then throw("Wrong pmt asset")
406406 else {
407407 let amBalance = getAccBalance(amId)
408408 let amBalanceX18 = t1(amBalance, amDcm)
409409 let prBalance = getAccBalance(prId)
410410 let prBalanceX18 = t1(prBalance, prDcm)
411411 let curPriceX18 = cpbi(prBalanceX18, amBalanceX18)
412412 let curPrice = f1(curPriceX18, scale8)
413413 let pmtLpAmtX18 = t1(pmtLpAmt, scale8)
414414 let lpEmissX18 = t1(lpEmiss, scale8)
415415 let outAmAmtX18 = fraction(amBalanceX18, pmtLpAmtX18, lpEmissX18)
416416 let outPrAmtX18 = fraction(prBalanceX18, pmtLpAmtX18, lpEmissX18)
417417 let outAmAmt = fromX18Round(outAmAmtX18, amDcm, FLOOR)
418418 let outPrAmt = fromX18Round(outPrAmtX18, prDcm, FLOOR)
419419 let state = if ((txId58 == ""))
420420 then nil
421421 else [ScriptTransfer(userAddress, outAmAmt, if ((amId == "WAVES"))
422422 then unit
423423 else fromBase58String(amId)), ScriptTransfer(userAddress, outPrAmt, if ((prId == "WAVES"))
424424 then unit
425425 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)]
426426 $Tuple10(outAmAmt, outPrAmt, amId, prId, amBalance, prBalance, lpEmiss, curPriceX18, sts, state)
427427 }
428428 }
429429
430430
431431 func epo (txId58,slippage,inAmAmt,inAmId,inPrAmt,inPrId,userAddress,isEval,emitLp,isOneAsset,validateSlippage,pmtAmt,pmtId) = {
432432 let lpId = cfgLpAssetId
433433 let amIdStr = toBase58String(value(cfgAmountAssetId))
434434 let prIdStr = toBase58String(value(cfgPriceAssetId))
435435 let inAmIdStr = cfgInAmountAssedId
436436 let inPrIdStr = cfgInPriceAssetId
437437 let amtDcm = cfgAmountAssetDecimals
438438 let priceDcm = cfgPriceAssetDecimals
439439 let sts = toString(cfgPoolStatus)
440440 let lpEm = valueOrErrorMessage(assetInfo(lpId), "Wr lp as").quantity
441441 let amBalance = if (isEval)
442442 then getAccBalance(amIdStr)
443443 else if (if (isOneAsset)
444444 then (pmtId == amIdStr)
445445 else false)
446446 then (getAccBalance(amIdStr) - pmtAmt)
447447 else if (isOneAsset)
448448 then getAccBalance(amIdStr)
449449 else (getAccBalance(amIdStr) - inAmAmt)
450450 let prBalance = if (isEval)
451451 then getAccBalance(prIdStr)
452452 else if (if (isOneAsset)
453453 then (pmtId == prIdStr)
454454 else false)
455455 then (getAccBalance(prIdStr) - pmtAmt)
456456 else if (isOneAsset)
457457 then getAccBalance(prIdStr)
458458 else (getAccBalance(prIdStr) - inPrAmt)
459459 let inAmAssetAmtX18 = t1(inAmAmt, amtDcm)
460460 let inPrAssetAmtX18 = t1(inPrAmt, priceDcm)
461461 let userPriceX18 = cpbi(inPrAssetAmtX18, inAmAssetAmtX18)
462462 let amBalanceX18 = t1(amBalance, amtDcm)
463463 let prBalanceX18 = t1(prBalance, priceDcm)
464464 let D0 = getD([amBalanceX18, prBalanceX18])
465465 let r = if ((lpEm == 0))
466466 then {
467467 let D1 = getD([(amBalanceX18 + inAmAssetAmtX18), (prBalanceX18 + inPrAssetAmtX18)])
468468 let checkD = if ((D1 > D0))
469469 then true
470470 else throw("D1 should be greater than D0")
471471 if ((checkD == checkD))
472472 then {
473473 let curPriceX18 = zeroBigInt
474474 let slippageX18 = zeroBigInt
475475 let lpAmtX18 = D1
476476 $Tuple5(f1(lpAmtX18, scale8), f1(inAmAssetAmtX18, amtDcm), f1(inPrAssetAmtX18, priceDcm), cpbi((prBalanceX18 + inPrAssetAmtX18), (amBalanceX18 + inAmAssetAmtX18)), slippageX18)
477477 }
478478 else throw("Strict value is not equal to itself.")
479479 }
480480 else {
481481 let curPriceX18 = cpbi(prBalanceX18, amBalanceX18)
482482 let slippageRealX18 = fraction(abs((curPriceX18 - userPriceX18)), scale18, curPriceX18)
483483 let slippageX18 = t1(slippage, scale8)
484484 if (if (if (validateSlippage)
485485 then (curPriceX18 != zeroBigInt)
486486 else false)
487487 then (slippageRealX18 > slippageX18)
488488 else false)
489489 then throw(((("Price slippage " + toString(slippageRealX18)) + " > ") + toString(slippageX18)))
490490 else {
491491 let lpEmissionX18 = t1(lpEm, scale8)
492492 let prViaAmX18 = fraction(inAmAssetAmtX18, cpbir(prBalanceX18, amBalanceX18, CEILING), scale18, CEILING)
493493 let amViaPrX18 = fraction(inPrAssetAmtX18, scale18, cpbir(prBalanceX18, amBalanceX18, FLOOR), CEILING)
494494 let expectedAmts = if ((prViaAmX18 > inPrAssetAmtX18))
495495 then $Tuple2(amViaPrX18, inPrAssetAmtX18)
496496 else $Tuple2(inAmAssetAmtX18, prViaAmX18)
497497 let expAmtAssetAmtX18 = expectedAmts._1
498498 let expPriceAssetAmtX18 = expectedAmts._2
499499 let D1 = getD([(amBalanceX18 + expAmtAssetAmtX18), (prBalanceX18 + expPriceAssetAmtX18)])
500500 let checkD = if ((D1 > D0))
501501 then true
502502 else throw("D1 should be greater than D0")
503503 if ((checkD == checkD))
504504 then {
505505 let lpAmtX18 = fraction(lpEmissionX18, (D1 - D0), D0)
506506 $Tuple5(fromX18Round(lpAmtX18, scale8, FLOOR), fromX18Round(expAmtAssetAmtX18, amtDcm, CEILING), fromX18Round(expPriceAssetAmtX18, priceDcm, CEILING), curPriceX18, slippageX18)
507507 }
508508 else throw("Strict value is not equal to itself.")
509509 }
510510 }
511511 let calcLpAmt = r._1
512512 let calcAmAssetPmt = r._2
513513 let calcPrAssetPmt = r._3
514514 let curPrice = f1(r._4, scale8)
515515 let slippageCalc = f1(r._5, scale8)
516516 if ((0 >= calcLpAmt))
517517 then throw("LP <= 0")
518518 else {
519519 let emitLpAmt = if (!(emitLp))
520520 then 0
521521 else calcLpAmt
522522 let amDiff = (inAmAmt - calcAmAssetPmt)
523523 let prDiff = (inPrAmt - calcPrAssetPmt)
524524 let $t02059020935 = if (if (isOneAsset)
525525 then (pmtId == amIdStr)
526526 else false)
527527 then $Tuple2(pmtAmt, 0)
528528 else if (if (isOneAsset)
529529 then (pmtId == prIdStr)
530530 else false)
531531 then $Tuple2(0, pmtAmt)
532532 else $Tuple2(calcAmAssetPmt, calcPrAssetPmt)
533533 let writeAmAmt = $t02059020935._1
534534 let writePrAmt = $t02059020935._2
535535 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))]
536536 $Tuple13(calcLpAmt, emitLpAmt, curPrice, amBalance, prBalance, lpEm, lpId, sts, commonState, amDiff, prDiff, inAmId, inPrId)
537537 }
538538 }
539539
540540
541541 func getYD (xp,i,D) = {
542542 let n = big2
543543 let x = xp[if ((i == 0))
544544 then 1
545545 else 0]
546546 let aPrecision = parseBigIntValue(Amult)
547547 let a = (parseBigIntValue(A) * aPrecision)
548548 let s = x
549549 let ann = (a * n)
550550 let c = (((((D * D) / (x * n)) * D) * aPrecision) / (ann * n))
551551 let b = ((s + ((D * aPrecision) / ann)) - D)
552552 func calc (acc,cur) = {
553553 let $t02213022150 = acc
554554 let y = $t02213022150._1
555555 let found = $t02213022150._2
556556 if ((found != unit))
557557 then acc
558558 else {
559559 let yNext = (((y * y) + c) / ((big2 * y) + b))
560560 let yDiff = absBigInt((yNext - value(y)))
561561 if ((big1 >= yDiff))
562562 then $Tuple2(yNext, cur)
563563 else $Tuple2(yNext, unit)
564564 }
565565 }
566566
567567 let arr = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
568568 let $t02245722504 = {
569569 let $l = arr
570570 let $s = size($l)
571571 let $acc0 = $Tuple2(D, unit)
572572 func $f0_1 ($a,$i) = if (($i >= $s))
573573 then $a
574574 else calc($a, $l[$i])
575575
576576 func $f0_2 ($a,$i) = if (($i >= $s))
577577 then $a
578578 else throw("List size exceeds 15")
579579
580580 $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)
581581 }
582582 let y = $t02245722504._1
583583 let found = $t02245722504._2
584584 if ((found != unit))
585585 then y
586586 else throw(("Y calculation error, Y = " + toString(y)))
587587 }
588588
589589
590590 func calcDLp (amountBalance,priceBalance,lpEmission) = {
591591 let updatedDLp = fraction(getD([t1BigInt(amountBalance, toBigInt(cfgAmountAssetDecimals)), t1BigInt(priceBalance, toBigInt(cfgPriceAssetDecimals))]), scale18, lpEmission)
592592 if ((lpEmission == big0))
593593 then big0
594594 else updatedDLp
595595 }
596596
597597
598598 func calcCurrentDLp (amountAssetDelta,priceAssetDelta,lpAssetEmissionDelta) = {
599599 let amountAssetBalance = (toBigInt(getAccBalance(assetIdToString(cfgAmountAssetId))) - amountAssetDelta)
600600 let priceAssetBalance = (toBigInt(getAccBalance(assetIdToString(cfgPriceAssetId))) - priceAssetDelta)
601601 let lpAssetEmission = (toBigInt(value(assetInfo(cfgLpAssetId)).quantity) - lpAssetEmissionDelta)
602602 let currentDLp = calcDLp(amountAssetBalance, priceAssetBalance, lpAssetEmission)
603603 currentDLp
604604 }
605605
606606
607607 func refreshDLpInternal (amountAssetBalanceDelta,priceAssetBalanceDelta,lpAssetEmissionDelta) = {
608608 let amountAssetBalance = (getAccBalance(assetIdToString(cfgAmountAssetId)) + amountAssetBalanceDelta)
609609 let priceAssetBalance = (getAccBalance(assetIdToString(cfgPriceAssetId)) + priceAssetBalanceDelta)
610610 let lpAssetEmission = (value(assetInfo(cfgLpAssetId)).quantity + lpAssetEmissionDelta)
611611 let updatedDLp = calcDLp(toBigInt(amountAssetBalance), toBigInt(priceAssetBalance), toBigInt(lpAssetEmission))
612612 let actions = [IntegerEntry(keyDLpRefreshedHeight, height), StringEntry(keyDLp, toString(updatedDLp))]
613613 $Tuple2(actions, updatedDLp)
614614 }
615615
616616
617617 func validateUpdatedDLp (oldDLp,updatedDLp) = if ((updatedDLp >= oldDLp))
618618 then true
619619 else throwErr("updated DLp lower than current DLp")
620620
621621
622622 func validateMatcherOrderAllowed (order) = {
623623 let amountAssetBalance = getAccBalance(assetIdToString(cfgAmountAssetId))
624624 let priceAssetBalance = getAccBalance(assetIdToString(cfgPriceAssetId))
625625 let amountAssetAmount = order.amount
626626 let priceAssetAmount = fraction(order.amount, order.price, scale8, FLOOR)
627627 let $t02470224914 = if ((order.orderType == Buy))
628628 then $Tuple2(amountAssetAmount, -(priceAssetAmount))
629629 else $Tuple2(-(amountAssetAmount), priceAssetAmount)
630630 let amountAssetBalanceDelta = $t02470224914._1
631631 let priceAssetBalanceDelta = $t02470224914._2
632632 if (if (if (igs())
633633 then true
634634 else (cfgPoolStatus == PoolMatcherDis))
635635 then true
636636 else (cfgPoolStatus == PoolShutdown))
637637 then throw("Admin blocked")
638638 else if (if ((order.assetPair.amountAsset != cfgAmountAssetId))
639639 then true
640640 else (order.assetPair.priceAsset != cfgPriceAssetId))
641641 then throw("Wr assets")
642642 else {
643643 let dLp = parseBigIntValue(valueOrElse(getString(this, keyDLp), "0"))
644644 let $t02525625356 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
645645 let unusedActions = $t02525625356._1
646646 let dLpNew = $t02525625356._2
647647 let isOrderValid = (dLpNew >= dLp)
648648 let info = makeString(["dLp=", toString(dLp), " dLpNew=", toString(dLpNew), " amountAssetBalance=", toString(amountAssetBalance), " priceAssetBalance=", toString(priceAssetBalance), " amountAssetBalanceDelta=", toString(amountAssetBalanceDelta), " priceAssetBalanceDelta=", toString(priceAssetBalanceDelta), " height=", toString(height)], "")
649649 $Tuple2(isOrderValid, info)
650650 }
651651 }
652652
653653
654654 func cg (i) = if ((size(i.payments) != 1))
655655 then throw("1 pmnt exp")
656656 else {
657657 let pmt = value(i.payments[0])
658658 let pmtAssetId = value(pmt.assetId)
659659 let pmtAmt = pmt.amount
660660 let r = ego(toBase58String(i.transactionId), toBase58String(pmtAssetId), pmtAmt, i.caller)
661661 let outAmAmt = r._1
662662 let outPrAmt = r._2
663663 let sts = parseIntValue(r._9)
664664 let state = r._10
665665 if (if (igs())
666666 then true
667667 else (sts == PoolShutdown))
668668 then throw(("Admin blocked: " + toString(sts)))
669669 else $Tuple5(outAmAmt, outPrAmt, pmtAmt, pmtAssetId, state)
670670 }
671671
672672
673673 func cp (caller,txId,amAsPmt,prAsPmt,slippage,emitLp,isOneAsset,validateSlippage,pmtAmt,pmtId) = {
674674 let r = epo(txId, slippage, value(amAsPmt).amount, value(amAsPmt).assetId, value(prAsPmt).amount, value(prAsPmt).assetId, caller, (txId == ""), emitLp, isOneAsset, validateSlippage, pmtAmt, pmtId)
675675 let sts = parseIntValue(r._8)
676676 if (if (if (igs())
677677 then true
678678 else (sts == PoolPutDis))
679679 then true
680680 else (sts == PoolShutdown))
681681 then throw(("Blocked:" + toString(sts)))
682682 else r
683683 }
684684
685685
686686 func calcPutOneTkn (pmtAmtRaw,pmtAssetId,userAddress,txId,withTakeFee) = {
687687 let amId = toBase58String(value(cfgAmountAssetId))
688688 let prId = toBase58String(value(cfgPriceAssetId))
689689 let lpId = cfgLpAssetId
690690 let amtDcm = cfgAmountAssetDecimals
691691 let priceDcm = cfgPriceAssetDecimals
692692 let lpAssetEmission = toBigInt(valueOrErrorMessage(assetInfo(lpId), "invalid lp asset").quantity)
693693 let chechEmission = if ((lpAssetEmission > big0))
694694 then true
695695 else throw("initial deposit requires all coins")
696696 if ((chechEmission == chechEmission))
697697 then {
698698 let amBalance = getAccBalance(amId)
699699 let prBalance = getAccBalance(prId)
700700 let $t02801228474 = if ((txId == ""))
701701 then $Tuple2(amBalance, prBalance)
702702 else if ((pmtAssetId == amId))
703703 then if ((pmtAmtRaw > amBalance))
704704 then throw("invalid payment amount")
705705 else $Tuple2((amBalance - pmtAmtRaw), prBalance)
706706 else if ((pmtAssetId == prId))
707707 then if ((pmtAmtRaw > prBalance))
708708 then throw("invalid payment amount")
709709 else $Tuple2(amBalance, (prBalance - pmtAmtRaw))
710710 else throw("wrong pmtAssetId")
711711 let amBalanceOld = $t02801228474._1
712712 let prBalanceOld = $t02801228474._2
713713 let $t02848028656 = if ((pmtAssetId == amId))
714714 then $Tuple2(pmtAmtRaw, 0)
715715 else if ((pmtAssetId == prId))
716716 then $Tuple2(0, pmtAmtRaw)
717717 else throw("invalid payment")
718718 let amAmountRaw = $t02848028656._1
719719 let prAmountRaw = $t02848028656._2
720720 let $t02866028914 = if (withTakeFee)
721721 then $Tuple3(takeFee(amAmountRaw, inFee)._1, takeFee(prAmountRaw, inFee)._1, takeFee(pmtAmtRaw, inFee)._2)
722722 else $Tuple3(amAmountRaw, prAmountRaw, 0)
723723 let amAmount = $t02866028914._1
724724 let prAmount = $t02866028914._2
725725 let feeAmount = $t02866028914._3
726726 let amBalanceNew = (amBalanceOld + amAmount)
727727 let prBalanceNew = (prBalanceOld + prAmount)
728728 let D0 = getD([t1(amBalanceOld, cfgAmountAssetDecimals), t1(prBalanceOld, cfgPriceAssetDecimals)])
729729 let D1 = getD([t1(amBalanceNew, cfgAmountAssetDecimals), t1(prBalanceNew, cfgPriceAssetDecimals)])
730730 let checkD = if ((D1 > D0))
731731 then true
732732 else throw()
733733 if ((checkD == checkD))
734734 then {
735735 let lpAmount = fraction(lpAssetEmission, (D1 - D0), D0, FLOOR)
736736 let curPrice = f1(cpbi(t1(prBalanceNew, priceDcm), t1(amBalanceNew, amtDcm)), scale8)
737737 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))]
738738 let poolProportion = fraction(prBalanceOld, scale8, amBalanceOld)
739739 let amountAssetPart = fraction(pmtAmtRaw, scale8, (poolProportion + scale8))
740740 let priceAssetPart = (pmtAmtRaw - amountAssetPart)
741741 let lpAmtBoth = fraction(lpAssetEmission, toBigInt(priceAssetPart), toBigInt(prBalanceOld))
742742 let bonus = toInt(fraction((lpAmount - lpAmtBoth), scale8BigInt, lpAmtBoth))
743743 $Tuple4(toInt(lpAmount), commonState, feeAmount, bonus)
744744 }
745745 else throw("Strict value is not equal to itself.")
746746 }
747747 else throw("Strict value is not equal to itself.")
748748 }
749749
750750
751751 func getOneTknV2Internal (outAssetId,minOutAmount,payments,caller,originCaller,transactionId) = {
752752 let lpId = toBase58String(value(cfgLpAssetId))
753753 let amId = toBase58String(value(cfgAmountAssetId))
754754 let prId = toBase58String(value(cfgPriceAssetId))
755755 let amDecimals = cfgAmountAssetDecimals
756756 let prDecimals = cfgPriceAssetDecimals
757757 let poolStatus = cfgPoolStatus
758758 let userAddress = if ((caller == restContract))
759759 then originCaller
760760 else caller
761761 let pmt = value(payments[0])
762762 let pmtAssetId = value(pmt.assetId)
763763 let pmtAmt = pmt.amount
764764 let currentDLp = calcCurrentDLp(big0, big0, big0)
765765 if ((currentDLp == currentDLp))
766766 then {
767767 let txId58 = toBase58String(transactionId)
768768 if ((lpId != toBase58String(pmtAssetId)))
769769 then throw("Wrong LP")
770770 else {
771771 let amBalance = getAccBalance(amId)
772772 let prBalance = getAccBalance(prId)
773773 let $t03102631137 = {
774774 let @ = invoke(this, "getOneTknV2READONLY", [outAssetId, pmtAmt], nil)
775775 if ($isInstanceOf(@, "(Int, Int)"))
776776 then @
777777 else throw(($getType(@) + " couldn't be cast to (Int, Int)"))
778778 }
779779 if (($t03102631137 == $t03102631137))
780780 then {
781781 let feeAmount = $t03102631137._2
782782 let totalGet = $t03102631137._1
783783 let totalAmount = if (if ((minOutAmount > 0))
784784 then (minOutAmount > totalGet)
785785 else false)
786786 then throwErr(makeString(["amount to receive is less than ", toString(minOutAmount)], ""))
787787 else totalGet
788788 let $t03132731634 = if ((outAssetId == amId))
789789 then $Tuple4(totalAmount, 0, ((amBalance - totalAmount) - feeAmount), prBalance)
790790 else if ((outAssetId == prId))
791791 then $Tuple4(0, totalAmount, amBalance, ((prBalance - totalAmount) - feeAmount))
792792 else throw("invalid out asset id")
793793 let outAm = $t03132731634._1
794794 let outPr = $t03132731634._2
795795 let amBalanceNew = $t03132731634._3
796796 let prBalanceNew = $t03132731634._4
797797 let curPrX18 = cpbi(t1(prBalanceNew, prDecimals), t1(amBalanceNew, amDecimals))
798798 let curPr = f1(curPrX18, scale8)
799799 let outAssetIdOrWaves = if ((outAssetId == "WAVES"))
800800 then unit
801801 else fromBase58String(outAssetId)
802802 let sendFeeToMatcher = if ((feeAmount > 0))
803803 then [ScriptTransfer(feeCollectorAddress, feeAmount, outAssetIdOrWaves)]
804804 else nil
805805 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)
806806 if ((state == state))
807807 then {
808808 let burn = invoke(fca, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
809809 if ((burn == burn))
810810 then {
811811 let $t03241932769 = {
812812 let feeAmountForCalc = if ((this == feeCollectorAddress))
813813 then 0
814814 else feeAmount
815815 let outInAmountAsset = if ((parseAssetId(outAssetId) == cfgAmountAssetId))
816816 then true
817817 else false
818818 if (outInAmountAsset)
819819 then $Tuple2(-((totalGet + feeAmountForCalc)), 0)
820820 else $Tuple2(0, -((totalGet + feeAmountForCalc)))
821821 }
822822 let amountAssetBalanceDelta = $t03241932769._1
823823 let priceAssetBalanceDelta = $t03241932769._2
824824 let $t03277232880 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
825825 let refreshDLpActions = $t03277232880._1
826826 let updatedDLp = $t03277232880._2
827827 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
828828 if ((isUpdatedDLpValid == isUpdatedDLpValid))
829829 then $Tuple2((state ++ refreshDLpActions), totalAmount)
830830 else throw("Strict value is not equal to itself.")
831831 }
832832 else throw("Strict value is not equal to itself.")
833833 }
834834 else throw("Strict value is not equal to itself.")
835835 }
836836 else throw("Strict value is not equal to itself.")
837837 }
838838 }
839839 else throw("Strict value is not equal to itself.")
840840 }
841841
842842
843843 func m () = match getString(mpk()) {
844844 case s: String =>
845845 fromBase58String(s)
846846 case _: Unit =>
847847 unit
848848 case _ =>
849849 throw("Match error")
850850 }
851851
852852
853853 func pm () = match getString(pmpk()) {
854854 case s: String =>
855855 fromBase58String(s)
856856 case _: Unit =>
857857 unit
858858 case _ =>
859859 throw("Match error")
860860 }
861861
862862
863863 let pd = throw("Permission denied")
864864
865865 func isManager (i) = match m() {
866866 case pk: ByteVector =>
867867 (i.callerPublicKey == pk)
868868 case _: Unit =>
869869 (i.caller == this)
870870 case _ =>
871871 throw("Match error")
872872 }
873873
874874
875875 func mm (i) = match m() {
876876 case pk: ByteVector =>
877877 if ((i.callerPublicKey == pk))
878878 then true
879879 else pd
880880 case _: Unit =>
881881 if ((i.caller == this))
882882 then true
883883 else pd
884884 case _ =>
885885 throw("Match error")
886886 }
887887
888888
889889 func getY (isReverse,D,poolAmountInBalance) = {
890890 let poolConfig = gpc()
891891 let amId = poolConfig[idxAmAsId]
892892 let prId = poolConfig[idxPrAsId]
893893 let n = big2
894894 let aPrecision = parseBigIntValue(Amult)
895895 let a = (parseBigIntValue(A) * aPrecision)
896896 let xp = if ((isReverse == false))
897897 then [(toBigInt(getAccBalance(amId)) + poolAmountInBalance), toBigInt(getAccBalance(prId))]
898898 else [(toBigInt(getAccBalance(prId)) + poolAmountInBalance), toBigInt(getAccBalance(amId))]
899899 let x = xp[0]
900900 let s = x
901901 let ann = (a * n)
902902 let c = (((((D * D) / (x * n)) * D) * aPrecision) / (ann * n))
903903 let b = ((s + ((D * aPrecision) / ann)) - D)
904904 func calc (acc,cur) = {
905905 let $t03432734347 = acc
906906 let y = $t03432734347._1
907907 let found = $t03432734347._2
908908 if ((found != unit))
909909 then acc
910910 else {
911911 let yNext = (((y * y) + c) / ((big2 * y) + b))
912912 let yDiff = absBigInt((yNext - value(y)))
913913 if ((big1 >= yDiff))
914914 then $Tuple2(yNext, cur)
915915 else $Tuple2(yNext, unit)
916916 }
917917 }
918918
919919 let arr = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
920920 let $t03467834725 = {
921921 let $l = arr
922922 let $s = size($l)
923923 let $acc0 = $Tuple2(D, unit)
924924 func $f0_1 ($a,$i) = if (($i >= $s))
925925 then $a
926926 else calc($a, $l[$i])
927927
928928 func $f0_2 ($a,$i) = if (($i >= $s))
929929 then $a
930930 else throw("List size exceeds 15")
931931
932932 $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)
933933 }
934934 let y = $t03467834725._1
935935 let found = $t03467834725._2
936936 if ((found != unit))
937937 then y
938938 else throw(("Y calculation error, Y = " + toString(y)))
939939 }
940940
941941
942942 @Callable(i)
943943 func calculateAmountOutForSwapREADONLY (cleanAmountIn,isReverse,feePoolAmount) = {
944944 let $t03496635390 = if ((isReverse == false))
945945 then {
946946 let assetOut = strf(this, pa())
947947 let poolAmountInBalance = (toBigInt(getAccBalance(strf(this, aa()))) + toBigInt(cleanAmountIn))
948948 $Tuple2(assetOut, poolAmountInBalance)
949949 }
950950 else {
951951 let assetOut = strf(this, aa())
952952 let poolAmountInBalance = (toBigInt(getAccBalance(strf(this, pa()))) + toBigInt(cleanAmountIn))
953953 $Tuple2(assetOut, poolAmountInBalance)
954954 }
955955 let assetOut = $t03496635390._1
956956 let poolAmountInBalance = $t03496635390._2
957957 let poolConfig = gpc()
958958 let amId = poolConfig[idxAmAsId]
959959 let prId = poolConfig[idxPrAsId]
960960 let xp = [toBigInt(getAccBalance(amId)), toBigInt(getAccBalance(prId))]
961961 let D = getD(xp)
962962 let y = getY(isReverse, D, toBigInt(cleanAmountIn))
963963 let dy = ((toBigInt(getAccBalance(assetOut)) - y) - toBigInt(1))
964964 let totalGetRaw = max([0, toInt(dy)])
965965 let newXp = if ((isReverse == false))
966966 then [((toBigInt(getAccBalance(amId)) + toBigInt(cleanAmountIn)) + toBigInt(feePoolAmount)), (toBigInt(getAccBalance(prId)) - dy)]
967967 else [(toBigInt(getAccBalance(amId)) - dy), ((toBigInt(getAccBalance(prId)) + toBigInt(cleanAmountIn)) + toBigInt(feePoolAmount))]
968968 let newD = getD(newXp)
969969 let checkD = if ((newD >= D))
970970 then true
971971 else throw(makeString(["new D is fewer error", toString(D), toString(newD)], "__"))
972972 if ((checkD == checkD))
973973 then $Tuple2(nil, totalGetRaw)
974974 else throw("Strict value is not equal to itself.")
975975 }
976976
977977
978978
979979 @Callable(i)
980980 func calculateAmountOutForSwapAndSendTokens (cleanAmountIn,isReverse,amountOutMin,addressTo,feePoolAmount) = {
981981 let swapContact = {
982982 let @ = invoke(fca, "getSwapContractREADONLY", nil, nil)
983983 if ($isInstanceOf(@, "String"))
984984 then @
985985 else throw(($getType(@) + " couldn't be cast to String"))
986986 }
987987 let checks = [if ((value(i.payments[0]).amount >= cleanAmountIn))
988988 then true
989989 else throwErr("Wrong amount"), if ((i.caller == addressFromStringValue(swapContact)))
990990 then true
991991 else throwErr("Permission denied")]
992992 if ((checks == checks))
993993 then {
994994 let pmt = value(i.payments[0])
995995 let assetIn = assetIdToString(pmt.assetId)
996996 let $t03682637220 = if ((isReverse == false))
997997 then {
998998 let assetOut = strf(this, pa())
999999 let poolAmountInBalance = (getAccBalance(assetIn) - value(i.payments[0]).amount)
10001000 $Tuple2(assetOut, poolAmountInBalance)
10011001 }
10021002 else {
10031003 let assetOut = strf(this, aa())
10041004 let poolAmountInBalance = (getAccBalance(assetIn) - value(i.payments[0]).amount)
10051005 $Tuple2(assetOut, poolAmountInBalance)
10061006 }
10071007 let assetOut = $t03682637220._1
10081008 let poolAmountInBalance = $t03682637220._2
10091009 let poolConfig = gpc()
10101010 let amId = poolConfig[idxAmAsId]
10111011 let prId = poolConfig[idxPrAsId]
10121012 let xp = if ((isReverse == false))
10131013 then [(toBigInt(getAccBalance(amId)) - toBigInt(value(i.payments[0]).amount)), toBigInt(getAccBalance(prId))]
10141014 else [toBigInt(getAccBalance(amId)), (toBigInt(getAccBalance(prId)) - toBigInt(value(i.payments[0]).amount))]
10151015 let D = getD(xp)
10161016 let y = getY(isReverse, D, toBigInt(0))
10171017 let dy = ((toBigInt(getAccBalance(assetOut)) - y) - toBigInt(1))
10181018 let totalGetRaw = max([0, toInt(dy)])
10191019 let checkMin = if ((totalGetRaw >= amountOutMin))
10201020 then true
10211021 else throw("Exchange result is fewer coins than expected")
10221022 if ((checkMin == checkMin))
10231023 then {
10241024 let newXp = if ((isReverse == false))
10251025 then [(toBigInt(getAccBalance(amId)) + toBigInt(feePoolAmount)), (toBigInt(getAccBalance(prId)) - dy)]
10261026 else [(toBigInt(getAccBalance(amId)) - dy), (toBigInt(getAccBalance(prId)) + toBigInt(feePoolAmount))]
10271027 let newD = getD(newXp)
10281028 let checkD = if ((newD >= D))
10291029 then true
10301030 else throw("new D is fewer error")
10311031 if ((checkD == checkD))
10321032 then $Tuple2([ScriptTransfer(addressFromStringValue(addressTo), totalGetRaw, parseAssetId(assetOut))], totalGetRaw)
10331033 else throw("Strict value is not equal to itself.")
10341034 }
10351035 else throw("Strict value is not equal to itself.")
10361036 }
10371037 else throw("Strict value is not equal to itself.")
10381038 }
10391039
10401040
10411041
10421042 @Callable(i)
10431043 func constructor (fc) = {
10441044 let c = mm(i)
10451045 if ((c == c))
10461046 then [StringEntry(fc(), fc)]
10471047 else throw("Strict value is not equal to itself.")
10481048 }
10491049
10501050
10511051
10521052 @Callable(i)
10531053 func setManager (pendingManagerPublicKey) = {
10541054 let c = mm(i)
10551055 if ((c == c))
10561056 then {
10571057 let cm = fromBase58String(pendingManagerPublicKey)
10581058 if ((cm == cm))
10591059 then [StringEntry(pmpk(), pendingManagerPublicKey)]
10601060 else throw("Strict value is not equal to itself.")
10611061 }
10621062 else throw("Strict value is not equal to itself.")
10631063 }
10641064
10651065
10661066
10671067 @Callable(i)
10681068 func confirmManager () = {
10691069 let p = pm()
10701070 let hpm = if (isDefined(p))
10711071 then true
10721072 else throw("No pending manager")
10731073 if ((hpm == hpm))
10741074 then {
10751075 let cpm = if ((i.callerPublicKey == value(p)))
10761076 then true
10771077 else throw("You are not pending manager")
10781078 if ((cpm == cpm))
10791079 then [StringEntry(mpk(), toBase58String(value(p))), DeleteEntry(pmpk())]
10801080 else throw("Strict value is not equal to itself.")
10811081 }
10821082 else throw("Strict value is not equal to itself.")
10831083 }
10841084
10851085
10861086
10871087 @Callable(i)
10881088 func put (slip,autoStake) = {
10891089 let factCfg = gfc()
10901090 let stakingCntr = valueOrErrorMessage(addressFromString(factCfg[idxFactStakCntr]), "Wr st addr")
10911091 let slipCntr = valueOrErrorMessage(addressFromString(factCfg[idxFactSlippCntr]), "Wr sl addr")
10921092 if ((0 > slip))
10931093 then throw("Wrong slippage")
10941094 else if ((size(i.payments) != 2))
10951095 then throw("2 pmnts expd")
10961096 else {
10971097 let amAssetPmt = toBigInt(value(i.payments[0]).amount)
10981098 let prAssetPmt = toBigInt(value(i.payments[1]).amount)
10991099 let amountAssetBalance = (toBigInt(getAccBalance(assetIdToString(cfgAmountAssetId))) - amAssetPmt)
11001100 if ((amountAssetBalance == amountAssetBalance))
11011101 then {
11021102 let priceAssetBalance = (toBigInt(getAccBalance(assetIdToString(cfgPriceAssetId))) - prAssetPmt)
11031103 if ((priceAssetBalance == priceAssetBalance))
11041104 then {
11051105 let lpAssetEmission = toBigInt(value(assetInfo(cfgLpAssetId)).quantity)
11061106 if ((lpAssetEmission == lpAssetEmission))
11071107 then {
11081108 let currentDLp = calcCurrentDLp(amAssetPmt, prAssetPmt, toBigInt(0))
11091109 if ((currentDLp == currentDLp))
11101110 then {
11111111 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, "")
11121112 let emitLpAmt = e._2
11131113 let lpAssetId = e._7
11141114 let state = e._9
11151115 let amDiff = e._10
11161116 let prDiff = e._11
11171117 let amId = e._12
11181118 let prId = e._13
11191119 let r = invoke(fca, "emit", [emitLpAmt], nil)
11201120 if ((r == r))
11211121 then {
11221122 let el = match r {
11231123 case legacy: Address =>
11241124 invoke(legacy, "emit", [emitLpAmt], nil)
11251125 case _ =>
11261126 unit
11271127 }
11281128 if ((el == el))
11291129 then {
11301130 let sa = if ((amDiff > 0))
11311131 then invoke(slipCntr, "put", nil, [AttachedPayment(amId, amDiff)])
11321132 else nil
11331133 if ((sa == sa))
11341134 then {
11351135 let sp = if ((prDiff > 0))
11361136 then invoke(slipCntr, "put", nil, [AttachedPayment(prId, prDiff)])
11371137 else nil
11381138 if ((sp == sp))
11391139 then {
11401140 let lpTrnsfr = if (autoStake)
11411141 then {
11421142 let ss = invoke(stakingCntr, "stake", nil, [AttachedPayment(lpAssetId, emitLpAmt)])
11431143 if ((ss == ss))
11441144 then nil
11451145 else throw("Strict value is not equal to itself.")
11461146 }
11471147 else [ScriptTransfer(i.caller, emitLpAmt, lpAssetId)]
11481148 let $t04183941981 = refreshDLpInternal(0, 0, 0)
11491149 let refreshDLpActions = $t04183941981._1
11501150 let updatedDLp = $t04183941981._2
11511151 let check = if ((updatedDLp >= currentDLp))
11521152 then true
11531153 else throwErr(makeString(["updated DLp lower than current DLp", toString(amountAssetBalance), toString(priceAssetBalance), toString(lpAssetEmission), toString(currentDLp), toString(updatedDLp), toString(amDiff), toString(prDiff)], " "))
11541154 if ((check == check))
11551155 then {
11561156 let lpAssetEmissionAfter = value(assetInfo(cfgLpAssetId)).quantity
11571157 if ((lpAssetEmissionAfter == lpAssetEmissionAfter))
11581158 then ((state ++ lpTrnsfr) ++ refreshDLpActions)
11591159 else throw("Strict value is not equal to itself.")
11601160 }
11611161 else throw("Strict value is not equal to itself.")
11621162 }
11631163 else throw("Strict value is not equal to itself.")
11641164 }
11651165 else throw("Strict value is not equal to itself.")
11661166 }
11671167 else throw("Strict value is not equal to itself.")
11681168 }
11691169 else throw("Strict value is not equal to itself.")
11701170 }
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 }
11801180
11811181
11821182
11831183 @Callable(i)
11841184 func putOneTknV2 (minOutAmount,autoStake) = {
11851185 let isPoolOneTokenOperationsDisabled = {
11861186 let @ = invoke(fca, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
11871187 if ($isInstanceOf(@, "Boolean"))
11881188 then @
11891189 else throw(($getType(@) + " couldn't be cast to Boolean"))
11901190 }
11911191 let isPutDisabled = if (if (if (igs())
11921192 then true
11931193 else (cfgPoolStatus == PoolPutDis))
11941194 then true
11951195 else (cfgPoolStatus == PoolShutdown))
11961196 then true
11971197 else isPoolOneTokenOperationsDisabled
11981198 let checks = [if (if (!(isPutDisabled))
11991199 then true
12001200 else isManager(i))
12011201 then true
12021202 else throwErr("put operation is blocked by admin"), if ((size(i.payments) == 1))
12031203 then true
12041204 else throwErr("exactly 1 payment are expected")]
12051205 if ((checks == checks))
12061206 then {
12071207 let amId = toBase58String(value(cfgAmountAssetId))
12081208 let prId = toBase58String(value(cfgPriceAssetId))
12091209 let lpId = cfgLpAssetId
12101210 let amDecimals = cfgAmountAssetDecimals
12111211 let prDecimals = cfgPriceAssetDecimals
12121212 let userAddress = if ((i.caller == this))
12131213 then i.originCaller
12141214 else i.caller
12151215 let pmt = value(i.payments[0])
12161216 let pmtAssetId = toBase58String(value(pmt.assetId))
12171217 let pmtAmt = pmt.amount
12181218 let currentDLp = if ((pmt.assetId == cfgAmountAssetId))
12191219 then calcCurrentDLp(toBigInt(pmtAmt), toBigInt(0), toBigInt(0))
12201220 else calcCurrentDLp(toBigInt(0), toBigInt(pmtAmt), toBigInt(0))
12211221 if ((currentDLp == currentDLp))
12221222 then {
12231223 let $t04362243780 = calcPutOneTkn(pmtAmt, pmtAssetId, toString(userAddress), toBase58String(i.transactionId), true)
12241224 if (($t04362243780 == $t04362243780))
12251225 then {
12261226 let feeAmount = $t04362243780._3
12271227 let state = $t04362243780._2
12281228 let estimLP = $t04362243780._1
12291229 let emitLpAmt = if (if ((minOutAmount > 0))
12301230 then (minOutAmount > estimLP)
12311231 else false)
12321232 then throwErr(makeString(["amount to receive is less than ", toString(minOutAmount)], ""))
12331233 else estimLP
12341234 let e = invoke(fca, "emit", [emitLpAmt], nil)
12351235 if ((e == e))
12361236 then {
12371237 let el = match e {
12381238 case legacy: Address =>
12391239 invoke(legacy, "emit", [emitLpAmt], nil)
12401240 case _ =>
12411241 unit
12421242 }
12431243 if ((el == el))
12441244 then {
12451245 let lpTrnsfr = if (autoStake)
12461246 then {
12471247 let ss = invoke(stakingContract, "stake", nil, [AttachedPayment(lpId, emitLpAmt)])
12481248 if ((ss == ss))
12491249 then nil
12501250 else throw("Strict value is not equal to itself.")
12511251 }
12521252 else [ScriptTransfer(i.caller, emitLpAmt, lpId)]
12531253 let sendFeeToMatcher = if ((feeAmount > 0))
12541254 then [ScriptTransfer(feeCollectorAddress, feeAmount, fromBase58String(pmtAssetId))]
12551255 else nil
12561256 let $t04459544944 = if ((this == feeCollectorAddress))
12571257 then $Tuple2(0, 0)
12581258 else {
12591259 let paymentInAmountAsset = if ((pmt.assetId == cfgAmountAssetId))
12601260 then true
12611261 else false
12621262 if (paymentInAmountAsset)
12631263 then $Tuple2(-(feeAmount), 0)
12641264 else $Tuple2(0, -(feeAmount))
12651265 }
12661266 let amountAssetBalanceDelta = $t04459544944._1
12671267 let priceAssetBalanceDelta = $t04459544944._2
12681268 let $t04494745055 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
12691269 let refreshDLpActions = $t04494745055._1
12701270 let updatedDLp = $t04494745055._2
12711271 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
12721272 if ((isUpdatedDLpValid == isUpdatedDLpValid))
12731273 then $Tuple2((((state ++ lpTrnsfr) ++ sendFeeToMatcher) ++ refreshDLpActions), emitLpAmt)
12741274 else throw("Strict value is not equal to itself.")
12751275 }
12761276 else throw("Strict value is not equal to itself.")
12771277 }
12781278 else throw("Strict value is not equal to itself.")
12791279 }
12801280 else throw("Strict value is not equal to itself.")
12811281 }
12821282 else throw("Strict value is not equal to itself.")
12831283 }
12841284 else throw("Strict value is not equal to itself.")
12851285 }
12861286
12871287
12881288
12891289 @Callable(i)
12901290 func putForFree (maxSlpg) = if ((0 > maxSlpg))
12911291 then throw("Wrong slpg")
12921292 else if ((size(i.payments) != 2))
12931293 then throw("2 pmnts expd")
12941294 else {
12951295 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, "")
12961296 let state = estPut._9
12971297 let amAssetPmt = toBigInt(value(i.payments[0]).amount)
12981298 let prAssetPmt = toBigInt(value(i.payments[1]).amount)
12991299 let currentDLp = calcCurrentDLp(amAssetPmt, prAssetPmt, toBigInt(0))
13001300 if ((currentDLp == currentDLp))
13011301 then {
13021302 let $t04608546150 = refreshDLpInternal(0, 0, 0)
13031303 let refreshDLpActions = $t04608546150._1
13041304 let updatedDLp = $t04608546150._2
13051305 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
13061306 if ((isUpdatedDLpValid == isUpdatedDLpValid))
13071307 then (state ++ refreshDLpActions)
13081308 else throw("Strict value is not equal to itself.")
13091309 }
13101310 else throw("Strict value is not equal to itself.")
13111311 }
13121312
13131313
13141314
13151315 @Callable(i)
13161316 func get () = {
13171317 let currentDLp = calcCurrentDLp(toBigInt(0), toBigInt(0), toBigInt(0))
13181318 if ((currentDLp == currentDLp))
13191319 then {
13201320 let r = cg(i)
13211321 let outAmtAmt = r._1
13221322 let outPrAmt = r._2
13231323 let pmtAmt = r._3
13241324 let pmtAssetId = r._4
13251325 let state = r._5
13261326 let b = invoke(fca, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
13271327 if ((b == b))
13281328 then {
13291329 let $t04732347405 = refreshDLpInternal(-(outAmtAmt), -(outPrAmt), 0)
13301330 let refreshDLpActions = $t04732347405._1
13311331 let updatedDLp = $t04732347405._2
13321332 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
13331333 if ((isUpdatedDLpValid == isUpdatedDLpValid))
13341334 then (state ++ refreshDLpActions)
13351335 else throw("Strict value is not equal to itself.")
13361336 }
13371337 else throw("Strict value is not equal to itself.")
13381338 }
13391339 else throw("Strict value is not equal to itself.")
13401340 }
13411341
13421342
13431343
13441344 @Callable(i)
13451345 func getOneTknV2 (outAssetId,minOutAmount) = {
13461346 let isPoolOneTokenOperationsDisabled = {
13471347 let @ = invoke(fca, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
13481348 if ($isInstanceOf(@, "Boolean"))
13491349 then @
13501350 else throw(($getType(@) + " couldn't be cast to Boolean"))
13511351 }
13521352 let isGetDisabled = if (if (igs())
13531353 then true
13541354 else (cfgPoolStatus == PoolShutdown))
13551355 then true
13561356 else isPoolOneTokenOperationsDisabled
13571357 let checks = [if (if (!(isGetDisabled))
13581358 then true
13591359 else isManager(i))
13601360 then true
13611361 else throwErr("get operation is blocked by admin"), if ((size(i.payments) == 1))
13621362 then true
13631363 else throwErr("exactly 1 payment are expected")]
13641364 if ((checks == checks))
13651365 then {
13661366 let $t04802348178 = getOneTknV2Internal(outAssetId, minOutAmount, i.payments, i.caller, i.originCaller, i.transactionId)
13671367 let state = $t04802348178._1
13681368 let totalAmount = $t04802348178._2
13691369 $Tuple2(state, totalAmount)
13701370 }
13711371 else throw("Strict value is not equal to itself.")
13721372 }
13731373
13741374
13751375
13761376 @Callable(i)
13771377 func refreshDLp () = {
13781378 let lastRefreshedBlockHeight = valueOrElse(getInteger(keyDLpRefreshedHeight), 0)
13791379 let checkLastRefreshedBlockHeight = if (((height - lastRefreshedBlockHeight) >= dLpRefreshDelay))
13801380 then unit
13811381 else throwErr(makeString([toString(dLpRefreshDelay), " blocks have not passed since the previous call"], ""))
13821382 if ((checkLastRefreshedBlockHeight == checkLastRefreshedBlockHeight))
13831383 then {
13841384 let dLp = valueOrErrorMessage(parseBigInt(valueOrElse(getString(this, keyDLp), "0")), fmtErr("invalid dLp"))
13851385 let $t04870248766 = refreshDLpInternal(0, 0, 0)
13861386 let dLpUpdateActions = $t04870248766._1
13871387 let updatedDLp = $t04870248766._2
13881388 let actions = if ((dLp != updatedDLp))
13891389 then dLpUpdateActions
13901390 else throwErr("nothing to refresh")
13911391 $Tuple2(actions, toString(updatedDLp))
13921392 }
13931393 else throw("Strict value is not equal to itself.")
13941394 }
13951395
13961396
13971397
13981398 @Callable(i)
13991399 func getOneTknV2READONLY (outAssetId,lpAssetAmount) = {
14001400 let amId = toBase58String(value(cfgAmountAssetId))
14011401 let prId = toBase58String(value(cfgPriceAssetId))
14021402 let lpId = toBase58String(value(cfgLpAssetId))
14031403 let xp = [toBigInt(getAccBalance(amId)), toBigInt(getAccBalance(prId))]
14041404 let lpEmission = toBigInt(valueOrErrorMessage(assetInfo(fromBase58String(lpId)), "invalid lp asset").quantity)
14051405 let D0 = getD(xp)
14061406 let D1 = (D0 - fraction(toBigInt(lpAssetAmount), D0, lpEmission))
14071407 let index = if ((outAssetId == amId))
14081408 then 0
14091409 else if ((outAssetId == prId))
14101410 then 1
14111411 else throw("invalid out asset id")
14121412 let newY = getYD(xp, index, D1)
14131413 let dy = (xp[index] - newY)
14141414 let totalGetRaw = max([0, toInt((dy - big1))])
14151415 let $t04977649831 = takeFee(totalGetRaw, outFee)
14161416 let totalGet = $t04977649831._1
14171417 let feeAmount = $t04977649831._2
14181418 $Tuple2(nil, $Tuple2(totalGet, feeAmount))
14191419 }
14201420
14211421
14221422
14231423 @Callable(i)
14241424 func getOneTknV2WithBonusREADONLY (outAssetId,lpAssetAmount) = {
14251425 let amId = toBase58String(value(cfgAmountAssetId))
14261426 let prId = toBase58String(value(cfgPriceAssetId))
14271427 let lpId = toBase58String(value(cfgLpAssetId))
14281428 let amBalance = getAccBalance(amId)
14291429 let prBalance = getAccBalance(prId)
14301430 let $t05020650321 = {
14311431 let @ = invoke(this, "getOneTknV2READONLY", [outAssetId, lpAssetAmount], nil)
14321432 if ($isInstanceOf(@, "(Int, Int)"))
14331433 then @
14341434 else throw(($getType(@) + " couldn't be cast to (Int, Int)"))
14351435 }
14361436 let totalGet = $t05020650321._1
14371437 let feeAmount = $t05020650321._2
14381438 let r = ego("", lpId, lpAssetAmount, this)
14391439 let outAmAmt = r._1
14401440 let outPrAmt = r._2
14411441 let sumOfGetAssets = (outAmAmt + outPrAmt)
14421442 let bonus = if ((sumOfGetAssets == 0))
14431443 then if ((totalGet == 0))
14441444 then 0
14451445 else throw("bonus calculation error")
14461446 else fraction((totalGet - sumOfGetAssets), scale8, sumOfGetAssets)
14471447 $Tuple2(nil, $Tuple3(totalGet, feeAmount, bonus))
14481448 }
14491449
14501450
14511451
14521452 @Callable(i)
14531453 func getNoLess (noLessThenAmtAsset,noLessThenPriceAsset) = {
14541454 let r = cg(i)
14551455 let outAmAmt = r._1
14561456 let outPrAmt = r._2
14571457 let pmtAmt = r._3
14581458 let pmtAssetId = r._4
14591459 let state = r._5
14601460 if ((noLessThenAmtAsset > outAmAmt))
14611461 then throw(((("Failed: " + toString(outAmAmt)) + " < ") + toString(noLessThenAmtAsset)))
14621462 else if ((noLessThenPriceAsset > outPrAmt))
14631463 then throw(((("Failed: " + toString(outPrAmt)) + " < ") + toString(noLessThenPriceAsset)))
14641464 else {
14651465 let currentDLp = calcCurrentDLp(toBigInt(0), toBigInt(0), toBigInt(0))
14661466 if ((currentDLp == currentDLp))
14671467 then {
14681468 let burnLPAssetOnFactory = invoke(fca, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
14691469 if ((burnLPAssetOnFactory == burnLPAssetOnFactory))
14701470 then {
14711471 let $t05148751568 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
14721472 let refreshDLpActions = $t05148751568._1
14731473 let updatedDLp = $t05148751568._2
14741474 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
14751475 if ((isUpdatedDLpValid == isUpdatedDLpValid))
14761476 then (state ++ refreshDLpActions)
14771477 else throw("Strict value is not equal to itself.")
14781478 }
14791479 else throw("Strict value is not equal to itself.")
14801480 }
14811481 else throw("Strict value is not equal to itself.")
14821482 }
14831483 }
14841484
14851485
14861486
14871487 @Callable(i)
14881488 func unstakeAndGet (amount) = {
14891489 let checkPayments = if ((size(i.payments) != 0))
14901490 then throw("No pmnts expd")
14911491 else true
14921492 if ((checkPayments == checkPayments))
14931493 then {
14941494 let factoryCfg = gfc()
14951495 let lpAssetId = cfgLpAssetId
14961496 let staking = valueOrErrorMessage(addressFromString(factoryCfg[idxFactStakCntr]), "Wr st addr")
14971497 let currentDLp = calcCurrentDLp(toBigInt(0), toBigInt(0), toBigInt(0))
14981498 if ((currentDLp == currentDLp))
14991499 then {
15001500 let unstakeInv = invoke(staking, "unstake", [toBase58String(lpAssetId), amount], nil)
15011501 if ((unstakeInv == unstakeInv))
15021502 then {
15031503 let r = ego(toBase58String(i.transactionId), toBase58String(lpAssetId), amount, i.caller)
15041504 let outAmAmt = r._1
15051505 let outPrAmt = r._2
15061506 let sts = parseIntValue(r._9)
15071507 let state = r._10
15081508 let v = if (if (igs())
15091509 then true
15101510 else (sts == PoolShutdown))
15111511 then throw(("Blocked: " + toString(sts)))
15121512 else true
15131513 if ((v == v))
15141514 then {
15151515 let burnA = invoke(fca, "burn", [amount], [AttachedPayment(lpAssetId, amount)])
15161516 if ((burnA == burnA))
15171517 then {
15181518 let $t05259552676 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
15191519 let refreshDLpActions = $t05259552676._1
15201520 let updatedDLp = $t05259552676._2
15211521 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
15221522 if ((isUpdatedDLpValid == isUpdatedDLpValid))
15231523 then (state ++ refreshDLpActions)
15241524 else throw("Strict value is not equal to itself.")
15251525 }
15261526 else throw("Strict value is not equal to itself.")
15271527 }
15281528 else throw("Strict value is not equal to itself.")
15291529 }
15301530 else throw("Strict value is not equal to itself.")
15311531 }
15321532 else throw("Strict value is not equal to itself.")
15331533 }
15341534 else throw("Strict value is not equal to itself.")
15351535 }
15361536
15371537
15381538
15391539 @Callable(i)
15401540 func unstakeAndGetNoLess (unstakeAmount,noLessThenAmountAsset,noLessThenPriceAsset) = {
15411541 let isGetDisabled = if (igs())
15421542 then true
15431543 else (cfgPoolStatus == PoolShutdown)
15441544 let checks = [if (!(isGetDisabled))
15451545 then true
15461546 else throw("get operation is blocked by admin"), if ((size(i.payments) == 0))
15471547 then true
15481548 else throw("no payments are expected")]
15491549 if ((checks == checks))
15501550 then {
15511551 let currentDLp = calcCurrentDLp(toBigInt(0), toBigInt(0), toBigInt(0))
15521552 if ((currentDLp == currentDLp))
15531553 then {
15541554 let unstakeInv = invoke(stakingContract, "unstake", [toBase58String(cfgLpAssetId), unstakeAmount], nil)
15551555 if ((unstakeInv == unstakeInv))
15561556 then {
15571557 let res = ego(toBase58String(i.transactionId), toBase58String(cfgLpAssetId), unstakeAmount, i.caller)
15581558 let outAmAmt = res._1
15591559 let outPrAmt = res._2
15601560 let state = res._10
15611561 let checkAmounts = [if ((outAmAmt >= noLessThenAmountAsset))
15621562 then true
15631563 else throw(makeString(["amount asset amount to receive is less than ", toString(noLessThenAmountAsset)], "")), if ((outPrAmt >= noLessThenPriceAsset))
15641564 then true
15651565 else throw(makeString(["price asset amount to receive is less than ", toString(noLessThenPriceAsset)], ""))]
15661566 if ((checkAmounts == checkAmounts))
15671567 then {
15681568 let burnLPAssetOnFactory = invoke(fca, "burn", [unstakeAmount], [AttachedPayment(cfgLpAssetId, unstakeAmount)])
15691569 if ((burnLPAssetOnFactory == burnLPAssetOnFactory))
15701570 then {
15711571 let $t05392754008 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
15721572 let refreshDLpActions = $t05392754008._1
15731573 let updatedDLp = $t05392754008._2
15741574 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
15751575 if ((isUpdatedDLpValid == isUpdatedDLpValid))
15761576 then (state ++ refreshDLpActions)
15771577 else throw("Strict value is not equal to itself.")
15781578 }
15791579 else throw("Strict value is not equal to itself.")
15801580 }
15811581 else throw("Strict value is not equal to itself.")
15821582 }
15831583 else throw("Strict value is not equal to itself.")
15841584 }
15851585 else throw("Strict value is not equal to itself.")
15861586 }
15871587 else throw("Strict value is not equal to itself.")
15881588 }
15891589
15901590
15911591
15921592 @Callable(i)
15931593 func unstakeAndGetOneTknV2 (unstakeAmount,outAssetId,minOutAmount) = {
15941594 let isPoolOneTokenOperationsDisabled = {
15951595 let @ = invoke(fca, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
15961596 if ($isInstanceOf(@, "Boolean"))
15971597 then @
15981598 else throw(($getType(@) + " couldn't be cast to Boolean"))
15991599 }
16001600 let isGetDisabled = if (if (igs())
16011601 then true
16021602 else (cfgPoolStatus == PoolShutdown))
16031603 then true
16041604 else isPoolOneTokenOperationsDisabled
16051605 let checks = [if (if (!(isGetDisabled))
16061606 then true
16071607 else isManager(i))
16081608 then true
16091609 else throwErr("get operation is blocked by admin"), if ((size(i.payments) == 0))
16101610 then true
16111611 else throwErr("no payments are expected")]
16121612 if ((checks == checks))
16131613 then {
16141614 let factoryCfg = gfc()
16151615 let lpAssetId = cfgLpAssetId
16161616 let staking = valueOrErrorMessage(addressFromString(factoryCfg[idxFactStakCntr]), "Wr st addr")
1617- let userAddress = i.caller
1618- let lpAssetRecipientAddress = this
1619- let unstakeInv = invoke(staking, "unstakeINTERNAL", [lpAssetId, unstakeAmount, userAddress.bytes, lpAssetRecipientAddress.bytes], nil)
1617+ let unstakeInv = invoke(staking, "unstake", [toBase58String(lpAssetId), unstakeAmount], nil)
16201618 if ((unstakeInv == unstakeInv))
16211619 then {
1622- let $t05503055218 = getOneTknV2Internal(outAssetId, minOutAmount, [AttachedPayment(lpAssetId, unstakeAmount)], i.caller, i.originCaller, i.transactionId)
1623- let state = $t05503055218._1
1624- let totalAmount = $t05503055218._2
1620+ let $t05490355091 = getOneTknV2Internal(outAssetId, minOutAmount, [AttachedPayment(lpAssetId, unstakeAmount)], i.caller, i.originCaller, i.transactionId)
1621+ let state = $t05490355091._1
1622+ let totalAmount = $t05490355091._2
16251623 $Tuple2(state, totalAmount)
16261624 }
16271625 else throw("Strict value is not equal to itself.")
16281626 }
16291627 else throw("Strict value is not equal to itself.")
16301628 }
16311629
16321630
16331631
16341632 @Callable(i)
16351633 func putOneTknV2WithBonusREADONLY (paymentAmountRaw,paymentAssetId) = {
1636- let $t05534655449 = calcPutOneTkn(paymentAmountRaw, paymentAssetId, "", "", true)
1637- let lpAmount = $t05534655449._1
1638- let state = $t05534655449._2
1639- let feeAmount = $t05534655449._3
1640- let bonus = $t05534655449._4
1634+ let $t05521955322 = calcPutOneTkn(paymentAmountRaw, paymentAssetId, "", "", true)
1635+ let lpAmount = $t05521955322._1
1636+ let state = $t05521955322._2
1637+ let feeAmount = $t05521955322._3
1638+ let bonus = $t05521955322._4
16411639 $Tuple2(nil, $Tuple3(lpAmount, feeAmount, bonus))
16421640 }
16431641
16441642
16451643
16461644 @Callable(i)
16471645 func putOneTknV2WithoutTakeFeeREADONLY (paymentAmountRaw,paymentAssetId) = {
1648- let $t05559755701 = calcPutOneTkn(paymentAmountRaw, paymentAssetId, "", "", false)
1649- let lpAmount = $t05559755701._1
1650- let state = $t05559755701._2
1651- let feeAmount = $t05559755701._3
1652- let bonus = $t05559755701._4
1646+ let $t05547055574 = calcPutOneTkn(paymentAmountRaw, paymentAssetId, "", "", false)
1647+ let lpAmount = $t05547055574._1
1648+ let state = $t05547055574._2
1649+ let feeAmount = $t05547055574._3
1650+ let bonus = $t05547055574._4
16531651 $Tuple2(nil, $Tuple3(lpAmount, feeAmount, bonus))
16541652 }
16551653
16561654
16571655
16581656 @Callable(i)
16591657 func activate (amtAsStr,prAsStr) = if ((toString(i.caller) != toString(fca)))
16601658 then throw("denied")
16611659 else $Tuple2([StringEntry(aa(), amtAsStr), StringEntry(pa(), prAsStr)], "success")
16621660
16631661
16641662
16651663 @Callable(i)
16661664 func setS (k,v) = if ((toString(i.caller) != strf(this, ada())))
16671665 then pd
16681666 else [StringEntry(k, v)]
16691667
16701668
16711669
16721670 @Callable(i)
16731671 func setI (k,v) = if ((toString(i.caller) != strf(this, ada())))
16741672 then pd
16751673 else [IntegerEntry(k, v)]
16761674
16771675
16781676
16791677 @Callable(i)
16801678 func getPoolConfigWrapperREADONLY () = $Tuple2(nil, gpc())
16811679
16821680
16831681
16841682 @Callable(i)
16851683 func getAccBalanceWrapperREADONLY (assetId) = $Tuple2(nil, getAccBalance(assetId))
16861684
16871685
16881686
16891687 @Callable(i)
16901688 func calcPricesWrapperREADONLY (amAmt,prAmt,lpAmt) = {
16911689 let pr = calcPrices(amAmt, prAmt, lpAmt)
16921690 $Tuple2(nil, [toString(pr[0]), toString(pr[1]), toString(pr[2])])
16931691 }
16941692
16951693
16961694
16971695 @Callable(i)
16981696 func fromX18WrapperREADONLY (val,resScaleMult) = $Tuple2(nil, f1(parseBigIntValue(val), resScaleMult))
16991697
17001698
17011699
17021700 @Callable(i)
17031701 func toX18WrapperREADONLY (origVal,origScaleMult) = $Tuple2(nil, toString(t1(origVal, origScaleMult)))
17041702
17051703
17061704
17071705 @Callable(i)
17081706 func calcPriceBigIntWrapperREADONLY (prAmtX18,amAmtX18) = $Tuple2(nil, toString(cpbi(parseBigIntValue(prAmtX18), parseBigIntValue(amAmtX18))))
17091707
17101708
17111709
17121710 @Callable(i)
17131711 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, ""))
17141712
17151713
17161714
17171715 @Callable(i)
17181716 func estimateGetOperationWrapperREADONLY (txId58,pmtAsId,pmtLpAmt,usrAddr) = {
17191717 let r = ego(txId58, pmtAsId, pmtLpAmt, addressFromStringValue(usrAddr))
17201718 $Tuple2(nil, $Tuple10(r._1, r._2, r._3, r._4, r._5, r._6, r._7, toString(r._8), r._9, r._10))
17211719 }
17221720
17231721
17241722 @Verifier(tx)
17251723 func verify () = {
17261724 let targetPublicKey = match m() {
17271725 case pk: ByteVector =>
17281726 pk
17291727 case _: Unit =>
17301728 tx.senderPublicKey
17311729 case _ =>
17321730 throw("Match error")
17331731 }
17341732 match tx {
17351733 case order: Order =>
17361734 let matcherPub = mp()
1737- let $t05849358562 = validateMatcherOrderAllowed(order)
1738- let orderValid = $t05849358562._1
1739- let orderValidInfo = $t05849358562._2
1735+ let $t05836658435 = validateMatcherOrderAllowed(order)
1736+ let orderValid = $t05836658435._1
1737+ let orderValidInfo = $t05836658435._2
17401738 let senderValid = sigVerify(order.bodyBytes, order.proofs[0], order.senderPublicKey)
17411739 let matcherValid = sigVerify(order.bodyBytes, order.proofs[1], matcherPub)
17421740 if (if (if (orderValid)
17431741 then senderValid
17441742 else false)
17451743 then matcherValid
17461744 else false)
17471745 then true
17481746 else throwOrderError(orderValid, orderValidInfo, senderValid, matcherValid)
17491747 case s: SetScriptTransaction =>
17501748 if (sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey))
17511749 then true
17521750 else {
17531751 let newHash = blake2b256(value(s.script))
17541752 let allowedHash = fromBase64String(value(getString(fca, keyAllowedLpStableScriptHash())))
17551753 let currentHash = scriptHash(this)
17561754 if ((allowedHash == newHash))
17571755 then (currentHash != newHash)
17581756 else false
17591757 }
17601758 case _ =>
17611759 sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey)
17621760 }
17631761 }
17641762

github/deemru/w8io/169f3d6 
189.23 ms