tx · eWPovpWEZ6YQ4GWzcpZ4kxoVqZbAL6RxUJcK4nkqNY1

3N8cKL8uHT2sFedwsSdD7u7zFPD7iM2WSo4:  -0.03000000 Waves

2022.11.07 10:36 [2306430] smart account 3N8cKL8uHT2sFedwsSdD7u7zFPD7iM2WSo4 > SELF 0.00000000 Waves

{ "type": 13, "id": "eWPovpWEZ6YQ4GWzcpZ4kxoVqZbAL6RxUJcK4nkqNY1", "fee": 3000000, "feeAssetId": null, "timestamp": 1667806651169, "version": 1, "sender": "3N8cKL8uHT2sFedwsSdD7u7zFPD7iM2WSo4", "senderPublicKey": "5uqTFe1tdb9qAXgGRerTFeiZvA8oaXqKKAHGzaHKAnwu", "proofs": [ "5nDKTkD5nhrCkRhGxpy9FAyZ9JyWdDky1tJiUoBB2uuLfgnP2DRoFuZGchFwpoRGKh91TSEFiUHZQ1qoUHZeryfD" ], "script": "base64:BgL1JggCEgMKAQgSABIECgIBBBIDCgEBEgQKAgEEEgQKAggBEgQKAggBEgQKAggBEgUKAwEIARIAEgQKAgEBEgMKAQESBQoDAQEBEgQKAggIEgASAwoBCBIFCgMBAQESBAoCAQESBAoCCAESBAoCCAgSCwoJCAEBAgECCAQEEgYKBAgIAQgSABIDCgEBEgMKAQESBAoCCAEiCmxQZGVjaW1hbHMiBnNjYWxlOCIMc2NhbGU4QmlnSW50IgdzY2FsZTE4Igp6ZXJvQmlnSW50IgRiaWcwIgRiaWcxIgRiaWcyIgt3YXZlc1N0cmluZyIDU0VQIgpQb29sQWN0aXZlIg9Qb29sUHV0RGlzYWJsZWQiE1Bvb2xNYXRjaGVyRGlzYWJsZWQiDFBvb2xTaHV0ZG93biIOaWR4UG9vbEFkZHJlc3MiDWlkeFBvb2xTdGF0dXMiEGlkeFBvb2xMUEFzc2V0SWQiDWlkeEFtdEFzc2V0SWQiD2lkeFByaWNlQXNzZXRJZCIOaWR4QW10QXNzZXREY20iEGlkeFByaWNlQXNzZXREY20iDmlkeElBbXRBc3NldElkIhBpZHhJU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Vycm9yBAJkcQUCZkQDCQABAgUCZHECBU9yZGVyBAJjUgUCZHEEAmZHCQECYUcABAJhdQkBAmNRAQUCY1IEAmF2CQD0AwMIBQJjUglib2R5Qnl0ZXMJAJEDAggFAmNSBnByb29mcwAACAUCY1IPc2VuZGVyUHVibGljS2V5BAJhdwkA9AMDCAUCY1IJYm9keUJ5dGVzCQCRAwIIBQJjUgZwcm9vZnMAAQUCZkcDAwMFAmF1BQJhdgcFAmF3BwYJAQJhdAMFAmF1BQJhdgUCYXcDCQABAgUCZHECFFNldFNjcmlwdFRyYW5zYWN0aW9uBAJlcgUCZHEEAmZICQD2AwEJAQV2YWx1ZQEIBQJlcgZzY3JpcHQEAmZJCQDbBAEJAQV2YWx1ZQEJAJ0IAgUCYUQJAQJhcgAEAmZKCQDxBwEFBHRoaXMDAwkAAAIFAmZJBQJmSAkBAiE9AgUCZkoFAmZIBwYJAPQDAwgFAmZECWJvZHlCeXRlcwkAkQMCCAUCZkQGcHJvb2ZzAAAFAmZGCQD0AwMIBQJmRAlib2R5Qnl0ZXMJAJEDAggFAmZEBnByb29mcwAABQJmRq+655Q=", "chainId": 84, "height": 2306430, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: HjGS35TmhfPN3rKgXSxeZbzegiduCQJ1NbXf9fi9jqz5 Next: Gnv44VmGTeFFC6ZWL2LPFxEnVaXnFyBTGM1TFA1eHaof Diff:
OldNewDifferences
107107
108108 let keyFee = "%s__fee"
109109
110-let feeDefault = fraction(50, scale8, 10000)
110+let feeDefault = fraction(10, scale8, 10000)
111111
112112 let fee = valueOrElse(getInteger(this, keyFee), feeDefault)
113113
968968
969969
970970 @Callable(i)
971+func unstakeAndGetNoLess (unstakeAmount,noLessThenAmountAsset,noLessThenPriceAsset) = {
972+ let isGetDisabled = if (isGlobalShutdown())
973+ then true
974+ else (cfgPoolStatus == PoolShutdown)
975+ let checks = [if (!(isGetDisabled))
976+ then true
977+ else throw("get operation is blocked by admin"), if ((size(i.payments) == 0))
978+ then true
979+ else throw("no payments are expected")]
980+ if ((checks == checks))
981+ then {
982+ let unstakeInv = invoke(stakingContract, "unstake", [toBase58String(cfgLpAssetId), unstakeAmount], nil)
983+ if ((unstakeInv == unstakeInv))
984+ then {
985+ let res = estimateGetOperation(toBase58String(i.transactionId), toBase58String(cfgLpAssetId), unstakeAmount, i.caller)
986+ let outAmAmt = res._1
987+ let outPrAmt = res._2
988+ let state = res._10
989+ let checkAmounts = [if ((outAmAmt >= noLessThenAmountAsset))
990+ then true
991+ else throw(makeString(["amount asset amount to receive is less than ", toString(noLessThenAmountAsset)], "")), if ((outPrAmt >= noLessThenPriceAsset))
992+ then true
993+ else throw(makeString(["price asset amount to receive is less than ", toString(noLessThenPriceAsset)], ""))]
994+ if ((checkAmounts == checkAmounts))
995+ then {
996+ let burnLPAssetOnFactory = invoke(factoryContract, "burn", [unstakeAmount], [AttachedPayment(cfgLpAssetId, unstakeAmount)])
997+ if ((burnLPAssetOnFactory == burnLPAssetOnFactory))
998+ then state
999+ else throw("Strict value is not equal to itself.")
1000+ }
1001+ else throw("Strict value is not equal to itself.")
1002+ }
1003+ else throw("Strict value is not equal to itself.")
1004+ }
1005+ else throw("Strict value is not equal to itself.")
1006+ }
1007+
1008+
1009+
1010+@Callable(i)
9711011 func activate (amtAssetStr,priceAssetStr) = if ((toString(i.caller) != toString(factoryContract)))
9721012 then throw("permissions denied")
9731013 else $Tuple2([StringEntry(aa(), amtAssetStr), StringEntry(pa(), priceAssetStr)], "success")
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
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 big0 = toBigInt(0)
1515
1616 let big1 = toBigInt(1)
1717
1818 let big2 = toBigInt(2)
1919
2020 let wavesString = "WAVES"
2121
2222 let SEP = "__"
2323
2424 let PoolActive = 1
2525
2626 let PoolPutDisabled = 2
2727
2828 let PoolMatcherDisabled = 3
2929
3030 let PoolShutdown = 4
3131
3232 let idxPoolAddress = 1
3333
3434 let idxPoolStatus = 2
3535
3636 let idxPoolLPAssetId = 3
3737
3838 let idxAmtAssetId = 4
3939
4040 let idxPriceAssetId = 5
4141
4242 let idxAmtAssetDcm = 6
4343
4444 let idxPriceAssetDcm = 7
4545
4646 let idxIAmtAssetId = 8
4747
4848 let idxIPriceAssetId = 9
4949
5050 let idxLPAssetDcm = 10
5151
5252 let idxPoolAmtAssetAmt = 1
5353
5454 let idxPoolPriceAssetAmt = 2
5555
5656 let idxPoolLPAssetAmt = 3
5757
5858 let idxFactoryStakingContract = 1
5959
6060 let idxFactorySlippageContract = 7
6161
6262 func toX18 (origVal,origScaleMult) = fraction(toBigInt(origVal), scale18, toBigInt(origScaleMult))
6363
6464
6565 func fromX18 (val,resultScaleMult) = toInt(fraction(val, toBigInt(resultScaleMult), scale18))
6666
6767
6868 func toScale (amt,resScale,curScale) = fraction(amt, resScale, curScale)
6969
7070
7171 func abs (val) = if ((0 > val))
7272 then -(val)
7373 else val
7474
7575
7676 func absBigInt (val) = if ((zeroBigInt > val))
7777 then -(val)
7878 else val
7979
8080
8181 func fc () = "%s__factoryContract"
8282
8383
8484 func mpk () = "%s__managerPublicKey"
8585
8686
8787 func pmpk () = "%s__pendingManagerPublicKey"
8888
8989
9090 func pl () = "%s%s__price__last"
9191
9292
9393 func ph (h,timestamp) = makeString(["%s%s%d%d__price__history", toString(h), toString(timestamp)], SEP)
9494
9595
9696 func pau (userAddress,txId) = ((("%s%s%s__P__" + userAddress) + "__") + txId)
9797
9898
9999 func gau (userAddress,txId) = ((("%s%s%s__G__" + userAddress) + "__") + txId)
100100
101101
102102 func aa () = "%s__amountAsset"
103103
104104
105105 func pa () = "%s__priceAsset"
106106
107107
108108 let keyFee = "%s__fee"
109109
110-let feeDefault = fraction(50, scale8, 10000)
110+let feeDefault = fraction(10, scale8, 10000)
111111
112112 let fee = valueOrElse(getInteger(this, keyFee), feeDefault)
113113
114114 func keyFactoryConfig () = "%s__factoryConfig"
115115
116116
117117 func keyMatcherPub () = "%s%s__matcher__publicKey"
118118
119119
120120 func keyMappingPoolContractAddressToPoolAssets (poolContractAddress) = (("%s%s%s__" + poolContractAddress) + "__mappings__poolContract2LpAsset")
121121
122122
123123 func keyPoolConfig (iAmtAsset,iPriceAsset) = (((("%d%d%s__" + iAmtAsset) + "__") + iPriceAsset) + "__config")
124124
125125
126126 func keyMappingsBaseAsset2internalId (baseAssetStr) = ("%s%s%s__mappings__baseAsset2internalId__" + baseAssetStr)
127127
128128
129129 func keyAllPoolsShutdown () = "%s__shutdown"
130130
131131
132132 func keyPoolWeight (contractAddress) = ("%s%s__poolWeight__" + contractAddress)
133133
134134
135135 func keyAllowedLpScriptHash () = "%s__allowedLpScriptHash"
136136
137137
138138 let keyFeeCollectorAddress = "%s__feeCollectorAddress"
139139
140140 func throwOrderError (orderValid,senderValid,matcherValid) = throw(((((("order validation failed: orderValid=" + toString(orderValid)) + " senderValid=") + toString(senderValid)) + " matcherValid=") + toString(matcherValid)))
141141
142142
143143 func getStringOrFail (address,key) = valueOrErrorMessage(getString(address, key), makeString(["mandatory ", toString(address), ".", key, " is not defined"], ""))
144144
145145
146146 func getIntOrFail (address,key) = valueOrErrorMessage(getInteger(address, key), makeString(["mandatory ", toString(address), ".", key, " is not defined"], ""))
147147
148148
149149 func throwErr (msg) = throw(makeString(["lp.ride:", msg], " "))
150150
151151
152152 let factoryContract = addressFromStringValue(getStringOrFail(this, fc()))
153153
154154 let feeCollectorAddress = addressFromStringValue(getStringOrFail(factoryContract, keyFeeCollectorAddress))
155155
156156 func isGlobalShutdown () = valueOrElse(getBoolean(factoryContract, keyAllPoolsShutdown()), false)
157157
158158
159159 func getMatcherPubOrFail () = fromBase58String(getStringOrFail(factoryContract, keyMatcherPub()))
160160
161161
162162 func getPoolConfig () = {
163163 let amtAsset = getStringOrFail(this, aa())
164164 let priceAsset = getStringOrFail(this, pa())
165165 let iPriceAsset = getIntOrFail(factoryContract, keyMappingsBaseAsset2internalId(priceAsset))
166166 let iAmtAsset = getIntOrFail(factoryContract, keyMappingsBaseAsset2internalId(amtAsset))
167167 split(getStringOrFail(factoryContract, keyPoolConfig(toString(iAmtAsset), toString(iPriceAsset))), SEP)
168168 }
169169
170170
171171 func parseAssetId (input) = if ((input == wavesString))
172172 then unit
173173 else fromBase58String(input)
174174
175175
176176 func assetIdToString (input) = if ((input == unit))
177177 then wavesString
178178 else toBase58String(value(input))
179179
180180
181181 func parsePoolConfig (poolConfig) = $Tuple7(addressFromStringValue(poolConfig[idxPoolAddress]), parseIntValue(poolConfig[idxPoolStatus]), fromBase58String(poolConfig[idxPoolLPAssetId]), parseAssetId(poolConfig[idxAmtAssetId]), parseAssetId(poolConfig[idxPriceAssetId]), parseIntValue(poolConfig[idxAmtAssetDcm]), parseIntValue(poolConfig[idxPriceAssetDcm]))
182182
183183
184184 let poolConfigParsed = parsePoolConfig(getPoolConfig())
185185
186186 let $t075447710 = poolConfigParsed
187187
188188 let cfgPoolAddress = $t075447710._1
189189
190190 let cfgPoolStatus = $t075447710._2
191191
192192 let cfgLpAssetId = $t075447710._3
193193
194194 let cfgAmountAssetId = $t075447710._4
195195
196196 let cfgPriceAssetId = $t075447710._5
197197
198198 let cfgAmountAssetDecimals = $t075447710._6
199199
200200 let cfgPriceAssetDecimals = $t075447710._7
201201
202202 func getFactoryConfig () = split(getStringOrFail(factoryContract, keyFactoryConfig()), SEP)
203203
204204
205205 let stakingContract = valueOrErrorMessage(addressFromString(getFactoryConfig()[idxFactoryStakingContract]), "incorrect staking address")
206206
207207 let slippageContract = valueOrErrorMessage(addressFromString(getFactoryConfig()[idxFactorySlippageContract]), "incorrect staking address")
208208
209209 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)
210210
211211
212212 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)
213213
214214
215215 func getAccBalance (assetId) = if ((assetId == "WAVES"))
216216 then wavesBalance(this).available
217217 else assetBalance(this, fromBase58String(assetId))
218218
219219
220220 func calcPriceBigInt (prAmtX18,amAmtX18) = fraction(prAmtX18, scale18, amAmtX18)
221221
222222
223223 func privateCalcPrice (amAssetDcm,prAssetDcm,amAmt,prAmt) = {
224224 let amtAssetAmtX18 = toX18(amAmt, amAssetDcm)
225225 let priceAssetAmtX18 = toX18(prAmt, prAssetDcm)
226226 calcPriceBigInt(priceAssetAmtX18, amtAssetAmtX18)
227227 }
228228
229229
230230 func calcPrices (amAmt,prAmt,lpAmt) = {
231231 let cfg = getPoolConfig()
232232 let amtAssetDcm = parseIntValue(cfg[idxAmtAssetDcm])
233233 let priceAssetDcm = parseIntValue(cfg[idxPriceAssetDcm])
234234 let priceX18 = privateCalcPrice(amtAssetDcm, priceAssetDcm, amAmt, prAmt)
235235 let amAmtX18 = toX18(amAmt, amtAssetDcm)
236236 let prAmtX18 = toX18(prAmt, priceAssetDcm)
237237 let lpAmtX18 = toX18(lpAmt, scale8)
238238 let lpPriceInAmAssetX18 = calcPriceBigInt(amAmtX18, lpAmtX18)
239239 let lpPriceInPrAssetX18 = calcPriceBigInt(prAmtX18, lpAmtX18)
240240 [priceX18, lpPriceInAmAssetX18, lpPriceInPrAssetX18]
241241 }
242242
243243
244244 func calculatePrices (amAmt,prAmt,lpAmt) = {
245245 let prices = calcPrices(amAmt, prAmt, lpAmt)
246246 [fromX18(prices[0], scale8), fromX18(prices[1], scale8), fromX18(prices[2], scale8)]
247247 }
248248
249249
250250 func estimateGetOperation (txId58,pmtAssetId,pmtLpAmt,userAddress) = {
251251 let cfg = getPoolConfig()
252252 let lpAssetId = cfg[idxPoolLPAssetId]
253253 let amAssetId = cfg[idxAmtAssetId]
254254 let prAssetId = cfg[idxPriceAssetId]
255255 let amAssetDcm = parseIntValue(cfg[idxAmtAssetDcm])
256256 let prAssetDcm = parseIntValue(cfg[idxPriceAssetDcm])
257257 let poolStatus = cfg[idxPoolStatus]
258258 let lpEmission = valueOrErrorMessage(assetInfo(fromBase58String(lpAssetId)), (("Asset " + lpAssetId) + " doesn't exist")).quantity
259259 if ((lpAssetId != pmtAssetId))
260260 then throw("Invalid asset passed.")
261261 else {
262262 let amBalance = getAccBalance(amAssetId)
263263 let amBalanceX18 = toX18(amBalance, amAssetDcm)
264264 let prBalance = getAccBalance(prAssetId)
265265 let prBalanceX18 = toX18(prBalance, prAssetDcm)
266266 let curPriceX18 = calcPriceBigInt(prBalanceX18, amBalanceX18)
267267 let curPrice = fromX18(curPriceX18, scale8)
268268 let pmtLpAmtX18 = toX18(pmtLpAmt, scale8)
269269 let lpEmissionX18 = toX18(lpEmission, scale8)
270270 let outAmAmtX18 = fraction(amBalanceX18, pmtLpAmtX18, lpEmissionX18)
271271 let outPrAmtX18 = fraction(prBalanceX18, pmtLpAmtX18, lpEmissionX18)
272272 let outAmAmt = fromX18(outAmAmtX18, amAssetDcm)
273273 let outPrAmt = fromX18(outPrAmtX18, prAssetDcm)
274274 let state = if ((txId58 == ""))
275275 then nil
276276 else [ScriptTransfer(userAddress, outAmAmt, if ((amAssetId == "WAVES"))
277277 then unit
278278 else fromBase58String(amAssetId)), ScriptTransfer(userAddress, outPrAmt, if ((prAssetId == "WAVES"))
279279 then unit
280280 else fromBase58String(prAssetId)), StringEntry(gau(toString(userAddress), txId58), dataGetActionInfo(outAmAmt, outPrAmt, pmtLpAmt, curPrice, height, lastBlock.timestamp)), IntegerEntry(pl(), curPrice), IntegerEntry(ph(height, lastBlock.timestamp), curPrice)]
281281 $Tuple10(outAmAmt, outPrAmt, amAssetId, prAssetId, amBalance, prBalance, lpEmission, curPriceX18, poolStatus, state)
282282 }
283283 }
284284
285285
286286 func estimatePutOperation (txId58,slippageTolerance,inAmAssetAmt,inAmAssetId,inPrAssetAmt,inPrAssetId,userAddress,isEvaluate,emitLp) = {
287287 let cfg = getPoolConfig()
288288 let lpAssetId = fromBase58String(cfg[idxPoolLPAssetId])
289289 let amAssetIdStr = cfg[idxAmtAssetId]
290290 let prAssetIdStr = cfg[idxPriceAssetId]
291291 let iAmtAssetId = cfg[idxIAmtAssetId]
292292 let iPriceAssetId = cfg[idxIPriceAssetId]
293293 let amtAssetDcm = parseIntValue(cfg[idxAmtAssetDcm])
294294 let priceAssetDcm = parseIntValue(cfg[idxPriceAssetDcm])
295295 let poolStatus = cfg[idxPoolStatus]
296296 let lpEmission = valueOrErrorMessage(assetInfo(lpAssetId), (("Asset " + toBase58String(lpAssetId)) + " doesn't exist")).quantity
297297 let inAmAssetIdStr = toBase58String(valueOrElse(inAmAssetId, fromBase58String("WAVES")))
298298 let inPrAssetIdStr = toBase58String(valueOrElse(inPrAssetId, fromBase58String("WAVES")))
299299 if (if ((amAssetIdStr != inAmAssetIdStr))
300300 then true
301301 else (prAssetIdStr != inPrAssetIdStr))
302302 then throw("Invalid amt or price asset passed.")
303303 else {
304304 let amBalance = if (isEvaluate)
305305 then getAccBalance(amAssetIdStr)
306306 else (getAccBalance(amAssetIdStr) - inAmAssetAmt)
307307 let prBalance = if (isEvaluate)
308308 then getAccBalance(prAssetIdStr)
309309 else (getAccBalance(prAssetIdStr) - inPrAssetAmt)
310310 let inAmAssetAmtX18 = toX18(inAmAssetAmt, amtAssetDcm)
311311 let inPrAssetAmtX18 = toX18(inPrAssetAmt, priceAssetDcm)
312312 let userPriceX18 = calcPriceBigInt(inPrAssetAmtX18, inAmAssetAmtX18)
313313 let amBalanceX18 = toX18(amBalance, amtAssetDcm)
314314 let prBalanceX18 = toX18(prBalance, priceAssetDcm)
315315 let res = if ((lpEmission == 0))
316316 then {
317317 let curPriceX18 = zeroBigInt
318318 let slippageX18 = zeroBigInt
319319 let lpAmtX18 = pow((inAmAssetAmtX18 * inPrAssetAmtX18), 0, toBigInt(5), 1, 0, DOWN)
320320 $Tuple5(fromX18(lpAmtX18, scale8), fromX18(inAmAssetAmtX18, amtAssetDcm), fromX18(inPrAssetAmtX18, priceAssetDcm), calcPriceBigInt((prBalanceX18 + inPrAssetAmtX18), (amBalanceX18 + inAmAssetAmtX18)), slippageX18)
321321 }
322322 else {
323323 let curPriceX18 = calcPriceBigInt(prBalanceX18, amBalanceX18)
324324 let slippageX18 = fraction(absBigInt((curPriceX18 - userPriceX18)), scale18, curPriceX18)
325325 let slippageToleranceX18 = toX18(slippageTolerance, scale8)
326326 if (if ((curPriceX18 != zeroBigInt))
327327 then (slippageX18 > slippageToleranceX18)
328328 else false)
329329 then throw(((("Price slippage " + toString(slippageX18)) + " exceeded the passed limit of ") + toString(slippageToleranceX18)))
330330 else {
331331 let lpEmissionX18 = toX18(lpEmission, scale8)
332332 let prViaAmX18 = fraction(inAmAssetAmtX18, curPriceX18, scale18)
333333 let amViaPrX18 = fraction(inPrAssetAmtX18, scale18, curPriceX18)
334334 let expectedAmts = if ((prViaAmX18 > inPrAssetAmtX18))
335335 then $Tuple2(amViaPrX18, inPrAssetAmtX18)
336336 else $Tuple2(inAmAssetAmtX18, prViaAmX18)
337337 let expAmtAssetAmtX18 = expectedAmts._1
338338 let expPriceAssetAmtX18 = expectedAmts._2
339339 let lpAmtX18 = fraction(lpEmissionX18, expPriceAssetAmtX18, prBalanceX18)
340340 $Tuple5(fromX18(lpAmtX18, scale8), fromX18(expAmtAssetAmtX18, amtAssetDcm), fromX18(expPriceAssetAmtX18, priceAssetDcm), curPriceX18, slippageX18)
341341 }
342342 }
343343 let calcLpAmt = res._1
344344 let calcAmAssetPmt = res._2
345345 let calcPrAssetPmt = res._3
346346 let curPrice = fromX18(res._4, scale8)
347347 let slippageCalc = fromX18(res._5, scale8)
348348 if ((0 >= calcLpAmt))
349349 then throw("Invalid calculations. LP calculated is less than zero.")
350350 else {
351351 let emitLpAmt = if (!(emitLp))
352352 then 0
353353 else calcLpAmt
354354 let amDiff = (inAmAssetAmt - calcAmAssetPmt)
355355 let prDiff = (inPrAssetAmt - calcPrAssetPmt)
356356 let commonState = [IntegerEntry(pl(), curPrice), IntegerEntry(ph(height, lastBlock.timestamp), curPrice), StringEntry(pau(userAddress, txId58), dataPutActionInfo(calcAmAssetPmt, calcPrAssetPmt, emitLpAmt, curPrice, slippageTolerance, slippageCalc, height, lastBlock.timestamp, amDiff, prDiff))]
357357 $Tuple13(calcLpAmt, emitLpAmt, curPrice, amBalance, prBalance, lpEmission, lpAssetId, poolStatus, commonState, amDiff, prDiff, inAmAssetId, inPrAssetId)
358358 }
359359 }
360360 }
361361
362362
363363 func validateMatcherOrderAllowed (order) = {
364364 let cfg = getPoolConfig()
365365 let amtAssetId = cfg[idxAmtAssetId]
366366 let priceAssetId = cfg[idxPriceAssetId]
367367 let poolStatus = parseIntValue(cfg[idxPoolStatus])
368368 let amtAssetDcm = parseIntValue(cfg[idxAmtAssetDcm])
369369 let priceAssetDcm = parseIntValue(cfg[idxPriceAssetDcm])
370370 let accAmtAssetBalance = getAccBalance(amtAssetId)
371371 let accPriceAssetBalance = getAccBalance(priceAssetId)
372372 let curPriceX18 = if ((order.orderType == Buy))
373373 then privateCalcPrice(amtAssetDcm, priceAssetDcm, (accAmtAssetBalance + order.amount), accPriceAssetBalance)
374374 else privateCalcPrice(amtAssetDcm, priceAssetDcm, (accAmtAssetBalance - order.amount), accPriceAssetBalance)
375375 let curPrice = fromX18(curPriceX18, scale8)
376376 if (if (if (isGlobalShutdown())
377377 then true
378378 else (poolStatus == PoolMatcherDisabled))
379379 then true
380380 else (poolStatus == PoolShutdown))
381381 then throw("Exchange operations disabled")
382382 else {
383383 let orderAmtAsset = order.assetPair.amountAsset
384384 let orderAmtAssetStr = if ((orderAmtAsset == unit))
385385 then "WAVES"
386386 else toBase58String(value(orderAmtAsset))
387387 let orderPriceAsset = order.assetPair.priceAsset
388388 let orderPriceAssetStr = if ((orderPriceAsset == unit))
389389 then "WAVES"
390390 else toBase58String(value(orderPriceAsset))
391391 if (if ((orderAmtAssetStr != amtAssetId))
392392 then true
393393 else (orderPriceAssetStr != priceAssetId))
394394 then throw("Wrong order assets.")
395395 else {
396396 let orderPrice = order.price
397397 let priceDcm = fraction(scale8, priceAssetDcm, amtAssetDcm)
398398 let castedOrderPrice = toScale(orderPrice, scale8, priceDcm)
399399 let isOrderPriceValid = if ((order.orderType == Buy))
400400 then (curPrice >= castedOrderPrice)
401401 else (castedOrderPrice >= curPrice)
402402 true
403403 }
404404 }
405405 }
406406
407407
408408 func commonGet (i) = if ((size(i.payments) != 1))
409409 then throw("exactly 1 payment is expected")
410410 else {
411411 let pmt = value(i.payments[0])
412412 let pmtAssetId = value(pmt.assetId)
413413 let pmtAmt = pmt.amount
414414 let res = estimateGetOperation(toBase58String(i.transactionId), toBase58String(pmtAssetId), pmtAmt, i.caller)
415415 let outAmAmt = res._1
416416 let outPrAmt = res._2
417417 let poolStatus = parseIntValue(res._9)
418418 let state = res._10
419419 if (if (isGlobalShutdown())
420420 then true
421421 else (poolStatus == PoolShutdown))
422422 then throw(("Get operation is blocked by admin. Status = " + toString(poolStatus)))
423423 else $Tuple5(outAmAmt, outPrAmt, pmtAmt, pmtAssetId, state)
424424 }
425425
426426
427427 func commonPut (i,slippageTolerance,emitLp) = if ((size(i.payments) != 2))
428428 then throw("exactly 2 payments are expected")
429429 else {
430430 let amAssetPmt = value(i.payments[0])
431431 let prAssetPmt = value(i.payments[1])
432432 let estPut = estimatePutOperation(toBase58String(i.transactionId), slippageTolerance, amAssetPmt.amount, amAssetPmt.assetId, prAssetPmt.amount, prAssetPmt.assetId, toString(i.caller), false, emitLp)
433433 let poolStatus = parseIntValue(estPut._8)
434434 if (if (if (isGlobalShutdown())
435435 then true
436436 else (poolStatus == PoolPutDisabled))
437437 then true
438438 else (poolStatus == PoolShutdown))
439439 then throw(("Put operation is blocked by admin. Status = " + toString(poolStatus)))
440440 else estPut
441441 }
442442
443443
444444 func emit (amount) = {
445445 let emitInv = invoke(factoryContract, "emit", [amount], nil)
446446 if ((emitInv == emitInv))
447447 then {
448448 let emitInvLegacy = match emitInv {
449449 case legacyFactoryContract: Address =>
450450 invoke(legacyFactoryContract, "emit", [amount], nil)
451451 case _ =>
452452 unit
453453 }
454454 if ((emitInvLegacy == emitInvLegacy))
455455 then amount
456456 else throw("Strict value is not equal to itself.")
457457 }
458458 else throw("Strict value is not equal to itself.")
459459 }
460460
461461
462462 func takeFee (amount) = {
463463 let feeAmount = fraction(amount, fee, scale8)
464464 $Tuple2((amount - feeAmount), feeAmount)
465465 }
466466
467467
468468 func calcPutOneToken (paymentAmountRaw,paymentAssetId,userAddress,txId) = {
469469 let isEval = (txId == unit)
470470 let amountBalanceRaw = getAccBalance(assetIdToString(cfgAmountAssetId))
471471 let priceBalanceRaw = getAccBalance(assetIdToString(cfgPriceAssetId))
472472 let paymentInAmountAsset = if ((paymentAssetId == cfgAmountAssetId))
473473 then true
474474 else if ((paymentAssetId == cfgPriceAssetId))
475475 then false
476476 else throwErr("invalid asset")
477477 let $t02257122864 = if (isEval)
478478 then $Tuple2(amountBalanceRaw, priceBalanceRaw)
479479 else if (paymentInAmountAsset)
480480 then $Tuple2((amountBalanceRaw - paymentAmountRaw), priceBalanceRaw)
481481 else $Tuple2(amountBalanceRaw, (priceBalanceRaw - paymentAmountRaw))
482482 let amountBalanceOld = $t02257122864._1
483483 let priceBalanceOld = $t02257122864._2
484484 let $t02286823017 = if (paymentInAmountAsset)
485485 then $Tuple2(paymentAmountRaw, 0)
486486 else $Tuple2(0, paymentAmountRaw)
487487 let amountAssetAmountRaw = $t02286823017._1
488488 let priceAssetAmountRaw = $t02286823017._2
489489 let amountAssetAmount = takeFee(amountAssetAmountRaw)._1
490490 let priceAssetAmount = takeFee(priceAssetAmountRaw)._1
491491 let $t02313923198 = takeFee(paymentAmountRaw)
492492 let paymentAmount = $t02313923198._1
493493 let feeAmount = $t02313923198._2
494494 let amountBalanceNew = (amountBalanceOld + amountAssetAmount)
495495 let priceBalanceNew = (priceBalanceOld + priceAssetAmount)
496496 let priceNewX18 = calcPriceBigInt(toX18(priceBalanceNew, cfgPriceAssetDecimals), toX18(amountBalanceNew, cfgAmountAssetDecimals))
497497 let priceNew = fromX18(priceNewX18, scale8)
498498 let paymentBalance = if (paymentInAmountAsset)
499499 then amountBalanceOld
500500 else priceBalanceOld
501501 let paymentBalanceBigInt = toBigInt(paymentBalance)
502502 let supplyBigInt = toBigInt(valueOrErrorMessage(assetInfo(cfgLpAssetId), (("asset " + toBase58String(cfgLpAssetId)) + " doesn't exist")).quantity)
503503 let chechSupply = if ((supplyBigInt > big0))
504504 then true
505505 else throwErr("initial deposit requires all coins")
506506 if ((chechSupply == chechSupply))
507507 then {
508508 let depositBigInt = toBigInt(paymentAmount)
509509 let issueAmount = max([0, toInt(((supplyBigInt * (sqrtBigInt((scale18 + ((depositBigInt * scale18) / paymentBalanceBigInt)), 18, 18, DOWN) - scale18)) / scale18))])
510510 let commonState = if (isEval)
511511 then nil
512512 else [IntegerEntry(pl(), priceNew), IntegerEntry(ph(height, lastBlock.timestamp), priceNew), StringEntry(pau(toString(value(userAddress)), toBase58String(value(txId))), dataPutActionInfo(amountAssetAmountRaw, priceAssetAmountRaw, issueAmount, priceNew, 0, 0, height, lastBlock.timestamp, 0, 0))]
513513 let priceOldX18 = calcPriceBigInt(toX18(priceBalanceOld, cfgPriceAssetDecimals), toX18(amountBalanceOld, cfgAmountAssetDecimals))
514514 let priceOld = fromX18(priceOldX18, scale8)
515515 let priceImpact = abs((((priceNew - priceOld) * scale8) / priceOld))
516516 $Tuple4(issueAmount, commonState, feeAmount, priceImpact)
517517 }
518518 else throw("Strict value is not equal to itself.")
519519 }
520520
521521
522522 func calcGetOneToken (outAssetId,paymentAmount,paymentAssetId,userAddress,txId) = {
523523 let isEval = (txId == unit)
524524 let checks = [if ((paymentAssetId == cfgLpAssetId))
525525 then true
526526 else throwErr("invalid lp asset")]
527527 if ((checks == checks))
528528 then {
529529 let outInAmountAsset = if ((outAssetId == cfgAmountAssetId))
530530 then true
531531 else if ((outAssetId == cfgPriceAssetId))
532532 then false
533533 else throwErr("invalid asset")
534534 let balanceBigInt = if (outInAmountAsset)
535535 then toBigInt(getAccBalance(assetIdToString(cfgAmountAssetId)))
536536 else toBigInt(getAccBalance(assetIdToString(cfgPriceAssetId)))
537537 let amBalanceOld = getAccBalance(assetIdToString(cfgAmountAssetId))
538538 let prBalanceOld = getAccBalance(assetIdToString(cfgPriceAssetId))
539539 let outBalance = if (outInAmountAsset)
540540 then amBalanceOld
541541 else prBalanceOld
542542 let outBalanceBigInt = toBigInt(outBalance)
543543 let supplyBigInt = toBigInt(valueOrErrorMessage(assetInfo(cfgLpAssetId), (("asset " + toBase58String(cfgLpAssetId)) + " doesn't exist")).quantity)
544544 let redeemedBigInt = toBigInt(paymentAmount)
545545 let amountRaw = max([0, toInt(((balanceBigInt * (scale18 - pow((scale18 - ((redeemedBigInt * scale18) / supplyBigInt)), 18, big2, 0, 18, DOWN))) / scale18))])
546546 let $t02613626186 = takeFee(amountRaw)
547547 let totalAmount = $t02613626186._1
548548 let feeAmount = $t02613626186._2
549549 let $t02619026416 = if (outInAmountAsset)
550550 then $Tuple4(totalAmount, 0, (amBalanceOld - amountRaw), prBalanceOld)
551551 else $Tuple4(0, totalAmount, amBalanceOld, (prBalanceOld - amountRaw))
552552 let outAmAmount = $t02619026416._1
553553 let outPrAmount = $t02619026416._2
554554 let amBalanceNew = $t02619026416._3
555555 let prBalanceNew = $t02619026416._4
556556 let priceNewX18 = calcPriceBigInt(toX18(prBalanceNew, cfgPriceAssetDecimals), toX18(amBalanceNew, cfgAmountAssetDecimals))
557557 let priceNew = fromX18(priceNewX18, scale8)
558558 let commonState = if (isEval)
559559 then nil
560560 else [StringEntry(gau(toString(value(userAddress)), toBase58String(value(txId))), dataGetActionInfo(outAmAmount, outPrAmount, paymentAmount, priceNew, height, lastBlock.timestamp)), IntegerEntry(pl(), priceNew), IntegerEntry(ph(height, lastBlock.timestamp), priceNew)]
561561 let priceOldX18 = calcPriceBigInt(toX18(prBalanceOld, cfgPriceAssetDecimals), toX18(amBalanceOld, cfgAmountAssetDecimals))
562562 let priceOld = fromX18(priceOldX18, scale8)
563563 let priceImpact = abs((((priceNew - priceOld) * scale8) / priceOld))
564564 $Tuple4(totalAmount, commonState, feeAmount, priceImpact)
565565 }
566566 else throw("Strict value is not equal to itself.")
567567 }
568568
569569
570570 func managerPublicKeyOrUnit () = match getString(mpk()) {
571571 case s: String =>
572572 fromBase58String(s)
573573 case _: Unit =>
574574 unit
575575 case _ =>
576576 throw("Match error")
577577 }
578578
579579
580580 func pendingManagerPublicKeyOrUnit () = match getString(pmpk()) {
581581 case s: String =>
582582 fromBase58String(s)
583583 case _: Unit =>
584584 unit
585585 case _ =>
586586 throw("Match error")
587587 }
588588
589589
590590 func mustManager (i) = {
591591 let pd = throw("Permission denied")
592592 match managerPublicKeyOrUnit() {
593593 case pk: ByteVector =>
594594 if ((i.callerPublicKey == pk))
595595 then true
596596 else pd
597597 case _: Unit =>
598598 if ((i.caller == this))
599599 then true
600600 else pd
601601 case _ =>
602602 throw("Match error")
603603 }
604604 }
605605
606606
607607 @Callable(i)
608608 func setManager (pendingManagerPublicKey) = {
609609 let checkCaller = mustManager(i)
610610 if ((checkCaller == checkCaller))
611611 then {
612612 let checkManagerPublicKey = fromBase58String(pendingManagerPublicKey)
613613 if ((checkManagerPublicKey == checkManagerPublicKey))
614614 then [StringEntry(pmpk(), pendingManagerPublicKey)]
615615 else throw("Strict value is not equal to itself.")
616616 }
617617 else throw("Strict value is not equal to itself.")
618618 }
619619
620620
621621
622622 @Callable(i)
623623 func confirmManager () = {
624624 let pm = pendingManagerPublicKeyOrUnit()
625625 let hasPM = if (isDefined(pm))
626626 then true
627627 else throw("No pending manager")
628628 if ((hasPM == hasPM))
629629 then {
630630 let checkPM = if ((i.callerPublicKey == value(pm)))
631631 then true
632632 else throw("You are not pending manager")
633633 if ((checkPM == checkPM))
634634 then [StringEntry(mpk(), toBase58String(value(pm))), DeleteEntry(pmpk())]
635635 else throw("Strict value is not equal to itself.")
636636 }
637637 else throw("Strict value is not equal to itself.")
638638 }
639639
640640
641641
642642 @Callable(i)
643643 func put (slippageTolerance,shouldAutoStake) = if ((0 > slippageTolerance))
644644 then throw("Invalid slippageTolerance passed")
645645 else {
646646 let estPut = commonPut(i, slippageTolerance, true)
647647 let emitLpAmt = estPut._2
648648 let lpAssetId = estPut._7
649649 let state = estPut._9
650650 let amDiff = estPut._10
651651 let prDiff = estPut._11
652652 let amId = estPut._12
653653 let prId = estPut._13
654654 let emitInv = invoke(factoryContract, "emit", [emitLpAmt], nil)
655655 if ((emitInv == emitInv))
656656 then {
657657 let emitInvLegacy = match emitInv {
658658 case legacyFactoryContract: Address =>
659659 invoke(legacyFactoryContract, "emit", [emitLpAmt], nil)
660660 case _ =>
661661 unit
662662 }
663663 if ((emitInvLegacy == emitInvLegacy))
664664 then {
665665 let slippageAInv = if ((amDiff > 0))
666666 then invoke(slippageContract, "put", nil, [AttachedPayment(amId, amDiff)])
667667 else nil
668668 if ((slippageAInv == slippageAInv))
669669 then {
670670 let slippagePInv = if ((prDiff > 0))
671671 then invoke(slippageContract, "put", nil, [AttachedPayment(prId, prDiff)])
672672 else nil
673673 if ((slippagePInv == slippagePInv))
674674 then {
675675 let lpTransfer = if (shouldAutoStake)
676676 then {
677677 let slpStakeInv = invoke(stakingContract, "stake", nil, [AttachedPayment(lpAssetId, emitLpAmt)])
678678 if ((slpStakeInv == slpStakeInv))
679679 then nil
680680 else throw("Strict value is not equal to itself.")
681681 }
682682 else [ScriptTransfer(i.caller, emitLpAmt, lpAssetId)]
683683 (state ++ lpTransfer)
684684 }
685685 else throw("Strict value is not equal to itself.")
686686 }
687687 else throw("Strict value is not equal to itself.")
688688 }
689689 else throw("Strict value is not equal to itself.")
690690 }
691691 else throw("Strict value is not equal to itself.")
692692 }
693693
694694
695695
696696 @Callable(i)
697697 func putForFree (maxSlippage) = if ((0 > maxSlippage))
698698 then throw("Invalid value passed")
699699 else {
700700 let estPut = commonPut(i, maxSlippage, false)
701701 estPut._9
702702 }
703703
704704
705705
706706 @Callable(i)
707707 func putOneTkn (minOutAmount,autoStake) = {
708708 let isPoolOneTokenOperationsDisabled = {
709709 let @ = invoke(factoryContract, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
710710 if ($isInstanceOf(@, "Boolean"))
711711 then @
712712 else throw(($getType(@) + " couldn't be cast to Boolean"))
713713 }
714714 let isPutDisabled = if (if (if (isGlobalShutdown())
715715 then true
716716 else (cfgPoolStatus == PoolPutDisabled))
717717 then true
718718 else (cfgPoolStatus == PoolShutdown))
719719 then true
720720 else isPoolOneTokenOperationsDisabled
721721 let checks = [if (!(isPutDisabled))
722722 then true
723723 else throwErr("put operation is blocked by admin"), if ((size(i.payments) == 1))
724724 then true
725725 else throwErr("exactly 1 payment are expected")]
726726 if ((checks == checks))
727727 then {
728728 let payment = i.payments[0]
729729 let paymentAssetId = payment.assetId
730730 let paymentAmountRaw = payment.amount
731731 let userAddress = i.caller
732732 let txId = i.transactionId
733733 let $t03099831125 = calcPutOneToken(paymentAmountRaw, paymentAssetId, userAddress, txId)
734734 let emitAmountEstimated = $t03099831125._1
735735 let commonState = $t03099831125._2
736736 let feeAmount = $t03099831125._3
737737 let bonus = $t03099831125._4
738738 let emitAmount = if (if ((minOutAmount > 0))
739739 then (minOutAmount > emitAmountEstimated)
740740 else false)
741741 then throwErr(makeString(["amount to receive is less than ", toString(minOutAmount)], ""))
742742 else emitAmountEstimated
743743 let emitInv = emit(emitAmount)
744744 if ((emitInv == emitInv))
745745 then {
746746 let lpTransfer = if (autoStake)
747747 then {
748748 let stakeInv = invoke(stakingContract, "stake", nil, [AttachedPayment(cfgLpAssetId, emitAmount)])
749749 if ((stakeInv == stakeInv))
750750 then nil
751751 else throw("Strict value is not equal to itself.")
752752 }
753753 else [ScriptTransfer(i.caller, emitAmount, cfgLpAssetId)]
754754 let sendFee = if ((feeAmount > 0))
755755 then [ScriptTransfer(feeCollectorAddress, feeAmount, paymentAssetId)]
756756 else nil
757757 $Tuple2(((commonState ++ lpTransfer) ++ sendFee), emitAmount)
758758 }
759759 else throw("Strict value is not equal to itself.")
760760 }
761761 else throw("Strict value is not equal to itself.")
762762 }
763763
764764
765765
766766 @Callable(i)
767767 func putOneTknREADONLY (paymentAssetId,paymentAmountRaw) = {
768768 let $t03185431989 = calcPutOneToken(paymentAmountRaw, parseAssetId(paymentAssetId), unit, unit)
769769 let emitAmountEstimated = $t03185431989._1
770770 let commonState = $t03185431989._2
771771 let feeAmount = $t03185431989._3
772772 let bonus = $t03185431989._4
773773 $Tuple2(nil, $Tuple3(emitAmountEstimated, feeAmount, bonus))
774774 }
775775
776776
777777
778778 @Callable(i)
779779 func getOneTkn (outAssetIdStr,minOutAmount) = {
780780 let isPoolOneTokenOperationsDisabled = {
781781 let @ = invoke(factoryContract, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
782782 if ($isInstanceOf(@, "Boolean"))
783783 then @
784784 else throw(($getType(@) + " couldn't be cast to Boolean"))
785785 }
786786 let isGetDisabled = if (if (isGlobalShutdown())
787787 then true
788788 else (cfgPoolStatus == PoolShutdown))
789789 then true
790790 else isPoolOneTokenOperationsDisabled
791791 let checks = [if (!(isGetDisabled))
792792 then true
793793 else throwErr("get operation is blocked by admin"), if ((size(i.payments) == 1))
794794 then true
795795 else throwErr("exactly 1 payment are expected")]
796796 if ((checks == checks))
797797 then {
798798 let outAssetId = parseAssetId(outAssetIdStr)
799799 let payment = i.payments[0]
800800 let paymentAssetId = payment.assetId
801801 let paymentAmount = payment.amount
802802 let userAddress = i.caller
803803 let txId = i.transactionId
804804 let $t03276132893 = calcGetOneToken(outAssetId, paymentAmount, paymentAssetId, userAddress, txId)
805805 let amountEstimated = $t03276132893._1
806806 let commonState = $t03276132893._2
807807 let feeAmount = $t03276132893._3
808808 let bonus = $t03276132893._4
809809 let amount = if (if ((minOutAmount > 0))
810810 then (minOutAmount > amountEstimated)
811811 else false)
812812 then throwErr(makeString(["amount to receive is less than ", toString(minOutAmount)], ""))
813813 else amountEstimated
814814 let burnInv = invoke(factoryContract, "burn", [paymentAmount], [AttachedPayment(paymentAssetId, paymentAmount)])
815815 if ((burnInv == burnInv))
816816 then {
817817 let assetTransfer = [ScriptTransfer(userAddress, amount, outAssetId)]
818818 let sendFee = if ((feeAmount > 0))
819819 then [ScriptTransfer(feeCollectorAddress, feeAmount, outAssetId)]
820820 else nil
821821 $Tuple2(((commonState ++ assetTransfer) ++ sendFee), amount)
822822 }
823823 else throw("Strict value is not equal to itself.")
824824 }
825825 else throw("Strict value is not equal to itself.")
826826 }
827827
828828
829829
830830 @Callable(i)
831831 func getOneTknREADONLY (outAssetId,paymentAmount) = {
832832 let $t03352833666 = calcGetOneToken(parseAssetId(outAssetId), paymentAmount, cfgLpAssetId, unit, unit)
833833 let amountEstimated = $t03352833666._1
834834 let commonState = $t03352833666._2
835835 let feeAmount = $t03352833666._3
836836 let bonus = $t03352833666._4
837837 $Tuple2(nil, $Tuple3(amountEstimated, feeAmount, bonus))
838838 }
839839
840840
841841
842842 @Callable(i)
843843 func unstakeAndGetOneTkn (unstakeAmount,outAssetIdStr,minOutAmount) = {
844844 let isPoolOneTokenOperationsDisabled = {
845845 let @ = invoke(factoryContract, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
846846 if ($isInstanceOf(@, "Boolean"))
847847 then @
848848 else throw(($getType(@) + " couldn't be cast to Boolean"))
849849 }
850850 let isGetDisabled = if (if (isGlobalShutdown())
851851 then true
852852 else (cfgPoolStatus == PoolShutdown))
853853 then true
854854 else isPoolOneTokenOperationsDisabled
855855 let checks = [if (!(isGetDisabled))
856856 then true
857857 else throwErr("get operation is blocked by admin"), if ((size(i.payments) == 0))
858858 then true
859859 else throwErr("no payments are expected")]
860860 if ((checks == checks))
861861 then {
862862 let outAssetId = parseAssetId(outAssetIdStr)
863863 let userAddress = i.caller
864864 let txId = i.transactionId
865865 let unstakeInv = invoke(stakingContract, "unstake", [toBase58String(cfgLpAssetId), unstakeAmount], nil)
866866 if ((unstakeInv == unstakeInv))
867867 then {
868868 let $t03445834588 = calcGetOneToken(outAssetId, unstakeAmount, cfgLpAssetId, userAddress, txId)
869869 let amountEstimated = $t03445834588._1
870870 let commonState = $t03445834588._2
871871 let feeAmount = $t03445834588._3
872872 let bonus = $t03445834588._4
873873 let amount = if (if ((minOutAmount > 0))
874874 then (minOutAmount > amountEstimated)
875875 else false)
876876 then throwErr(makeString(["amount to receive is less than ", toString(minOutAmount)], ""))
877877 else amountEstimated
878878 let burnInv = invoke(factoryContract, "burn", [unstakeAmount], [AttachedPayment(cfgLpAssetId, unstakeAmount)])
879879 if ((burnInv == burnInv))
880880 then {
881881 let assetTransfer = [ScriptTransfer(i.caller, amount, outAssetId)]
882882 let sendFee = if ((feeAmount > 0))
883883 then [ScriptTransfer(feeCollectorAddress, feeAmount, outAssetId)]
884884 else nil
885885 $Tuple2(((commonState ++ assetTransfer) ++ sendFee), amount)
886886 }
887887 else throw("Strict value is not equal to itself.")
888888 }
889889 else throw("Strict value is not equal to itself.")
890890 }
891891 else throw("Strict value is not equal to itself.")
892892 }
893893
894894
895895
896896 @Callable(i)
897897 func get () = {
898898 let res = commonGet(i)
899899 let outAmtAmt = res._1
900900 let outPrAmt = res._2
901901 let pmtAmt = res._3
902902 let pmtAssetId = res._4
903903 let state = res._5
904904 let burnLPAssetOnFactory = invoke(factoryContract, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
905905 if ((burnLPAssetOnFactory == burnLPAssetOnFactory))
906906 then state
907907 else throw("Strict value is not equal to itself.")
908908 }
909909
910910
911911
912912 @Callable(i)
913913 func getNoLess (noLessThenAmtAsset,noLessThenPriceAsset) = {
914914 let res = commonGet(i)
915915 let outAmAmt = res._1
916916 let outPrAmt = res._2
917917 let pmtAmt = res._3
918918 let pmtAssetId = res._4
919919 let state = res._5
920920 if ((noLessThenAmtAsset > outAmAmt))
921921 then throw(((("noLessThenAmtAsset failed: " + toString(outAmAmt)) + " < ") + toString(noLessThenAmtAsset)))
922922 else if ((noLessThenPriceAsset > outPrAmt))
923923 then throw(((("noLessThenPriceAsset failed: " + toString(outPrAmt)) + " < ") + toString(noLessThenPriceAsset)))
924924 else {
925925 let burnLPAssetOnFactory = invoke(factoryContract, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
926926 if ((burnLPAssetOnFactory == burnLPAssetOnFactory))
927927 then state
928928 else throw("Strict value is not equal to itself.")
929929 }
930930 }
931931
932932
933933
934934 @Callable(i)
935935 func unstakeAndGet (amount) = {
936936 let checkPayments = if ((size(i.payments) != 0))
937937 then throw("No payments are expected")
938938 else true
939939 if ((checkPayments == checkPayments))
940940 then {
941941 let cfg = getPoolConfig()
942942 let lpAssetId = fromBase58String(cfg[idxPoolLPAssetId])
943943 let unstakeInv = invoke(stakingContract, "unstake", [toBase58String(lpAssetId), amount], nil)
944944 if ((unstakeInv == unstakeInv))
945945 then {
946946 let res = estimateGetOperation(toBase58String(i.transactionId), toBase58String(lpAssetId), amount, i.caller)
947947 let poolStatus = parseIntValue(res._9)
948948 let state = res._10
949949 let checkPoolStatus = if (if (isGlobalShutdown())
950950 then true
951951 else (poolStatus == PoolShutdown))
952952 then throw(("Get operation is blocked by admin. Status = " + toString(poolStatus)))
953953 else true
954954 if ((checkPoolStatus == checkPoolStatus))
955955 then {
956956 let burnLPAssetOnFactory = invoke(factoryContract, "burn", [amount], [AttachedPayment(lpAssetId, amount)])
957957 if ((burnLPAssetOnFactory == burnLPAssetOnFactory))
958958 then state
959959 else throw("Strict value is not equal to itself.")
960960 }
961961 else throw("Strict value is not equal to itself.")
962962 }
963963 else throw("Strict value is not equal to itself.")
964964 }
965965 else throw("Strict value is not equal to itself.")
966966 }
967967
968968
969969
970970 @Callable(i)
971+func unstakeAndGetNoLess (unstakeAmount,noLessThenAmountAsset,noLessThenPriceAsset) = {
972+ let isGetDisabled = if (isGlobalShutdown())
973+ then true
974+ else (cfgPoolStatus == PoolShutdown)
975+ let checks = [if (!(isGetDisabled))
976+ then true
977+ else throw("get operation is blocked by admin"), if ((size(i.payments) == 0))
978+ then true
979+ else throw("no payments are expected")]
980+ if ((checks == checks))
981+ then {
982+ let unstakeInv = invoke(stakingContract, "unstake", [toBase58String(cfgLpAssetId), unstakeAmount], nil)
983+ if ((unstakeInv == unstakeInv))
984+ then {
985+ let res = estimateGetOperation(toBase58String(i.transactionId), toBase58String(cfgLpAssetId), unstakeAmount, i.caller)
986+ let outAmAmt = res._1
987+ let outPrAmt = res._2
988+ let state = res._10
989+ let checkAmounts = [if ((outAmAmt >= noLessThenAmountAsset))
990+ then true
991+ else throw(makeString(["amount asset amount to receive is less than ", toString(noLessThenAmountAsset)], "")), if ((outPrAmt >= noLessThenPriceAsset))
992+ then true
993+ else throw(makeString(["price asset amount to receive is less than ", toString(noLessThenPriceAsset)], ""))]
994+ if ((checkAmounts == checkAmounts))
995+ then {
996+ let burnLPAssetOnFactory = invoke(factoryContract, "burn", [unstakeAmount], [AttachedPayment(cfgLpAssetId, unstakeAmount)])
997+ if ((burnLPAssetOnFactory == burnLPAssetOnFactory))
998+ then state
999+ else throw("Strict value is not equal to itself.")
1000+ }
1001+ else throw("Strict value is not equal to itself.")
1002+ }
1003+ else throw("Strict value is not equal to itself.")
1004+ }
1005+ else throw("Strict value is not equal to itself.")
1006+ }
1007+
1008+
1009+
1010+@Callable(i)
9711011 func activate (amtAssetStr,priceAssetStr) = if ((toString(i.caller) != toString(factoryContract)))
9721012 then throw("permissions denied")
9731013 else $Tuple2([StringEntry(aa(), amtAssetStr), StringEntry(pa(), priceAssetStr)], "success")
9741014
9751015
9761016
9771017 @Callable(i)
9781018 func getPoolConfigWrapperREADONLY () = $Tuple2(nil, getPoolConfig())
9791019
9801020
9811021
9821022 @Callable(i)
9831023 func getAccBalanceWrapperREADONLY (assetId) = $Tuple2(nil, getAccBalance(assetId))
9841024
9851025
9861026
9871027 @Callable(i)
9881028 func calcPricesWrapperREADONLY (amAmt,prAmt,lpAmt) = {
9891029 let prices = calcPrices(amAmt, prAmt, lpAmt)
9901030 $Tuple2(nil, [toString(prices[0]), toString(prices[1]), toString(prices[2])])
9911031 }
9921032
9931033
9941034
9951035 @Callable(i)
9961036 func toX18WrapperREADONLY (origVal,origScaleMult) = $Tuple2(nil, toString(toX18(origVal, origScaleMult)))
9971037
9981038
9991039
10001040 @Callable(i)
10011041 func fromX18WrapperREADONLY (val,resultScaleMult) = $Tuple2(nil, fromX18(parseBigIntValue(val), resultScaleMult))
10021042
10031043
10041044
10051045 @Callable(i)
10061046 func calcPriceBigIntWrapperREADONLY (prAmtX18,amAmtX18) = $Tuple2(nil, toString(calcPriceBigInt(parseBigIntValue(prAmtX18), parseBigIntValue(amAmtX18))))
10071047
10081048
10091049
10101050 @Callable(i)
10111051 func estimatePutOperationWrapperREADONLY (txId58,slippageTolerance,inAmAssetAmt,inAmAssetId,inPrAssetAmt,inPrAssetId,userAddress,isEvaluate,emitLp) = $Tuple2(nil, estimatePutOperation(txId58, slippageTolerance, inAmAssetAmt, inAmAssetId, inPrAssetAmt, inPrAssetId, userAddress, isEvaluate, emitLp))
10121052
10131053
10141054
10151055 @Callable(i)
10161056 func estimateGetOperationWrapperREADONLY (txId58,pmtAssetId,pmtLpAmt,userAddress) = {
10171057 let res = estimateGetOperation(txId58, pmtAssetId, pmtLpAmt, addressFromStringValue(userAddress))
10181058 $Tuple2(nil, $Tuple10(res._1, res._2, res._3, res._4, res._5, res._6, res._7, toString(res._8), res._9, res._10))
10191059 }
10201060
10211061
10221062
10231063 @Callable(i)
10241064 func statsREADONLY () = {
10251065 let cfg = getPoolConfig()
10261066 let lpAssetId = fromBase58String(cfg[idxPoolLPAssetId])
10271067 let amtAssetId = cfg[idxAmtAssetId]
10281068 let priceAssetId = cfg[idxPriceAssetId]
10291069 let iAmtAssetId = cfg[idxIAmtAssetId]
10301070 let iPriceAssetId = cfg[idxIPriceAssetId]
10311071 let amtAssetDcm = parseIntValue(cfg[idxAmtAssetDcm])
10321072 let priceAssetDcm = parseIntValue(cfg[idxPriceAssetDcm])
10331073 let poolLPBalance = valueOrErrorMessage(assetInfo(lpAssetId), (("Asset " + toBase58String(lpAssetId)) + " doesn't exist")).quantity
10341074 let accAmtAssetBalance = getAccBalance(amtAssetId)
10351075 let accPriceAssetBalance = getAccBalance(priceAssetId)
10361076 let pricesList = if ((poolLPBalance == 0))
10371077 then [zeroBigInt, zeroBigInt, zeroBigInt]
10381078 else calcPrices(accAmtAssetBalance, accPriceAssetBalance, poolLPBalance)
10391079 let curPrice = 0
10401080 let lpAmtAssetShare = fromX18(pricesList[1], scale8)
10411081 let lpPriceAssetShare = fromX18(pricesList[2], scale8)
10421082 let poolWeight = value(getInteger(factoryContract, keyPoolWeight(toString(this))))
10431083 $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))
10441084 }
10451085
10461086
10471087
10481088 @Callable(i)
10491089 func evaluatePutByAmountAssetREADONLY (inAmAssetAmt) = {
10501090 let cfg = getPoolConfig()
10511091 let lpAssetId = fromBase58String(cfg[idxPoolLPAssetId])
10521092 let amAssetIdStr = cfg[idxAmtAssetId]
10531093 let amAssetId = fromBase58String(amAssetIdStr)
10541094 let prAssetIdStr = cfg[idxPriceAssetId]
10551095 let prAssetId = fromBase58String(prAssetIdStr)
10561096 let amtAssetDcm = parseIntValue(cfg[idxAmtAssetDcm])
10571097 let priceAssetDcm = parseIntValue(cfg[idxPriceAssetDcm])
10581098 let poolStatus = cfg[idxPoolStatus]
10591099 let poolLPBalance = valueOrErrorMessage(assetInfo(lpAssetId), (("Asset " + toBase58String(lpAssetId)) + " doesn't exist")).quantity
10601100 let accAmtAssetBalance = getAccBalance(amAssetIdStr)
10611101 let accPriceAssetBalance = getAccBalance(prAssetIdStr)
10621102 let amtAssetAmtX18 = toX18(accAmtAssetBalance, amtAssetDcm)
10631103 let priceAssetAmtX18 = toX18(accPriceAssetBalance, priceAssetDcm)
10641104 let curPriceX18 = if ((poolLPBalance == 0))
10651105 then zeroBigInt
10661106 else calcPriceBigInt(priceAssetAmtX18, amtAssetAmtX18)
10671107 let inAmAssetAmtX18 = toX18(inAmAssetAmt, amtAssetDcm)
10681108 let inPrAssetAmtX18 = fraction(inAmAssetAmtX18, curPriceX18, scale18)
10691109 let inPrAssetAmt = fromX18(inPrAssetAmtX18, priceAssetDcm)
10701110 let estPut = estimatePutOperation("", 500000, inAmAssetAmt, amAssetId, inPrAssetAmt, prAssetId, "", true, false)
10711111 let calcLpAmt = estPut._1
10721112 let curPriceCalc = estPut._3
10731113 let amBalance = estPut._4
10741114 let prBalance = estPut._5
10751115 let lpEmission = estPut._6
10761116 $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))
10771117 }
10781118
10791119
10801120
10811121 @Callable(i)
10821122 func evaluatePutByPriceAssetREADONLY (inPrAssetAmt) = {
10831123 let cfg = getPoolConfig()
10841124 let lpAssetId = fromBase58String(cfg[idxPoolLPAssetId])
10851125 let amAssetIdStr = cfg[idxAmtAssetId]
10861126 let amAssetId = fromBase58String(amAssetIdStr)
10871127 let prAssetIdStr = cfg[idxPriceAssetId]
10881128 let prAssetId = fromBase58String(prAssetIdStr)
10891129 let amtAssetDcm = parseIntValue(cfg[idxAmtAssetDcm])
10901130 let priceAssetDcm = parseIntValue(cfg[idxPriceAssetDcm])
10911131 let poolStatus = cfg[idxPoolStatus]
10921132 let poolLPBalance = valueOrErrorMessage(assetInfo(lpAssetId), (("Asset " + toBase58String(lpAssetId)) + " doesn't exist")).quantity
10931133 let amBalanceRaw = getAccBalance(amAssetIdStr)
10941134 let prBalanceRaw = getAccBalance(prAssetIdStr)
10951135 let amBalanceRawX18 = toX18(amBalanceRaw, amtAssetDcm)
10961136 let prBalanceRawX18 = toX18(prBalanceRaw, priceAssetDcm)
10971137 let curPriceX18 = if ((poolLPBalance == 0))
10981138 then zeroBigInt
10991139 else calcPriceBigInt(prBalanceRawX18, amBalanceRawX18)
11001140 let inPrAssetAmtX18 = toX18(inPrAssetAmt, priceAssetDcm)
11011141 let inAmAssetAmtX18 = fraction(inPrAssetAmtX18, scale18, curPriceX18)
11021142 let inAmAssetAmt = fromX18(inAmAssetAmtX18, amtAssetDcm)
11031143 let estPut = estimatePutOperation("", 500000, inAmAssetAmt, amAssetId, inPrAssetAmt, prAssetId, "", true, false)
11041144 let calcLpAmt = estPut._1
11051145 let curPriceCalc = estPut._3
11061146 let amBalance = estPut._4
11071147 let prBalance = estPut._5
11081148 let lpEmission = estPut._6
11091149 $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))
11101150 }
11111151
11121152
11131153
11141154 @Callable(i)
11151155 func evaluateGetREADONLY (paymentLpAssetId,paymentLpAmt) = {
11161156 let res = estimateGetOperation("", paymentLpAssetId, paymentLpAmt, this)
11171157 let outAmAmt = res._1
11181158 let outPrAmt = res._2
11191159 let amBalance = res._5
11201160 let prBalance = res._6
11211161 let lpEmission = res._7
11221162 let curPrice = res._8
11231163 let poolStatus = parseIntValue(res._9)
11241164 $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))
11251165 }
11261166
11271167
11281168 @Verifier(tx)
11291169 func verify () = {
11301170 let targetPublicKey = match managerPublicKeyOrUnit() {
11311171 case pk: ByteVector =>
11321172 pk
11331173 case _: Unit =>
11341174 tx.senderPublicKey
11351175 case _ =>
11361176 throw("Match error")
11371177 }
11381178 match tx {
11391179 case order: Order =>
11401180 let matcherPub = getMatcherPubOrFail()
11411181 let orderValid = validateMatcherOrderAllowed(order)
11421182 let senderValid = sigVerify(order.bodyBytes, order.proofs[0], order.senderPublicKey)
11431183 let matcherValid = sigVerify(order.bodyBytes, order.proofs[1], matcherPub)
11441184 if (if (if (orderValid)
11451185 then senderValid
11461186 else false)
11471187 then matcherValid
11481188 else false)
11491189 then true
11501190 else throwOrderError(orderValid, senderValid, matcherValid)
11511191 case s: SetScriptTransaction =>
11521192 let newHash = blake2b256(value(s.script))
11531193 let allowedHash = fromBase64String(value(getString(factoryContract, keyAllowedLpScriptHash())))
11541194 let currentHash = scriptHash(this)
11551195 if (if ((allowedHash == newHash))
11561196 then (currentHash != newHash)
11571197 else false)
11581198 then true
11591199 else sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey)
11601200 case _ =>
11611201 sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey)
11621202 }
11631203 }
11641204

github/deemru/w8io/026f985 
96.10 ms