tx · A11g2KZKrFVUaRkTBrXML2droNDVrLU2E94bthSVX56S

3MzKSdTH2jFbypLsoNfrH7QgkzSbx3EYwCA:  -0.03200000 Waves

2023.01.12 12:25 [2401548] smart account 3MzKSdTH2jFbypLsoNfrH7QgkzSbx3EYwCA > SELF 0.00000000 Waves

{ "type": 13, "id": "A11g2KZKrFVUaRkTBrXML2droNDVrLU2E94bthSVX56S", "fee": 3200000, "feeAssetId": null, "timestamp": 1673515554124, "version": 1, "sender": "3MzKSdTH2jFbypLsoNfrH7QgkzSbx3EYwCA", "senderPublicKey": "35yd3qw1gxKDxKwGAykHN9fANbXNWwseaUwbWDj24o3x", "proofs": [ "2RCDohghK3CWxumNAX9u9uUpTn4iPZ2neDy4NcLjVh4bMqyazpzbhijf5xfKxG769ekDdmzobgNXd5EV2ZV1pZrF" ], "script": "base64:BgK/IggCEgMKAQgSAwoBCBIAEgQKAgEEEgQKAgEEEgMKAQESABIECgIIARIECgIIARIECgIIARIECgIBARIDCgEBEgUKAwEBARIFCgMBCAESBAoCAQgSBAoCAQgSBAoCCAgSBAoCCAgSBAoCCAESABIDCgEIEgUKAwEBARIECgIIARIECgIBARIECgIICBILCgkIAQECAQIIBAQSBgoECAgBCCIGc2NhbGU4IgxzY2FsZThCaWdJbnQiB3NjYWxlMTgiCnplcm9CaWdJbnQiBGJpZzAiBGJpZzEiBGJpZzIiCnNsaXBwYWdlNEQiC3dhdmVzU3RyaW5nIgVBbXVsdCIFRGNvbnYiA1NFUCIFRU1QVFkiClBvb2xBY3RpdmUiClBvb2xQdXREaXMiDlBvb2xNYXRjaGVyRGlzIgxQb29sU2h1dGRvd24iDmlkeFBvb2xBZGRyZXNzIglpZHhQb29sU3QiCWlkeExQQXNJZCIJaWR4QW1Bc0lkIglpZHhQckFzSWQiC2lkeEFtdEFzRGNtIg1pZHhQcmljZUFzRGNtIgtpZHhJQW10QXNJZCINaWR4SVByaWNlQXNJZCIPaWR4RmFjdFN0YWtDbnRyIhJpZHhGYWN0b3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AAIBAgtNYXRjaCBlcnJvcgQCYXYFAmdPAwkAAQIFAmF2AgVPcmRlcgQCZHoFAmF2BAJnUgkBAmFKAAQCZ1MJAQJkeQEFAmR6BAJnVAkA9AMDCAUCZHoJYm9keUJ5dGVzCQCRAwIIBQJkegZwcm9vZnMAAAgFAmR6D3NlbmRlclB1YmxpY0tleQQCZ1UJAPQDAwgFAmR6CWJvZHlCeXRlcwkAkQMCCAUCZHoGcHJvb2ZzAAEFAmdSAwMDBQJnUwUCZ1QHBQJnVQcGCQECYXEDBQJnUwUCZ1QFAmdVAwkAAQIFAmF2AhRTZXRTY3JpcHRUcmFuc2FjdGlvbgQCZFoFAmF2BAJnVgkA9gMBCQEFdmFsdWUBCAUCZFoGc2NyaXB0BAJnVwkA2wQBCQEFdmFsdWUBCQCdCAIFAmFECQECYW8ABAJnWAkA8QcBBQR0aGlzAwMJAAACBQJnVwUCZ1YJAQIhPQIFAmdYBQJnVgcGCQD0AwMIBQJnTwlib2R5Qnl0ZXMJAJEDAggFAmdPBnByb29mcwAABQJnUQkA9AMDCAUCZ08JYm9keUJ5dGVzCQCRAwIIBQJnTwZwcm9vZnMAAAUCZ1GEykE/", "chainId": 84, "height": 2401548, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: DZx7tfgjUFPoyfZ7kyqETntiHayMTZyUThsP2mhQUno4 Next: ASAAGHZyM5rSntq681qtfsq8R4v3RaxqhPDdPQWKJPFe Diff:
OldNewDifferences
12261226 let staking = valueOrErrorMessage(addressFromString(factoryCfg[idxFactStakCntr]), "Wr st addr")
12271227 let userAddress = i.caller
12281228 let lpAssetRecipientAddress = this
1229- let unstakeInv = invoke(staking, "unstakeINTERNAL", [toBase58String(lpAssetId), unstakeAmount, userAddress.bytes, lpAssetRecipientAddress.bytes], nil)
1229+ let unstakeInv = invoke(staking, "unstakeINTERNAL", [lpAssetId, unstakeAmount, userAddress.bytes, lpAssetRecipientAddress.bytes], nil)
12301230 if ((unstakeInv == unstakeInv))
12311231 then {
1232- let $t04170041888 = getOneTknV2Internal(outAssetId, minOutAmount, [AttachedPayment(lpAssetId, unstakeAmount)], i.caller, i.originCaller, i.transactionId)
1233- let state = $t04170041888._1
1234- let totalAmount = $t04170041888._2
1232+ let $t04168341871 = getOneTknV2Internal(outAssetId, minOutAmount, [AttachedPayment(lpAssetId, unstakeAmount)], i.caller, i.originCaller, i.transactionId)
1233+ let state = $t04168341871._1
1234+ let totalAmount = $t04168341871._2
12351235 $Tuple2(state, totalAmount)
12361236 }
12371237 else throw("Strict value is not equal to itself.")
12471247 let amId = poolConfig[idxAmAsId]
12481248 let prId = poolConfig[idxPrAsId]
12491249 let lpId = poolConfig[idxLPAsId]
1250- let $t04214742250 = calcPutOneTkn(paymentAmountRaw, paymentAssetId, "", "", true)
1251- let lpAmount = $t04214742250._1
1252- let state = $t04214742250._2
1253- let feeAmount = $t04214742250._3
1254- let bonus = $t04214742250._4
1250+ let $t04213042233 = calcPutOneTkn(paymentAmountRaw, paymentAssetId, "", "", true)
1251+ let lpAmount = $t04213042233._1
1252+ let state = $t04213042233._2
1253+ let feeAmount = $t04213042233._3
1254+ let bonus = $t04213042233._4
12551255 $Tuple2(nil, $Tuple3(lpAmount, feeAmount, bonus))
12561256 }
12571257
12631263 let amId = poolConfig[idxAmAsId]
12641264 let prId = poolConfig[idxPrAsId]
12651265 let lpId = poolConfig[idxLPAsId]
1266- let $t04252942633 = calcPutOneTkn(paymentAmountRaw, paymentAssetId, "", "", false)
1267- let lpAmount = $t04252942633._1
1268- let state = $t04252942633._2
1269- let feeAmount = $t04252942633._3
1270- let bonus = $t04252942633._4
1266+ let $t04251242616 = calcPutOneTkn(paymentAmountRaw, paymentAssetId, "", "", false)
1267+ let lpAmount = $t04251242616._1
1268+ let state = $t04251242616._2
1269+ let feeAmount = $t04251242616._3
1270+ let bonus = $t04251242616._4
12711271 $Tuple2(nil, $Tuple3(lpAmount, feeAmount, bonus))
12721272 }
12731273
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 slippage4D = toBigInt((scale8 - ((scale8 * 1) / scale8)))
1919
2020 let wavesString = "WAVES"
2121
2222 let Amult = "100"
2323
2424 let Dconv = "1"
2525
2626 let SEP = "__"
2727
2828 let EMPTY = ""
2929
3030 let PoolActive = 1
3131
3232 let PoolPutDis = 2
3333
3434 let PoolMatcherDis = 3
3535
3636 let PoolShutdown = 4
3737
3838 let idxPoolAddress = 1
3939
4040 let idxPoolSt = 2
4141
4242 let idxLPAsId = 3
4343
4444 let idxAmAsId = 4
4545
4646 let idxPrAsId = 5
4747
4848 let idxAmtAsDcm = 6
4949
5050 let idxPriceAsDcm = 7
5151
5252 let idxIAmtAsId = 8
5353
5454 let idxIPriceAsId = 9
5555
5656 let idxFactStakCntr = 1
5757
5858 let idxFactoryRestCntr = 6
5959
6060 let idxFactSlippCntr = 7
6161
6262 let idxFactGwxRewCntr = 10
6363
6464 let feeDefault = fraction(10, scale8, 10000)
6565
6666 func t1 (origVal,origScaleMult) = fraction(toBigInt(origVal), scale18, toBigInt(origScaleMult))
6767
6868
6969 func f1 (val,resultScaleMult) = toInt(fraction(val, toBigInt(resultScaleMult), scale18))
7070
7171
7272 func ts (amt,resScale,curScale) = fraction(amt, resScale, curScale)
7373
7474
7575 func abs (val) = if ((zeroBigInt > val))
7676 then -(val)
7777 else val
7878
7979
8080 func absBigInt (val) = if ((zeroBigInt > val))
8181 then -(val)
8282 else val
8383
8484
8585 func fc () = "%s__factoryContract"
8686
8787
8888 func mpk () = "%s__managerPublicKey"
8989
9090
9191 func pmpk () = "%s__pendingManagerPublicKey"
9292
9393
9494 func pl () = "%s%s__price__last"
9595
9696
9797 func ph (h,t) = makeString(["%s%s%d%d__price__history", toString(h), toString(t)], SEP)
9898
9999
100100 func pau (ua,txId) = ((("%s%s%s__P__" + ua) + "__") + txId)
101101
102102
103103 func gau (ua,txId) = ((("%s%s%s__G__" + ua) + "__") + txId)
104104
105105
106106 func aa () = "%s__amountAsset"
107107
108108
109109 func pa () = "%s__priceAsset"
110110
111111
112112 func amp () = "%s__amp"
113113
114114
115115 func ada () = "%s__addonAddr"
116116
117117
118118 func fcfg () = "%s__factoryConfig"
119119
120120
121121 func mtpk () = "%s%s__matcher__publicKey"
122122
123123
124124 func pc (iAmtAs,iPrAs) = (((("%d%d%s__" + iAmtAs) + "__") + iPrAs) + "__config")
125125
126126
127127 func mba (bAStr) = ("%s%s%s__mappings__baseAsset2internalId__" + bAStr)
128128
129129
130130 func aps () = "%s__shutdown"
131131
132132
133133 func keyAllowedLpStableScriptHash () = "%s__allowedLpStableScriptHash"
134134
135135
136136 func keyFeeCollectorAddress () = "%s__feeCollectorAddress"
137137
138138
139139 func toe (orV,sendrV,matchV) = throw(((((("Failed: ordValid=" + toString(orV)) + " sndrValid=") + toString(sendrV)) + " mtchrValid=") + toString(matchV)))
140140
141141
142142 func str (val) = match val {
143143 case valStr: String =>
144144 valStr
145145 case _ =>
146146 throw("fail cast to String")
147147 }
148148
149149
150150 func strf (addr,key) = valueOrErrorMessage(getString(addr, key), makeString(["mandatory ", toString(addr), ".", key, " not defined"], ""))
151151
152152
153153 func intf (addr,key) = valueOrErrorMessage(getInteger(addr, key), makeString(["mandatory ", toString(addr), ".", key, " not defined"], ""))
154154
155155
156156 func throwErr (msg) = throw(makeString(["lp_stable.ride:", msg], " "))
157157
158158
159159 let fca = addressFromStringValue(strf(this, fc()))
160160
161161 let inFee = {
162162 let @ = invoke(fca, "getInFeeREADONLY", [toString(this)], nil)
163163 if ($isInstanceOf(@, "Int"))
164164 then @
165165 else throw(($getType(@) + " couldn't be cast to Int"))
166166 }
167167
168168 let outFee = {
169169 let @ = invoke(fca, "getOutFeeREADONLY", [toString(this)], nil)
170170 if ($isInstanceOf(@, "Int"))
171171 then @
172172 else throw(($getType(@) + " couldn't be cast to Int"))
173173 }
174174
175175 let A = strf(this, amp())
176176
177177 func igs () = valueOrElse(getBoolean(fca, aps()), false)
178178
179179
180180 func mp () = fromBase58String(strf(fca, mtpk()))
181181
182182
183183 let feeCollectorAddress = addressFromStringValue(strf(fca, keyFeeCollectorAddress()))
184184
185185 func gpc () = {
186186 let amtAs = strf(this, aa())
187187 let priceAs = strf(this, pa())
188188 let iPriceAs = intf(fca, mba(priceAs))
189189 let iAmtAs = intf(fca, mba(amtAs))
190190 split(strf(fca, pc(toString(iAmtAs), toString(iPriceAs))), SEP)
191191 }
192192
193193
194194 func parseAssetId (input) = if ((input == wavesString))
195195 then unit
196196 else fromBase58String(input)
197197
198198
199199 func assetIdToString (input) = if ((input == unit))
200200 then wavesString
201201 else toBase58String(value(input))
202202
203203
204204 func parsePoolConfig (poolConfig) = $Tuple7(addressFromStringValue(poolConfig[idxPoolAddress]), parseIntValue(poolConfig[idxPoolSt]), fromBase58String(poolConfig[idxLPAsId]), parseAssetId(poolConfig[idxAmAsId]), parseAssetId(poolConfig[idxPrAsId]), parseIntValue(poolConfig[idxAmtAsDcm]), parseIntValue(poolConfig[idxPriceAsDcm]))
205205
206206
207207 let poolConfigParsed = parsePoolConfig(gpc())
208208
209209 let $t069097095 = poolConfigParsed
210210
211211 let cfgPoolAddress = $t069097095._1
212212
213213 let cfgPoolStatus = $t069097095._2
214214
215215 let cfgLpAssetId = $t069097095._3
216216
217217 let cfgAmountAssetId = $t069097095._4
218218
219219 let cfgPriceAssetId = $t069097095._5
220220
221221 let cfgAmountAssetDecimals = $t069097095._6
222222
223223 let cfgPriceAssetDecimals = $t069097095._7
224224
225225 func gfc () = split(strf(fca, fcfg()), SEP)
226226
227227
228228 let factoryConfig = gfc()
229229
230230 let stakingContract = valueOrErrorMessage(addressFromString(factoryConfig[idxFactStakCntr]), "Invalid staking contract address")
231231
232232 let slipageContract = valueOrErrorMessage(addressFromString(factoryConfig[idxFactSlippCntr]), "Invalid slipage contract address")
233233
234234 let gwxContract = valueOrErrorMessage(addressFromString(factoryConfig[idxFactGwxRewCntr]), "Invalid gwx contract address")
235235
236236 let restContract = valueOrErrorMessage(addressFromString(factoryConfig[idxFactoryRestCntr]), "Invalid gwx contract address")
237237
238238 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)
239239
240240
241241 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)
242242
243243
244244 func getAccBalance (assetId) = if ((assetId == "WAVES"))
245245 then wavesBalance(this).available
246246 else assetBalance(this, fromBase58String(assetId))
247247
248248
249249 func cpbi (prAmtX18,amAmtX18) = fraction(prAmtX18, scale18, amAmtX18)
250250
251251
252252 func vad (A1,A2,slippage) = {
253253 let diff = fraction((A1 - A2), scale8BigInt, A2)
254254 let pass = ((slippage - abs(diff)) > zeroBigInt)
255255 if (!(pass))
256256 then throw(("Big slpg: " + toString(diff)))
257257 else $Tuple2(pass, min([A1, A2]))
258258 }
259259
260260
261261 func vd (D1,D0,slpg) = {
262262 let diff = fraction(D0, scale8BigInt, D1)
263263 let fail = (slpg > diff)
264264 if (if (fail)
265265 then true
266266 else (D0 > D1))
267267 then throw(((((((toString(D0) + " ") + toString(D1)) + " ") + toString(diff)) + " ") + toString(slpg)))
268268 else fail
269269 }
270270
271271
272272 func pcp (amAssetDcm,prAssetDcm,amAmt,prAmt) = {
273273 let amtAsAmtX18 = t1(amAmt, amAssetDcm)
274274 let prAsAmtX18 = t1(prAmt, prAssetDcm)
275275 cpbi(prAsAmtX18, amtAsAmtX18)
276276 }
277277
278278
279279 func calcPrices (amAmt,prAmt,lpAmt) = {
280280 let cfg = gpc()
281281 let amtAsDcm = parseIntValue(cfg[idxAmtAsDcm])
282282 let prAsDcm = parseIntValue(cfg[idxPriceAsDcm])
283283 let priceX18 = pcp(amtAsDcm, prAsDcm, amAmt, prAmt)
284284 let amAmtX18 = t1(amAmt, amtAsDcm)
285285 let prAmtX18 = t1(prAmt, prAsDcm)
286286 let lpAmtX18 = t1(lpAmt, scale8)
287287 let lpPrInAmAsX18 = cpbi(amAmtX18, lpAmtX18)
288288 let lpPrInPrAsX18 = cpbi(prAmtX18, lpAmtX18)
289289 [priceX18, lpPrInAmAsX18, lpPrInPrAsX18]
290290 }
291291
292292
293293 func calculatePrices (amAmt,prAmt,lpAmt) = {
294294 let p = calcPrices(amAmt, prAmt, lpAmt)
295295 [f1(p[0], scale8), f1(p[1], scale8), f1(p[2], scale8)]
296296 }
297297
298298
299299 func takeFee (amount,fee) = {
300300 let feeAmount = if ((fee == 0))
301301 then 0
302302 else fraction(amount, fee, scale8)
303303 $Tuple2((amount - feeAmount), feeAmount)
304304 }
305305
306306
307307 func ego (txId58,pmtAssetId,pmtLpAmt,userAddress) = {
308308 let cfg = gpc()
309309 let lpId = cfg[idxLPAsId]
310310 let amId = cfg[idxAmAsId]
311311 let prId = cfg[idxPrAsId]
312312 let amDcm = parseIntValue(cfg[idxAmtAsDcm])
313313 let prDcm = parseIntValue(cfg[idxPriceAsDcm])
314314 let sts = cfg[idxPoolSt]
315315 let lpEmiss = valueOrErrorMessage(assetInfo(fromBase58String(lpId)), "Wrong LP id").quantity
316316 if ((lpId != pmtAssetId))
317317 then throw("Wrong pmt asset")
318318 else {
319319 let amBalance = getAccBalance(amId)
320320 let amBalanceX18 = t1(amBalance, amDcm)
321321 let prBalance = getAccBalance(prId)
322322 let prBalanceX18 = t1(prBalance, prDcm)
323323 let curPriceX18 = cpbi(prBalanceX18, amBalanceX18)
324324 let curPrice = f1(curPriceX18, scale8)
325325 let pmtLpAmtX18 = t1(pmtLpAmt, scale8)
326326 let lpEmissX18 = t1(lpEmiss, scale8)
327327 let outAmAmtX18 = fraction(amBalanceX18, pmtLpAmtX18, lpEmissX18)
328328 let outPrAmtX18 = fraction(prBalanceX18, pmtLpAmtX18, lpEmissX18)
329329 let outAmAmt = f1(outAmAmtX18, amDcm)
330330 let outPrAmt = f1(outPrAmtX18, prDcm)
331331 let state = if ((txId58 == ""))
332332 then nil
333333 else [ScriptTransfer(userAddress, outAmAmt, if ((amId == "WAVES"))
334334 then unit
335335 else fromBase58String(amId)), ScriptTransfer(userAddress, outPrAmt, if ((prId == "WAVES"))
336336 then unit
337337 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)]
338338 $Tuple10(outAmAmt, outPrAmt, amId, prId, amBalance, prBalance, lpEmiss, curPriceX18, sts, state)
339339 }
340340 }
341341
342342
343343 func epo (txId58,slippage,inAmAmt,inAmId,inPrAmt,inPrId,userAddress,isEval,emitLp,isOneAsset,validateSlippage,pmtAmt,pmtId) = {
344344 let cfg = gpc()
345345 let lpId = fromBase58String(cfg[idxLPAsId])
346346 let amIdStr = cfg[idxAmAsId]
347347 let prIdStr = cfg[idxPrAsId]
348348 let inAmIdStr = cfg[idxIAmtAsId]
349349 let inPrIdStr = cfg[idxIPriceAsId]
350350 let amtDcm = parseIntValue(cfg[idxAmtAsDcm])
351351 let priceDcm = parseIntValue(cfg[idxPriceAsDcm])
352352 let sts = cfg[idxPoolSt]
353353 let lpEm = valueOrErrorMessage(assetInfo(lpId), "Wr lp as").quantity
354354 let amBalance = if (isEval)
355355 then getAccBalance(amIdStr)
356356 else if (if (isOneAsset)
357357 then (pmtId == amIdStr)
358358 else false)
359359 then (getAccBalance(amIdStr) - pmtAmt)
360360 else if (isOneAsset)
361361 then getAccBalance(amIdStr)
362362 else (getAccBalance(amIdStr) - inAmAmt)
363363 let prBalance = if (isEval)
364364 then getAccBalance(prIdStr)
365365 else if (if (isOneAsset)
366366 then (pmtId == prIdStr)
367367 else false)
368368 then (getAccBalance(prIdStr) - pmtAmt)
369369 else if (isOneAsset)
370370 then getAccBalance(prIdStr)
371371 else (getAccBalance(prIdStr) - inPrAmt)
372372 let inAmAssetAmtX18 = t1(inAmAmt, amtDcm)
373373 let inPrAssetAmtX18 = t1(inPrAmt, priceDcm)
374374 let userPriceX18 = cpbi(inPrAssetAmtX18, inAmAssetAmtX18)
375375 let amBalanceX18 = t1(amBalance, amtDcm)
376376 let prBalanceX18 = t1(prBalance, priceDcm)
377377 let r = if ((lpEm == 0))
378378 then {
379379 let curPriceX18 = zeroBigInt
380380 let slippageX18 = zeroBigInt
381381 let lpAmtX18 = pow((inAmAssetAmtX18 * inPrAssetAmtX18), 0, toBigInt(5), 1, 0, DOWN)
382382 $Tuple5(f1(lpAmtX18, scale8), f1(inAmAssetAmtX18, amtDcm), f1(inPrAssetAmtX18, priceDcm), cpbi((prBalanceX18 + inPrAssetAmtX18), (amBalanceX18 + inAmAssetAmtX18)), slippageX18)
383383 }
384384 else {
385385 let curPriceX18 = cpbi(prBalanceX18, amBalanceX18)
386386 let slippageRealX18 = fraction(abs((curPriceX18 - userPriceX18)), scale18, curPriceX18)
387387 let slippageX18 = t1(slippage, scale8)
388388 if (if (if (validateSlippage)
389389 then (curPriceX18 != zeroBigInt)
390390 else false)
391391 then (slippageRealX18 > slippageX18)
392392 else false)
393393 then throw(((("Price slippage " + toString(slippageRealX18)) + " > ") + toString(slippageX18)))
394394 else {
395395 let lpEmissionX18 = t1(lpEm, scale8)
396396 let prViaAmX18 = fraction(inAmAssetAmtX18, curPriceX18, scale18)
397397 let amViaPrX18 = fraction(inPrAssetAmtX18, scale18, curPriceX18)
398398 let expectedAmts = if ((prViaAmX18 > inPrAssetAmtX18))
399399 then $Tuple2(amViaPrX18, inPrAssetAmtX18)
400400 else $Tuple2(inAmAssetAmtX18, prViaAmX18)
401401 let expAmtAssetAmtX18 = expectedAmts._1
402402 let expPriceAssetAmtX18 = expectedAmts._2
403403 let lpAmtX18 = fraction(lpEmissionX18, expPriceAssetAmtX18, prBalanceX18)
404404 $Tuple5(f1(lpAmtX18, scale8), f1(expAmtAssetAmtX18, amtDcm), f1(expPriceAssetAmtX18, priceDcm), curPriceX18, slippageX18)
405405 }
406406 }
407407 let calcLpAmt = r._1
408408 let calcAmAssetPmt = r._2
409409 let calcPrAssetPmt = r._3
410410 let curPrice = f1(r._4, scale8)
411411 let slippageCalc = f1(r._5, scale8)
412412 if ((0 >= calcLpAmt))
413413 then throw("LP <= 0")
414414 else {
415415 let emitLpAmt = if (!(emitLp))
416416 then 0
417417 else calcLpAmt
418418 let amDiff = (inAmAmt - calcAmAssetPmt)
419419 let prDiff = (inPrAmt - calcPrAssetPmt)
420420 let $t01756217907 = if (if (isOneAsset)
421421 then (pmtId == amIdStr)
422422 else false)
423423 then $Tuple2(pmtAmt, 0)
424424 else if (if (isOneAsset)
425425 then (pmtId == prIdStr)
426426 else false)
427427 then $Tuple2(0, pmtAmt)
428428 else $Tuple2(calcAmAssetPmt, calcPrAssetPmt)
429429 let writeAmAmt = $t01756217907._1
430430 let writePrAmt = $t01756217907._2
431431 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))]
432432 $Tuple13(calcLpAmt, emitLpAmt, curPrice, amBalance, prBalance, lpEm, lpId, sts, commonState, amDiff, prDiff, inAmId, inPrId)
433433 }
434434 }
435435
436436
437437 func moa (order) = {
438438 let cfg = gpc()
439439 let amtAsId = cfg[idxAmAsId]
440440 let prAsId = cfg[idxPrAsId]
441441 let sts = parseIntValue(cfg[idxPoolSt])
442442 let amtAsDcm = parseIntValue(cfg[idxAmtAsDcm])
443443 let prAsDcm = parseIntValue(cfg[idxPriceAsDcm])
444444 let accAmtAsBalance = getAccBalance(amtAsId)
445445 let accPrAsBalance = getAccBalance(prAsId)
446446 let curPriceX18 = if ((order.orderType == Buy))
447447 then pcp(amtAsDcm, prAsDcm, (accAmtAsBalance + order.amount), accPrAsBalance)
448448 else pcp(amtAsDcm, prAsDcm, (accAmtAsBalance - order.amount), accPrAsBalance)
449449 let curPrice = f1(curPriceX18, scale8)
450450 if (if (if (igs())
451451 then true
452452 else (sts == PoolMatcherDis))
453453 then true
454454 else (sts == PoolShutdown))
455455 then throw("Admin blocked")
456456 else {
457457 let orAmtAsset = order.assetPair.amountAsset
458458 let orAmtAsStr = if ((orAmtAsset == unit))
459459 then "WAVES"
460460 else toBase58String(value(orAmtAsset))
461461 let orPrAsset = order.assetPair.priceAsset
462462 let orPrAsStr = if ((orPrAsset == unit))
463463 then "WAVES"
464464 else toBase58String(value(orPrAsset))
465465 if (if ((orAmtAsStr != amtAsId))
466466 then true
467467 else (orPrAsStr != prAsId))
468468 then throw("Wr assets")
469469 else {
470470 let orderPrice = order.price
471471 let priceDcm = fraction(scale8, prAsDcm, amtAsDcm)
472472 let castOrderPrice = ts(orderPrice, scale8, priceDcm)
473473 let isOrderPriceValid = if ((order.orderType == Buy))
474474 then (curPrice >= castOrderPrice)
475475 else (castOrderPrice >= curPrice)
476476 true
477477 }
478478 }
479479 }
480480
481481
482482 func cg (i) = if ((size(i.payments) != 1))
483483 then throw("1 pmnt exp")
484484 else {
485485 let pmt = value(i.payments[0])
486486 let pmtAssetId = value(pmt.assetId)
487487 let pmtAmt = pmt.amount
488488 let r = ego(toBase58String(i.transactionId), toBase58String(pmtAssetId), pmtAmt, i.caller)
489489 let outAmAmt = r._1
490490 let outPrAmt = r._2
491491 let sts = parseIntValue(r._9)
492492 let state = r._10
493493 if (if (igs())
494494 then true
495495 else (sts == PoolShutdown))
496496 then throw(("Admin blocked: " + toString(sts)))
497497 else $Tuple5(outAmAmt, outPrAmt, pmtAmt, pmtAssetId, state)
498498 }
499499
500500
501501 func cp (caller,txId,amAsPmt,prAsPmt,slippage,emitLp,isOneAsset,validateSlippage,pmtAmt,pmtId) = {
502502 let r = epo(txId, slippage, value(amAsPmt).amount, value(amAsPmt).assetId, value(prAsPmt).amount, value(prAsPmt).assetId, caller, (txId == ""), emitLp, isOneAsset, validateSlippage, pmtAmt, pmtId)
503503 let sts = parseIntValue(r._8)
504504 if (if (if (igs())
505505 then true
506506 else (sts == PoolPutDis))
507507 then true
508508 else (sts == PoolShutdown))
509509 then throw(("Blocked:" + toString(sts)))
510510 else r
511511 }
512512
513513
514514 func getD (xp) = {
515515 let n = big2
516516 let xp0 = xp[0]
517517 let xp1 = xp[1]
518518 let aPrecision = parseBigIntValue(Amult)
519519 let a = (parseBigIntValue(A) * aPrecision)
520520 let s = (xp0 + xp1)
521521 if ((s == big0))
522522 then big0
523523 else {
524524 let ann = (a * n)
525525 let xp0_xp1_n_n = (((xp0 * xp1) * n) * n)
526526 let ann_s_aPrecision = ((ann * s) / aPrecision)
527527 let ann_aPrecision = (ann - aPrecision)
528528 let n1 = (n + big1)
529529 func calc (acc,cur) = {
530530 let $t02245922479 = acc
531531 let d = $t02245922479._1
532532 let found = $t02245922479._2
533533 if ((found != unit))
534534 then acc
535535 else {
536536 let dp = (((d * d) * d) / xp0_xp1_n_n)
537537 let dNext = (((ann_s_aPrecision + (dp * n)) * d) / (((ann_aPrecision * d) / aPrecision) + (n1 * dp)))
538538 let dDiff = absBigInt((dNext - value(d)))
539539 if ((big1 >= dDiff))
540540 then $Tuple2(dNext, cur)
541541 else $Tuple2(dNext, unit)
542542 }
543543 }
544544
545545 let arr = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
546546 let $t02290022947 = {
547547 let $l = arr
548548 let $s = size($l)
549549 let $acc0 = $Tuple2(s, unit)
550550 func $f0_1 ($a,$i) = if (($i >= $s))
551551 then $a
552552 else calc($a, $l[$i])
553553
554554 func $f0_2 ($a,$i) = if (($i >= $s))
555555 then $a
556556 else throw("List size exceeds 15")
557557
558558 $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)
559559 }
560560 let d = $t02290022947._1
561561 let found = $t02290022947._2
562562 if ((found != unit))
563563 then d
564564 else throw(("D calculation error, D = " + toString(d)))
565565 }
566566 }
567567
568568
569569 func getYD (xp,i,D) = {
570570 let n = big2
571571 let x = xp[if ((i == 0))
572572 then 1
573573 else 0]
574574 let aPrecision = parseBigIntValue(Amult)
575575 let a = (parseBigIntValue(A) * aPrecision)
576576 let s = x
577577 let ann = (a * n)
578578 let c = (((((D * D) / (x * n)) * D) * aPrecision) / (ann * n))
579579 let b = ((s + ((D * aPrecision) / ann)) - D)
580580 func calc (acc,cur) = {
581581 let $t02344723467 = acc
582582 let y = $t02344723467._1
583583 let found = $t02344723467._2
584584 if ((found != unit))
585585 then acc
586586 else {
587587 let yNext = (((y * y) + c) / ((big2 * y) + b))
588588 let yDiff = absBigInt((yNext - value(y)))
589589 if ((big1 >= yDiff))
590590 then $Tuple2(yNext, cur)
591591 else $Tuple2(yNext, unit)
592592 }
593593 }
594594
595595 let arr = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
596596 let $t02377423821 = {
597597 let $l = arr
598598 let $s = size($l)
599599 let $acc0 = $Tuple2(D, unit)
600600 func $f0_1 ($a,$i) = if (($i >= $s))
601601 then $a
602602 else calc($a, $l[$i])
603603
604604 func $f0_2 ($a,$i) = if (($i >= $s))
605605 then $a
606606 else throw("List size exceeds 15")
607607
608608 $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)
609609 }
610610 let y = $t02377423821._1
611611 let found = $t02377423821._2
612612 if ((found != unit))
613613 then y
614614 else throw(("Y calculation error, Y = " + toString(y)))
615615 }
616616
617617
618618 func calcPutOneTkn (pmtAmtRaw,pmtAssetId,userAddress,txId,withTakeFee) = {
619619 let poolConfig = gpc()
620620 let amId = poolConfig[idxAmAsId]
621621 let prId = poolConfig[idxPrAsId]
622622 let lpId = poolConfig[idxLPAsId]
623623 let amtDcm = parseIntValue(poolConfig[idxAmtAsDcm])
624624 let priceDcm = parseIntValue(poolConfig[idxPriceAsDcm])
625625 let lpAssetEmission = toBigInt(valueOrErrorMessage(assetInfo(fromBase58String(lpId)), "invalid lp asset").quantity)
626626 let chechEmission = if ((lpAssetEmission > big0))
627627 then true
628628 else throw("initial deposit requires all coins")
629629 if ((chechEmission == chechEmission))
630630 then {
631631 let amBalance = getAccBalance(amId)
632632 let prBalance = getAccBalance(prId)
633633 let $t02460425066 = if ((txId == ""))
634634 then $Tuple2(amBalance, prBalance)
635635 else if ((pmtAssetId == amId))
636636 then if ((pmtAmtRaw > amBalance))
637637 then throw("invalid payment amount")
638638 else $Tuple2((amBalance - pmtAmtRaw), prBalance)
639639 else if ((pmtAssetId == prId))
640640 then if ((pmtAmtRaw > prBalance))
641641 then throw("invalid payment amount")
642642 else $Tuple2(amBalance, (prBalance - pmtAmtRaw))
643643 else throw("wrong pmtAssetId")
644644 let amBalanceOld = $t02460425066._1
645645 let prBalanceOld = $t02460425066._2
646646 let $t02507225248 = if ((pmtAssetId == amId))
647647 then $Tuple2(pmtAmtRaw, 0)
648648 else if ((pmtAssetId == prId))
649649 then $Tuple2(0, pmtAmtRaw)
650650 else throw("invalid payment")
651651 let amAmountRaw = $t02507225248._1
652652 let prAmountRaw = $t02507225248._2
653653 let $t02525225506 = if (withTakeFee)
654654 then $Tuple3(takeFee(amAmountRaw, inFee)._1, takeFee(prAmountRaw, inFee)._1, takeFee(pmtAmtRaw, inFee)._2)
655655 else $Tuple3(amAmountRaw, prAmountRaw, 0)
656656 let amAmount = $t02525225506._1
657657 let prAmount = $t02525225506._2
658658 let feeAmount = $t02525225506._3
659659 let amBalanceNew = (amBalanceOld + amAmount)
660660 let prBalanceNew = (prBalanceOld + prAmount)
661661 let D0 = getD([toBigInt(amBalanceOld), toBigInt(prBalanceOld)])
662662 let D1 = getD([toBigInt(amBalanceNew), toBigInt(prBalanceNew)])
663663 let checkD = if ((D1 > D0))
664664 then true
665665 else throw()
666666 if ((checkD == checkD))
667667 then {
668668 let lpAmount = fraction(lpAssetEmission, (D1 - D0), D0)
669669 let curPrice = f1(cpbi(t1(prBalanceNew, priceDcm), t1(amBalanceNew, amtDcm)), scale8)
670670 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))]
671671 let poolProportion = fraction(prBalanceOld, scale8, amBalanceOld)
672672 let amountAssetPart = fraction(pmtAmtRaw, scale8, (poolProportion + scale8))
673673 let priceAssetPart = (pmtAmtRaw - amountAssetPart)
674674 let lpAmtBoth = fraction(lpAssetEmission, toBigInt(priceAssetPart), toBigInt(prBalanceOld))
675675 let bonus = toInt(fraction((lpAmount - lpAmtBoth), scale8BigInt, lpAmtBoth))
676676 $Tuple4(toInt(lpAmount), commonState, feeAmount, bonus)
677677 }
678678 else throw("Strict value is not equal to itself.")
679679 }
680680 else throw("Strict value is not equal to itself.")
681681 }
682682
683683
684684 func getOneTknV2Internal (outAssetId,minOutAmount,payments,caller,originCaller,transactionId) = {
685685 let poolConfig = gpc()
686686 let lpId = poolConfig[idxLPAsId]
687687 let amId = poolConfig[idxAmAsId]
688688 let prId = poolConfig[idxPrAsId]
689689 let amDecimals = parseIntValue(poolConfig[idxAmtAsDcm])
690690 let prDecimals = parseIntValue(poolConfig[idxPriceAsDcm])
691691 let poolStatus = poolConfig[idxPoolSt]
692692 let userAddress = if ((caller == restContract))
693693 then originCaller
694694 else caller
695695 let pmt = value(payments[0])
696696 let pmtAssetId = value(pmt.assetId)
697697 let pmtAmt = pmt.amount
698698 let txId58 = toBase58String(transactionId)
699699 if ((lpId != toBase58String(pmtAssetId)))
700700 then throw("Wrong LP")
701701 else {
702702 let amBalance = getAccBalance(amId)
703703 let prBalance = getAccBalance(prId)
704704 let $t02750827619 = {
705705 let @ = invoke(this, "getOneTknV2READONLY", [outAssetId, pmtAmt], nil)
706706 if ($isInstanceOf(@, "(Int, Int)"))
707707 then @
708708 else throw(($getType(@) + " couldn't be cast to (Int, Int)"))
709709 }
710710 if (($t02750827619 == $t02750827619))
711711 then {
712712 let feeAmount = $t02750827619._2
713713 let totalGet = $t02750827619._1
714714 let totalAmount = if (if ((minOutAmount > 0))
715715 then (minOutAmount > totalGet)
716716 else false)
717717 then throwErr(makeString(["amount to receive is less than ", toString(minOutAmount)], ""))
718718 else totalGet
719719 let $t02780928116 = if ((outAssetId == amId))
720720 then $Tuple4(totalAmount, 0, ((amBalance - totalAmount) - feeAmount), prBalance)
721721 else if ((outAssetId == prId))
722722 then $Tuple4(0, totalAmount, amBalance, ((prBalance - totalAmount) - feeAmount))
723723 else throw("invalid out asset id")
724724 let outAm = $t02780928116._1
725725 let outPr = $t02780928116._2
726726 let amBalanceNew = $t02780928116._3
727727 let prBalanceNew = $t02780928116._4
728728 let curPrX18 = cpbi(t1(prBalanceNew, prDecimals), t1(amBalanceNew, amDecimals))
729729 let curPr = f1(curPrX18, scale8)
730730 let outAssetIdOrWaves = if ((outAssetId == "WAVES"))
731731 then unit
732732 else fromBase58String(outAssetId)
733733 let sendFeeToMatcher = if ((feeAmount > 0))
734734 then [ScriptTransfer(feeCollectorAddress, feeAmount, outAssetIdOrWaves)]
735735 else nil
736736 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)
737737 if ((state == state))
738738 then {
739739 let burn = invoke(fca, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
740740 if ((burn == burn))
741741 then $Tuple2(state, totalAmount)
742742 else throw("Strict value is not equal to itself.")
743743 }
744744 else throw("Strict value is not equal to itself.")
745745 }
746746 else throw("Strict value is not equal to itself.")
747747 }
748748 }
749749
750750
751751 func m () = match getString(mpk()) {
752752 case s: String =>
753753 fromBase58String(s)
754754 case _: Unit =>
755755 unit
756756 case _ =>
757757 throw("Match error")
758758 }
759759
760760
761761 func pm () = match getString(pmpk()) {
762762 case s: String =>
763763 fromBase58String(s)
764764 case _: Unit =>
765765 unit
766766 case _ =>
767767 throw("Match error")
768768 }
769769
770770
771771 let pd = throw("Permission denied")
772772
773773 func isManager (i) = match m() {
774774 case pk: ByteVector =>
775775 (i.callerPublicKey == pk)
776776 case _: Unit =>
777777 (i.caller == this)
778778 case _ =>
779779 throw("Match error")
780780 }
781781
782782
783783 func mm (i) = match m() {
784784 case pk: ByteVector =>
785785 if ((i.callerPublicKey == pk))
786786 then true
787787 else pd
788788 case _: Unit =>
789789 if ((i.caller == this))
790790 then true
791791 else pd
792792 case _ =>
793793 throw("Match error")
794794 }
795795
796796
797797 @Callable(i)
798798 func constructor (fc) = {
799799 let c = mm(i)
800800 if ((c == c))
801801 then [StringEntry(fc(), fc)]
802802 else throw("Strict value is not equal to itself.")
803803 }
804804
805805
806806
807807 @Callable(i)
808808 func setManager (pendingManagerPublicKey) = {
809809 let c = mm(i)
810810 if ((c == c))
811811 then {
812812 let cm = fromBase58String(pendingManagerPublicKey)
813813 if ((cm == cm))
814814 then [StringEntry(pmpk(), pendingManagerPublicKey)]
815815 else throw("Strict value is not equal to itself.")
816816 }
817817 else throw("Strict value is not equal to itself.")
818818 }
819819
820820
821821
822822 @Callable(i)
823823 func confirmManager () = {
824824 let p = pm()
825825 let hpm = if (isDefined(p))
826826 then true
827827 else throw("No pending manager")
828828 if ((hpm == hpm))
829829 then {
830830 let cpm = if ((i.callerPublicKey == value(p)))
831831 then true
832832 else throw("You are not pending manager")
833833 if ((cpm == cpm))
834834 then [StringEntry(mpk(), toBase58String(value(p))), DeleteEntry(pmpk())]
835835 else throw("Strict value is not equal to itself.")
836836 }
837837 else throw("Strict value is not equal to itself.")
838838 }
839839
840840
841841
842842 @Callable(i)
843843 func put (slip,autoStake) = {
844844 let factCfg = gfc()
845845 let stakingCntr = valueOrErrorMessage(addressFromString(factCfg[idxFactStakCntr]), "Wr st addr")
846846 let slipCntr = valueOrErrorMessage(addressFromString(factCfg[idxFactSlippCntr]), "Wr sl addr")
847847 if ((0 > slip))
848848 then throw("Wrong slippage")
849849 else if ((size(i.payments) != 2))
850850 then throw("2 pmnts expd")
851851 else {
852852 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, "")
853853 let emitLpAmt = e._2
854854 let lpAssetId = e._7
855855 let state = e._9
856856 let amDiff = e._10
857857 let prDiff = e._11
858858 let amId = e._12
859859 let prId = e._13
860860 let r = invoke(fca, "emit", [emitLpAmt], nil)
861861 if ((r == r))
862862 then {
863863 let el = match r {
864864 case legacy: Address =>
865865 invoke(legacy, "emit", [emitLpAmt], nil)
866866 case _ =>
867867 unit
868868 }
869869 if ((el == el))
870870 then {
871871 let sa = if ((amDiff > 0))
872872 then invoke(slipCntr, "put", nil, [AttachedPayment(amId, amDiff)])
873873 else nil
874874 if ((sa == sa))
875875 then {
876876 let sp = if ((prDiff > 0))
877877 then invoke(slipCntr, "put", nil, [AttachedPayment(prId, prDiff)])
878878 else nil
879879 if ((sp == sp))
880880 then {
881881 let lpTrnsfr = if (autoStake)
882882 then {
883883 let ss = invoke(stakingCntr, "stake", nil, [AttachedPayment(lpAssetId, emitLpAmt)])
884884 if ((ss == ss))
885885 then nil
886886 else throw("Strict value is not equal to itself.")
887887 }
888888 else [ScriptTransfer(i.caller, emitLpAmt, lpAssetId)]
889889 (state ++ lpTrnsfr)
890890 }
891891 else throw("Strict value is not equal to itself.")
892892 }
893893 else throw("Strict value is not equal to itself.")
894894 }
895895 else throw("Strict value is not equal to itself.")
896896 }
897897 else throw("Strict value is not equal to itself.")
898898 }
899899 }
900900
901901
902902
903903 @Callable(i)
904904 func putOneTknV2 (minOutAmount,autoStake) = {
905905 let isPoolOneTokenOperationsDisabled = {
906906 let @ = invoke(fca, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
907907 if ($isInstanceOf(@, "Boolean"))
908908 then @
909909 else throw(($getType(@) + " couldn't be cast to Boolean"))
910910 }
911911 let isPutDisabled = if (if (if (igs())
912912 then true
913913 else (cfgPoolStatus == PoolPutDis))
914914 then true
915915 else (cfgPoolStatus == PoolShutdown))
916916 then true
917917 else isPoolOneTokenOperationsDisabled
918918 let checks = [if (if (!(isPutDisabled))
919919 then true
920920 else isManager(i))
921921 then true
922922 else throwErr("put operation is blocked by admin"), if ((size(i.payments) == 1))
923923 then true
924924 else throwErr("exactly 1 payment are expected")]
925925 if ((checks == checks))
926926 then {
927927 let poolConfig = gpc()
928928 let amId = poolConfig[idxAmAsId]
929929 let prId = poolConfig[idxPrAsId]
930930 let lpId = fromBase58String(poolConfig[idxLPAsId])
931931 let amDecimals = parseIntValue(poolConfig[idxAmtAsDcm])
932932 let prDecimals = parseIntValue(poolConfig[idxPriceAsDcm])
933933 let userAddress = if ((i.caller == this))
934934 then i.originCaller
935935 else i.caller
936936 let pmt = value(i.payments[0])
937937 let pmtAssetId = toBase58String(value(pmt.assetId))
938938 let pmtAmt = pmt.amount
939939 let $t03347833636 = calcPutOneTkn(pmtAmt, pmtAssetId, toString(userAddress), toBase58String(i.transactionId), true)
940940 if (($t03347833636 == $t03347833636))
941941 then {
942942 let feeAmount = $t03347833636._3
943943 let state = $t03347833636._2
944944 let estimLP = $t03347833636._1
945945 let emitLpAmt = if (if ((minOutAmount > 0))
946946 then (minOutAmount > estimLP)
947947 else false)
948948 then throwErr(makeString(["amount to receive is less than ", toString(minOutAmount)], ""))
949949 else estimLP
950950 let e = invoke(fca, "emit", [emitLpAmt], nil)
951951 if ((e == e))
952952 then {
953953 let el = match e {
954954 case legacy: Address =>
955955 invoke(legacy, "emit", [emitLpAmt], nil)
956956 case _ =>
957957 unit
958958 }
959959 if ((el == el))
960960 then {
961961 let lpTrnsfr = if (autoStake)
962962 then {
963963 let ss = invoke(stakingContract, "stake", nil, [AttachedPayment(lpId, emitLpAmt)])
964964 if ((ss == ss))
965965 then nil
966966 else throw("Strict value is not equal to itself.")
967967 }
968968 else [ScriptTransfer(i.caller, emitLpAmt, lpId)]
969969 let sendFeeToMatcher = if ((feeAmount > 0))
970970 then [ScriptTransfer(feeCollectorAddress, feeAmount, fromBase58String(pmtAssetId))]
971971 else nil
972972 $Tuple2(((state ++ lpTrnsfr) ++ sendFeeToMatcher), emitLpAmt)
973973 }
974974 else throw("Strict value is not equal to itself.")
975975 }
976976 else throw("Strict value is not equal to itself.")
977977 }
978978 else throw("Strict value is not equal to itself.")
979979 }
980980 else throw("Strict value is not equal to itself.")
981981 }
982982
983983
984984
985985 @Callable(i)
986986 func putForFree (maxSlpg) = if ((0 > maxSlpg))
987987 then throw("Wrong slpg")
988988 else if ((size(i.payments) != 2))
989989 then throw("2 pmnts expd")
990990 else {
991991 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, "")
992992 estPut._9
993993 }
994994
995995
996996
997997 @Callable(i)
998998 func get () = {
999999 let r = cg(i)
10001000 let outAmtAmt = r._1
10011001 let outPrAmt = r._2
10021002 let pmtAmt = r._3
10031003 let pmtAssetId = r._4
10041004 let state = r._5
10051005 let b = invoke(fca, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
10061006 if ((b == b))
10071007 then state
10081008 else throw("Strict value is not equal to itself.")
10091009 }
10101010
10111011
10121012
10131013 @Callable(i)
10141014 func getOneTknV2 (outAssetId,minOutAmount) = {
10151015 let isPoolOneTokenOperationsDisabled = {
10161016 let @ = invoke(fca, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
10171017 if ($isInstanceOf(@, "Boolean"))
10181018 then @
10191019 else throw(($getType(@) + " couldn't be cast to Boolean"))
10201020 }
10211021 let isGetDisabled = if (if (igs())
10221022 then true
10231023 else (cfgPoolStatus == PoolShutdown))
10241024 then true
10251025 else isPoolOneTokenOperationsDisabled
10261026 let checks = [if (if (!(isGetDisabled))
10271027 then true
10281028 else isManager(i))
10291029 then true
10301030 else throwErr("get operation is blocked by admin"), if ((size(i.payments) == 1))
10311031 then true
10321032 else throwErr("exactly 1 payment are expected")]
10331033 if ((checks == checks))
10341034 then {
10351035 let $t03625836413 = getOneTknV2Internal(outAssetId, minOutAmount, i.payments, i.caller, i.originCaller, i.transactionId)
10361036 let state = $t03625836413._1
10371037 let totalAmount = $t03625836413._2
10381038 $Tuple2(state, totalAmount)
10391039 }
10401040 else throw("Strict value is not equal to itself.")
10411041 }
10421042
10431043
10441044
10451045 @Callable(i)
10461046 func getOneTknV2READONLY (outAssetId,lpAssetAmount) = {
10471047 let poolConfig = gpc()
10481048 let amId = poolConfig[idxAmAsId]
10491049 let prId = poolConfig[idxPrAsId]
10501050 let lpId = poolConfig[idxLPAsId]
10511051 let xp = [toBigInt(getAccBalance(amId)), toBigInt(getAccBalance(prId))]
10521052 let lpEmission = toBigInt(valueOrErrorMessage(assetInfo(fromBase58String(lpId)), "invalid lp asset").quantity)
10531053 let D0 = getD(xp)
10541054 let D1 = (D0 - fraction(toBigInt(lpAssetAmount), D0, lpEmission))
10551055 let index = if ((outAssetId == amId))
10561056 then 0
10571057 else if ((outAssetId == prId))
10581058 then 1
10591059 else throw("invalid out asset id")
10601060 let newY = getYD(xp, index, D1)
10611061 let dy = (xp[index] - newY)
10621062 let totalGetRaw = max([0, toInt((dy - big1))])
10631063 let $t03720337258 = takeFee(totalGetRaw, outFee)
10641064 let totalGet = $t03720337258._1
10651065 let feeAmount = $t03720337258._2
10661066 $Tuple2(nil, $Tuple2(totalGet, feeAmount))
10671067 }
10681068
10691069
10701070
10711071 @Callable(i)
10721072 func getOneTknV2WithBonusREADONLY (outAssetId,lpAssetAmount) = {
10731073 let poolConfig = gpc()
10741074 let amId = poolConfig[idxAmAsId]
10751075 let prId = poolConfig[idxPrAsId]
10761076 let lpId = poolConfig[idxLPAsId]
10771077 let amBalance = getAccBalance(amId)
10781078 let prBalance = getAccBalance(prId)
10791079 let $t03760337718 = {
10801080 let @ = invoke(this, "getOneTknV2READONLY", [outAssetId, lpAssetAmount], nil)
10811081 if ($isInstanceOf(@, "(Int, Int)"))
10821082 then @
10831083 else throw(($getType(@) + " couldn't be cast to (Int, Int)"))
10841084 }
10851085 let totalGet = $t03760337718._1
10861086 let feeAmount = $t03760337718._2
10871087 let r = ego("", lpId, lpAssetAmount, this)
10881088 let outAmAmt = r._1
10891089 let outPrAmt = r._2
10901090 let sumOfGetAssets = (outAmAmt + outPrAmt)
10911091 let bonus = if ((sumOfGetAssets == 0))
10921092 then if ((totalGet == 0))
10931093 then 0
10941094 else throw("bonus calculation error")
10951095 else fraction((totalGet - sumOfGetAssets), scale8, sumOfGetAssets)
10961096 $Tuple2(nil, $Tuple3(totalGet, feeAmount, bonus))
10971097 }
10981098
10991099
11001100
11011101 @Callable(i)
11021102 func getNoLess (noLessThenAmtAsset,noLessThenPriceAsset) = {
11031103 let r = cg(i)
11041104 let outAmAmt = r._1
11051105 let outPrAmt = r._2
11061106 let pmtAmt = r._3
11071107 let pmtAssetId = r._4
11081108 let state = r._5
11091109 if ((noLessThenAmtAsset > outAmAmt))
11101110 then throw(((("Failed: " + toString(outAmAmt)) + " < ") + toString(noLessThenAmtAsset)))
11111111 else if ((noLessThenPriceAsset > outPrAmt))
11121112 then throw(((("Failed: " + toString(outPrAmt)) + " < ") + toString(noLessThenPriceAsset)))
11131113 else {
11141114 let burnLPAssetOnFactory = invoke(fca, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
11151115 if ((burnLPAssetOnFactory == burnLPAssetOnFactory))
11161116 then state
11171117 else throw("Strict value is not equal to itself.")
11181118 }
11191119 }
11201120
11211121
11221122
11231123 @Callable(i)
11241124 func unstakeAndGet (amount) = {
11251125 let checkPayments = if ((size(i.payments) != 0))
11261126 then throw("No pmnts expd")
11271127 else true
11281128 if ((checkPayments == checkPayments))
11291129 then {
11301130 let cfg = gpc()
11311131 let factoryCfg = gfc()
11321132 let lpAssetId = fromBase58String(cfg[idxLPAsId])
11331133 let staking = valueOrErrorMessage(addressFromString(factoryCfg[idxFactStakCntr]), "Wr st addr")
11341134 let unstakeInv = invoke(staking, "unstake", [toBase58String(lpAssetId), amount], nil)
11351135 if ((unstakeInv == unstakeInv))
11361136 then {
11371137 let r = ego(toBase58String(i.transactionId), toBase58String(lpAssetId), amount, i.caller)
11381138 let sts = parseIntValue(r._9)
11391139 let state = r._10
11401140 let v = if (if (igs())
11411141 then true
11421142 else (sts == PoolShutdown))
11431143 then throw(("Blocked: " + toString(sts)))
11441144 else true
11451145 if ((v == v))
11461146 then {
11471147 let burnA = invoke(fca, "burn", [amount], [AttachedPayment(lpAssetId, amount)])
11481148 if ((burnA == burnA))
11491149 then state
11501150 else throw("Strict value is not equal to itself.")
11511151 }
11521152 else throw("Strict value is not equal to itself.")
11531153 }
11541154 else throw("Strict value is not equal to itself.")
11551155 }
11561156 else throw("Strict value is not equal to itself.")
11571157 }
11581158
11591159
11601160
11611161 @Callable(i)
11621162 func unstakeAndGetNoLess (unstakeAmount,noLessThenAmountAsset,noLessThenPriceAsset) = {
11631163 let isGetDisabled = if (igs())
11641164 then true
11651165 else (cfgPoolStatus == PoolShutdown)
11661166 let checks = [if (!(isGetDisabled))
11671167 then true
11681168 else throw("get operation is blocked by admin"), if ((size(i.payments) == 0))
11691169 then true
11701170 else throw("no payments are expected")]
11711171 if ((checks == checks))
11721172 then {
11731173 let unstakeInv = invoke(stakingContract, "unstake", [toBase58String(cfgLpAssetId), unstakeAmount], nil)
11741174 if ((unstakeInv == unstakeInv))
11751175 then {
11761176 let res = ego(toBase58String(i.transactionId), toBase58String(cfgLpAssetId), unstakeAmount, i.caller)
11771177 let outAmAmt = res._1
11781178 let outPrAmt = res._2
11791179 let state = res._10
11801180 let checkAmounts = [if ((outAmAmt >= noLessThenAmountAsset))
11811181 then true
11821182 else throw(makeString(["amount asset amount to receive is less than ", toString(noLessThenAmountAsset)], "")), if ((outPrAmt >= noLessThenPriceAsset))
11831183 then true
11841184 else throw(makeString(["price asset amount to receive is less than ", toString(noLessThenPriceAsset)], ""))]
11851185 if ((checkAmounts == checkAmounts))
11861186 then {
11871187 let burnLPAssetOnFactory = invoke(fca, "burn", [unstakeAmount], [AttachedPayment(cfgLpAssetId, unstakeAmount)])
11881188 if ((burnLPAssetOnFactory == burnLPAssetOnFactory))
11891189 then state
11901190 else throw("Strict value is not equal to itself.")
11911191 }
11921192 else throw("Strict value is not equal to itself.")
11931193 }
11941194 else throw("Strict value is not equal to itself.")
11951195 }
11961196 else throw("Strict value is not equal to itself.")
11971197 }
11981198
11991199
12001200
12011201 @Callable(i)
12021202 func unstakeAndGetOneTknV2 (unstakeAmount,outAssetId,minOutAmount) = {
12031203 let isPoolOneTokenOperationsDisabled = {
12041204 let @ = invoke(fca, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
12051205 if ($isInstanceOf(@, "Boolean"))
12061206 then @
12071207 else throw(($getType(@) + " couldn't be cast to Boolean"))
12081208 }
12091209 let isGetDisabled = if (if (igs())
12101210 then true
12111211 else (cfgPoolStatus == PoolShutdown))
12121212 then true
12131213 else isPoolOneTokenOperationsDisabled
12141214 let checks = [if (if (!(isGetDisabled))
12151215 then true
12161216 else isManager(i))
12171217 then true
12181218 else throwErr("get operation is blocked by admin"), if ((size(i.payments) == 0))
12191219 then true
12201220 else throwErr("no payments are expected")]
12211221 if ((checks == checks))
12221222 then {
12231223 let cfg = gpc()
12241224 let factoryCfg = gfc()
12251225 let lpAssetId = fromBase58String(cfg[idxLPAsId])
12261226 let staking = valueOrErrorMessage(addressFromString(factoryCfg[idxFactStakCntr]), "Wr st addr")
12271227 let userAddress = i.caller
12281228 let lpAssetRecipientAddress = this
1229- let unstakeInv = invoke(staking, "unstakeINTERNAL", [toBase58String(lpAssetId), unstakeAmount, userAddress.bytes, lpAssetRecipientAddress.bytes], nil)
1229+ let unstakeInv = invoke(staking, "unstakeINTERNAL", [lpAssetId, unstakeAmount, userAddress.bytes, lpAssetRecipientAddress.bytes], nil)
12301230 if ((unstakeInv == unstakeInv))
12311231 then {
1232- let $t04170041888 = getOneTknV2Internal(outAssetId, minOutAmount, [AttachedPayment(lpAssetId, unstakeAmount)], i.caller, i.originCaller, i.transactionId)
1233- let state = $t04170041888._1
1234- let totalAmount = $t04170041888._2
1232+ let $t04168341871 = getOneTknV2Internal(outAssetId, minOutAmount, [AttachedPayment(lpAssetId, unstakeAmount)], i.caller, i.originCaller, i.transactionId)
1233+ let state = $t04168341871._1
1234+ let totalAmount = $t04168341871._2
12351235 $Tuple2(state, totalAmount)
12361236 }
12371237 else throw("Strict value is not equal to itself.")
12381238 }
12391239 else throw("Strict value is not equal to itself.")
12401240 }
12411241
12421242
12431243
12441244 @Callable(i)
12451245 func putOneTknV2WithBonusREADONLY (paymentAmountRaw,paymentAssetId) = {
12461246 let poolConfig = gpc()
12471247 let amId = poolConfig[idxAmAsId]
12481248 let prId = poolConfig[idxPrAsId]
12491249 let lpId = poolConfig[idxLPAsId]
1250- let $t04214742250 = calcPutOneTkn(paymentAmountRaw, paymentAssetId, "", "", true)
1251- let lpAmount = $t04214742250._1
1252- let state = $t04214742250._2
1253- let feeAmount = $t04214742250._3
1254- let bonus = $t04214742250._4
1250+ let $t04213042233 = calcPutOneTkn(paymentAmountRaw, paymentAssetId, "", "", true)
1251+ let lpAmount = $t04213042233._1
1252+ let state = $t04213042233._2
1253+ let feeAmount = $t04213042233._3
1254+ let bonus = $t04213042233._4
12551255 $Tuple2(nil, $Tuple3(lpAmount, feeAmount, bonus))
12561256 }
12571257
12581258
12591259
12601260 @Callable(i)
12611261 func putOneTknV2WithoutTakeFeeREADONLY (paymentAmountRaw,paymentAssetId) = {
12621262 let poolConfig = gpc()
12631263 let amId = poolConfig[idxAmAsId]
12641264 let prId = poolConfig[idxPrAsId]
12651265 let lpId = poolConfig[idxLPAsId]
1266- let $t04252942633 = calcPutOneTkn(paymentAmountRaw, paymentAssetId, "", "", false)
1267- let lpAmount = $t04252942633._1
1268- let state = $t04252942633._2
1269- let feeAmount = $t04252942633._3
1270- let bonus = $t04252942633._4
1266+ let $t04251242616 = calcPutOneTkn(paymentAmountRaw, paymentAssetId, "", "", false)
1267+ let lpAmount = $t04251242616._1
1268+ let state = $t04251242616._2
1269+ let feeAmount = $t04251242616._3
1270+ let bonus = $t04251242616._4
12711271 $Tuple2(nil, $Tuple3(lpAmount, feeAmount, bonus))
12721272 }
12731273
12741274
12751275
12761276 @Callable(i)
12771277 func activate (amtAsStr,prAsStr) = if ((toString(i.caller) != toString(fca)))
12781278 then throw("denied")
12791279 else $Tuple2([StringEntry(aa(), amtAsStr), StringEntry(pa(), prAsStr)], "success")
12801280
12811281
12821282
12831283 @Callable(i)
12841284 func setS (k,v) = if ((toString(i.caller) != strf(this, ada())))
12851285 then pd
12861286 else [StringEntry(k, v)]
12871287
12881288
12891289
12901290 @Callable(i)
12911291 func setI (k,v) = if ((toString(i.caller) != strf(this, ada())))
12921292 then pd
12931293 else [IntegerEntry(k, v)]
12941294
12951295
12961296
12971297 @Callable(i)
12981298 func getPoolConfigWrapperREADONLY () = $Tuple2(nil, gpc())
12991299
13001300
13011301
13021302 @Callable(i)
13031303 func getAccBalanceWrapperREADONLY (assetId) = $Tuple2(nil, getAccBalance(assetId))
13041304
13051305
13061306
13071307 @Callable(i)
13081308 func calcPricesWrapperREADONLY (amAmt,prAmt,lpAmt) = {
13091309 let pr = calcPrices(amAmt, prAmt, lpAmt)
13101310 $Tuple2(nil, [toString(pr[0]), toString(pr[1]), toString(pr[2])])
13111311 }
13121312
13131313
13141314
13151315 @Callable(i)
13161316 func fromX18WrapperREADONLY (val,resScaleMult) = $Tuple2(nil, f1(parseBigIntValue(val), resScaleMult))
13171317
13181318
13191319
13201320 @Callable(i)
13211321 func toX18WrapperREADONLY (origVal,origScaleMult) = $Tuple2(nil, toString(t1(origVal, origScaleMult)))
13221322
13231323
13241324
13251325 @Callable(i)
13261326 func calcPriceBigIntWrapperREADONLY (prAmtX18,amAmtX18) = $Tuple2(nil, toString(cpbi(parseBigIntValue(prAmtX18), parseBigIntValue(amAmtX18))))
13271327
13281328
13291329
13301330 @Callable(i)
13311331 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, ""))
13321332
13331333
13341334
13351335 @Callable(i)
13361336 func estimateGetOperationWrapperREADONLY (txId58,pmtAsId,pmtLpAmt,usrAddr) = {
13371337 let r = ego(txId58, pmtAsId, pmtLpAmt, addressFromStringValue(usrAddr))
13381338 $Tuple2(nil, $Tuple10(r._1, r._2, r._3, r._4, r._5, r._6, r._7, toString(r._8), r._9, r._10))
13391339 }
13401340
13411341
13421342 @Verifier(tx)
13431343 func verify () = {
13441344 let targetPublicKey = match m() {
13451345 case pk: ByteVector =>
13461346 pk
13471347 case _: Unit =>
13481348 tx.senderPublicKey
13491349 case _ =>
13501350 throw("Match error")
13511351 }
13521352 match tx {
13531353 case order: Order =>
13541354 let matcherPub = mp()
13551355 let orderValid = moa(order)
13561356 let senderValid = sigVerify(order.bodyBytes, order.proofs[0], order.senderPublicKey)
13571357 let matcherValid = sigVerify(order.bodyBytes, order.proofs[1], matcherPub)
13581358 if (if (if (orderValid)
13591359 then senderValid
13601360 else false)
13611361 then matcherValid
13621362 else false)
13631363 then true
13641364 else toe(orderValid, senderValid, matcherValid)
13651365 case s: SetScriptTransaction =>
13661366 let newHash = blake2b256(value(s.script))
13671367 let allowedHash = fromBase64String(value(getString(fca, keyAllowedLpStableScriptHash())))
13681368 let currentHash = scriptHash(this)
13691369 if (if ((allowedHash == newHash))
13701370 then (currentHash != newHash)
13711371 else false)
13721372 then true
13731373 else sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey)
13741374 case _ =>
13751375 sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey)
13761376 }
13771377 }
13781378

github/deemru/w8io/026f985 
129.42 ms