tx · 5nqzJysKMrivpQNgoj1pFfYJZ53B7uuocMgcQvYiyUdi

3N8sfbgCJCsLbcWYRiVKm6ivccPLMsQmVDx:  -0.02900000 Waves

2022.10.25 10:22 [2287615] smart account 3N8sfbgCJCsLbcWYRiVKm6ivccPLMsQmVDx > SELF 0.00000000 Waves

{ "type": 13, "id": "5nqzJysKMrivpQNgoj1pFfYJZ53B7uuocMgcQvYiyUdi", "fee": 2900000, "feeAssetId": null, "timestamp": 1666682183838, "version": 1, "sender": "3N8sfbgCJCsLbcWYRiVKm6ivccPLMsQmVDx", "senderPublicKey": "G4Ha5wvhDpHGy5koVJsmfWC2zwF89jXDUmWBb28mRyrr", "proofs": [ "V6WHnLgbBh28bNGHinaCbuspwd3D3vuVDPb6CGM2a2MUaCPCcVQS5oNnVbbQz5MfjbYv35bXD4Wt1U843awBmrt" ], "script": "base64:BgKyJwgCEgMKAQgSABIECgIBBBIDCgEBEgQKAgEEEgQKAggBEgQKAggBEgQKAggBEgUKAwEIARIAEgQKAgEBEgMKAQESBAoCCAgSABIDCgEIEgUKAwEBARIECgIBARIECgIIARIECgIICBILCgkIAQECAQIIBAQSBgoECAgBCBIAEgMKAQESAwoBARIECgIIASIKbFBkZWNpbWFscyIGc2NhbGU4IgxzY2FsZThCaWdJbnQiB3NjYWxlMTgiCnplcm9CaWdJbnQiBGJpZzAiBGJpZzEiBGJpZzIiC3dhdmVzU3RyaW5nIgNTRVAiClBvb2xBY3RpdmUiD1Bvb2xQdXREaXNhYmxlZCITUG9vbE1hdGNoZXJEaXNhYmxlZCIMUG9vbFNodXRkb3duIg5pZHhQb29sQWRkcmVzcyINaWR4UG9vbFN0YXR1cyIQaWR4UG9vbExQQXNzZXRJZCINaWR4QW10QXNzZXRJZCIPaWR4UHJpY2VBc3NldElkIg5pZHhBbXRBc3NldERjbSIQaWR4UHJpY2VBc3NldERjbSIOaWR4SUFtdEFzc2V0SWQiEGlkeElQcmljZUFzc2V0SWQiDWlkeExQQXNzZXREY20iEml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dmFsdWUBCAUCZUIGc2NyaXB0BAJmTgkA2wQBCQEFdmFsdWUBCQCdCAIFAmFDCQECYXEABAJmTwkA8QcBBQR0aGlzAwMJAAACBQJmTgUCZk0JAQIhPQIFAmZPBQJmTQcGCQD0AwMIBQJmSQlib2R5Qnl0ZXMJAJEDAggFAmZJBnByb29mcwAABQJmSwkA9AMDCAUCZkkJYm9keUJ5dGVzCQCRAwIIBQJmSQZwcm9vZnMAAAUCZkuSNT80", "chainId": 84, "height": 2287615, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 9tsbf7YTHtHGhAtotbchW7e8H4KAnyMP6wDeXCBUr6oe Next: QfpmNKPJWg1k22oLKmLGV1PVVuBGbAfRqW76cQ7gf4r Diff:
OldNewDifferences
508508 if ((chechSupply == chechSupply))
509509 then {
510510 let depositBigInt = toBigInt(paymentAmount)
511- let issueAmount = max([0, toInt(((supplyBigInt * (sqrtBigInt((scale18 + ((depositBigInt * scale18) / paymentBalanceBigInt)), 8, 18, DOWN) - scale18)) / scale18))])
511+ let issueAmount = max([0, toInt(((supplyBigInt * (sqrtBigInt((scale18 + ((depositBigInt * scale18) / paymentBalanceBigInt)), 18, 18, DOWN) - scale18)) / scale18))])
512512 let commonState = if (isEval)
513513 then nil
514514 else [IntegerEntry(pl(), curPrice), IntegerEntry(ph(height, lastBlock.timestamp), curPrice), StringEntry(pau(toString(value(userAddress)), toBase58String(value(txId))), dataPutActionInfo(amountAssetAmountRaw, priceAssetAmountRaw, issueAmount, curPrice, 0, 0, height, lastBlock.timestamp, 0, 0))]
529529
530530 func calcGetOneToken (outAssetId,paymentAmount,paymentAssetId,userAddress,txId) = {
531531 let isEval = (txId == unit)
532- let $t02536325524 = parsePoolConfig(getPoolConfig())
533- let poolAddress = $t02536325524._1
534- let poolStatus = $t02536325524._2
535- let lpAssetId = $t02536325524._3
536- let amountAssetId = $t02536325524._4
537- let priceAssetId = $t02536325524._5
538- let amDecimals = $t02536325524._6
539- let prDecimals = $t02536325524._7
532+ let $t02536425525 = parsePoolConfig(getPoolConfig())
533+ let poolAddress = $t02536425525._1
534+ let poolStatus = $t02536425525._2
535+ let lpAssetId = $t02536425525._3
536+ let amountAssetId = $t02536425525._4
537+ let priceAssetId = $t02536425525._5
538+ let amDecimals = $t02536425525._6
539+ let prDecimals = $t02536425525._7
540540 let checks = [if ((paymentAssetId == lpAssetId))
541541 then true
542542 else throwErr("invalid lp asset")]
559559 let supplyBigInt = toBigInt(valueOrErrorMessage(assetInfo(lpAssetId), (("asset " + toBase58String(lpAssetId)) + " doesn't exist")).quantity)
560560 let redeemedBigInt = toBigInt(paymentAmount)
561561 let amountRaw = max([0, toInt(((balanceBigInt * (scale18 - pow((scale18 - ((redeemedBigInt * scale18) / supplyBigInt)), 18, big2, 0, 18, DOWN))) / scale18))])
562- let $t02659926649 = takeFee(amountRaw)
563- let totalAmount = $t02659926649._1
564- let feeAmount = $t02659926649._2
565- let $t02665326879 = if (outInAmountAsset)
562+ let $t02660026650 = takeFee(amountRaw)
563+ let totalAmount = $t02660026650._1
564+ let feeAmount = $t02660026650._2
565+ let $t02665426880 = if (outInAmountAsset)
566566 then $Tuple4(totalAmount, 0, (amBalanceOld - amountRaw), prBalanceOld)
567567 else $Tuple4(0, totalAmount, amBalanceOld, (prBalanceOld - amountRaw))
568- let outAmAmount = $t02665326879._1
569- let outPrAmount = $t02665326879._2
570- let amBalanceNew = $t02665326879._3
571- let prBalanceNew = $t02665326879._4
568+ let outAmAmount = $t02665426880._1
569+ let outPrAmount = $t02665426880._2
570+ let amBalanceNew = $t02665426880._3
571+ let prBalanceNew = $t02665426880._4
572572 let curPrX18 = calcPriceBigInt(toX18(prBalanceNew, prDecimals), toX18(amBalanceNew, amDecimals))
573573 let curPrice = fromX18(curPrX18, scale8)
574574 let commonState = if (isEval)
742742 let paymentAmountRaw = payment.amount
743743 let userAddress = i.caller
744744 let txId = i.transactionId
745- let $t03134631473 = calcPutOneToken(paymentAmountRaw, paymentAssetId, userAddress, txId)
746- let emitAmountEstimated = $t03134631473._1
747- let commonState = $t03134631473._2
748- let feeAmount = $t03134631473._3
749- let bonus = $t03134631473._4
745+ let $t03134731474 = calcPutOneToken(paymentAmountRaw, paymentAssetId, userAddress, txId)
746+ let emitAmountEstimated = $t03134731474._1
747+ let commonState = $t03134731474._2
748+ let feeAmount = $t03134731474._3
749+ let bonus = $t03134731474._4
750750 let emitAmount = if (if ((minOutAmount > 0))
751751 then (minOutAmount > emitAmountEstimated)
752752 else false)
777777
778778 @Callable(i)
779779 func putOneTknREADONLY (paymentAssetId,paymentAmountRaw) = {
780- let $t03220232337 = calcPutOneToken(paymentAmountRaw, parseAssetId(paymentAssetId), unit, unit)
781- let emitAmountEstimated = $t03220232337._1
782- let commonState = $t03220232337._2
783- let feeAmount = $t03220232337._3
784- let bonus = $t03220232337._4
780+ let $t03220332338 = calcPutOneToken(paymentAmountRaw, parseAssetId(paymentAssetId), unit, unit)
781+ let emitAmountEstimated = $t03220332338._1
782+ let commonState = $t03220332338._2
783+ let feeAmount = $t03220332338._3
784+ let bonus = $t03220332338._4
785785 $Tuple2(nil, $Tuple3(emitAmountEstimated, feeAmount, bonus))
786786 }
787787
805805 let paymentAmount = payment.amount
806806 let userAddress = i.caller
807807 let txId = i.transactionId
808- let $t03292533057 = calcGetOneToken(outAssetId, paymentAmount, paymentAssetId, userAddress, txId)
809- let amountEstimated = $t03292533057._1
810- let commonState = $t03292533057._2
811- let feeAmount = $t03292533057._3
812- let bonus = $t03292533057._4
808+ let $t03292633058 = calcGetOneToken(outAssetId, paymentAmount, paymentAssetId, userAddress, txId)
809+ let amountEstimated = $t03292633058._1
810+ let commonState = $t03292633058._2
811+ let feeAmount = $t03292633058._3
812+ let bonus = $t03292633058._4
813813 let amount = if (if ((minOutAmount > 0))
814814 then (minOutAmount > amountEstimated)
815815 else false)
833833
834834 @Callable(i)
835835 func getOneTknREADONLY (outAssetId,paymentAmount) = {
836- let $t03369233830 = calcGetOneToken(parseAssetId(outAssetId), paymentAmount, cfgLpAssetId, unit, unit)
837- let amountEstimated = $t03369233830._1
838- let commonState = $t03369233830._2
839- let feeAmount = $t03369233830._3
840- let bonus = $t03369233830._4
836+ let $t03369333831 = calcGetOneToken(parseAssetId(outAssetId), paymentAmount, cfgLpAssetId, unit, unit)
837+ let amountEstimated = $t03369333831._1
838+ let commonState = $t03369333831._2
839+ let feeAmount = $t03369333831._3
840+ let bonus = $t03369333831._4
841841 $Tuple2(nil, $Tuple3(amountEstimated, feeAmount, bonus))
842842 }
843843
859859 let unstakeInv = invoke(stakingContract, "unstake", [toBase58String(cfgLpAssetId), unstakeAmount], nil)
860860 if ((unstakeInv == unstakeInv))
861861 then {
862- let $t03438034503 = calcGetOneToken(outAssetId, unstakeAmount, cfgLpAssetId, unit, unit)
863- let amountEstimated = $t03438034503._1
864- let commonState = $t03438034503._2
865- let feeAmount = $t03438034503._3
866- let bonus = $t03438034503._4
862+ let $t03438134504 = calcGetOneToken(outAssetId, unstakeAmount, cfgLpAssetId, unit, unit)
863+ let amountEstimated = $t03438134504._1
864+ let commonState = $t03438134504._2
865+ let feeAmount = $t03438134504._3
866+ let bonus = $t03438134504._4
867867 let amount = if (if ((minOutAmount > 0))
868868 then (minOutAmount > amountEstimated)
869869 else false)
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 ((zeroBigInt > val))
7272 then -(val)
7373 else val
7474
7575
7676 func fc () = "%s__factoryContract"
7777
7878
7979 func mpk () = "%s__managerPublicKey"
8080
8181
8282 func pmpk () = "%s__pendingManagerPublicKey"
8383
8484
8585 func pl () = "%s%s__price__last"
8686
8787
8888 func ph (h,timestamp) = makeString(["%s%s%d%d__price__history", toString(h), toString(timestamp)], SEP)
8989
9090
9191 func pau (userAddress,txId) = ((("%s%s%s__P__" + userAddress) + "__") + txId)
9292
9393
9494 func gau (userAddress,txId) = ((("%s%s%s__G__" + userAddress) + "__") + txId)
9595
9696
9797 func aa () = "%s__amountAsset"
9898
9999
100100 func pa () = "%s__priceAsset"
101101
102102
103103 let keyFee = "%s__fee"
104104
105105 let feeDefault = fraction(5, scale8, 10000)
106106
107107 let fee = valueOrElse(getInteger(this, keyFee), feeDefault)
108108
109109 func keyFactoryConfig () = "%s__factoryConfig"
110110
111111
112112 func keyMatcherPub () = "%s%s__matcher__publicKey"
113113
114114
115115 func keyMappingPoolContractAddressToPoolAssets (poolContractAddress) = (("%s%s%s__" + poolContractAddress) + "__mappings__poolContract2LpAsset")
116116
117117
118118 func keyPoolConfig (iAmtAsset,iPriceAsset) = (((("%d%d%s__" + iAmtAsset) + "__") + iPriceAsset) + "__config")
119119
120120
121121 func keyMappingsBaseAsset2internalId (baseAssetStr) = ("%s%s%s__mappings__baseAsset2internalId__" + baseAssetStr)
122122
123123
124124 func keyAllPoolsShutdown () = "%s__shutdown"
125125
126126
127127 func keyPoolWeight (contractAddress) = ("%s%s__poolWeight__" + contractAddress)
128128
129129
130130 func keyAllowedLpScriptHash () = "%s__allowedLpScriptHash"
131131
132132
133133 let keyFeeCollectorAddress = "%s__feeCollectorAddress"
134134
135135 func throwOrderError (orderValid,senderValid,matcherValid) = throw(((((("order validation failed: orderValid=" + toString(orderValid)) + " senderValid=") + toString(senderValid)) + " matcherValid=") + toString(matcherValid)))
136136
137137
138138 func getStringOrFail (address,key) = valueOrErrorMessage(getString(address, key), makeString(["mandatory ", toString(address), ".", key, " is not defined"], ""))
139139
140140
141141 func getIntOrFail (address,key) = valueOrErrorMessage(getInteger(address, key), makeString(["mandatory ", toString(address), ".", key, " is not defined"], ""))
142142
143143
144144 func throwErr (msg) = throw(makeString(["lp.ride:", msg], " "))
145145
146146
147147 let factoryContract = addressFromStringValue(getStringOrFail(this, fc()))
148148
149149 let feeCollectorAddress = addressFromStringValue(getStringOrFail(factoryContract, keyFeeCollectorAddress))
150150
151151 func isGlobalShutdown () = valueOrElse(getBoolean(factoryContract, keyAllPoolsShutdown()), false)
152152
153153
154154 func getMatcherPubOrFail () = fromBase58String(getStringOrFail(factoryContract, keyMatcherPub()))
155155
156156
157157 func getPoolConfig () = {
158158 let amtAsset = getStringOrFail(this, aa())
159159 let priceAsset = getStringOrFail(this, pa())
160160 let iPriceAsset = getIntOrFail(factoryContract, keyMappingsBaseAsset2internalId(priceAsset))
161161 let iAmtAsset = getIntOrFail(factoryContract, keyMappingsBaseAsset2internalId(amtAsset))
162162 split(getStringOrFail(factoryContract, keyPoolConfig(toString(iAmtAsset), toString(iPriceAsset))), SEP)
163163 }
164164
165165
166166 func parseAssetId (input) = if ((input == wavesString))
167167 then unit
168168 else fromBase58String(input)
169169
170170
171171 func assetIdToString (input) = if ((input == unit))
172172 then wavesString
173173 else toBase58String(value(input))
174174
175175
176176 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]))
177177
178178
179179 let poolConfigParsed = parsePoolConfig(getPoolConfig())
180180
181181 let $t074847650 = poolConfigParsed
182182
183183 let cfgPoolAddress = $t074847650._1
184184
185185 let cfgPoolStatus = $t074847650._2
186186
187187 let cfgLpAssetId = $t074847650._3
188188
189189 let cfgAmountAssetId = $t074847650._4
190190
191191 let cfgPriceAssetId = $t074847650._5
192192
193193 let cfgAmountAssetDecimals = $t074847650._6
194194
195195 let cfgPriceAssetDecimals = $t074847650._7
196196
197197 func getFactoryConfig () = split(getStringOrFail(factoryContract, keyFactoryConfig()), SEP)
198198
199199
200200 let stakingContract = valueOrErrorMessage(addressFromString(getFactoryConfig()[idxFactoryStakingContract]), "incorrect staking address")
201201
202202 let slippageContract = valueOrErrorMessage(addressFromString(getFactoryConfig()[idxFactorySlippageContract]), "incorrect staking address")
203203
204204 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)
205205
206206
207207 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)
208208
209209
210210 func getAccBalance (assetId) = if ((assetId == "WAVES"))
211211 then wavesBalance(this).available
212212 else assetBalance(this, fromBase58String(assetId))
213213
214214
215215 func calcPriceBigInt (prAmtX18,amAmtX18) = fraction(prAmtX18, scale18, amAmtX18)
216216
217217
218218 func privateCalcPrice (amAssetDcm,prAssetDcm,amAmt,prAmt) = {
219219 let amtAssetAmtX18 = toX18(amAmt, amAssetDcm)
220220 let priceAssetAmtX18 = toX18(prAmt, prAssetDcm)
221221 calcPriceBigInt(priceAssetAmtX18, amtAssetAmtX18)
222222 }
223223
224224
225225 func calcPrices (amAmt,prAmt,lpAmt) = {
226226 let cfg = getPoolConfig()
227227 let amtAssetDcm = parseIntValue(cfg[idxAmtAssetDcm])
228228 let priceAssetDcm = parseIntValue(cfg[idxPriceAssetDcm])
229229 let priceX18 = privateCalcPrice(amtAssetDcm, priceAssetDcm, amAmt, prAmt)
230230 let amAmtX18 = toX18(amAmt, amtAssetDcm)
231231 let prAmtX18 = toX18(prAmt, priceAssetDcm)
232232 let lpAmtX18 = toX18(lpAmt, scale8)
233233 let lpPriceInAmAssetX18 = calcPriceBigInt(amAmtX18, lpAmtX18)
234234 let lpPriceInPrAssetX18 = calcPriceBigInt(prAmtX18, lpAmtX18)
235235 [priceX18, lpPriceInAmAssetX18, lpPriceInPrAssetX18]
236236 }
237237
238238
239239 func calculatePrices (amAmt,prAmt,lpAmt) = {
240240 let prices = calcPrices(amAmt, prAmt, lpAmt)
241241 [fromX18(prices[0], scale8), fromX18(prices[1], scale8), fromX18(prices[2], scale8)]
242242 }
243243
244244
245245 func estimateGetOperation (txId58,pmtAssetId,pmtLpAmt,userAddress) = {
246246 let cfg = getPoolConfig()
247247 let lpAssetId = cfg[idxPoolLPAssetId]
248248 let amAssetId = cfg[idxAmtAssetId]
249249 let prAssetId = cfg[idxPriceAssetId]
250250 let amAssetDcm = parseIntValue(cfg[idxAmtAssetDcm])
251251 let prAssetDcm = parseIntValue(cfg[idxPriceAssetDcm])
252252 let poolStatus = cfg[idxPoolStatus]
253253 let lpEmission = valueOrErrorMessage(assetInfo(fromBase58String(lpAssetId)), (("Asset " + lpAssetId) + " doesn't exist")).quantity
254254 if ((lpAssetId != pmtAssetId))
255255 then throw("Invalid asset passed.")
256256 else {
257257 let amBalance = getAccBalance(amAssetId)
258258 let amBalanceX18 = toX18(amBalance, amAssetDcm)
259259 let prBalance = getAccBalance(prAssetId)
260260 let prBalanceX18 = toX18(prBalance, prAssetDcm)
261261 let curPriceX18 = calcPriceBigInt(prBalanceX18, amBalanceX18)
262262 let curPrice = fromX18(curPriceX18, scale8)
263263 let pmtLpAmtX18 = toX18(pmtLpAmt, scale8)
264264 let lpEmissionX18 = toX18(lpEmission, scale8)
265265 let outAmAmtX18 = fraction(amBalanceX18, pmtLpAmtX18, lpEmissionX18)
266266 let outPrAmtX18 = fraction(prBalanceX18, pmtLpAmtX18, lpEmissionX18)
267267 let outAmAmt = fromX18(outAmAmtX18, amAssetDcm)
268268 let outPrAmt = fromX18(outPrAmtX18, prAssetDcm)
269269 let state = if ((txId58 == ""))
270270 then nil
271271 else [ScriptTransfer(userAddress, outAmAmt, if ((amAssetId == "WAVES"))
272272 then unit
273273 else fromBase58String(amAssetId)), ScriptTransfer(userAddress, outPrAmt, if ((prAssetId == "WAVES"))
274274 then unit
275275 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)]
276276 $Tuple10(outAmAmt, outPrAmt, amAssetId, prAssetId, amBalance, prBalance, lpEmission, curPriceX18, poolStatus, state)
277277 }
278278 }
279279
280280
281281 func estimatePutOperation (txId58,slippageTolerance,inAmAssetAmt,inAmAssetId,inPrAssetAmt,inPrAssetId,userAddress,isEvaluate,emitLp) = {
282282 let cfg = getPoolConfig()
283283 let lpAssetId = fromBase58String(cfg[idxPoolLPAssetId])
284284 let amAssetIdStr = cfg[idxAmtAssetId]
285285 let prAssetIdStr = cfg[idxPriceAssetId]
286286 let iAmtAssetId = cfg[idxIAmtAssetId]
287287 let iPriceAssetId = cfg[idxIPriceAssetId]
288288 let amtAssetDcm = parseIntValue(cfg[idxAmtAssetDcm])
289289 let priceAssetDcm = parseIntValue(cfg[idxPriceAssetDcm])
290290 let poolStatus = cfg[idxPoolStatus]
291291 let lpEmission = valueOrErrorMessage(assetInfo(lpAssetId), (("Asset " + toBase58String(lpAssetId)) + " doesn't exist")).quantity
292292 let inAmAssetIdStr = toBase58String(valueOrElse(inAmAssetId, fromBase58String("WAVES")))
293293 let inPrAssetIdStr = toBase58String(valueOrElse(inPrAssetId, fromBase58String("WAVES")))
294294 if (if ((amAssetIdStr != inAmAssetIdStr))
295295 then true
296296 else (prAssetIdStr != inPrAssetIdStr))
297297 then throw("Invalid amt or price asset passed.")
298298 else {
299299 let amBalance = if (isEvaluate)
300300 then getAccBalance(amAssetIdStr)
301301 else (getAccBalance(amAssetIdStr) - inAmAssetAmt)
302302 let prBalance = if (isEvaluate)
303303 then getAccBalance(prAssetIdStr)
304304 else (getAccBalance(prAssetIdStr) - inPrAssetAmt)
305305 let inAmAssetAmtX18 = toX18(inAmAssetAmt, amtAssetDcm)
306306 let inPrAssetAmtX18 = toX18(inPrAssetAmt, priceAssetDcm)
307307 let userPriceX18 = calcPriceBigInt(inPrAssetAmtX18, inAmAssetAmtX18)
308308 let amBalanceX18 = toX18(amBalance, amtAssetDcm)
309309 let prBalanceX18 = toX18(prBalance, priceAssetDcm)
310310 let res = if ((lpEmission == 0))
311311 then {
312312 let curPriceX18 = zeroBigInt
313313 let slippageX18 = zeroBigInt
314314 let lpAmtX18 = pow((inAmAssetAmtX18 * inPrAssetAmtX18), 0, toBigInt(5), 1, 0, DOWN)
315315 $Tuple5(fromX18(lpAmtX18, scale8), fromX18(inAmAssetAmtX18, amtAssetDcm), fromX18(inPrAssetAmtX18, priceAssetDcm), calcPriceBigInt((prBalanceX18 + inPrAssetAmtX18), (amBalanceX18 + inAmAssetAmtX18)), slippageX18)
316316 }
317317 else {
318318 let curPriceX18 = calcPriceBigInt(prBalanceX18, amBalanceX18)
319319 let slippageX18 = fraction(abs((curPriceX18 - userPriceX18)), scale18, curPriceX18)
320320 let slippageToleranceX18 = toX18(slippageTolerance, scale8)
321321 if (if ((curPriceX18 != zeroBigInt))
322322 then (slippageX18 > slippageToleranceX18)
323323 else false)
324324 then throw(((("Price slippage " + toString(slippageX18)) + " exceeded the passed limit of ") + toString(slippageToleranceX18)))
325325 else {
326326 let lpEmissionX18 = toX18(lpEmission, scale8)
327327 let prViaAmX18 = fraction(inAmAssetAmtX18, curPriceX18, scale18)
328328 let amViaPrX18 = fraction(inPrAssetAmtX18, scale18, curPriceX18)
329329 let expectedAmts = if ((prViaAmX18 > inPrAssetAmtX18))
330330 then $Tuple2(amViaPrX18, inPrAssetAmtX18)
331331 else $Tuple2(inAmAssetAmtX18, prViaAmX18)
332332 let expAmtAssetAmtX18 = expectedAmts._1
333333 let expPriceAssetAmtX18 = expectedAmts._2
334334 let lpAmtX18 = fraction(lpEmissionX18, expPriceAssetAmtX18, prBalanceX18)
335335 $Tuple5(fromX18(lpAmtX18, scale8), fromX18(expAmtAssetAmtX18, amtAssetDcm), fromX18(expPriceAssetAmtX18, priceAssetDcm), curPriceX18, slippageX18)
336336 }
337337 }
338338 let calcLpAmt = res._1
339339 let calcAmAssetPmt = res._2
340340 let calcPrAssetPmt = res._3
341341 let curPrice = fromX18(res._4, scale8)
342342 let slippageCalc = fromX18(res._5, scale8)
343343 if ((0 >= calcLpAmt))
344344 then throw("Invalid calculations. LP calculated is less than zero.")
345345 else {
346346 let emitLpAmt = if (!(emitLp))
347347 then 0
348348 else calcLpAmt
349349 let amDiff = (inAmAssetAmt - calcAmAssetPmt)
350350 let prDiff = (inPrAssetAmt - calcPrAssetPmt)
351351 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))]
352352 $Tuple13(calcLpAmt, emitLpAmt, curPrice, amBalance, prBalance, lpEmission, lpAssetId, poolStatus, commonState, amDiff, prDiff, inAmAssetId, inPrAssetId)
353353 }
354354 }
355355 }
356356
357357
358358 func validateMatcherOrderAllowed (order) = {
359359 let cfg = getPoolConfig()
360360 let amtAssetId = cfg[idxAmtAssetId]
361361 let priceAssetId = cfg[idxPriceAssetId]
362362 let poolStatus = parseIntValue(cfg[idxPoolStatus])
363363 let amtAssetDcm = parseIntValue(cfg[idxAmtAssetDcm])
364364 let priceAssetDcm = parseIntValue(cfg[idxPriceAssetDcm])
365365 let accAmtAssetBalance = getAccBalance(amtAssetId)
366366 let accPriceAssetBalance = getAccBalance(priceAssetId)
367367 let curPriceX18 = if ((order.orderType == Buy))
368368 then privateCalcPrice(amtAssetDcm, priceAssetDcm, (accAmtAssetBalance + order.amount), accPriceAssetBalance)
369369 else privateCalcPrice(amtAssetDcm, priceAssetDcm, (accAmtAssetBalance - order.amount), accPriceAssetBalance)
370370 let curPrice = fromX18(curPriceX18, scale8)
371371 if (if (if (isGlobalShutdown())
372372 then true
373373 else (poolStatus == PoolMatcherDisabled))
374374 then true
375375 else (poolStatus == PoolShutdown))
376376 then throw("Exchange operations disabled")
377377 else {
378378 let orderAmtAsset = order.assetPair.amountAsset
379379 let orderAmtAssetStr = if ((orderAmtAsset == unit))
380380 then "WAVES"
381381 else toBase58String(value(orderAmtAsset))
382382 let orderPriceAsset = order.assetPair.priceAsset
383383 let orderPriceAssetStr = if ((orderPriceAsset == unit))
384384 then "WAVES"
385385 else toBase58String(value(orderPriceAsset))
386386 if (if ((orderAmtAssetStr != amtAssetId))
387387 then true
388388 else (orderPriceAssetStr != priceAssetId))
389389 then throw("Wrong order assets.")
390390 else {
391391 let orderPrice = order.price
392392 let priceDcm = fraction(scale8, priceAssetDcm, amtAssetDcm)
393393 let castedOrderPrice = toScale(orderPrice, scale8, priceDcm)
394394 let isOrderPriceValid = if ((order.orderType == Buy))
395395 then (curPrice >= castedOrderPrice)
396396 else (castedOrderPrice >= curPrice)
397397 true
398398 }
399399 }
400400 }
401401
402402
403403 func commonGet (i) = if ((size(i.payments) != 1))
404404 then throw("exactly 1 payment is expected")
405405 else {
406406 let pmt = value(i.payments[0])
407407 let pmtAssetId = value(pmt.assetId)
408408 let pmtAmt = pmt.amount
409409 let res = estimateGetOperation(toBase58String(i.transactionId), toBase58String(pmtAssetId), pmtAmt, i.caller)
410410 let outAmAmt = res._1
411411 let outPrAmt = res._2
412412 let poolStatus = parseIntValue(res._9)
413413 let state = res._10
414414 if (if (isGlobalShutdown())
415415 then true
416416 else (poolStatus == PoolShutdown))
417417 then throw(("Get operation is blocked by admin. Status = " + toString(poolStatus)))
418418 else $Tuple5(outAmAmt, outPrAmt, pmtAmt, pmtAssetId, state)
419419 }
420420
421421
422422 func commonPut (i,slippageTolerance,emitLp) = if ((size(i.payments) != 2))
423423 then throw("exactly 2 payments are expected")
424424 else {
425425 let amAssetPmt = value(i.payments[0])
426426 let prAssetPmt = value(i.payments[1])
427427 let estPut = estimatePutOperation(toBase58String(i.transactionId), slippageTolerance, amAssetPmt.amount, amAssetPmt.assetId, prAssetPmt.amount, prAssetPmt.assetId, toString(i.caller), false, emitLp)
428428 let poolStatus = parseIntValue(estPut._8)
429429 if (if (if (isGlobalShutdown())
430430 then true
431431 else (poolStatus == PoolPutDisabled))
432432 then true
433433 else (poolStatus == PoolShutdown))
434434 then throw(("Put operation is blocked by admin. Status = " + toString(poolStatus)))
435435 else estPut
436436 }
437437
438438
439439 func emit (amount) = {
440440 let emitInv = invoke(factoryContract, "emit", [amount], nil)
441441 if ((emitInv == emitInv))
442442 then {
443443 let emitInvLegacy = match emitInv {
444444 case legacyFactoryContract: Address =>
445445 invoke(legacyFactoryContract, "emit", [amount], nil)
446446 case _ =>
447447 unit
448448 }
449449 if ((emitInvLegacy == emitInvLegacy))
450450 then amount
451451 else throw("Strict value is not equal to itself.")
452452 }
453453 else throw("Strict value is not equal to itself.")
454454 }
455455
456456
457457 func takeFee (amount) = {
458458 let feeAmount = fraction(amount, fee, scale8)
459459 $Tuple2((amount - feeAmount), feeAmount)
460460 }
461461
462462
463463 func calcPutOneToken (paymentAmountRaw,paymentAssetId,userAddress,txId) = {
464464 let isEval = (txId == unit)
465465 let $t02216722345 = parsePoolConfig(getPoolConfig())
466466 let poolAddress = $t02216722345._1
467467 let poolStatus = $t02216722345._2
468468 let lpAssetId = $t02216722345._3
469469 let amountAssetId = $t02216722345._4
470470 let priceAssetId = $t02216722345._5
471471 let amountAssetDecimals = $t02216722345._6
472472 let priceAssetDecimals = $t02216722345._7
473473 let amountBalanceRaw = getAccBalance(assetIdToString(amountAssetId))
474474 let priceBalanceRaw = getAccBalance(assetIdToString(priceAssetId))
475475 let paymentInAmountAsset = if ((paymentAssetId == amountAssetId))
476476 then true
477477 else if ((paymentAssetId == priceAssetId))
478478 then false
479479 else throwErr("invalid asset")
480480 let $t02267522968 = if (isEval)
481481 then $Tuple2(amountBalanceRaw, priceBalanceRaw)
482482 else if (paymentInAmountAsset)
483483 then $Tuple2((amountBalanceRaw - paymentAmountRaw), priceBalanceRaw)
484484 else $Tuple2(amountBalanceRaw, (priceBalanceRaw - paymentAmountRaw))
485485 let amountBalanceOld = $t02267522968._1
486486 let priceBalanceOld = $t02267522968._2
487487 let $t02297223121 = if (paymentInAmountAsset)
488488 then $Tuple2(paymentAmountRaw, 0)
489489 else $Tuple2(0, paymentAmountRaw)
490490 let amountAssetAmountRaw = $t02297223121._1
491491 let priceAssetAmountRaw = $t02297223121._2
492492 let amountAssetAmount = takeFee(amountAssetAmountRaw)._1
493493 let priceAssetAmount = takeFee(priceAssetAmountRaw)._1
494494 let $t02324323302 = takeFee(paymentAmountRaw)
495495 let paymentAmount = $t02324323302._1
496496 let feeAmount = $t02324323302._2
497497 let amountBalanceNew = (amountBalanceOld + amountAssetAmount)
498498 let priceBalanceNew = (priceBalanceOld + priceAssetAmount)
499499 let curPrice = fromX18(calcPriceBigInt(toX18(priceBalanceNew, priceAssetDecimals), toX18(amountBalanceNew, amountAssetDecimals)), scale8)
500500 let paymentBalance = if (paymentInAmountAsset)
501501 then amountBalanceOld
502502 else priceBalanceOld
503503 let paymentBalanceBigInt = toBigInt(paymentBalance)
504504 let supplyBigInt = toBigInt(valueOrErrorMessage(assetInfo(lpAssetId), (("asset " + toBase58String(lpAssetId)) + " doesn't exist")).quantity)
505505 let chechSupply = if ((supplyBigInt > big0))
506506 then true
507507 else throwErr("initial deposit requires all coins")
508508 if ((chechSupply == chechSupply))
509509 then {
510510 let depositBigInt = toBigInt(paymentAmount)
511- let issueAmount = max([0, toInt(((supplyBigInt * (sqrtBigInt((scale18 + ((depositBigInt * scale18) / paymentBalanceBigInt)), 8, 18, DOWN) - scale18)) / scale18))])
511+ let issueAmount = max([0, toInt(((supplyBigInt * (sqrtBigInt((scale18 + ((depositBigInt * scale18) / paymentBalanceBigInt)), 18, 18, DOWN) - scale18)) / scale18))])
512512 let commonState = if (isEval)
513513 then nil
514514 else [IntegerEntry(pl(), curPrice), IntegerEntry(ph(height, lastBlock.timestamp), curPrice), StringEntry(pau(toString(value(userAddress)), toBase58String(value(txId))), dataPutActionInfo(amountAssetAmountRaw, priceAssetAmountRaw, issueAmount, curPrice, 0, 0, height, lastBlock.timestamp, 0, 0))]
515515 let poolProportion = fraction(priceBalanceOld, scale8, amountBalanceOld)
516516 let amountAssetPart = fraction(paymentAmountRaw, scale8, (poolProportion + scale8))
517517 let priceAssetPart = (paymentAmountRaw - amountAssetPart)
518518 let lpAmtBoth = toInt(fraction(supplyBigInt, toBigInt(priceAssetPart), toBigInt(priceBalanceOld)))
519519 let bonus = if ((lpAmtBoth == 0))
520520 then if ((issueAmount == 0))
521521 then 0
522522 else throwErr("bonus calculation error")
523523 else fraction((issueAmount - lpAmtBoth), scale8, lpAmtBoth)
524524 $Tuple4(issueAmount, commonState, feeAmount, bonus)
525525 }
526526 else throw("Strict value is not equal to itself.")
527527 }
528528
529529
530530 func calcGetOneToken (outAssetId,paymentAmount,paymentAssetId,userAddress,txId) = {
531531 let isEval = (txId == unit)
532- let $t02536325524 = parsePoolConfig(getPoolConfig())
533- let poolAddress = $t02536325524._1
534- let poolStatus = $t02536325524._2
535- let lpAssetId = $t02536325524._3
536- let amountAssetId = $t02536325524._4
537- let priceAssetId = $t02536325524._5
538- let amDecimals = $t02536325524._6
539- let prDecimals = $t02536325524._7
532+ let $t02536425525 = parsePoolConfig(getPoolConfig())
533+ let poolAddress = $t02536425525._1
534+ let poolStatus = $t02536425525._2
535+ let lpAssetId = $t02536425525._3
536+ let amountAssetId = $t02536425525._4
537+ let priceAssetId = $t02536425525._5
538+ let amDecimals = $t02536425525._6
539+ let prDecimals = $t02536425525._7
540540 let checks = [if ((paymentAssetId == lpAssetId))
541541 then true
542542 else throwErr("invalid lp asset")]
543543 if ((checks == checks))
544544 then {
545545 let outInAmountAsset = if ((outAssetId == amountAssetId))
546546 then true
547547 else if ((outAssetId == priceAssetId))
548548 then false
549549 else throwErr("invalid asset")
550550 let balanceBigInt = if (outInAmountAsset)
551551 then toBigInt(getAccBalance(assetIdToString(amountAssetId)))
552552 else toBigInt(getAccBalance(assetIdToString(priceAssetId)))
553553 let amBalanceOld = getAccBalance(assetIdToString(amountAssetId))
554554 let prBalanceOld = getAccBalance(assetIdToString(priceAssetId))
555555 let outBalance = if (outInAmountAsset)
556556 then amBalanceOld
557557 else prBalanceOld
558558 let outBalanceBigInt = toBigInt(outBalance)
559559 let supplyBigInt = toBigInt(valueOrErrorMessage(assetInfo(lpAssetId), (("asset " + toBase58String(lpAssetId)) + " doesn't exist")).quantity)
560560 let redeemedBigInt = toBigInt(paymentAmount)
561561 let amountRaw = max([0, toInt(((balanceBigInt * (scale18 - pow((scale18 - ((redeemedBigInt * scale18) / supplyBigInt)), 18, big2, 0, 18, DOWN))) / scale18))])
562- let $t02659926649 = takeFee(amountRaw)
563- let totalAmount = $t02659926649._1
564- let feeAmount = $t02659926649._2
565- let $t02665326879 = if (outInAmountAsset)
562+ let $t02660026650 = takeFee(amountRaw)
563+ let totalAmount = $t02660026650._1
564+ let feeAmount = $t02660026650._2
565+ let $t02665426880 = if (outInAmountAsset)
566566 then $Tuple4(totalAmount, 0, (amBalanceOld - amountRaw), prBalanceOld)
567567 else $Tuple4(0, totalAmount, amBalanceOld, (prBalanceOld - amountRaw))
568- let outAmAmount = $t02665326879._1
569- let outPrAmount = $t02665326879._2
570- let amBalanceNew = $t02665326879._3
571- let prBalanceNew = $t02665326879._4
568+ let outAmAmount = $t02665426880._1
569+ let outPrAmount = $t02665426880._2
570+ let amBalanceNew = $t02665426880._3
571+ let prBalanceNew = $t02665426880._4
572572 let curPrX18 = calcPriceBigInt(toX18(prBalanceNew, prDecimals), toX18(amBalanceNew, amDecimals))
573573 let curPrice = fromX18(curPrX18, scale8)
574574 let commonState = if (isEval)
575575 then nil
576576 else [StringEntry(gau(toString(value(userAddress)), toBase58String(value(txId))), dataGetActionInfo(outAmAmount, outPrAmount, paymentAmount, curPrice, height, lastBlock.timestamp)), IntegerEntry(pl(), curPrice), IntegerEntry(ph(height, lastBlock.timestamp), curPrice)]
577577 let r = estimateGetOperation("", assetIdToString(lpAssetId), paymentAmount, this)
578578 let sumOfGetAssets = (r._1 + r._2)
579579 let bonus = if ((sumOfGetAssets == 0))
580580 then if ((totalAmount == 0))
581581 then 0
582582 else throwErr("bonus calculation error")
583583 else fraction((totalAmount - sumOfGetAssets), scale8, sumOfGetAssets)
584584 $Tuple4(totalAmount, commonState, feeAmount, bonus)
585585 }
586586 else throw("Strict value is not equal to itself.")
587587 }
588588
589589
590590 func managerPublicKeyOrUnit () = match getString(mpk()) {
591591 case s: String =>
592592 fromBase58String(s)
593593 case _: Unit =>
594594 unit
595595 case _ =>
596596 throw("Match error")
597597 }
598598
599599
600600 func pendingManagerPublicKeyOrUnit () = match getString(pmpk()) {
601601 case s: String =>
602602 fromBase58String(s)
603603 case _: Unit =>
604604 unit
605605 case _ =>
606606 throw("Match error")
607607 }
608608
609609
610610 func mustManager (i) = {
611611 let pd = throw("Permission denied")
612612 match managerPublicKeyOrUnit() {
613613 case pk: ByteVector =>
614614 if ((i.callerPublicKey == pk))
615615 then true
616616 else pd
617617 case _: Unit =>
618618 if ((i.caller == this))
619619 then true
620620 else pd
621621 case _ =>
622622 throw("Match error")
623623 }
624624 }
625625
626626
627627 @Callable(i)
628628 func setManager (pendingManagerPublicKey) = {
629629 let checkCaller = mustManager(i)
630630 if ((checkCaller == checkCaller))
631631 then {
632632 let checkManagerPublicKey = fromBase58String(pendingManagerPublicKey)
633633 if ((checkManagerPublicKey == checkManagerPublicKey))
634634 then [StringEntry(pmpk(), pendingManagerPublicKey)]
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 confirmManager () = {
644644 let pm = pendingManagerPublicKeyOrUnit()
645645 let hasPM = if (isDefined(pm))
646646 then true
647647 else throw("No pending manager")
648648 if ((hasPM == hasPM))
649649 then {
650650 let checkPM = if ((i.callerPublicKey == value(pm)))
651651 then true
652652 else throw("You are not pending manager")
653653 if ((checkPM == checkPM))
654654 then [StringEntry(mpk(), toBase58String(value(pm))), DeleteEntry(pmpk())]
655655 else throw("Strict value is not equal to itself.")
656656 }
657657 else throw("Strict value is not equal to itself.")
658658 }
659659
660660
661661
662662 @Callable(i)
663663 func put (slippageTolerance,shouldAutoStake) = if ((0 > slippageTolerance))
664664 then throw("Invalid slippageTolerance passed")
665665 else {
666666 let estPut = commonPut(i, slippageTolerance, true)
667667 let emitLpAmt = estPut._2
668668 let lpAssetId = estPut._7
669669 let state = estPut._9
670670 let amDiff = estPut._10
671671 let prDiff = estPut._11
672672 let amId = estPut._12
673673 let prId = estPut._13
674674 let emitInv = invoke(factoryContract, "emit", [emitLpAmt], nil)
675675 if ((emitInv == emitInv))
676676 then {
677677 let emitInvLegacy = match emitInv {
678678 case legacyFactoryContract: Address =>
679679 invoke(legacyFactoryContract, "emit", [emitLpAmt], nil)
680680 case _ =>
681681 unit
682682 }
683683 if ((emitInvLegacy == emitInvLegacy))
684684 then {
685685 let slippageAInv = if ((amDiff > 0))
686686 then invoke(slippageContract, "put", nil, [AttachedPayment(amId, amDiff)])
687687 else nil
688688 if ((slippageAInv == slippageAInv))
689689 then {
690690 let slippagePInv = if ((prDiff > 0))
691691 then invoke(slippageContract, "put", nil, [AttachedPayment(prId, prDiff)])
692692 else nil
693693 if ((slippagePInv == slippagePInv))
694694 then {
695695 let lpTransfer = if (shouldAutoStake)
696696 then {
697697 let slpStakeInv = invoke(stakingContract, "stake", nil, [AttachedPayment(lpAssetId, emitLpAmt)])
698698 if ((slpStakeInv == slpStakeInv))
699699 then nil
700700 else throw("Strict value is not equal to itself.")
701701 }
702702 else [ScriptTransfer(i.caller, emitLpAmt, lpAssetId)]
703703 (state ++ lpTransfer)
704704 }
705705 else throw("Strict value is not equal to itself.")
706706 }
707707 else throw("Strict value is not equal to itself.")
708708 }
709709 else throw("Strict value is not equal to itself.")
710710 }
711711 else throw("Strict value is not equal to itself.")
712712 }
713713
714714
715715
716716 @Callable(i)
717717 func putForFree (maxSlippage) = if ((0 > maxSlippage))
718718 then throw("Invalid value passed")
719719 else {
720720 let estPut = commonPut(i, maxSlippage, false)
721721 estPut._9
722722 }
723723
724724
725725
726726 @Callable(i)
727727 func putOneTkn (minOutAmount,autoStake) = {
728728 let isPutDisabled = if (if (isGlobalShutdown())
729729 then true
730730 else (cfgPoolStatus == PoolPutDisabled))
731731 then true
732732 else (cfgPoolStatus == PoolShutdown)
733733 let checks = [if (!(isPutDisabled))
734734 then true
735735 else throwErr("put operation is blocked by admin"), if ((size(i.payments) == 1))
736736 then true
737737 else throwErr("exactly 1 payment are expected")]
738738 if ((checks == checks))
739739 then {
740740 let payment = i.payments[0]
741741 let paymentAssetId = payment.assetId
742742 let paymentAmountRaw = payment.amount
743743 let userAddress = i.caller
744744 let txId = i.transactionId
745- let $t03134631473 = calcPutOneToken(paymentAmountRaw, paymentAssetId, userAddress, txId)
746- let emitAmountEstimated = $t03134631473._1
747- let commonState = $t03134631473._2
748- let feeAmount = $t03134631473._3
749- let bonus = $t03134631473._4
745+ let $t03134731474 = calcPutOneToken(paymentAmountRaw, paymentAssetId, userAddress, txId)
746+ let emitAmountEstimated = $t03134731474._1
747+ let commonState = $t03134731474._2
748+ let feeAmount = $t03134731474._3
749+ let bonus = $t03134731474._4
750750 let emitAmount = if (if ((minOutAmount > 0))
751751 then (minOutAmount > emitAmountEstimated)
752752 else false)
753753 then throwErr(makeString(["amount to receive is less than ", toString(minOutAmount)], ""))
754754 else emitAmountEstimated
755755 let emitInv = emit(emitAmount)
756756 if ((emitInv == emitInv))
757757 then {
758758 let lpTransfer = if (autoStake)
759759 then {
760760 let stakeInv = invoke(stakingContract, "stake", nil, [AttachedPayment(cfgLpAssetId, emitAmount)])
761761 if ((stakeInv == stakeInv))
762762 then nil
763763 else throw("Strict value is not equal to itself.")
764764 }
765765 else [ScriptTransfer(i.caller, emitAmount, cfgLpAssetId)]
766766 let sendFee = if ((feeAmount > 0))
767767 then [ScriptTransfer(feeCollectorAddress, feeAmount, paymentAssetId)]
768768 else nil
769769 $Tuple2(((commonState ++ lpTransfer) ++ sendFee), emitAmount)
770770 }
771771 else throw("Strict value is not equal to itself.")
772772 }
773773 else throw("Strict value is not equal to itself.")
774774 }
775775
776776
777777
778778 @Callable(i)
779779 func putOneTknREADONLY (paymentAssetId,paymentAmountRaw) = {
780- let $t03220232337 = calcPutOneToken(paymentAmountRaw, parseAssetId(paymentAssetId), unit, unit)
781- let emitAmountEstimated = $t03220232337._1
782- let commonState = $t03220232337._2
783- let feeAmount = $t03220232337._3
784- let bonus = $t03220232337._4
780+ let $t03220332338 = calcPutOneToken(paymentAmountRaw, parseAssetId(paymentAssetId), unit, unit)
781+ let emitAmountEstimated = $t03220332338._1
782+ let commonState = $t03220332338._2
783+ let feeAmount = $t03220332338._3
784+ let bonus = $t03220332338._4
785785 $Tuple2(nil, $Tuple3(emitAmountEstimated, feeAmount, bonus))
786786 }
787787
788788
789789
790790 @Callable(i)
791791 func getOneTkn (outAssetIdStr,minOutAmount) = {
792792 let isGetDisabled = if (isGlobalShutdown())
793793 then true
794794 else (cfgPoolStatus == PoolShutdown)
795795 let checks = [if (!(isGetDisabled))
796796 then true
797797 else throwErr("get operation is blocked by admin"), if ((size(i.payments) == 1))
798798 then true
799799 else throwErr("exactly 1 payment are expected")]
800800 if ((checks == checks))
801801 then {
802802 let outAssetId = parseAssetId(outAssetIdStr)
803803 let payment = i.payments[0]
804804 let paymentAssetId = payment.assetId
805805 let paymentAmount = payment.amount
806806 let userAddress = i.caller
807807 let txId = i.transactionId
808- let $t03292533057 = calcGetOneToken(outAssetId, paymentAmount, paymentAssetId, userAddress, txId)
809- let amountEstimated = $t03292533057._1
810- let commonState = $t03292533057._2
811- let feeAmount = $t03292533057._3
812- let bonus = $t03292533057._4
808+ let $t03292633058 = calcGetOneToken(outAssetId, paymentAmount, paymentAssetId, userAddress, txId)
809+ let amountEstimated = $t03292633058._1
810+ let commonState = $t03292633058._2
811+ let feeAmount = $t03292633058._3
812+ let bonus = $t03292633058._4
813813 let amount = if (if ((minOutAmount > 0))
814814 then (minOutAmount > amountEstimated)
815815 else false)
816816 then throwErr(makeString(["amount to receive is less than ", toString(minOutAmount)], ""))
817817 else amountEstimated
818818 let burnInv = invoke(factoryContract, "burn", [paymentAmount], [AttachedPayment(paymentAssetId, paymentAmount)])
819819 if ((burnInv == burnInv))
820820 then {
821821 let assetTransfer = [ScriptTransfer(userAddress, amount, outAssetId)]
822822 let sendFee = if ((feeAmount > 0))
823823 then [ScriptTransfer(feeCollectorAddress, feeAmount, outAssetId)]
824824 else nil
825825 $Tuple2(((commonState ++ assetTransfer) ++ sendFee), amount)
826826 }
827827 else throw("Strict value is not equal to itself.")
828828 }
829829 else throw("Strict value is not equal to itself.")
830830 }
831831
832832
833833
834834 @Callable(i)
835835 func getOneTknREADONLY (outAssetId,paymentAmount) = {
836- let $t03369233830 = calcGetOneToken(parseAssetId(outAssetId), paymentAmount, cfgLpAssetId, unit, unit)
837- let amountEstimated = $t03369233830._1
838- let commonState = $t03369233830._2
839- let feeAmount = $t03369233830._3
840- let bonus = $t03369233830._4
836+ let $t03369333831 = calcGetOneToken(parseAssetId(outAssetId), paymentAmount, cfgLpAssetId, unit, unit)
837+ let amountEstimated = $t03369333831._1
838+ let commonState = $t03369333831._2
839+ let feeAmount = $t03369333831._3
840+ let bonus = $t03369333831._4
841841 $Tuple2(nil, $Tuple3(amountEstimated, feeAmount, bonus))
842842 }
843843
844844
845845
846846 @Callable(i)
847847 func unstakeAndGetOneTkn (unstakeAmount,outAssetIdStr,minOutAmount) = {
848848 let isGetDisabled = if (isGlobalShutdown())
849849 then true
850850 else (cfgPoolStatus == PoolShutdown)
851851 let checks = [if (!(isGetDisabled))
852852 then true
853853 else throwErr("get operation is blocked by admin"), if ((size(i.payments) == 0))
854854 then true
855855 else throwErr("no payments are expected")]
856856 if ((checks == checks))
857857 then {
858858 let outAssetId = parseAssetId(outAssetIdStr)
859859 let unstakeInv = invoke(stakingContract, "unstake", [toBase58String(cfgLpAssetId), unstakeAmount], nil)
860860 if ((unstakeInv == unstakeInv))
861861 then {
862- let $t03438034503 = calcGetOneToken(outAssetId, unstakeAmount, cfgLpAssetId, unit, unit)
863- let amountEstimated = $t03438034503._1
864- let commonState = $t03438034503._2
865- let feeAmount = $t03438034503._3
866- let bonus = $t03438034503._4
862+ let $t03438134504 = calcGetOneToken(outAssetId, unstakeAmount, cfgLpAssetId, unit, unit)
863+ let amountEstimated = $t03438134504._1
864+ let commonState = $t03438134504._2
865+ let feeAmount = $t03438134504._3
866+ let bonus = $t03438134504._4
867867 let amount = if (if ((minOutAmount > 0))
868868 then (minOutAmount > amountEstimated)
869869 else false)
870870 then throwErr(makeString(["amount to receive is less than ", toString(minOutAmount)], ""))
871871 else amountEstimated
872872 let burnInv = invoke(factoryContract, "burn", [unstakeAmount], [AttachedPayment(cfgLpAssetId, unstakeAmount)])
873873 if ((burnInv == burnInv))
874874 then {
875875 let assetTransfer = [ScriptTransfer(i.caller, amount, outAssetId)]
876876 let sendFee = if ((feeAmount > 0))
877877 then [ScriptTransfer(feeCollectorAddress, feeAmount, outAssetId)]
878878 else nil
879879 $Tuple2(((commonState ++ assetTransfer) ++ sendFee), amount)
880880 }
881881 else throw("Strict value is not equal to itself.")
882882 }
883883 else throw("Strict value is not equal to itself.")
884884 }
885885 else throw("Strict value is not equal to itself.")
886886 }
887887
888888
889889
890890 @Callable(i)
891891 func get () = {
892892 let res = commonGet(i)
893893 let outAmtAmt = res._1
894894 let outPrAmt = res._2
895895 let pmtAmt = res._3
896896 let pmtAssetId = res._4
897897 let state = res._5
898898 let burnLPAssetOnFactory = invoke(factoryContract, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
899899 if ((burnLPAssetOnFactory == burnLPAssetOnFactory))
900900 then state
901901 else throw("Strict value is not equal to itself.")
902902 }
903903
904904
905905
906906 @Callable(i)
907907 func getNoLess (noLessThenAmtAsset,noLessThenPriceAsset) = {
908908 let res = commonGet(i)
909909 let outAmAmt = res._1
910910 let outPrAmt = res._2
911911 let pmtAmt = res._3
912912 let pmtAssetId = res._4
913913 let state = res._5
914914 if ((noLessThenAmtAsset > outAmAmt))
915915 then throw(((("noLessThenAmtAsset failed: " + toString(outAmAmt)) + " < ") + toString(noLessThenAmtAsset)))
916916 else if ((noLessThenPriceAsset > outPrAmt))
917917 then throw(((("noLessThenPriceAsset failed: " + toString(outPrAmt)) + " < ") + toString(noLessThenPriceAsset)))
918918 else {
919919 let burnLPAssetOnFactory = invoke(factoryContract, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
920920 if ((burnLPAssetOnFactory == burnLPAssetOnFactory))
921921 then state
922922 else throw("Strict value is not equal to itself.")
923923 }
924924 }
925925
926926
927927
928928 @Callable(i)
929929 func unstakeAndGet (amount) = {
930930 let checkPayments = if ((size(i.payments) != 0))
931931 then throw("No payments are expected")
932932 else true
933933 if ((checkPayments == checkPayments))
934934 then {
935935 let cfg = getPoolConfig()
936936 let lpAssetId = fromBase58String(cfg[idxPoolLPAssetId])
937937 let unstakeInv = invoke(stakingContract, "unstake", [toBase58String(lpAssetId), amount], nil)
938938 if ((unstakeInv == unstakeInv))
939939 then {
940940 let res = estimateGetOperation(toBase58String(i.transactionId), toBase58String(lpAssetId), amount, i.caller)
941941 let poolStatus = parseIntValue(res._9)
942942 let state = res._10
943943 let checkPoolStatus = if (if (isGlobalShutdown())
944944 then true
945945 else (poolStatus == PoolShutdown))
946946 then throw(("Get operation is blocked by admin. Status = " + toString(poolStatus)))
947947 else true
948948 if ((checkPoolStatus == checkPoolStatus))
949949 then {
950950 let burnLPAssetOnFactory = invoke(factoryContract, "burn", [amount], [AttachedPayment(lpAssetId, amount)])
951951 if ((burnLPAssetOnFactory == burnLPAssetOnFactory))
952952 then state
953953 else throw("Strict value is not equal to itself.")
954954 }
955955 else throw("Strict value is not equal to itself.")
956956 }
957957 else throw("Strict value is not equal to itself.")
958958 }
959959 else throw("Strict value is not equal to itself.")
960960 }
961961
962962
963963
964964 @Callable(i)
965965 func activate (amtAssetStr,priceAssetStr) = if ((toString(i.caller) != toString(factoryContract)))
966966 then throw("permissions denied")
967967 else $Tuple2([StringEntry(aa(), amtAssetStr), StringEntry(pa(), priceAssetStr)], "success")
968968
969969
970970
971971 @Callable(i)
972972 func getPoolConfigWrapperREADONLY () = $Tuple2(nil, getPoolConfig())
973973
974974
975975
976976 @Callable(i)
977977 func getAccBalanceWrapperREADONLY (assetId) = $Tuple2(nil, getAccBalance(assetId))
978978
979979
980980
981981 @Callable(i)
982982 func calcPricesWrapperREADONLY (amAmt,prAmt,lpAmt) = {
983983 let prices = calcPrices(amAmt, prAmt, lpAmt)
984984 $Tuple2(nil, [toString(prices[0]), toString(prices[1]), toString(prices[2])])
985985 }
986986
987987
988988
989989 @Callable(i)
990990 func toX18WrapperREADONLY (origVal,origScaleMult) = $Tuple2(nil, toString(toX18(origVal, origScaleMult)))
991991
992992
993993
994994 @Callable(i)
995995 func fromX18WrapperREADONLY (val,resultScaleMult) = $Tuple2(nil, fromX18(parseBigIntValue(val), resultScaleMult))
996996
997997
998998
999999 @Callable(i)
10001000 func calcPriceBigIntWrapperREADONLY (prAmtX18,amAmtX18) = $Tuple2(nil, toString(calcPriceBigInt(parseBigIntValue(prAmtX18), parseBigIntValue(amAmtX18))))
10011001
10021002
10031003
10041004 @Callable(i)
10051005 func estimatePutOperationWrapperREADONLY (txId58,slippageTolerance,inAmAssetAmt,inAmAssetId,inPrAssetAmt,inPrAssetId,userAddress,isEvaluate,emitLp) = $Tuple2(nil, estimatePutOperation(txId58, slippageTolerance, inAmAssetAmt, inAmAssetId, inPrAssetAmt, inPrAssetId, userAddress, isEvaluate, emitLp))
10061006
10071007
10081008
10091009 @Callable(i)
10101010 func estimateGetOperationWrapperREADONLY (txId58,pmtAssetId,pmtLpAmt,userAddress) = {
10111011 let res = estimateGetOperation(txId58, pmtAssetId, pmtLpAmt, addressFromStringValue(userAddress))
10121012 $Tuple2(nil, $Tuple10(res._1, res._2, res._3, res._4, res._5, res._6, res._7, toString(res._8), res._9, res._10))
10131013 }
10141014
10151015
10161016
10171017 @Callable(i)
10181018 func statsREADONLY () = {
10191019 let cfg = getPoolConfig()
10201020 let lpAssetId = fromBase58String(cfg[idxPoolLPAssetId])
10211021 let amtAssetId = cfg[idxAmtAssetId]
10221022 let priceAssetId = cfg[idxPriceAssetId]
10231023 let iAmtAssetId = cfg[idxIAmtAssetId]
10241024 let iPriceAssetId = cfg[idxIPriceAssetId]
10251025 let amtAssetDcm = parseIntValue(cfg[idxAmtAssetDcm])
10261026 let priceAssetDcm = parseIntValue(cfg[idxPriceAssetDcm])
10271027 let poolLPBalance = valueOrErrorMessage(assetInfo(lpAssetId), (("Asset " + toBase58String(lpAssetId)) + " doesn't exist")).quantity
10281028 let accAmtAssetBalance = getAccBalance(amtAssetId)
10291029 let accPriceAssetBalance = getAccBalance(priceAssetId)
10301030 let pricesList = if ((poolLPBalance == 0))
10311031 then [zeroBigInt, zeroBigInt, zeroBigInt]
10321032 else calcPrices(accAmtAssetBalance, accPriceAssetBalance, poolLPBalance)
10331033 let curPrice = 0
10341034 let lpAmtAssetShare = fromX18(pricesList[1], scale8)
10351035 let lpPriceAssetShare = fromX18(pricesList[2], scale8)
10361036 let poolWeight = value(getInteger(factoryContract, keyPoolWeight(toString(this))))
10371037 $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))
10381038 }
10391039
10401040
10411041
10421042 @Callable(i)
10431043 func evaluatePutByAmountAssetREADONLY (inAmAssetAmt) = {
10441044 let cfg = getPoolConfig()
10451045 let lpAssetId = fromBase58String(cfg[idxPoolLPAssetId])
10461046 let amAssetIdStr = cfg[idxAmtAssetId]
10471047 let amAssetId = fromBase58String(amAssetIdStr)
10481048 let prAssetIdStr = cfg[idxPriceAssetId]
10491049 let prAssetId = fromBase58String(prAssetIdStr)
10501050 let amtAssetDcm = parseIntValue(cfg[idxAmtAssetDcm])
10511051 let priceAssetDcm = parseIntValue(cfg[idxPriceAssetDcm])
10521052 let poolStatus = cfg[idxPoolStatus]
10531053 let poolLPBalance = valueOrErrorMessage(assetInfo(lpAssetId), (("Asset " + toBase58String(lpAssetId)) + " doesn't exist")).quantity
10541054 let accAmtAssetBalance = getAccBalance(amAssetIdStr)
10551055 let accPriceAssetBalance = getAccBalance(prAssetIdStr)
10561056 let amtAssetAmtX18 = toX18(accAmtAssetBalance, amtAssetDcm)
10571057 let priceAssetAmtX18 = toX18(accPriceAssetBalance, priceAssetDcm)
10581058 let curPriceX18 = if ((poolLPBalance == 0))
10591059 then zeroBigInt
10601060 else calcPriceBigInt(priceAssetAmtX18, amtAssetAmtX18)
10611061 let inAmAssetAmtX18 = toX18(inAmAssetAmt, amtAssetDcm)
10621062 let inPrAssetAmtX18 = fraction(inAmAssetAmtX18, curPriceX18, scale18)
10631063 let inPrAssetAmt = fromX18(inPrAssetAmtX18, priceAssetDcm)
10641064 let estPut = estimatePutOperation("", 500000, inAmAssetAmt, amAssetId, inPrAssetAmt, prAssetId, "", true, false)
10651065 let calcLpAmt = estPut._1
10661066 let curPriceCalc = estPut._3
10671067 let amBalance = estPut._4
10681068 let prBalance = estPut._5
10691069 let lpEmission = estPut._6
10701070 $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))
10711071 }
10721072
10731073
10741074
10751075 @Callable(i)
10761076 func evaluatePutByPriceAssetREADONLY (inPrAssetAmt) = {
10771077 let cfg = getPoolConfig()
10781078 let lpAssetId = fromBase58String(cfg[idxPoolLPAssetId])
10791079 let amAssetIdStr = cfg[idxAmtAssetId]
10801080 let amAssetId = fromBase58String(amAssetIdStr)
10811081 let prAssetIdStr = cfg[idxPriceAssetId]
10821082 let prAssetId = fromBase58String(prAssetIdStr)
10831083 let amtAssetDcm = parseIntValue(cfg[idxAmtAssetDcm])
10841084 let priceAssetDcm = parseIntValue(cfg[idxPriceAssetDcm])
10851085 let poolStatus = cfg[idxPoolStatus]
10861086 let poolLPBalance = valueOrErrorMessage(assetInfo(lpAssetId), (("Asset " + toBase58String(lpAssetId)) + " doesn't exist")).quantity
10871087 let amBalanceRaw = getAccBalance(amAssetIdStr)
10881088 let prBalanceRaw = getAccBalance(prAssetIdStr)
10891089 let amBalanceRawX18 = toX18(amBalanceRaw, amtAssetDcm)
10901090 let prBalanceRawX18 = toX18(prBalanceRaw, priceAssetDcm)
10911091 let curPriceX18 = if ((poolLPBalance == 0))
10921092 then zeroBigInt
10931093 else calcPriceBigInt(prBalanceRawX18, amBalanceRawX18)
10941094 let inPrAssetAmtX18 = toX18(inPrAssetAmt, priceAssetDcm)
10951095 let inAmAssetAmtX18 = fraction(inPrAssetAmtX18, scale18, curPriceX18)
10961096 let inAmAssetAmt = fromX18(inAmAssetAmtX18, amtAssetDcm)
10971097 let estPut = estimatePutOperation("", 500000, inAmAssetAmt, amAssetId, inPrAssetAmt, prAssetId, "", true, false)
10981098 let calcLpAmt = estPut._1
10991099 let curPriceCalc = estPut._3
11001100 let amBalance = estPut._4
11011101 let prBalance = estPut._5
11021102 let lpEmission = estPut._6
11031103 $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))
11041104 }
11051105
11061106
11071107
11081108 @Callable(i)
11091109 func evaluateGetREADONLY (paymentLpAssetId,paymentLpAmt) = {
11101110 let res = estimateGetOperation("", paymentLpAssetId, paymentLpAmt, this)
11111111 let outAmAmt = res._1
11121112 let outPrAmt = res._2
11131113 let amBalance = res._5
11141114 let prBalance = res._6
11151115 let lpEmission = res._7
11161116 let curPrice = res._8
11171117 let poolStatus = parseIntValue(res._9)
11181118 $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))
11191119 }
11201120
11211121
11221122 @Verifier(tx)
11231123 func verify () = {
11241124 let targetPublicKey = match managerPublicKeyOrUnit() {
11251125 case pk: ByteVector =>
11261126 pk
11271127 case _: Unit =>
11281128 tx.senderPublicKey
11291129 case _ =>
11301130 throw("Match error")
11311131 }
11321132 match tx {
11331133 case order: Order =>
11341134 let matcherPub = getMatcherPubOrFail()
11351135 let orderValid = validateMatcherOrderAllowed(order)
11361136 let senderValid = sigVerify(order.bodyBytes, order.proofs[0], order.senderPublicKey)
11371137 let matcherValid = sigVerify(order.bodyBytes, order.proofs[1], matcherPub)
11381138 if (if (if (orderValid)
11391139 then senderValid
11401140 else false)
11411141 then matcherValid
11421142 else false)
11431143 then true
11441144 else throwOrderError(orderValid, senderValid, matcherValid)
11451145 case s: SetScriptTransaction =>
11461146 let newHash = blake2b256(value(s.script))
11471147 let allowedHash = fromBase64String(value(getString(factoryContract, keyAllowedLpScriptHash())))
11481148 let currentHash = scriptHash(this)
11491149 if (if ((allowedHash == newHash))
11501150 then (currentHash != newHash)
11511151 else false)
11521152 then true
11531153 else sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey)
11541154 case _ =>
11551155 sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey)
11561156 }
11571157 }
11581158

github/deemru/w8io/026f985 
126.56 ms