tx · AbUKsaoRqwiCac6wPsLBq3LraCVShQSW3vXMehpsz2Jj

3N5C2THWC3XfNzmC15YBeTBLamjhhCUdeeo:  -0.01400000 Waves

2021.12.14 18:07 [1834085] smart account 3N5C2THWC3XfNzmC15YBeTBLamjhhCUdeeo > SELF 0.00000000 Waves

{ "type": 13, "id": "AbUKsaoRqwiCac6wPsLBq3LraCVShQSW3vXMehpsz2Jj", "fee": 1400000, "feeAssetId": null, "timestamp": 1639494444784, "version": 1, "sender": "3N5C2THWC3XfNzmC15YBeTBLamjhhCUdeeo", "senderPublicKey": "BweqtcaAvG8gdYYQoaMsbUczGmHJAwWBShc9noVdvmWx", "proofs": [ "W32WpbCZuu73LJdZfGy4xKaaUp1V9nkL54NgQX4VGCwcqe38iQvfS7mYPDKUf2KmteK4D5qN8JXvB1Y9z4HAXSU" ], "script": "base64:AAIFAAAAAAAAAEwIAhIECgIICBIECgIBBBIDCgEBEgASBAoCAQESAwoBARIECgIICBIAEgMKAQgSBQoDAQEBEgQKAggBEgASAwoBARIDCgEBEgQKAggBAAAAQgAAAAAKbFBkZWNpbWFscwAAAAAAAAAACAAAAAAGc2NhbGU4AAAAAAAF9eEAAAAAAAxzY2FsZThCaWdJbnQJAAE2AAAAAQAAAAAABfXhAAAAAAAHc2NhbGUxOAkAATYAAAABAA3gtrOnZAAAAAAAAAp6ZXJvQmlnSW50CQABNgAAAAEAAAAAAAAAAAAAAAAAA1NFUAIAAAACX18AAAAABUVNUFRZAgAAAAAAAAAAClBvb2xBY3RpdmUAAAAAAAAAAAEAAAAAD1Bvb2xQdXREaXNhYmxlZAAAAAAAAAAAAgAAAAATUG9vbE1hdGNoZXJEaXNhYmxlZAAAAAAAAAAAAwAAAAAMUG9vbFNodXRkb3duAAAAAAAAAAAEAAAAAA5pZHhQb29sQWRkcmVzcwAAAAAAAAAAAQAAAAANaWR4UG9vbFN0YXR1cwAAAAAAAAAAAgAAAAAQaWR4UG9vbExQQXNzZXRJZAAAAAAAAAAAAwAAAA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hbHVlT3JFbHNlAAAAAgkABB0AAAACBQAAAAR0aGlzCQEAAAATa2V5TWFuYWdlclB1YmxpY0tleQAAAAAFAAAABUVNUFRZAwkAAAAAAAACBQAAAA1tYW5hZ2VyUHVibGljBQAAAAVFTVBUWQkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAAIBQAAAAJ0eAAAAA9zZW5kZXJQdWJsaWNLZXkJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAACQACWQAAAAEFAAAADW1hbmFnZXJQdWJsaWMe61ws", "chainId": 84, "height": 1834085, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: nwBDxvd2ntWN7VTDmJr1BEsJdcVJZXjhKfs13WUMoxX Next: 145BJQzaVscfJ5SPBecemxZyhgqBRyLMkyPWkR5ZyME3 Diff:
OldNewDifferences
484484
485485
486486 @Callable(i)
487+func unstakeAndGet (amount) = {
488+ let checkPayments = if ((size(i.payments) != 0))
489+ then throw("No payments are expected")
490+ else true
491+ if ((checkPayments == checkPayments))
492+ then {
493+ let cfg = getPoolConfig()
494+ let factoryCfg = getFactoryConfig()
495+ let lpAssetId = fromBase58String(cfg[idxPoolLPAssetId])
496+ let stakingContract = valueOrErrorMessage(addressFromString(factoryCfg[idxFactoryStakingContract]), "Error. Incorrect staking address.")
497+ let unstakeInv = invoke(stakingContract, "unstake", [toBase58String(lpAssetId), amount], nil)
498+ if ((unstakeInv == unstakeInv))
499+ then {
500+ let res = estimateGetOperation(toBase58String(i.transactionId), toBase58String(lpAssetId), amount, i.caller)
501+ let poolStatus = parseIntValue(res._9)
502+ let state = res._10
503+ let checkPoolStatus = if (if (isGlobalShutdown())
504+ then true
505+ else (poolStatus == PoolShutdown))
506+ then throw(("Get operation is blocked by admin. Status = " + toString(poolStatus)))
507+ else true
508+ if ((checkPoolStatus == checkPoolStatus))
509+ then {
510+ let burnLPAssetOnFactory = invoke(factoryContract, "burn", [amount], [AttachedPayment(lpAssetId, amount)])
511+ if ((burnLPAssetOnFactory == burnLPAssetOnFactory))
512+ then state
513+ else throw("Strict value is not equal to itself.")
514+ }
515+ else throw("Strict value is not equal to itself.")
516+ }
517+ else throw("Strict value is not equal to itself.")
518+ }
519+ else throw("Strict value is not equal to itself.")
520+ }
521+
522+
523+
524+@Callable(i)
487525 func activate (amtAssetStr,priceAssetStr) = if ((toString(i.caller) != toString(factoryContract)))
488526 then throw("permissions denied")
489527 else $Tuple2([StringEntry(keyAmtAsset(), amtAssetStr), StringEntry(keyPriceAsset(), priceAssetStr)], "success")
528+
529+
530+
531+@Callable(i)
532+func getPoolConfigWrapperREADONLY () = $Tuple2(nil, getPoolConfig())
533+
534+
535+
536+@Callable(i)
537+func getAccBalanceWrapperREADONLY (assetId) = $Tuple2(nil, getAccBalance(assetId))
538+
539+
540+
541+@Callable(i)
542+func calcPricesWrapperREADONLY (amAmt,prAmt,lpAmt) = {
543+ let prices = calcPrices(amAmt, prAmt, lpAmt)
544+ $Tuple2(nil, [toString(prices[0]), toString(prices[1]), toString(prices[2])])
545+ }
546+
547+
548+
549+@Callable(i)
550+func fromX18WrapperREADONLY (val,resultScaleMult) = $Tuple2(nil, fromX18(parseBigIntValue(val), resultScaleMult))
490551
491552
492553
503564 let poolLPBalance = valueOrErrorMessage(assetInfo(lpAssetId), (("Asset " + toBase58String(lpAssetId)) + " doesn't exist")).quantity
504565 let accAmtAssetBalance = getAccBalance(amtAssetId)
505566 let accPriceAssetBalance = getAccBalance(priceAssetId)
506- let pricesList = calcPrices(accAmtAssetBalance, accPriceAssetBalance, poolLPBalance)
567+ let pricesList = if ((poolLPBalance == 0))
568+ then [zeroBigInt, zeroBigInt, zeroBigInt]
569+ else calcPrices(accAmtAssetBalance, accPriceAssetBalance, poolLPBalance)
507570 let curPrice = 0
508571 let lpAmtAssetShare = fromX18(pricesList[1], scale8)
509572 let lpPriceAssetShare = fromX18(pricesList[2], scale8)
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let lPdecimals = 8
55
66 let scale8 = 100000000
77
88 let scale8BigInt = toBigInt(100000000)
99
1010 let scale18 = toBigInt(1000000000000000000)
1111
1212 let zeroBigInt = toBigInt(0)
1313
1414 let SEP = "__"
1515
1616 let EMPTY = ""
1717
1818 let PoolActive = 1
1919
2020 let PoolPutDisabled = 2
2121
2222 let PoolMatcherDisabled = 3
2323
2424 let PoolShutdown = 4
2525
2626 let idxPoolAddress = 1
2727
2828 let idxPoolStatus = 2
2929
3030 let idxPoolLPAssetId = 3
3131
3232 let idxAmtAssetId = 4
3333
3434 let idxPriceAssetId = 5
3535
3636 let idxAmtAssetDcm = 6
3737
3838 let idxPriceAssetDcm = 7
3939
4040 let idxIAmtAssetId = 8
4141
4242 let idxIPriceAssetId = 9
4343
4444 let idxLPAssetDcm = 10
4545
4646 let idxPoolAmtAssetAmt = 1
4747
4848 let idxPoolPriceAssetAmt = 2
4949
5050 let idxPoolLPAssetAmt = 3
5151
5252 let idxFactoryStakingContract = 1
5353
5454 let idxFactorySlippageContract = 7
5555
5656 func toX18 (origVal,origScaleMult) = fraction(toBigInt(origVal), scale18, toBigInt(origScaleMult))
5757
5858
5959 func fromX18 (val,resultScaleMult) = toInt(fraction(val, toBigInt(resultScaleMult), scale18))
6060
6161
6262 func toScale (amt,resScale,curScale) = fraction(amt, resScale, curScale)
6363
6464
6565 func abs (val) = if ((zeroBigInt > val))
6666 then -(val)
6767 else val
6868
6969
7070 func keyFactoryContract () = "%s__factoryContract"
7171
7272
7373 func keyManagerPublicKey () = "%s__managerPublicKey"
7474
7575
7676 func keyPriceLast () = "%s%s__price__last"
7777
7878
7979 func keyPriceHistory (h,timestamp) = makeString(["%s%s%d%d__price__history", toString(h), toString(timestamp)], SEP)
8080
8181
8282 func keyPutActionByUser (userAddress,txId) = ((("%s%s%s__P__" + userAddress) + "__") + txId)
8383
8484
8585 func keyGetActionByUser (userAddress,txId) = ((("%s%s%s__G__" + userAddress) + "__") + txId)
8686
8787
8888 func keyAmtAsset () = "%s__amountAsset"
8989
9090
9191 func keyPriceAsset () = "%s__priceAsset"
9292
9393
9494 func keyKHistoric (h,timestamp) = makeString(["%s%s%d%d__K_history", toString(h), toString(timestamp)], SEP)
9595
9696
9797 func keyFactoryConfig () = "%s__factoryConfig"
9898
9999
100100 func keyMatcherPub () = "%s%s__matcher__publicKey"
101101
102102
103103 func keyMappingPoolContractAddressToPoolAssets (poolContractAddress) = (("%s%s%s__" + poolContractAddress) + "__mappings__poolContract2LpAsset")
104104
105105
106106 func keyPoolConfig (iAmtAsset,iPriceAsset) = (((("%d%d%s__" + iAmtAsset) + "__") + iPriceAsset) + "__config")
107107
108108
109109 func keyMappingsBaseAsset2internalId (baseAssetStr) = ("%s%s%s__mappings__baseAsset2internalId__" + baseAssetStr)
110110
111111
112112 func keyAllPoolsShutdown () = "%s__shutdown"
113113
114114
115115 func keyPoolWeight (contractAddress) = ("%s%s__poolWeight__" + contractAddress)
116116
117117
118118 func throwOrderError (orderValid,senderValid,matcherValid) = throw(((((("order validation failed: orderValid=" + toString(orderValid)) + " senderValid=") + toString(senderValid)) + " matcherValid=") + toString(matcherValid)))
119119
120120
121121 func getStringOrFail (address,key) = valueOrErrorMessage(getString(address, key), makeString(["mandatory ", toString(address), ".", key, " is not defined"], ""))
122122
123123
124124 func getIntOrFail (address,key) = valueOrErrorMessage(getInteger(address, key), makeString(["mandatory ", toString(address), ".", key, " is not defined"], ""))
125125
126126
127127 let factoryContract = addressFromStringValue(getStringOrFail(this, keyFactoryContract()))
128128
129129 func isGlobalShutdown () = valueOrElse(getBoolean(factoryContract, keyAllPoolsShutdown()), false)
130130
131131
132132 func getMatcherPubOrFail () = fromBase58String(getStringOrFail(factoryContract, keyMatcherPub()))
133133
134134
135135 func getPoolConfig () = {
136136 let amtAsset = getStringOrFail(this, keyAmtAsset())
137137 let priceAsset = getStringOrFail(this, keyPriceAsset())
138138 let iPriceAsset = getIntOrFail(factoryContract, keyMappingsBaseAsset2internalId(priceAsset))
139139 let iAmtAsset = getIntOrFail(factoryContract, keyMappingsBaseAsset2internalId(amtAsset))
140140 split(getStringOrFail(factoryContract, keyPoolConfig(toString(iAmtAsset), toString(iPriceAsset))), SEP)
141141 }
142142
143143
144144 func getFactoryConfig () = split(getStringOrFail(factoryContract, keyFactoryConfig()), SEP)
145145
146146
147147 func dataPutActionInfo (inAmtAssetAmt,inPriceAssetAmt,outLpAmt,price,slippageTolerancePassedByUser,slippageToleranceReal,txHeight,txTimestamp,slipageAmtAssetAmt,slipagePriceAssetAmt) = makeString(["%d%d%d%d%d%d%d%d%d%d", toString(inAmtAssetAmt), toString(inPriceAssetAmt), toString(outLpAmt), toString(price), toString(slippageTolerancePassedByUser), toString(slippageToleranceReal), toString(txHeight), toString(txTimestamp), toString(slipageAmtAssetAmt), toString(slipagePriceAssetAmt)], SEP)
148148
149149
150150 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)
151151
152152
153153 func getAccBalance (assetId) = if ((assetId == "WAVES"))
154154 then wavesBalance(this).available
155155 else assetBalance(this, fromBase58String(assetId))
156156
157157
158158 func calcPriceBigInt (prAmtX18,amAmtX18) = fraction(prAmtX18, scale18, amAmtX18)
159159
160160
161161 func privateCalcPrice (amAssetDcm,prAssetDcm,amAmt,prAmt) = {
162162 let amtAssetAmtX18 = toX18(amAmt, amAssetDcm)
163163 let priceAssetAmtX18 = toX18(prAmt, prAssetDcm)
164164 calcPriceBigInt(priceAssetAmtX18, amtAssetAmtX18)
165165 }
166166
167167
168168 func calcPrices (amAmt,prAmt,lpAmt) = {
169169 let cfg = getPoolConfig()
170170 let amtAssetDcm = parseIntValue(cfg[idxAmtAssetDcm])
171171 let priceAssetDcm = parseIntValue(cfg[idxPriceAssetDcm])
172172 let priceX18 = privateCalcPrice(amtAssetDcm, priceAssetDcm, amAmt, prAmt)
173173 let amAmtX18 = toX18(amAmt, amtAssetDcm)
174174 let prAmtX18 = toX18(prAmt, priceAssetDcm)
175175 let lpAmtX18 = toX18(lpAmt, scale8)
176176 let lpPriceInAmAssetX18 = calcPriceBigInt(amAmtX18, lpAmtX18)
177177 let lpPriceInPrAssetX18 = calcPriceBigInt(prAmtX18, lpAmtX18)
178178 [priceX18, lpPriceInAmAssetX18, lpPriceInPrAssetX18]
179179 }
180180
181181
182182 func calculatePrices (amAmt,prAmt,lpAmt) = {
183183 let prices = calcPrices(amAmt, prAmt, lpAmt)
184184 [fromX18(prices[0], scale8), fromX18(prices[1], scale8), fromX18(prices[2], scale8)]
185185 }
186186
187187
188188 func estimateGetOperation (txId58,pmtAssetId,pmtLpAmt,userAddress) = {
189189 let cfg = getPoolConfig()
190190 let lpAssetId = cfg[idxPoolLPAssetId]
191191 let amAssetId = cfg[idxAmtAssetId]
192192 let prAssetId = cfg[idxPriceAssetId]
193193 let amAssetDcm = parseIntValue(cfg[idxAmtAssetDcm])
194194 let prAssetDcm = parseIntValue(cfg[idxPriceAssetDcm])
195195 let poolStatus = cfg[idxPoolStatus]
196196 let lpEmission = valueOrErrorMessage(assetInfo(fromBase58String(lpAssetId)), (("Asset " + lpAssetId) + " doesn't exist")).quantity
197197 if ((lpAssetId != pmtAssetId))
198198 then throw("Invalid asset passed.")
199199 else {
200200 let amBalance = getAccBalance(amAssetId)
201201 let amBalanceX18 = toX18(amBalance, amAssetDcm)
202202 let prBalance = getAccBalance(prAssetId)
203203 let prBalanceX18 = toX18(prBalance, prAssetDcm)
204204 let curPriceX18 = calcPriceBigInt(prBalanceX18, amBalanceX18)
205205 let curPrice = fromX18(curPriceX18, scale8)
206206 let pmtLpAmtX18 = toX18(pmtLpAmt, scale8)
207207 let lpEmissionX18 = toX18(lpEmission, scale8)
208208 let outAmAmtX18 = fraction(amBalanceX18, pmtLpAmtX18, lpEmissionX18)
209209 let outPrAmtX18 = fraction(prBalanceX18, pmtLpAmtX18, lpEmissionX18)
210210 let outAmAmt = fromX18(outAmAmtX18, amAssetDcm)
211211 let outPrAmt = fromX18(outPrAmtX18, prAssetDcm)
212212 let state = if ((txId58 == ""))
213213 then nil
214214 else [ScriptTransfer(userAddress, outAmAmt, if ((amAssetId == "WAVES"))
215215 then unit
216216 else fromBase58String(amAssetId)), ScriptTransfer(userAddress, outPrAmt, if ((prAssetId == "WAVES"))
217217 then unit
218218 else fromBase58String(prAssetId)), StringEntry(keyGetActionByUser(toString(userAddress), txId58), dataGetActionInfo(outAmAmt, outPrAmt, pmtLpAmt, curPrice, height, lastBlock.timestamp)), IntegerEntry(keyPriceLast(), curPrice), IntegerEntry(keyPriceHistory(height, lastBlock.timestamp), curPrice)]
219219 $Tuple10(outAmAmt, outPrAmt, amAssetId, prAssetId, amBalance, prBalance, lpEmission, curPriceX18, poolStatus, state)
220220 }
221221 }
222222
223223
224224 func estimatePutOperation (txId58,slippageTolerance,inAmAssetAmt,inAmAssetId,inPrAssetAmt,inPrAssetId,userAddress,isEvaluate,emitLp) = {
225225 let cfg = getPoolConfig()
226226 let lpAssetId = fromBase58String(cfg[idxPoolLPAssetId])
227227 let amAssetIdStr = cfg[idxAmtAssetId]
228228 let prAssetIdStr = cfg[idxPriceAssetId]
229229 let iAmtAssetId = cfg[idxIAmtAssetId]
230230 let iPriceAssetId = cfg[idxIPriceAssetId]
231231 let amtAssetDcm = parseIntValue(cfg[idxAmtAssetDcm])
232232 let priceAssetDcm = parseIntValue(cfg[idxPriceAssetDcm])
233233 let poolStatus = cfg[idxPoolStatus]
234234 let lpEmission = valueOrErrorMessage(assetInfo(lpAssetId), (("Asset " + toBase58String(lpAssetId)) + " doesn't exist")).quantity
235235 let inAmAssetIdStr = toBase58String(valueOrElse(inAmAssetId, fromBase58String("WAVES")))
236236 let inPrAssetIdStr = toBase58String(valueOrElse(inPrAssetId, fromBase58String("WAVES")))
237237 if (if ((amAssetIdStr != inAmAssetIdStr))
238238 then true
239239 else (prAssetIdStr != inPrAssetIdStr))
240240 then throw("Invalid amt or price asset passed.")
241241 else {
242242 let amBalance = if (isEvaluate)
243243 then getAccBalance(amAssetIdStr)
244244 else (getAccBalance(amAssetIdStr) - inAmAssetAmt)
245245 let prBalance = if (isEvaluate)
246246 then getAccBalance(prAssetIdStr)
247247 else (getAccBalance(prAssetIdStr) - inPrAssetAmt)
248248 let inAmAssetAmtX18 = toX18(inAmAssetAmt, amtAssetDcm)
249249 let inPrAssetAmtX18 = toX18(inPrAssetAmt, priceAssetDcm)
250250 let userPriceX18 = calcPriceBigInt(inPrAssetAmtX18, inAmAssetAmtX18)
251251 let amBalanceX18 = toX18(amBalance, amtAssetDcm)
252252 let prBalanceX18 = toX18(prBalance, priceAssetDcm)
253253 let res = if ((lpEmission == 0))
254254 then {
255255 let curPriceX18 = zeroBigInt
256256 let slippageX18 = zeroBigInt
257257 let lpAmtX18 = pow((inAmAssetAmtX18 * inPrAssetAmtX18), 0, toBigInt(5), 1, 0, DOWN)
258258 $Tuple5(fromX18(lpAmtX18, scale8), fromX18(inAmAssetAmtX18, amtAssetDcm), fromX18(inPrAssetAmtX18, priceAssetDcm), calcPriceBigInt((prBalanceX18 + inPrAssetAmtX18), (amBalanceX18 + inAmAssetAmtX18)), slippageX18)
259259 }
260260 else {
261261 let curPriceX18 = calcPriceBigInt(prBalanceX18, amBalanceX18)
262262 let slippageX18 = fraction(abs((curPriceX18 - userPriceX18)), scale18, curPriceX18)
263263 let slippageToleranceX18 = toX18(slippageTolerance, scale8)
264264 if (if ((curPriceX18 != zeroBigInt))
265265 then (slippageX18 > slippageToleranceX18)
266266 else false)
267267 then throw(((("Price slippage " + toString(slippageX18)) + " exceeded the passed limit of ") + toString(slippageToleranceX18)))
268268 else {
269269 let lpEmissionX18 = toX18(lpEmission, scale8)
270270 let prViaAmX18 = fraction(inAmAssetAmtX18, curPriceX18, scale18)
271271 let amViaPrX18 = fraction(inPrAssetAmtX18, scale18, curPriceX18)
272272 let expectedAmts = if ((prViaAmX18 > inPrAssetAmtX18))
273273 then $Tuple2(amViaPrX18, inPrAssetAmtX18)
274274 else $Tuple2(inAmAssetAmtX18, prViaAmX18)
275275 let expAmtAssetAmtX18 = expectedAmts._1
276276 let expPriceAssetAmtX18 = expectedAmts._2
277277 let lpAmtX18 = fraction(lpEmissionX18, expPriceAssetAmtX18, prBalanceX18)
278278 $Tuple5(fromX18(lpAmtX18, scale8), fromX18(expAmtAssetAmtX18, amtAssetDcm), fromX18(expPriceAssetAmtX18, priceAssetDcm), curPriceX18, slippageX18)
279279 }
280280 }
281281 let calcLpAmt = res._1
282282 let calcAmAssetPmt = res._2
283283 let calcPrAssetPmt = res._3
284284 let curPrice = fromX18(res._4, scale8)
285285 let slippageCalc = fromX18(res._5, scale8)
286286 if ((0 >= calcLpAmt))
287287 then throw("Invalid calculations. LP calculated is less than zero.")
288288 else {
289289 let emitLpAmt = if (!(emitLp))
290290 then 0
291291 else calcLpAmt
292292 let amDiff = (inAmAssetAmt - calcAmAssetPmt)
293293 let prDiff = (inPrAssetAmt - calcPrAssetPmt)
294294 let commonState = [IntegerEntry(keyPriceLast(), curPrice), IntegerEntry(keyPriceHistory(height, lastBlock.timestamp), curPrice), StringEntry(keyPutActionByUser(userAddress, txId58), dataPutActionInfo(calcAmAssetPmt, calcPrAssetPmt, emitLpAmt, curPrice, slippageTolerance, slippageCalc, height, lastBlock.timestamp, amDiff, prDiff))]
295295 $Tuple13(calcLpAmt, emitLpAmt, curPrice, amBalance, prBalance, lpEmission, lpAssetId, poolStatus, commonState, amDiff, prDiff, inAmAssetId, inPrAssetId)
296296 }
297297 }
298298 }
299299
300300
301301 func validateMatcherOrderAllowed (order) = {
302302 let cfg = getPoolConfig()
303303 let amtAssetId = cfg[idxAmtAssetId]
304304 let priceAssetId = cfg[idxPriceAssetId]
305305 let poolStatus = parseIntValue(cfg[idxPoolStatus])
306306 let amtAssetDcm = parseIntValue(cfg[idxAmtAssetDcm])
307307 let priceAssetDcm = parseIntValue(cfg[idxPriceAssetDcm])
308308 let accAmtAssetBalance = getAccBalance(amtAssetId)
309309 let accPriceAssetBalance = getAccBalance(priceAssetId)
310310 let curPriceX18 = if ((order.orderType == Buy))
311311 then privateCalcPrice(amtAssetDcm, priceAssetDcm, (accAmtAssetBalance + order.amount), accPriceAssetBalance)
312312 else privateCalcPrice(amtAssetDcm, priceAssetDcm, (accAmtAssetBalance - order.amount), accPriceAssetBalance)
313313 let curPrice = fromX18(curPriceX18, scale8)
314314 if (if (if (isGlobalShutdown())
315315 then true
316316 else (poolStatus == PoolMatcherDisabled))
317317 then true
318318 else (poolStatus == PoolShutdown))
319319 then throw("Exchange operations disabled")
320320 else {
321321 let orderAmtAsset = order.assetPair.amountAsset
322322 let orderAmtAssetStr = if ((orderAmtAsset == unit))
323323 then "WAVES"
324324 else toBase58String(value(orderAmtAsset))
325325 let orderPriceAsset = order.assetPair.priceAsset
326326 let orderPriceAssetStr = if ((orderPriceAsset == unit))
327327 then "WAVES"
328328 else toBase58String(value(orderPriceAsset))
329329 if (if ((orderAmtAssetStr != amtAssetId))
330330 then true
331331 else (orderPriceAssetStr != priceAssetId))
332332 then throw("Wrong order assets.")
333333 else {
334334 let orderPrice = order.price
335335 let priceDcm = fraction(scale8, priceAssetDcm, amtAssetDcm)
336336 let castedOrderPrice = toScale(orderPrice, scale8, priceDcm)
337337 let isOrderPriceValid = if ((order.orderType == Buy))
338338 then (curPrice >= castedOrderPrice)
339339 else (castedOrderPrice >= curPrice)
340340 true
341341 }
342342 }
343343 }
344344
345345
346346 func commonGet (i) = if ((size(i.payments) != 1))
347347 then throw("exactly 1 payment is expected")
348348 else {
349349 let pmt = value(i.payments[0])
350350 let pmtAssetId = value(pmt.assetId)
351351 let pmtAmt = pmt.amount
352352 let res = estimateGetOperation(toBase58String(i.transactionId), toBase58String(pmtAssetId), pmtAmt, i.caller)
353353 let outAmAmt = res._1
354354 let outPrAmt = res._2
355355 let poolStatus = parseIntValue(res._9)
356356 let state = res._10
357357 if (if (isGlobalShutdown())
358358 then true
359359 else (poolStatus == PoolShutdown))
360360 then throw(("Get operation is blocked by admin. Status = " + toString(poolStatus)))
361361 else $Tuple5(outAmAmt, outPrAmt, pmtAmt, pmtAssetId, state)
362362 }
363363
364364
365365 func commonPut (i,slippageTolerance,emitLp) = if ((size(i.payments) != 2))
366366 then throw("exactly 2 payments are expected")
367367 else {
368368 let amAssetPmt = value(i.payments[0])
369369 let prAssetPmt = value(i.payments[1])
370370 let estPut = estimatePutOperation(toBase58String(i.transactionId), slippageTolerance, amAssetPmt.amount, amAssetPmt.assetId, prAssetPmt.amount, prAssetPmt.assetId, toString(i.caller), false, emitLp)
371371 let poolStatus = parseIntValue(estPut._8)
372372 if (if (if (isGlobalShutdown())
373373 then true
374374 else (poolStatus == PoolPutDisabled))
375375 then true
376376 else (poolStatus == PoolShutdown))
377377 then throw(("Put operation is blocked by admin. Status = " + toString(poolStatus)))
378378 else estPut
379379 }
380380
381381
382382 @Callable(i)
383383 func constructor (factoryContract,managerPublicKey) = if ((i.caller != this))
384384 then throw("permissions denied")
385385 else [StringEntry(keyFactoryContract(), factoryContract), StringEntry(keyManagerPublicKey(), managerPublicKey)]
386386
387387
388388
389389 @Callable(i)
390390 func put (slippageTolerance,shouldAutoStake) = {
391391 let factoryCfg = getFactoryConfig()
392392 let stakingContract = valueOrErrorMessage(addressFromString(factoryCfg[idxFactoryStakingContract]), "Error. Incorrect staking address.")
393393 let slippageContract = valueOrErrorMessage(addressFromString(factoryCfg[idxFactorySlippageContract]), "Error. Incorrect slippage contract address.")
394394 if ((0 > slippageTolerance))
395395 then throw("Invalid slippageTolerance passed")
396396 else {
397397 let estPut = commonPut(i, slippageTolerance, true)
398398 let emitLpAmt = estPut._2
399399 let lpAssetId = estPut._7
400400 let state = estPut._9
401401 let amDiff = estPut._10
402402 let prDiff = estPut._11
403403 let amId = estPut._12
404404 let prId = estPut._13
405405 let emitInv = invoke(factoryContract, "emit", [emitLpAmt], nil)
406406 if ((emitInv == emitInv))
407407 then {
408408 let slippageAInv = if ((amDiff > 0))
409409 then invoke(slippageContract, "put", nil, [AttachedPayment(amId, amDiff)])
410410 else nil
411411 if ((slippageAInv == slippageAInv))
412412 then {
413413 let slippagePInv = if ((prDiff > 0))
414414 then invoke(slippageContract, "put", nil, [AttachedPayment(prId, prDiff)])
415415 else nil
416416 if ((slippagePInv == slippagePInv))
417417 then {
418418 let lpTransfer = if (shouldAutoStake)
419419 then {
420420 let slpStakeInv = invoke(stakingContract, "stake", nil, [AttachedPayment(lpAssetId, emitLpAmt)])
421421 if ((slpStakeInv == slpStakeInv))
422422 then nil
423423 else throw("Strict value is not equal to itself.")
424424 }
425425 else [ScriptTransfer(i.caller, emitLpAmt, lpAssetId)]
426426 (state ++ lpTransfer)
427427 }
428428 else throw("Strict value is not equal to itself.")
429429 }
430430 else throw("Strict value is not equal to itself.")
431431 }
432432 else throw("Strict value is not equal to itself.")
433433 }
434434 }
435435
436436
437437
438438 @Callable(i)
439439 func putForFree (maxSlippage) = if ((0 > maxSlippage))
440440 then throw("Invalid value passed")
441441 else {
442442 let estPut = commonPut(i, maxSlippage, false)
443443 estPut._9
444444 }
445445
446446
447447
448448 @Callable(i)
449449 func get () = {
450450 let res = commonGet(i)
451451 let outAmtAmt = res._1
452452 let outPrAmt = res._2
453453 let pmtAmt = res._3
454454 let pmtAssetId = res._4
455455 let state = res._5
456456 let burnLPAssetOnFactory = invoke(factoryContract, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
457457 if ((burnLPAssetOnFactory == burnLPAssetOnFactory))
458458 then state
459459 else throw("Strict value is not equal to itself.")
460460 }
461461
462462
463463
464464 @Callable(i)
465465 func getNoLess (noLessThenAmtAsset,noLessThenPriceAsset) = {
466466 let res = commonGet(i)
467467 let outAmAmt = res._1
468468 let outPrAmt = res._2
469469 let pmtAmt = res._3
470470 let pmtAssetId = res._4
471471 let state = res._5
472472 if ((noLessThenAmtAsset > outAmAmt))
473473 then throw(((("noLessThenAmtAsset failed: " + toString(outAmAmt)) + " < ") + toString(noLessThenAmtAsset)))
474474 else if ((noLessThenPriceAsset > outPrAmt))
475475 then throw(((("noLessThenPriceAsset failed: " + toString(outPrAmt)) + " < ") + toString(noLessThenPriceAsset)))
476476 else {
477477 let burnLPAssetOnFactory = invoke(factoryContract, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
478478 if ((burnLPAssetOnFactory == burnLPAssetOnFactory))
479479 then state
480480 else throw("Strict value is not equal to itself.")
481481 }
482482 }
483483
484484
485485
486486 @Callable(i)
487+func unstakeAndGet (amount) = {
488+ let checkPayments = if ((size(i.payments) != 0))
489+ then throw("No payments are expected")
490+ else true
491+ if ((checkPayments == checkPayments))
492+ then {
493+ let cfg = getPoolConfig()
494+ let factoryCfg = getFactoryConfig()
495+ let lpAssetId = fromBase58String(cfg[idxPoolLPAssetId])
496+ let stakingContract = valueOrErrorMessage(addressFromString(factoryCfg[idxFactoryStakingContract]), "Error. Incorrect staking address.")
497+ let unstakeInv = invoke(stakingContract, "unstake", [toBase58String(lpAssetId), amount], nil)
498+ if ((unstakeInv == unstakeInv))
499+ then {
500+ let res = estimateGetOperation(toBase58String(i.transactionId), toBase58String(lpAssetId), amount, i.caller)
501+ let poolStatus = parseIntValue(res._9)
502+ let state = res._10
503+ let checkPoolStatus = if (if (isGlobalShutdown())
504+ then true
505+ else (poolStatus == PoolShutdown))
506+ then throw(("Get operation is blocked by admin. Status = " + toString(poolStatus)))
507+ else true
508+ if ((checkPoolStatus == checkPoolStatus))
509+ then {
510+ let burnLPAssetOnFactory = invoke(factoryContract, "burn", [amount], [AttachedPayment(lpAssetId, amount)])
511+ if ((burnLPAssetOnFactory == burnLPAssetOnFactory))
512+ then state
513+ else throw("Strict value is not equal to itself.")
514+ }
515+ else throw("Strict value is not equal to itself.")
516+ }
517+ else throw("Strict value is not equal to itself.")
518+ }
519+ else throw("Strict value is not equal to itself.")
520+ }
521+
522+
523+
524+@Callable(i)
487525 func activate (amtAssetStr,priceAssetStr) = if ((toString(i.caller) != toString(factoryContract)))
488526 then throw("permissions denied")
489527 else $Tuple2([StringEntry(keyAmtAsset(), amtAssetStr), StringEntry(keyPriceAsset(), priceAssetStr)], "success")
528+
529+
530+
531+@Callable(i)
532+func getPoolConfigWrapperREADONLY () = $Tuple2(nil, getPoolConfig())
533+
534+
535+
536+@Callable(i)
537+func getAccBalanceWrapperREADONLY (assetId) = $Tuple2(nil, getAccBalance(assetId))
538+
539+
540+
541+@Callable(i)
542+func calcPricesWrapperREADONLY (amAmt,prAmt,lpAmt) = {
543+ let prices = calcPrices(amAmt, prAmt, lpAmt)
544+ $Tuple2(nil, [toString(prices[0]), toString(prices[1]), toString(prices[2])])
545+ }
546+
547+
548+
549+@Callable(i)
550+func fromX18WrapperREADONLY (val,resultScaleMult) = $Tuple2(nil, fromX18(parseBigIntValue(val), resultScaleMult))
490551
491552
492553
493554 @Callable(i)
494555 func statsREADONLY () = {
495556 let cfg = getPoolConfig()
496557 let lpAssetId = fromBase58String(cfg[idxPoolLPAssetId])
497558 let amtAssetId = cfg[idxAmtAssetId]
498559 let priceAssetId = cfg[idxPriceAssetId]
499560 let iAmtAssetId = cfg[idxIAmtAssetId]
500561 let iPriceAssetId = cfg[idxIPriceAssetId]
501562 let amtAssetDcm = parseIntValue(cfg[idxAmtAssetDcm])
502563 let priceAssetDcm = parseIntValue(cfg[idxPriceAssetDcm])
503564 let poolLPBalance = valueOrErrorMessage(assetInfo(lpAssetId), (("Asset " + toBase58String(lpAssetId)) + " doesn't exist")).quantity
504565 let accAmtAssetBalance = getAccBalance(amtAssetId)
505566 let accPriceAssetBalance = getAccBalance(priceAssetId)
506- let pricesList = calcPrices(accAmtAssetBalance, accPriceAssetBalance, poolLPBalance)
567+ let pricesList = if ((poolLPBalance == 0))
568+ then [zeroBigInt, zeroBigInt, zeroBigInt]
569+ else calcPrices(accAmtAssetBalance, accPriceAssetBalance, poolLPBalance)
507570 let curPrice = 0
508571 let lpAmtAssetShare = fromX18(pricesList[1], scale8)
509572 let lpPriceAssetShare = fromX18(pricesList[2], scale8)
510573 let poolWeight = value(getInteger(factoryContract, keyPoolWeight(toString(this))))
511574 $Tuple2(nil, makeString(["%d%d%d%d%d%d%d", toString(accAmtAssetBalance), toString(accPriceAssetBalance), toString(poolLPBalance), toString(curPrice), toString(lpAmtAssetShare), toString(lpPriceAssetShare), toString(poolWeight)], SEP))
512575 }
513576
514577
515578
516579 @Callable(i)
517580 func evaluatePutByAmountAssetREADONLY (inAmAssetAmt) = {
518581 let cfg = getPoolConfig()
519582 let lpAssetId = fromBase58String(cfg[idxPoolLPAssetId])
520583 let amAssetIdStr = cfg[idxAmtAssetId]
521584 let amAssetId = fromBase58String(amAssetIdStr)
522585 let prAssetIdStr = cfg[idxPriceAssetId]
523586 let prAssetId = fromBase58String(prAssetIdStr)
524587 let amtAssetDcm = parseIntValue(cfg[idxAmtAssetDcm])
525588 let priceAssetDcm = parseIntValue(cfg[idxPriceAssetDcm])
526589 let poolStatus = cfg[idxPoolStatus]
527590 let poolLPBalance = valueOrErrorMessage(assetInfo(lpAssetId), (("Asset " + toBase58String(lpAssetId)) + " doesn't exist")).quantity
528591 let accAmtAssetBalance = getAccBalance(amAssetIdStr)
529592 let accPriceAssetBalance = getAccBalance(prAssetIdStr)
530593 let amtAssetAmtX18 = toX18(accAmtAssetBalance, amtAssetDcm)
531594 let priceAssetAmtX18 = toX18(accPriceAssetBalance, priceAssetDcm)
532595 let curPriceX18 = if ((poolLPBalance == 0))
533596 then zeroBigInt
534597 else calcPriceBigInt(priceAssetAmtX18, amtAssetAmtX18)
535598 let inAmAssetAmtX18 = toX18(inAmAssetAmt, amtAssetDcm)
536599 let inPrAssetAmtX18 = fraction(inAmAssetAmtX18, curPriceX18, scale18)
537600 let inPrAssetAmt = fromX18(inPrAssetAmtX18, priceAssetDcm)
538601 let estPut = estimatePutOperation("", 500000, inAmAssetAmt, amAssetId, inPrAssetAmt, prAssetId, "", true, false)
539602 let calcLpAmt = estPut._1
540603 let curPriceCalc = estPut._3
541604 let amBalance = estPut._4
542605 let prBalance = estPut._5
543606 let lpEmission = estPut._6
544607 $Tuple2(nil, makeString(["%d%d%d%d%d%d%d%d", toString(calcLpAmt), toString(fromX18(curPriceX18, scale8)), toString(amBalance), toString(prBalance), toString(lpEmission), poolStatus, toString(inAmAssetAmt), toString(inPrAssetAmt)], SEP))
545608 }
546609
547610
548611
549612 @Callable(i)
550613 func evaluatePutByPriceAssetREADONLY (inPrAssetAmt) = {
551614 let cfg = getPoolConfig()
552615 let lpAssetId = fromBase58String(cfg[idxPoolLPAssetId])
553616 let amAssetIdStr = cfg[idxAmtAssetId]
554617 let amAssetId = fromBase58String(amAssetIdStr)
555618 let prAssetIdStr = cfg[idxPriceAssetId]
556619 let prAssetId = fromBase58String(prAssetIdStr)
557620 let amtAssetDcm = parseIntValue(cfg[idxAmtAssetDcm])
558621 let priceAssetDcm = parseIntValue(cfg[idxPriceAssetDcm])
559622 let poolStatus = cfg[idxPoolStatus]
560623 let poolLPBalance = valueOrErrorMessage(assetInfo(lpAssetId), (("Asset " + toBase58String(lpAssetId)) + " doesn't exist")).quantity
561624 let amBalanceRaw = getAccBalance(amAssetIdStr)
562625 let prBalanceRaw = getAccBalance(prAssetIdStr)
563626 let amBalanceRawX18 = toX18(amBalanceRaw, amtAssetDcm)
564627 let prBalanceRawX18 = toX18(prBalanceRaw, priceAssetDcm)
565628 let curPriceX18 = if ((poolLPBalance == 0))
566629 then zeroBigInt
567630 else calcPriceBigInt(prBalanceRawX18, amBalanceRawX18)
568631 let inPrAssetAmtX18 = toX18(inPrAssetAmt, priceAssetDcm)
569632 let inAmAssetAmtX18 = fraction(inPrAssetAmtX18, scale18, curPriceX18)
570633 let inAmAssetAmt = fromX18(inAmAssetAmtX18, amtAssetDcm)
571634 let estPut = estimatePutOperation("", 500000, inAmAssetAmt, amAssetId, inPrAssetAmt, prAssetId, "", true, false)
572635 let calcLpAmt = estPut._1
573636 let curPriceCalc = estPut._3
574637 let amBalance = estPut._4
575638 let prBalance = estPut._5
576639 let lpEmission = estPut._6
577640 $Tuple2(nil, makeString(["%d%d%d%d%d%d%d%d", toString(calcLpAmt), toString(fromX18(curPriceX18, scale8)), toString(amBalance), toString(prBalance), toString(lpEmission), poolStatus, toString(inAmAssetAmt), toString(inPrAssetAmt)], SEP))
578641 }
579642
580643
581644
582645 @Callable(i)
583646 func evaluateGetREADONLY (paymentLpAssetId,paymentLpAmt) = {
584647 let res = estimateGetOperation("", paymentLpAssetId, paymentLpAmt, this)
585648 let outAmAmt = res._1
586649 let outPrAmt = res._2
587650 let amBalance = res._5
588651 let prBalance = res._6
589652 let lpEmission = res._7
590653 let curPrice = res._8
591654 let poolStatus = parseIntValue(res._9)
592655 $Tuple2(nil, makeString(["%d%d%d%d%d%d%d", toString(outAmAmt), toString(outPrAmt), toString(amBalance), toString(prBalance), toString(lpEmission), toString(curPrice), toString(poolStatus)], SEP))
593656 }
594657
595658
596659 @Verifier(tx)
597660 func verify () = match tx {
598661 case order: Order =>
599662 let matcherPub = getMatcherPubOrFail()
600663 let orderValid = validateMatcherOrderAllowed(order)
601664 let senderValid = sigVerify(order.bodyBytes, order.proofs[0], order.senderPublicKey)
602665 let matcherValid = sigVerify(order.bodyBytes, order.proofs[1], matcherPub)
603666 if (if (if (orderValid)
604667 then senderValid
605668 else false)
606669 then matcherValid
607670 else false)
608671 then true
609672 else throwOrderError(orderValid, senderValid, matcherValid)
610673 case _ =>
611674 let managerPublic = valueOrElse(getString(this, keyManagerPublicKey()), EMPTY)
612675 if ((managerPublic == EMPTY))
613676 then sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
614677 else sigVerify(tx.bodyBytes, tx.proofs[0], fromBase58String(managerPublic))
615678 }
616679

github/deemru/w8io/026f985 
60.13 ms