tx · HoBkWVKfhCY6CT6o9pJa5Bh7BoXNyyzXueiTkoJ9xrXH

3NAefciWv6f9fWvEXdGgpHfanJFG8HqfjuT:  -0.01400000 Waves

2022.03.05 11:38 [1950435] smart account 3NAefciWv6f9fWvEXdGgpHfanJFG8HqfjuT > SELF 0.00000000 Waves

{ "type": 13, "id": "HoBkWVKfhCY6CT6o9pJa5Bh7BoXNyyzXueiTkoJ9xrXH", "fee": 1400000, "feeAssetId": null, "timestamp": 1646469573559, "version": 1, "sender": "3NAefciWv6f9fWvEXdGgpHfanJFG8HqfjuT", "senderPublicKey": "D1BL65meykxFZTCuq7jq9HSGLLnWvQamQPUNrguW5w39", "proofs": [ "2CTF7AEe8Z2be6BUTETD7w1zuzLHaZt2dwQeRaKLXQKdELMb4miowvgqEVKjMCnxzuiCL8ohFiQqYF4C9c6C7dzF" ], "script": "base64:AAIFAAAAAAAAAHMIAhIDCgEIEgMKAQgSABIECgIBBBIHCgUBAQEBBBIDCgEBEgASBwoFAQEBCAESBAoCAQESAwoBARIECgIICBIAEgMKAQgSBQoDAQEBEgQKAggBEgQKAgEBEgQKAggIEgsKCQgBAQIBAggEBBIGCgQICAEIAAAASQAAAAAGc2NhbGU4AAAAAAAF9eEAAAAAAAxzY2FsZThCaWdJbnQJAAE2AAAAAQAAAAAABfXhAAAAAAAHc2NhbGUxOAkAATYAAAABAA3gtrOnZAAAAAAAAAp6ZXJvQmlnSW50CQABNgAAAAEAAAAAAAAAAAAAAAAACW9uZUJpZ0ludAkAATYAAAABAAAAAAAAAAABAAAAAApzbGlwcGFnZTRECQABNgAAAAEJAABlAAAAAgUAAAAGc2NhbGU4CQAAaQAAAAIJAABoAAAAAgUAAAAGc2NhbGU4AAAAAAAAAAABBQAAAAZzY2FsZTgAAAAABUFtdWx0AgAAAAMxMDAAAAAABURjb252AgAAAAExAAAAAANTRVACAAAAAl9fAAAAAAVFTVBUWQIAAAAAAAAAAApQb29sQWN0aXZlAAAAAAAAAAABAAAAAApQb29sUHV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AAABW9yZGVyAAAABnByb29mcwAAAAAAAAAAAQUAAAAHbXRjaFB1YgMDAwUAAAADb3JWBQAAAAVzbmRyVgcFAAAABW10Y2hWBwYJAQAAAAN0b2UAAAADBQAAAANvclYFAAAABXNuZHJWBQAAAAVtdGNoVgQAAAAPdGFyZ2V0UHVibGljS2V5BAAAAAckbWF0Y2gxCQEAAAABbQAAAAADCQAAAQAAAAIFAAAAByRtYXRjaDECAAAACkJ5dGVWZWN0b3IEAAAAAnBrBQAAAAckbWF0Y2gxBQAAAAJwawMJAAABAAAAAgUAAAAHJG1hdGNoMQIAAAAEVW5pdAgFAAAAAnR4AAAAD3NlbmRlclB1YmxpY0tleQkAAAIAAAABAgAAAAtNYXRjaCBlcnJvcgkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAAFAAAAD3RhcmdldFB1YmxpY0tleVF8+x8=", "chainId": 84, "height": 1950435, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 4MTC5ZxvRo4oqDpLsiALQX3ixB41kpBUAfJa7fTKxMP5 Next: H6HZXTixTucinKTV6qeUaDY6LuWug6aKXWXxURTf5AEY Diff:
OldNewDifferences
5353
5454 let idxFactGwxRewCntr = 10
5555
56-func toX18 (origVal,origScaleMult) = fraction(toBigInt(origVal), scale18, toBigInt(origScaleMult))
56+func t1 (origVal,origScaleMult) = fraction(toBigInt(origVal), scale18, toBigInt(origScaleMult))
5757
5858
59-func fromX18 (val,resultScaleMult) = toInt(fraction(val, toBigInt(resultScaleMult), scale18))
59+func f1 (val,resultScaleMult) = toInt(fraction(val, toBigInt(resultScaleMult), scale18))
6060
6161
62-func toScale (amt,resScale,curScale) = fraction(amt, resScale, curScale)
62+func ts (amt,resScale,curScale) = fraction(amt, resScale, curScale)
6363
6464
6565 func abs (val) = if ((zeroBigInt > val))
6767 else val
6868
6969
70-func keyFactCntr () = "%s__factoryContract"
70+func fc () = "%s__factoryContract"
7171
7272
73-func keyManPubKey () = "%s__managerPublicKey"
73+func mpk () = "%s__managerPublicKey"
7474
7575
76-func keyPriceLast () = "%s%s__price__last"
76+func pmpk () = "%s__pendingManagerPublicKey"
7777
7878
79-func keyPriceHistory (h,t) = makeString(["%s%s%d%d__price__history", toString(h), toString(t)], SEP)
79+func pl () = "%s%s__price__last"
8080
8181
82-func keyPutActionByUser (ua,txId) = ((("%s%s%s__P__" + ua) + "__") + txId)
82+func ph (h,t) = makeString(["%s%s%d%d__price__history", toString(h), toString(t)], SEP)
8383
8484
85-func keyGetActionByUser (ua,txId) = ((("%s%s%s__G__" + ua) + "__") + txId)
85+func pau (ua,txId) = ((("%s%s%s__P__" + ua) + "__") + txId)
8686
8787
88-func keyAmtAsset () = "%s__amountAsset"
88+func gau (ua,txId) = ((("%s%s%s__G__" + ua) + "__") + txId)
8989
9090
91-func keyPriceAsset () = "%s__priceAsset"
91+func aa () = "%s__amountAsset"
9292
9393
94-func keyAmplificator () = "%s__amp"
94+func pa () = "%s__priceAsset"
9595
9696
97-func keyAddonAddr () = "%s__addonAddr"
97+func amp () = "%s__amp"
9898
9999
100-func keyFactoryConfig () = "%s__factoryConfig"
100+func ada () = "%s__addonAddr"
101101
102102
103-func keyMatcherPub () = "%s%s__matcher__publicKey"
103+func fcfg () = "%s__factoryConfig"
104104
105105
106-func keyPoolConfig (iAmtAs,iPrAs) = (((("%d%d%s__" + iAmtAs) + "__") + iPrAs) + "__config")
106+func mtpk () = "%s%s__matcher__publicKey"
107107
108108
109-func keyMappingsBaseAsset2internalId (bAStr) = ("%s%s%s__mappings__baseAsset2internalId__" + bAStr)
109+func pc (iAmtAs,iPrAs) = (((("%d%d%s__" + iAmtAs) + "__") + iPrAs) + "__config")
110110
111111
112-func keyAllPoolsShutdown () = "%s__shutdown"
112+func mba (bAStr) = ("%s%s%s__mappings__baseAsset2internalId__" + bAStr)
113113
114114
115-func keyPoolWeight (p) = ("%s%s__poolWeight__" + p)
115+func aps () = "%s__shutdown"
116116
117117
118-func throwOrderError (orV,sendrV,matchV) = throw(((((("Failed: ordValid=" + toString(orV)) + " sndrValid=") + toString(sendrV)) + " mtchrValid=") + toString(matchV)))
118+func toe (orV,sendrV,matchV) = throw(((((("Failed: ordValid=" + toString(orV)) + " sndrValid=") + toString(sendrV)) + " mtchrValid=") + toString(matchV)))
119119
120120
121-func asString (val) = match val {
121+func str (val) = match val {
122122 case valStr: String =>
123123 valStr
124124 case _ =>
126126 }
127127
128128
129-func getStringOrFail (addr,key) = valueOrErrorMessage(getString(addr, key), makeString(["mandatory ", toString(addr), ".", key, " not defined"], ""))
129+func strf (addr,key) = valueOrErrorMessage(getString(addr, key), makeString(["mandatory ", toString(addr), ".", key, " not defined"], ""))
130130
131131
132-func getIntOrFail (addr,key) = valueOrErrorMessage(getInteger(addr, key), makeString(["mandatory ", toString(addr), ".", key, " not defined"], ""))
132+func intf (addr,key) = valueOrErrorMessage(getInteger(addr, key), makeString(["mandatory ", toString(addr), ".", key, " not defined"], ""))
133133
134134
135-let factoryContract = addressFromStringValue(getStringOrFail(this, keyFactCntr()))
135+let fca = addressFromStringValue(strf(this, fc()))
136136
137-let A = getStringOrFail(this, keyAmplificator())
137+let A = strf(this, amp())
138138
139-func isGlobalShutdown () = valueOrElse(getBoolean(factoryContract, keyAllPoolsShutdown()), false)
139+func igs () = valueOrElse(getBoolean(fca, aps()), false)
140140
141141
142-func getMatcherPubOrFail () = fromBase58String(getStringOrFail(factoryContract, keyMatcherPub()))
142+func mp () = fromBase58String(strf(fca, mtpk()))
143143
144144
145-func getPoolConfig () = {
146- let amtAs = getStringOrFail(this, keyAmtAsset())
147- let priceAs = getStringOrFail(this, keyPriceAsset())
148- let iPriceAs = getIntOrFail(factoryContract, keyMappingsBaseAsset2internalId(priceAs))
149- let iAmtAs = getIntOrFail(factoryContract, keyMappingsBaseAsset2internalId(amtAs))
150- split(getStringOrFail(factoryContract, keyPoolConfig(toString(iAmtAs), toString(iPriceAs))), SEP)
145+func gpc () = {
146+ let amtAs = strf(this, aa())
147+ let priceAs = strf(this, pa())
148+ let iPriceAs = intf(fca, mba(priceAs))
149+ let iAmtAs = intf(fca, mba(amtAs))
150+ split(strf(fca, pc(toString(iAmtAs), toString(iPriceAs))), SEP)
151151 }
152152
153153
154-func getFactoryConfig () = split(getStringOrFail(factoryContract, keyFactoryConfig()), SEP)
154+func gfc () = split(strf(fca, fcfg()), SEP)
155155
156156
157157 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)
165165 else assetBalance(this, fromBase58String(assetId))
166166
167167
168-func calcPriceBigInt (prAmtX18,amAmtX18) = fraction(prAmtX18, scale18, amAmtX18)
168+func cpbi (prAmtX18,amAmtX18) = fraction(prAmtX18, scale18, amAmtX18)
169169
170170
171-func validateAbsDiff (A1,A2,slippage) = {
171+func vad (A1,A2,slippage) = {
172172 let diff = fraction((A1 - A2), scale8BigInt, A2)
173173 let pass = ((slippage - abs(diff)) > zeroBigInt)
174174 if (!(pass))
177177 }
178178
179179
180-func validateD (D1,D0,slpg) = {
180+func vd (D1,D0,slpg) = {
181181 let diff = fraction(D0, scale8BigInt, D1)
182182 let fail = (slpg > diff)
183183 if (if (fail)
188188 }
189189
190190
191-func privateCalcPrice (amAssetDcm,prAssetDcm,amAmt,prAmt) = {
192- let amtAsAmtX18 = toX18(amAmt, amAssetDcm)
193- let prAsAmtX18 = toX18(prAmt, prAssetDcm)
194- calcPriceBigInt(prAsAmtX18, amtAsAmtX18)
191+func pcp (amAssetDcm,prAssetDcm,amAmt,prAmt) = {
192+ let amtAsAmtX18 = t1(amAmt, amAssetDcm)
193+ let prAsAmtX18 = t1(prAmt, prAssetDcm)
194+ cpbi(prAsAmtX18, amtAsAmtX18)
195195 }
196196
197197
198198 func calcPrices (amAmt,prAmt,lpAmt) = {
199- let cfg = getPoolConfig()
199+ let cfg = gpc()
200200 let amtAsDcm = parseIntValue(cfg[idxAmtAsDcm])
201201 let prAsDcm = parseIntValue(cfg[idxPriceAsDcm])
202- let priceX18 = privateCalcPrice(amtAsDcm, prAsDcm, amAmt, prAmt)
203- let amAmtX18 = toX18(amAmt, amtAsDcm)
204- let prAmtX18 = toX18(prAmt, prAsDcm)
205- let lpAmtX18 = toX18(lpAmt, scale8)
206- let lpPrInAmAsX18 = calcPriceBigInt(amAmtX18, lpAmtX18)
207- let lpPrInPrAsX18 = calcPriceBigInt(prAmtX18, lpAmtX18)
202+ let priceX18 = pcp(amtAsDcm, prAsDcm, amAmt, prAmt)
203+ let amAmtX18 = t1(amAmt, amtAsDcm)
204+ let prAmtX18 = t1(prAmt, prAsDcm)
205+ let lpAmtX18 = t1(lpAmt, scale8)
206+ let lpPrInAmAsX18 = cpbi(amAmtX18, lpAmtX18)
207+ let lpPrInPrAsX18 = cpbi(prAmtX18, lpAmtX18)
208208 [priceX18, lpPrInAmAsX18, lpPrInPrAsX18]
209209 }
210210
211211
212212 func calculatePrices (amAmt,prAmt,lpAmt) = {
213213 let p = calcPrices(amAmt, prAmt, lpAmt)
214-[fromX18(p[0], scale8), fromX18(p[1], scale8), fromX18(p[2], scale8)]
214+[f1(p[0], scale8), f1(p[1], scale8), f1(p[2], scale8)]
215215 }
216216
217217
218-func estimateGetOperation (txId58,pmtAssetId,pmtLpAmt,userAddress) = {
219- let cfg = getPoolConfig()
218+func ego (txId58,pmtAssetId,pmtLpAmt,userAddress) = {
219+ let cfg = gpc()
220220 let lpId = cfg[idxLPAsId]
221221 let amId = cfg[idxAmAsId]
222222 let prId = cfg[idxPrAsId]
228228 then throw("Wrong pmt asset")
229229 else {
230230 let amBalance = getAccBalance(amId)
231- let amBalanceX18 = toX18(amBalance, amDcm)
231+ let amBalanceX18 = t1(amBalance, amDcm)
232232 let prBalance = getAccBalance(prId)
233- let prBalanceX18 = toX18(prBalance, prDcm)
234- let curPriceX18 = calcPriceBigInt(prBalanceX18, amBalanceX18)
235- let curPrice = fromX18(curPriceX18, scale8)
236- let pmtLpAmtX18 = toX18(pmtLpAmt, scale8)
237- let lpEmissX18 = toX18(lpEmiss, scale8)
233+ let prBalanceX18 = t1(prBalance, prDcm)
234+ let curPriceX18 = cpbi(prBalanceX18, amBalanceX18)
235+ let curPrice = f1(curPriceX18, scale8)
236+ let pmtLpAmtX18 = t1(pmtLpAmt, scale8)
237+ let lpEmissX18 = t1(lpEmiss, scale8)
238238 let outAmAmtX18 = fraction(amBalanceX18, pmtLpAmtX18, lpEmissX18)
239239 let outPrAmtX18 = fraction(prBalanceX18, pmtLpAmtX18, lpEmissX18)
240- let outAmAmt = fromX18(outAmAmtX18, amDcm)
241- let outPrAmt = fromX18(outPrAmtX18, prDcm)
240+ let outAmAmt = f1(outAmAmtX18, amDcm)
241+ let outPrAmt = f1(outPrAmtX18, prDcm)
242242 let state = if ((txId58 == ""))
243243 then nil
244244 else [ScriptTransfer(userAddress, outAmAmt, if ((amId == "WAVES"))
245245 then unit
246246 else fromBase58String(amId)), ScriptTransfer(userAddress, outPrAmt, if ((prId == "WAVES"))
247247 then unit
248- else fromBase58String(prId)), StringEntry(keyGetActionByUser(toString(userAddress), txId58), dataGetActionInfo(outAmAmt, outPrAmt, pmtLpAmt, curPrice, height, lastBlock.timestamp)), IntegerEntry(keyPriceLast(), curPrice), IntegerEntry(keyPriceHistory(height, lastBlock.timestamp), curPrice)]
248+ 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)]
249249 $Tuple10(outAmAmt, outPrAmt, amId, prId, amBalance, prBalance, lpEmiss, curPriceX18, sts, state)
250250 }
251251 }
252252
253253
254-func estimatePutOperation (txId58,slippage,inAmAmt,inAmId,inPrAmt,inPrId,userAddress,isEval,emitLp,isOneAsset,pmtAmt,pmtId) = {
255- let cfg = getPoolConfig()
254+func epo (txId58,slippage,inAmAmt,inAmId,inPrAmt,inPrId,userAddress,isEval,emitLp,isOneAsset,pmtAmt,pmtId) = {
255+ let cfg = gpc()
256256 let lpId = fromBase58String(cfg[idxLPAsId])
257257 let amIdStr = cfg[idxAmAsId]
258258 let prIdStr = cfg[idxPrAsId]
280280 else if (isOneAsset)
281281 then getAccBalance(prIdStr)
282282 else (getAccBalance(prIdStr) - inPrAmt)
283- let inAmAssetAmtX18 = toX18(inAmAmt, amtDcm)
284- let inPrAssetAmtX18 = toX18(inPrAmt, priceDcm)
285- let userPriceX18 = calcPriceBigInt(inPrAssetAmtX18, inAmAssetAmtX18)
286- let amBalanceX18 = toX18(amBalance, amtDcm)
287- let prBalanceX18 = toX18(prBalance, priceDcm)
288- let res = if ((lpEm == 0))
283+ let inAmAssetAmtX18 = t1(inAmAmt, amtDcm)
284+ let inPrAssetAmtX18 = t1(inPrAmt, priceDcm)
285+ let userPriceX18 = cpbi(inPrAssetAmtX18, inAmAssetAmtX18)
286+ let amBalanceX18 = t1(amBalance, amtDcm)
287+ let prBalanceX18 = t1(prBalance, priceDcm)
288+ let r = if ((lpEm == 0))
289289 then {
290290 let curPriceX18 = zeroBigInt
291291 let slippageX18 = zeroBigInt
292292 let lpAmtX18 = pow((inAmAssetAmtX18 * inPrAssetAmtX18), 0, toBigInt(5), 1, 0, DOWN)
293- $Tuple5(fromX18(lpAmtX18, scale8), fromX18(inAmAssetAmtX18, amtDcm), fromX18(inPrAssetAmtX18, priceDcm), calcPriceBigInt((prBalanceX18 + inPrAssetAmtX18), (amBalanceX18 + inAmAssetAmtX18)), slippageX18)
293+ $Tuple5(f1(lpAmtX18, scale8), f1(inAmAssetAmtX18, amtDcm), f1(inPrAssetAmtX18, priceDcm), cpbi((prBalanceX18 + inPrAssetAmtX18), (amBalanceX18 + inAmAssetAmtX18)), slippageX18)
294294 }
295295 else {
296- let curPriceX18 = calcPriceBigInt(prBalanceX18, amBalanceX18)
296+ let curPriceX18 = cpbi(prBalanceX18, amBalanceX18)
297297 let slippageRealX18 = fraction(abs((curPriceX18 - userPriceX18)), scale18, curPriceX18)
298- let slippageX18 = toX18(slippage, scale8)
298+ let slippageX18 = t1(slippage, scale8)
299299 if (if ((curPriceX18 != zeroBigInt))
300300 then (slippageRealX18 > slippageX18)
301301 else false)
302302 then throw(((("Price slippage " + toString(slippageRealX18)) + " > ") + toString(slippageX18)))
303303 else {
304- let lpEmissionX18 = toX18(lpEm, scale8)
304+ let lpEmissionX18 = t1(lpEm, scale8)
305305 let prViaAmX18 = fraction(inAmAssetAmtX18, curPriceX18, scale18)
306306 let amViaPrX18 = fraction(inPrAssetAmtX18, scale18, curPriceX18)
307307 let expectedAmts = if ((prViaAmX18 > inPrAssetAmtX18))
310310 let expAmtAssetAmtX18 = expectedAmts._1
311311 let expPriceAssetAmtX18 = expectedAmts._2
312312 let lpAmtX18 = fraction(lpEmissionX18, expPriceAssetAmtX18, prBalanceX18)
313- $Tuple5(fromX18(lpAmtX18, scale8), fromX18(expAmtAssetAmtX18, amtDcm), fromX18(expPriceAssetAmtX18, priceDcm), curPriceX18, slippageX18)
313+ $Tuple5(f1(lpAmtX18, scale8), f1(expAmtAssetAmtX18, amtDcm), f1(expPriceAssetAmtX18, priceDcm), curPriceX18, slippageX18)
314314 }
315315 }
316- let calcLpAmt = res._1
317- let calcAmAssetPmt = res._2
318- let calcPrAssetPmt = res._3
319- let curPrice = fromX18(res._4, scale8)
320- let slippageCalc = fromX18(res._5, scale8)
316+ let calcLpAmt = r._1
317+ let calcAmAssetPmt = r._2
318+ let calcPrAssetPmt = r._3
319+ let curPrice = f1(r._4, scale8)
320+ let slippageCalc = f1(r._5, scale8)
321321 if ((0 >= calcLpAmt))
322322 then throw("LP <= 0")
323323 else {
326326 else calcLpAmt
327327 let amDiff = (inAmAmt - calcAmAssetPmt)
328328 let prDiff = (inPrAmt - calcPrAssetPmt)
329- let $t01585816203 = if (if (isOneAsset)
329+ let $t01529615641 = if (if (isOneAsset)
330330 then (pmtId == amIdStr)
331331 else false)
332332 then $Tuple2(pmtAmt, 0)
335335 else false)
336336 then $Tuple2(0, pmtAmt)
337337 else $Tuple2(calcAmAssetPmt, calcPrAssetPmt)
338- let writeAmAmt = $t01585816203._1
339- let writePrAmt = $t01585816203._2
340- let commonState = [IntegerEntry(keyPriceLast(), curPrice), IntegerEntry(keyPriceHistory(height, lastBlock.timestamp), curPrice), StringEntry(keyPutActionByUser(userAddress, txId58), dataPutActionInfo(writeAmAmt, writePrAmt, emitLpAmt, curPrice, slippage, slippageCalc, height, lastBlock.timestamp, amDiff, prDiff))]
338+ let writeAmAmt = $t01529615641._1
339+ let writePrAmt = $t01529615641._2
340+ 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))]
341341 $Tuple13(calcLpAmt, emitLpAmt, curPrice, amBalance, prBalance, lpEm, lpId, sts, commonState, amDiff, prDiff, inAmId, inPrId)
342342 }
343343 }
344344
345345
346-func validateMatcherOrderAllowed (order) = {
347- let cfg = getPoolConfig()
346+func moa (order) = {
347+ let cfg = gpc()
348348 let amtAsId = cfg[idxAmAsId]
349349 let prAsId = cfg[idxPrAsId]
350350 let sts = parseIntValue(cfg[idxPoolSt])
353353 let accAmtAsBalance = getAccBalance(amtAsId)
354354 let accPrAsBalance = getAccBalance(prAsId)
355355 let curPriceX18 = if ((order.orderType == Buy))
356- then privateCalcPrice(amtAsDcm, prAsDcm, (accAmtAsBalance + order.amount), accPrAsBalance)
357- else privateCalcPrice(amtAsDcm, prAsDcm, (accAmtAsBalance - order.amount), accPrAsBalance)
358- let curPrice = fromX18(curPriceX18, scale8)
359- if (if (if (isGlobalShutdown())
356+ then pcp(amtAsDcm, prAsDcm, (accAmtAsBalance + order.amount), accPrAsBalance)
357+ else pcp(amtAsDcm, prAsDcm, (accAmtAsBalance - order.amount), accPrAsBalance)
358+ let curPrice = f1(curPriceX18, scale8)
359+ if (if (if (igs())
360360 then true
361361 else (sts == PoolMatcherDis))
362362 then true
378378 else {
379379 let orderPrice = order.price
380380 let priceDcm = fraction(scale8, prAsDcm, amtAsDcm)
381- let castOrderPrice = toScale(orderPrice, scale8, priceDcm)
381+ let castOrderPrice = ts(orderPrice, scale8, priceDcm)
382382 let isOrderPriceValid = if ((order.orderType == Buy))
383383 then (curPrice >= castOrderPrice)
384384 else (castOrderPrice >= curPrice)
388388 }
389389
390390
391-func commonGet (i) = if ((size(i.payments) != 1))
391+func cg (i) = if ((size(i.payments) != 1))
392392 then throw("1 pmnt exp")
393393 else {
394394 let pmt = value(i.payments[0])
395395 let pmtAssetId = value(pmt.assetId)
396396 let pmtAmt = pmt.amount
397- let res = estimateGetOperation(toBase58String(i.transactionId), toBase58String(pmtAssetId), pmtAmt, i.caller)
398- let outAmAmt = res._1
399- let outPrAmt = res._2
400- let sts = parseIntValue(res._9)
401- let state = res._10
402- if (if (isGlobalShutdown())
397+ let r = ego(toBase58String(i.transactionId), toBase58String(pmtAssetId), pmtAmt, i.caller)
398+ let outAmAmt = r._1
399+ let outPrAmt = r._2
400+ let sts = parseIntValue(r._9)
401+ let state = r._10
402+ if (if (igs())
403403 then true
404404 else (sts == PoolShutdown))
405405 then throw(("Admin blocked: " + toString(sts)))
407407 }
408408
409409
410-func commonPut (caller,txId,amAsPmt,prAsPmt,slippage,emitLp,isOneAsset,pmtAmt,pmtId) = {
411- let r = estimatePutOperation(txId, slippage, value(amAsPmt).amount, value(amAsPmt).assetId, value(prAsPmt).amount, value(prAsPmt).assetId, caller, false, emitLp, isOneAsset, pmtAmt, pmtId)
410+func cp (caller,txId,amAsPmt,prAsPmt,slippage,emitLp,isOneAsset,pmtAmt,pmtId) = {
411+ let r = epo(txId, slippage, value(amAsPmt).amount, value(amAsPmt).assetId, value(prAsPmt).amount, value(prAsPmt).assetId, caller, false, emitLp, isOneAsset, pmtAmt, pmtId)
412412 let sts = parseIntValue(r._8)
413- if (if (if (isGlobalShutdown())
413+ if (if (if (igs())
414414 then true
415415 else (sts == PoolPutDis))
416416 then true
420420 }
421421
422422
423+func m () = match getString(mpk()) {
424+ case s: String =>
425+ fromBase58String(s)
426+ case _: Unit =>
427+ unit
428+ case _ =>
429+ throw("Match error")
430+}
431+
432+
433+func pm () = match getString(pmpk()) {
434+ case s: String =>
435+ fromBase58String(s)
436+ case _: Unit =>
437+ unit
438+ case _ =>
439+ throw("Match error")
440+}
441+
442+
443+func mm (i) = {
444+ let pd = throw("Permission denied")
445+ match m() {
446+ case pk: ByteVector =>
447+ if ((i.callerPublicKey == pk))
448+ then true
449+ else pd
450+ case _: Unit =>
451+ if ((i.caller == this))
452+ then true
453+ else pd
454+ case _ =>
455+ throw("Match error")
456+ }
457+ }
458+
459+
423460 @Callable(i)
424-func constructor (factoryContract,managerPublicKey) = if ((i.caller != this))
425- then throw("denied")
426- else [StringEntry(keyFactCntr(), factoryContract), StringEntry(keyManPubKey(), managerPublicKey)]
461+func constructor (fc) = {
462+ let c = mm(i)
463+ if ((c == c))
464+ then [StringEntry(fc(), fc)]
465+ else throw("Strict value is not equal to itself.")
466+ }
467+
468+
469+
470+@Callable(i)
471+func setManager (pendingManagerPublicKey) = {
472+ let c = mm(i)
473+ if ((c == c))
474+ then {
475+ let cm = fromBase58String(pendingManagerPublicKey)
476+ if ((cm == cm))
477+ then [StringEntry(pmpk(), pendingManagerPublicKey)]
478+ else throw("Strict value is not equal to itself.")
479+ }
480+ else throw("Strict value is not equal to itself.")
481+ }
482+
483+
484+
485+@Callable(i)
486+func confirmManager () = {
487+ let p = pm()
488+ let hpm = if (isDefined(p))
489+ then true
490+ else throw("No pending manager")
491+ if ((hpm == hpm))
492+ then {
493+ let cpm = if ((i.callerPublicKey == value(p)))
494+ then true
495+ else throw("You are not pending manager")
496+ if ((cpm == cpm))
497+ then [StringEntry(mpk(), toBase58String(value(p))), DeleteEntry(pmpk())]
498+ else throw("Strict value is not equal to itself.")
499+ }
500+ else throw("Strict value is not equal to itself.")
501+ }
427502
428503
429504
430505 @Callable(i)
431506 func put (slip,autoStake) = {
432- let factCfg = getFactoryConfig()
507+ let factCfg = gfc()
433508 let stakingCntr = valueOrErrorMessage(addressFromString(factCfg[idxFactStakCntr]), "Wr st addr")
434509 let slipCntr = valueOrErrorMessage(addressFromString(factCfg[idxFactSlippCntr]), "Wr sl addr")
435510 if ((0 > slip))
437512 else if ((size(i.payments) != 2))
438513 then throw("2 pmnts expd")
439514 else {
440- let estPut = commonPut(toString(i.caller), toBase58String(i.transactionId), AttachedPayment(value(i.payments[0]).assetId, value(i.payments[0]).amount), i.payments[1], slip, true, false, 0, "")
441- let emitLpAmt = estPut._2
442- let lpAssetId = estPut._7
443- let state = estPut._9
444- let amDiff = estPut._10
445- let prDiff = estPut._11
446- let amId = estPut._12
447- let prId = estPut._13
448- let emitInv = invoke(factoryContract, "emit", [emitLpAmt], nil)
449- if ((emitInv == emitInv))
515+ 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, "")
516+ let emitLpAmt = e._2
517+ let lpAssetId = e._7
518+ let state = e._9
519+ let amDiff = e._10
520+ let prDiff = e._11
521+ let amId = e._12
522+ let prId = e._13
523+ let r = invoke(fca, "emit", [emitLpAmt], nil)
524+ if ((r == r))
450525 then {
451- let slippageAInv = if ((amDiff > 0))
452- then invoke(slipCntr, "put", nil, [AttachedPayment(amId, amDiff)])
453- else nil
454- if ((slippageAInv == slippageAInv))
526+ let el = match r {
527+ case legacy: Address =>
528+ invoke(legacy, "emit", [emitLpAmt], nil)
529+ case _ =>
530+ unit
531+ }
532+ if ((el == el))
455533 then {
456- let slippagePInv = if ((prDiff > 0))
457- then invoke(slipCntr, "put", nil, [AttachedPayment(prId, prDiff)])
534+ let sa = if ((amDiff > 0))
535+ then invoke(slipCntr, "put", nil, [AttachedPayment(amId, amDiff)])
458536 else nil
459- if ((slippagePInv == slippagePInv))
537+ if ((sa == sa))
460538 then {
461- let lpTrnsfr = if (autoStake)
539+ let sp = if ((prDiff > 0))
540+ then invoke(slipCntr, "put", nil, [AttachedPayment(prId, prDiff)])
541+ else nil
542+ if ((sp == sp))
462543 then {
463- let slpStakeInv = invoke(stakingCntr, "stake", nil, [AttachedPayment(lpAssetId, emitLpAmt)])
464- if ((slpStakeInv == slpStakeInv))
465- then nil
466- else throw("Strict value is not equal to itself.")
544+ let lpTrnsfr = if (autoStake)
545+ then {
546+ let ss = invoke(stakingCntr, "stake", nil, [AttachedPayment(lpAssetId, emitLpAmt)])
547+ if ((ss == ss))
548+ then nil
549+ else throw("Strict value is not equal to itself.")
550+ }
551+ else [ScriptTransfer(i.caller, emitLpAmt, lpAssetId)]
552+ (state ++ lpTrnsfr)
467553 }
468- else [ScriptTransfer(i.caller, emitLpAmt, lpAssetId)]
469- (state ++ lpTrnsfr)
554+ else throw("Strict value is not equal to itself.")
470555 }
471556 else throw("Strict value is not equal to itself.")
472557 }
480565
481566 @Callable(i)
482567 func putOneTkn (amAssetPart,prAssetPart,outLp,slippage,autoStake) = {
483- let cfg = getFactoryConfig()
568+ let cfg = gfc()
484569 let stakingCntr = valueOrErrorMessage(addressFromString(cfg[idxFactStakCntr]), "Wr st addr")
485570 let slipCntr = valueOrErrorMessage(addressFromString(cfg[idxFactSlippCntr]), "Wr sl addr")
486571 let gwxCntr = valueOrErrorMessage(addressFromString(cfg[idxFactGwxRewCntr]), "Wr gwx addr")
487- let poolCfg = getPoolConfig()
572+ let poolCfg = gpc()
488573 let amId = poolCfg[idxAmAsId]
489574 let prId = poolCfg[idxPrAsId]
490575 let amDcm = parseIntValue(poolCfg[idxAmtAsDcm])
512597 else {
513598 let amBalance = getAccBalance(amId)
514599 let prBalance = getAccBalance(prId)
515- let $t02394424324 = if ((pmtAssetId == amId))
600+ let $t02418924569 = if ((pmtAssetId == amId))
516601 then $Tuple6((amBalance - pmtAmt), prBalance, (pmtAmt - amAssetPart), prAssetPart, 0, 0)
517602 else if ((pmtAssetId == prId))
518603 then $Tuple6(amBalance, (prBalance - pmtAmt), 0, 0, (pmtAmt - prAssetPart), amAssetPart)
519604 else throw("wrong pmtAssetId")
520- let amBalanceNow = $t02394424324._1
521- let prBalanceNow = $t02394424324._2
522- let virtSwapInAm = $t02394424324._3
523- let virtSwapOutPr = $t02394424324._4
524- let virtSwapInPr = $t02394424324._5
525- let virtSwapOutAm = $t02394424324._6
605+ let amBalanceNow = $t02418924569._1
606+ let prBalanceNow = $t02418924569._2
607+ let virtSwapInAm = $t02418924569._3
608+ let virtSwapOutPr = $t02418924569._4
609+ let virtSwapInPr = $t02418924569._5
610+ let virtSwapOutAm = $t02418924569._6
526611 let D0 = invoke(gwxCntr, "calcD", [toString(amBalanceNow), toString(prBalanceNow), A, Amult, Dconv], nil)
527612 let D1 = invoke(gwxCntr, "calcD", [toString(toBigInt(((amBalanceNow + virtSwapInAm) - virtSwapOutAm))), toString(toBigInt(((prBalanceNow + virtSwapInPr) - virtSwapOutPr))), A, Amult, Dconv], nil)
528- let D0vsD1 = validateD(parseBigIntValue(asString(D1)), parseBigIntValue(asString(D0)), slippage4D)
613+ let D0vsD1 = vd(parseBigIntValue(str(D1)), parseBigIntValue(str(D0)), slippage4D)
529614 if ((D0vsD1 == D0vsD1))
530615 then {
531- let estPut = commonPut(toString(i.caller), toBase58String(i.transactionId), AttachedPayment(fromBase58String(amId), amAssetPart), AttachedPayment(fromBase58String(prId), prAssetPart), slippage, true, true, pmtAmt, pmtAssetId)
616+ let estPut = cp(toString(i.caller), toBase58String(i.transactionId), AttachedPayment(fromBase58String(amId), amAssetPart), AttachedPayment(fromBase58String(prId), prAssetPart), slippage, true, true, pmtAmt, pmtAssetId)
532617 let estimLP = estPut._2
533618 let lpAssetId = estPut._7
534619 let state = estPut._9
535620 let amDiff = estPut._10
536621 let prDiff = estPut._11
537- let lpCalcRes = validateAbsDiff(toBigInt(estimLP), toBigInt(outLp), toBigInt(slippage))
622+ let lpCalcRes = vad(toBigInt(estimLP), toBigInt(outLp), toBigInt(slippage))
538623 let emitLpAmt = toInt(lpCalcRes._2)
539- let emitInv = invoke(factoryContract, "emit", [emitLpAmt], nil)
540- if ((emitInv == emitInv))
624+ let e = invoke(fca, "emit", [emitLpAmt], nil)
625+ if ((e == e))
541626 then {
542- let slippageAInv = if ((amDiff > 0))
543- then invoke(slipCntr, "put", nil, [AttachedPayment(fromBase58String(amId), amDiff)])
544- else nil
545- if ((slippageAInv == slippageAInv))
627+ let el = match e {
628+ case legacy: Address =>
629+ invoke(legacy, "emit", [emitLpAmt], nil)
630+ case _ =>
631+ unit
632+ }
633+ if ((el == el))
546634 then {
547- let slippagePInv = if ((prDiff > 0))
548- then invoke(slipCntr, "put", nil, [AttachedPayment(fromBase58String(prId), prDiff)])
635+ let sa = if ((amDiff > 0))
636+ then invoke(slipCntr, "put", nil, [AttachedPayment(fromBase58String(amId), amDiff)])
549637 else nil
550- if ((slippagePInv == slippagePInv))
638+ if ((sa == sa))
551639 then {
552- let lpTrnsfr = if (autoStake)
640+ let sp = if ((prDiff > 0))
641+ then invoke(slipCntr, "put", nil, [AttachedPayment(fromBase58String(prId), prDiff)])
642+ else nil
643+ if ((sp == sp))
553644 then {
554- let slpStakeInv = invoke(stakingCntr, "stake", nil, [AttachedPayment(lpAssetId, emitLpAmt)])
555- if ((slpStakeInv == slpStakeInv))
556- then nil
557- else throw("Strict value is not equal to itself.")
645+ let lpTrnsfr = if (autoStake)
646+ then {
647+ let ss = invoke(stakingCntr, "stake", nil, [AttachedPayment(lpAssetId, emitLpAmt)])
648+ if ((ss == ss))
649+ then nil
650+ else throw("Strict value is not equal to itself.")
651+ }
652+ else [ScriptTransfer(i.caller, emitLpAmt, lpAssetId)]
653+ (state ++ lpTrnsfr)
558654 }
559- else [ScriptTransfer(i.caller, emitLpAmt, lpAssetId)]
560- (state ++ lpTrnsfr)
655+ else throw("Strict value is not equal to itself.")
561656 }
562657 else throw("Strict value is not equal to itself.")
563658 }
578673 else if ((size(i.payments) != 2))
579674 then throw("2 pmnts expd")
580675 else {
581- let estPut = commonPut(toString(i.caller), toBase58String(i.transactionId), AttachedPayment(value(i.payments[0]).assetId, value(i.payments[0]).amount), i.payments[1], maxSlpg, false, false, 0, "")
676+ 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, "")
582677 estPut._9
583678 }
584679
586681
587682 @Callable(i)
588683 func get () = {
589- let res = commonGet(i)
590- let outAmtAmt = res._1
591- let outPrAmt = res._2
592- let pmtAmt = res._3
593- let pmtAssetId = res._4
594- let state = res._5
595- let burnLPAssetOnFactory = invoke(factoryContract, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
596- if ((burnLPAssetOnFactory == burnLPAssetOnFactory))
684+ let r = cg(i)
685+ let outAmtAmt = r._1
686+ let outPrAmt = r._2
687+ let pmtAmt = r._3
688+ let pmtAssetId = r._4
689+ let state = r._5
690+ let b = invoke(fca, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
691+ if ((b == b))
597692 then state
598693 else throw("Strict value is not equal to itself.")
599694 }
604699 func getOneTkn (exchResult,notUsed,outAmount,outAssetId,slippage) = if ((size(i.payments) != 1))
605700 then throw("1 pmnt expd")
606701 else {
607- let cfg = getPoolConfig()
702+ let cfg = gpc()
608703 let lpId = cfg[idxLPAsId]
609704 let amId = cfg[idxAmAsId]
610705 let prId = cfg[idxPrAsId]
611706 let amDcm = parseIntValue(cfg[idxAmtAsDcm])
612707 let prDcm = parseIntValue(cfg[idxPriceAsDcm])
613708 let sts = cfg[idxPoolSt]
614- let fcfg = getFactoryConfig()
615- let gwxCntr = valueOrErrorMessage(addressFromString(fcfg[idxFactGwxRewCntr]), "Wr sl addr")
709+ let factCfg = gfc()
710+ let gwxCntr = valueOrErrorMessage(addressFromString(factCfg[idxFactGwxRewCntr]), "Wr sl addr")
616711 let pmt = value(i.payments[0])
617- let addon = valueOrElse(getString(this, keyAddonAddr()), "")
712+ let addon = valueOrElse(getString(this, ada()), "")
618713 let userAddress = if ((addon == toString(i.caller)))
619714 then i.originCaller
620715 else i.caller
632727 else if ((lpId != toBase58String(pmtAssetId)))
633728 then throw("Wrong LP")
634729 else {
635- let r = estimateGetOperation(toBase58String(i.transactionId), toBase58String(pmtAssetId), pmtAmt, i.caller)
730+ let r = ego(toBase58String(i.transactionId), toBase58String(pmtAssetId), pmtAmt, i.caller)
636731 let estimAmAmt = r._1
637732 let estimPrAmt = r._2
638733 let amBalance = getAccBalance(amId)
639734 let prBalance = getAccBalance(prId)
640- let $t02909129548 = if ((outAssetId == amId))
735+ let $t02934829805 = if ((outAssetId == amId))
641736 then $Tuple7((amBalance - estimAmAmt), (prBalance - estimPrAmt), exchResult, estimPrAmt, 0, 0, (estimAmAmt + exchResult))
642737 else if ((outAssetId == prId))
643738 then $Tuple7((amBalance - estimAmAmt), (prBalance - estimPrAmt), 0, 0, exchResult, estimAmAmt, (estimPrAmt + exchResult))
644739 else throw("wrong outAssetId")
645- let amBalanceNow = $t02909129548._1
646- let prBalanceNow = $t02909129548._2
647- let virtSwapInAm = $t02909129548._3
648- let virtSwapOutPr = $t02909129548._4
649- let virtSwapInPr = $t02909129548._5
650- let virtSwapOutAm = $t02909129548._6
651- let totalGet = $t02909129548._7
740+ let amBalanceNow = $t02934829805._1
741+ let prBalanceNow = $t02934829805._2
742+ let virtSwapInAm = $t02934829805._3
743+ let virtSwapOutPr = $t02934829805._4
744+ let virtSwapInPr = $t02934829805._5
745+ let virtSwapOutAm = $t02934829805._6
746+ let totalGet = $t02934829805._7
652747 if (if ((0 > virtSwapInAm))
653748 then true
654749 else (0 > virtSwapInPr))
656751 else {
657752 let D0 = invoke(gwxCntr, "calcD", [toString(amBalanceNow), toString(prBalanceNow), A, Amult, Dconv], nil)
658753 let D1 = invoke(gwxCntr, "calcD", [toString(((amBalanceNow - virtSwapInAm) + virtSwapOutAm)), toString(((prBalanceNow + virtSwapOutPr) - virtSwapInPr)), A, Amult, Dconv], nil)
659- let D0vsD1 = validateD(parseBigIntValue(asString(D1)), parseBigIntValue(asString(D0)), slippage4D)
754+ let D0vsD1 = vd(parseBigIntValue(str(D1)), parseBigIntValue(str(D0)), slippage4D)
660755 if ((D0vsD1 == D0vsD1))
661756 then {
662- let finalRes = validateAbsDiff(toBigInt(totalGet), toBigInt(outAmount), toBigInt(slippage))
757+ let finalRes = vad(toBigInt(totalGet), toBigInt(outAmount), toBigInt(slippage))
663758 if ((finalRes == finalRes))
664759 then {
665- let $t03028230386 = if ((outAssetId == amId))
760+ let $t03051030614 = if ((outAssetId == amId))
666761 then $Tuple2(toInt(finalRes._2), 0)
667762 else $Tuple2(0, toInt(finalRes._2))
668- let outAm = $t03028230386._1
669- let outPr = $t03028230386._2
670- let curPrX18 = calcPriceBigInt(toX18(prBalance, prDcm), toX18(amBalance, amDcm))
671- let curPr = fromX18(curPrX18, scale8)
763+ let outAm = $t03051030614._1
764+ let outPr = $t03051030614._2
765+ let curPrX18 = cpbi(t1(prBalance, prDcm), t1(amBalance, amDcm))
766+ let curPr = f1(curPrX18, scale8)
672767 let state = [ScriptTransfer(userAddress, (outAm + outPr), if ((outAssetId == "WAVES"))
673768 then unit
674- else fromBase58String(outAssetId)), StringEntry(keyGetActionByUser(toString(userAddress), txId58), dataGetActionInfo(outAm, outPr, pmtAmt, curPr, height, lastBlock.timestamp)), IntegerEntry(keyPriceLast(), curPr), IntegerEntry(keyPriceHistory(height, lastBlock.timestamp), curPr)]
769+ 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)]
675770 if ((state == state))
676771 then {
677- let burn = invoke(factoryContract, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
772+ let burn = invoke(fca, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
678773 if ((burn == burn))
679774 then state
680775 else throw("Strict value is not equal to itself.")
692787
693788 @Callable(i)
694789 func getNoLess (noLessThenAmtAsset,noLessThenPriceAsset) = {
695- let res = commonGet(i)
696- let outAmAmt = res._1
697- let outPrAmt = res._2
698- let pmtAmt = res._3
699- let pmtAssetId = res._4
700- let state = res._5
790+ let r = cg(i)
791+ let outAmAmt = r._1
792+ let outPrAmt = r._2
793+ let pmtAmt = r._3
794+ let pmtAssetId = r._4
795+ let state = r._5
701796 if ((noLessThenAmtAsset > outAmAmt))
702797 then throw(((("Failed: " + toString(outAmAmt)) + " < ") + toString(noLessThenAmtAsset)))
703798 else if ((noLessThenPriceAsset > outPrAmt))
704799 then throw(((("Failed: " + toString(outPrAmt)) + " < ") + toString(noLessThenPriceAsset)))
705800 else {
706- let burnLPAssetOnFactory = invoke(factoryContract, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
801+ let burnLPAssetOnFactory = invoke(fca, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
707802 if ((burnLPAssetOnFactory == burnLPAssetOnFactory))
708803 then state
709804 else throw("Strict value is not equal to itself.")
719814 else true
720815 if ((checkPayments == checkPayments))
721816 then {
722- let cfg = getPoolConfig()
723- let factoryCfg = getFactoryConfig()
817+ let cfg = gpc()
818+ let factoryCfg = gfc()
724819 let lpAssetId = fromBase58String(cfg[idxLPAsId])
725820 let staking = valueOrErrorMessage(addressFromString(factoryCfg[idxFactStakCntr]), "Wr st addr")
726821 let unstakeInv = invoke(staking, "unstake", [toBase58String(lpAssetId), amount], nil)
727822 if ((unstakeInv == unstakeInv))
728823 then {
729- let r = estimateGetOperation(toBase58String(i.transactionId), toBase58String(lpAssetId), amount, i.caller)
824+ let r = ego(toBase58String(i.transactionId), toBase58String(lpAssetId), amount, i.caller)
730825 let sts = parseIntValue(r._9)
731826 let state = r._10
732- let v = if (if (isGlobalShutdown())
827+ let v = if (if (igs())
733828 then true
734829 else (sts == PoolShutdown))
735830 then throw(("Blocked: " + toString(sts)))
736831 else true
737832 if ((v == v))
738833 then {
739- let burnA = invoke(factoryContract, "burn", [amount], [AttachedPayment(lpAssetId, amount)])
834+ let burnA = invoke(fca, "burn", [amount], [AttachedPayment(lpAssetId, amount)])
740835 if ((burnA == burnA))
741836 then state
742837 else throw("Strict value is not equal to itself.")
751846
752847
753848 @Callable(i)
754-func activate (amtAsStr,prAsStr) = if ((toString(i.caller) != toString(factoryContract)))
849+func activate (amtAsStr,prAsStr) = if ((toString(i.caller) != toString(fca)))
755850 then throw("denied")
756- else $Tuple2([StringEntry(keyAmtAsset(), amtAsStr), StringEntry(keyPriceAsset(), prAsStr)], "success")
851+ else $Tuple2([StringEntry(aa(), amtAsStr), StringEntry(pa(), prAsStr)], "success")
757852
758853
759854
760855 @Callable(i)
761-func getPoolConfigWrapperREADONLY () = $Tuple2(nil, getPoolConfig())
856+func getPoolConfigWrapperREADONLY () = $Tuple2(nil, gpc())
762857
763858
764859
776871
777872
778873 @Callable(i)
779-func fromX18WrapperREADONLY (val,resScaleMult) = $Tuple2(nil, fromX18(parseBigIntValue(val), resScaleMult))
874+func fromX18WrapperREADONLY (val,resScaleMult) = $Tuple2(nil, f1(parseBigIntValue(val), resScaleMult))
780875
781876
782877
783878 @Callable(i)
784-func toX18WrapperREADONLY (origVal,origScaleMult) = $Tuple2(nil, toString(toX18(origVal, origScaleMult)))
879+func toX18WrapperREADONLY (origVal,origScaleMult) = $Tuple2(nil, toString(t1(origVal, origScaleMult)))
785880
786881
787882
788883 @Callable(i)
789-func calcPriceBigIntWrapperREADONLY (prAmtX18,amAmtX18) = $Tuple2(nil, toString(calcPriceBigInt(parseBigIntValue(prAmtX18), parseBigIntValue(amAmtX18))))
884+func calcPriceBigIntWrapperREADONLY (prAmtX18,amAmtX18) = $Tuple2(nil, toString(cpbi(parseBigIntValue(prAmtX18), parseBigIntValue(amAmtX18))))
790885
791886
792887
793888 @Callable(i)
794-func estimatePutOperationWrapperREADONLY (txId58,slippage,inAmAmt,inAmId,inPrAmt,inPrId,usrAddr,isEval,emitLp) = $Tuple2(nil, estimatePutOperation(txId58, slippage, inAmAmt, inAmId, inPrAmt, inPrId, usrAddr, isEval, emitLp, false, 0, ""))
889+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, ""))
795890
796891
797892
798893 @Callable(i)
799894 func estimateGetOperationWrapperREADONLY (txId58,pmtAsId,pmtLpAmt,usrAddr) = {
800- let res = estimateGetOperation(txId58, pmtAsId, pmtLpAmt, addressFromStringValue(usrAddr))
801- $Tuple2(nil, $Tuple10(res._1, res._2, res._3, res._4, res._5, res._6, res._7, toString(res._8), res._9, res._10))
895+ let r = ego(txId58, pmtAsId, pmtLpAmt, addressFromStringValue(usrAddr))
896+ $Tuple2(nil, $Tuple10(r._1, r._2, r._3, r._4, r._5, r._6, r._7, toString(r._8), r._9, r._10))
802897 }
803898
804899
805900 @Verifier(tx)
806901 func verify () = match tx {
807902 case order: Order =>
808- let mtchPub = getMatcherPubOrFail()
809- let orV = validateMatcherOrderAllowed(order)
903+ let mtchPub = mp()
904+ let orV = moa(order)
810905 let sndrV = sigVerify(order.bodyBytes, order.proofs[0], order.senderPublicKey)
811906 let mtchV = sigVerify(order.bodyBytes, order.proofs[1], mtchPub)
812907 if (if (if (orV)
815910 then mtchV
816911 else false)
817912 then true
818- else throwOrderError(orV, sndrV, mtchV)
913+ else toe(orV, sndrV, mtchV)
819914 case _ =>
820- let admin = valueOrElse(getString(this, keyManPubKey()), EMPTY)
821- if ((admin == EMPTY))
822- then sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
823- else sigVerify(tx.bodyBytes, tx.proofs[0], fromBase58String(admin))
915+ let targetPublicKey = match m() {
916+ case pk: ByteVector =>
917+ pk
918+ case _: Unit =>
919+ tx.senderPublicKey
920+ case _ =>
921+ throw("Match error")
922+ }
923+ sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey)
824924 }
825925
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
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 oneBigInt = toBigInt(1)
1313
1414 let slippage4D = toBigInt((scale8 - ((scale8 * 1) / scale8)))
1515
1616 let Amult = "100"
1717
1818 let Dconv = "1"
1919
2020 let SEP = "__"
2121
2222 let EMPTY = ""
2323
2424 let PoolActive = 1
2525
2626 let PoolPutDis = 2
2727
2828 let PoolMatcherDis = 3
2929
3030 let PoolShutdown = 4
3131
3232 let idxPoolAddress = 1
3333
3434 let idxPoolSt = 2
3535
3636 let idxLPAsId = 3
3737
3838 let idxAmAsId = 4
3939
4040 let idxPrAsId = 5
4141
4242 let idxAmtAsDcm = 6
4343
4444 let idxPriceAsDcm = 7
4545
4646 let idxIAmtAsId = 8
4747
4848 let idxIPriceAsId = 9
4949
5050 let idxFactStakCntr = 1
5151
5252 let idxFactSlippCntr = 7
5353
5454 let idxFactGwxRewCntr = 10
5555
56-func toX18 (origVal,origScaleMult) = fraction(toBigInt(origVal), scale18, toBigInt(origScaleMult))
56+func t1 (origVal,origScaleMult) = fraction(toBigInt(origVal), scale18, toBigInt(origScaleMult))
5757
5858
59-func fromX18 (val,resultScaleMult) = toInt(fraction(val, toBigInt(resultScaleMult), scale18))
59+func f1 (val,resultScaleMult) = toInt(fraction(val, toBigInt(resultScaleMult), scale18))
6060
6161
62-func toScale (amt,resScale,curScale) = fraction(amt, resScale, curScale)
62+func ts (amt,resScale,curScale) = fraction(amt, resScale, curScale)
6363
6464
6565 func abs (val) = if ((zeroBigInt > val))
6666 then -(val)
6767 else val
6868
6969
70-func keyFactCntr () = "%s__factoryContract"
70+func fc () = "%s__factoryContract"
7171
7272
73-func keyManPubKey () = "%s__managerPublicKey"
73+func mpk () = "%s__managerPublicKey"
7474
7575
76-func keyPriceLast () = "%s%s__price__last"
76+func pmpk () = "%s__pendingManagerPublicKey"
7777
7878
79-func keyPriceHistory (h,t) = makeString(["%s%s%d%d__price__history", toString(h), toString(t)], SEP)
79+func pl () = "%s%s__price__last"
8080
8181
82-func keyPutActionByUser (ua,txId) = ((("%s%s%s__P__" + ua) + "__") + txId)
82+func ph (h,t) = makeString(["%s%s%d%d__price__history", toString(h), toString(t)], SEP)
8383
8484
85-func keyGetActionByUser (ua,txId) = ((("%s%s%s__G__" + ua) + "__") + txId)
85+func pau (ua,txId) = ((("%s%s%s__P__" + ua) + "__") + txId)
8686
8787
88-func keyAmtAsset () = "%s__amountAsset"
88+func gau (ua,txId) = ((("%s%s%s__G__" + ua) + "__") + txId)
8989
9090
91-func keyPriceAsset () = "%s__priceAsset"
91+func aa () = "%s__amountAsset"
9292
9393
94-func keyAmplificator () = "%s__amp"
94+func pa () = "%s__priceAsset"
9595
9696
97-func keyAddonAddr () = "%s__addonAddr"
97+func amp () = "%s__amp"
9898
9999
100-func keyFactoryConfig () = "%s__factoryConfig"
100+func ada () = "%s__addonAddr"
101101
102102
103-func keyMatcherPub () = "%s%s__matcher__publicKey"
103+func fcfg () = "%s__factoryConfig"
104104
105105
106-func keyPoolConfig (iAmtAs,iPrAs) = (((("%d%d%s__" + iAmtAs) + "__") + iPrAs) + "__config")
106+func mtpk () = "%s%s__matcher__publicKey"
107107
108108
109-func keyMappingsBaseAsset2internalId (bAStr) = ("%s%s%s__mappings__baseAsset2internalId__" + bAStr)
109+func pc (iAmtAs,iPrAs) = (((("%d%d%s__" + iAmtAs) + "__") + iPrAs) + "__config")
110110
111111
112-func keyAllPoolsShutdown () = "%s__shutdown"
112+func mba (bAStr) = ("%s%s%s__mappings__baseAsset2internalId__" + bAStr)
113113
114114
115-func keyPoolWeight (p) = ("%s%s__poolWeight__" + p)
115+func aps () = "%s__shutdown"
116116
117117
118-func throwOrderError (orV,sendrV,matchV) = throw(((((("Failed: ordValid=" + toString(orV)) + " sndrValid=") + toString(sendrV)) + " mtchrValid=") + toString(matchV)))
118+func toe (orV,sendrV,matchV) = throw(((((("Failed: ordValid=" + toString(orV)) + " sndrValid=") + toString(sendrV)) + " mtchrValid=") + toString(matchV)))
119119
120120
121-func asString (val) = match val {
121+func str (val) = match val {
122122 case valStr: String =>
123123 valStr
124124 case _ =>
125125 throw("fail cast to String")
126126 }
127127
128128
129-func getStringOrFail (addr,key) = valueOrErrorMessage(getString(addr, key), makeString(["mandatory ", toString(addr), ".", key, " not defined"], ""))
129+func strf (addr,key) = valueOrErrorMessage(getString(addr, key), makeString(["mandatory ", toString(addr), ".", key, " not defined"], ""))
130130
131131
132-func getIntOrFail (addr,key) = valueOrErrorMessage(getInteger(addr, key), makeString(["mandatory ", toString(addr), ".", key, " not defined"], ""))
132+func intf (addr,key) = valueOrErrorMessage(getInteger(addr, key), makeString(["mandatory ", toString(addr), ".", key, " not defined"], ""))
133133
134134
135-let factoryContract = addressFromStringValue(getStringOrFail(this, keyFactCntr()))
135+let fca = addressFromStringValue(strf(this, fc()))
136136
137-let A = getStringOrFail(this, keyAmplificator())
137+let A = strf(this, amp())
138138
139-func isGlobalShutdown () = valueOrElse(getBoolean(factoryContract, keyAllPoolsShutdown()), false)
139+func igs () = valueOrElse(getBoolean(fca, aps()), false)
140140
141141
142-func getMatcherPubOrFail () = fromBase58String(getStringOrFail(factoryContract, keyMatcherPub()))
142+func mp () = fromBase58String(strf(fca, mtpk()))
143143
144144
145-func getPoolConfig () = {
146- let amtAs = getStringOrFail(this, keyAmtAsset())
147- let priceAs = getStringOrFail(this, keyPriceAsset())
148- let iPriceAs = getIntOrFail(factoryContract, keyMappingsBaseAsset2internalId(priceAs))
149- let iAmtAs = getIntOrFail(factoryContract, keyMappingsBaseAsset2internalId(amtAs))
150- split(getStringOrFail(factoryContract, keyPoolConfig(toString(iAmtAs), toString(iPriceAs))), SEP)
145+func gpc () = {
146+ let amtAs = strf(this, aa())
147+ let priceAs = strf(this, pa())
148+ let iPriceAs = intf(fca, mba(priceAs))
149+ let iAmtAs = intf(fca, mba(amtAs))
150+ split(strf(fca, pc(toString(iAmtAs), toString(iPriceAs))), SEP)
151151 }
152152
153153
154-func getFactoryConfig () = split(getStringOrFail(factoryContract, keyFactoryConfig()), SEP)
154+func gfc () = split(strf(fca, fcfg()), SEP)
155155
156156
157157 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)
158158
159159
160160 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)
161161
162162
163163 func getAccBalance (assetId) = if ((assetId == "WAVES"))
164164 then wavesBalance(this).available
165165 else assetBalance(this, fromBase58String(assetId))
166166
167167
168-func calcPriceBigInt (prAmtX18,amAmtX18) = fraction(prAmtX18, scale18, amAmtX18)
168+func cpbi (prAmtX18,amAmtX18) = fraction(prAmtX18, scale18, amAmtX18)
169169
170170
171-func validateAbsDiff (A1,A2,slippage) = {
171+func vad (A1,A2,slippage) = {
172172 let diff = fraction((A1 - A2), scale8BigInt, A2)
173173 let pass = ((slippage - abs(diff)) > zeroBigInt)
174174 if (!(pass))
175175 then throw(("Big slpg: " + toString(diff)))
176176 else $Tuple2(pass, min([A1, A2]))
177177 }
178178
179179
180-func validateD (D1,D0,slpg) = {
180+func vd (D1,D0,slpg) = {
181181 let diff = fraction(D0, scale8BigInt, D1)
182182 let fail = (slpg > diff)
183183 if (if (fail)
184184 then true
185185 else (D0 > D1))
186186 then throw(((((((toString(D0) + " ") + toString(D1)) + " ") + toString(diff)) + " ") + toString(slpg)))
187187 else fail
188188 }
189189
190190
191-func privateCalcPrice (amAssetDcm,prAssetDcm,amAmt,prAmt) = {
192- let amtAsAmtX18 = toX18(amAmt, amAssetDcm)
193- let prAsAmtX18 = toX18(prAmt, prAssetDcm)
194- calcPriceBigInt(prAsAmtX18, amtAsAmtX18)
191+func pcp (amAssetDcm,prAssetDcm,amAmt,prAmt) = {
192+ let amtAsAmtX18 = t1(amAmt, amAssetDcm)
193+ let prAsAmtX18 = t1(prAmt, prAssetDcm)
194+ cpbi(prAsAmtX18, amtAsAmtX18)
195195 }
196196
197197
198198 func calcPrices (amAmt,prAmt,lpAmt) = {
199- let cfg = getPoolConfig()
199+ let cfg = gpc()
200200 let amtAsDcm = parseIntValue(cfg[idxAmtAsDcm])
201201 let prAsDcm = parseIntValue(cfg[idxPriceAsDcm])
202- let priceX18 = privateCalcPrice(amtAsDcm, prAsDcm, amAmt, prAmt)
203- let amAmtX18 = toX18(amAmt, amtAsDcm)
204- let prAmtX18 = toX18(prAmt, prAsDcm)
205- let lpAmtX18 = toX18(lpAmt, scale8)
206- let lpPrInAmAsX18 = calcPriceBigInt(amAmtX18, lpAmtX18)
207- let lpPrInPrAsX18 = calcPriceBigInt(prAmtX18, lpAmtX18)
202+ let priceX18 = pcp(amtAsDcm, prAsDcm, amAmt, prAmt)
203+ let amAmtX18 = t1(amAmt, amtAsDcm)
204+ let prAmtX18 = t1(prAmt, prAsDcm)
205+ let lpAmtX18 = t1(lpAmt, scale8)
206+ let lpPrInAmAsX18 = cpbi(amAmtX18, lpAmtX18)
207+ let lpPrInPrAsX18 = cpbi(prAmtX18, lpAmtX18)
208208 [priceX18, lpPrInAmAsX18, lpPrInPrAsX18]
209209 }
210210
211211
212212 func calculatePrices (amAmt,prAmt,lpAmt) = {
213213 let p = calcPrices(amAmt, prAmt, lpAmt)
214-[fromX18(p[0], scale8), fromX18(p[1], scale8), fromX18(p[2], scale8)]
214+[f1(p[0], scale8), f1(p[1], scale8), f1(p[2], scale8)]
215215 }
216216
217217
218-func estimateGetOperation (txId58,pmtAssetId,pmtLpAmt,userAddress) = {
219- let cfg = getPoolConfig()
218+func ego (txId58,pmtAssetId,pmtLpAmt,userAddress) = {
219+ let cfg = gpc()
220220 let lpId = cfg[idxLPAsId]
221221 let amId = cfg[idxAmAsId]
222222 let prId = cfg[idxPrAsId]
223223 let amDcm = parseIntValue(cfg[idxAmtAsDcm])
224224 let prDcm = parseIntValue(cfg[idxPriceAsDcm])
225225 let sts = cfg[idxPoolSt]
226226 let lpEmiss = valueOrErrorMessage(assetInfo(fromBase58String(lpId)), "Wrong LP id").quantity
227227 if ((lpId != pmtAssetId))
228228 then throw("Wrong pmt asset")
229229 else {
230230 let amBalance = getAccBalance(amId)
231- let amBalanceX18 = toX18(amBalance, amDcm)
231+ let amBalanceX18 = t1(amBalance, amDcm)
232232 let prBalance = getAccBalance(prId)
233- let prBalanceX18 = toX18(prBalance, prDcm)
234- let curPriceX18 = calcPriceBigInt(prBalanceX18, amBalanceX18)
235- let curPrice = fromX18(curPriceX18, scale8)
236- let pmtLpAmtX18 = toX18(pmtLpAmt, scale8)
237- let lpEmissX18 = toX18(lpEmiss, scale8)
233+ let prBalanceX18 = t1(prBalance, prDcm)
234+ let curPriceX18 = cpbi(prBalanceX18, amBalanceX18)
235+ let curPrice = f1(curPriceX18, scale8)
236+ let pmtLpAmtX18 = t1(pmtLpAmt, scale8)
237+ let lpEmissX18 = t1(lpEmiss, scale8)
238238 let outAmAmtX18 = fraction(amBalanceX18, pmtLpAmtX18, lpEmissX18)
239239 let outPrAmtX18 = fraction(prBalanceX18, pmtLpAmtX18, lpEmissX18)
240- let outAmAmt = fromX18(outAmAmtX18, amDcm)
241- let outPrAmt = fromX18(outPrAmtX18, prDcm)
240+ let outAmAmt = f1(outAmAmtX18, amDcm)
241+ let outPrAmt = f1(outPrAmtX18, prDcm)
242242 let state = if ((txId58 == ""))
243243 then nil
244244 else [ScriptTransfer(userAddress, outAmAmt, if ((amId == "WAVES"))
245245 then unit
246246 else fromBase58String(amId)), ScriptTransfer(userAddress, outPrAmt, if ((prId == "WAVES"))
247247 then unit
248- else fromBase58String(prId)), StringEntry(keyGetActionByUser(toString(userAddress), txId58), dataGetActionInfo(outAmAmt, outPrAmt, pmtLpAmt, curPrice, height, lastBlock.timestamp)), IntegerEntry(keyPriceLast(), curPrice), IntegerEntry(keyPriceHistory(height, lastBlock.timestamp), curPrice)]
248+ 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)]
249249 $Tuple10(outAmAmt, outPrAmt, amId, prId, amBalance, prBalance, lpEmiss, curPriceX18, sts, state)
250250 }
251251 }
252252
253253
254-func estimatePutOperation (txId58,slippage,inAmAmt,inAmId,inPrAmt,inPrId,userAddress,isEval,emitLp,isOneAsset,pmtAmt,pmtId) = {
255- let cfg = getPoolConfig()
254+func epo (txId58,slippage,inAmAmt,inAmId,inPrAmt,inPrId,userAddress,isEval,emitLp,isOneAsset,pmtAmt,pmtId) = {
255+ let cfg = gpc()
256256 let lpId = fromBase58String(cfg[idxLPAsId])
257257 let amIdStr = cfg[idxAmAsId]
258258 let prIdStr = cfg[idxPrAsId]
259259 let inAmIdStr = cfg[idxIAmtAsId]
260260 let inPrIdStr = cfg[idxIPriceAsId]
261261 let amtDcm = parseIntValue(cfg[idxAmtAsDcm])
262262 let priceDcm = parseIntValue(cfg[idxPriceAsDcm])
263263 let sts = cfg[idxPoolSt]
264264 let lpEm = valueOrErrorMessage(assetInfo(lpId), "Wr lp as").quantity
265265 let amBalance = if (isEval)
266266 then getAccBalance(amIdStr)
267267 else if (if (isOneAsset)
268268 then (pmtId == amIdStr)
269269 else false)
270270 then (getAccBalance(amIdStr) - pmtAmt)
271271 else if (isOneAsset)
272272 then getAccBalance(amIdStr)
273273 else (getAccBalance(amIdStr) - inAmAmt)
274274 let prBalance = if (isEval)
275275 then getAccBalance(prIdStr)
276276 else if (if (isOneAsset)
277277 then (pmtId == prIdStr)
278278 else false)
279279 then (getAccBalance(prIdStr) - pmtAmt)
280280 else if (isOneAsset)
281281 then getAccBalance(prIdStr)
282282 else (getAccBalance(prIdStr) - inPrAmt)
283- let inAmAssetAmtX18 = toX18(inAmAmt, amtDcm)
284- let inPrAssetAmtX18 = toX18(inPrAmt, priceDcm)
285- let userPriceX18 = calcPriceBigInt(inPrAssetAmtX18, inAmAssetAmtX18)
286- let amBalanceX18 = toX18(amBalance, amtDcm)
287- let prBalanceX18 = toX18(prBalance, priceDcm)
288- let res = if ((lpEm == 0))
283+ let inAmAssetAmtX18 = t1(inAmAmt, amtDcm)
284+ let inPrAssetAmtX18 = t1(inPrAmt, priceDcm)
285+ let userPriceX18 = cpbi(inPrAssetAmtX18, inAmAssetAmtX18)
286+ let amBalanceX18 = t1(amBalance, amtDcm)
287+ let prBalanceX18 = t1(prBalance, priceDcm)
288+ let r = if ((lpEm == 0))
289289 then {
290290 let curPriceX18 = zeroBigInt
291291 let slippageX18 = zeroBigInt
292292 let lpAmtX18 = pow((inAmAssetAmtX18 * inPrAssetAmtX18), 0, toBigInt(5), 1, 0, DOWN)
293- $Tuple5(fromX18(lpAmtX18, scale8), fromX18(inAmAssetAmtX18, amtDcm), fromX18(inPrAssetAmtX18, priceDcm), calcPriceBigInt((prBalanceX18 + inPrAssetAmtX18), (amBalanceX18 + inAmAssetAmtX18)), slippageX18)
293+ $Tuple5(f1(lpAmtX18, scale8), f1(inAmAssetAmtX18, amtDcm), f1(inPrAssetAmtX18, priceDcm), cpbi((prBalanceX18 + inPrAssetAmtX18), (amBalanceX18 + inAmAssetAmtX18)), slippageX18)
294294 }
295295 else {
296- let curPriceX18 = calcPriceBigInt(prBalanceX18, amBalanceX18)
296+ let curPriceX18 = cpbi(prBalanceX18, amBalanceX18)
297297 let slippageRealX18 = fraction(abs((curPriceX18 - userPriceX18)), scale18, curPriceX18)
298- let slippageX18 = toX18(slippage, scale8)
298+ let slippageX18 = t1(slippage, scale8)
299299 if (if ((curPriceX18 != zeroBigInt))
300300 then (slippageRealX18 > slippageX18)
301301 else false)
302302 then throw(((("Price slippage " + toString(slippageRealX18)) + " > ") + toString(slippageX18)))
303303 else {
304- let lpEmissionX18 = toX18(lpEm, scale8)
304+ let lpEmissionX18 = t1(lpEm, scale8)
305305 let prViaAmX18 = fraction(inAmAssetAmtX18, curPriceX18, scale18)
306306 let amViaPrX18 = fraction(inPrAssetAmtX18, scale18, curPriceX18)
307307 let expectedAmts = if ((prViaAmX18 > inPrAssetAmtX18))
308308 then $Tuple2(amViaPrX18, inPrAssetAmtX18)
309309 else $Tuple2(inAmAssetAmtX18, prViaAmX18)
310310 let expAmtAssetAmtX18 = expectedAmts._1
311311 let expPriceAssetAmtX18 = expectedAmts._2
312312 let lpAmtX18 = fraction(lpEmissionX18, expPriceAssetAmtX18, prBalanceX18)
313- $Tuple5(fromX18(lpAmtX18, scale8), fromX18(expAmtAssetAmtX18, amtDcm), fromX18(expPriceAssetAmtX18, priceDcm), curPriceX18, slippageX18)
313+ $Tuple5(f1(lpAmtX18, scale8), f1(expAmtAssetAmtX18, amtDcm), f1(expPriceAssetAmtX18, priceDcm), curPriceX18, slippageX18)
314314 }
315315 }
316- let calcLpAmt = res._1
317- let calcAmAssetPmt = res._2
318- let calcPrAssetPmt = res._3
319- let curPrice = fromX18(res._4, scale8)
320- let slippageCalc = fromX18(res._5, scale8)
316+ let calcLpAmt = r._1
317+ let calcAmAssetPmt = r._2
318+ let calcPrAssetPmt = r._3
319+ let curPrice = f1(r._4, scale8)
320+ let slippageCalc = f1(r._5, scale8)
321321 if ((0 >= calcLpAmt))
322322 then throw("LP <= 0")
323323 else {
324324 let emitLpAmt = if (!(emitLp))
325325 then 0
326326 else calcLpAmt
327327 let amDiff = (inAmAmt - calcAmAssetPmt)
328328 let prDiff = (inPrAmt - calcPrAssetPmt)
329- let $t01585816203 = if (if (isOneAsset)
329+ let $t01529615641 = if (if (isOneAsset)
330330 then (pmtId == amIdStr)
331331 else false)
332332 then $Tuple2(pmtAmt, 0)
333333 else if (if (isOneAsset)
334334 then (pmtId == prIdStr)
335335 else false)
336336 then $Tuple2(0, pmtAmt)
337337 else $Tuple2(calcAmAssetPmt, calcPrAssetPmt)
338- let writeAmAmt = $t01585816203._1
339- let writePrAmt = $t01585816203._2
340- let commonState = [IntegerEntry(keyPriceLast(), curPrice), IntegerEntry(keyPriceHistory(height, lastBlock.timestamp), curPrice), StringEntry(keyPutActionByUser(userAddress, txId58), dataPutActionInfo(writeAmAmt, writePrAmt, emitLpAmt, curPrice, slippage, slippageCalc, height, lastBlock.timestamp, amDiff, prDiff))]
338+ let writeAmAmt = $t01529615641._1
339+ let writePrAmt = $t01529615641._2
340+ 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))]
341341 $Tuple13(calcLpAmt, emitLpAmt, curPrice, amBalance, prBalance, lpEm, lpId, sts, commonState, amDiff, prDiff, inAmId, inPrId)
342342 }
343343 }
344344
345345
346-func validateMatcherOrderAllowed (order) = {
347- let cfg = getPoolConfig()
346+func moa (order) = {
347+ let cfg = gpc()
348348 let amtAsId = cfg[idxAmAsId]
349349 let prAsId = cfg[idxPrAsId]
350350 let sts = parseIntValue(cfg[idxPoolSt])
351351 let amtAsDcm = parseIntValue(cfg[idxAmtAsDcm])
352352 let prAsDcm = parseIntValue(cfg[idxPriceAsDcm])
353353 let accAmtAsBalance = getAccBalance(amtAsId)
354354 let accPrAsBalance = getAccBalance(prAsId)
355355 let curPriceX18 = if ((order.orderType == Buy))
356- then privateCalcPrice(amtAsDcm, prAsDcm, (accAmtAsBalance + order.amount), accPrAsBalance)
357- else privateCalcPrice(amtAsDcm, prAsDcm, (accAmtAsBalance - order.amount), accPrAsBalance)
358- let curPrice = fromX18(curPriceX18, scale8)
359- if (if (if (isGlobalShutdown())
356+ then pcp(amtAsDcm, prAsDcm, (accAmtAsBalance + order.amount), accPrAsBalance)
357+ else pcp(amtAsDcm, prAsDcm, (accAmtAsBalance - order.amount), accPrAsBalance)
358+ let curPrice = f1(curPriceX18, scale8)
359+ if (if (if (igs())
360360 then true
361361 else (sts == PoolMatcherDis))
362362 then true
363363 else (sts == PoolShutdown))
364364 then throw("Admin blocked")
365365 else {
366366 let orAmtAsset = order.assetPair.amountAsset
367367 let orAmtAsStr = if ((orAmtAsset == unit))
368368 then "WAVES"
369369 else toBase58String(value(orAmtAsset))
370370 let orPrAsset = order.assetPair.priceAsset
371371 let orPrAsStr = if ((orPrAsset == unit))
372372 then "WAVES"
373373 else toBase58String(value(orPrAsset))
374374 if (if ((orAmtAsStr != amtAsId))
375375 then true
376376 else (orPrAsStr != prAsId))
377377 then throw("Wr assets")
378378 else {
379379 let orderPrice = order.price
380380 let priceDcm = fraction(scale8, prAsDcm, amtAsDcm)
381- let castOrderPrice = toScale(orderPrice, scale8, priceDcm)
381+ let castOrderPrice = ts(orderPrice, scale8, priceDcm)
382382 let isOrderPriceValid = if ((order.orderType == Buy))
383383 then (curPrice >= castOrderPrice)
384384 else (castOrderPrice >= curPrice)
385385 true
386386 }
387387 }
388388 }
389389
390390
391-func commonGet (i) = if ((size(i.payments) != 1))
391+func cg (i) = if ((size(i.payments) != 1))
392392 then throw("1 pmnt exp")
393393 else {
394394 let pmt = value(i.payments[0])
395395 let pmtAssetId = value(pmt.assetId)
396396 let pmtAmt = pmt.amount
397- let res = estimateGetOperation(toBase58String(i.transactionId), toBase58String(pmtAssetId), pmtAmt, i.caller)
398- let outAmAmt = res._1
399- let outPrAmt = res._2
400- let sts = parseIntValue(res._9)
401- let state = res._10
402- if (if (isGlobalShutdown())
397+ let r = ego(toBase58String(i.transactionId), toBase58String(pmtAssetId), pmtAmt, i.caller)
398+ let outAmAmt = r._1
399+ let outPrAmt = r._2
400+ let sts = parseIntValue(r._9)
401+ let state = r._10
402+ if (if (igs())
403403 then true
404404 else (sts == PoolShutdown))
405405 then throw(("Admin blocked: " + toString(sts)))
406406 else $Tuple5(outAmAmt, outPrAmt, pmtAmt, pmtAssetId, state)
407407 }
408408
409409
410-func commonPut (caller,txId,amAsPmt,prAsPmt,slippage,emitLp,isOneAsset,pmtAmt,pmtId) = {
411- let r = estimatePutOperation(txId, slippage, value(amAsPmt).amount, value(amAsPmt).assetId, value(prAsPmt).amount, value(prAsPmt).assetId, caller, false, emitLp, isOneAsset, pmtAmt, pmtId)
410+func cp (caller,txId,amAsPmt,prAsPmt,slippage,emitLp,isOneAsset,pmtAmt,pmtId) = {
411+ let r = epo(txId, slippage, value(amAsPmt).amount, value(amAsPmt).assetId, value(prAsPmt).amount, value(prAsPmt).assetId, caller, false, emitLp, isOneAsset, pmtAmt, pmtId)
412412 let sts = parseIntValue(r._8)
413- if (if (if (isGlobalShutdown())
413+ if (if (if (igs())
414414 then true
415415 else (sts == PoolPutDis))
416416 then true
417417 else (sts == PoolShutdown))
418418 then throw(("Blocked:" + toString(sts)))
419419 else r
420420 }
421421
422422
423+func m () = match getString(mpk()) {
424+ case s: String =>
425+ fromBase58String(s)
426+ case _: Unit =>
427+ unit
428+ case _ =>
429+ throw("Match error")
430+}
431+
432+
433+func pm () = match getString(pmpk()) {
434+ case s: String =>
435+ fromBase58String(s)
436+ case _: Unit =>
437+ unit
438+ case _ =>
439+ throw("Match error")
440+}
441+
442+
443+func mm (i) = {
444+ let pd = throw("Permission denied")
445+ match m() {
446+ case pk: ByteVector =>
447+ if ((i.callerPublicKey == pk))
448+ then true
449+ else pd
450+ case _: Unit =>
451+ if ((i.caller == this))
452+ then true
453+ else pd
454+ case _ =>
455+ throw("Match error")
456+ }
457+ }
458+
459+
423460 @Callable(i)
424-func constructor (factoryContract,managerPublicKey) = if ((i.caller != this))
425- then throw("denied")
426- else [StringEntry(keyFactCntr(), factoryContract), StringEntry(keyManPubKey(), managerPublicKey)]
461+func constructor (fc) = {
462+ let c = mm(i)
463+ if ((c == c))
464+ then [StringEntry(fc(), fc)]
465+ else throw("Strict value is not equal to itself.")
466+ }
467+
468+
469+
470+@Callable(i)
471+func setManager (pendingManagerPublicKey) = {
472+ let c = mm(i)
473+ if ((c == c))
474+ then {
475+ let cm = fromBase58String(pendingManagerPublicKey)
476+ if ((cm == cm))
477+ then [StringEntry(pmpk(), pendingManagerPublicKey)]
478+ else throw("Strict value is not equal to itself.")
479+ }
480+ else throw("Strict value is not equal to itself.")
481+ }
482+
483+
484+
485+@Callable(i)
486+func confirmManager () = {
487+ let p = pm()
488+ let hpm = if (isDefined(p))
489+ then true
490+ else throw("No pending manager")
491+ if ((hpm == hpm))
492+ then {
493+ let cpm = if ((i.callerPublicKey == value(p)))
494+ then true
495+ else throw("You are not pending manager")
496+ if ((cpm == cpm))
497+ then [StringEntry(mpk(), toBase58String(value(p))), DeleteEntry(pmpk())]
498+ else throw("Strict value is not equal to itself.")
499+ }
500+ else throw("Strict value is not equal to itself.")
501+ }
427502
428503
429504
430505 @Callable(i)
431506 func put (slip,autoStake) = {
432- let factCfg = getFactoryConfig()
507+ let factCfg = gfc()
433508 let stakingCntr = valueOrErrorMessage(addressFromString(factCfg[idxFactStakCntr]), "Wr st addr")
434509 let slipCntr = valueOrErrorMessage(addressFromString(factCfg[idxFactSlippCntr]), "Wr sl addr")
435510 if ((0 > slip))
436511 then throw("Wrong slippage")
437512 else if ((size(i.payments) != 2))
438513 then throw("2 pmnts expd")
439514 else {
440- let estPut = commonPut(toString(i.caller), toBase58String(i.transactionId), AttachedPayment(value(i.payments[0]).assetId, value(i.payments[0]).amount), i.payments[1], slip, true, false, 0, "")
441- let emitLpAmt = estPut._2
442- let lpAssetId = estPut._7
443- let state = estPut._9
444- let amDiff = estPut._10
445- let prDiff = estPut._11
446- let amId = estPut._12
447- let prId = estPut._13
448- let emitInv = invoke(factoryContract, "emit", [emitLpAmt], nil)
449- if ((emitInv == emitInv))
515+ 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, "")
516+ let emitLpAmt = e._2
517+ let lpAssetId = e._7
518+ let state = e._9
519+ let amDiff = e._10
520+ let prDiff = e._11
521+ let amId = e._12
522+ let prId = e._13
523+ let r = invoke(fca, "emit", [emitLpAmt], nil)
524+ if ((r == r))
450525 then {
451- let slippageAInv = if ((amDiff > 0))
452- then invoke(slipCntr, "put", nil, [AttachedPayment(amId, amDiff)])
453- else nil
454- if ((slippageAInv == slippageAInv))
526+ let el = match r {
527+ case legacy: Address =>
528+ invoke(legacy, "emit", [emitLpAmt], nil)
529+ case _ =>
530+ unit
531+ }
532+ if ((el == el))
455533 then {
456- let slippagePInv = if ((prDiff > 0))
457- then invoke(slipCntr, "put", nil, [AttachedPayment(prId, prDiff)])
534+ let sa = if ((amDiff > 0))
535+ then invoke(slipCntr, "put", nil, [AttachedPayment(amId, amDiff)])
458536 else nil
459- if ((slippagePInv == slippagePInv))
537+ if ((sa == sa))
460538 then {
461- let lpTrnsfr = if (autoStake)
539+ let sp = if ((prDiff > 0))
540+ then invoke(slipCntr, "put", nil, [AttachedPayment(prId, prDiff)])
541+ else nil
542+ if ((sp == sp))
462543 then {
463- let slpStakeInv = invoke(stakingCntr, "stake", nil, [AttachedPayment(lpAssetId, emitLpAmt)])
464- if ((slpStakeInv == slpStakeInv))
465- then nil
466- else throw("Strict value is not equal to itself.")
544+ let lpTrnsfr = if (autoStake)
545+ then {
546+ let ss = invoke(stakingCntr, "stake", nil, [AttachedPayment(lpAssetId, emitLpAmt)])
547+ if ((ss == ss))
548+ then nil
549+ else throw("Strict value is not equal to itself.")
550+ }
551+ else [ScriptTransfer(i.caller, emitLpAmt, lpAssetId)]
552+ (state ++ lpTrnsfr)
467553 }
468- else [ScriptTransfer(i.caller, emitLpAmt, lpAssetId)]
469- (state ++ lpTrnsfr)
554+ else throw("Strict value is not equal to itself.")
470555 }
471556 else throw("Strict value is not equal to itself.")
472557 }
473558 else throw("Strict value is not equal to itself.")
474559 }
475560 else throw("Strict value is not equal to itself.")
476561 }
477562 }
478563
479564
480565
481566 @Callable(i)
482567 func putOneTkn (amAssetPart,prAssetPart,outLp,slippage,autoStake) = {
483- let cfg = getFactoryConfig()
568+ let cfg = gfc()
484569 let stakingCntr = valueOrErrorMessage(addressFromString(cfg[idxFactStakCntr]), "Wr st addr")
485570 let slipCntr = valueOrErrorMessage(addressFromString(cfg[idxFactSlippCntr]), "Wr sl addr")
486571 let gwxCntr = valueOrErrorMessage(addressFromString(cfg[idxFactGwxRewCntr]), "Wr gwx addr")
487- let poolCfg = getPoolConfig()
572+ let poolCfg = gpc()
488573 let amId = poolCfg[idxAmAsId]
489574 let prId = poolCfg[idxPrAsId]
490575 let amDcm = parseIntValue(poolCfg[idxAmtAsDcm])
491576 let prDcm = parseIntValue(poolCfg[idxPriceAsDcm])
492577 if (if (if (if ((0 >= slippage))
493578 then true
494579 else (0 >= amAssetPart))
495580 then true
496581 else (0 >= prAssetPart))
497582 then true
498583 else (0 >= outLp))
499584 then throw("Wrong params")
500585 else if ((size(i.payments) != 1))
501586 then throw("1 pmnt expd")
502587 else {
503588 let pmt = value(i.payments[0])
504589 let pmtAssetId = toBase58String(value(pmt.assetId))
505590 let pmtAmt = pmt.amount
506591 if (if (if ((amAssetPart > pmtAmt))
507592 then true
508593 else (prAssetPart > pmtAmt))
509594 then true
510595 else (10000000 > pmtAmt))
511596 then throw("Wrong pmt amt")
512597 else {
513598 let amBalance = getAccBalance(amId)
514599 let prBalance = getAccBalance(prId)
515- let $t02394424324 = if ((pmtAssetId == amId))
600+ let $t02418924569 = if ((pmtAssetId == amId))
516601 then $Tuple6((amBalance - pmtAmt), prBalance, (pmtAmt - amAssetPart), prAssetPart, 0, 0)
517602 else if ((pmtAssetId == prId))
518603 then $Tuple6(amBalance, (prBalance - pmtAmt), 0, 0, (pmtAmt - prAssetPart), amAssetPart)
519604 else throw("wrong pmtAssetId")
520- let amBalanceNow = $t02394424324._1
521- let prBalanceNow = $t02394424324._2
522- let virtSwapInAm = $t02394424324._3
523- let virtSwapOutPr = $t02394424324._4
524- let virtSwapInPr = $t02394424324._5
525- let virtSwapOutAm = $t02394424324._6
605+ let amBalanceNow = $t02418924569._1
606+ let prBalanceNow = $t02418924569._2
607+ let virtSwapInAm = $t02418924569._3
608+ let virtSwapOutPr = $t02418924569._4
609+ let virtSwapInPr = $t02418924569._5
610+ let virtSwapOutAm = $t02418924569._6
526611 let D0 = invoke(gwxCntr, "calcD", [toString(amBalanceNow), toString(prBalanceNow), A, Amult, Dconv], nil)
527612 let D1 = invoke(gwxCntr, "calcD", [toString(toBigInt(((amBalanceNow + virtSwapInAm) - virtSwapOutAm))), toString(toBigInt(((prBalanceNow + virtSwapInPr) - virtSwapOutPr))), A, Amult, Dconv], nil)
528- let D0vsD1 = validateD(parseBigIntValue(asString(D1)), parseBigIntValue(asString(D0)), slippage4D)
613+ let D0vsD1 = vd(parseBigIntValue(str(D1)), parseBigIntValue(str(D0)), slippage4D)
529614 if ((D0vsD1 == D0vsD1))
530615 then {
531- let estPut = commonPut(toString(i.caller), toBase58String(i.transactionId), AttachedPayment(fromBase58String(amId), amAssetPart), AttachedPayment(fromBase58String(prId), prAssetPart), slippage, true, true, pmtAmt, pmtAssetId)
616+ let estPut = cp(toString(i.caller), toBase58String(i.transactionId), AttachedPayment(fromBase58String(amId), amAssetPart), AttachedPayment(fromBase58String(prId), prAssetPart), slippage, true, true, pmtAmt, pmtAssetId)
532617 let estimLP = estPut._2
533618 let lpAssetId = estPut._7
534619 let state = estPut._9
535620 let amDiff = estPut._10
536621 let prDiff = estPut._11
537- let lpCalcRes = validateAbsDiff(toBigInt(estimLP), toBigInt(outLp), toBigInt(slippage))
622+ let lpCalcRes = vad(toBigInt(estimLP), toBigInt(outLp), toBigInt(slippage))
538623 let emitLpAmt = toInt(lpCalcRes._2)
539- let emitInv = invoke(factoryContract, "emit", [emitLpAmt], nil)
540- if ((emitInv == emitInv))
624+ let e = invoke(fca, "emit", [emitLpAmt], nil)
625+ if ((e == e))
541626 then {
542- let slippageAInv = if ((amDiff > 0))
543- then invoke(slipCntr, "put", nil, [AttachedPayment(fromBase58String(amId), amDiff)])
544- else nil
545- if ((slippageAInv == slippageAInv))
627+ let el = match e {
628+ case legacy: Address =>
629+ invoke(legacy, "emit", [emitLpAmt], nil)
630+ case _ =>
631+ unit
632+ }
633+ if ((el == el))
546634 then {
547- let slippagePInv = if ((prDiff > 0))
548- then invoke(slipCntr, "put", nil, [AttachedPayment(fromBase58String(prId), prDiff)])
635+ let sa = if ((amDiff > 0))
636+ then invoke(slipCntr, "put", nil, [AttachedPayment(fromBase58String(amId), amDiff)])
549637 else nil
550- if ((slippagePInv == slippagePInv))
638+ if ((sa == sa))
551639 then {
552- let lpTrnsfr = if (autoStake)
640+ let sp = if ((prDiff > 0))
641+ then invoke(slipCntr, "put", nil, [AttachedPayment(fromBase58String(prId), prDiff)])
642+ else nil
643+ if ((sp == sp))
553644 then {
554- let slpStakeInv = invoke(stakingCntr, "stake", nil, [AttachedPayment(lpAssetId, emitLpAmt)])
555- if ((slpStakeInv == slpStakeInv))
556- then nil
557- else throw("Strict value is not equal to itself.")
645+ let lpTrnsfr = if (autoStake)
646+ then {
647+ let ss = invoke(stakingCntr, "stake", nil, [AttachedPayment(lpAssetId, emitLpAmt)])
648+ if ((ss == ss))
649+ then nil
650+ else throw("Strict value is not equal to itself.")
651+ }
652+ else [ScriptTransfer(i.caller, emitLpAmt, lpAssetId)]
653+ (state ++ lpTrnsfr)
558654 }
559- else [ScriptTransfer(i.caller, emitLpAmt, lpAssetId)]
560- (state ++ lpTrnsfr)
655+ else throw("Strict value is not equal to itself.")
561656 }
562657 else throw("Strict value is not equal to itself.")
563658 }
564659 else throw("Strict value is not equal to itself.")
565660 }
566661 else throw("Strict value is not equal to itself.")
567662 }
568663 else throw("Strict value is not equal to itself.")
569664 }
570665 }
571666 }
572667
573668
574669
575670 @Callable(i)
576671 func putForFree (maxSlpg) = if ((0 > maxSlpg))
577672 then throw("Wrong slpg")
578673 else if ((size(i.payments) != 2))
579674 then throw("2 pmnts expd")
580675 else {
581- let estPut = commonPut(toString(i.caller), toBase58String(i.transactionId), AttachedPayment(value(i.payments[0]).assetId, value(i.payments[0]).amount), i.payments[1], maxSlpg, false, false, 0, "")
676+ 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, "")
582677 estPut._9
583678 }
584679
585680
586681
587682 @Callable(i)
588683 func get () = {
589- let res = commonGet(i)
590- let outAmtAmt = res._1
591- let outPrAmt = res._2
592- let pmtAmt = res._3
593- let pmtAssetId = res._4
594- let state = res._5
595- let burnLPAssetOnFactory = invoke(factoryContract, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
596- if ((burnLPAssetOnFactory == burnLPAssetOnFactory))
684+ let r = cg(i)
685+ let outAmtAmt = r._1
686+ let outPrAmt = r._2
687+ let pmtAmt = r._3
688+ let pmtAssetId = r._4
689+ let state = r._5
690+ let b = invoke(fca, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
691+ if ((b == b))
597692 then state
598693 else throw("Strict value is not equal to itself.")
599694 }
600695
601696
602697
603698 @Callable(i)
604699 func getOneTkn (exchResult,notUsed,outAmount,outAssetId,slippage) = if ((size(i.payments) != 1))
605700 then throw("1 pmnt expd")
606701 else {
607- let cfg = getPoolConfig()
702+ let cfg = gpc()
608703 let lpId = cfg[idxLPAsId]
609704 let amId = cfg[idxAmAsId]
610705 let prId = cfg[idxPrAsId]
611706 let amDcm = parseIntValue(cfg[idxAmtAsDcm])
612707 let prDcm = parseIntValue(cfg[idxPriceAsDcm])
613708 let sts = cfg[idxPoolSt]
614- let fcfg = getFactoryConfig()
615- let gwxCntr = valueOrErrorMessage(addressFromString(fcfg[idxFactGwxRewCntr]), "Wr sl addr")
709+ let factCfg = gfc()
710+ let gwxCntr = valueOrErrorMessage(addressFromString(factCfg[idxFactGwxRewCntr]), "Wr sl addr")
616711 let pmt = value(i.payments[0])
617- let addon = valueOrElse(getString(this, keyAddonAddr()), "")
712+ let addon = valueOrElse(getString(this, ada()), "")
618713 let userAddress = if ((addon == toString(i.caller)))
619714 then i.originCaller
620715 else i.caller
621716 let txId58 = toBase58String(i.transactionId)
622717 let pmtAssetId = value(pmt.assetId)
623718 let pmtAmt = pmt.amount
624719 if ((1000000000 > pmtAmt))
625720 then throw("Min pmt 10 LP")
626721 else if (if (if ((0 > slippage))
627722 then true
628723 else (0 > exchResult))
629724 then true
630725 else (0 > outAmount))
631726 then throw("Wrong params")
632727 else if ((lpId != toBase58String(pmtAssetId)))
633728 then throw("Wrong LP")
634729 else {
635- let r = estimateGetOperation(toBase58String(i.transactionId), toBase58String(pmtAssetId), pmtAmt, i.caller)
730+ let r = ego(toBase58String(i.transactionId), toBase58String(pmtAssetId), pmtAmt, i.caller)
636731 let estimAmAmt = r._1
637732 let estimPrAmt = r._2
638733 let amBalance = getAccBalance(amId)
639734 let prBalance = getAccBalance(prId)
640- let $t02909129548 = if ((outAssetId == amId))
735+ let $t02934829805 = if ((outAssetId == amId))
641736 then $Tuple7((amBalance - estimAmAmt), (prBalance - estimPrAmt), exchResult, estimPrAmt, 0, 0, (estimAmAmt + exchResult))
642737 else if ((outAssetId == prId))
643738 then $Tuple7((amBalance - estimAmAmt), (prBalance - estimPrAmt), 0, 0, exchResult, estimAmAmt, (estimPrAmt + exchResult))
644739 else throw("wrong outAssetId")
645- let amBalanceNow = $t02909129548._1
646- let prBalanceNow = $t02909129548._2
647- let virtSwapInAm = $t02909129548._3
648- let virtSwapOutPr = $t02909129548._4
649- let virtSwapInPr = $t02909129548._5
650- let virtSwapOutAm = $t02909129548._6
651- let totalGet = $t02909129548._7
740+ let amBalanceNow = $t02934829805._1
741+ let prBalanceNow = $t02934829805._2
742+ let virtSwapInAm = $t02934829805._3
743+ let virtSwapOutPr = $t02934829805._4
744+ let virtSwapInPr = $t02934829805._5
745+ let virtSwapOutAm = $t02934829805._6
746+ let totalGet = $t02934829805._7
652747 if (if ((0 > virtSwapInAm))
653748 then true
654749 else (0 > virtSwapInPr))
655750 then throw("Wrong calc")
656751 else {
657752 let D0 = invoke(gwxCntr, "calcD", [toString(amBalanceNow), toString(prBalanceNow), A, Amult, Dconv], nil)
658753 let D1 = invoke(gwxCntr, "calcD", [toString(((amBalanceNow - virtSwapInAm) + virtSwapOutAm)), toString(((prBalanceNow + virtSwapOutPr) - virtSwapInPr)), A, Amult, Dconv], nil)
659- let D0vsD1 = validateD(parseBigIntValue(asString(D1)), parseBigIntValue(asString(D0)), slippage4D)
754+ let D0vsD1 = vd(parseBigIntValue(str(D1)), parseBigIntValue(str(D0)), slippage4D)
660755 if ((D0vsD1 == D0vsD1))
661756 then {
662- let finalRes = validateAbsDiff(toBigInt(totalGet), toBigInt(outAmount), toBigInt(slippage))
757+ let finalRes = vad(toBigInt(totalGet), toBigInt(outAmount), toBigInt(slippage))
663758 if ((finalRes == finalRes))
664759 then {
665- let $t03028230386 = if ((outAssetId == amId))
760+ let $t03051030614 = if ((outAssetId == amId))
666761 then $Tuple2(toInt(finalRes._2), 0)
667762 else $Tuple2(0, toInt(finalRes._2))
668- let outAm = $t03028230386._1
669- let outPr = $t03028230386._2
670- let curPrX18 = calcPriceBigInt(toX18(prBalance, prDcm), toX18(amBalance, amDcm))
671- let curPr = fromX18(curPrX18, scale8)
763+ let outAm = $t03051030614._1
764+ let outPr = $t03051030614._2
765+ let curPrX18 = cpbi(t1(prBalance, prDcm), t1(amBalance, amDcm))
766+ let curPr = f1(curPrX18, scale8)
672767 let state = [ScriptTransfer(userAddress, (outAm + outPr), if ((outAssetId == "WAVES"))
673768 then unit
674- else fromBase58String(outAssetId)), StringEntry(keyGetActionByUser(toString(userAddress), txId58), dataGetActionInfo(outAm, outPr, pmtAmt, curPr, height, lastBlock.timestamp)), IntegerEntry(keyPriceLast(), curPr), IntegerEntry(keyPriceHistory(height, lastBlock.timestamp), curPr)]
769+ 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)]
675770 if ((state == state))
676771 then {
677- let burn = invoke(factoryContract, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
772+ let burn = invoke(fca, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
678773 if ((burn == burn))
679774 then state
680775 else throw("Strict value is not equal to itself.")
681776 }
682777 else throw("Strict value is not equal to itself.")
683778 }
684779 else throw("Strict value is not equal to itself.")
685780 }
686781 else throw("Strict value is not equal to itself.")
687782 }
688783 }
689784 }
690785
691786
692787
693788 @Callable(i)
694789 func getNoLess (noLessThenAmtAsset,noLessThenPriceAsset) = {
695- let res = commonGet(i)
696- let outAmAmt = res._1
697- let outPrAmt = res._2
698- let pmtAmt = res._3
699- let pmtAssetId = res._4
700- let state = res._5
790+ let r = cg(i)
791+ let outAmAmt = r._1
792+ let outPrAmt = r._2
793+ let pmtAmt = r._3
794+ let pmtAssetId = r._4
795+ let state = r._5
701796 if ((noLessThenAmtAsset > outAmAmt))
702797 then throw(((("Failed: " + toString(outAmAmt)) + " < ") + toString(noLessThenAmtAsset)))
703798 else if ((noLessThenPriceAsset > outPrAmt))
704799 then throw(((("Failed: " + toString(outPrAmt)) + " < ") + toString(noLessThenPriceAsset)))
705800 else {
706- let burnLPAssetOnFactory = invoke(factoryContract, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
801+ let burnLPAssetOnFactory = invoke(fca, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
707802 if ((burnLPAssetOnFactory == burnLPAssetOnFactory))
708803 then state
709804 else throw("Strict value is not equal to itself.")
710805 }
711806 }
712807
713808
714809
715810 @Callable(i)
716811 func unstakeAndGet (amount) = {
717812 let checkPayments = if ((size(i.payments) != 0))
718813 then throw("No pmnts expd")
719814 else true
720815 if ((checkPayments == checkPayments))
721816 then {
722- let cfg = getPoolConfig()
723- let factoryCfg = getFactoryConfig()
817+ let cfg = gpc()
818+ let factoryCfg = gfc()
724819 let lpAssetId = fromBase58String(cfg[idxLPAsId])
725820 let staking = valueOrErrorMessage(addressFromString(factoryCfg[idxFactStakCntr]), "Wr st addr")
726821 let unstakeInv = invoke(staking, "unstake", [toBase58String(lpAssetId), amount], nil)
727822 if ((unstakeInv == unstakeInv))
728823 then {
729- let r = estimateGetOperation(toBase58String(i.transactionId), toBase58String(lpAssetId), amount, i.caller)
824+ let r = ego(toBase58String(i.transactionId), toBase58String(lpAssetId), amount, i.caller)
730825 let sts = parseIntValue(r._9)
731826 let state = r._10
732- let v = if (if (isGlobalShutdown())
827+ let v = if (if (igs())
733828 then true
734829 else (sts == PoolShutdown))
735830 then throw(("Blocked: " + toString(sts)))
736831 else true
737832 if ((v == v))
738833 then {
739- let burnA = invoke(factoryContract, "burn", [amount], [AttachedPayment(lpAssetId, amount)])
834+ let burnA = invoke(fca, "burn", [amount], [AttachedPayment(lpAssetId, amount)])
740835 if ((burnA == burnA))
741836 then state
742837 else throw("Strict value is not equal to itself.")
743838 }
744839 else throw("Strict value is not equal to itself.")
745840 }
746841 else throw("Strict value is not equal to itself.")
747842 }
748843 else throw("Strict value is not equal to itself.")
749844 }
750845
751846
752847
753848 @Callable(i)
754-func activate (amtAsStr,prAsStr) = if ((toString(i.caller) != toString(factoryContract)))
849+func activate (amtAsStr,prAsStr) = if ((toString(i.caller) != toString(fca)))
755850 then throw("denied")
756- else $Tuple2([StringEntry(keyAmtAsset(), amtAsStr), StringEntry(keyPriceAsset(), prAsStr)], "success")
851+ else $Tuple2([StringEntry(aa(), amtAsStr), StringEntry(pa(), prAsStr)], "success")
757852
758853
759854
760855 @Callable(i)
761-func getPoolConfigWrapperREADONLY () = $Tuple2(nil, getPoolConfig())
856+func getPoolConfigWrapperREADONLY () = $Tuple2(nil, gpc())
762857
763858
764859
765860 @Callable(i)
766861 func getAccBalanceWrapperREADONLY (assetId) = $Tuple2(nil, getAccBalance(assetId))
767862
768863
769864
770865 @Callable(i)
771866 func calcPricesWrapperREADONLY (amAmt,prAmt,lpAmt) = {
772867 let pr = calcPrices(amAmt, prAmt, lpAmt)
773868 $Tuple2(nil, [toString(pr[0]), toString(pr[1]), toString(pr[2])])
774869 }
775870
776871
777872
778873 @Callable(i)
779-func fromX18WrapperREADONLY (val,resScaleMult) = $Tuple2(nil, fromX18(parseBigIntValue(val), resScaleMult))
874+func fromX18WrapperREADONLY (val,resScaleMult) = $Tuple2(nil, f1(parseBigIntValue(val), resScaleMult))
780875
781876
782877
783878 @Callable(i)
784-func toX18WrapperREADONLY (origVal,origScaleMult) = $Tuple2(nil, toString(toX18(origVal, origScaleMult)))
879+func toX18WrapperREADONLY (origVal,origScaleMult) = $Tuple2(nil, toString(t1(origVal, origScaleMult)))
785880
786881
787882
788883 @Callable(i)
789-func calcPriceBigIntWrapperREADONLY (prAmtX18,amAmtX18) = $Tuple2(nil, toString(calcPriceBigInt(parseBigIntValue(prAmtX18), parseBigIntValue(amAmtX18))))
884+func calcPriceBigIntWrapperREADONLY (prAmtX18,amAmtX18) = $Tuple2(nil, toString(cpbi(parseBigIntValue(prAmtX18), parseBigIntValue(amAmtX18))))
790885
791886
792887
793888 @Callable(i)
794-func estimatePutOperationWrapperREADONLY (txId58,slippage,inAmAmt,inAmId,inPrAmt,inPrId,usrAddr,isEval,emitLp) = $Tuple2(nil, estimatePutOperation(txId58, slippage, inAmAmt, inAmId, inPrAmt, inPrId, usrAddr, isEval, emitLp, false, 0, ""))
889+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, ""))
795890
796891
797892
798893 @Callable(i)
799894 func estimateGetOperationWrapperREADONLY (txId58,pmtAsId,pmtLpAmt,usrAddr) = {
800- let res = estimateGetOperation(txId58, pmtAsId, pmtLpAmt, addressFromStringValue(usrAddr))
801- $Tuple2(nil, $Tuple10(res._1, res._2, res._3, res._4, res._5, res._6, res._7, toString(res._8), res._9, res._10))
895+ let r = ego(txId58, pmtAsId, pmtLpAmt, addressFromStringValue(usrAddr))
896+ $Tuple2(nil, $Tuple10(r._1, r._2, r._3, r._4, r._5, r._6, r._7, toString(r._8), r._9, r._10))
802897 }
803898
804899
805900 @Verifier(tx)
806901 func verify () = match tx {
807902 case order: Order =>
808- let mtchPub = getMatcherPubOrFail()
809- let orV = validateMatcherOrderAllowed(order)
903+ let mtchPub = mp()
904+ let orV = moa(order)
810905 let sndrV = sigVerify(order.bodyBytes, order.proofs[0], order.senderPublicKey)
811906 let mtchV = sigVerify(order.bodyBytes, order.proofs[1], mtchPub)
812907 if (if (if (orV)
813908 then sndrV
814909 else false)
815910 then mtchV
816911 else false)
817912 then true
818- else throwOrderError(orV, sndrV, mtchV)
913+ else toe(orV, sndrV, mtchV)
819914 case _ =>
820- let admin = valueOrElse(getString(this, keyManPubKey()), EMPTY)
821- if ((admin == EMPTY))
822- then sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
823- else sigVerify(tx.bodyBytes, tx.proofs[0], fromBase58String(admin))
915+ let targetPublicKey = match m() {
916+ case pk: ByteVector =>
917+ pk
918+ case _: Unit =>
919+ tx.senderPublicKey
920+ case _ =>
921+ throw("Match error")
922+ }
923+ sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey)
824924 }
825925

github/deemru/w8io/026f985 
199.84 ms