tx · D1vbruiRNqzZ51ZrrpWWnXHEYzmP7WHQQMcSjU8e1zAa

3N29w4u1KAEydahgLZBbjxRvu2Hx6k727EF:  -0.02000000 Waves

2022.09.08 11:14 [2219866] smart account 3N29w4u1KAEydahgLZBbjxRvu2Hx6k727EF > SELF 0.00000000 Waves

{ "type": 13, "id": "D1vbruiRNqzZ51ZrrpWWnXHEYzmP7WHQQMcSjU8e1zAa", "fee": 2000000, "feeAssetId": null, "timestamp": 1662624902363, "version": 1, "sender": "3N29w4u1KAEydahgLZBbjxRvu2Hx6k727EF", "senderPublicKey": "4g6gkRwdYwZxyU3tnN69rJgbeuGRc131ENTwcPoZW7v1", "proofs": [ "3E1VUMmvDkoDjjCzyJ71F7S8efZrY5QvEg8fiG7xaejBTHiietq733FerUcbwkf1G8C6zirVpgpSJkTCYoahm8zU" ], "script": "base64:BgK/GQgCEgMKAQgSAwoBCBIAEgQKAgEEEgcKBQEBAQEEEgMKAQESABIHCgUBAQEIARIECgIBARIDCgEBEgQKAggIEgQKAggIEgQKAggBEgASAwoBCBIFCgMBAQESBAoCCAESBAoCAQESBAoCCAgSCwoJCAEBAgECCAQEEgYKBAgIAQgiD2RlZmF1bHREZWNpbWFscyIGc2NhbGU4IgxzY2FsZThCaWdJbnQiB3NjYWxlMTgiCnplcm9CaWdJbnQiCW9uZUJpZ0ludCIKc2xpcHBhZ2U0RCIFQW11bHQiBURjb252IgNTRVAiBUVNUFRZIgpQb29sQWN0aXZlIgpQb29sUHV0RGlzIg5Qb29sTWF0Y2hlckRpcyIMUG9vbFNodXRkb3duIg5pZHhQb29sQWRkcmVzcyIJaWR4UG9vbFN0IglpZHhMUEFzSWQiCWlkeEFtQXNJZCIJaWR4UHJBc0lkIgtpZHhBbXRBc0RjbSINaWR4UHJpY2VBc0RjbSILaWR4SUFtdEFzSWQiDWlkeElQcmljZUFzSWQiD2lkeEZhY3RTdGFrQ250ciIQaWR4RmFjdFNsaXBwQ250ciIRaWR4RmFjdEd3eFJld0NudHI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JSRUFET05MWQQCYkcCZU8CYkkCZU4EAmNFCQECYkYEBQJiRwUCZU8FAmJJCQERQGV4dHJOYXRpdmUoMTA2MikBBQJlTgkAlAoCBQNuaWwJAJwKCggFAmNFAl8xCAUCY0UCXzIIBQJjRQJfMwgFAmNFAl80CAUCY0UCXzUIBQJjRQJfNggFAmNFAl83CQCmAwEIBQJjRQJfOAgFAmNFAl85CAUCY0UDXzEwAQJlUAECZVEABAJlUgQCYXQJAQJkcgADCQABAgUCYXQCCkJ5dGVWZWN0b3IEAmR3BQJhdAUCZHcDCQABAgUCYXQCBFVuaXQIBQJlUA9zZW5kZXJQdWJsaWNLZXkJAAIBAgtNYXRjaCBlcnJvcgQCYXQFAmVQAwkAAQIFAmF0AgVPcmRlcgQCY1oFAmF0BAJlUwkBAmFDAAQCZVQJAQJjWQEFAmNaBAJlVQkA9AMDCAUCY1oJYm9keUJ5dGVzCQCRAwIIBQJjWgZwcm9vZnMAAAgFAmNaD3NlbmRlclB1YmxpY0tleQQCZVYJAPQDAwgFAmNaCWJvZHlCeXRlcwkAkQMCCAUCY1oGcHJvb2ZzAAEFAmVTAwMDBQJlVAUCZVUHBQJlVgcGCQECYW8DBQJlVAUCZVUFAmVWAwkAAQIFAmF0AhRTZXRTY3JpcHRUcmFuc2FjdGlvbgQCZHMFAmF0BAJlVwkA9gMBCQEFdmFsdWUBCAUCZHMGc2NyaXB0BAJlWAkA2wQBCQEFdmFsdWUBCQCdCAIFAmF6CQECYW4ABAJlWQkA8QcBBQR0aGlzAwMJAAACBQJlWAUCZVcJAQIhPQIFAmVZBQJlVwcGCQD0AwMIBQJlUAlib2R5Qnl0ZXMJAJEDAggFAmVQBnByb29mcwAABQJlUgkA9AMDCAUCZVAJYm9keUJ5dGVzCQCRAwIIBQJlUAZwcm9vZnMAAAUCZVIHGPNq", "chainId": 84, "height": 2219866, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: none Next: DAembCnE6xmE1v8XNu43Hu2AnaBo4bj54kFRHDJpUkx7 Full:
OldNewDifferences
1-# no script
1+{-# STDLIB_VERSION 6 #-}
2+{-# SCRIPT_TYPE ACCOUNT #-}
3+{-# CONTENT_TYPE DAPP #-}
4+let defaultDecimals = 1000000
5+
6+let scale8 = 100000000
7+
8+let scale8BigInt = toBigInt(100000000)
9+
10+let scale18 = toBigInt(1000000000000000000)
11+
12+let zeroBigInt = toBigInt(0)
13+
14+let oneBigInt = toBigInt(1)
15+
16+let slippage4D = toBigInt((scale8 - ((scale8 * 1) / scale8)))
17+
18+let Amult = "100"
19+
20+let Dconv = "1"
21+
22+let SEP = "__"
23+
24+let EMPTY = ""
25+
26+let PoolActive = 1
27+
28+let PoolPutDis = 2
29+
30+let PoolMatcherDis = 3
31+
32+let PoolShutdown = 4
33+
34+let idxPoolAddress = 1
35+
36+let idxPoolSt = 2
37+
38+let idxLPAsId = 3
39+
40+let idxAmAsId = 4
41+
42+let idxPrAsId = 5
43+
44+let idxAmtAsDcm = 6
45+
46+let idxPriceAsDcm = 7
47+
48+let idxIAmtAsId = 8
49+
50+let idxIPriceAsId = 9
51+
52+let idxFactStakCntr = 1
53+
54+let idxFactSlippCntr = 7
55+
56+let idxFactGwxRewCntr = 10
57+
58+let delay = "%s__delay"
59+
60+func t1 (origVal,origScaleMult) = fraction(toBigInt(origVal), scale18, toBigInt(origScaleMult))
61+
62+
63+func f1 (val,resultScaleMult) = toInt(fraction(val, toBigInt(resultScaleMult), scale18))
64+
65+
66+func ts (amt,resScale,curScale) = fraction(amt, resScale, curScale)
67+
68+
69+func abs (val) = if ((zeroBigInt > val))
70+ then -(val)
71+ else val
72+
73+
74+func fc () = "%s__factoryContract"
75+
76+
77+func mpk () = "%s__managerPublicKey"
78+
79+
80+func pmpk () = "%s__pendingManagerPublicKey"
81+
82+
83+func pl () = "%s%s__price__last"
84+
85+
86+func ph (h,t) = makeString(["%s%s%d%d__price__history", toString(h), toString(t)], SEP)
87+
88+
89+func pau (ua,txId) = ((("%s%s%s__P__" + ua) + "__") + txId)
90+
91+
92+func gau (ua,txId) = ((("%s%s%s__G__" + ua) + "__") + txId)
93+
94+
95+func aa () = "%s__amountAsset"
96+
97+
98+func pa () = "%s__priceAsset"
99+
100+
101+func amp () = "%s__amp"
102+
103+
104+func ada () = "%s__addonAddr"
105+
106+
107+func lgotc (caller) = makeString(["%s%s__lastGetOneTknCall", caller], SEP)
108+
109+
110+func lsotc (caller) = makeString(["%s%s__lastPutOneTknCall", caller], SEP)
111+
112+
113+func fcfg () = "%s__factoryConfig"
114+
115+
116+func mtpk () = "%s%s__matcher__publicKey"
117+
118+
119+func pc (iAmtAs,iPrAs) = (((("%d%d%s__" + iAmtAs) + "__") + iPrAs) + "__config")
120+
121+
122+func mba (bAStr) = ("%s%s%s__mappings__baseAsset2internalId__" + bAStr)
123+
124+
125+func aps () = "%s__shutdown"
126+
127+
128+func keyAllowedLpStableScriptHash () = "%s__allowedLpStableScriptHash"
129+
130+
131+func toe (orV,sendrV,matchV) = throw(((((("Failed: ordValid=" + toString(orV)) + " sndrValid=") + toString(sendrV)) + " mtchrValid=") + toString(matchV)))
132+
133+
134+func str (val) = match val {
135+ case valStr: String =>
136+ valStr
137+ case _ =>
138+ throw("fail cast to String")
139+}
140+
141+
142+func strf (addr,key) = valueOrErrorMessage(getString(addr, key), makeString(["mandatory ", toString(addr), ".", key, " not defined"], ""))
143+
144+
145+func intf (addr,key) = valueOrErrorMessage(getInteger(addr, key), makeString(["mandatory ", toString(addr), ".", key, " not defined"], ""))
146+
147+
148+let fca = addressFromStringValue(strf(this, fc()))
149+
150+let A = strf(this, amp())
151+
152+func igs () = valueOrElse(getBoolean(fca, aps()), false)
153+
154+
155+func mp () = fromBase58String(strf(fca, mtpk()))
156+
157+
158+func gpc () = {
159+ let amtAs = strf(this, aa())
160+ let priceAs = strf(this, pa())
161+ let iPriceAs = intf(fca, mba(priceAs))
162+ let iAmtAs = intf(fca, mba(amtAs))
163+ split(strf(fca, pc(toString(iAmtAs), toString(iPriceAs))), SEP)
164+ }
165+
166+
167+func gfc () = split(strf(fca, fcfg()), SEP)
168+
169+
170+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)
171+
172+
173+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)
174+
175+
176+func getAccBalance (assetId) = if ((assetId == "WAVES"))
177+ then wavesBalance(this).available
178+ else assetBalance(this, fromBase58String(assetId))
179+
180+
181+func cpbi (prAmtX18,amAmtX18) = fraction(prAmtX18, scale18, amAmtX18)
182+
183+
184+func vad (A1,A2,slippage) = {
185+ let diff = fraction((A1 - A2), scale8BigInt, A2)
186+ let pass = ((slippage - abs(diff)) > zeroBigInt)
187+ if (!(pass))
188+ then throw(("Big slpg: " + toString(diff)))
189+ else $Tuple2(pass, min([A1, A2]))
190+ }
191+
192+
193+func vd (D1,D0,slpg) = {
194+ let diff = fraction(D0, scale8BigInt, D1)
195+ let fail = (slpg > diff)
196+ if (if (fail)
197+ then true
198+ else (D0 > D1))
199+ then throw(((((((toString(D0) + " ") + toString(D1)) + " ") + toString(diff)) + " ") + toString(slpg)))
200+ else fail
201+ }
202+
203+
204+func pcp (amAssetDcm,prAssetDcm,amAmt,prAmt) = {
205+ let amtAsAmtX18 = t1(amAmt, amAssetDcm)
206+ let prAsAmtX18 = t1(prAmt, prAssetDcm)
207+ cpbi(prAsAmtX18, amtAsAmtX18)
208+ }
209+
210+
211+func calcPrices (amAmt,prAmt,lpAmt) = {
212+ let cfg = gpc()
213+ let amtAsDcm = parseIntValue(cfg[idxAmtAsDcm])
214+ let prAsDcm = parseIntValue(cfg[idxPriceAsDcm])
215+ let priceX18 = pcp(amtAsDcm, prAsDcm, amAmt, prAmt)
216+ let amAmtX18 = t1(amAmt, amtAsDcm)
217+ let prAmtX18 = t1(prAmt, prAsDcm)
218+ let lpAmtX18 = t1(lpAmt, scale8)
219+ let lpPrInAmAsX18 = cpbi(amAmtX18, lpAmtX18)
220+ let lpPrInPrAsX18 = cpbi(prAmtX18, lpAmtX18)
221+[priceX18, lpPrInAmAsX18, lpPrInPrAsX18]
222+ }
223+
224+
225+func calculatePrices (amAmt,prAmt,lpAmt) = {
226+ let p = calcPrices(amAmt, prAmt, lpAmt)
227+[f1(p[0], scale8), f1(p[1], scale8), f1(p[2], scale8)]
228+ }
229+
230+
231+func ego (txId58,pmtAssetId,pmtLpAmt,userAddress) = {
232+ let cfg = gpc()
233+ let lpId = cfg[idxLPAsId]
234+ let amId = cfg[idxAmAsId]
235+ let prId = cfg[idxPrAsId]
236+ let amDcm = parseIntValue(cfg[idxAmtAsDcm])
237+ let prDcm = parseIntValue(cfg[idxPriceAsDcm])
238+ let sts = cfg[idxPoolSt]
239+ let lpEmiss = valueOrErrorMessage(assetInfo(fromBase58String(lpId)), "Wrong LP id").quantity
240+ if ((lpId != pmtAssetId))
241+ then throw("Wrong pmt asset")
242+ else {
243+ let amBalance = getAccBalance(amId)
244+ let prBalance = getAccBalance(prId)
245+ let amountBalanceDefaultDecimals = fraction(amBalance, defaultDecimals, amDcm)
246+ let priceBalanceDefaultDecimals = fraction(prBalance, defaultDecimals, prDcm)
247+ let amBalanceX18 = t1(amountBalanceDefaultDecimals, defaultDecimals)
248+ let prBalanceX18 = t1(priceBalanceDefaultDecimals, defaultDecimals)
249+ let curPriceX18 = cpbi(prBalanceX18, amBalanceX18)
250+ let curPrice = f1(curPriceX18, scale8)
251+ let pmtLpAmtX18 = t1(pmtLpAmt, scale8)
252+ let lpEmissX18 = t1(lpEmiss, scale8)
253+ let outAmAmtX18 = fraction(amBalanceX18, pmtLpAmtX18, lpEmissX18)
254+ let outPrAmtX18 = fraction(prBalanceX18, pmtLpAmtX18, lpEmissX18)
255+ let outAmountAmountDefaultDecimals = f1(outAmAmtX18, defaultDecimals)
256+ let outPriceAmountDefaultDecimals = f1(outPrAmtX18, defaultDecimals)
257+ let outAmAmt = fraction(outAmountAmountDefaultDecimals, amDcm, defaultDecimals)
258+ let outPrAmt = fraction(outPriceAmountDefaultDecimals, prDcm, defaultDecimals)
259+ let state = if ((txId58 == ""))
260+ then nil
261+ else [ScriptTransfer(userAddress, outAmAmt, if ((amId == "WAVES"))
262+ then unit
263+ else fromBase58String(amId)), ScriptTransfer(userAddress, outPrAmt, if ((prId == "WAVES"))
264+ then unit
265+ 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)]
266+ $Tuple10(outAmAmt, outPrAmt, amId, prId, amBalance, prBalance, lpEmiss, curPriceX18, sts, state)
267+ }
268+ }
269+
270+
271+func epo (txId58,slippage,inAmAmt,inAmId,inPrAmt,inPrId,userAddress,isEval,emitLp,isOneAsset,pmtAmt,pmtId) = {
272+ let cfg = gpc()
273+ let lpId = fromBase58String(cfg[idxLPAsId])
274+ let amIdStr = cfg[idxAmAsId]
275+ let prIdStr = cfg[idxPrAsId]
276+ let inAmIdStr = cfg[idxIAmtAsId]
277+ let inPrIdStr = cfg[idxIPriceAsId]
278+ let amtDcm = parseIntValue(cfg[idxAmtAsDcm])
279+ let priceDcm = parseIntValue(cfg[idxPriceAsDcm])
280+ let sts = cfg[idxPoolSt]
281+ let lpEm = valueOrErrorMessage(assetInfo(lpId), "Wr lp as").quantity
282+ let amBalance = if (isEval)
283+ then getAccBalance(amIdStr)
284+ else if (if (isOneAsset)
285+ then (pmtId == amIdStr)
286+ else false)
287+ then (getAccBalance(amIdStr) - pmtAmt)
288+ else if (isOneAsset)
289+ then getAccBalance(amIdStr)
290+ else (getAccBalance(amIdStr) - inAmAmt)
291+ let prBalance = if (isEval)
292+ then getAccBalance(prIdStr)
293+ else if (if (isOneAsset)
294+ then (pmtId == prIdStr)
295+ else false)
296+ then (getAccBalance(prIdStr) - pmtAmt)
297+ else if (isOneAsset)
298+ then getAccBalance(prIdStr)
299+ else (getAccBalance(prIdStr) - inPrAmt)
300+ let amountBalanceDefaultDecimals = fraction(amBalance, defaultDecimals, amtDcm)
301+ let priceBalanceDefaultDecimals = fraction(prBalance, defaultDecimals, priceDcm)
302+ let inAmountAssetAmountDefaultDecimals = fraction(inAmAmt, defaultDecimals, amtDcm)
303+ let inPriceAssetAmountDefaultDecimals = fraction(inPrAmt, defaultDecimals, priceDcm)
304+ let inAmAssetAmtX18 = t1(inAmountAssetAmountDefaultDecimals, defaultDecimals)
305+ let inPrAssetAmtX18 = t1(inPriceAssetAmountDefaultDecimals, defaultDecimals)
306+ let userPriceX18 = cpbi(inPrAssetAmtX18, inAmAssetAmtX18)
307+ let amBalanceX18 = t1(amountBalanceDefaultDecimals, defaultDecimals)
308+ let prBalanceX18 = t1(priceBalanceDefaultDecimals, defaultDecimals)
309+ let r = if ((lpEm == 0))
310+ then {
311+ let curPriceX18 = zeroBigInt
312+ let slippageX18 = zeroBigInt
313+ let lpAmtX18 = pow((inAmAssetAmtX18 * inPrAssetAmtX18), 0, toBigInt(5), 1, 0, DOWN)
314+ $Tuple5(f1(lpAmtX18, scale8), f1(inAmAssetAmtX18, defaultDecimals), f1(inPrAssetAmtX18, defaultDecimals), cpbi((prBalanceX18 + inPrAssetAmtX18), (amBalanceX18 + inAmAssetAmtX18)), slippageX18)
315+ }
316+ else {
317+ let curPriceX18 = cpbi(prBalanceX18, amBalanceX18)
318+ let slippageRealX18 = fraction(abs((curPriceX18 - userPriceX18)), scale18, curPriceX18)
319+ let slippageX18 = t1(slippage, scale8)
320+ if (if ((curPriceX18 != zeroBigInt))
321+ then (slippageRealX18 > slippageX18)
322+ else false)
323+ then throw(((("Price slippage " + toString(slippageRealX18)) + " > ") + toString(slippageX18)))
324+ else {
325+ let lpEmissionX18 = t1(lpEm, scale8)
326+ let prViaAmX18 = fraction(inAmAssetAmtX18, curPriceX18, scale18)
327+ let amViaPrX18 = fraction(inPrAssetAmtX18, scale18, curPriceX18)
328+ let expectedAmts = if ((prViaAmX18 > inPrAssetAmtX18))
329+ then $Tuple2(amViaPrX18, inPrAssetAmtX18)
330+ else $Tuple2(inAmAssetAmtX18, prViaAmX18)
331+ let expAmtAssetAmtX18 = expectedAmts._1
332+ let expPriceAssetAmtX18 = expectedAmts._2
333+ let lpAmtX18 = fraction(lpEmissionX18, expPriceAssetAmtX18, prBalanceX18)
334+ $Tuple5(f1(lpAmtX18, scale8), f1(expAmtAssetAmtX18, defaultDecimals), f1(expPriceAssetAmtX18, defaultDecimals), curPriceX18, slippageX18)
335+ }
336+ }
337+ let calcLpAmt = r._1
338+ let calcAmAssetPmt = fraction(r._2, amtDcm, defaultDecimals)
339+ let calcPrAssetPmt = fraction(r._3, priceDcm, defaultDecimals)
340+ let curPrice = f1(r._4, scale8)
341+ let slippageCalc = f1(r._5, scale8)
342+ if ((0 >= calcLpAmt))
343+ then throw("LP <= 0")
344+ else {
345+ let emitLpAmt = if (!(emitLp))
346+ then 0
347+ else calcLpAmt
348+ let amDiff = (inAmAmt - calcAmAssetPmt)
349+ let prDiff = (inPrAmt - calcPrAssetPmt)
350+ let $t01664716992 = if (if (isOneAsset)
351+ then (pmtId == amIdStr)
352+ else false)
353+ then $Tuple2(pmtAmt, 0)
354+ else if (if (isOneAsset)
355+ then (pmtId == prIdStr)
356+ else false)
357+ then $Tuple2(0, pmtAmt)
358+ else $Tuple2(calcAmAssetPmt, calcPrAssetPmt)
359+ let writeAmAmt = $t01664716992._1
360+ let writePrAmt = $t01664716992._2
361+ 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))]
362+ $Tuple13(calcLpAmt, emitLpAmt, curPrice, amBalance, prBalance, lpEm, lpId, sts, commonState, amDiff, prDiff, inAmId, inPrId)
363+ }
364+ }
365+
366+
367+func moa (order) = {
368+ let cfg = gpc()
369+ let amtAsId = cfg[idxAmAsId]
370+ let prAsId = cfg[idxPrAsId]
371+ let sts = parseIntValue(cfg[idxPoolSt])
372+ let amtAsDcm = parseIntValue(cfg[idxAmtAsDcm])
373+ let prAsDcm = parseIntValue(cfg[idxPriceAsDcm])
374+ let accAmtAsBalance = getAccBalance(amtAsId)
375+ let accPrAsBalance = getAccBalance(prAsId)
376+ let curPriceX18 = if ((order.orderType == Buy))
377+ then pcp(amtAsDcm, prAsDcm, (accAmtAsBalance + order.amount), accPrAsBalance)
378+ else pcp(amtAsDcm, prAsDcm, (accAmtAsBalance - order.amount), accPrAsBalance)
379+ let curPrice = f1(curPriceX18, scale8)
380+ if (if (if (igs())
381+ then true
382+ else (sts == PoolMatcherDis))
383+ then true
384+ else (sts == PoolShutdown))
385+ then throw("Admin blocked")
386+ else {
387+ let orAmtAsset = order.assetPair.amountAsset
388+ let orAmtAsStr = if ((orAmtAsset == unit))
389+ then "WAVES"
390+ else toBase58String(value(orAmtAsset))
391+ let orPrAsset = order.assetPair.priceAsset
392+ let orPrAsStr = if ((orPrAsset == unit))
393+ then "WAVES"
394+ else toBase58String(value(orPrAsset))
395+ if (if ((orAmtAsStr != amtAsId))
396+ then true
397+ else (orPrAsStr != prAsId))
398+ then throw("Wr assets")
399+ else {
400+ let orderPrice = order.price
401+ let priceDcm = fraction(scale8, prAsDcm, amtAsDcm)
402+ let castOrderPrice = ts(orderPrice, scale8, priceDcm)
403+ let isOrderPriceValid = if ((order.orderType == Buy))
404+ then (curPrice >= castOrderPrice)
405+ else (castOrderPrice >= curPrice)
406+ true
407+ }
408+ }
409+ }
410+
411+
412+func cg (i) = if ((size(i.payments) != 1))
413+ then throw("1 pmnt exp")
414+ else {
415+ let pmt = value(i.payments[0])
416+ let pmtAssetId = value(pmt.assetId)
417+ let pmtAmt = pmt.amount
418+ let r = ego(toBase58String(i.transactionId), toBase58String(pmtAssetId), pmtAmt, i.caller)
419+ let outAmAmt = r._1
420+ let outPrAmt = r._2
421+ let sts = parseIntValue(r._9)
422+ let state = r._10
423+ if (if (igs())
424+ then true
425+ else (sts == PoolShutdown))
426+ then throw(("Admin blocked: " + toString(sts)))
427+ else $Tuple5(outAmAmt, outPrAmt, pmtAmt, pmtAssetId, state)
428+ }
429+
430+
431+func cp (caller,txId,amAsPmt,prAsPmt,slippage,emitLp,isOneAsset,pmtAmt,pmtId) = {
432+ let r = epo(txId, slippage, value(amAsPmt).amount, value(amAsPmt).assetId, value(prAsPmt).amount, value(prAsPmt).assetId, caller, false, emitLp, isOneAsset, pmtAmt, pmtId)
433+ let sts = parseIntValue(r._8)
434+ if (if (if (igs())
435+ then true
436+ else (sts == PoolPutDis))
437+ then true
438+ else (sts == PoolShutdown))
439+ then throw(("Blocked:" + toString(sts)))
440+ else r
441+ }
442+
443+
444+func m () = match getString(mpk()) {
445+ case s: String =>
446+ fromBase58String(s)
447+ case _: Unit =>
448+ unit
449+ case _ =>
450+ throw("Match error")
451+}
452+
453+
454+func pm () = match getString(pmpk()) {
455+ case s: String =>
456+ fromBase58String(s)
457+ case _: Unit =>
458+ unit
459+ case _ =>
460+ throw("Match error")
461+}
462+
463+
464+let pd = throw("Permission denied")
465+
466+func mm (i) = match m() {
467+ case pk: ByteVector =>
468+ if ((i.callerPublicKey == pk))
469+ then true
470+ else pd
471+ case _: Unit =>
472+ if ((i.caller == this))
473+ then true
474+ else pd
475+ case _ =>
476+ throw("Match error")
477+}
478+
479+
480+@Callable(i)
481+func constructor (fc) = {
482+ let c = mm(i)
483+ if ((c == c))
484+ then [StringEntry(fc(), fc)]
485+ else throw("Strict value is not equal to itself.")
486+ }
487+
488+
489+
490+@Callable(i)
491+func setManager (pendingManagerPublicKey) = {
492+ let c = mm(i)
493+ if ((c == c))
494+ then {
495+ let cm = fromBase58String(pendingManagerPublicKey)
496+ if ((cm == cm))
497+ then [StringEntry(pmpk(), pendingManagerPublicKey)]
498+ else throw("Strict value is not equal to itself.")
499+ }
500+ else throw("Strict value is not equal to itself.")
501+ }
502+
503+
504+
505+@Callable(i)
506+func confirmManager () = {
507+ let p = pm()
508+ let hpm = if (isDefined(p))
509+ then true
510+ else throw("No pending manager")
511+ if ((hpm == hpm))
512+ then {
513+ let cpm = if ((i.callerPublicKey == value(p)))
514+ then true
515+ else throw("You are not pending manager")
516+ if ((cpm == cpm))
517+ then [StringEntry(mpk(), toBase58String(value(p))), DeleteEntry(pmpk())]
518+ else throw("Strict value is not equal to itself.")
519+ }
520+ else throw("Strict value is not equal to itself.")
521+ }
522+
523+
524+
525+@Callable(i)
526+func put (slip,autoStake) = {
527+ let factCfg = gfc()
528+ let stakingCntr = valueOrErrorMessage(addressFromString(factCfg[idxFactStakCntr]), "Wr st addr")
529+ let slipCntr = valueOrErrorMessage(addressFromString(factCfg[idxFactSlippCntr]), "Wr sl addr")
530+ if ((0 > slip))
531+ then throw("Wrong slippage")
532+ else if ((size(i.payments) != 2))
533+ then throw("2 pmnts expd")
534+ else {
535+ 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, 0, "")
536+ let emitLpAmt = e._2
537+ let lpAssetId = e._7
538+ let state = e._9
539+ let amDiff = e._10
540+ let prDiff = e._11
541+ let amId = e._12
542+ let prId = e._13
543+ let r = invoke(fca, "emit", [emitLpAmt], nil)
544+ if ((r == r))
545+ then {
546+ let el = match r {
547+ case legacy: Address =>
548+ invoke(legacy, "emit", [emitLpAmt], nil)
549+ case _ =>
550+ unit
551+ }
552+ if ((el == el))
553+ then {
554+ let sa = if ((amDiff > 0))
555+ then invoke(slipCntr, "put", nil, [AttachedPayment(amId, amDiff)])
556+ else nil
557+ if ((sa == sa))
558+ then {
559+ let sp = if ((prDiff > 0))
560+ then invoke(slipCntr, "put", nil, [AttachedPayment(prId, prDiff)])
561+ else nil
562+ if ((sp == sp))
563+ then {
564+ let lpTrnsfr = if (autoStake)
565+ then {
566+ let ss = invoke(stakingCntr, "stake", nil, [AttachedPayment(lpAssetId, emitLpAmt)])
567+ if ((ss == ss))
568+ then nil
569+ else throw("Strict value is not equal to itself.")
570+ }
571+ else [ScriptTransfer(i.caller, emitLpAmt, lpAssetId)]
572+ (state ++ lpTrnsfr)
573+ }
574+ else throw("Strict value is not equal to itself.")
575+ }
576+ else throw("Strict value is not equal to itself.")
577+ }
578+ else throw("Strict value is not equal to itself.")
579+ }
580+ else throw("Strict value is not equal to itself.")
581+ }
582+ }
583+
584+
585+
586+@Callable(i)
587+func putOneTkn (amAssetPart,prAssetPart,outLp,slippage,autoStake) = {
588+ let cfg = gfc()
589+ let stakingCntr = valueOrErrorMessage(addressFromString(cfg[idxFactStakCntr]), "Wr st addr")
590+ let slipCntr = valueOrErrorMessage(addressFromString(cfg[idxFactSlippCntr]), "Wr sl addr")
591+ let gwxCntr = valueOrErrorMessage(addressFromString(cfg[idxFactGwxRewCntr]), "Wr gwx addr")
592+ let poolCfg = gpc()
593+ let amId = poolCfg[idxAmAsId]
594+ let prId = poolCfg[idxPrAsId]
595+ let amDcm = parseIntValue(poolCfg[idxAmtAsDcm])
596+ let prDcm = parseIntValue(poolCfg[idxPriceAsDcm])
597+ let addon = valueOrElse(getString(this, ada()), "")
598+ let userAddress = if ((addon == toString(i.caller)))
599+ then i.originCaller
600+ else i.caller
601+ if (if (if (if ((0 >= slippage))
602+ then true
603+ else (0 >= amAssetPart))
604+ then true
605+ else (0 >= prAssetPart))
606+ then true
607+ else (0 >= outLp))
608+ then throw("Wrong params")
609+ else if ((size(i.payments) != 1))
610+ then throw("1 pmnt expd")
611+ else {
612+ let pmt = value(i.payments[0])
613+ let pmtAssetId = toBase58String(value(pmt.assetId))
614+ let pmtAmt = pmt.amount
615+ if ((10000000 > pmtAmt))
616+ then throw("Wrong pmt amt")
617+ else {
618+ let amBalance = getAccBalance(amId)
619+ let prBalance = getAccBalance(prId)
620+ let $t02564226218 = if ((pmtAssetId == amId))
621+ then if (if ((pmtAmt > amBalance))
622+ then true
623+ else (amAssetPart > pmtAmt))
624+ then throw("invalid payment amount")
625+ else $Tuple6((amBalance - pmtAmt), prBalance, (pmtAmt - amAssetPart), prAssetPart, 0, 0)
626+ else if ((pmtAssetId == prId))
627+ then if (if ((pmtAmt > prBalance))
628+ then true
629+ else (prAssetPart > pmtAmt))
630+ then throw("invalid payment amount")
631+ else $Tuple6(amBalance, (prBalance - pmtAmt), 0, 0, (pmtAmt - prAssetPart), amAssetPart)
632+ else throw("wrong pmtAssetId")
633+ let amBalanceNow = $t02564226218._1
634+ let prBalanceNow = $t02564226218._2
635+ let virtSwapInAm = $t02564226218._3
636+ let virtSwapOutPr = $t02564226218._4
637+ let virtSwapInPr = $t02564226218._5
638+ let virtSwapOutAm = $t02564226218._6
639+ let D0 = invoke(gwxCntr, "calcD", [toString(amBalanceNow), toString(prBalanceNow), A, Amult, Dconv], nil)
640+ let D1 = invoke(gwxCntr, "calcD", [toString(toBigInt(((amBalanceNow + virtSwapInAm) - virtSwapOutAm))), toString(toBigInt(((prBalanceNow + virtSwapInPr) - virtSwapOutPr))), A, Amult, Dconv], nil)
641+ let D0vsD1 = vd(parseBigIntValue(str(D1)), parseBigIntValue(str(D0)), slippage4D)
642+ if ((D0vsD1 == D0vsD1))
643+ then {
644+ let estPut = cp(toString(i.caller), toBase58String(i.transactionId), AttachedPayment(fromBase58String(amId), amAssetPart), AttachedPayment(fromBase58String(prId), prAssetPart), slippage, true, true, pmtAmt, pmtAssetId)
645+ let estimLP = estPut._2
646+ let lpAssetId = estPut._7
647+ let state = estPut._9
648+ let amDiff = estPut._10
649+ let prDiff = estPut._11
650+ let lpCalcRes = vad(toBigInt(estimLP), toBigInt(outLp), toBigInt(slippage))
651+ let emitLpAmt = toInt(lpCalcRes._2)
652+ let e = invoke(fca, "emit", [emitLpAmt], nil)
653+ if ((e == e))
654+ then {
655+ let el = match e {
656+ case legacy: Address =>
657+ invoke(legacy, "emit", [emitLpAmt], nil)
658+ case _ =>
659+ unit
660+ }
661+ if ((el == el))
662+ then {
663+ let sa = if ((amDiff > 0))
664+ then invoke(slipCntr, "put", nil, [AttachedPayment(fromBase58String(amId), amDiff)])
665+ else nil
666+ if ((sa == sa))
667+ then {
668+ let sp = if ((prDiff > 0))
669+ then invoke(slipCntr, "put", nil, [AttachedPayment(fromBase58String(prId), prDiff)])
670+ else nil
671+ if ((sp == sp))
672+ then {
673+ let lpTrnsfr = if (autoStake)
674+ then {
675+ let ss = invoke(stakingCntr, "stake", nil, [AttachedPayment(lpAssetId, emitLpAmt)])
676+ if ((ss == ss))
677+ then nil
678+ else throw("Strict value is not equal to itself.")
679+ }
680+ else [ScriptTransfer(i.caller, emitLpAmt, lpAssetId)]
681+ (state ++ lpTrnsfr)
682+ }
683+ else throw("Strict value is not equal to itself.")
684+ }
685+ else throw("Strict value is not equal to itself.")
686+ }
687+ else throw("Strict value is not equal to itself.")
688+ }
689+ else throw("Strict value is not equal to itself.")
690+ }
691+ else throw("Strict value is not equal to itself.")
692+ }
693+ }
694+ }
695+
696+
697+
698+@Callable(i)
699+func putForFree (maxSlpg) = if ((0 > maxSlpg))
700+ then throw("Wrong slpg")
701+ else if ((size(i.payments) != 2))
702+ then throw("2 pmnts expd")
703+ else {
704+ 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, 0, "")
705+ estPut._9
706+ }
707+
708+
709+
710+@Callable(i)
711+func get () = {
712+ let r = cg(i)
713+ let outAmtAmt = r._1
714+ let outPrAmt = r._2
715+ let pmtAmt = r._3
716+ let pmtAssetId = r._4
717+ let state = r._5
718+ let b = invoke(fca, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
719+ if ((b == b))
720+ then state
721+ else throw("Strict value is not equal to itself.")
722+ }
723+
724+
725+
726+@Callable(i)
727+func getOneTkn (exchResult,notUsed,outAmount,outAssetId,slippage) = if ((size(i.payments) != 1))
728+ then throw("1 pmnt expd")
729+ else {
730+ let cfg = gpc()
731+ let lpId = cfg[idxLPAsId]
732+ let amId = cfg[idxAmAsId]
733+ let prId = cfg[idxPrAsId]
734+ let amDcm = parseIntValue(cfg[idxAmtAsDcm])
735+ let prDcm = parseIntValue(cfg[idxPriceAsDcm])
736+ let sts = cfg[idxPoolSt]
737+ let factCfg = gfc()
738+ let gwxCntr = valueOrErrorMessage(addressFromString(factCfg[idxFactGwxRewCntr]), "Wr sl addr")
739+ let pmt = value(i.payments[0])
740+ let addon = valueOrElse(getString(this, ada()), "")
741+ let userAddress = if ((addon == toString(i.caller)))
742+ then i.originCaller
743+ else i.caller
744+ let txId58 = toBase58String(i.transactionId)
745+ let pmtAssetId = value(pmt.assetId)
746+ let pmtAmt = pmt.amount
747+ if ((1000000000 > pmtAmt))
748+ then throw("Min pmt 10 LP")
749+ else if (if (if ((0 > slippage))
750+ then true
751+ else (0 > exchResult))
752+ then true
753+ else (0 > outAmount))
754+ then throw("Wrong params")
755+ else if ((lpId != toBase58String(pmtAssetId)))
756+ then throw("Wrong LP")
757+ else {
758+ let r = ego(toBase58String(i.transactionId), toBase58String(pmtAssetId), pmtAmt, i.caller)
759+ let estimAmAmt = r._1
760+ let estimPrAmt = r._2
761+ let amBalance = getAccBalance(amId)
762+ let prBalance = getAccBalance(prId)
763+ let $t03099731454 = if ((outAssetId == amId))
764+ then $Tuple7((amBalance - estimAmAmt), (prBalance - estimPrAmt), exchResult, estimPrAmt, 0, 0, (estimAmAmt + exchResult))
765+ else if ((outAssetId == prId))
766+ then $Tuple7((amBalance - estimAmAmt), (prBalance - estimPrAmt), 0, 0, exchResult, estimAmAmt, (estimPrAmt + exchResult))
767+ else throw("wrong outAssetId")
768+ let amBalanceNow = $t03099731454._1
769+ let prBalanceNow = $t03099731454._2
770+ let virtSwapInAm = $t03099731454._3
771+ let virtSwapOutPr = $t03099731454._4
772+ let virtSwapInPr = $t03099731454._5
773+ let virtSwapOutAm = $t03099731454._6
774+ let totalGet = $t03099731454._7
775+ if (if ((0 > virtSwapInAm))
776+ then true
777+ else (0 > virtSwapInPr))
778+ then throw("Wrong calc")
779+ else {
780+ let D0 = invoke(gwxCntr, "calcD", [toString(amBalanceNow), toString(prBalanceNow), A, Amult, Dconv], nil)
781+ let D1 = invoke(gwxCntr, "calcD", [toString(((amBalanceNow - virtSwapInAm) + virtSwapOutAm)), toString(((prBalanceNow + virtSwapOutPr) - virtSwapInPr)), A, Amult, Dconv], nil)
782+ let D0vsD1 = vd(parseBigIntValue(str(D1)), parseBigIntValue(str(D0)), slippage4D)
783+ if ((D0vsD1 == D0vsD1))
784+ then {
785+ let finalRes = vad(toBigInt(totalGet), toBigInt(outAmount), toBigInt(slippage))
786+ if ((finalRes == finalRes))
787+ then {
788+ let $t03215932263 = if ((outAssetId == amId))
789+ then $Tuple2(toInt(finalRes._2), 0)
790+ else $Tuple2(0, toInt(finalRes._2))
791+ let outAm = $t03215932263._1
792+ let outPr = $t03215932263._2
793+ let curPrX18 = cpbi(t1(prBalance, prDcm), t1(amBalance, amDcm))
794+ let curPr = f1(curPrX18, scale8)
795+ let state = [ScriptTransfer(userAddress, (outAm + outPr), if ((outAssetId == "WAVES"))
796+ then unit
797+ else fromBase58String(outAssetId)), StringEntry(gau(toString(userAddress), txId58), dataGetActionInfo(outAm, outPr, pmtAmt, curPr, height, lastBlock.timestamp)), IntegerEntry(pl(), curPr), IntegerEntry(ph(height, lastBlock.timestamp), curPr)]
798+ if ((state == state))
799+ then {
800+ let burn = invoke(fca, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
801+ if ((burn == burn))
802+ then state
803+ else throw("Strict value is not equal to itself.")
804+ }
805+ else throw("Strict value is not equal to itself.")
806+ }
807+ else throw("Strict value is not equal to itself.")
808+ }
809+ else throw("Strict value is not equal to itself.")
810+ }
811+ }
812+ }
813+
814+
815+
816+@Callable(i)
817+func getNoLess (noLessThenAmtAsset,noLessThenPriceAsset) = {
818+ let r = cg(i)
819+ let outAmAmt = r._1
820+ let outPrAmt = r._2
821+ let pmtAmt = r._3
822+ let pmtAssetId = r._4
823+ let state = r._5
824+ if ((noLessThenAmtAsset > outAmAmt))
825+ then throw(((("Failed: " + toString(outAmAmt)) + " < ") + toString(noLessThenAmtAsset)))
826+ else if ((noLessThenPriceAsset > outPrAmt))
827+ then throw(((("Failed: " + toString(outPrAmt)) + " < ") + toString(noLessThenPriceAsset)))
828+ else {
829+ let burnLPAssetOnFactory = invoke(fca, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
830+ if ((burnLPAssetOnFactory == burnLPAssetOnFactory))
831+ then state
832+ else throw("Strict value is not equal to itself.")
833+ }
834+ }
835+
836+
837+
838+@Callable(i)
839+func unstakeAndGet (amount) = {
840+ let checkPayments = if ((size(i.payments) != 0))
841+ then throw("No pmnts expd")
842+ else true
843+ if ((checkPayments == checkPayments))
844+ then {
845+ let cfg = gpc()
846+ let factoryCfg = gfc()
847+ let lpAssetId = fromBase58String(cfg[idxLPAsId])
848+ let staking = valueOrErrorMessage(addressFromString(factoryCfg[idxFactStakCntr]), "Wr st addr")
849+ let unstakeInv = invoke(staking, "unstake", [toBase58String(lpAssetId), amount], nil)
850+ if ((unstakeInv == unstakeInv))
851+ then {
852+ let r = ego(toBase58String(i.transactionId), toBase58String(lpAssetId), amount, i.caller)
853+ let sts = parseIntValue(r._9)
854+ let state = r._10
855+ let v = if (if (igs())
856+ then true
857+ else (sts == PoolShutdown))
858+ then throw(("Blocked: " + toString(sts)))
859+ else true
860+ if ((v == v))
861+ then {
862+ let burnA = invoke(fca, "burn", [amount], [AttachedPayment(lpAssetId, amount)])
863+ if ((burnA == burnA))
864+ then state
865+ else throw("Strict value is not equal to itself.")
866+ }
867+ else throw("Strict value is not equal to itself.")
868+ }
869+ else throw("Strict value is not equal to itself.")
870+ }
871+ else throw("Strict value is not equal to itself.")
872+ }
873+
874+
875+
876+@Callable(i)
877+func activate (amtAsStr,prAsStr) = if ((toString(i.caller) != toString(fca)))
878+ then throw("denied")
879+ else $Tuple2([StringEntry(aa(), amtAsStr), StringEntry(pa(), prAsStr)], "success")
880+
881+
882+
883+@Callable(i)
884+func setS (k,v) = if ((toString(i.caller) != strf(this, ada())))
885+ then pd
886+ else [StringEntry(k, v)]
887+
888+
889+
890+@Callable(i)
891+func setI (k,v) = if ((toString(i.caller) != strf(this, ada())))
892+ then pd
893+ else [IntegerEntry(k, v)]
894+
895+
896+
897+@Callable(i)
898+func getPoolConfigWrapperREADONLY () = $Tuple2(nil, gpc())
899+
900+
901+
902+@Callable(i)
903+func getAccBalanceWrapperREADONLY (assetId) = $Tuple2(nil, getAccBalance(assetId))
904+
905+
906+
907+@Callable(i)
908+func calcPricesWrapperREADONLY (amAmt,prAmt,lpAmt) = {
909+ let pr = calcPrices(amAmt, prAmt, lpAmt)
910+ $Tuple2(nil, [toString(pr[0]), toString(pr[1]), toString(pr[2])])
911+ }
912+
913+
914+
915+@Callable(i)
916+func fromX18WrapperREADONLY (val,resScaleMult) = $Tuple2(nil, f1(parseBigIntValue(val), resScaleMult))
917+
918+
919+
920+@Callable(i)
921+func toX18WrapperREADONLY (origVal,origScaleMult) = $Tuple2(nil, toString(t1(origVal, origScaleMult)))
922+
923+
924+
925+@Callable(i)
926+func calcPriceBigIntWrapperREADONLY (prAmtX18,amAmtX18) = $Tuple2(nil, toString(cpbi(parseBigIntValue(prAmtX18), parseBigIntValue(amAmtX18))))
927+
928+
929+
930+@Callable(i)
931+func estimatePutOperationWrapperREADONLY (txId58,slippage,inAmAmt,inAmId,inPrAmt,inPrId,usrAddr,isEval,emitLp) = $Tuple2(nil, epo(txId58, slippage, inAmAmt, inAmId, inPrAmt, inPrId, usrAddr, isEval, emitLp, false, 0, ""))
932+
933+
934+
935+@Callable(i)
936+func estimateGetOperationWrapperREADONLY (txId58,pmtAsId,pmtLpAmt,usrAddr) = {
937+ let r = ego(txId58, pmtAsId, pmtLpAmt, addressFromStringValue(usrAddr))
938+ $Tuple2(nil, $Tuple10(r._1, r._2, r._3, r._4, r._5, r._6, r._7, toString(r._8), r._9, r._10))
939+ }
940+
941+
942+@Verifier(tx)
943+func verify () = {
944+ let targetPublicKey = match m() {
945+ case pk: ByteVector =>
946+ pk
947+ case _: Unit =>
948+ tx.senderPublicKey
949+ case _ =>
950+ throw("Match error")
951+ }
952+ match tx {
953+ case order: Order =>
954+ let matcherPub = mp()
955+ let orderValid = moa(order)
956+ let senderValid = sigVerify(order.bodyBytes, order.proofs[0], order.senderPublicKey)
957+ let matcherValid = sigVerify(order.bodyBytes, order.proofs[1], matcherPub)
958+ if (if (if (orderValid)
959+ then senderValid
960+ else false)
961+ then matcherValid
962+ else false)
963+ then true
964+ else toe(orderValid, senderValid, matcherValid)
965+ case s: SetScriptTransaction =>
966+ let newHash = blake2b256(value(s.script))
967+ let allowedHash = fromBase64String(value(getString(fca, keyAllowedLpStableScriptHash())))
968+ let currentHash = scriptHash(this)
969+ if (if ((allowedHash == newHash))
970+ then (currentHash != newHash)
971+ else false)
972+ then true
973+ else sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey)
974+ case _ =>
975+ sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey)
976+ }
977+ }
978+

github/deemru/w8io/169f3d6 
66.59 ms