tx · J8UMm6yfgyCCDnktcS4URcE1XxBqtC9ukK8KQgKLEaSL 3MwyBKGZcdChEK9Z55HwLn3A2EgwEJJpqC1: -0.47000000 Waves 2023.03.10 11:07 [2483710] smart account 3MwyBKGZcdChEK9Z55HwLn3A2EgwEJJpqC1 > SELF 0.00000000 Waves
{ "type": 13, "id": "J8UMm6yfgyCCDnktcS4URcE1XxBqtC9ukK8KQgKLEaSL", "fee": 47000000, "feeAssetId": null, "timestamp": 1678435644853, "version": 2, "chainId": 84, "sender": "3MwyBKGZcdChEK9Z55HwLn3A2EgwEJJpqC1", "senderPublicKey": "7c3qLtcJ7EaPS2JDjXv8MBbd4kpyc6R27wcn5GgvZhur", "proofs": [ "w9GT8zbvhikSJRqq2jFBGKzs2yjx5nw2b31w11Mx4Dx3CzYDzXh9oBEKkCHYQuTpJfTbyh9AhkXHMETJHRBLFeK" ], "script": "base64:BgKxAQgCEgUKAwEEARIHCgUBBAEIARIDCgEIEgMKAQgSABIECgIBBBIECgIBBBIDCgEBEgASBAoCCAESABIECgIIARIECgIIARIECgIBARIDCgEBEgUKAwEBARIFCgMBCAESBAoCAQgSBAoCAQgSBAoCCAgSBAoCCAgSBAoCCAESABIDCgEIEgUKAwEBARIECgIIARIECgIBARIECgIICBILCgkIAQECAQIIBAQSBgoECAgBCIIBAAZzY2FsZTgAgMLXLwAMc2NhbGU4QmlnSW50CQC2AgEAgMLXLwAHc2NhbGUxOAkAtgIBAICAkLu61q3wDQAKemVyb0JpZ0ludAkAtgIBAAAABGJpZzAJALYCAQAAAARiaWcxCQC2AgEAAQAEYmlnMgkAtgIBAAIABGJpZzMJALYCAQADAARiaWc0CQC2AgEABAAKc2xpcHBhZ2U0RAkAtgIBCQBlAgUGc2NhbGU4CQBpAgkAaAIFBnNjYWxlOAABBQZzY2FsZTgAC3dhdmVzU3RyaW5nAgVXQVZFUwAFQW11bHQCAzEwMAAFRGNvbnYCATEAA1NFUAICX18ABUVNUFRZAgAAClBvb2xBY3RpdmUAA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5BbUlkB2luUHJBbXQGaW5QcklkB3VzckFkZHIGaXNFdmFsBmVtaXRMcAkAlAoCBQNuaWwJAQNlcG8NBQZ0eElkNTgFCHNsaXBwYWdlBQdpbkFtQW10BQZpbkFtSWQFB2luUHJBbXQFBmluUHJJZAUHdXNyQWRkcgUGaXNFdmFsBQZlbWl0THAGBwAAAgABaQEjZXN0aW1hdGVHZXRPcGVyYXRpb25XcmFwcGVyUkVBRE9OTFkEBnR4SWQ1OAdwbXRBc0lkCHBtdExwQW10B3VzckFkZHIEAXIJAQNlZ28EBQZ0eElkNTgFB3BtdEFzSWQFCHBtdExwQW10CQERQGV4dHJOYXRpdmUoMTA2MikBBQd1c3JBZGRyCQCUCgIFA25pbAkAnAoKCAUBcgJfMQgFAXICXzIIBQFyAl8zCAUBcgJfNAgFAXICXzUIBQFyAl82CAUBcgJfNwkApgMBCAUBcgJfOAgFAXICXzkIBQFyA18xMADqKArE", "height": 2483710, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: FSD43hVThB4AhJGhYFs4mn7ukcwkSkGQroLYD33xAHPc Next: 46xUj3ZM1p3zNnLRMRHh5Tb7xg1WhJrPaLNrY8YWJmsY Full:
Old | New | Differences | |
---|---|---|---|
1 | - | {-# STDLIB_VERSION | |
1 | + | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | - | let | |
4 | + | let scale8 = 100000000 | |
5 | 5 | ||
6 | - | let | |
6 | + | let scale8BigInt = toBigInt(100000000) | |
7 | 7 | ||
8 | - | let | |
8 | + | let scale18 = toBigInt(1000000000000000000) | |
9 | 9 | ||
10 | - | let | |
10 | + | let zeroBigInt = toBigInt(0) | |
11 | 11 | ||
12 | - | func keyUserBalance (userAddr) = makeString(["balance", toString(userAddr)], "_") | |
12 | + | let big0 = toBigInt(0) | |
13 | + | ||
14 | + | let big1 = toBigInt(1) | |
15 | + | ||
16 | + | let big2 = toBigInt(2) | |
17 | + | ||
18 | + | let big3 = toBigInt(3) | |
19 | + | ||
20 | + | let big4 = toBigInt(4) | |
21 | + | ||
22 | + | let slippage4D = toBigInt((scale8 - ((scale8 * 1) / scale8))) | |
23 | + | ||
24 | + | let wavesString = "WAVES" | |
25 | + | ||
26 | + | let Amult = "100" | |
27 | + | ||
28 | + | let Dconv = "1" | |
29 | + | ||
30 | + | let SEP = "__" | |
31 | + | ||
32 | + | let EMPTY = "" | |
33 | + | ||
34 | + | let PoolActive = 1 | |
35 | + | ||
36 | + | let PoolPutDis = 2 | |
37 | + | ||
38 | + | let PoolMatcherDis = 3 | |
39 | + | ||
40 | + | let PoolShutdown = 4 | |
41 | + | ||
42 | + | let idxPoolAddress = 1 | |
43 | + | ||
44 | + | let idxPoolSt = 2 | |
45 | + | ||
46 | + | let idxLPAsId = 3 | |
47 | + | ||
48 | + | let idxAmAsId = 4 | |
49 | + | ||
50 | + | let idxPrAsId = 5 | |
51 | + | ||
52 | + | let idxAmtAsDcm = 6 | |
53 | + | ||
54 | + | let idxPriceAsDcm = 7 | |
55 | + | ||
56 | + | let idxIAmtAsId = 8 | |
57 | + | ||
58 | + | let idxIPriceAsId = 9 | |
59 | + | ||
60 | + | let idxFactStakCntr = 1 | |
61 | + | ||
62 | + | let idxFactoryRestCntr = 6 | |
63 | + | ||
64 | + | let idxFactSlippCntr = 7 | |
65 | + | ||
66 | + | let idxFactGwxRewCntr = 10 | |
67 | + | ||
68 | + | let feeDefault = fraction(10, scale8, 10000) | |
69 | + | ||
70 | + | func t1 (origVal,origScaleMult) = fraction(toBigInt(origVal), scale18, toBigInt(origScaleMult)) | |
13 | 71 | ||
14 | 72 | ||
15 | - | func | |
73 | + | func t1BigInt (origVal,origScaleMult) = fraction(origVal, scale18, origScaleMult) | |
16 | 74 | ||
17 | 75 | ||
18 | - | @Callable(contextObj) | |
19 | - | func castVote (vote) = if ((containsElement(assets, vote) == false)) | |
20 | - | then throw("Incorrect vote!") | |
21 | - | else { | |
22 | - | let voiteKey = makeString(["vote", vote], "_") | |
23 | - | let voteAddressKey = keyUserAssetBalance(toString(contextObj.caller), vote) | |
24 | - | let userBalanceKey = keyUserBalance(contextObj.caller) | |
25 | - | let payment = value(contextObj.payments[0]) | |
26 | - | let assetIdReceived = payment.assetId | |
27 | - | let tokenReceiveAmount = payment.amount | |
28 | - | let voteNumberThis = valueOrElse(getInteger(this, voiteKey), 0) | |
29 | - | let contractUserBalance = valueOrElse(getInteger(this, userBalanceKey), 0) | |
30 | - | let voteOnAsset = valueOrElse(getInteger(this, voteAddressKey), 0) | |
31 | - | if ((assetIdReceived != NSBTid)) | |
32 | - | then throw("incorrect assets") | |
33 | - | else if ((height >= heightEnd)) | |
34 | - | then throw("vote finished") | |
35 | - | else [IntegerEntry(voiteKey, (voteNumberThis + tokenReceiveAmount)), IntegerEntry(userBalanceKey, (contractUserBalance + tokenReceiveAmount)), IntegerEntry(voteAddressKey, (voteOnAsset + tokenReceiveAmount))] | |
36 | - | } | |
76 | + | func f1 (val,resultScaleMult) = toInt(fraction(val, toBigInt(resultScaleMult), scale18)) | |
37 | 77 | ||
38 | 78 | ||
79 | + | func fromX18Round (val,resultScaleMult,round) = toInt(fraction(val, toBigInt(resultScaleMult), scale18, round)) | |
39 | 80 | ||
40 | - | @Callable(contextObj) | |
41 | - | func cancelVote () = { | |
42 | - | let userBalanceKey = keyUserBalance(contextObj.caller) | |
43 | - | let contractUserBalance = valueOrElse(getInteger(this, userBalanceKey), 0) | |
44 | - | if ((contractUserBalance == 0)) | |
45 | - | then nil | |
81 | + | ||
82 | + | func t2 (origVal,origScaleMult) = fraction(origVal, scale18, toBigInt(origScaleMult)) | |
83 | + | ||
84 | + | ||
85 | + | func f2 (val,resultScaleMult) = fraction(val, toBigInt(resultScaleMult), scale18) | |
86 | + | ||
87 | + | ||
88 | + | func ts (amt,resScale,curScale) = fraction(amt, resScale, curScale) | |
89 | + | ||
90 | + | ||
91 | + | func abs (val) = if ((zeroBigInt > val)) | |
92 | + | then -(val) | |
93 | + | else val | |
94 | + | ||
95 | + | ||
96 | + | func absBigInt (val) = if ((zeroBigInt > val)) | |
97 | + | then -(val) | |
98 | + | else val | |
99 | + | ||
100 | + | ||
101 | + | func fc () = "%s__factoryContract" | |
102 | + | ||
103 | + | ||
104 | + | func mpk () = "%s__managerPublicKey" | |
105 | + | ||
106 | + | ||
107 | + | func pmpk () = "%s__pendingManagerPublicKey" | |
108 | + | ||
109 | + | ||
110 | + | func pl () = "%s%s__price__last" | |
111 | + | ||
112 | + | ||
113 | + | func ph (h,t) = makeString(["%s%s%d%d__price__history", toString(h), toString(t)], SEP) | |
114 | + | ||
115 | + | ||
116 | + | func pau (ua,txId) = ((("%s%s%s__P__" + ua) + "__") + txId) | |
117 | + | ||
118 | + | ||
119 | + | func gau (ua,txId) = ((("%s%s%s__G__" + ua) + "__") + txId) | |
120 | + | ||
121 | + | ||
122 | + | func aa () = "%s__amountAsset" | |
123 | + | ||
124 | + | ||
125 | + | func pa () = "%s__priceAsset" | |
126 | + | ||
127 | + | ||
128 | + | func amp () = "%s__amp" | |
129 | + | ||
130 | + | ||
131 | + | func ada () = "%s__addonAddr" | |
132 | + | ||
133 | + | ||
134 | + | let keyFee = "%s__fee" | |
135 | + | ||
136 | + | let fee = valueOrElse(getInteger(this, keyFee), feeDefault) | |
137 | + | ||
138 | + | let keyDLp = makeString(["%s", "dLp"], SEP) | |
139 | + | ||
140 | + | let keyDLpRefreshedHeight = makeString(["%s", "dLpRefreshedHeight"], SEP) | |
141 | + | ||
142 | + | let keyDLpRefreshDelay = makeString(["%s", "refreshDLpDelay"], SEP) | |
143 | + | ||
144 | + | let dLpRefreshDelayDefault = 30 | |
145 | + | ||
146 | + | let dLpRefreshDelay = valueOrElse(getInteger(this, keyDLpRefreshDelay), dLpRefreshDelayDefault) | |
147 | + | ||
148 | + | func fcfg () = "%s__factoryConfig" | |
149 | + | ||
150 | + | ||
151 | + | func mtpk () = "%s%s__matcher__publicKey" | |
152 | + | ||
153 | + | ||
154 | + | func pc (iAmtAs,iPrAs) = (((("%d%d%s__" + iAmtAs) + "__") + iPrAs) + "__config") | |
155 | + | ||
156 | + | ||
157 | + | func mba (bAStr) = ("%s%s%s__mappings__baseAsset2internalId__" + bAStr) | |
158 | + | ||
159 | + | ||
160 | + | func aps () = "%s__shutdown" | |
161 | + | ||
162 | + | ||
163 | + | func keyAllowedLpStableScriptHash () = "%s__allowedLpStableScriptHash" | |
164 | + | ||
165 | + | ||
166 | + | func keyFeeCollectorAddress () = "%s__feeCollectorAddress" | |
167 | + | ||
168 | + | ||
169 | + | func throwOrderError (orderValid,orderValidInfo,senderValid,matcherValid) = throw((((((((("order validation failed: orderValid=" + toString(orderValid)) + " (") + orderValidInfo) + ")") + " senderValid=") + toString(senderValid)) + " matcherValid=") + toString(matcherValid))) | |
170 | + | ||
171 | + | ||
172 | + | func strf (addr,key) = valueOrErrorMessage(getString(addr, key), makeString(["mandatory ", toString(addr), ".", key, " not defined"], "")) | |
173 | + | ||
174 | + | ||
175 | + | func intf (addr,key) = valueOrErrorMessage(getInteger(addr, key), makeString(["mandatory ", toString(addr), ".", key, " not defined"], "")) | |
176 | + | ||
177 | + | ||
178 | + | func throwErr (msg) = throw(makeString(["lp_stable.ride:", msg], " ")) | |
179 | + | ||
180 | + | ||
181 | + | func fmtErr (msg) = makeString(["lp_stable.ride:", msg], " ") | |
182 | + | ||
183 | + | ||
184 | + | let fca = addressFromStringValue(strf(this, fc())) | |
185 | + | ||
186 | + | let inFee = { | |
187 | + | let @ = invoke(fca, "getInFeeREADONLY", [toString(this)], nil) | |
188 | + | if ($isInstanceOf(@, "Int")) | |
189 | + | then @ | |
190 | + | else throw(($getType(@) + " couldn't be cast to Int")) | |
191 | + | } | |
192 | + | ||
193 | + | let outFee = { | |
194 | + | let @ = invoke(fca, "getOutFeeREADONLY", [toString(this)], nil) | |
195 | + | if ($isInstanceOf(@, "Int")) | |
196 | + | then @ | |
197 | + | else throw(($getType(@) + " couldn't be cast to Int")) | |
198 | + | } | |
199 | + | ||
200 | + | let A = strf(this, amp()) | |
201 | + | ||
202 | + | func igs () = valueOrElse(getBoolean(fca, aps()), false) | |
203 | + | ||
204 | + | ||
205 | + | func mp () = fromBase58String(strf(fca, mtpk())) | |
206 | + | ||
207 | + | ||
208 | + | let feeCollectorAddress = addressFromStringValue(strf(fca, keyFeeCollectorAddress())) | |
209 | + | ||
210 | + | func gpc () = { | |
211 | + | let amtAs = strf(this, aa()) | |
212 | + | let priceAs = strf(this, pa()) | |
213 | + | let iPriceAs = intf(fca, mba(priceAs)) | |
214 | + | let iAmtAs = intf(fca, mba(amtAs)) | |
215 | + | split(strf(fca, pc(toString(iAmtAs), toString(iPriceAs))), SEP) | |
216 | + | } | |
217 | + | ||
218 | + | ||
219 | + | func parseAssetId (input) = if ((input == wavesString)) | |
220 | + | then unit | |
221 | + | else fromBase58String(input) | |
222 | + | ||
223 | + | ||
224 | + | func assetIdToString (input) = if ((input == unit)) | |
225 | + | then wavesString | |
226 | + | else toBase58String(value(input)) | |
227 | + | ||
228 | + | ||
229 | + | func parsePoolConfig (poolConfig) = $Tuple9(addressFromStringValue(poolConfig[idxPoolAddress]), parseIntValue(poolConfig[idxPoolSt]), fromBase58String(poolConfig[idxLPAsId]), parseAssetId(poolConfig[idxAmAsId]), parseAssetId(poolConfig[idxPrAsId]), parseIntValue(poolConfig[idxAmtAsDcm]), parseIntValue(poolConfig[idxPriceAsDcm]), fromBase58String(poolConfig[idxIAmtAsId]), fromBase58String(poolConfig[idxIPriceAsId])) | |
230 | + | ||
231 | + | ||
232 | + | let poolConfigParsed = parsePoolConfig(gpc()) | |
233 | + | ||
234 | + | let $t081848426 = poolConfigParsed | |
235 | + | ||
236 | + | let cfgPoolAddress = $t081848426._1 | |
237 | + | ||
238 | + | let cfgPoolStatus = $t081848426._2 | |
239 | + | ||
240 | + | let cfgLpAssetId = $t081848426._3 | |
241 | + | ||
242 | + | let cfgAmountAssetId = $t081848426._4 | |
243 | + | ||
244 | + | let cfgPriceAssetId = $t081848426._5 | |
245 | + | ||
246 | + | let cfgAmountAssetDecimals = $t081848426._6 | |
247 | + | ||
248 | + | let cfgPriceAssetDecimals = $t081848426._7 | |
249 | + | ||
250 | + | let cfgInAmountAssedId = $t081848426._8 | |
251 | + | ||
252 | + | let cfgInPriceAssetId = $t081848426._9 | |
253 | + | ||
254 | + | func gfc () = split(strf(fca, fcfg()), SEP) | |
255 | + | ||
256 | + | ||
257 | + | let factoryConfig = gfc() | |
258 | + | ||
259 | + | let stakingContract = valueOrErrorMessage(addressFromString(factoryConfig[idxFactStakCntr]), "Invalid staking contract address") | |
260 | + | ||
261 | + | let slipageContract = valueOrErrorMessage(addressFromString(factoryConfig[idxFactSlippCntr]), "Invalid slipage contract address") | |
262 | + | ||
263 | + | let gwxContract = valueOrErrorMessage(addressFromString(factoryConfig[idxFactGwxRewCntr]), "Invalid gwx contract address") | |
264 | + | ||
265 | + | let restContract = valueOrErrorMessage(addressFromString(factoryConfig[idxFactoryRestCntr]), "Invalid gwx contract address") | |
266 | + | ||
267 | + | 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) | |
268 | + | ||
269 | + | ||
270 | + | 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) | |
271 | + | ||
272 | + | ||
273 | + | func getAccBalance (assetId) = if ((assetId == "WAVES")) | |
274 | + | then wavesBalance(this).available | |
275 | + | else assetBalance(this, fromBase58String(assetId)) | |
276 | + | ||
277 | + | ||
278 | + | func cpbi (prAmtX18,amAmtX18) = fraction(prAmtX18, scale18, amAmtX18) | |
279 | + | ||
280 | + | ||
281 | + | func cpbir (prAmtX18,amAmtX18,round) = fraction(prAmtX18, scale18, amAmtX18, round) | |
282 | + | ||
283 | + | ||
284 | + | func vad (A1,A2,slippage) = { | |
285 | + | let diff = fraction((A1 - A2), scale8BigInt, A2) | |
286 | + | let pass = ((slippage - abs(diff)) > zeroBigInt) | |
287 | + | if (!(pass)) | |
288 | + | then throw(("Big slpg: " + toString(diff))) | |
289 | + | else $Tuple2(pass, min([A1, A2])) | |
290 | + | } | |
291 | + | ||
292 | + | ||
293 | + | func vd (D1,D0,slpg) = { | |
294 | + | let diff = fraction(D0, scale8BigInt, D1) | |
295 | + | let fail = (slpg > diff) | |
296 | + | if (if (fail) | |
297 | + | then true | |
298 | + | else (D0 > D1)) | |
299 | + | then throw(((((((toString(D0) + " ") + toString(D1)) + " ") + toString(diff)) + " ") + toString(slpg))) | |
300 | + | else fail | |
301 | + | } | |
302 | + | ||
303 | + | ||
304 | + | func pcp (amAssetDcm,prAssetDcm,amAmt,prAmt) = { | |
305 | + | let amtAsAmtX18 = t1(amAmt, amAssetDcm) | |
306 | + | let prAsAmtX18 = t1(prAmt, prAssetDcm) | |
307 | + | cpbi(prAsAmtX18, amtAsAmtX18) | |
308 | + | } | |
309 | + | ||
310 | + | ||
311 | + | func calcPrices (amAmt,prAmt,lpAmt) = { | |
312 | + | let amtAsDcm = cfgAmountAssetDecimals | |
313 | + | let prAsDcm = cfgPriceAssetDecimals | |
314 | + | let priceX18 = pcp(amtAsDcm, prAsDcm, amAmt, prAmt) | |
315 | + | let amAmtX18 = t1(amAmt, amtAsDcm) | |
316 | + | let prAmtX18 = t1(prAmt, prAsDcm) | |
317 | + | let lpAmtX18 = t1(lpAmt, scale8) | |
318 | + | let lpPrInAmAsX18 = cpbi(amAmtX18, lpAmtX18) | |
319 | + | let lpPrInPrAsX18 = cpbi(prAmtX18, lpAmtX18) | |
320 | + | [priceX18, lpPrInAmAsX18, lpPrInPrAsX18] | |
321 | + | } | |
322 | + | ||
323 | + | ||
324 | + | func calculatePrices (amAmt,prAmt,lpAmt) = { | |
325 | + | let p = calcPrices(amAmt, prAmt, lpAmt) | |
326 | + | [f1(p[0], scale8), f1(p[1], scale8), f1(p[2], scale8)] | |
327 | + | } | |
328 | + | ||
329 | + | ||
330 | + | func takeFee (amount,fee) = { | |
331 | + | let feeAmount = if ((fee == 0)) | |
332 | + | then 0 | |
333 | + | else fraction(amount, fee, scale8) | |
334 | + | $Tuple2((amount - feeAmount), feeAmount) | |
335 | + | } | |
336 | + | ||
337 | + | ||
338 | + | func getD (xp) = { | |
339 | + | let xp0 = xp[0] | |
340 | + | let xp1 = xp[1] | |
341 | + | let s = (xp0 + xp1) | |
342 | + | if ((s == big0)) | |
343 | + | then big0 | |
46 | 344 | else { | |
47 | - | func cancelVotePredicateNew (accumulatedResultList,assetCode) = { | |
48 | - | let totalVotes4AssetKey = makeString(["vote", assetCode], "_") | |
49 | - | let userNsbtBalance4AssetKey = keyUserAssetBalance(toString(contextObj.caller), assetCode) | |
50 | - | let totalVotes4Asset = valueOrElse(getInteger(this, totalVotes4AssetKey), 0) | |
51 | - | let userNsbtBalance4Asset = valueOrElse(getInteger(this, userNsbtBalance4AssetKey), 0) | |
52 | - | if ((totalVotes4Asset == 0)) | |
53 | - | then accumulatedResultList | |
54 | - | else ((accumulatedResultList :+ IntegerEntry(totalVotes4AssetKey, (totalVotes4Asset - userNsbtBalance4Asset))) :+ IntegerEntry(userNsbtBalance4AssetKey, 0)) | |
345 | + | let a = parseIntValue(A) | |
346 | + | let ann = (a * 2) | |
347 | + | let p = fraction(xp0, xp1, big1) | |
348 | + | let xp0_xp1_n_n = fraction(p, big4, big1) | |
349 | + | let ann_s = fraction(toBigInt(ann), s, big1) | |
350 | + | let ann_1 = toBigInt((ann - 1)) | |
351 | + | func calcDNext (d) = { | |
352 | + | let dd = fraction(d, d, big1) | |
353 | + | let ddd = fraction(dd, d, big1) | |
354 | + | let dp = fraction(ddd, big1, xp0_xp1_n_n) | |
355 | + | fraction((ann_s + fraction(dp, big2, big1)), d, (fraction(ann_1, d, big1) + fraction(big3, dp, big1))) | |
55 | 356 | } | |
56 | 357 | ||
57 | - | ({ | |
58 | - | let $list27112800 = assets | |
59 | - | let $size27112800 = size($list27112800) | |
60 | - | let $acc027112800 = [IntegerEntry(userBalanceKey, 0)] | |
61 | - | if (($size27112800 == 0)) | |
62 | - | then $acc027112800 | |
63 | - | else { | |
64 | - | let $acc127112800 = cancelVotePredicateNew($acc027112800, $list27112800[0]) | |
65 | - | if (($size27112800 == 1)) | |
66 | - | then $acc127112800 | |
67 | - | else { | |
68 | - | let $acc227112800 = cancelVotePredicateNew($acc127112800, $list27112800[1]) | |
69 | - | if (($size27112800 == 2)) | |
70 | - | then $acc227112800 | |
71 | - | else { | |
72 | - | let $acc327112800 = cancelVotePredicateNew($acc227112800, $list27112800[2]) | |
73 | - | if (($size27112800 == 3)) | |
74 | - | then $acc327112800 | |
75 | - | else { | |
76 | - | let $acc427112800 = cancelVotePredicateNew($acc327112800, $list27112800[3]) | |
77 | - | if (($size27112800 == 4)) | |
78 | - | then $acc427112800 | |
79 | - | else { | |
80 | - | let $acc527112800 = cancelVotePredicateNew($acc427112800, $list27112800[4]) | |
81 | - | if (($size27112800 == 5)) | |
82 | - | then $acc527112800 | |
83 | - | else { | |
84 | - | let $acc627112800 = cancelVotePredicateNew($acc527112800, $list27112800[5]) | |
85 | - | if (($size27112800 == 6)) | |
86 | - | then $acc627112800 | |
87 | - | else { | |
88 | - | let $acc727112800 = cancelVotePredicateNew($acc627112800, $list27112800[6]) | |
89 | - | if (($size27112800 == 7)) | |
90 | - | then $acc727112800 | |
91 | - | else { | |
92 | - | let $acc827112800 = cancelVotePredicateNew($acc727112800, $list27112800[7]) | |
93 | - | if (($size27112800 == 8)) | |
94 | - | then $acc827112800 | |
95 | - | else { | |
96 | - | let $acc927112800 = cancelVotePredicateNew($acc827112800, $list27112800[8]) | |
97 | - | if (($size27112800 == 9)) | |
98 | - | then $acc927112800 | |
99 | - | else { | |
100 | - | let $acc1027112800 = cancelVotePredicateNew($acc927112800, $list27112800[9]) | |
101 | - | if (($size27112800 == 10)) | |
102 | - | then $acc1027112800 | |
103 | - | else { | |
104 | - | let $acc1127112800 = cancelVotePredicateNew($acc1027112800, $list27112800[10]) | |
105 | - | if (($size27112800 == 11)) | |
106 | - | then $acc1127112800 | |
107 | - | else { | |
108 | - | let $acc1227112800 = cancelVotePredicateNew($acc1127112800, $list27112800[11]) | |
109 | - | if (($size27112800 == 12)) | |
110 | - | then $acc1227112800 | |
111 | - | else { | |
112 | - | let $acc1327112800 = cancelVotePredicateNew($acc1227112800, $list27112800[12]) | |
113 | - | if (($size27112800 == 13)) | |
114 | - | then $acc1327112800 | |
115 | - | else { | |
116 | - | let $acc1427112800 = cancelVotePredicateNew($acc1327112800, $list27112800[13]) | |
117 | - | if (($size27112800 == 14)) | |
118 | - | then $acc1427112800 | |
119 | - | else { | |
120 | - | let $acc1527112800 = cancelVotePredicateNew($acc1427112800, $list27112800[14]) | |
121 | - | if (($size27112800 == 15)) | |
122 | - | then $acc1527112800 | |
123 | - | else { | |
124 | - | let $acc1627112800 = cancelVotePredicateNew($acc1527112800, $list27112800[15]) | |
125 | - | if (($size27112800 == 16)) | |
126 | - | then $acc1627112800 | |
127 | - | else { | |
128 | - | let $acc1727112800 = cancelVotePredicateNew($acc1627112800, $list27112800[16]) | |
129 | - | if (($size27112800 == 17)) | |
130 | - | then $acc1727112800 | |
131 | - | else { | |
132 | - | let $acc1827112800 = cancelVotePredicateNew($acc1727112800, $list27112800[17]) | |
133 | - | if (($size27112800 == 18)) | |
134 | - | then $acc1827112800 | |
135 | - | else { | |
136 | - | let $acc1927112800 = cancelVotePredicateNew($acc1827112800, $list27112800[18]) | |
137 | - | if (($size27112800 == 19)) | |
138 | - | then $acc1927112800 | |
139 | - | else { | |
140 | - | let $acc2027112800 = cancelVotePredicateNew($acc1927112800, $list27112800[19]) | |
141 | - | if (($size27112800 == 20)) | |
142 | - | then $acc2027112800 | |
143 | - | else { | |
144 | - | let $acc2127112800 = cancelVotePredicateNew($acc2027112800, $list27112800[20]) | |
145 | - | throw("List size exceed 20") | |
146 | - | } | |
147 | - | } | |
148 | - | } | |
149 | - | } | |
150 | - | } | |
151 | - | } | |
152 | - | } | |
153 | - | } | |
154 | - | } | |
155 | - | } | |
156 | - | } | |
157 | - | } | |
158 | - | } | |
159 | - | } | |
160 | - | } | |
161 | - | } | |
162 | - | } | |
163 | - | } | |
164 | - | } | |
165 | - | } | |
166 | - | } | |
167 | - | } :+ ScriptTransfer(contextObj.caller, contractUserBalance, NSBTid)) | |
358 | + | func calc (acc,i) = if (acc._2) | |
359 | + | then acc | |
360 | + | else { | |
361 | + | let d = acc._1 | |
362 | + | let dNext = calcDNext(d) | |
363 | + | let dDiffRaw = (dNext - value(d)) | |
364 | + | let dDiff = if ((big0 > dDiffRaw)) | |
365 | + | then -(dDiffRaw) | |
366 | + | else dDiffRaw | |
367 | + | if ((big1 >= dDiff)) | |
368 | + | then $Tuple2(dNext, true) | |
369 | + | else $Tuple2(dNext, false) | |
370 | + | } | |
371 | + | ||
372 | + | let arr = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17] | |
373 | + | let $t01305513103 = { | |
374 | + | let $l = arr | |
375 | + | let $s = size($l) | |
376 | + | let $acc0 = $Tuple2(s, false) | |
377 | + | func $f0_1 ($a,$i) = if (($i >= $s)) | |
378 | + | then $a | |
379 | + | else calc($a, $l[$i]) | |
380 | + | ||
381 | + | func $f0_2 ($a,$i) = if (($i >= $s)) | |
382 | + | then $a | |
383 | + | else throw("List size exceeds 18") | |
384 | + | ||
385 | + | $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($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18) | |
386 | + | } | |
387 | + | let d = $t01305513103._1 | |
388 | + | let found = $t01305513103._2 | |
389 | + | if (found) | |
390 | + | then d | |
391 | + | else throw(("D calculation error, D = " + toString(d))) | |
168 | 392 | } | |
169 | 393 | } | |
170 | 394 | ||
171 | 395 | ||
396 | + | func ego (txId58,pmtAssetId,pmtLpAmt,userAddress) = { | |
397 | + | let lpId = cfgLpAssetId | |
398 | + | let amId = toBase58String(value(cfgAmountAssetId)) | |
399 | + | let prId = toBase58String(value(cfgPriceAssetId)) | |
400 | + | let amDcm = cfgAmountAssetDecimals | |
401 | + | let prDcm = cfgPriceAssetDecimals | |
402 | + | let sts = toString(cfgPoolStatus) | |
403 | + | let lpEmiss = valueOrErrorMessage(assetInfo(lpId), "Wrong LP id").quantity | |
404 | + | if ((toBase58String(lpId) != pmtAssetId)) | |
405 | + | then throw("Wrong pmt asset") | |
406 | + | else { | |
407 | + | let amBalance = getAccBalance(amId) | |
408 | + | let amBalanceX18 = t1(amBalance, amDcm) | |
409 | + | let prBalance = getAccBalance(prId) | |
410 | + | let prBalanceX18 = t1(prBalance, prDcm) | |
411 | + | let curPriceX18 = cpbi(prBalanceX18, amBalanceX18) | |
412 | + | let curPrice = f1(curPriceX18, scale8) | |
413 | + | let pmtLpAmtX18 = t1(pmtLpAmt, scale8) | |
414 | + | let lpEmissX18 = t1(lpEmiss, scale8) | |
415 | + | let outAmAmtX18 = fraction(amBalanceX18, pmtLpAmtX18, lpEmissX18) | |
416 | + | let outPrAmtX18 = fraction(prBalanceX18, pmtLpAmtX18, lpEmissX18) | |
417 | + | let outAmAmt = fromX18Round(outAmAmtX18, amDcm, FLOOR) | |
418 | + | let outPrAmt = fromX18Round(outPrAmtX18, prDcm, FLOOR) | |
419 | + | let state = if ((txId58 == "")) | |
420 | + | then nil | |
421 | + | else [ScriptTransfer(userAddress, outAmAmt, if ((amId == "WAVES")) | |
422 | + | then unit | |
423 | + | else fromBase58String(amId)), ScriptTransfer(userAddress, outPrAmt, if ((prId == "WAVES")) | |
424 | + | then unit | |
425 | + | 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)] | |
426 | + | $Tuple10(outAmAmt, outPrAmt, amId, prId, amBalance, prBalance, lpEmiss, curPriceX18, sts, state) | |
427 | + | } | |
428 | + | } | |
172 | 429 | ||
173 | - | @Callable(contextObj) | |
174 | - | func withdraw () = { | |
175 | - | let userBalanceKey = keyUserBalance(contextObj.caller) | |
176 | - | if ((heightEnd > height)) | |
177 | - | then throw("Vote in process") | |
430 | + | ||
431 | + | func epo (txId58,slippage,inAmAmt,inAmId,inPrAmt,inPrId,userAddress,isEval,emitLp,isOneAsset,validateSlippage,pmtAmt,pmtId) = { | |
432 | + | let lpId = cfgLpAssetId | |
433 | + | let amIdStr = toBase58String(value(cfgAmountAssetId)) | |
434 | + | let prIdStr = toBase58String(value(cfgPriceAssetId)) | |
435 | + | let inAmIdStr = cfgInAmountAssedId | |
436 | + | let inPrIdStr = cfgInPriceAssetId | |
437 | + | let amtDcm = cfgAmountAssetDecimals | |
438 | + | let priceDcm = cfgPriceAssetDecimals | |
439 | + | let sts = toString(cfgPoolStatus) | |
440 | + | let lpEm = valueOrErrorMessage(assetInfo(lpId), "Wr lp as").quantity | |
441 | + | let amBalance = if (isEval) | |
442 | + | then getAccBalance(amIdStr) | |
443 | + | else if (if (isOneAsset) | |
444 | + | then (pmtId == amIdStr) | |
445 | + | else false) | |
446 | + | then (getAccBalance(amIdStr) - pmtAmt) | |
447 | + | else if (isOneAsset) | |
448 | + | then getAccBalance(amIdStr) | |
449 | + | else (getAccBalance(amIdStr) - inAmAmt) | |
450 | + | let prBalance = if (isEval) | |
451 | + | then getAccBalance(prIdStr) | |
452 | + | else if (if (isOneAsset) | |
453 | + | then (pmtId == prIdStr) | |
454 | + | else false) | |
455 | + | then (getAccBalance(prIdStr) - pmtAmt) | |
456 | + | else if (isOneAsset) | |
457 | + | then getAccBalance(prIdStr) | |
458 | + | else (getAccBalance(prIdStr) - inPrAmt) | |
459 | + | let inAmAssetAmtX18 = t1(inAmAmt, amtDcm) | |
460 | + | let inPrAssetAmtX18 = t1(inPrAmt, priceDcm) | |
461 | + | let userPriceX18 = cpbi(inPrAssetAmtX18, inAmAssetAmtX18) | |
462 | + | let amBalanceX18 = t1(amBalance, amtDcm) | |
463 | + | let prBalanceX18 = t1(prBalance, priceDcm) | |
464 | + | let D0 = getD([amBalanceX18, prBalanceX18]) | |
465 | + | let r = if ((lpEm == 0)) | |
466 | + | then { | |
467 | + | let D1 = getD([(amBalanceX18 + inAmAssetAmtX18), (prBalanceX18 + inPrAssetAmtX18)]) | |
468 | + | let checkD = if ((D1 > D0)) | |
469 | + | then true | |
470 | + | else throw("D1 should be greater than D0") | |
471 | + | if ((checkD == checkD)) | |
472 | + | then { | |
473 | + | let curPriceX18 = zeroBigInt | |
474 | + | let slippageX18 = zeroBigInt | |
475 | + | let lpAmtX18 = D1 | |
476 | + | $Tuple5(f1(lpAmtX18, scale8), f1(inAmAssetAmtX18, amtDcm), f1(inPrAssetAmtX18, priceDcm), cpbi((prBalanceX18 + inPrAssetAmtX18), (amBalanceX18 + inAmAssetAmtX18)), slippageX18) | |
477 | + | } | |
478 | + | else throw("Strict value is not equal to itself.") | |
479 | + | } | |
178 | 480 | else { | |
179 | - | let callerBalance = valueOrElse(getInteger(this, userBalanceKey), 0) | |
180 | - | if ((0 >= callerBalance)) | |
181 | - | then throw("balance is empty") | |
182 | - | else [ScriptTransfer(contextObj.caller, callerBalance, NSBTid), IntegerEntry(userBalanceKey, 0)] | |
481 | + | let curPriceX18 = cpbi(prBalanceX18, amBalanceX18) | |
482 | + | let slippageRealX18 = fraction(abs((curPriceX18 - userPriceX18)), scale18, curPriceX18) | |
483 | + | let slippageX18 = t1(slippage, scale8) | |
484 | + | if (if (if (validateSlippage) | |
485 | + | then (curPriceX18 != zeroBigInt) | |
486 | + | else false) | |
487 | + | then (slippageRealX18 > slippageX18) | |
488 | + | else false) | |
489 | + | then throw(((("Price slippage " + toString(slippageRealX18)) + " > ") + toString(slippageX18))) | |
490 | + | else { | |
491 | + | let lpEmissionX18 = t1(lpEm, scale8) | |
492 | + | let prViaAmX18 = fraction(inAmAssetAmtX18, cpbir(prBalanceX18, amBalanceX18, CEILING), scale18, CEILING) | |
493 | + | let amViaPrX18 = fraction(inPrAssetAmtX18, scale18, cpbir(prBalanceX18, amBalanceX18, FLOOR), CEILING) | |
494 | + | let expectedAmts = if ((prViaAmX18 > inPrAssetAmtX18)) | |
495 | + | then $Tuple2(amViaPrX18, inPrAssetAmtX18) | |
496 | + | else $Tuple2(inAmAssetAmtX18, prViaAmX18) | |
497 | + | let expAmtAssetAmtX18 = expectedAmts._1 | |
498 | + | let expPriceAssetAmtX18 = expectedAmts._2 | |
499 | + | let D1 = getD([(amBalanceX18 + expAmtAssetAmtX18), (prBalanceX18 + expPriceAssetAmtX18)]) | |
500 | + | let checkD = if ((D1 > D0)) | |
501 | + | then true | |
502 | + | else throw("D1 should be greater than D0") | |
503 | + | if ((checkD == checkD)) | |
504 | + | then { | |
505 | + | let lpAmtX18 = fraction(lpEmissionX18, (D1 - D0), D0) | |
506 | + | $Tuple5(fromX18Round(lpAmtX18, scale8, FLOOR), fromX18Round(expAmtAssetAmtX18, amtDcm, CEILING), fromX18Round(expPriceAssetAmtX18, priceDcm, CEILING), curPriceX18, slippageX18) | |
507 | + | } | |
508 | + | else throw("Strict value is not equal to itself.") | |
509 | + | } | |
183 | 510 | } | |
511 | + | let calcLpAmt = r._1 | |
512 | + | let calcAmAssetPmt = r._2 | |
513 | + | let calcPrAssetPmt = r._3 | |
514 | + | let curPrice = f1(r._4, scale8) | |
515 | + | let slippageCalc = f1(r._5, scale8) | |
516 | + | if ((0 >= calcLpAmt)) | |
517 | + | then throw("LP <= 0") | |
518 | + | else { | |
519 | + | let emitLpAmt = if (!(emitLp)) | |
520 | + | then 0 | |
521 | + | else calcLpAmt | |
522 | + | let amDiff = (inAmAmt - calcAmAssetPmt) | |
523 | + | let prDiff = (inPrAmt - calcPrAssetPmt) | |
524 | + | let $t02113021479 = if (if (isOneAsset) | |
525 | + | then (pmtId == amIdStr) | |
526 | + | else false) | |
527 | + | then $Tuple2(pmtAmt, 0) | |
528 | + | else if (if (isOneAsset) | |
529 | + | then (pmtId == prIdStr) | |
530 | + | else false) | |
531 | + | then $Tuple2(0, pmtAmt) | |
532 | + | else $Tuple2(calcAmAssetPmt, calcPrAssetPmt) | |
533 | + | let writeAmAmt = $t02113021479._1 | |
534 | + | let writePrAmt = $t02113021479._2 | |
535 | + | 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))] | |
536 | + | $Tuple13(calcLpAmt, emitLpAmt, curPrice, amBalance, prBalance, lpEm, lpId, sts, commonState, amDiff, prDiff, inAmId, inPrId) | |
537 | + | } | |
538 | + | } | |
539 | + | ||
540 | + | ||
541 | + | func getYD (xp,i,D) = { | |
542 | + | let n = big2 | |
543 | + | let x = xp[if ((i == 0)) | |
544 | + | then 1 | |
545 | + | else 0] | |
546 | + | let aPrecision = parseBigIntValue(Amult) | |
547 | + | let a = (parseBigIntValue(A) * aPrecision) | |
548 | + | let s = x | |
549 | + | let ann = (a * n) | |
550 | + | let c = (((((D * D) / (x * n)) * D) * aPrecision) / (ann * n)) | |
551 | + | let b = ((s + ((D * aPrecision) / ann)) - D) | |
552 | + | func calc (acc,cur) = { | |
553 | + | let $t02271122731 = acc | |
554 | + | let y = $t02271122731._1 | |
555 | + | let found = $t02271122731._2 | |
556 | + | if ((found != unit)) | |
557 | + | then acc | |
558 | + | else { | |
559 | + | let yNext = (((y * y) + c) / ((big2 * y) + b)) | |
560 | + | let yDiff = absBigInt((yNext - value(y))) | |
561 | + | if ((big1 >= yDiff)) | |
562 | + | then $Tuple2(yNext, cur) | |
563 | + | else $Tuple2(yNext, unit) | |
564 | + | } | |
565 | + | } | |
566 | + | ||
567 | + | let arr = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14] | |
568 | + | let $t02305023097 = { | |
569 | + | let $l = arr | |
570 | + | let $s = size($l) | |
571 | + | let $acc0 = $Tuple2(D, unit) | |
572 | + | func $f0_1 ($a,$i) = if (($i >= $s)) | |
573 | + | then $a | |
574 | + | else calc($a, $l[$i]) | |
575 | + | ||
576 | + | func $f0_2 ($a,$i) = if (($i >= $s)) | |
577 | + | then $a | |
578 | + | else throw("List size exceeds 15") | |
579 | + | ||
580 | + | $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) | |
581 | + | } | |
582 | + | let y = $t02305023097._1 | |
583 | + | let found = $t02305023097._2 | |
584 | + | if ((found != unit)) | |
585 | + | then y | |
586 | + | else throw(("Y calculation error, Y = " + toString(y))) | |
587 | + | } | |
588 | + | ||
589 | + | ||
590 | + | func calcDLp (amountBalance,priceBalance,lpEmission) = { | |
591 | + | let updatedDLp = fraction(getD([t1BigInt(amountBalance, toBigInt(cfgAmountAssetDecimals)), t1BigInt(priceBalance, toBigInt(cfgPriceAssetDecimals))]), scale18, lpEmission) | |
592 | + | if ((lpEmission == big0)) | |
593 | + | then big0 | |
594 | + | else updatedDLp | |
595 | + | } | |
596 | + | ||
597 | + | ||
598 | + | func calcCurrentDLp (amountAssetDelta,priceAssetDelta,lpAssetEmissionDelta) = { | |
599 | + | let amountAssetBalance = (toBigInt(getAccBalance(assetIdToString(cfgAmountAssetId))) - amountAssetDelta) | |
600 | + | let priceAssetBalance = (toBigInt(getAccBalance(assetIdToString(cfgPriceAssetId))) - priceAssetDelta) | |
601 | + | let lpAssetEmission = (toBigInt(value(assetInfo(cfgLpAssetId)).quantity) - lpAssetEmissionDelta) | |
602 | + | let currentDLp = calcDLp(amountAssetBalance, priceAssetBalance, lpAssetEmission) | |
603 | + | currentDLp | |
604 | + | } | |
605 | + | ||
606 | + | ||
607 | + | func refreshDLpInternal (amountAssetBalanceDelta,priceAssetBalanceDelta,lpAssetEmissionDelta) = { | |
608 | + | let amountAssetBalance = (getAccBalance(assetIdToString(cfgAmountAssetId)) + amountAssetBalanceDelta) | |
609 | + | let priceAssetBalance = (getAccBalance(assetIdToString(cfgPriceAssetId)) + priceAssetBalanceDelta) | |
610 | + | let lpAssetEmission = (value(assetInfo(cfgLpAssetId)).quantity + lpAssetEmissionDelta) | |
611 | + | let updatedDLp = calcDLp(toBigInt(amountAssetBalance), toBigInt(priceAssetBalance), toBigInt(lpAssetEmission)) | |
612 | + | let actions = [IntegerEntry(keyDLpRefreshedHeight, height), StringEntry(keyDLp, toString(updatedDLp))] | |
613 | + | $Tuple2(actions, updatedDLp) | |
614 | + | } | |
615 | + | ||
616 | + | ||
617 | + | func validateUpdatedDLp (oldDLp,updatedDLp) = if ((updatedDLp >= oldDLp)) | |
618 | + | then true | |
619 | + | else throwErr("updated DLp lower than current DLp") | |
620 | + | ||
621 | + | ||
622 | + | func validateMatcherOrderAllowed (order) = { | |
623 | + | let amountAssetBalance = getAccBalance(assetIdToString(cfgAmountAssetId)) | |
624 | + | let priceAssetBalance = getAccBalance(assetIdToString(cfgPriceAssetId)) | |
625 | + | let amountAssetAmount = order.amount | |
626 | + | let priceAssetAmount = fraction(order.amount, order.price, scale8, FLOOR) | |
627 | + | let $t02535225571 = if ((order.orderType == Buy)) | |
628 | + | then $Tuple2(amountAssetAmount, -(priceAssetAmount)) | |
629 | + | else $Tuple2(-(amountAssetAmount), priceAssetAmount) | |
630 | + | let amountAssetBalanceDelta = $t02535225571._1 | |
631 | + | let priceAssetBalanceDelta = $t02535225571._2 | |
632 | + | if (if (if (igs()) | |
633 | + | then true | |
634 | + | else (cfgPoolStatus == PoolMatcherDis)) | |
635 | + | then true | |
636 | + | else (cfgPoolStatus == PoolShutdown)) | |
637 | + | then throw("Admin blocked") | |
638 | + | else if (if ((order.assetPair.amountAsset != cfgAmountAssetId)) | |
639 | + | then true | |
640 | + | else (order.assetPair.priceAsset != cfgPriceAssetId)) | |
641 | + | then throw("Wr assets") | |
642 | + | else { | |
643 | + | let dLp = parseBigIntValue(valueOrElse(getString(this, keyDLp), "0")) | |
644 | + | let $t02591926019 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0) | |
645 | + | let unusedActions = $t02591926019._1 | |
646 | + | let dLpNew = $t02591926019._2 | |
647 | + | let isOrderValid = (dLpNew >= dLp) | |
648 | + | let info = makeString(["dLp=", toString(dLp), " dLpNew=", toString(dLpNew), " amountAssetBalance=", toString(amountAssetBalance), " priceAssetBalance=", toString(priceAssetBalance), " amountAssetBalanceDelta=", toString(amountAssetBalanceDelta), " priceAssetBalanceDelta=", toString(priceAssetBalanceDelta), " height=", toString(height)], "") | |
649 | + | $Tuple2(isOrderValid, info) | |
650 | + | } | |
651 | + | } | |
652 | + | ||
653 | + | ||
654 | + | func cg (i) = if ((size(i.payments) != 1)) | |
655 | + | then throw("1 pmnt exp") | |
656 | + | else { | |
657 | + | let pmt = value(i.payments[0]) | |
658 | + | let pmtAssetId = value(pmt.assetId) | |
659 | + | let pmtAmt = pmt.amount | |
660 | + | let r = ego(toBase58String(i.transactionId), toBase58String(pmtAssetId), pmtAmt, i.caller) | |
661 | + | let outAmAmt = r._1 | |
662 | + | let outPrAmt = r._2 | |
663 | + | let sts = parseIntValue(r._9) | |
664 | + | let state = r._10 | |
665 | + | if (if (igs()) | |
666 | + | then true | |
667 | + | else (sts == PoolShutdown)) | |
668 | + | then throw(("Admin blocked: " + toString(sts))) | |
669 | + | else $Tuple5(outAmAmt, outPrAmt, pmtAmt, pmtAssetId, state) | |
670 | + | } | |
671 | + | ||
672 | + | ||
673 | + | func cp (caller,txId,amAsPmt,prAsPmt,slippage,emitLp,isOneAsset,validateSlippage,pmtAmt,pmtId) = { | |
674 | + | let r = epo(txId, slippage, value(amAsPmt).amount, value(amAsPmt).assetId, value(prAsPmt).amount, value(prAsPmt).assetId, caller, (txId == ""), emitLp, isOneAsset, validateSlippage, pmtAmt, pmtId) | |
675 | + | let sts = parseIntValue(r._8) | |
676 | + | if (if (if (igs()) | |
677 | + | then true | |
678 | + | else (sts == PoolPutDis)) | |
679 | + | then true | |
680 | + | else (sts == PoolShutdown)) | |
681 | + | then throw(("Blocked:" + toString(sts))) | |
682 | + | else r | |
683 | + | } | |
684 | + | ||
685 | + | ||
686 | + | func calcPutOneTkn (pmtAmtRaw,pmtAssetId,userAddress,txId,withTakeFee) = { | |
687 | + | let amId = toBase58String(value(cfgAmountAssetId)) | |
688 | + | let prId = toBase58String(value(cfgPriceAssetId)) | |
689 | + | let lpId = cfgLpAssetId | |
690 | + | let amtDcm = cfgAmountAssetDecimals | |
691 | + | let priceDcm = cfgPriceAssetDecimals | |
692 | + | let lpAssetEmission = toBigInt(valueOrErrorMessage(assetInfo(lpId), "invalid lp asset").quantity) | |
693 | + | let chechEmission = if ((lpAssetEmission > big0)) | |
694 | + | then true | |
695 | + | else throw("initial deposit requires all coins") | |
696 | + | if ((chechEmission == chechEmission)) | |
697 | + | then { | |
698 | + | let amBalance = getAccBalance(amId) | |
699 | + | let prBalance = getAccBalance(prId) | |
700 | + | let $t02876529236 = if ((txId == "")) | |
701 | + | then $Tuple2(amBalance, prBalance) | |
702 | + | else if ((pmtAssetId == amId)) | |
703 | + | then if ((pmtAmtRaw > amBalance)) | |
704 | + | then throw("invalid payment amount") | |
705 | + | else $Tuple2((amBalance - pmtAmtRaw), prBalance) | |
706 | + | else if ((pmtAssetId == prId)) | |
707 | + | then if ((pmtAmtRaw > prBalance)) | |
708 | + | then throw("invalid payment amount") | |
709 | + | else $Tuple2(amBalance, (prBalance - pmtAmtRaw)) | |
710 | + | else throw("wrong pmtAssetId") | |
711 | + | let amBalanceOld = $t02876529236._1 | |
712 | + | let prBalanceOld = $t02876529236._2 | |
713 | + | let $t02924429424 = if ((pmtAssetId == amId)) | |
714 | + | then $Tuple2(pmtAmtRaw, 0) | |
715 | + | else if ((pmtAssetId == prId)) | |
716 | + | then $Tuple2(0, pmtAmtRaw) | |
717 | + | else throw("invalid payment") | |
718 | + | let amAmountRaw = $t02924429424._1 | |
719 | + | let prAmountRaw = $t02924429424._2 | |
720 | + | let $t02943029696 = if (withTakeFee) | |
721 | + | then $Tuple3(takeFee(amAmountRaw, inFee)._1, takeFee(prAmountRaw, inFee)._1, takeFee(pmtAmtRaw, inFee)._2) | |
722 | + | else $Tuple3(amAmountRaw, prAmountRaw, 0) | |
723 | + | let amAmount = $t02943029696._1 | |
724 | + | let prAmount = $t02943029696._2 | |
725 | + | let feeAmount = $t02943029696._3 | |
726 | + | let amBalanceNew = (amBalanceOld + amAmount) | |
727 | + | let prBalanceNew = (prBalanceOld + prAmount) | |
728 | + | let D0 = getD([t1(amBalanceOld, cfgAmountAssetDecimals), t1(prBalanceOld, cfgPriceAssetDecimals)]) | |
729 | + | let D1 = getD([t1(amBalanceNew, cfgAmountAssetDecimals), t1(prBalanceNew, cfgPriceAssetDecimals)]) | |
730 | + | let checkD = if ((D1 > D0)) | |
731 | + | then true | |
732 | + | else throw() | |
733 | + | if ((checkD == checkD)) | |
734 | + | then { | |
735 | + | let lpAmount = fraction(lpAssetEmission, (D1 - D0), D0, FLOOR) | |
736 | + | let curPrice = f1(cpbi(t1(prBalanceNew, priceDcm), t1(amBalanceNew, amtDcm)), scale8) | |
737 | + | 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))] | |
738 | + | let poolProportion = fraction(prBalanceOld, scale8, amBalanceOld) | |
739 | + | let amountAssetPart = fraction(pmtAmtRaw, scale8, (poolProportion + scale8)) | |
740 | + | let priceAssetPart = (pmtAmtRaw - amountAssetPart) | |
741 | + | let lpAmtBoth = fraction(lpAssetEmission, toBigInt(priceAssetPart), toBigInt(prBalanceOld)) | |
742 | + | let bonus = toInt(fraction((lpAmount - lpAmtBoth), scale8BigInt, lpAmtBoth)) | |
743 | + | $Tuple4(toInt(lpAmount), commonState, feeAmount, bonus) | |
744 | + | } | |
745 | + | else throw("Strict value is not equal to itself.") | |
746 | + | } | |
747 | + | else throw("Strict value is not equal to itself.") | |
748 | + | } | |
749 | + | ||
750 | + | ||
751 | + | func getOneTknV2Internal (outAssetId,minOutAmount,payments,caller,originCaller,transactionId) = { | |
752 | + | let lpId = toBase58String(value(cfgLpAssetId)) | |
753 | + | let amId = toBase58String(value(cfgAmountAssetId)) | |
754 | + | let prId = toBase58String(value(cfgPriceAssetId)) | |
755 | + | let amDecimals = cfgAmountAssetDecimals | |
756 | + | let prDecimals = cfgPriceAssetDecimals | |
757 | + | let poolStatus = cfgPoolStatus | |
758 | + | let userAddress = if ((caller == restContract)) | |
759 | + | then originCaller | |
760 | + | else caller | |
761 | + | let pmt = value(payments[0]) | |
762 | + | let pmtAssetId = value(pmt.assetId) | |
763 | + | let pmtAmt = pmt.amount | |
764 | + | let currentDLp = calcCurrentDLp(big0, big0, big0) | |
765 | + | if ((currentDLp == currentDLp)) | |
766 | + | then { | |
767 | + | let txId58 = toBase58String(transactionId) | |
768 | + | if ((lpId != toBase58String(pmtAssetId))) | |
769 | + | then throw("Wrong LP") | |
770 | + | else { | |
771 | + | let amBalance = getAccBalance(amId) | |
772 | + | let prBalance = getAccBalance(prId) | |
773 | + | let $t03187131982 = { | |
774 | + | let @ = invoke(this, "getOneTknV2READONLY", [outAssetId, pmtAmt], nil) | |
775 | + | if ($isInstanceOf(@, "(Int, Int)")) | |
776 | + | then @ | |
777 | + | else throw(($getType(@) + " couldn't be cast to (Int, Int)")) | |
778 | + | } | |
779 | + | if (($t03187131982 == $t03187131982)) | |
780 | + | then { | |
781 | + | let feeAmount = $t03187131982._2 | |
782 | + | let totalGet = $t03187131982._1 | |
783 | + | let totalAmount = if (if ((minOutAmount > 0)) | |
784 | + | then (minOutAmount > totalGet) | |
785 | + | else false) | |
786 | + | then throwErr(makeString(["amount to receive is less than ", toString(minOutAmount)], "")) | |
787 | + | else totalGet | |
788 | + | let $t03217832491 = if ((outAssetId == amId)) | |
789 | + | then $Tuple4(totalAmount, 0, ((amBalance - totalAmount) - feeAmount), prBalance) | |
790 | + | else if ((outAssetId == prId)) | |
791 | + | then $Tuple4(0, totalAmount, amBalance, ((prBalance - totalAmount) - feeAmount)) | |
792 | + | else throw("invalid out asset id") | |
793 | + | let outAm = $t03217832491._1 | |
794 | + | let outPr = $t03217832491._2 | |
795 | + | let amBalanceNew = $t03217832491._3 | |
796 | + | let prBalanceNew = $t03217832491._4 | |
797 | + | let curPrX18 = cpbi(t1(prBalanceNew, prDecimals), t1(amBalanceNew, amDecimals)) | |
798 | + | let curPr = f1(curPrX18, scale8) | |
799 | + | let outAssetIdOrWaves = if ((outAssetId == "WAVES")) | |
800 | + | then unit | |
801 | + | else fromBase58String(outAssetId) | |
802 | + | let sendFeeToMatcher = if ((feeAmount > 0)) | |
803 | + | then [ScriptTransfer(feeCollectorAddress, feeAmount, outAssetIdOrWaves)] | |
804 | + | else nil | |
805 | + | 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) | |
806 | + | if ((state == state)) | |
807 | + | then { | |
808 | + | let burn = invoke(fca, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)]) | |
809 | + | if ((burn == burn)) | |
810 | + | then { | |
811 | + | let $t03329933653 = { | |
812 | + | let feeAmountForCalc = if ((this == feeCollectorAddress)) | |
813 | + | then 0 | |
814 | + | else feeAmount | |
815 | + | let outInAmountAsset = if ((parseAssetId(outAssetId) == cfgAmountAssetId)) | |
816 | + | then true | |
817 | + | else false | |
818 | + | if (outInAmountAsset) | |
819 | + | then $Tuple2(-((totalGet + feeAmountForCalc)), 0) | |
820 | + | else $Tuple2(0, -((totalGet + feeAmountForCalc))) | |
821 | + | } | |
822 | + | let amountAssetBalanceDelta = $t03329933653._1 | |
823 | + | let priceAssetBalanceDelta = $t03329933653._2 | |
824 | + | let $t03365733765 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0) | |
825 | + | let refreshDLpActions = $t03365733765._1 | |
826 | + | let updatedDLp = $t03365733765._2 | |
827 | + | let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp) | |
828 | + | if ((isUpdatedDLpValid == isUpdatedDLpValid)) | |
829 | + | then $Tuple2((state ++ refreshDLpActions), totalAmount) | |
830 | + | else throw("Strict value is not equal to itself.") | |
831 | + | } | |
832 | + | else throw("Strict value is not equal to itself.") | |
833 | + | } | |
834 | + | else throw("Strict value is not equal to itself.") | |
835 | + | } | |
836 | + | else throw("Strict value is not equal to itself.") | |
837 | + | } | |
838 | + | } | |
839 | + | else throw("Strict value is not equal to itself.") | |
840 | + | } | |
841 | + | ||
842 | + | ||
843 | + | func m () = match getString(mpk()) { | |
844 | + | case s: String => | |
845 | + | fromBase58String(s) | |
846 | + | case _: Unit => | |
847 | + | unit | |
848 | + | case _ => | |
849 | + | throw("Match error") | |
850 | + | } | |
851 | + | ||
852 | + | ||
853 | + | func pm () = match getString(pmpk()) { | |
854 | + | case s: String => | |
855 | + | fromBase58String(s) | |
856 | + | case _: Unit => | |
857 | + | unit | |
858 | + | case _ => | |
859 | + | throw("Match error") | |
860 | + | } | |
861 | + | ||
862 | + | ||
863 | + | let pd = throw("Permission denied") | |
864 | + | ||
865 | + | func isManager (i) = match m() { | |
866 | + | case pk: ByteVector => | |
867 | + | (i.callerPublicKey == pk) | |
868 | + | case _: Unit => | |
869 | + | (i.caller == this) | |
870 | + | case _ => | |
871 | + | throw("Match error") | |
872 | + | } | |
873 | + | ||
874 | + | ||
875 | + | func mm (i) = match m() { | |
876 | + | case pk: ByteVector => | |
877 | + | if ((i.callerPublicKey == pk)) | |
878 | + | then true | |
879 | + | else pd | |
880 | + | case _: Unit => | |
881 | + | if ((i.caller == this)) | |
882 | + | then true | |
883 | + | else pd | |
884 | + | case _ => | |
885 | + | throw("Match error") | |
886 | + | } | |
887 | + | ||
888 | + | ||
889 | + | func getY (isReverse,D,poolAmountInBalance) = { | |
890 | + | let poolConfig = gpc() | |
891 | + | let amId = poolConfig[idxAmAsId] | |
892 | + | let prId = poolConfig[idxPrAsId] | |
893 | + | let n = big2 | |
894 | + | let aPrecision = parseBigIntValue(Amult) | |
895 | + | let a = (parseBigIntValue(A) * aPrecision) | |
896 | + | let xp = if ((isReverse == false)) | |
897 | + | then [(toBigInt(getAccBalance(amId)) + poolAmountInBalance), toBigInt(getAccBalance(prId))] | |
898 | + | else [(toBigInt(getAccBalance(prId)) + poolAmountInBalance), toBigInt(getAccBalance(amId))] | |
899 | + | let x = xp[0] | |
900 | + | let s = x | |
901 | + | let ann = (a * n) | |
902 | + | let c = (((((D * D) / (x * n)) * D) * aPrecision) / (ann * n)) | |
903 | + | let b = ((s + ((D * aPrecision) / ann)) - D) | |
904 | + | func calc (acc,cur) = { | |
905 | + | let $t03526835288 = acc | |
906 | + | let y = $t03526835288._1 | |
907 | + | let found = $t03526835288._2 | |
908 | + | if ((found != unit)) | |
909 | + | then acc | |
910 | + | else { | |
911 | + | let yNext = (((y * y) + c) / ((big2 * y) + b)) | |
912 | + | let yDiff = absBigInt((yNext - value(y))) | |
913 | + | if ((big1 >= yDiff)) | |
914 | + | then $Tuple2(yNext, cur) | |
915 | + | else $Tuple2(yNext, unit) | |
916 | + | } | |
917 | + | } | |
918 | + | ||
919 | + | let arr = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14] | |
920 | + | let $t03563135678 = { | |
921 | + | let $l = arr | |
922 | + | let $s = size($l) | |
923 | + | let $acc0 = $Tuple2(D, unit) | |
924 | + | func $f0_1 ($a,$i) = if (($i >= $s)) | |
925 | + | then $a | |
926 | + | else calc($a, $l[$i]) | |
927 | + | ||
928 | + | func $f0_2 ($a,$i) = if (($i >= $s)) | |
929 | + | then $a | |
930 | + | else throw("List size exceeds 15") | |
931 | + | ||
932 | + | $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) | |
933 | + | } | |
934 | + | let y = $t03563135678._1 | |
935 | + | let found = $t03563135678._2 | |
936 | + | if ((found != unit)) | |
937 | + | then y | |
938 | + | else throw(("Y calculation error, Y = " + toString(y))) | |
939 | + | } | |
940 | + | ||
941 | + | ||
942 | + | @Callable(i) | |
943 | + | func calculateAmountOutForSwapREADONLY (cleanAmountIn,isReverse,feePoolAmount) = { | |
944 | + | let $t03592936361 = if ((isReverse == false)) | |
945 | + | then { | |
946 | + | let assetOut = strf(this, pa()) | |
947 | + | let poolAmountInBalance = (toBigInt(getAccBalance(strf(this, aa()))) + toBigInt(cleanAmountIn)) | |
948 | + | $Tuple2(assetOut, poolAmountInBalance) | |
949 | + | } | |
950 | + | else { | |
951 | + | let assetOut = strf(this, aa()) | |
952 | + | let poolAmountInBalance = (toBigInt(getAccBalance(strf(this, pa()))) + toBigInt(cleanAmountIn)) | |
953 | + | $Tuple2(assetOut, poolAmountInBalance) | |
954 | + | } | |
955 | + | let assetOut = $t03592936361._1 | |
956 | + | let poolAmountInBalance = $t03592936361._2 | |
957 | + | let poolConfig = gpc() | |
958 | + | let amId = poolConfig[idxAmAsId] | |
959 | + | let prId = poolConfig[idxPrAsId] | |
960 | + | let xp = [toBigInt(getAccBalance(amId)), toBigInt(getAccBalance(prId))] | |
961 | + | let D = getD(xp) | |
962 | + | let y = getY(isReverse, D, toBigInt(cleanAmountIn)) | |
963 | + | let dy = ((toBigInt(getAccBalance(assetOut)) - y) - toBigInt(1)) | |
964 | + | let totalGetRaw = max([0, toInt(dy)]) | |
965 | + | let newXp = if ((isReverse == false)) | |
966 | + | then [((toBigInt(getAccBalance(amId)) + toBigInt(cleanAmountIn)) + toBigInt(feePoolAmount)), (toBigInt(getAccBalance(prId)) - dy)] | |
967 | + | else [(toBigInt(getAccBalance(amId)) - dy), ((toBigInt(getAccBalance(prId)) + toBigInt(cleanAmountIn)) + toBigInt(feePoolAmount))] | |
968 | + | let newD = getD(newXp) | |
969 | + | let checkD = if ((newD >= D)) | |
970 | + | then true | |
971 | + | else throw(makeString(["new D is fewer error", toString(D), toString(newD)], "__")) | |
972 | + | if ((checkD == checkD)) | |
973 | + | then $Tuple2(nil, totalGetRaw) | |
974 | + | else throw("Strict value is not equal to itself.") | |
975 | + | } | |
976 | + | ||
977 | + | ||
978 | + | ||
979 | + | @Callable(i) | |
980 | + | func calculateAmountOutForSwapAndSendTokens (cleanAmountIn,isReverse,amountOutMin,addressTo,feePoolAmount) = { | |
981 | + | let swapContact = { | |
982 | + | let @ = invoke(fca, "getSwapContractREADONLY", nil, nil) | |
983 | + | if ($isInstanceOf(@, "String")) | |
984 | + | then @ | |
985 | + | else throw(($getType(@) + " couldn't be cast to String")) | |
986 | + | } | |
987 | + | let checks = [if ((value(i.payments[0]).amount >= cleanAmountIn)) | |
988 | + | then true | |
989 | + | else throwErr("Wrong amount"), if ((i.caller == addressFromStringValue(swapContact))) | |
990 | + | then true | |
991 | + | else throwErr("Permission denied")] | |
992 | + | if ((checks == checks)) | |
993 | + | then { | |
994 | + | let pmt = value(i.payments[0]) | |
995 | + | let assetIn = assetIdToString(pmt.assetId) | |
996 | + | let $t03783738239 = if ((isReverse == false)) | |
997 | + | then { | |
998 | + | let assetOut = strf(this, pa()) | |
999 | + | let poolAmountInBalance = (getAccBalance(assetIn) - value(i.payments[0]).amount) | |
1000 | + | $Tuple2(assetOut, poolAmountInBalance) | |
1001 | + | } | |
1002 | + | else { | |
1003 | + | let assetOut = strf(this, aa()) | |
1004 | + | let poolAmountInBalance = (getAccBalance(assetIn) - value(i.payments[0]).amount) | |
1005 | + | $Tuple2(assetOut, poolAmountInBalance) | |
1006 | + | } | |
1007 | + | let assetOut = $t03783738239._1 | |
1008 | + | let poolAmountInBalance = $t03783738239._2 | |
1009 | + | let poolConfig = gpc() | |
1010 | + | let amId = poolConfig[idxAmAsId] | |
1011 | + | let prId = poolConfig[idxPrAsId] | |
1012 | + | let xp = if ((isReverse == false)) | |
1013 | + | then [(toBigInt(getAccBalance(amId)) - toBigInt(value(i.payments[0]).amount)), toBigInt(getAccBalance(prId))] | |
1014 | + | else [toBigInt(getAccBalance(amId)), (toBigInt(getAccBalance(prId)) - toBigInt(value(i.payments[0]).amount))] | |
1015 | + | let D = getD(xp) | |
1016 | + | let y = getY(isReverse, D, toBigInt(0)) | |
1017 | + | let dy = ((toBigInt(getAccBalance(assetOut)) - y) - toBigInt(1)) | |
1018 | + | let totalGetRaw = max([0, toInt(dy)]) | |
1019 | + | let checkMin = if ((totalGetRaw >= amountOutMin)) | |
1020 | + | then true | |
1021 | + | else throw("Exchange result is fewer coins than expected") | |
1022 | + | if ((checkMin == checkMin)) | |
1023 | + | then { | |
1024 | + | let newXp = if ((isReverse == false)) | |
1025 | + | then [(toBigInt(getAccBalance(amId)) + toBigInt(feePoolAmount)), (toBigInt(getAccBalance(prId)) - dy)] | |
1026 | + | else [(toBigInt(getAccBalance(amId)) - dy), (toBigInt(getAccBalance(prId)) + toBigInt(feePoolAmount))] | |
1027 | + | let newD = getD(newXp) | |
1028 | + | let checkD = if ((newD >= D)) | |
1029 | + | then true | |
1030 | + | else throw("new D is fewer error") | |
1031 | + | if ((checkD == checkD)) | |
1032 | + | then $Tuple2([ScriptTransfer(addressFromStringValue(addressTo), totalGetRaw, parseAssetId(assetOut))], totalGetRaw) | |
1033 | + | else throw("Strict value is not equal to itself.") | |
1034 | + | } | |
1035 | + | else throw("Strict value is not equal to itself.") | |
1036 | + | } | |
1037 | + | else throw("Strict value is not equal to itself.") | |
1038 | + | } | |
1039 | + | ||
1040 | + | ||
1041 | + | ||
1042 | + | @Callable(i) | |
1043 | + | func constructor (fc) = { | |
1044 | + | let c = mm(i) | |
1045 | + | if ((c == c)) | |
1046 | + | then [StringEntry(fc(), fc)] | |
1047 | + | else throw("Strict value is not equal to itself.") | |
1048 | + | } | |
1049 | + | ||
1050 | + | ||
1051 | + | ||
1052 | + | @Callable(i) | |
1053 | + | func setManager (pendingManagerPublicKey) = { | |
1054 | + | let c = mm(i) | |
1055 | + | if ((c == c)) | |
1056 | + | then { | |
1057 | + | let cm = fromBase58String(pendingManagerPublicKey) | |
1058 | + | if ((cm == cm)) | |
1059 | + | then [StringEntry(pmpk(), pendingManagerPublicKey)] | |
1060 | + | else throw("Strict value is not equal to itself.") | |
1061 | + | } | |
1062 | + | else throw("Strict value is not equal to itself.") | |
1063 | + | } | |
1064 | + | ||
1065 | + | ||
1066 | + | ||
1067 | + | @Callable(i) | |
1068 | + | func confirmManager () = { | |
1069 | + | let p = pm() | |
1070 | + | let hpm = if (isDefined(p)) | |
1071 | + | then true | |
1072 | + | else throw("No pending manager") | |
1073 | + | if ((hpm == hpm)) | |
1074 | + | then { | |
1075 | + | let cpm = if ((i.callerPublicKey == value(p))) | |
1076 | + | then true | |
1077 | + | else throw("You are not pending manager") | |
1078 | + | if ((cpm == cpm)) | |
1079 | + | then [StringEntry(mpk(), toBase58String(value(p))), DeleteEntry(pmpk())] | |
1080 | + | else throw("Strict value is not equal to itself.") | |
1081 | + | } | |
1082 | + | else throw("Strict value is not equal to itself.") | |
1083 | + | } | |
1084 | + | ||
1085 | + | ||
1086 | + | ||
1087 | + | @Callable(i) | |
1088 | + | func put (slip,autoStake) = { | |
1089 | + | let factCfg = gfc() | |
1090 | + | let stakingCntr = valueOrErrorMessage(addressFromString(factCfg[idxFactStakCntr]), "Wr st addr") | |
1091 | + | let slipCntr = valueOrErrorMessage(addressFromString(factCfg[idxFactSlippCntr]), "Wr sl addr") | |
1092 | + | if ((0 > slip)) | |
1093 | + | then throw("Wrong slippage") | |
1094 | + | else if ((size(i.payments) != 2)) | |
1095 | + | then throw("2 pmnts expd") | |
1096 | + | else { | |
1097 | + | let amAssetPmt = toBigInt(value(i.payments[0]).amount) | |
1098 | + | let prAssetPmt = toBigInt(value(i.payments[1]).amount) | |
1099 | + | let amountAssetBalance = (toBigInt(getAccBalance(assetIdToString(cfgAmountAssetId))) - amAssetPmt) | |
1100 | + | if ((amountAssetBalance == amountAssetBalance)) | |
1101 | + | then { | |
1102 | + | let priceAssetBalance = (toBigInt(getAccBalance(assetIdToString(cfgPriceAssetId))) - prAssetPmt) | |
1103 | + | if ((priceAssetBalance == priceAssetBalance)) | |
1104 | + | then { | |
1105 | + | let lpAssetEmission = toBigInt(value(assetInfo(cfgLpAssetId)).quantity) | |
1106 | + | if ((lpAssetEmission == lpAssetEmission)) | |
1107 | + | then { | |
1108 | + | let currentDLp = calcCurrentDLp(amAssetPmt, prAssetPmt, toBigInt(0)) | |
1109 | + | if ((currentDLp == currentDLp)) | |
1110 | + | then { | |
1111 | + | 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, "") | |
1112 | + | let emitLpAmt = e._2 | |
1113 | + | let lpAssetId = e._7 | |
1114 | + | let state = e._9 | |
1115 | + | let amDiff = e._10 | |
1116 | + | let prDiff = e._11 | |
1117 | + | let amId = e._12 | |
1118 | + | let prId = e._13 | |
1119 | + | let r = invoke(fca, "emit", [emitLpAmt], nil) | |
1120 | + | if ((r == r)) | |
1121 | + | then { | |
1122 | + | let el = match r { | |
1123 | + | case legacy: Address => | |
1124 | + | invoke(legacy, "emit", [emitLpAmt], nil) | |
1125 | + | case _ => | |
1126 | + | unit | |
1127 | + | } | |
1128 | + | if ((el == el)) | |
1129 | + | then { | |
1130 | + | let sa = if ((amDiff > 0)) | |
1131 | + | then invoke(slipCntr, "put", nil, [AttachedPayment(amId, amDiff)]) | |
1132 | + | else nil | |
1133 | + | if ((sa == sa)) | |
1134 | + | then { | |
1135 | + | let sp = if ((prDiff > 0)) | |
1136 | + | then invoke(slipCntr, "put", nil, [AttachedPayment(prId, prDiff)]) | |
1137 | + | else nil | |
1138 | + | if ((sp == sp)) | |
1139 | + | then { | |
1140 | + | let lpTrnsfr = if (autoStake) | |
1141 | + | then { | |
1142 | + | let ss = invoke(stakingCntr, "stake", nil, [AttachedPayment(lpAssetId, emitLpAmt)]) | |
1143 | + | if ((ss == ss)) | |
1144 | + | then nil | |
1145 | + | else throw("Strict value is not equal to itself.") | |
1146 | + | } | |
1147 | + | else [ScriptTransfer(i.caller, emitLpAmt, lpAssetId)] | |
1148 | + | let $t04298643131 = refreshDLpInternal(0, 0, 0) | |
1149 | + | let refreshDLpActions = $t04298643131._1 | |
1150 | + | let updatedDLp = $t04298643131._2 | |
1151 | + | let check = if ((updatedDLp >= currentDLp)) | |
1152 | + | then true | |
1153 | + | else throwErr(makeString(["updated DLp lower than current DLp", toString(amountAssetBalance), toString(priceAssetBalance), toString(lpAssetEmission), toString(currentDLp), toString(updatedDLp), toString(amDiff), toString(prDiff)], " ")) | |
1154 | + | if ((check == check)) | |
1155 | + | then { | |
1156 | + | let lpAssetEmissionAfter = value(assetInfo(cfgLpAssetId)).quantity | |
1157 | + | if ((lpAssetEmissionAfter == lpAssetEmissionAfter)) | |
1158 | + | then ((state ++ lpTrnsfr) ++ refreshDLpActions) | |
1159 | + | else throw("Strict value is not equal to itself.") | |
1160 | + | } | |
1161 | + | else throw("Strict value is not equal to itself.") | |
1162 | + | } | |
1163 | + | else throw("Strict value is not equal to itself.") | |
1164 | + | } | |
1165 | + | else throw("Strict value is not equal to itself.") | |
1166 | + | } | |
1167 | + | else throw("Strict value is not equal to itself.") | |
1168 | + | } | |
1169 | + | else throw("Strict value is not equal to itself.") | |
1170 | + | } | |
1171 | + | else throw("Strict value is not equal to itself.") | |
1172 | + | } | |
1173 | + | else throw("Strict value is not equal to itself.") | |
1174 | + | } | |
1175 | + | else throw("Strict value is not equal to itself.") | |
1176 | + | } | |
1177 | + | else throw("Strict value is not equal to itself.") | |
1178 | + | } | |
1179 | + | } | |
1180 | + | ||
1181 | + | ||
1182 | + | ||
1183 | + | @Callable(i) | |
1184 | + | func putOneTknV2 (minOutAmount,autoStake) = { | |
1185 | + | let isPoolOneTokenOperationsDisabled = { | |
1186 | + | let @ = invoke(fca, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil) | |
1187 | + | if ($isInstanceOf(@, "Boolean")) | |
1188 | + | then @ | |
1189 | + | else throw(($getType(@) + " couldn't be cast to Boolean")) | |
1190 | + | } | |
1191 | + | let isPutDisabled = if (if (if (igs()) | |
1192 | + | then true | |
1193 | + | else (cfgPoolStatus == PoolPutDis)) | |
1194 | + | then true | |
1195 | + | else (cfgPoolStatus == PoolShutdown)) | |
1196 | + | then true | |
1197 | + | else isPoolOneTokenOperationsDisabled | |
1198 | + | let checks = [if (if (!(isPutDisabled)) | |
1199 | + | then true | |
1200 | + | else isManager(i)) | |
1201 | + | then true | |
1202 | + | else throwErr("put operation is blocked by admin"), if ((size(i.payments) == 1)) | |
1203 | + | then true | |
1204 | + | else throwErr("exactly 1 payment are expected")] | |
1205 | + | if ((checks == checks)) | |
1206 | + | then { | |
1207 | + | let amId = toBase58String(value(cfgAmountAssetId)) | |
1208 | + | let prId = toBase58String(value(cfgPriceAssetId)) | |
1209 | + | let lpId = cfgLpAssetId | |
1210 | + | let amDecimals = cfgAmountAssetDecimals | |
1211 | + | let prDecimals = cfgPriceAssetDecimals | |
1212 | + | let userAddress = if ((i.caller == this)) | |
1213 | + | then i.originCaller | |
1214 | + | else i.caller | |
1215 | + | let pmt = value(i.payments[0]) | |
1216 | + | let pmtAssetId = toBase58String(value(pmt.assetId)) | |
1217 | + | let pmtAmt = pmt.amount | |
1218 | + | let currentDLp = if ((pmt.assetId == cfgAmountAssetId)) | |
1219 | + | then calcCurrentDLp(toBigInt(pmtAmt), toBigInt(0), toBigInt(0)) | |
1220 | + | else calcCurrentDLp(toBigInt(0), toBigInt(pmtAmt), toBigInt(0)) | |
1221 | + | if ((currentDLp == currentDLp)) | |
1222 | + | then { | |
1223 | + | let $t04482244986 = calcPutOneTkn(pmtAmt, pmtAssetId, toString(userAddress), toBase58String(i.transactionId), true) | |
1224 | + | if (($t04482244986 == $t04482244986)) | |
1225 | + | then { | |
1226 | + | let feeAmount = $t04482244986._3 | |
1227 | + | let state = $t04482244986._2 | |
1228 | + | let estimLP = $t04482244986._1 | |
1229 | + | let emitLpAmt = if (if ((minOutAmount > 0)) | |
1230 | + | then (minOutAmount > estimLP) | |
1231 | + | else false) | |
1232 | + | then throwErr(makeString(["amount to receive is less than ", toString(minOutAmount)], "")) | |
1233 | + | else estimLP | |
1234 | + | let e = invoke(fca, "emit", [emitLpAmt], nil) | |
1235 | + | if ((e == e)) | |
1236 | + | then { | |
1237 | + | let el = match e { | |
1238 | + | case legacy: Address => | |
1239 | + | invoke(legacy, "emit", [emitLpAmt], nil) | |
1240 | + | case _ => | |
1241 | + | unit | |
1242 | + | } | |
1243 | + | if ((el == el)) | |
1244 | + | then { | |
1245 | + | let lpTrnsfr = if (autoStake) | |
1246 | + | then { | |
1247 | + | let ss = invoke(stakingContract, "stake", nil, [AttachedPayment(lpId, emitLpAmt)]) | |
1248 | + | if ((ss == ss)) | |
1249 | + | then nil | |
1250 | + | else throw("Strict value is not equal to itself.") | |
1251 | + | } | |
1252 | + | else [ScriptTransfer(i.caller, emitLpAmt, lpId)] | |
1253 | + | let sendFeeToMatcher = if ((feeAmount > 0)) | |
1254 | + | then [ScriptTransfer(feeCollectorAddress, feeAmount, fromBase58String(pmtAssetId))] | |
1255 | + | else nil | |
1256 | + | let $t04582146176 = if ((this == feeCollectorAddress)) | |
1257 | + | then $Tuple2(0, 0) | |
1258 | + | else { | |
1259 | + | let paymentInAmountAsset = if ((pmt.assetId == cfgAmountAssetId)) | |
1260 | + | then true | |
1261 | + | else false | |
1262 | + | if (paymentInAmountAsset) | |
1263 | + | then $Tuple2(-(feeAmount), 0) | |
1264 | + | else $Tuple2(0, -(feeAmount)) | |
1265 | + | } | |
1266 | + | let amountAssetBalanceDelta = $t04582146176._1 | |
1267 | + | let priceAssetBalanceDelta = $t04582146176._2 | |
1268 | + | let $t04618046288 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0) | |
1269 | + | let refreshDLpActions = $t04618046288._1 | |
1270 | + | let updatedDLp = $t04618046288._2 | |
1271 | + | let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp) | |
1272 | + | if ((isUpdatedDLpValid == isUpdatedDLpValid)) | |
1273 | + | then $Tuple2((((state ++ lpTrnsfr) ++ sendFeeToMatcher) ++ refreshDLpActions), emitLpAmt) | |
1274 | + | else throw("Strict value is not equal to itself.") | |
1275 | + | } | |
1276 | + | else throw("Strict value is not equal to itself.") | |
1277 | + | } | |
1278 | + | else throw("Strict value is not equal to itself.") | |
1279 | + | } | |
1280 | + | else throw("Strict value is not equal to itself.") | |
1281 | + | } | |
1282 | + | else throw("Strict value is not equal to itself.") | |
1283 | + | } | |
1284 | + | else throw("Strict value is not equal to itself.") | |
1285 | + | } | |
1286 | + | ||
1287 | + | ||
1288 | + | ||
1289 | + | @Callable(i) | |
1290 | + | func putForFree (maxSlpg) = if ((0 > maxSlpg)) | |
1291 | + | then throw("Wrong slpg") | |
1292 | + | else if ((size(i.payments) != 2)) | |
1293 | + | then throw("2 pmnts expd") | |
1294 | + | else { | |
1295 | + | 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, "") | |
1296 | + | let state = estPut._9 | |
1297 | + | let amAssetPmt = toBigInt(value(i.payments[0]).amount) | |
1298 | + | let prAssetPmt = toBigInt(value(i.payments[1]).amount) | |
1299 | + | let currentDLp = calcCurrentDLp(amAssetPmt, prAssetPmt, toBigInt(0)) | |
1300 | + | if ((currentDLp == currentDLp)) | |
1301 | + | then { | |
1302 | + | let $t04735447419 = refreshDLpInternal(0, 0, 0) | |
1303 | + | let refreshDLpActions = $t04735447419._1 | |
1304 | + | let updatedDLp = $t04735447419._2 | |
1305 | + | let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp) | |
1306 | + | if ((isUpdatedDLpValid == isUpdatedDLpValid)) | |
1307 | + | then (state ++ refreshDLpActions) | |
1308 | + | else throw("Strict value is not equal to itself.") | |
1309 | + | } | |
1310 | + | else throw("Strict value is not equal to itself.") | |
1311 | + | } | |
1312 | + | ||
1313 | + | ||
1314 | + | ||
1315 | + | @Callable(i) | |
1316 | + | func get () = { | |
1317 | + | let currentDLp = calcCurrentDLp(toBigInt(0), toBigInt(0), toBigInt(0)) | |
1318 | + | if ((currentDLp == currentDLp)) | |
1319 | + | then { | |
1320 | + | let r = cg(i) | |
1321 | + | let outAmtAmt = r._1 | |
1322 | + | let outPrAmt = r._2 | |
1323 | + | let pmtAmt = r._3 | |
1324 | + | let pmtAssetId = r._4 | |
1325 | + | let state = r._5 | |
1326 | + | let b = invoke(fca, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)]) | |
1327 | + | if ((b == b)) | |
1328 | + | then { | |
1329 | + | let $t04863348715 = refreshDLpInternal(-(outAmtAmt), -(outPrAmt), 0) | |
1330 | + | let refreshDLpActions = $t04863348715._1 | |
1331 | + | let updatedDLp = $t04863348715._2 | |
1332 | + | let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp) | |
1333 | + | if ((isUpdatedDLpValid == isUpdatedDLpValid)) | |
1334 | + | then (state ++ refreshDLpActions) | |
1335 | + | else throw("Strict value is not equal to itself.") | |
1336 | + | } | |
1337 | + | else throw("Strict value is not equal to itself.") | |
1338 | + | } | |
1339 | + | else throw("Strict value is not equal to itself.") | |
1340 | + | } | |
1341 | + | ||
1342 | + | ||
1343 | + | ||
1344 | + | @Callable(i) | |
1345 | + | func getOneTknV2 (outAssetId,minOutAmount) = { | |
1346 | + | let isPoolOneTokenOperationsDisabled = { | |
1347 | + | let @ = invoke(fca, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil) | |
1348 | + | if ($isInstanceOf(@, "Boolean")) | |
1349 | + | then @ | |
1350 | + | else throw(($getType(@) + " couldn't be cast to Boolean")) | |
1351 | + | } | |
1352 | + | let isGetDisabled = if (if (igs()) | |
1353 | + | then true | |
1354 | + | else (cfgPoolStatus == PoolShutdown)) | |
1355 | + | then true | |
1356 | + | else isPoolOneTokenOperationsDisabled | |
1357 | + | let checks = [if (if (!(isGetDisabled)) | |
1358 | + | then true | |
1359 | + | else isManager(i)) | |
1360 | + | then true | |
1361 | + | else throwErr("get operation is blocked by admin"), if ((size(i.payments) == 1)) | |
1362 | + | then true | |
1363 | + | else throwErr("exactly 1 payment are expected")] | |
1364 | + | if ((checks == checks)) | |
1365 | + | then { | |
1366 | + | let $t04935449516 = getOneTknV2Internal(outAssetId, minOutAmount, i.payments, i.caller, i.originCaller, i.transactionId) | |
1367 | + | let state = $t04935449516._1 | |
1368 | + | let totalAmount = $t04935449516._2 | |
1369 | + | $Tuple2(state, totalAmount) | |
1370 | + | } | |
1371 | + | else throw("Strict value is not equal to itself.") | |
1372 | + | } | |
1373 | + | ||
1374 | + | ||
1375 | + | ||
1376 | + | @Callable(i) | |
1377 | + | func refreshDLp () = { | |
1378 | + | let lastRefreshedBlockHeight = valueOrElse(getInteger(keyDLpRefreshedHeight), 0) | |
1379 | + | let checkLastRefreshedBlockHeight = if (((height - lastRefreshedBlockHeight) >= dLpRefreshDelay)) | |
1380 | + | then unit | |
1381 | + | else throwErr(makeString([toString(dLpRefreshDelay), " blocks have not passed since the previous call"], "")) | |
1382 | + | if ((checkLastRefreshedBlockHeight == checkLastRefreshedBlockHeight)) | |
1383 | + | then { | |
1384 | + | let dLp = valueOrErrorMessage(parseBigInt(valueOrElse(getString(this, keyDLp), "0")), fmtErr("invalid dLp")) | |
1385 | + | let $t05006150125 = refreshDLpInternal(0, 0, 0) | |
1386 | + | let dLpUpdateActions = $t05006150125._1 | |
1387 | + | let updatedDLp = $t05006150125._2 | |
1388 | + | let actions = if ((dLp != updatedDLp)) | |
1389 | + | then dLpUpdateActions | |
1390 | + | else throwErr("nothing to refresh") | |
1391 | + | $Tuple2(actions, toString(updatedDLp)) | |
1392 | + | } | |
1393 | + | else throw("Strict value is not equal to itself.") | |
1394 | + | } | |
1395 | + | ||
1396 | + | ||
1397 | + | ||
1398 | + | @Callable(i) | |
1399 | + | func getOneTknV2READONLY (outAssetId,lpAssetAmount) = { | |
1400 | + | let amId = toBase58String(value(cfgAmountAssetId)) | |
1401 | + | let prId = toBase58String(value(cfgPriceAssetId)) | |
1402 | + | let lpId = toBase58String(value(cfgLpAssetId)) | |
1403 | + | let xp = [toBigInt(getAccBalance(amId)), toBigInt(getAccBalance(prId))] | |
1404 | + | let lpEmission = toBigInt(valueOrErrorMessage(assetInfo(fromBase58String(lpId)), "invalid lp asset").quantity) | |
1405 | + | let D0 = getD(xp) | |
1406 | + | let D1 = (D0 - fraction(toBigInt(lpAssetAmount), D0, lpEmission)) | |
1407 | + | let index = if ((outAssetId == amId)) | |
1408 | + | then 0 | |
1409 | + | else if ((outAssetId == prId)) | |
1410 | + | then 1 | |
1411 | + | else throw("invalid out asset id") | |
1412 | + | let newY = getYD(xp, index, D1) | |
1413 | + | let dy = (xp[index] - newY) | |
1414 | + | let totalGetRaw = max([0, toInt((dy - big1))]) | |
1415 | + | let $t05116451219 = takeFee(totalGetRaw, outFee) | |
1416 | + | let totalGet = $t05116451219._1 | |
1417 | + | let feeAmount = $t05116451219._2 | |
1418 | + | $Tuple2(nil, $Tuple2(totalGet, feeAmount)) | |
1419 | + | } | |
1420 | + | ||
1421 | + | ||
1422 | + | ||
1423 | + | @Callable(i) | |
1424 | + | func getOneTknV2WithBonusREADONLY (outAssetId,lpAssetAmount) = { | |
1425 | + | let amId = toBase58String(value(cfgAmountAssetId)) | |
1426 | + | let prId = toBase58String(value(cfgPriceAssetId)) | |
1427 | + | let lpId = toBase58String(value(cfgLpAssetId)) | |
1428 | + | let amBalance = getAccBalance(amId) | |
1429 | + | let prBalance = getAccBalance(prId) | |
1430 | + | let $t05161151726 = { | |
1431 | + | let @ = invoke(this, "getOneTknV2READONLY", [outAssetId, lpAssetAmount], nil) | |
1432 | + | if ($isInstanceOf(@, "(Int, Int)")) | |
1433 | + | then @ | |
1434 | + | else throw(($getType(@) + " couldn't be cast to (Int, Int)")) | |
1435 | + | } | |
1436 | + | let totalGet = $t05161151726._1 | |
1437 | + | let feeAmount = $t05161151726._2 | |
1438 | + | let r = ego("", lpId, lpAssetAmount, this) | |
1439 | + | let outAmAmt = r._1 | |
1440 | + | let outPrAmt = r._2 | |
1441 | + | let sumOfGetAssets = (outAmAmt + outPrAmt) | |
1442 | + | let bonus = if ((sumOfGetAssets == 0)) | |
1443 | + | then if ((totalGet == 0)) | |
1444 | + | then 0 | |
1445 | + | else throw("bonus calculation error") | |
1446 | + | else fraction((totalGet - sumOfGetAssets), scale8, sumOfGetAssets) | |
1447 | + | $Tuple2(nil, $Tuple3(totalGet, feeAmount, bonus)) | |
1448 | + | } | |
1449 | + | ||
1450 | + | ||
1451 | + | ||
1452 | + | @Callable(i) | |
1453 | + | func getNoLess (noLessThenAmtAsset,noLessThenPriceAsset) = { | |
1454 | + | let r = cg(i) | |
1455 | + | let outAmAmt = r._1 | |
1456 | + | let outPrAmt = r._2 | |
1457 | + | let pmtAmt = r._3 | |
1458 | + | let pmtAssetId = r._4 | |
1459 | + | let state = r._5 | |
1460 | + | if ((noLessThenAmtAsset > outAmAmt)) | |
1461 | + | then throw(((("Failed: " + toString(outAmAmt)) + " < ") + toString(noLessThenAmtAsset))) | |
1462 | + | else if ((noLessThenPriceAsset > outPrAmt)) | |
1463 | + | then throw(((("Failed: " + toString(outPrAmt)) + " < ") + toString(noLessThenPriceAsset))) | |
1464 | + | else { | |
1465 | + | let currentDLp = calcCurrentDLp(toBigInt(0), toBigInt(0), toBigInt(0)) | |
1466 | + | if ((currentDLp == currentDLp)) | |
1467 | + | then { | |
1468 | + | let burnLPAssetOnFactory = invoke(fca, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)]) | |
1469 | + | if ((burnLPAssetOnFactory == burnLPAssetOnFactory)) | |
1470 | + | then { | |
1471 | + | let $t05293253013 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0) | |
1472 | + | let refreshDLpActions = $t05293253013._1 | |
1473 | + | let updatedDLp = $t05293253013._2 | |
1474 | + | let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp) | |
1475 | + | if ((isUpdatedDLpValid == isUpdatedDLpValid)) | |
1476 | + | then (state ++ refreshDLpActions) | |
1477 | + | else throw("Strict value is not equal to itself.") | |
1478 | + | } | |
1479 | + | else throw("Strict value is not equal to itself.") | |
1480 | + | } | |
1481 | + | else throw("Strict value is not equal to itself.") | |
1482 | + | } | |
1483 | + | } | |
1484 | + | ||
1485 | + | ||
1486 | + | ||
1487 | + | @Callable(i) | |
1488 | + | func unstakeAndGet (amount) = { | |
1489 | + | let checkPayments = if ((size(i.payments) != 0)) | |
1490 | + | then throw("No pmnts expd") | |
1491 | + | else true | |
1492 | + | if ((checkPayments == checkPayments)) | |
1493 | + | then { | |
1494 | + | let factoryCfg = gfc() | |
1495 | + | let lpAssetId = cfgLpAssetId | |
1496 | + | let staking = valueOrErrorMessage(addressFromString(factoryCfg[idxFactStakCntr]), "Wr st addr") | |
1497 | + | let currentDLp = calcCurrentDLp(toBigInt(0), toBigInt(0), toBigInt(0)) | |
1498 | + | if ((currentDLp == currentDLp)) | |
1499 | + | then { | |
1500 | + | let unstakeInv = invoke(staking, "unstake", [toBase58String(lpAssetId), amount], nil) | |
1501 | + | if ((unstakeInv == unstakeInv)) | |
1502 | + | then { | |
1503 | + | let r = ego(toBase58String(i.transactionId), toBase58String(lpAssetId), amount, i.caller) | |
1504 | + | let outAmAmt = r._1 | |
1505 | + | let outPrAmt = r._2 | |
1506 | + | let sts = parseIntValue(r._9) | |
1507 | + | let state = r._10 | |
1508 | + | let v = if (if (igs()) | |
1509 | + | then true | |
1510 | + | else (sts == PoolShutdown)) | |
1511 | + | then throw(("Blocked: " + toString(sts))) | |
1512 | + | else true | |
1513 | + | if ((v == v)) | |
1514 | + | then { | |
1515 | + | let burnA = invoke(fca, "burn", [amount], [AttachedPayment(lpAssetId, amount)]) | |
1516 | + | if ((burnA == burnA)) | |
1517 | + | then { | |
1518 | + | let $t05407254153 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0) | |
1519 | + | let refreshDLpActions = $t05407254153._1 | |
1520 | + | let updatedDLp = $t05407254153._2 | |
1521 | + | let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp) | |
1522 | + | if ((isUpdatedDLpValid == isUpdatedDLpValid)) | |
1523 | + | then (state ++ refreshDLpActions) | |
1524 | + | else throw("Strict value is not equal to itself.") | |
1525 | + | } | |
1526 | + | else throw("Strict value is not equal to itself.") | |
1527 | + | } | |
1528 | + | else throw("Strict value is not equal to itself.") | |
1529 | + | } | |
1530 | + | else throw("Strict value is not equal to itself.") | |
1531 | + | } | |
1532 | + | else throw("Strict value is not equal to itself.") | |
1533 | + | } | |
1534 | + | else throw("Strict value is not equal to itself.") | |
1535 | + | } | |
1536 | + | ||
1537 | + | ||
1538 | + | ||
1539 | + | @Callable(i) | |
1540 | + | func unstakeAndGetNoLess (unstakeAmount,noLessThenAmountAsset,noLessThenPriceAsset) = { | |
1541 | + | let isGetDisabled = if (igs()) | |
1542 | + | then true | |
1543 | + | else (cfgPoolStatus == PoolShutdown) | |
1544 | + | let checks = [if (!(isGetDisabled)) | |
1545 | + | then true | |
1546 | + | else throw("get operation is blocked by admin"), if ((size(i.payments) == 0)) | |
1547 | + | then true | |
1548 | + | else throw("no payments are expected")] | |
1549 | + | if ((checks == checks)) | |
1550 | + | then { | |
1551 | + | let currentDLp = calcCurrentDLp(toBigInt(0), toBigInt(0), toBigInt(0)) | |
1552 | + | if ((currentDLp == currentDLp)) | |
1553 | + | then { | |
1554 | + | let unstakeInv = invoke(stakingContract, "unstake", [toBase58String(cfgLpAssetId), unstakeAmount], nil) | |
1555 | + | if ((unstakeInv == unstakeInv)) | |
1556 | + | then { | |
1557 | + | let res = ego(toBase58String(i.transactionId), toBase58String(cfgLpAssetId), unstakeAmount, i.caller) | |
1558 | + | let outAmAmt = res._1 | |
1559 | + | let outPrAmt = res._2 | |
1560 | + | let state = res._10 | |
1561 | + | let checkAmounts = [if ((outAmAmt >= noLessThenAmountAsset)) | |
1562 | + | then true | |
1563 | + | else throw(makeString(["amount asset amount to receive is less than ", toString(noLessThenAmountAsset)], "")), if ((outPrAmt >= noLessThenPriceAsset)) | |
1564 | + | then true | |
1565 | + | else throw(makeString(["price asset amount to receive is less than ", toString(noLessThenPriceAsset)], ""))] | |
1566 | + | if ((checkAmounts == checkAmounts)) | |
1567 | + | then { | |
1568 | + | let burnLPAssetOnFactory = invoke(fca, "burn", [unstakeAmount], [AttachedPayment(cfgLpAssetId, unstakeAmount)]) | |
1569 | + | if ((burnLPAssetOnFactory == burnLPAssetOnFactory)) | |
1570 | + | then { | |
1571 | + | let $t05543655517 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0) | |
1572 | + | let refreshDLpActions = $t05543655517._1 | |
1573 | + | let updatedDLp = $t05543655517._2 | |
1574 | + | let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp) | |
1575 | + | if ((isUpdatedDLpValid == isUpdatedDLpValid)) | |
1576 | + | then (state ++ refreshDLpActions) | |
1577 | + | else throw("Strict value is not equal to itself.") | |
1578 | + | } | |
1579 | + | else throw("Strict value is not equal to itself.") | |
1580 | + | } | |
1581 | + | else throw("Strict value is not equal to itself.") | |
1582 | + | } | |
1583 | + | else throw("Strict value is not equal to itself.") | |
1584 | + | } | |
1585 | + | else throw("Strict value is not equal to itself.") | |
1586 | + | } | |
1587 | + | else throw("Strict value is not equal to itself.") | |
1588 | + | } | |
1589 | + | ||
1590 | + | ||
1591 | + | ||
1592 | + | @Callable(i) | |
1593 | + | func unstakeAndGetOneTknV2 (unstakeAmount,outAssetId,minOutAmount) = { | |
1594 | + | let isPoolOneTokenOperationsDisabled = { | |
1595 | + | let @ = invoke(fca, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil) | |
1596 | + | if ($isInstanceOf(@, "Boolean")) | |
1597 | + | then @ | |
1598 | + | else throw(($getType(@) + " couldn't be cast to Boolean")) | |
1599 | + | } | |
1600 | + | let isGetDisabled = if (if (igs()) | |
1601 | + | then true | |
1602 | + | else (cfgPoolStatus == PoolShutdown)) | |
1603 | + | then true | |
1604 | + | else isPoolOneTokenOperationsDisabled | |
1605 | + | let checks = [if (if (!(isGetDisabled)) | |
1606 | + | then true | |
1607 | + | else isManager(i)) | |
1608 | + | then true | |
1609 | + | else throwErr("get operation is blocked by admin"), if ((size(i.payments) == 0)) | |
1610 | + | then true | |
1611 | + | else throwErr("no payments are expected")] | |
1612 | + | if ((checks == checks)) | |
1613 | + | then { | |
1614 | + | let factoryCfg = gfc() | |
1615 | + | let lpAssetId = cfgLpAssetId | |
1616 | + | let staking = valueOrErrorMessage(addressFromString(factoryCfg[idxFactStakCntr]), "Wr st addr") | |
1617 | + | let userAddress = i.caller | |
1618 | + | let lpAssetRecipientAddress = this | |
1619 | + | let unstakeInv = invoke(staking, "unstakeINTERNAL", [lpAssetId, unstakeAmount, userAddress.bytes, lpAssetRecipientAddress.bytes], nil) | |
1620 | + | if ((unstakeInv == unstakeInv)) | |
1621 | + | then { | |
1622 | + | let $t05657356768 = getOneTknV2Internal(outAssetId, minOutAmount, [AttachedPayment(lpAssetId, unstakeAmount)], i.caller, i.originCaller, i.transactionId) | |
1623 | + | let state = $t05657356768._1 | |
1624 | + | let totalAmount = $t05657356768._2 | |
1625 | + | $Tuple2(state, totalAmount) | |
1626 | + | } | |
1627 | + | else throw("Strict value is not equal to itself.") | |
1628 | + | } | |
1629 | + | else throw("Strict value is not equal to itself.") | |
1630 | + | } | |
1631 | + | ||
1632 | + | ||
1633 | + | ||
1634 | + | @Callable(i) | |
1635 | + | func putOneTknV2WithBonusREADONLY (paymentAmountRaw,paymentAssetId) = { | |
1636 | + | let $t05690357006 = calcPutOneTkn(paymentAmountRaw, paymentAssetId, "", "", true) | |
1637 | + | let lpAmount = $t05690357006._1 | |
1638 | + | let state = $t05690357006._2 | |
1639 | + | let feeAmount = $t05690357006._3 | |
1640 | + | let bonus = $t05690357006._4 | |
1641 | + | $Tuple2(nil, $Tuple3(lpAmount, feeAmount, bonus)) | |
1642 | + | } | |
1643 | + | ||
1644 | + | ||
1645 | + | ||
1646 | + | @Callable(i) | |
1647 | + | func putOneTknV2WithoutTakeFeeREADONLY (paymentAmountRaw,paymentAssetId) = { | |
1648 | + | let $t05716157265 = calcPutOneTkn(paymentAmountRaw, paymentAssetId, "", "", false) | |
1649 | + | let lpAmount = $t05716157265._1 | |
1650 | + | let state = $t05716157265._2 | |
1651 | + | let feeAmount = $t05716157265._3 | |
1652 | + | let bonus = $t05716157265._4 | |
1653 | + | $Tuple2(nil, $Tuple3(lpAmount, feeAmount, bonus)) | |
1654 | + | } | |
1655 | + | ||
1656 | + | ||
1657 | + | ||
1658 | + | @Callable(i) | |
1659 | + | func activate (amtAsStr,prAsStr) = if ((toString(i.caller) != toString(fca))) | |
1660 | + | then throw("denied") | |
1661 | + | else $Tuple2([StringEntry(aa(), amtAsStr), StringEntry(pa(), prAsStr)], "success") | |
1662 | + | ||
1663 | + | ||
1664 | + | ||
1665 | + | @Callable(i) | |
1666 | + | func setS (k,v) = if ((toString(i.caller) != strf(this, ada()))) | |
1667 | + | then pd | |
1668 | + | else [StringEntry(k, v)] | |
1669 | + | ||
1670 | + | ||
1671 | + | ||
1672 | + | @Callable(i) | |
1673 | + | func setI (k,v) = if ((toString(i.caller) != strf(this, ada()))) | |
1674 | + | then pd | |
1675 | + | else [IntegerEntry(k, v)] | |
1676 | + | ||
1677 | + | ||
1678 | + | ||
1679 | + | @Callable(i) | |
1680 | + | func getPoolConfigWrapperREADONLY () = $Tuple2(nil, gpc()) | |
1681 | + | ||
1682 | + | ||
1683 | + | ||
1684 | + | @Callable(i) | |
1685 | + | func getAccBalanceWrapperREADONLY (assetId) = $Tuple2(nil, getAccBalance(assetId)) | |
1686 | + | ||
1687 | + | ||
1688 | + | ||
1689 | + | @Callable(i) | |
1690 | + | func calcPricesWrapperREADONLY (amAmt,prAmt,lpAmt) = { | |
1691 | + | let pr = calcPrices(amAmt, prAmt, lpAmt) | |
1692 | + | $Tuple2(nil, [toString(pr[0]), toString(pr[1]), toString(pr[2])]) | |
1693 | + | } | |
1694 | + | ||
1695 | + | ||
1696 | + | ||
1697 | + | @Callable(i) | |
1698 | + | func fromX18WrapperREADONLY (val,resScaleMult) = $Tuple2(nil, f1(parseBigIntValue(val), resScaleMult)) | |
1699 | + | ||
1700 | + | ||
1701 | + | ||
1702 | + | @Callable(i) | |
1703 | + | func toX18WrapperREADONLY (origVal,origScaleMult) = $Tuple2(nil, toString(t1(origVal, origScaleMult))) | |
1704 | + | ||
1705 | + | ||
1706 | + | ||
1707 | + | @Callable(i) | |
1708 | + | func calcPriceBigIntWrapperREADONLY (prAmtX18,amAmtX18) = $Tuple2(nil, toString(cpbi(parseBigIntValue(prAmtX18), parseBigIntValue(amAmtX18)))) | |
1709 | + | ||
1710 | + | ||
1711 | + | ||
1712 | + | @Callable(i) | |
1713 | + | 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, "")) | |
1714 | + | ||
1715 | + | ||
1716 | + | ||
1717 | + | @Callable(i) | |
1718 | + | func estimateGetOperationWrapperREADONLY (txId58,pmtAsId,pmtLpAmt,usrAddr) = { | |
1719 | + | let r = ego(txId58, pmtAsId, pmtLpAmt, addressFromStringValue(usrAddr)) | |
1720 | + | $Tuple2(nil, $Tuple10(r._1, r._2, r._3, r._4, r._5, r._6, r._7, toString(r._8), r._9, r._10)) | |
184 | 1721 | } | |
185 | 1722 | ||
186 | 1723 |
github/deemru/w8io/169f3d6 90.27 ms ◑