tx · 2ayYC1B9HcySGdpJdeqK5BvqjZgbhcBdgvramWMAFTqh

3MzKSdTH2jFbypLsoNfrH7QgkzSbx3EYwCA:  -0.03100000 Waves

2022.11.07 10:38 [2306431] smart account 3MzKSdTH2jFbypLsoNfrH7QgkzSbx3EYwCA > SELF 0.00000000 Waves

{ "type": 13, "id": "2ayYC1B9HcySGdpJdeqK5BvqjZgbhcBdgvramWMAFTqh", "fee": 3100000, "feeAssetId": null, "timestamp": 1667806676154, "version": 1, "sender": "3MzKSdTH2jFbypLsoNfrH7QgkzSbx3EYwCA", "senderPublicKey": "35yd3qw1gxKDxKwGAykHN9fANbXNWwseaUwbWDj24o3x", "proofs": [ "3XBCXJ7nQCceSm5TVcYvmfW47NGEh7GhP2o13sNn9r8Dm7y9RLyQ4jguSJraDeUb5hSZ26w7gEpf5288HEhAoYxx" ], "script": "base64:BgKWIggCEgMKAQgSAwoBCBIAEgQKAgEEEgQKAgEEEgMKAQESABIECgIIARIECgIIARIECgIIARIECgIBARIDCgEBEgUKAwEBARIFCgMBCAESBAoCAQgSBAoCAQgSBAoCCAgSBAoCCAgSBAoCCAESABIDCgEIEgUKAwEBARIECgIIARIECgIBARIECgIICBILCgkIAQECAQIIBAQSBgoECAgBCBIAIgZzY2FsZTgiDHNjYWxlOEJpZ0ludCIHc2NhbGUxOCIKemVyb0JpZ0ludCIEYmlnMCIEYmlnMSIEYmlnMiIKc2xpcHBhZ2U0RCILd2F2ZXNTdHJpbmciBUFtdWx0IgVEY29udiIDU0VQIgVFTVBUWSIKUG9vbEFjdGl2ZSIKUG9vbFB1dERpcyIOUG9vbE1hdGNoZXJEaXMiDFBvb2xTaHV0ZG93biIOaWR4UG9vbEFkZHJlc3MiCWlkeFBvb2xTdCIJaWR4TFBBc0lkIglpZHhBbUFzSWQiCWlkeFByQXNJZCILaWR4QW10QXNEY20iDWlkeFByaWNlQXNEY20iC2lkeElBbXRBc0lkIg1pZHhJUHJpY2VBc0lkIg9pZHhGYWN0U3Rha0N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compacted Prev: 9pErnrZKdPdxrFXJLyUNtJawXPMFszYnNWf3zh8y5JnH Next: 9ENMVh8GQkMBTT5heFtv4hVnwzyxmc8Ab7giNzcQYduS Diff:
OldNewDifferences
6161
6262 let idxFactGwxRewCntr = 10
6363
64-let feeDefault = fraction(50, scale8, 10000)
64+let feeDefault = fraction(10, scale8, 10000)
6565
6666 func t1 (origVal,origScaleMult) = fraction(toBigInt(origVal), scale18, toBigInt(origScaleMult))
6767
11251125
11261126
11271127 @Callable(i)
1128+func unstakeAndGetNoLess (unstakeAmount,noLessThenAmountAsset,noLessThenPriceAsset) = {
1129+ let isGetDisabled = if (igs())
1130+ then true
1131+ else (cfgPoolStatus == PoolShutdown)
1132+ let checks = [if (!(isGetDisabled))
1133+ then true
1134+ else throw("get operation is blocked by admin"), if ((size(i.payments) == 0))
1135+ then true
1136+ else throw("no payments are expected")]
1137+ if ((checks == checks))
1138+ then {
1139+ let unstakeInv = invoke(stakingContract, "unstake", [toBase58String(cfgLpAssetId), unstakeAmount], nil)
1140+ if ((unstakeInv == unstakeInv))
1141+ then {
1142+ let res = ego(toBase58String(i.transactionId), toBase58String(cfgLpAssetId), unstakeAmount, i.caller)
1143+ let outAmAmt = res._1
1144+ let outPrAmt = res._2
1145+ let state = res._10
1146+ let checkAmounts = [if ((outAmAmt >= noLessThenAmountAsset))
1147+ then true
1148+ else throw(makeString(["amount asset amount to receive is less than ", toString(noLessThenAmountAsset)], "")), if ((outPrAmt >= noLessThenPriceAsset))
1149+ then true
1150+ else throw(makeString(["price asset amount to receive is less than ", toString(noLessThenPriceAsset)], ""))]
1151+ if ((checkAmounts == checkAmounts))
1152+ then {
1153+ let burnLPAssetOnFactory = invoke(fca, "burn", [unstakeAmount], [AttachedPayment(cfgLpAssetId, unstakeAmount)])
1154+ if ((burnLPAssetOnFactory == burnLPAssetOnFactory))
1155+ then state
1156+ else throw("Strict value is not equal to itself.")
1157+ }
1158+ else throw("Strict value is not equal to itself.")
1159+ }
1160+ else throw("Strict value is not equal to itself.")
1161+ }
1162+ else throw("Strict value is not equal to itself.")
1163+ }
1164+
1165+
1166+
1167+@Callable(i)
11281168 func unstakeAndGetOneTknV2 (unstakeAmount,outAssetId,minOutAmount) = {
11291169 let isPoolOneTokenOperationsDisabled = {
11301170 let @ = invoke(fca, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
11511191 let unstakeInv = invoke(staking, "unstake", [toBase58String(lpAssetId), unstakeAmount], nil)
11521192 if ((unstakeInv == unstakeInv))
11531193 then {
1154- let $t04009940287 = getOneTknV2Internal(outAssetId, minOutAmount, [AttachedPayment(lpAssetId, unstakeAmount)], i.caller, i.originCaller, i.transactionId)
1155- let state = $t04009940287._1
1156- let totalAmount = $t04009940287._2
1194+ let $t04117241360 = getOneTknV2Internal(outAssetId, minOutAmount, [AttachedPayment(lpAssetId, unstakeAmount)], i.caller, i.originCaller, i.transactionId)
1195+ let state = $t04117241360._1
1196+ let totalAmount = $t04117241360._2
11571197 $Tuple2(state, totalAmount)
11581198 }
11591199 else throw("Strict value is not equal to itself.")
11691209 let amId = poolConfig[idxAmAsId]
11701210 let prId = poolConfig[idxPrAsId]
11711211 let lpId = poolConfig[idxLPAsId]
1172- let $t04054640649 = calcPutOneTkn(paymentAmountRaw, paymentAssetId, "", "", true)
1173- let lpAmount = $t04054640649._1
1174- let state = $t04054640649._2
1175- let feeAmount = $t04054640649._3
1176- let bonus = $t04054640649._4
1212+ let $t04161941722 = calcPutOneTkn(paymentAmountRaw, paymentAssetId, "", "", true)
1213+ let lpAmount = $t04161941722._1
1214+ let state = $t04161941722._2
1215+ let feeAmount = $t04161941722._3
1216+ let bonus = $t04161941722._4
11771217 $Tuple2(nil, $Tuple3(lpAmount, feeAmount, bonus))
11781218 }
11791219
11851225 let amId = poolConfig[idxAmAsId]
11861226 let prId = poolConfig[idxPrAsId]
11871227 let lpId = poolConfig[idxLPAsId]
1188- let $t04092841032 = calcPutOneTkn(paymentAmountRaw, paymentAssetId, "", "", false)
1189- let lpAmount = $t04092841032._1
1190- let state = $t04092841032._2
1191- let feeAmount = $t04092841032._3
1192- let bonus = $t04092841032._4
1228+ let $t04200142105 = calcPutOneTkn(paymentAmountRaw, paymentAssetId, "", "", false)
1229+ let lpAmount = $t04200142105._1
1230+ let state = $t04200142105._2
1231+ let feeAmount = $t04200142105._3
1232+ let bonus = $t04200142105._4
11931233 $Tuple2(nil, $Tuple3(lpAmount, feeAmount, bonus))
11941234 }
11951235
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let scale8 = 100000000
55
66 let scale8BigInt = toBigInt(100000000)
77
88 let scale18 = toBigInt(1000000000000000000)
99
1010 let zeroBigInt = toBigInt(0)
1111
1212 let big0 = toBigInt(0)
1313
1414 let big1 = toBigInt(1)
1515
1616 let big2 = toBigInt(2)
1717
1818 let slippage4D = toBigInt((scale8 - ((scale8 * 1) / scale8)))
1919
2020 let wavesString = "WAVES"
2121
2222 let Amult = "100"
2323
2424 let Dconv = "1"
2525
2626 let SEP = "__"
2727
2828 let EMPTY = ""
2929
3030 let PoolActive = 1
3131
3232 let PoolPutDis = 2
3333
3434 let PoolMatcherDis = 3
3535
3636 let PoolShutdown = 4
3737
3838 let idxPoolAddress = 1
3939
4040 let idxPoolSt = 2
4141
4242 let idxLPAsId = 3
4343
4444 let idxAmAsId = 4
4545
4646 let idxPrAsId = 5
4747
4848 let idxAmtAsDcm = 6
4949
5050 let idxPriceAsDcm = 7
5151
5252 let idxIAmtAsId = 8
5353
5454 let idxIPriceAsId = 9
5555
5656 let idxFactStakCntr = 1
5757
5858 let idxFactoryRestCntr = 6
5959
6060 let idxFactSlippCntr = 7
6161
6262 let idxFactGwxRewCntr = 10
6363
64-let feeDefault = fraction(50, scale8, 10000)
64+let feeDefault = fraction(10, scale8, 10000)
6565
6666 func t1 (origVal,origScaleMult) = fraction(toBigInt(origVal), scale18, toBigInt(origScaleMult))
6767
6868
6969 func f1 (val,resultScaleMult) = toInt(fraction(val, toBigInt(resultScaleMult), scale18))
7070
7171
7272 func ts (amt,resScale,curScale) = fraction(amt, resScale, curScale)
7373
7474
7575 func abs (val) = if ((zeroBigInt > val))
7676 then -(val)
7777 else val
7878
7979
8080 func absBigInt (val) = if ((zeroBigInt > val))
8181 then -(val)
8282 else val
8383
8484
8585 func fc () = "%s__factoryContract"
8686
8787
8888 func mpk () = "%s__managerPublicKey"
8989
9090
9191 func pmpk () = "%s__pendingManagerPublicKey"
9292
9393
9494 func pl () = "%s%s__price__last"
9595
9696
9797 func ph (h,t) = makeString(["%s%s%d%d__price__history", toString(h), toString(t)], SEP)
9898
9999
100100 func pau (ua,txId) = ((("%s%s%s__P__" + ua) + "__") + txId)
101101
102102
103103 func gau (ua,txId) = ((("%s%s%s__G__" + ua) + "__") + txId)
104104
105105
106106 func aa () = "%s__amountAsset"
107107
108108
109109 func pa () = "%s__priceAsset"
110110
111111
112112 func amp () = "%s__amp"
113113
114114
115115 func ada () = "%s__addonAddr"
116116
117117
118118 let keyFee = "%s__fee"
119119
120120 let fee = valueOrElse(getInteger(this, keyFee), feeDefault)
121121
122122 func fcfg () = "%s__factoryConfig"
123123
124124
125125 func mtpk () = "%s%s__matcher__publicKey"
126126
127127
128128 func pc (iAmtAs,iPrAs) = (((("%d%d%s__" + iAmtAs) + "__") + iPrAs) + "__config")
129129
130130
131131 func mba (bAStr) = ("%s%s%s__mappings__baseAsset2internalId__" + bAStr)
132132
133133
134134 func aps () = "%s__shutdown"
135135
136136
137137 func keyAllowedLpStableScriptHash () = "%s__allowedLpStableScriptHash"
138138
139139
140140 func keyFeeCollectorAddress () = "%s__feeCollectorAddress"
141141
142142
143143 func toe (orV,sendrV,matchV) = throw(((((("Failed: ordValid=" + toString(orV)) + " sndrValid=") + toString(sendrV)) + " mtchrValid=") + toString(matchV)))
144144
145145
146146 func str (val) = match val {
147147 case valStr: String =>
148148 valStr
149149 case _ =>
150150 throw("fail cast to String")
151151 }
152152
153153
154154 func strf (addr,key) = valueOrErrorMessage(getString(addr, key), makeString(["mandatory ", toString(addr), ".", key, " not defined"], ""))
155155
156156
157157 func intf (addr,key) = valueOrErrorMessage(getInteger(addr, key), makeString(["mandatory ", toString(addr), ".", key, " not defined"], ""))
158158
159159
160160 func throwErr (msg) = throw(makeString(["lp_stable.ride:", msg], " "))
161161
162162
163163 let fca = addressFromStringValue(strf(this, fc()))
164164
165165 let A = strf(this, amp())
166166
167167 func igs () = valueOrElse(getBoolean(fca, aps()), false)
168168
169169
170170 func mp () = fromBase58String(strf(fca, mtpk()))
171171
172172
173173 let feeCollectorAddress = addressFromStringValue(strf(fca, keyFeeCollectorAddress()))
174174
175175 func gpc () = {
176176 let amtAs = strf(this, aa())
177177 let priceAs = strf(this, pa())
178178 let iPriceAs = intf(fca, mba(priceAs))
179179 let iAmtAs = intf(fca, mba(amtAs))
180180 split(strf(fca, pc(toString(iAmtAs), toString(iPriceAs))), SEP)
181181 }
182182
183183
184184 func parseAssetId (input) = if ((input == wavesString))
185185 then unit
186186 else fromBase58String(input)
187187
188188
189189 func assetIdToString (input) = if ((input == unit))
190190 then wavesString
191191 else toBase58String(value(input))
192192
193193
194194 func parsePoolConfig (poolConfig) = $Tuple7(addressFromStringValue(poolConfig[idxPoolAddress]), parseIntValue(poolConfig[idxPoolSt]), fromBase58String(poolConfig[idxLPAsId]), parseAssetId(poolConfig[idxAmAsId]), parseAssetId(poolConfig[idxPrAsId]), parseIntValue(poolConfig[idxAmtAsDcm]), parseIntValue(poolConfig[idxPriceAsDcm]))
195195
196196
197197 let poolConfigParsed = parsePoolConfig(gpc())
198198
199199 let $t068307016 = poolConfigParsed
200200
201201 let cfgPoolAddress = $t068307016._1
202202
203203 let cfgPoolStatus = $t068307016._2
204204
205205 let cfgLpAssetId = $t068307016._3
206206
207207 let cfgAmountAssetId = $t068307016._4
208208
209209 let cfgPriceAssetId = $t068307016._5
210210
211211 let cfgAmountAssetDecimals = $t068307016._6
212212
213213 let cfgPriceAssetDecimals = $t068307016._7
214214
215215 func gfc () = split(strf(fca, fcfg()), SEP)
216216
217217
218218 let factoryConfig = gfc()
219219
220220 let stakingContract = valueOrErrorMessage(addressFromString(factoryConfig[idxFactStakCntr]), "Invalid staking contract address")
221221
222222 let slipageContract = valueOrErrorMessage(addressFromString(factoryConfig[idxFactSlippCntr]), "Invalid slipage contract address")
223223
224224 let gwxContract = valueOrErrorMessage(addressFromString(factoryConfig[idxFactGwxRewCntr]), "Invalid gwx contract address")
225225
226226 let restContract = valueOrErrorMessage(addressFromString(factoryConfig[idxFactoryRestCntr]), "Invalid gwx contract address")
227227
228228 func dataPutActionInfo (inAmtAssetAmt,inPriceAssetAmt,outLpAmt,price,slipByUser,slippageReal,txHeight,txTimestamp,slipageAmAmt,slipagePrAmt) = makeString(["%d%d%d%d%d%d%d%d%d%d", toString(inAmtAssetAmt), toString(inPriceAssetAmt), toString(outLpAmt), toString(price), toString(slipByUser), toString(slippageReal), toString(txHeight), toString(txTimestamp), toString(slipageAmAmt), toString(slipagePrAmt)], SEP)
229229
230230
231231 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)
232232
233233
234234 func getAccBalance (assetId) = if ((assetId == "WAVES"))
235235 then wavesBalance(this).available
236236 else assetBalance(this, fromBase58String(assetId))
237237
238238
239239 func cpbi (prAmtX18,amAmtX18) = fraction(prAmtX18, scale18, amAmtX18)
240240
241241
242242 func vad (A1,A2,slippage) = {
243243 let diff = fraction((A1 - A2), scale8BigInt, A2)
244244 let pass = ((slippage - abs(diff)) > zeroBigInt)
245245 if (!(pass))
246246 then throw(("Big slpg: " + toString(diff)))
247247 else $Tuple2(pass, min([A1, A2]))
248248 }
249249
250250
251251 func vd (D1,D0,slpg) = {
252252 let diff = fraction(D0, scale8BigInt, D1)
253253 let fail = (slpg > diff)
254254 if (if (fail)
255255 then true
256256 else (D0 > D1))
257257 then throw(((((((toString(D0) + " ") + toString(D1)) + " ") + toString(diff)) + " ") + toString(slpg)))
258258 else fail
259259 }
260260
261261
262262 func pcp (amAssetDcm,prAssetDcm,amAmt,prAmt) = {
263263 let amtAsAmtX18 = t1(amAmt, amAssetDcm)
264264 let prAsAmtX18 = t1(prAmt, prAssetDcm)
265265 cpbi(prAsAmtX18, amtAsAmtX18)
266266 }
267267
268268
269269 func calcPrices (amAmt,prAmt,lpAmt) = {
270270 let cfg = gpc()
271271 let amtAsDcm = parseIntValue(cfg[idxAmtAsDcm])
272272 let prAsDcm = parseIntValue(cfg[idxPriceAsDcm])
273273 let priceX18 = pcp(amtAsDcm, prAsDcm, amAmt, prAmt)
274274 let amAmtX18 = t1(amAmt, amtAsDcm)
275275 let prAmtX18 = t1(prAmt, prAsDcm)
276276 let lpAmtX18 = t1(lpAmt, scale8)
277277 let lpPrInAmAsX18 = cpbi(amAmtX18, lpAmtX18)
278278 let lpPrInPrAsX18 = cpbi(prAmtX18, lpAmtX18)
279279 [priceX18, lpPrInAmAsX18, lpPrInPrAsX18]
280280 }
281281
282282
283283 func calculatePrices (amAmt,prAmt,lpAmt) = {
284284 let p = calcPrices(amAmt, prAmt, lpAmt)
285285 [f1(p[0], scale8), f1(p[1], scale8), f1(p[2], scale8)]
286286 }
287287
288288
289289 func takeFee (amount) = {
290290 let feeAmount = fraction(amount, fee, scale8)
291291 $Tuple2((amount - feeAmount), feeAmount)
292292 }
293293
294294
295295 func ego (txId58,pmtAssetId,pmtLpAmt,userAddress) = {
296296 let cfg = gpc()
297297 let lpId = cfg[idxLPAsId]
298298 let amId = cfg[idxAmAsId]
299299 let prId = cfg[idxPrAsId]
300300 let amDcm = parseIntValue(cfg[idxAmtAsDcm])
301301 let prDcm = parseIntValue(cfg[idxPriceAsDcm])
302302 let sts = cfg[idxPoolSt]
303303 let lpEmiss = valueOrErrorMessage(assetInfo(fromBase58String(lpId)), "Wrong LP id").quantity
304304 if ((lpId != pmtAssetId))
305305 then throw("Wrong pmt asset")
306306 else {
307307 let amBalance = getAccBalance(amId)
308308 let amBalanceX18 = t1(amBalance, amDcm)
309309 let prBalance = getAccBalance(prId)
310310 let prBalanceX18 = t1(prBalance, prDcm)
311311 let curPriceX18 = cpbi(prBalanceX18, amBalanceX18)
312312 let curPrice = f1(curPriceX18, scale8)
313313 let pmtLpAmtX18 = t1(pmtLpAmt, scale8)
314314 let lpEmissX18 = t1(lpEmiss, scale8)
315315 let outAmAmtX18 = fraction(amBalanceX18, pmtLpAmtX18, lpEmissX18)
316316 let outPrAmtX18 = fraction(prBalanceX18, pmtLpAmtX18, lpEmissX18)
317317 let outAmAmt = f1(outAmAmtX18, amDcm)
318318 let outPrAmt = f1(outPrAmtX18, prDcm)
319319 let state = if ((txId58 == ""))
320320 then nil
321321 else [ScriptTransfer(userAddress, outAmAmt, if ((amId == "WAVES"))
322322 then unit
323323 else fromBase58String(amId)), ScriptTransfer(userAddress, outPrAmt, if ((prId == "WAVES"))
324324 then unit
325325 else fromBase58String(prId)), StringEntry(gau(toString(userAddress), txId58), dataGetActionInfo(outAmAmt, outPrAmt, pmtLpAmt, curPrice, height, lastBlock.timestamp)), IntegerEntry(pl(), curPrice), IntegerEntry(ph(height, lastBlock.timestamp), curPrice)]
326326 $Tuple10(outAmAmt, outPrAmt, amId, prId, amBalance, prBalance, lpEmiss, curPriceX18, sts, state)
327327 }
328328 }
329329
330330
331331 func epo (txId58,slippage,inAmAmt,inAmId,inPrAmt,inPrId,userAddress,isEval,emitLp,isOneAsset,validateSlippage,pmtAmt,pmtId) = {
332332 let cfg = gpc()
333333 let lpId = fromBase58String(cfg[idxLPAsId])
334334 let amIdStr = cfg[idxAmAsId]
335335 let prIdStr = cfg[idxPrAsId]
336336 let inAmIdStr = cfg[idxIAmtAsId]
337337 let inPrIdStr = cfg[idxIPriceAsId]
338338 let amtDcm = parseIntValue(cfg[idxAmtAsDcm])
339339 let priceDcm = parseIntValue(cfg[idxPriceAsDcm])
340340 let sts = cfg[idxPoolSt]
341341 let lpEm = valueOrErrorMessage(assetInfo(lpId), "Wr lp as").quantity
342342 let amBalance = if (isEval)
343343 then getAccBalance(amIdStr)
344344 else if (if (isOneAsset)
345345 then (pmtId == amIdStr)
346346 else false)
347347 then (getAccBalance(amIdStr) - pmtAmt)
348348 else if (isOneAsset)
349349 then getAccBalance(amIdStr)
350350 else (getAccBalance(amIdStr) - inAmAmt)
351351 let prBalance = if (isEval)
352352 then getAccBalance(prIdStr)
353353 else if (if (isOneAsset)
354354 then (pmtId == prIdStr)
355355 else false)
356356 then (getAccBalance(prIdStr) - pmtAmt)
357357 else if (isOneAsset)
358358 then getAccBalance(prIdStr)
359359 else (getAccBalance(prIdStr) - inPrAmt)
360360 let inAmAssetAmtX18 = t1(inAmAmt, amtDcm)
361361 let inPrAssetAmtX18 = t1(inPrAmt, priceDcm)
362362 let userPriceX18 = cpbi(inPrAssetAmtX18, inAmAssetAmtX18)
363363 let amBalanceX18 = t1(amBalance, amtDcm)
364364 let prBalanceX18 = t1(prBalance, priceDcm)
365365 let r = if ((lpEm == 0))
366366 then {
367367 let curPriceX18 = zeroBigInt
368368 let slippageX18 = zeroBigInt
369369 let lpAmtX18 = pow((inAmAssetAmtX18 * inPrAssetAmtX18), 0, toBigInt(5), 1, 0, DOWN)
370370 $Tuple5(f1(lpAmtX18, scale8), f1(inAmAssetAmtX18, amtDcm), f1(inPrAssetAmtX18, priceDcm), cpbi((prBalanceX18 + inPrAssetAmtX18), (amBalanceX18 + inAmAssetAmtX18)), slippageX18)
371371 }
372372 else {
373373 let curPriceX18 = cpbi(prBalanceX18, amBalanceX18)
374374 let slippageRealX18 = fraction(abs((curPriceX18 - userPriceX18)), scale18, curPriceX18)
375375 let slippageX18 = t1(slippage, scale8)
376376 if (if (if (validateSlippage)
377377 then (curPriceX18 != zeroBigInt)
378378 else false)
379379 then (slippageRealX18 > slippageX18)
380380 else false)
381381 then throw(((("Price slippage " + toString(slippageRealX18)) + " > ") + toString(slippageX18)))
382382 else {
383383 let lpEmissionX18 = t1(lpEm, scale8)
384384 let prViaAmX18 = fraction(inAmAssetAmtX18, curPriceX18, scale18)
385385 let amViaPrX18 = fraction(inPrAssetAmtX18, scale18, curPriceX18)
386386 let expectedAmts = if ((prViaAmX18 > inPrAssetAmtX18))
387387 then $Tuple2(amViaPrX18, inPrAssetAmtX18)
388388 else $Tuple2(inAmAssetAmtX18, prViaAmX18)
389389 let expAmtAssetAmtX18 = expectedAmts._1
390390 let expPriceAssetAmtX18 = expectedAmts._2
391391 let lpAmtX18 = fraction(lpEmissionX18, expPriceAssetAmtX18, prBalanceX18)
392392 $Tuple5(f1(lpAmtX18, scale8), f1(expAmtAssetAmtX18, amtDcm), f1(expPriceAssetAmtX18, priceDcm), curPriceX18, slippageX18)
393393 }
394394 }
395395 let calcLpAmt = r._1
396396 let calcAmAssetPmt = r._2
397397 let calcPrAssetPmt = r._3
398398 let curPrice = f1(r._4, scale8)
399399 let slippageCalc = f1(r._5, scale8)
400400 if ((0 >= calcLpAmt))
401401 then throw("LP <= 0")
402402 else {
403403 let emitLpAmt = if (!(emitLp))
404404 then 0
405405 else calcLpAmt
406406 let amDiff = (inAmAmt - calcAmAssetPmt)
407407 let prDiff = (inPrAmt - calcPrAssetPmt)
408408 let $t01744717792 = if (if (isOneAsset)
409409 then (pmtId == amIdStr)
410410 else false)
411411 then $Tuple2(pmtAmt, 0)
412412 else if (if (isOneAsset)
413413 then (pmtId == prIdStr)
414414 else false)
415415 then $Tuple2(0, pmtAmt)
416416 else $Tuple2(calcAmAssetPmt, calcPrAssetPmt)
417417 let writeAmAmt = $t01744717792._1
418418 let writePrAmt = $t01744717792._2
419419 let commonState = [IntegerEntry(pl(), curPrice), IntegerEntry(ph(height, lastBlock.timestamp), curPrice), StringEntry(pau(userAddress, txId58), dataPutActionInfo(writeAmAmt, writePrAmt, emitLpAmt, curPrice, slippage, slippageCalc, height, lastBlock.timestamp, amDiff, prDiff))]
420420 $Tuple13(calcLpAmt, emitLpAmt, curPrice, amBalance, prBalance, lpEm, lpId, sts, commonState, amDiff, prDiff, inAmId, inPrId)
421421 }
422422 }
423423
424424
425425 func moa (order) = {
426426 let cfg = gpc()
427427 let amtAsId = cfg[idxAmAsId]
428428 let prAsId = cfg[idxPrAsId]
429429 let sts = parseIntValue(cfg[idxPoolSt])
430430 let amtAsDcm = parseIntValue(cfg[idxAmtAsDcm])
431431 let prAsDcm = parseIntValue(cfg[idxPriceAsDcm])
432432 let accAmtAsBalance = getAccBalance(amtAsId)
433433 let accPrAsBalance = getAccBalance(prAsId)
434434 let curPriceX18 = if ((order.orderType == Buy))
435435 then pcp(amtAsDcm, prAsDcm, (accAmtAsBalance + order.amount), accPrAsBalance)
436436 else pcp(amtAsDcm, prAsDcm, (accAmtAsBalance - order.amount), accPrAsBalance)
437437 let curPrice = f1(curPriceX18, scale8)
438438 if (if (if (igs())
439439 then true
440440 else (sts == PoolMatcherDis))
441441 then true
442442 else (sts == PoolShutdown))
443443 then throw("Admin blocked")
444444 else {
445445 let orAmtAsset = order.assetPair.amountAsset
446446 let orAmtAsStr = if ((orAmtAsset == unit))
447447 then "WAVES"
448448 else toBase58String(value(orAmtAsset))
449449 let orPrAsset = order.assetPair.priceAsset
450450 let orPrAsStr = if ((orPrAsset == unit))
451451 then "WAVES"
452452 else toBase58String(value(orPrAsset))
453453 if (if ((orAmtAsStr != amtAsId))
454454 then true
455455 else (orPrAsStr != prAsId))
456456 then throw("Wr assets")
457457 else {
458458 let orderPrice = order.price
459459 let priceDcm = fraction(scale8, prAsDcm, amtAsDcm)
460460 let castOrderPrice = ts(orderPrice, scale8, priceDcm)
461461 let isOrderPriceValid = if ((order.orderType == Buy))
462462 then (curPrice >= castOrderPrice)
463463 else (castOrderPrice >= curPrice)
464464 true
465465 }
466466 }
467467 }
468468
469469
470470 func cg (i) = if ((size(i.payments) != 1))
471471 then throw("1 pmnt exp")
472472 else {
473473 let pmt = value(i.payments[0])
474474 let pmtAssetId = value(pmt.assetId)
475475 let pmtAmt = pmt.amount
476476 let r = ego(toBase58String(i.transactionId), toBase58String(pmtAssetId), pmtAmt, i.caller)
477477 let outAmAmt = r._1
478478 let outPrAmt = r._2
479479 let sts = parseIntValue(r._9)
480480 let state = r._10
481481 if (if (igs())
482482 then true
483483 else (sts == PoolShutdown))
484484 then throw(("Admin blocked: " + toString(sts)))
485485 else $Tuple5(outAmAmt, outPrAmt, pmtAmt, pmtAssetId, state)
486486 }
487487
488488
489489 func cp (caller,txId,amAsPmt,prAsPmt,slippage,emitLp,isOneAsset,validateSlippage,pmtAmt,pmtId) = {
490490 let r = epo(txId, slippage, value(amAsPmt).amount, value(amAsPmt).assetId, value(prAsPmt).amount, value(prAsPmt).assetId, caller, (txId == ""), emitLp, isOneAsset, validateSlippage, pmtAmt, pmtId)
491491 let sts = parseIntValue(r._8)
492492 if (if (if (igs())
493493 then true
494494 else (sts == PoolPutDis))
495495 then true
496496 else (sts == PoolShutdown))
497497 then throw(("Blocked:" + toString(sts)))
498498 else r
499499 }
500500
501501
502502 func getD (xp) = {
503503 let n = big2
504504 let xp0 = xp[0]
505505 let xp1 = xp[1]
506506 let aPrecision = parseBigIntValue(Amult)
507507 let a = (parseBigIntValue(A) * aPrecision)
508508 let s = (xp0 + xp1)
509509 if ((s == big0))
510510 then big0
511511 else {
512512 let ann = (a * n)
513513 let xp0_xp1_n_n = (((xp0 * xp1) * n) * n)
514514 let ann_s_aPrecision = ((ann * s) / aPrecision)
515515 let ann_aPrecision = (ann - aPrecision)
516516 let n1 = (n + big1)
517517 func calc (acc,cur) = {
518518 let $t02234422364 = acc
519519 let d = $t02234422364._1
520520 let found = $t02234422364._2
521521 if ((found != unit))
522522 then acc
523523 else {
524524 let dp = (((d * d) * d) / xp0_xp1_n_n)
525525 let dNext = (((ann_s_aPrecision + (dp * n)) * d) / (((ann_aPrecision * d) / aPrecision) + (n1 * dp)))
526526 let dDiff = absBigInt((dNext - value(d)))
527527 if ((big1 >= dDiff))
528528 then $Tuple2(dNext, cur)
529529 else $Tuple2(dNext, unit)
530530 }
531531 }
532532
533533 let arr = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
534534 let $t02278522832 = {
535535 let $l = arr
536536 let $s = size($l)
537537 let $acc0 = $Tuple2(s, unit)
538538 func $f0_1 ($a,$i) = if (($i >= $s))
539539 then $a
540540 else calc($a, $l[$i])
541541
542542 func $f0_2 ($a,$i) = if (($i >= $s))
543543 then $a
544544 else throw("List size exceeds 15")
545545
546546 $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15)
547547 }
548548 let d = $t02278522832._1
549549 let found = $t02278522832._2
550550 if ((found != unit))
551551 then d
552552 else throw(("D calculation error, D = " + toString(d)))
553553 }
554554 }
555555
556556
557557 func getYD (xp,i,D) = {
558558 let n = big2
559559 let x = xp[if ((i == 0))
560560 then 1
561561 else 0]
562562 let aPrecision = parseBigIntValue(Amult)
563563 let a = (parseBigIntValue(A) * aPrecision)
564564 let s = x
565565 let ann = (a * n)
566566 let c = (((((D * D) / (x * n)) * D) * aPrecision) / (ann * n))
567567 let b = ((s + ((D * aPrecision) / ann)) - D)
568568 func calc (acc,cur) = {
569569 let $t02333223352 = acc
570570 let y = $t02333223352._1
571571 let found = $t02333223352._2
572572 if ((found != unit))
573573 then acc
574574 else {
575575 let yNext = (((y * y) + c) / ((big2 * y) + b))
576576 let yDiff = absBigInt((yNext - value(y)))
577577 if ((big1 >= yDiff))
578578 then $Tuple2(yNext, cur)
579579 else $Tuple2(yNext, unit)
580580 }
581581 }
582582
583583 let arr = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
584584 let $t02365923706 = {
585585 let $l = arr
586586 let $s = size($l)
587587 let $acc0 = $Tuple2(D, unit)
588588 func $f0_1 ($a,$i) = if (($i >= $s))
589589 then $a
590590 else calc($a, $l[$i])
591591
592592 func $f0_2 ($a,$i) = if (($i >= $s))
593593 then $a
594594 else throw("List size exceeds 15")
595595
596596 $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15)
597597 }
598598 let y = $t02365923706._1
599599 let found = $t02365923706._2
600600 if ((found != unit))
601601 then y
602602 else throw(("Y calculation error, Y = " + toString(y)))
603603 }
604604
605605
606606 func calcPutOneTkn (pmtAmtRaw,pmtAssetId,userAddress,txId,withTakeFee) = {
607607 let poolConfig = gpc()
608608 let amId = poolConfig[idxAmAsId]
609609 let prId = poolConfig[idxPrAsId]
610610 let lpId = poolConfig[idxLPAsId]
611611 let amtDcm = parseIntValue(poolConfig[idxAmtAsDcm])
612612 let priceDcm = parseIntValue(poolConfig[idxPriceAsDcm])
613613 let lpAssetEmission = toBigInt(valueOrErrorMessage(assetInfo(fromBase58String(lpId)), "invalid lp asset").quantity)
614614 let chechEmission = if ((lpAssetEmission > big0))
615615 then true
616616 else throw("initial deposit requires all coins")
617617 if ((chechEmission == chechEmission))
618618 then {
619619 let amBalance = getAccBalance(amId)
620620 let prBalance = getAccBalance(prId)
621621 let $t02448924951 = if ((txId == ""))
622622 then $Tuple2(amBalance, prBalance)
623623 else if ((pmtAssetId == amId))
624624 then if ((pmtAmtRaw > amBalance))
625625 then throw("invalid payment amount")
626626 else $Tuple2((amBalance - pmtAmtRaw), prBalance)
627627 else if ((pmtAssetId == prId))
628628 then if ((pmtAmtRaw > prBalance))
629629 then throw("invalid payment amount")
630630 else $Tuple2(amBalance, (prBalance - pmtAmtRaw))
631631 else throw("wrong pmtAssetId")
632632 let amBalanceOld = $t02448924951._1
633633 let prBalanceOld = $t02448924951._2
634634 let $t02495725133 = if ((pmtAssetId == amId))
635635 then $Tuple2(pmtAmtRaw, 0)
636636 else if ((pmtAssetId == prId))
637637 then $Tuple2(0, pmtAmtRaw)
638638 else throw("invalid payment")
639639 let amAmountRaw = $t02495725133._1
640640 let prAmountRaw = $t02495725133._2
641641 let $t02513725376 = if (withTakeFee)
642642 then $Tuple3(takeFee(amAmountRaw)._1, takeFee(prAmountRaw)._1, takeFee(pmtAmtRaw)._2)
643643 else $Tuple3(amAmountRaw, prAmountRaw, 0)
644644 let amAmount = $t02513725376._1
645645 let prAmount = $t02513725376._2
646646 let feeAmount = $t02513725376._3
647647 let amBalanceNew = (amBalanceOld + amAmount)
648648 let prBalanceNew = (prBalanceOld + prAmount)
649649 let D0 = getD([toBigInt(amBalanceOld), toBigInt(prBalanceOld)])
650650 let D1 = getD([toBigInt(amBalanceNew), toBigInt(prBalanceNew)])
651651 let checkD = if ((D1 > D0))
652652 then true
653653 else throw()
654654 if ((checkD == checkD))
655655 then {
656656 let lpAmount = fraction(lpAssetEmission, (D1 - D0), D0)
657657 let curPrice = f1(cpbi(t1(prBalanceNew, priceDcm), t1(amBalanceNew, amtDcm)), scale8)
658658 let commonState = [IntegerEntry(pl(), curPrice), IntegerEntry(ph(height, lastBlock.timestamp), curPrice), StringEntry(pau(userAddress, txId), dataPutActionInfo(amAmountRaw, prAmountRaw, toInt(lpAmount), curPrice, 0, 0, height, lastBlock.timestamp, 0, 0))]
659659 let poolProportion = fraction(prBalanceOld, scale8, amBalanceOld)
660660 let amountAssetPart = fraction(pmtAmtRaw, scale8, (poolProportion + scale8))
661661 let priceAssetPart = (pmtAmtRaw - amountAssetPart)
662662 let lpAmtBoth = fraction(lpAssetEmission, toBigInt(priceAssetPart), toBigInt(prBalanceOld))
663663 let bonus = toInt(fraction((lpAmount - lpAmtBoth), scale8BigInt, lpAmtBoth))
664664 $Tuple4(toInt(lpAmount), commonState, feeAmount, bonus)
665665 }
666666 else throw("Strict value is not equal to itself.")
667667 }
668668 else throw("Strict value is not equal to itself.")
669669 }
670670
671671
672672 func getOneTknV2Internal (outAssetId,minOutAmount,payments,caller,originCaller,transactionId) = {
673673 let poolConfig = gpc()
674674 let lpId = poolConfig[idxLPAsId]
675675 let amId = poolConfig[idxAmAsId]
676676 let prId = poolConfig[idxPrAsId]
677677 let amDecimals = parseIntValue(poolConfig[idxAmtAsDcm])
678678 let prDecimals = parseIntValue(poolConfig[idxPriceAsDcm])
679679 let poolStatus = poolConfig[idxPoolSt]
680680 let userAddress = if ((caller == restContract))
681681 then originCaller
682682 else caller
683683 let pmt = value(payments[0])
684684 let pmtAssetId = value(pmt.assetId)
685685 let pmtAmt = pmt.amount
686686 let txId58 = toBase58String(transactionId)
687687 if ((lpId != toBase58String(pmtAssetId)))
688688 then throw("Wrong LP")
689689 else {
690690 let amBalance = getAccBalance(amId)
691691 let prBalance = getAccBalance(prId)
692692 let $t02737827486 = {
693693 let @ = invoke(this, "getOneTknV2READONLY", [outAssetId, pmtAmt], nil)
694694 if ($isInstanceOf(@, "(Int, Int)"))
695695 then @
696696 else throw(($getType(@) + " couldn't be cast to (Int, Int)"))
697697 }
698698 let totalGet = $t02737827486._1
699699 let feeAmount = $t02737827486._2
700700 let totalAmount = if (if ((minOutAmount > 0))
701701 then (minOutAmount > totalGet)
702702 else false)
703703 then throwErr(makeString(["amount to receive is less than ", toString(minOutAmount)], ""))
704704 else totalGet
705705 let $t02767627983 = if ((outAssetId == amId))
706706 then $Tuple4(totalAmount, 0, ((amBalance - totalAmount) - feeAmount), prBalance)
707707 else if ((outAssetId == prId))
708708 then $Tuple4(0, totalAmount, amBalance, ((prBalance - totalAmount) - feeAmount))
709709 else throw("invalid out asset id")
710710 let outAm = $t02767627983._1
711711 let outPr = $t02767627983._2
712712 let amBalanceNew = $t02767627983._3
713713 let prBalanceNew = $t02767627983._4
714714 let curPrX18 = cpbi(t1(prBalanceNew, prDecimals), t1(amBalanceNew, amDecimals))
715715 let curPr = f1(curPrX18, scale8)
716716 let outAssetIdOrWaves = if ((outAssetId == "WAVES"))
717717 then unit
718718 else fromBase58String(outAssetId)
719719 let sendFeeToMatcher = if ((feeAmount > 0))
720720 then [ScriptTransfer(feeCollectorAddress, feeAmount, outAssetIdOrWaves)]
721721 else nil
722722 let state = ([ScriptTransfer(userAddress, totalAmount, outAssetIdOrWaves), StringEntry(gau(toString(userAddress), txId58), dataGetActionInfo(outAm, outPr, pmtAmt, curPr, height, lastBlock.timestamp)), IntegerEntry(pl(), curPr), IntegerEntry(ph(height, lastBlock.timestamp), curPr)] ++ sendFeeToMatcher)
723723 if ((state == state))
724724 then {
725725 let burn = invoke(fca, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
726726 if ((burn == burn))
727727 then $Tuple2(state, totalAmount)
728728 else throw("Strict value is not equal to itself.")
729729 }
730730 else throw("Strict value is not equal to itself.")
731731 }
732732 }
733733
734734
735735 func m () = match getString(mpk()) {
736736 case s: String =>
737737 fromBase58String(s)
738738 case _: Unit =>
739739 unit
740740 case _ =>
741741 throw("Match error")
742742 }
743743
744744
745745 func pm () = match getString(pmpk()) {
746746 case s: String =>
747747 fromBase58String(s)
748748 case _: Unit =>
749749 unit
750750 case _ =>
751751 throw("Match error")
752752 }
753753
754754
755755 let pd = throw("Permission denied")
756756
757757 func mm (i) = match m() {
758758 case pk: ByteVector =>
759759 if ((i.callerPublicKey == pk))
760760 then true
761761 else pd
762762 case _: Unit =>
763763 if ((i.caller == this))
764764 then true
765765 else pd
766766 case _ =>
767767 throw("Match error")
768768 }
769769
770770
771771 @Callable(i)
772772 func constructor (fc) = {
773773 let c = mm(i)
774774 if ((c == c))
775775 then [StringEntry(fc(), fc)]
776776 else throw("Strict value is not equal to itself.")
777777 }
778778
779779
780780
781781 @Callable(i)
782782 func setManager (pendingManagerPublicKey) = {
783783 let c = mm(i)
784784 if ((c == c))
785785 then {
786786 let cm = fromBase58String(pendingManagerPublicKey)
787787 if ((cm == cm))
788788 then [StringEntry(pmpk(), pendingManagerPublicKey)]
789789 else throw("Strict value is not equal to itself.")
790790 }
791791 else throw("Strict value is not equal to itself.")
792792 }
793793
794794
795795
796796 @Callable(i)
797797 func confirmManager () = {
798798 let p = pm()
799799 let hpm = if (isDefined(p))
800800 then true
801801 else throw("No pending manager")
802802 if ((hpm == hpm))
803803 then {
804804 let cpm = if ((i.callerPublicKey == value(p)))
805805 then true
806806 else throw("You are not pending manager")
807807 if ((cpm == cpm))
808808 then [StringEntry(mpk(), toBase58String(value(p))), DeleteEntry(pmpk())]
809809 else throw("Strict value is not equal to itself.")
810810 }
811811 else throw("Strict value is not equal to itself.")
812812 }
813813
814814
815815
816816 @Callable(i)
817817 func put (slip,autoStake) = {
818818 let factCfg = gfc()
819819 let stakingCntr = valueOrErrorMessage(addressFromString(factCfg[idxFactStakCntr]), "Wr st addr")
820820 let slipCntr = valueOrErrorMessage(addressFromString(factCfg[idxFactSlippCntr]), "Wr sl addr")
821821 if ((0 > slip))
822822 then throw("Wrong slippage")
823823 else if ((size(i.payments) != 2))
824824 then throw("2 pmnts expd")
825825 else {
826826 let e = cp(toString(i.caller), toBase58String(i.transactionId), AttachedPayment(value(i.payments[0]).assetId, value(i.payments[0]).amount), i.payments[1], slip, true, false, true, 0, "")
827827 let emitLpAmt = e._2
828828 let lpAssetId = e._7
829829 let state = e._9
830830 let amDiff = e._10
831831 let prDiff = e._11
832832 let amId = e._12
833833 let prId = e._13
834834 let r = invoke(fca, "emit", [emitLpAmt], nil)
835835 if ((r == r))
836836 then {
837837 let el = match r {
838838 case legacy: Address =>
839839 invoke(legacy, "emit", [emitLpAmt], nil)
840840 case _ =>
841841 unit
842842 }
843843 if ((el == el))
844844 then {
845845 let sa = if ((amDiff > 0))
846846 then invoke(slipCntr, "put", nil, [AttachedPayment(amId, amDiff)])
847847 else nil
848848 if ((sa == sa))
849849 then {
850850 let sp = if ((prDiff > 0))
851851 then invoke(slipCntr, "put", nil, [AttachedPayment(prId, prDiff)])
852852 else nil
853853 if ((sp == sp))
854854 then {
855855 let lpTrnsfr = if (autoStake)
856856 then {
857857 let ss = invoke(stakingCntr, "stake", nil, [AttachedPayment(lpAssetId, emitLpAmt)])
858858 if ((ss == ss))
859859 then nil
860860 else throw("Strict value is not equal to itself.")
861861 }
862862 else [ScriptTransfer(i.caller, emitLpAmt, lpAssetId)]
863863 (state ++ lpTrnsfr)
864864 }
865865 else throw("Strict value is not equal to itself.")
866866 }
867867 else throw("Strict value is not equal to itself.")
868868 }
869869 else throw("Strict value is not equal to itself.")
870870 }
871871 else throw("Strict value is not equal to itself.")
872872 }
873873 }
874874
875875
876876
877877 @Callable(i)
878878 func putOneTknV2 (minOutAmount,autoStake) = {
879879 let isPoolOneTokenOperationsDisabled = {
880880 let @ = invoke(fca, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
881881 if ($isInstanceOf(@, "Boolean"))
882882 then @
883883 else throw(($getType(@) + " couldn't be cast to Boolean"))
884884 }
885885 let isPutDisabled = if (if (if (igs())
886886 then true
887887 else (cfgPoolStatus == PoolPutDis))
888888 then true
889889 else (cfgPoolStatus == PoolShutdown))
890890 then true
891891 else isPoolOneTokenOperationsDisabled
892892 let checks = [if (!(isPutDisabled))
893893 then true
894894 else throwErr("put operation is blocked by admin"), if ((size(i.payments) == 1))
895895 then true
896896 else throwErr("exactly 1 payment are expected")]
897897 if ((checks == checks))
898898 then {
899899 let poolConfig = gpc()
900900 let amId = poolConfig[idxAmAsId]
901901 let prId = poolConfig[idxPrAsId]
902902 let lpId = fromBase58String(poolConfig[idxLPAsId])
903903 let amDecimals = parseIntValue(poolConfig[idxAmtAsDcm])
904904 let prDecimals = parseIntValue(poolConfig[idxPriceAsDcm])
905905 let userAddress = if ((i.caller == this))
906906 then i.originCaller
907907 else i.caller
908908 let pmt = value(i.payments[0])
909909 let pmtAssetId = toBase58String(value(pmt.assetId))
910910 let pmtAmt = pmt.amount
911911 let $t03316933324 = calcPutOneTkn(pmtAmt, pmtAssetId, toString(userAddress), toBase58String(i.transactionId), true)
912912 let estimLP = $t03316933324._1
913913 let state = $t03316933324._2
914914 let feeAmount = $t03316933324._3
915915 let emitLpAmt = if (if ((minOutAmount > 0))
916916 then (minOutAmount > estimLP)
917917 else false)
918918 then throwErr(makeString(["amount to receive is less than ", toString(minOutAmount)], ""))
919919 else estimLP
920920 let e = invoke(fca, "emit", [emitLpAmt], nil)
921921 if ((e == e))
922922 then {
923923 let el = match e {
924924 case legacy: Address =>
925925 invoke(legacy, "emit", [emitLpAmt], nil)
926926 case _ =>
927927 unit
928928 }
929929 if ((el == el))
930930 then {
931931 let lpTrnsfr = if (autoStake)
932932 then {
933933 let ss = invoke(stakingContract, "stake", nil, [AttachedPayment(lpId, emitLpAmt)])
934934 if ((ss == ss))
935935 then nil
936936 else throw("Strict value is not equal to itself.")
937937 }
938938 else [ScriptTransfer(i.caller, emitLpAmt, lpId)]
939939 let sendFeeToMatcher = if ((feeAmount > 0))
940940 then [ScriptTransfer(feeCollectorAddress, feeAmount, fromBase58String(pmtAssetId))]
941941 else nil
942942 $Tuple2(((state ++ lpTrnsfr) ++ sendFeeToMatcher), emitLpAmt)
943943 }
944944 else throw("Strict value is not equal to itself.")
945945 }
946946 else throw("Strict value is not equal to itself.")
947947 }
948948 else throw("Strict value is not equal to itself.")
949949 }
950950
951951
952952
953953 @Callable(i)
954954 func putForFree (maxSlpg) = if ((0 > maxSlpg))
955955 then throw("Wrong slpg")
956956 else if ((size(i.payments) != 2))
957957 then throw("2 pmnts expd")
958958 else {
959959 let estPut = cp(toString(i.caller), toBase58String(i.transactionId), AttachedPayment(value(i.payments[0]).assetId, value(i.payments[0]).amount), i.payments[1], maxSlpg, false, false, true, 0, "")
960960 estPut._9
961961 }
962962
963963
964964
965965 @Callable(i)
966966 func get () = {
967967 let r = cg(i)
968968 let outAmtAmt = r._1
969969 let outPrAmt = r._2
970970 let pmtAmt = r._3
971971 let pmtAssetId = r._4
972972 let state = r._5
973973 let b = invoke(fca, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
974974 if ((b == b))
975975 then state
976976 else throw("Strict value is not equal to itself.")
977977 }
978978
979979
980980
981981 @Callable(i)
982982 func getOneTknV2 (outAssetId,minOutAmount) = {
983983 let isPoolOneTokenOperationsDisabled = {
984984 let @ = invoke(fca, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
985985 if ($isInstanceOf(@, "Boolean"))
986986 then @
987987 else throw(($getType(@) + " couldn't be cast to Boolean"))
988988 }
989989 let isGetDisabled = if (if (igs())
990990 then true
991991 else (cfgPoolStatus == PoolShutdown))
992992 then true
993993 else isPoolOneTokenOperationsDisabled
994994 let checks = [if (!(isGetDisabled))
995995 then true
996996 else throwErr("get operation is blocked by admin"), if ((size(i.payments) == 1))
997997 then true
998998 else throwErr("exactly 1 payment are expected")]
999999 if ((checks == checks))
10001000 then {
10011001 let $t03591336068 = getOneTknV2Internal(outAssetId, minOutAmount, i.payments, i.caller, i.originCaller, i.transactionId)
10021002 let state = $t03591336068._1
10031003 let totalAmount = $t03591336068._2
10041004 $Tuple2(state, totalAmount)
10051005 }
10061006 else throw("Strict value is not equal to itself.")
10071007 }
10081008
10091009
10101010
10111011 @Callable(i)
10121012 func getOneTknV2READONLY (outAssetId,lpAssetAmount) = {
10131013 let poolConfig = gpc()
10141014 let amId = poolConfig[idxAmAsId]
10151015 let prId = poolConfig[idxPrAsId]
10161016 let lpId = poolConfig[idxLPAsId]
10171017 let xp = [toBigInt(getAccBalance(amId)), toBigInt(getAccBalance(prId))]
10181018 let lpEmission = toBigInt(valueOrErrorMessage(assetInfo(fromBase58String(lpId)), "invalid lp asset").quantity)
10191019 let D0 = getD(xp)
10201020 let D1 = (D0 - fraction(toBigInt(lpAssetAmount), D0, lpEmission))
10211021 let index = if ((outAssetId == amId))
10221022 then 0
10231023 else if ((outAssetId == prId))
10241024 then 1
10251025 else throw("invalid out asset id")
10261026 let newY = getYD(xp, index, D1)
10271027 let dy = (xp[index] - newY)
10281028 let totalGetRaw = max([0, toInt((dy - big1))])
10291029 let $t03685836907 = takeFee(totalGetRaw)
10301030 let totalGet = $t03685836907._1
10311031 let feeAmount = $t03685836907._2
10321032 $Tuple2(nil, $Tuple2(totalGet, feeAmount))
10331033 }
10341034
10351035
10361036
10371037 @Callable(i)
10381038 func getOneTknV2WithBonusREADONLY (outAssetId,lpAssetAmount) = {
10391039 let poolConfig = gpc()
10401040 let amId = poolConfig[idxAmAsId]
10411041 let prId = poolConfig[idxPrAsId]
10421042 let lpId = poolConfig[idxLPAsId]
10431043 let amBalance = getAccBalance(amId)
10441044 let prBalance = getAccBalance(prId)
10451045 let $t03725237367 = {
10461046 let @ = invoke(this, "getOneTknV2READONLY", [outAssetId, lpAssetAmount], nil)
10471047 if ($isInstanceOf(@, "(Int, Int)"))
10481048 then @
10491049 else throw(($getType(@) + " couldn't be cast to (Int, Int)"))
10501050 }
10511051 let totalGet = $t03725237367._1
10521052 let feeAmount = $t03725237367._2
10531053 let r = ego("", lpId, lpAssetAmount, this)
10541054 let outAmAmt = r._1
10551055 let outPrAmt = r._2
10561056 let sumOfGetAssets = (outAmAmt + outPrAmt)
10571057 let bonus = if ((sumOfGetAssets == 0))
10581058 then if ((totalGet == 0))
10591059 then 0
10601060 else throw("bonus calculation error")
10611061 else fraction((totalGet - sumOfGetAssets), scale8, sumOfGetAssets)
10621062 $Tuple2(nil, $Tuple3(totalGet, feeAmount, bonus))
10631063 }
10641064
10651065
10661066
10671067 @Callable(i)
10681068 func getNoLess (noLessThenAmtAsset,noLessThenPriceAsset) = {
10691069 let r = cg(i)
10701070 let outAmAmt = r._1
10711071 let outPrAmt = r._2
10721072 let pmtAmt = r._3
10731073 let pmtAssetId = r._4
10741074 let state = r._5
10751075 if ((noLessThenAmtAsset > outAmAmt))
10761076 then throw(((("Failed: " + toString(outAmAmt)) + " < ") + toString(noLessThenAmtAsset)))
10771077 else if ((noLessThenPriceAsset > outPrAmt))
10781078 then throw(((("Failed: " + toString(outPrAmt)) + " < ") + toString(noLessThenPriceAsset)))
10791079 else {
10801080 let burnLPAssetOnFactory = invoke(fca, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
10811081 if ((burnLPAssetOnFactory == burnLPAssetOnFactory))
10821082 then state
10831083 else throw("Strict value is not equal to itself.")
10841084 }
10851085 }
10861086
10871087
10881088
10891089 @Callable(i)
10901090 func unstakeAndGet (amount) = {
10911091 let checkPayments = if ((size(i.payments) != 0))
10921092 then throw("No pmnts expd")
10931093 else true
10941094 if ((checkPayments == checkPayments))
10951095 then {
10961096 let cfg = gpc()
10971097 let factoryCfg = gfc()
10981098 let lpAssetId = fromBase58String(cfg[idxLPAsId])
10991099 let staking = valueOrErrorMessage(addressFromString(factoryCfg[idxFactStakCntr]), "Wr st addr")
11001100 let unstakeInv = invoke(staking, "unstake", [toBase58String(lpAssetId), amount], nil)
11011101 if ((unstakeInv == unstakeInv))
11021102 then {
11031103 let r = ego(toBase58String(i.transactionId), toBase58String(lpAssetId), amount, i.caller)
11041104 let sts = parseIntValue(r._9)
11051105 let state = r._10
11061106 let v = if (if (igs())
11071107 then true
11081108 else (sts == PoolShutdown))
11091109 then throw(("Blocked: " + toString(sts)))
11101110 else true
11111111 if ((v == v))
11121112 then {
11131113 let burnA = invoke(fca, "burn", [amount], [AttachedPayment(lpAssetId, amount)])
11141114 if ((burnA == burnA))
11151115 then state
11161116 else throw("Strict value is not equal to itself.")
11171117 }
11181118 else throw("Strict value is not equal to itself.")
11191119 }
11201120 else throw("Strict value is not equal to itself.")
11211121 }
11221122 else throw("Strict value is not equal to itself.")
11231123 }
11241124
11251125
11261126
11271127 @Callable(i)
1128+func unstakeAndGetNoLess (unstakeAmount,noLessThenAmountAsset,noLessThenPriceAsset) = {
1129+ let isGetDisabled = if (igs())
1130+ then true
1131+ else (cfgPoolStatus == PoolShutdown)
1132+ let checks = [if (!(isGetDisabled))
1133+ then true
1134+ else throw("get operation is blocked by admin"), if ((size(i.payments) == 0))
1135+ then true
1136+ else throw("no payments are expected")]
1137+ if ((checks == checks))
1138+ then {
1139+ let unstakeInv = invoke(stakingContract, "unstake", [toBase58String(cfgLpAssetId), unstakeAmount], nil)
1140+ if ((unstakeInv == unstakeInv))
1141+ then {
1142+ let res = ego(toBase58String(i.transactionId), toBase58String(cfgLpAssetId), unstakeAmount, i.caller)
1143+ let outAmAmt = res._1
1144+ let outPrAmt = res._2
1145+ let state = res._10
1146+ let checkAmounts = [if ((outAmAmt >= noLessThenAmountAsset))
1147+ then true
1148+ else throw(makeString(["amount asset amount to receive is less than ", toString(noLessThenAmountAsset)], "")), if ((outPrAmt >= noLessThenPriceAsset))
1149+ then true
1150+ else throw(makeString(["price asset amount to receive is less than ", toString(noLessThenPriceAsset)], ""))]
1151+ if ((checkAmounts == checkAmounts))
1152+ then {
1153+ let burnLPAssetOnFactory = invoke(fca, "burn", [unstakeAmount], [AttachedPayment(cfgLpAssetId, unstakeAmount)])
1154+ if ((burnLPAssetOnFactory == burnLPAssetOnFactory))
1155+ then state
1156+ else throw("Strict value is not equal to itself.")
1157+ }
1158+ else throw("Strict value is not equal to itself.")
1159+ }
1160+ else throw("Strict value is not equal to itself.")
1161+ }
1162+ else throw("Strict value is not equal to itself.")
1163+ }
1164+
1165+
1166+
1167+@Callable(i)
11281168 func unstakeAndGetOneTknV2 (unstakeAmount,outAssetId,minOutAmount) = {
11291169 let isPoolOneTokenOperationsDisabled = {
11301170 let @ = invoke(fca, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
11311171 if ($isInstanceOf(@, "Boolean"))
11321172 then @
11331173 else throw(($getType(@) + " couldn't be cast to Boolean"))
11341174 }
11351175 let isGetDisabled = if (if (igs())
11361176 then true
11371177 else (cfgPoolStatus == PoolShutdown))
11381178 then true
11391179 else isPoolOneTokenOperationsDisabled
11401180 let checks = [if (!(isGetDisabled))
11411181 then true
11421182 else throwErr("get operation is blocked by admin"), if ((size(i.payments) == 0))
11431183 then true
11441184 else throwErr("no payments are expected")]
11451185 if ((checks == checks))
11461186 then {
11471187 let cfg = gpc()
11481188 let factoryCfg = gfc()
11491189 let lpAssetId = fromBase58String(cfg[idxLPAsId])
11501190 let staking = valueOrErrorMessage(addressFromString(factoryCfg[idxFactStakCntr]), "Wr st addr")
11511191 let unstakeInv = invoke(staking, "unstake", [toBase58String(lpAssetId), unstakeAmount], nil)
11521192 if ((unstakeInv == unstakeInv))
11531193 then {
1154- let $t04009940287 = getOneTknV2Internal(outAssetId, minOutAmount, [AttachedPayment(lpAssetId, unstakeAmount)], i.caller, i.originCaller, i.transactionId)
1155- let state = $t04009940287._1
1156- let totalAmount = $t04009940287._2
1194+ let $t04117241360 = getOneTknV2Internal(outAssetId, minOutAmount, [AttachedPayment(lpAssetId, unstakeAmount)], i.caller, i.originCaller, i.transactionId)
1195+ let state = $t04117241360._1
1196+ let totalAmount = $t04117241360._2
11571197 $Tuple2(state, totalAmount)
11581198 }
11591199 else throw("Strict value is not equal to itself.")
11601200 }
11611201 else throw("Strict value is not equal to itself.")
11621202 }
11631203
11641204
11651205
11661206 @Callable(i)
11671207 func putOneTknV2WithBonusREADONLY (paymentAmountRaw,paymentAssetId) = {
11681208 let poolConfig = gpc()
11691209 let amId = poolConfig[idxAmAsId]
11701210 let prId = poolConfig[idxPrAsId]
11711211 let lpId = poolConfig[idxLPAsId]
1172- let $t04054640649 = calcPutOneTkn(paymentAmountRaw, paymentAssetId, "", "", true)
1173- let lpAmount = $t04054640649._1
1174- let state = $t04054640649._2
1175- let feeAmount = $t04054640649._3
1176- let bonus = $t04054640649._4
1212+ let $t04161941722 = calcPutOneTkn(paymentAmountRaw, paymentAssetId, "", "", true)
1213+ let lpAmount = $t04161941722._1
1214+ let state = $t04161941722._2
1215+ let feeAmount = $t04161941722._3
1216+ let bonus = $t04161941722._4
11771217 $Tuple2(nil, $Tuple3(lpAmount, feeAmount, bonus))
11781218 }
11791219
11801220
11811221
11821222 @Callable(i)
11831223 func putOneTknV2WithoutTakeFeeREADONLY (paymentAmountRaw,paymentAssetId) = {
11841224 let poolConfig = gpc()
11851225 let amId = poolConfig[idxAmAsId]
11861226 let prId = poolConfig[idxPrAsId]
11871227 let lpId = poolConfig[idxLPAsId]
1188- let $t04092841032 = calcPutOneTkn(paymentAmountRaw, paymentAssetId, "", "", false)
1189- let lpAmount = $t04092841032._1
1190- let state = $t04092841032._2
1191- let feeAmount = $t04092841032._3
1192- let bonus = $t04092841032._4
1228+ let $t04200142105 = calcPutOneTkn(paymentAmountRaw, paymentAssetId, "", "", false)
1229+ let lpAmount = $t04200142105._1
1230+ let state = $t04200142105._2
1231+ let feeAmount = $t04200142105._3
1232+ let bonus = $t04200142105._4
11931233 $Tuple2(nil, $Tuple3(lpAmount, feeAmount, bonus))
11941234 }
11951235
11961236
11971237
11981238 @Callable(i)
11991239 func activate (amtAsStr,prAsStr) = if ((toString(i.caller) != toString(fca)))
12001240 then throw("denied")
12011241 else $Tuple2([StringEntry(aa(), amtAsStr), StringEntry(pa(), prAsStr)], "success")
12021242
12031243
12041244
12051245 @Callable(i)
12061246 func setS (k,v) = if ((toString(i.caller) != strf(this, ada())))
12071247 then pd
12081248 else [StringEntry(k, v)]
12091249
12101250
12111251
12121252 @Callable(i)
12131253 func setI (k,v) = if ((toString(i.caller) != strf(this, ada())))
12141254 then pd
12151255 else [IntegerEntry(k, v)]
12161256
12171257
12181258
12191259 @Callable(i)
12201260 func getPoolConfigWrapperREADONLY () = $Tuple2(nil, gpc())
12211261
12221262
12231263
12241264 @Callable(i)
12251265 func getAccBalanceWrapperREADONLY (assetId) = $Tuple2(nil, getAccBalance(assetId))
12261266
12271267
12281268
12291269 @Callable(i)
12301270 func calcPricesWrapperREADONLY (amAmt,prAmt,lpAmt) = {
12311271 let pr = calcPrices(amAmt, prAmt, lpAmt)
12321272 $Tuple2(nil, [toString(pr[0]), toString(pr[1]), toString(pr[2])])
12331273 }
12341274
12351275
12361276
12371277 @Callable(i)
12381278 func fromX18WrapperREADONLY (val,resScaleMult) = $Tuple2(nil, f1(parseBigIntValue(val), resScaleMult))
12391279
12401280
12411281
12421282 @Callable(i)
12431283 func toX18WrapperREADONLY (origVal,origScaleMult) = $Tuple2(nil, toString(t1(origVal, origScaleMult)))
12441284
12451285
12461286
12471287 @Callable(i)
12481288 func calcPriceBigIntWrapperREADONLY (prAmtX18,amAmtX18) = $Tuple2(nil, toString(cpbi(parseBigIntValue(prAmtX18), parseBigIntValue(amAmtX18))))
12491289
12501290
12511291
12521292 @Callable(i)
12531293 func estimatePutOperationWrapperREADONLY (txId58,slippage,inAmAmt,inAmId,inPrAmt,inPrId,usrAddr,isEval,emitLp) = $Tuple2(nil, epo(txId58, slippage, inAmAmt, inAmId, inPrAmt, inPrId, usrAddr, isEval, emitLp, true, false, 0, ""))
12541294
12551295
12561296
12571297 @Callable(i)
12581298 func estimateGetOperationWrapperREADONLY (txId58,pmtAsId,pmtLpAmt,usrAddr) = {
12591299 let r = ego(txId58, pmtAsId, pmtLpAmt, addressFromStringValue(usrAddr))
12601300 $Tuple2(nil, $Tuple10(r._1, r._2, r._3, r._4, r._5, r._6, r._7, toString(r._8), r._9, r._10))
12611301 }
12621302
12631303
12641304
12651305 @Callable(i)
12661306 func getFeeREADONLY () = $Tuple2(nil, fee)
12671307
12681308
12691309 @Verifier(tx)
12701310 func verify () = {
12711311 let targetPublicKey = match m() {
12721312 case pk: ByteVector =>
12731313 pk
12741314 case _: Unit =>
12751315 tx.senderPublicKey
12761316 case _ =>
12771317 throw("Match error")
12781318 }
12791319 match tx {
12801320 case order: Order =>
12811321 let matcherPub = mp()
12821322 let orderValid = moa(order)
12831323 let senderValid = sigVerify(order.bodyBytes, order.proofs[0], order.senderPublicKey)
12841324 let matcherValid = sigVerify(order.bodyBytes, order.proofs[1], matcherPub)
12851325 if (if (if (orderValid)
12861326 then senderValid
12871327 else false)
12881328 then matcherValid
12891329 else false)
12901330 then true
12911331 else toe(orderValid, senderValid, matcherValid)
12921332 case s: SetScriptTransaction =>
12931333 let newHash = blake2b256(value(s.script))
12941334 let allowedHash = fromBase64String(value(getString(fca, keyAllowedLpStableScriptHash())))
12951335 let currentHash = scriptHash(this)
12961336 if (if ((allowedHash == newHash))
12971337 then (currentHash != newHash)
12981338 else false)
12991339 then true
13001340 else sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey)
13011341 case _ =>
13021342 sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey)
13031343 }
13041344 }
13051345

github/deemru/w8io/026f985 
173.17 ms