tx · 5Znap2GQwrJc64tMUKeB3KA9Ky9fEpDraGWj99f1pU5a 3N41jx367r3HSFV68JfLUia22bvgwfPiU8J: -0.04500000 Waves 2023.08.03 19:37 [2694651] smart account 3N41jx367r3HSFV68JfLUia22bvgwfPiU8J > SELF 0.00000000 Waves
{ "type": 13, "id": "5Znap2GQwrJc64tMUKeB3KA9Ky9fEpDraGWj99f1pU5a", "fee": 4500000, "feeAssetId": null, "timestamp": 1691080639577, "version": 2, "chainId": 84, "sender": "3N41jx367r3HSFV68JfLUia22bvgwfPiU8J", "senderPublicKey": "51cTRWaywGzzBXaFt4MRPswto8Rz3Wwa1uTbaSaXqXTk", "proofs": [ "4Fg5t11xvY4E31oA4qJ9KrTiEb2BTRt7ketkzDmn3UxR8YG5ioWcNNznEnTGws1VGCiQL4LUD1M7Nrq363Sowe2g", "5HYdhfCkirVnu7KteKNRgYeGUT2VBi1krR799xYitwCbzu8A3GGf1HAB6yzoEQjTyv9TzBQ784XPqtDxGjfobyvx" ], "script": "base64:BgJiCAISBgoEAhgREhIGCgQCGBESEgYKBAIYERISBgoEAhgREhIGCgQCGBESEgYKBAIYERISBgoEAhgREhIGCgQCGBESEgYKBAIYERISBgoEAhgREhIGCgQCGBESEgYKBAIYERJYAAd2ZXJzaW9uAgUxLjAuMAAIa1ZlcnNpb24CB3ZlcnNpb24AB2tBY3RpdmUCBmFjdGl2ZQALa0RlcHJlY2F0ZWQCC2RlcHJlY2F0ZWRfAAlrQXNzZXRJZEECCkFfYXNzZXRfaWQACWtBc3NldElkQgIKQl9hc3NldF9pZAAJa0JhbGFuY2VBAg9BX2Fzc2V0X2JhbGFuY2UACWtCYWxhbmNlQgIPQl9hc3NldF9iYWxhbmNlAA1rQmFsYW5jZUluaXRBAgxBX2Fzc2V0X2luaXQADWtCYWxhbmNlSW5pdEICDEJfYXNzZXRfaW5pdAANa1NoYXJlQXNzZXRJZAIOc2hhcmVfYXNzZXRfaWQAEWtTaGFyZUFzc2V0U3VwcGx5AhJz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5MlNpZ25lZAMJAPQDAwgFAnR4CWJvZHlCeXRlcwkAkQMCCAUCdHgGcHJvb2ZzAAEFDGFkbWluUHViS2V5MgABAAAEEmFkbWluUHViS2V5M1NpZ25lZAMJAPQDAwgFAnR4CWJvZHlCeXRlcwkAkQMCCAUCdHgGcHJvb2ZzAAIFDGFkbWluUHViS2V5MwABAAAJAGcCCQBkAgkAZAIFEmFkbWluUHViS2V5MVNpZ25lZAUSYWRtaW5QdWJLZXkyU2lnbmVkBRJhZG1pblB1YktleTNTaWduZWQAAgUTbXVsdGlTaWduZWRCeUFkbWluc27wwQU=", "height": 2694651, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: n8BZ2RUtVcqUYQx2xtChh4SyyjMWq4LnzVyVA8t8rq6 Next: none Diff:
Old | New | Differences | |
---|---|---|---|
51 | 51 | ||
52 | 52 | let kEURNAssetId = "eurn_asset_id" | |
53 | 53 | ||
54 | + | let kL2MPAssetId = "l2mp_asset_id" | |
55 | + | ||
54 | 56 | let kStakingAssets = "staking_assets" | |
55 | 57 | ||
56 | 58 | let kOracleActive = "active_all_contracts" | |
83 | 85 | ||
84 | 86 | let kFarmingAddress = "farming_address" | |
85 | 87 | ||
86 | - | let oracle = Address(base58'3MvVBtsXroQpy1tsPw21TU2ET9A8WfmrNjz') | |
88 | + | let kL2MPAddress = "staking_l2mp_address" | |
89 | + | ||
90 | + | let oracle = Address(base58'3PEbqViERCoKnmcSULh6n2aiMvUdSQdCsom') | |
87 | 91 | ||
88 | 92 | func getBase58FromOracle (key) = match getString(oracle, key) { | |
89 | 93 | case string: String => | |
115 | 119 | ||
116 | 120 | let EURN = getBase58FromOracle(kEURNAssetId) | |
117 | 121 | ||
122 | + | let L2MP = getBase58FromOracle(kL2MPAssetId) | |
123 | + | ||
118 | 124 | let stakingAssets = getStringValue(oracle, kStakingAssets) | |
119 | 125 | ||
120 | 126 | let stakingUSDNAddress = Address(getBase58FromOracle(kUSDNAddress)) | |
121 | 127 | ||
122 | 128 | let stakingEURNAddress = Address(getBase58FromOracle(kEURNAddress)) | |
129 | + | ||
130 | + | let stakingL2MPAddress = Address(getBase58FromOracle(kL2MPAddress)) | |
123 | 131 | ||
124 | 132 | let basePeriod = valueOrErrorMessage(getInteger(votingAddress, kBasePeriod), "Empty kBasePeriod") | |
125 | 133 | ||
154 | 162 | then getInteger(stakingUSDNAddress, ((("rpd_balance_" + toBase58String(aId)) + "_") + toString(pool))) | |
155 | 163 | else if ((aId == EURN)) | |
156 | 164 | then getInteger(stakingEURNAddress, ((("%s%s%s__stakingBalance__" + toBase58String(aId)) + "__") + toString(pool))) | |
157 | - | else 0 | |
165 | + | else if ((aId == L2MP)) | |
166 | + | then { | |
167 | + | let available = { | |
168 | + | let @ = invoke(stakingL2MPAddress, "getUserAssetsREADONLY", [pool], nil) | |
169 | + | if ($isInstanceOf(@, "(Int, Int, Int, Int, Int)")) | |
170 | + | then @ | |
171 | + | else throw(($getType(@) + " couldn't be cast to (Int, Int, Int, Int, Int)")) | |
172 | + | } | |
173 | + | if ((available == available)) | |
174 | + | then available | |
175 | + | else throw("Strict value is not equal to itself.") | |
176 | + | } | |
177 | + | else 0 | |
158 | 178 | case _: Unit => | |
159 | 179 | valueOrElse(getInteger(pool, kLeasingAmount), 0) | |
160 | 180 | case _ => | |
171 | 191 | ||
172 | 192 | func getAssetInfo (assetId) = match assetId { | |
173 | 193 | case id: String|ByteVector => | |
174 | - | let $ | |
194 | + | let $t044634635 = match id { | |
175 | 195 | case aId: ByteVector => | |
176 | 196 | $Tuple2(toBase58String(aId), aId) | |
177 | 197 | case aId: String => | |
179 | 199 | case _ => | |
180 | 200 | throw("Match error") | |
181 | 201 | } | |
182 | - | let stringId = $ | |
183 | - | let bytesId = $ | |
202 | + | let stringId = $t044634635._1 | |
203 | + | let bytesId = $t044634635._2 | |
184 | 204 | let info = valueOrErrorMessage(assetInfo(bytesId), (("Asset " + stringId) + " doesn't exist")) | |
185 | 205 | $Tuple3(stringId, info.name, info.decimals) | |
186 | 206 | case waves: Unit => | |
272 | 292 | let stakedAmountB = stakedAmount(assetIdB, pool) | |
273 | 293 | let accountBalanceA = (accountBalance(assetIdA, pool) + stakedAmountA) | |
274 | 294 | let accountBalanceB = (accountBalance(assetIdB, pool) + stakedAmountB) | |
275 | - | let shareSupply = getIntegerValue(pool, kShareAssetSupply) | |
276 | - | $Tuple5(balanceA, balanceB, accountBalanceA, accountBalanceB, shareSupply) | |
295 | + | $Tuple6(balanceA, balanceB, accountBalanceA, accountBalanceB, stakedAmountA, stakedAmountB) | |
277 | 296 | } | |
297 | + | ||
298 | + | ||
299 | + | func getLpSupply (pool) = getIntegerValue(pool, kShareAssetSupply) | |
278 | 300 | ||
279 | 301 | ||
280 | 302 | func getPoolAssets (pool) = { | |
301 | 323 | ||
302 | 324 | ||
303 | 325 | func calcLPAmountReplensishTwoTokens (pmtA,pmtB,pmtIdA,pmtIdB,balA,balB,shareAssetSupply) = { | |
304 | - | let $ | |
305 | - | let pmtStrAssetIdA = $ | |
306 | - | let pmtAssetNameA = $ | |
307 | - | let pmtDecimalsA = $ | |
308 | - | let $ | |
309 | - | let pmtStrAssetIdB = $ | |
310 | - | let pmtAssetNameB = $ | |
311 | - | let pmtDecimalsB = $ | |
326 | + | let $t0997610048 = getAssetInfo(pmtIdA) | |
327 | + | let pmtStrAssetIdA = $t0997610048._1 | |
328 | + | let pmtAssetNameA = $t0997610048._2 | |
329 | + | let pmtDecimalsA = $t0997610048._3 | |
330 | + | let $t01005310125 = getAssetInfo(pmtIdB) | |
331 | + | let pmtStrAssetIdB = $t01005310125._1 | |
332 | + | let pmtAssetNameB = $t01005310125._2 | |
333 | + | let pmtDecimalsB = $t01005310125._3 | |
312 | 334 | let initial = ((balA + balB) == 0) | |
313 | - | let $ | |
335 | + | let $t01016810827 = if (initial) | |
314 | 336 | then $Tuple5(pmtA, pmtB, 0, pmtIdA, toBigInt(1)) | |
315 | 337 | else { | |
316 | 338 | let ratioShareTokensInA = fraction(scale16, toBigInt(pmtA), toBigInt(balA)) | |
325 | 347 | $Tuple5(pmt, pmtB, (pmtA - pmt), pmtIdA, ratioShareTokensInB) | |
326 | 348 | } | |
327 | 349 | } | |
328 | - | let pmtAmountA = $ | |
329 | - | let pmtAmountB = $ | |
330 | - | let change = $ | |
331 | - | let changeAssetId = $ | |
332 | - | let shareTokenRatio = $ | |
350 | + | let pmtAmountA = $t01016810827._1 | |
351 | + | let pmtAmountB = $t01016810827._2 | |
352 | + | let change = $t01016810827._3 | |
353 | + | let changeAssetId = $t01016810827._4 | |
354 | + | let shareTokenRatio = $t01016810827._5 | |
333 | 355 | let shareTokenToPayAmount = if (initial) | |
334 | 356 | then { | |
335 | 357 | let shareDecimals = ((pmtDecimalsA + pmtDecimalsB) / 2) | |
340 | 362 | } | |
341 | 363 | ||
342 | 364 | ||
343 | - | func | |
365 | + | func calcLPAmountReplenishOneToken (pmtAmount,pmtAssetId,aId,bId,balA,balB,lpSupply,fee,govFee,teamFee,virtGetMinAmount) = if ((pmtAssetId == aId)) | |
344 | 366 | then { | |
345 | 367 | let virtPayAmount = calculateVirtPay(pmtAmount, balA, fee) | |
346 | - | let $ | |
347 | - | let amountWithoutFee = $ | |
348 | - | let amountWithFee = $ | |
349 | - | let governanceReward = $ | |
350 | - | let tReward = $ | |
368 | + | let $t01169111838 = calculateFees(virtPayAmount, virtGetMinAmount, balA, balB, fee, govFee, teamFee) | |
369 | + | let amountWithoutFee = $t01169111838._1 | |
370 | + | let amountWithFee = $t01169111838._2 | |
371 | + | let governanceReward = $t01169111838._3 | |
372 | + | let tReward = $t01169111838._4 | |
351 | 373 | let balanceAVirt = (balA + virtPayAmount) | |
352 | 374 | let balanceBVirt = (((balB + amountWithoutFee) - governanceReward) - tReward) | |
353 | 375 | let newBalanceA = (balA + pmtAmount) | |
361 | 383 | } | |
362 | 384 | else { | |
363 | 385 | let virtPayAmount = calculateVirtPay(pmtAmount, balB, fee) | |
364 | - | let $ | |
365 | - | let amountWithoutFee = $ | |
366 | - | let amountWithFee = $ | |
367 | - | let governanceReward = $ | |
368 | - | let tReward = $ | |
386 | + | let $t01288213029 = calculateFees(virtPayAmount, virtGetMinAmount, balB, balA, fee, govFee, teamFee) | |
387 | + | let amountWithoutFee = $t01288213029._1 | |
388 | + | let amountWithFee = $t01288213029._2 | |
389 | + | let governanceReward = $t01288213029._3 | |
390 | + | let tReward = $t01288213029._4 | |
369 | 391 | let balanceAVirt = (((balA + amountWithoutFee) - governanceReward) - tReward) | |
370 | 392 | let balanceBVirt = (balB + virtPayAmount) | |
371 | 393 | let newBalanceA = ((balA - governanceReward) - tReward) | |
380 | 402 | ||
381 | 403 | ||
382 | 404 | func calcLPReplenishDiffProp (pmtA,pmtB,pmtIdA,pmtIdB,balA,balB,lpSupply,fee,govFee,teamFee,virtGetMinAmount) = { | |
383 | - | let $ | |
384 | - | let lpTwoAmount = $ | |
385 | - | let change = $ | |
386 | - | let changeAssetId = $ | |
387 | - | let pmtAmountA = $ | |
388 | - | let pmtAmountB = $ | |
405 | + | let $t01419614344 = calcLPAmountReplensishTwoTokens(pmtA, pmtB, pmtIdA, pmtIdB, balA, balB, lpSupply) | |
406 | + | let lpTwoAmount = $t01419614344._1 | |
407 | + | let change = $t01419614344._2 | |
408 | + | let changeAssetId = $t01419614344._3 | |
409 | + | let pmtAmountA = $t01419614344._4 | |
410 | + | let pmtAmountB = $t01419614344._5 | |
389 | 411 | if ((change > 0)) | |
390 | 412 | then { | |
391 | - | let $ | |
392 | - | let lpOne = $ | |
393 | - | let newBalanceA = $ | |
394 | - | let newBalanceB = $ | |
395 | - | let governanceReward = $ | |
396 | - | let tReward = $ | |
397 | - | let gId = $ | |
398 | - | let loss = $ | |
413 | + | let $t01437614610 = calcLPAmountReplenishOneToken(change, changeAssetId, pmtIdA, pmtIdB, (balA + pmtAmountA), (balB + pmtAmountB), lpSupply, fee, govFee, teamFee, virtGetMinAmount) | |
414 | + | let lpOne = $t01437614610._1 | |
415 | + | let newBalanceA = $t01437614610._2 | |
416 | + | let newBalanceB = $t01437614610._3 | |
417 | + | let governanceReward = $t01437614610._4 | |
418 | + | let tReward = $t01437614610._5 | |
419 | + | let gId = $t01437614610._6 | |
420 | + | let loss = $t01437614610._7 | |
399 | 421 | $Tuple7((lpTwoAmount + lpOne), loss, newBalanceA, newBalanceB, governanceReward, tReward, gId) | |
400 | 422 | } | |
401 | 423 | else $Tuple7(lpTwoAmount, 0, (balA + pmtAmountA), (balB + pmtAmountB), 0, 0, unit) | |
404 | 426 | ||
405 | 427 | @Callable(i) | |
406 | 428 | func calcLPReplenishDiffPropREADONLY (callerBytes,args,pAmounts,pAssetIds) = { | |
407 | - | let $ | |
408 | - | let strAssetIdA = $ | |
409 | - | let strAssetIdB = $ | |
410 | - | let assetIdA = $ | |
411 | - | let assetIdB = $ | |
412 | - | let shareAssetId = $ | |
413 | - | let $ | |
414 | - | let balA = $ | |
415 | - | let balB = $ | |
416 | - | let accBalA = $ | |
417 | - | let accBalB = $ | |
418 | - | let lpSupply = | |
429 | + | let $t01494615036 = getPoolAssets(i.caller) | |
430 | + | let strAssetIdA = $t01494615036._1 | |
431 | + | let strAssetIdB = $t01494615036._2 | |
432 | + | let assetIdA = $t01494615036._3 | |
433 | + | let assetIdB = $t01494615036._4 | |
434 | + | let shareAssetId = $t01494615036._5 | |
435 | + | let $t01504115123 = getPoolBalances(i.caller, assetIdA, assetIdB) | |
436 | + | let balA = $t01504115123._1 | |
437 | + | let balB = $t01504115123._2 | |
438 | + | let accBalA = $t01504115123._3 | |
439 | + | let accBalB = $t01504115123._4 | |
440 | + | let lpSupply = getLpSupply(i.caller) | |
419 | 441 | let pmtA = parseIntValue(args[0]) | |
420 | 442 | let pmtB = parseIntValue(args[1]) | |
421 | 443 | let virtGetMinAmount = parseIntValue(args[2]) | |
422 | - | let $ | |
423 | - | let fee = $ | |
424 | - | let govFee = $ | |
425 | - | let teamFee = $ | |
426 | - | let $ | |
427 | - | let lp = $ | |
428 | - | let loss = $ | |
429 | - | let newBalanceA = $ | |
430 | - | let newBalanceB = $ | |
431 | - | let governanceReward = $ | |
432 | - | let tReward = $ | |
433 | - | let aId = $ | |
444 | + | let $t01529815365 = getFeeParams(i.caller, i.originCaller) | |
445 | + | let fee = $t01529815365._1 | |
446 | + | let govFee = $t01529815365._2 | |
447 | + | let teamFee = $t01529815365._3 | |
448 | + | let $t01537015562 = calcLPReplenishDiffProp(pmtA, pmtB, assetIdA, assetIdB, balA, balB, lpSupply, fee, govFee, teamFee, virtGetMinAmount) | |
449 | + | let lp = $t01537015562._1 | |
450 | + | let loss = $t01537015562._2 | |
451 | + | let newBalanceA = $t01537015562._3 | |
452 | + | let newBalanceB = $t01537015562._4 | |
453 | + | let governanceReward = $t01537015562._5 | |
454 | + | let tReward = $t01537015562._6 | |
455 | + | let aId = $t01537015562._7 | |
434 | 456 | $Tuple2(nil, $Tuple2(nil, [lp, loss, newBalanceA, newBalanceB, governanceReward, tReward, aId])) | |
435 | 457 | } | |
436 | 458 | ||
438 | 460 | ||
439 | 461 | @Callable(i) | |
440 | 462 | func calcLPReplenishTwoTokensREADONLY (callerBytes,args,pAmounts,pAssetIds) = { | |
441 | - | let $ | |
442 | - | let strAssetIdA = $ | |
443 | - | let strAssetIdB = $ | |
444 | - | let assetIdA = $ | |
445 | - | let assetIdB = $ | |
446 | - | let shareAssetId = $ | |
447 | - | let $ | |
448 | - | let balA = $ | |
449 | - | let balB = $ | |
450 | - | let accBalA = $ | |
451 | - | let accBalB = $ | |
452 | - | let lpSupply = | |
463 | + | let $t01580515895 = getPoolAssets(i.caller) | |
464 | + | let strAssetIdA = $t01580515895._1 | |
465 | + | let strAssetIdB = $t01580515895._2 | |
466 | + | let assetIdA = $t01580515895._3 | |
467 | + | let assetIdB = $t01580515895._4 | |
468 | + | let shareAssetId = $t01580515895._5 | |
469 | + | let $t01590015982 = getPoolBalances(i.caller, assetIdA, assetIdB) | |
470 | + | let balA = $t01590015982._1 | |
471 | + | let balB = $t01590015982._2 | |
472 | + | let accBalA = $t01590015982._3 | |
473 | + | let accBalB = $t01590015982._4 | |
474 | + | let lpSupply = getLpSupply(i.caller) | |
453 | 475 | let pmtA = parseIntValue(args[0]) | |
454 | 476 | let pmtB = parseIntValue(args[1]) | |
455 | - | let $ | |
456 | - | let lp = $ | |
457 | - | let change = $ | |
458 | - | let changeAssetId = $ | |
459 | - | let pmtAmountA = $ | |
460 | - | let pmtAmountB = $ | |
477 | + | let $t01610616249 = calcLPAmountReplensishTwoTokens(pmtA, pmtB, assetIdA, assetIdB, balA, balB, lpSupply) | |
478 | + | let lp = $t01610616249._1 | |
479 | + | let change = $t01610616249._2 | |
480 | + | let changeAssetId = $t01610616249._3 | |
481 | + | let pmtAmountA = $t01610616249._4 | |
482 | + | let pmtAmountB = $t01610616249._5 | |
461 | 483 | $Tuple2(nil, $Tuple2(nil, [lp, change, changeAssetId, pmtAmountA, pmtAmountB])) | |
462 | 484 | } | |
463 | 485 | ||
465 | 487 | ||
466 | 488 | @Callable(i) | |
467 | 489 | func withdrawREADONLY (callerBytes,args,pAmounts,pAssetIds) = { | |
468 | - | let $ | |
469 | - | let strAssetIdA = $ | |
470 | - | let strAssetIdB = $ | |
471 | - | let assetIdA = $ | |
472 | - | let assetIdB = $ | |
473 | - | let shareAssetId = $ | |
474 | - | let $ | |
475 | - | let balanceA = $ | |
476 | - | let balanceB = $ | |
477 | - | let accountBalanceA = $ | |
478 | - | let accountBalanceB = $ | |
479 | - | let shareAssetSupply = | |
490 | + | let $t01646016550 = getPoolAssets(i.caller) | |
491 | + | let strAssetIdA = $t01646016550._1 | |
492 | + | let strAssetIdB = $t01646016550._2 | |
493 | + | let assetIdA = $t01646016550._3 | |
494 | + | let assetIdB = $t01646016550._4 | |
495 | + | let shareAssetId = $t01646016550._5 | |
496 | + | let $t01655516661 = getPoolBalances(i.caller, assetIdA, assetIdB) | |
497 | + | let balanceA = $t01655516661._1 | |
498 | + | let balanceB = $t01655516661._2 | |
499 | + | let accountBalanceA = $t01655516661._3 | |
500 | + | let accountBalanceB = $t01655516661._4 | |
501 | + | let shareAssetSupply = getLpSupply(i.caller) | |
480 | 502 | let withdrawAmount = parseIntValue(args[0]) | |
481 | - | let $ | |
503 | + | let $t01676416926 = if ((size(args) == 3)) | |
482 | 504 | then $Tuple2(parseIntValue(args[1]), parseIntValue(args[2])) | |
483 | 505 | else $Tuple2(balanceA, balanceB) | |
484 | - | let balA = $ | |
485 | - | let balB = $ | |
506 | + | let balA = $t01676416926._1 | |
507 | + | let balB = $t01676416926._2 | |
486 | 508 | let amountToPayA = fraction(withdrawAmount, balA, shareAssetSupply) | |
487 | 509 | let amountToPayB = fraction(withdrawAmount, balB, shareAssetSupply) | |
488 | 510 | $Tuple2(nil, $Tuple2(nil, [amountToPayA, amountToPayB])) | |
493 | 515 | @Callable(i) | |
494 | 516 | func init (callerBytes,args,pAmounts,pAssetIds) = { | |
495 | 517 | let caller = Address(callerBytes) | |
496 | - | let $ | |
497 | - | let pmtAmountA = $ | |
498 | - | let pmtAssetIdA = $ | |
499 | - | let $ | |
500 | - | let pmtAmountB = $ | |
501 | - | let pmtAssetIdB = $ | |
518 | + | let $t01728117359 = $Tuple2(pAmounts[0], parsePaymentAsset(pAssetIds[0])) | |
519 | + | let pmtAmountA = $t01728117359._1 | |
520 | + | let pmtAssetIdA = $t01728117359._2 | |
521 | + | let $t01736417442 = $Tuple2(pAmounts[1], parsePaymentAsset(pAssetIds[1])) | |
522 | + | let pmtAmountB = $t01736417442._1 | |
523 | + | let pmtAssetIdB = $t01736417442._2 | |
502 | 524 | if (!(containsElement([adminPubKey1, adminPubKey2, adminPubKey3, adminInvokePubKey], i.originCallerPublicKey))) | |
503 | 525 | then throw("Only admin can call this function") | |
504 | 526 | else if ((size(args) != 1)) | |
508 | 530 | else if ((pmtAssetIdA == pmtAssetIdB)) | |
509 | 531 | then throw("Assets must be different") | |
510 | 532 | else { | |
511 | - | let $ | |
512 | - | let pmtStrAssetIdA = $ | |
513 | - | let pmtAssetNameA = $ | |
514 | - | let pmtDecimalsA = $ | |
515 | - | let $ | |
516 | - | let pmtStrAssetIdB = $ | |
517 | - | let pmtAssetNameB = $ | |
518 | - | let pmtDecimalsB = $ | |
533 | + | let $t01787717954 = getAssetInfo(pmtAssetIdA) | |
534 | + | let pmtStrAssetIdA = $t01787717954._1 | |
535 | + | let pmtAssetNameA = $t01787717954._2 | |
536 | + | let pmtDecimalsA = $t01787717954._3 | |
537 | + | let $t01796318040 = getAssetInfo(pmtAssetIdB) | |
538 | + | let pmtStrAssetIdB = $t01796318040._1 | |
539 | + | let pmtAssetNameB = $t01796318040._2 | |
540 | + | let pmtDecimalsB = $t01796318040._3 | |
519 | 541 | let firstHarvest = (args[0] == "true") | |
520 | 542 | let shareName = ((("s" + take(pmtAssetNameA, 7)) + "_") + take(pmtAssetNameB, 7)) | |
521 | 543 | let shareDescription = ((((("ShareToken of SwopFi protocol for " + pmtAssetNameA) + " and ") + pmtAssetNameB) + " at address ") + toString(this)) | |
552 | 574 | @Callable(i) | |
553 | 575 | func initWithInitRatio (callerBytes,args,pAmounts,pAssetIds) = { | |
554 | 576 | let caller = Address(callerBytes) | |
555 | - | let $ | |
556 | - | let amtAssetA = $ | |
557 | - | let amtAssetB = $ | |
558 | - | let assetIdAStr = $ | |
559 | - | let assetIdBStr = $ | |
560 | - | let firstHarvest = $ | |
577 | + | let $t02026120461 = $Tuple5(parseIntValue(args[0]), parseIntValue(args[1]), args[2], args[3], (args[4] == "true")) | |
578 | + | let amtAssetA = $t02026120461._1 | |
579 | + | let amtAssetB = $t02026120461._2 | |
580 | + | let assetIdAStr = $t02026120461._3 | |
581 | + | let assetIdBStr = $t02026120461._4 | |
582 | + | let firstHarvest = $t02026120461._5 | |
561 | 583 | if (!(containsElement([adminPubKey1, adminPubKey2, adminPubKey3, adminInvokePubKey], i.originCallerPublicKey))) | |
562 | 584 | then throw("Only admin can call this function") | |
563 | 585 | else if ((size(args) != 5)) | |
567 | 589 | else if ((assetIdAStr == assetIdBStr)) | |
568 | 590 | then throw("Assets must be different") | |
569 | 591 | else { | |
570 | - | let $ | |
571 | - | let pmtStrAssetIdA = $ | |
572 | - | let pmtAssetNameA = $ | |
573 | - | let pmtDecimalsA = $ | |
574 | - | let $ | |
575 | - | let pmtStrAssetIdB = $ | |
576 | - | let pmtAssetNameB = $ | |
577 | - | let pmtDecimalsB = $ | |
592 | + | let $t02089620973 = getAssetInfo(assetIdAStr) | |
593 | + | let pmtStrAssetIdA = $t02089620973._1 | |
594 | + | let pmtAssetNameA = $t02089620973._2 | |
595 | + | let pmtDecimalsA = $t02089620973._3 | |
596 | + | let $t02098221059 = getAssetInfo(assetIdBStr) | |
597 | + | let pmtStrAssetIdB = $t02098221059._1 | |
598 | + | let pmtAssetNameB = $t02098221059._2 | |
599 | + | let pmtDecimalsB = $t02098221059._3 | |
578 | 600 | let shareName = ((("s" + take(pmtAssetNameA, 7)) + "_") + take(pmtAssetNameB, 7)) | |
579 | 601 | let shareDescription = ((((("ShareToken of SwopFi protocol for " + pmtAssetNameA) + " and ") + pmtAssetNameB) + " at address ") + toString(this)) | |
580 | 602 | let shareDecimals = ((pmtDecimalsA + pmtDecimalsB) / 2) | |
605 | 627 | @Callable(i) | |
606 | 628 | func exchange (callerBytes,args,pAmounts,pAssetIds) = valueOrElse(isOraclePool(toString(i.caller)), valueOrElse(isDepricated(toString(i.caller)), valueOrElse(isActive(), { | |
607 | 629 | let caller = Address(callerBytes) | |
608 | - | let $ | |
609 | - | let pmtAmount = $ | |
610 | - | let pmtAssetId = $ | |
630 | + | let $t02348523561 = $Tuple2(pAmounts[0], parsePaymentAsset(pAssetIds[0])) | |
631 | + | let pmtAmount = $t02348523561._1 | |
632 | + | let pmtAssetId = $t02348523561._2 | |
611 | 633 | let minAmountToReceive = parseIntValue(args[0]) | |
612 | - | let $ | |
613 | - | let strAssetIdA = $ | |
614 | - | let strAssetIdB = $ | |
615 | - | let assetIdA = $ | |
616 | - | let assetIdB = $ | |
617 | - | let $ | |
618 | - | let balanceA = $ | |
619 | - | let balanceB = $ | |
620 | - | let accountBalanceA = $ | |
621 | - | let accountBalanceB = $ | |
634 | + | let $t02362623702 = getPoolAssets(i.caller) | |
635 | + | let strAssetIdA = $t02362623702._1 | |
636 | + | let strAssetIdB = $t02362623702._2 | |
637 | + | let assetIdA = $t02362623702._3 | |
638 | + | let assetIdB = $t02362623702._4 | |
639 | + | let $t02371123817 = getPoolBalances(i.caller, assetIdA, assetIdB) | |
640 | + | let balanceA = $t02371123817._1 | |
641 | + | let balanceB = $t02371123817._2 | |
642 | + | let accountBalanceA = $t02371123817._3 | |
643 | + | let accountBalanceB = $t02371123817._4 | |
622 | 644 | if ((size(args) != 1)) | |
623 | 645 | then throw("Wrong args size") | |
624 | 646 | else if (if ((balanceA == 0)) | |
636 | 658 | else (balanceB > accountBalanceB)) | |
637 | 659 | then $Tuple2(nil, ([ScriptTransfer(caller, pmtAmount, pmtAssetId)] ++ suspendSuspicious(accountBalanceA, accountBalanceB, balanceA, balanceB, strAssetIdA, strAssetIdB))) | |
638 | 660 | else { | |
639 | - | let $ | |
640 | - | let fee = $ | |
641 | - | let govFee = $ | |
642 | - | let teamFee = $ | |
643 | - | let $ | |
661 | + | let $t02471724784 = getFeeParams(i.caller, i.originCaller) | |
662 | + | let fee = $t02471724784._1 | |
663 | + | let govFee = $t02471724784._2 | |
664 | + | let teamFee = $t02471724784._3 | |
665 | + | let $t02479725148 = if ((pmtAssetId == assetIdA)) | |
644 | 666 | then calculateFees(pmtAmount, minAmountToReceive, balanceA, balanceB, fee, govFee, teamFee) | |
645 | 667 | else calculateFees(pmtAmount, minAmountToReceive, balanceB, balanceA, fee, govFee, teamFee) | |
646 | - | let amountWithoutFee = $ | |
647 | - | let amountWithFee = $ | |
648 | - | let governanceReward = $ | |
649 | - | let teamReward = $ | |
650 | - | let $ | |
668 | + | let amountWithoutFee = $t02479725148._1 | |
669 | + | let amountWithFee = $t02479725148._2 | |
670 | + | let governanceReward = $t02479725148._3 | |
671 | + | let teamReward = $t02479725148._4 | |
672 | + | let $t02516225497 = if ((pmtAssetId == assetIdA)) | |
651 | 673 | then $Tuple3((balanceA + pmtAmount), (((balanceB - amountWithFee) - governanceReward) - teamReward), assetIdB) | |
652 | 674 | else $Tuple3((((balanceA - amountWithFee) - governanceReward) - teamReward), (balanceB + pmtAmount), assetIdA) | |
653 | - | let newBalanceA = $ | |
654 | - | let newBalanceB = $ | |
655 | - | let assetIdSend = $ | |
656 | - | let $ | |
675 | + | let newBalanceA = $t02516225497._1 | |
676 | + | let newBalanceB = $t02516225497._2 | |
677 | + | let assetIdSend = $t02516225497._3 | |
678 | + | let $t02551125771 = if ((pmtAssetId == assetIdA)) | |
657 | 679 | then $Tuple2(pmtAmount, ((amountWithFee + governanceReward) + teamReward)) | |
658 | 680 | else $Tuple2(((amountWithFee + governanceReward) + teamReward), pmtAmount) | |
659 | - | let stakeAmountA = $ | |
660 | - | let stakeAmountB = $ | |
681 | + | let stakeAmountA = $t02551125771._1 | |
682 | + | let stakeAmountB = $t02551125771._2 | |
661 | 683 | let stake1 = if (contains(stakingAssets, strAssetIdA)) | |
662 | 684 | then invoke(i.caller, "stakeUnstake", [(pmtAssetId == assetIdA), stakeAmountA, strAssetIdA], nil) | |
663 | 685 | else 0 | |
683 | 705 | let pmtAssetIdB = parsePaymentAsset(pAssetIds[1]) | |
684 | 706 | let stakeFarming = (args[0] == "true") | |
685 | 707 | let lockType = parseIntValue(args[1]) | |
686 | - | let $ | |
687 | - | let strAssetIdA = $ | |
688 | - | let strAssetIdB = $ | |
689 | - | let assetIdA = $ | |
690 | - | let assetIdB = $ | |
691 | - | let shareAssetId = $ | |
692 | - | let $ | |
693 | - | let balanceA = $ | |
694 | - | let balanceB = $ | |
695 | - | let accountBalanceA = $ | |
696 | - | let accountBalanceB = $ | |
697 | - | let shareAssetSupply = | |
708 | + | let $t02708627176 = getPoolAssets(i.caller) | |
709 | + | let strAssetIdA = $t02708627176._1 | |
710 | + | let strAssetIdB = $t02708627176._2 | |
711 | + | let assetIdA = $t02708627176._3 | |
712 | + | let assetIdB = $t02708627176._4 | |
713 | + | let shareAssetId = $t02708627176._5 | |
714 | + | let $t02718527291 = getPoolBalances(i.caller, assetIdA, assetIdB) | |
715 | + | let balanceA = $t02718527291._1 | |
716 | + | let balanceB = $t02718527291._2 | |
717 | + | let accountBalanceA = $t02718527291._3 | |
718 | + | let accountBalanceB = $t02718527291._4 | |
719 | + | let shareAssetSupply = getLpSupply(i.caller) | |
698 | 720 | if ((size(args) != 2)) | |
699 | 721 | then throw("Wrong args size") | |
700 | 722 | else if (if ((size(pAmounts) != 2)) | |
714 | 736 | else pAssetIds[2], pAmounts[2])] | |
715 | 737 | else (nil ++ suspendSuspicious(accountBalanceA, accountBalanceB, balanceA, balanceB, strAssetIdA, strAssetIdB))))) | |
716 | 738 | else { | |
717 | - | let $ | |
718 | - | let shareTokenToPayAmount = $ | |
719 | - | let change = $ | |
720 | - | let changeAssetId = $ | |
721 | - | let pmtAmountA = $ | |
722 | - | let pmtAmountB = $ | |
739 | + | let $t02828028478 = calcLPAmountReplensishTwoTokens(pAmounts[0], pAmounts[1], pmtAssetIdA, pmtAssetIdB, balanceA, balanceB, shareAssetSupply) | |
740 | + | let shareTokenToPayAmount = $t02828028478._1 | |
741 | + | let change = $t02828028478._2 | |
742 | + | let changeAssetId = $t02828028478._3 | |
743 | + | let pmtAmountA = $t02828028478._4 | |
744 | + | let pmtAmountB = $t02828028478._5 | |
723 | 745 | if ((shareTokenToPayAmount == 0)) | |
724 | 746 | then throw("Too small amount to replenish") | |
725 | 747 | else if ((0 > change)) | |
772 | 794 | let virtGetMinAmount = parseIntValue(args[0]) | |
773 | 795 | let stakeFarming = (args[1] == "true") | |
774 | 796 | let lockType = parseIntValue(args[2]) | |
775 | - | let $ | |
776 | - | let strAssetIdA = $ | |
777 | - | let strAssetIdB = $ | |
778 | - | let assetIdA = $ | |
779 | - | let assetIdB = $ | |
780 | - | let shareAssetId = $ | |
781 | - | let $ | |
782 | - | let balanceA = $ | |
783 | - | let balanceB = $ | |
784 | - | let accountBalanceA = $ | |
785 | - | let accountBalanceB = $ | |
786 | - | let shareAssetSupply = | |
797 | + | let $t03073730827 = getPoolAssets(i.caller) | |
798 | + | let strAssetIdA = $t03073730827._1 | |
799 | + | let strAssetIdB = $t03073730827._2 | |
800 | + | let assetIdA = $t03073730827._3 | |
801 | + | let assetIdB = $t03073730827._4 | |
802 | + | let shareAssetId = $t03073730827._5 | |
803 | + | let $t03083230938 = getPoolBalances(i.caller, assetIdA, assetIdB) | |
804 | + | let balanceA = $t03083230938._1 | |
805 | + | let balanceB = $t03083230938._2 | |
806 | + | let accountBalanceA = $t03083230938._3 | |
807 | + | let accountBalanceB = $t03083230938._4 | |
808 | + | let shareAssetSupply = getLpSupply(i.caller) | |
787 | 809 | let initial = ((balanceA + balanceB) == 0) | |
788 | 810 | if ((size(args) != 3)) | |
789 | 811 | then throw("Wrong args size") | |
806 | 828 | else pAssetIds[2], pAmounts[2])] | |
807 | 829 | else (nil ++ suspendSuspicious(accountBalanceA, accountBalanceB, balanceA, balanceB, strAssetIdA, strAssetIdB))))) | |
808 | 830 | else { | |
809 | - | let $ | |
810 | - | let fee = $ | |
811 | - | let govFee = $ | |
812 | - | let teamFee = $ | |
813 | - | let $ | |
814 | - | let pmtAssetIdStr = $ | |
815 | - | let pmtAssetIdName = $ | |
816 | - | let $ | |
817 | - | let shareTokenToPayAmount = $ | |
818 | - | let newBalanceA = $ | |
819 | - | let newBalanceB = $ | |
820 | - | let govReward = $ | |
821 | - | let teamReward = $ | |
822 | - | let govRewardAsset = $ | |
831 | + | let $t03189931966 = getFeeParams(i.caller, i.originCaller) | |
832 | + | let fee = $t03189931966._1 | |
833 | + | let govFee = $t03189931966._2 | |
834 | + | let teamFee = $t03189931966._3 | |
835 | + | let $t03197532037 = getAssetInfo(pmtAssetId) | |
836 | + | let pmtAssetIdStr = $t03197532037._1 | |
837 | + | let pmtAssetIdName = $t03197532037._2 | |
838 | + | let $t03205532300 = calcLPAmountReplenishOneToken(pmtAmount, pmtAssetId, assetIdA, assetIdB, balanceA, balanceB, shareAssetSupply, fee, govFee, teamFee, virtGetMinAmount) | |
839 | + | let shareTokenToPayAmount = $t03205532300._1 | |
840 | + | let newBalanceA = $t03205532300._2 | |
841 | + | let newBalanceB = $t03205532300._3 | |
842 | + | let govReward = $t03205532300._4 | |
843 | + | let teamReward = $t03205532300._5 | |
844 | + | let govRewardAsset = $t03205532300._6 | |
823 | 845 | let govRewardAssetStr = if ((govRewardAsset == assetIdA)) | |
824 | 846 | then strAssetIdA | |
825 | 847 | else strAssetIdB | |
868 | 890 | @Callable(i) | |
869 | 891 | func withdraw (callerBytes,args,pAmounts,pAssetIds) = valueOrElse(isOraclePool(toString(i.caller)), valueOrElse(isActive(), { | |
870 | 892 | let caller = Address(callerBytes) | |
871 | - | let $ | |
872 | - | let strAssetIdA = $ | |
873 | - | let strAssetIdB = $ | |
874 | - | let assetIdA = $ | |
875 | - | let assetIdB = $ | |
876 | - | let shareAssetId = $ | |
877 | - | let $ | |
878 | - | let balanceA = $ | |
879 | - | let balanceB = $ | |
880 | - | let accountBalanceA = $ | |
881 | - | let accountBalanceB = $ | |
882 | - | let shareAssetSupply = | |
883 | - | let $ | |
893 | + | let $t03436834458 = getPoolAssets(i.caller) | |
894 | + | let strAssetIdA = $t03436834458._1 | |
895 | + | let strAssetIdB = $t03436834458._2 | |
896 | + | let assetIdA = $t03436834458._3 | |
897 | + | let assetIdB = $t03436834458._4 | |
898 | + | let shareAssetId = $t03436834458._5 | |
899 | + | let $t03446734573 = getPoolBalances(i.caller, assetIdA, assetIdB) | |
900 | + | let balanceA = $t03446734573._1 | |
901 | + | let balanceB = $t03446734573._2 | |
902 | + | let accountBalanceA = $t03446734573._3 | |
903 | + | let accountBalanceB = $t03446734573._4 | |
904 | + | let shareAssetSupply = getLpSupply(i.caller) | |
905 | + | let $t03463535015 = if ((size(pAmounts) == 1)) | |
884 | 906 | then { | |
885 | 907 | let pAsset = parsePaymentAsset(pAssetIds[0]) | |
886 | 908 | if ((pAsset != shareAssetId)) | |
888 | 910 | else $Tuple2(pAmounts[0], pAsset) | |
889 | 911 | } | |
890 | 912 | else $Tuple2(0, shareAssetId) | |
891 | - | let pmtAmount = $ | |
892 | - | let pmtAssetId = $ | |
913 | + | let pmtAmount = $t03463535015._1 | |
914 | + | let pmtAssetId = $t03463535015._2 | |
893 | 915 | if ((size(args) != 1)) | |
894 | 916 | then throw("Wrong args size") | |
895 | 917 | else if ((size(pAmounts) > 1)) | |
934 | 956 | let withdrawAsset = if ((args[0] == "")) | |
935 | 957 | then unit | |
936 | 958 | else fromBase58String(args[0]) | |
937 | - | let $ | |
938 | - | let strAssetIdA = $ | |
939 | - | let strAssetIdB = $ | |
940 | - | let assetIdA = $ | |
941 | - | let assetIdB = $ | |
942 | - | let shareAssetId = $ | |
943 | - | let $ | |
944 | - | let balanceA = $ | |
945 | - | let balanceB = $ | |
946 | - | let accountBalanceA = $ | |
947 | - | let accountBalanceB = $ | |
948 | - | let shareAssetSupply = | |
949 | - | let $ | |
959 | + | let $t03723337323 = getPoolAssets(i.caller) | |
960 | + | let strAssetIdA = $t03723337323._1 | |
961 | + | let strAssetIdB = $t03723337323._2 | |
962 | + | let assetIdA = $t03723337323._3 | |
963 | + | let assetIdB = $t03723337323._4 | |
964 | + | let shareAssetId = $t03723337323._5 | |
965 | + | let $t03733237438 = getPoolBalances(i.caller, assetIdA, assetIdB) | |
966 | + | let balanceA = $t03733237438._1 | |
967 | + | let balanceB = $t03733237438._2 | |
968 | + | let accountBalanceA = $t03733237438._3 | |
969 | + | let accountBalanceB = $t03733237438._4 | |
970 | + | let shareAssetSupply = getLpSupply(i.caller) | |
971 | + | let $t03750037852 = if ((size(pAmounts) == 1)) | |
950 | 972 | then { | |
951 | 973 | let pAsset = parsePaymentAsset(pAssetIds[0]) | |
952 | 974 | if ((pAsset != shareAssetId)) | |
954 | 976 | else $Tuple2(pAmounts[0], pAsset) | |
955 | 977 | } | |
956 | 978 | else $Tuple2(0, shareAssetId) | |
957 | - | let pmtAmount = $ | |
958 | - | let pmtAssetId = $ | |
979 | + | let pmtAmount = $t03750037852._1 | |
980 | + | let pmtAssetId = $t03750037852._2 | |
959 | 981 | let virtMinToRecive = parseIntValue(args[1]) | |
960 | 982 | if ((size(args) != 3)) | |
961 | 983 | then throw("Wrong args size") | |
979 | 1001 | let withdrawAmount = (pmtAmount + unlockAmount) | |
980 | 1002 | let amountToPayA = fraction(withdrawAmount, balanceA, shareAssetSupply) | |
981 | 1003 | let amountToPayB = fraction(withdrawAmount, balanceB, shareAssetSupply) | |
982 | - | let $ | |
983 | - | let fee = $ | |
984 | - | let govFee = $ | |
985 | - | let teamFee = $ | |
986 | - | let $ | |
1004 | + | let $t03911939186 = getFeeParams(i.caller, i.originCaller) | |
1005 | + | let fee = $t03911939186._1 | |
1006 | + | let govFee = $t03911939186._2 | |
1007 | + | let teamFee = $t03911939186._3 | |
1008 | + | let $t03919939613 = if ((withdrawAsset == assetIdA)) | |
987 | 1009 | then calculateFees(amountToPayB, virtMinToRecive, (balanceB - amountToPayB), (balanceA - amountToPayA), fee, govFee, teamFee) | |
988 | 1010 | else calculateFees(amountToPayA, virtMinToRecive, (balanceA - amountToPayA), (balanceB - amountToPayB), fee, govFee, teamFee) | |
989 | - | let amountWithoutFee = $ | |
990 | - | let amountWithFee = $ | |
991 | - | let governanceReward = $ | |
992 | - | let teamReward = $ | |
993 | - | let $ | |
1011 | + | let amountWithoutFee = $t03919939613._1 | |
1012 | + | let amountWithFee = $t03919939613._2 | |
1013 | + | let governanceReward = $t03919939613._3 | |
1014 | + | let teamReward = $t03919939613._4 | |
1015 | + | let $t03962640936 = if ((withdrawAsset == assetIdA)) | |
994 | 1016 | then { | |
995 | 1017 | let unstake = if (contains(stakingAssets, strAssetIdA)) | |
996 | 1018 | then invoke(i.caller, "stakeUnstake", [false, (((amountToPayA + amountWithFee) + governanceReward) + teamReward), strAssetIdA], nil) | |
1007 | 1029 | then $Tuple4(balanceA, ((((balanceB - amountToPayB) - amountWithFee) - governanceReward) - teamReward), assetIdB, [ScriptTransfer(caller, (amountToPayB + amountWithFee), assetIdB)]) | |
1008 | 1030 | else throw("Strict value is not equal to itself.") | |
1009 | 1031 | } | |
1010 | - | let newBalanceA = $ | |
1011 | - | let newBalanceB = $ | |
1012 | - | let govRewardAssetId = $ | |
1013 | - | let userTransfer = $ | |
1032 | + | let newBalanceA = $t03962640936._1 | |
1033 | + | let newBalanceB = $t03962640936._2 | |
1034 | + | let govRewardAssetId = $t03962640936._3 | |
1035 | + | let userTransfer = $t03962640936._4 | |
1014 | 1036 | $Tuple2([ScriptTransfer(i.caller, unlockAmount, shareAssetId)], $Tuple2(([IntegerEntry(kBalanceA, newBalanceA), IntegerEntry(kBalanceB, newBalanceB), IntegerEntry(kShareAssetSupply, (shareAssetSupply - withdrawAmount)), Burn(shareAssetId, withdrawAmount), ScriptTransfer(moneyBoxAddress, governanceReward, govRewardAssetId), ScriptTransfer(teamBoxAddress, teamReward, govRewardAssetId)] ++ userTransfer), nil)) | |
1015 | 1037 | } | |
1016 | 1038 | else throw("Strict value is not equal to itself.") | |
1021 | 1043 | ||
1022 | 1044 | @Callable(i) | |
1023 | 1045 | func takeIntoAccountExtraFunds (callerBytes,args,pAmounts,pAssetIds) = valueOrElse(isOraclePool(toString(i.caller)), valueOrElse(isActive(), { | |
1024 | - | let $ | |
1025 | - | let strAssetIdA = $ | |
1026 | - | let strAssetIdB = $ | |
1027 | - | let assetIdA = $ | |
1028 | - | let assetIdB = $ | |
1046 | + | let $t04169641772 = getPoolAssets(i.caller) | |
1047 | + | let strAssetIdA = $t04169641772._1 | |
1048 | + | let strAssetIdB = $t04169641772._2 | |
1049 | + | let assetIdA = $t04169641772._3 | |
1050 | + | let assetIdB = $t04169641772._4 | |
1029 | 1051 | let claim = if (if ((assetIdA == USDN)) | |
1030 | 1052 | then true | |
1031 | 1053 | else (assetIdB == USDN)) | |
1032 | 1054 | then invoke(i.caller, "claimNetrinoRewards", nil, nil) | |
1033 | - | else | |
1055 | + | else nil | |
1034 | 1056 | if ((claim == claim)) | |
1035 | 1057 | then { | |
1036 | - | let $t04129341399 = getPoolBalances(i.caller, assetIdA, assetIdB) | |
1037 | - | let balanceA = $t04129341399._1 | |
1038 | - | let balanceB = $t04129341399._2 | |
1039 | - | let accountBalanceA = $t04129341399._3 | |
1040 | - | let accountBalanceB = $t04129341399._4 | |
1058 | + | let $t04195642092 = getPoolBalances(i.caller, assetIdA, assetIdB) | |
1059 | + | let balanceA = $t04195642092._1 | |
1060 | + | let balanceB = $t04195642092._2 | |
1061 | + | let accountBalanceA = $t04195642092._3 | |
1062 | + | let accountBalanceB = $t04195642092._4 | |
1063 | + | let stakedAmountA = $t04195642092._5 | |
1064 | + | let stakedAmountB = $t04195642092._6 | |
1041 | 1065 | let amountEnrollA = (accountBalanceA - balanceA) | |
1042 | 1066 | let amountEnrollB = (accountBalanceB - balanceB) | |
1067 | + | let $t04221242526 = if ((assetIdA == L2MP)) | |
1068 | + | then $Tuple2((accountBalanceA - stakedAmountA), amountEnrollB) | |
1069 | + | else if ((assetIdB == L2MP)) | |
1070 | + | then $Tuple2(amountEnrollA, (accountBalanceB - stakedAmountB)) | |
1071 | + | else $Tuple2(amountEnrollA, amountEnrollB) | |
1072 | + | let amountToStakeA = $t04221242526._1 | |
1073 | + | let amountToStakeB = $t04221242526._2 | |
1043 | 1074 | if ((size(args) != 0)) | |
1044 | 1075 | then throw("Wrong args size") | |
1045 | 1076 | else if ((moneyBoxAddress != i.originCaller)) | |
1054 | 1085 | then throw("No money to take") | |
1055 | 1086 | else { | |
1056 | 1087 | let stake1 = if (if (contains(stakingAssets, strAssetIdA)) | |
1057 | - | then ( | |
1088 | + | then (amountToStakeA > 0) | |
1058 | 1089 | else false) | |
1059 | - | then invoke(i.caller, "stakeUnstake", [true, | |
1090 | + | then invoke(i.caller, "stakeUnstake", [true, amountToStakeA, strAssetIdA], nil) | |
1060 | 1091 | else 0 | |
1061 | 1092 | if ((stake1 == stake1)) | |
1062 | 1093 | then { | |
1063 | 1094 | let stake2 = if (if (contains(stakingAssets, strAssetIdB)) | |
1064 | - | then ( | |
1095 | + | then (amountToStakeB > 0) | |
1065 | 1096 | else false) | |
1066 | - | then invoke(i.caller, "stakeUnstake", [true, | |
1097 | + | then invoke(i.caller, "stakeUnstake", [true, amountToStakeB, strAssetIdB], nil) | |
1067 | 1098 | else 0 | |
1068 | 1099 | if ((stake2 == stake2)) | |
1069 | 1100 | then $Tuple2(nil, $Tuple2([IntegerEntry(kBalanceA, (balanceA + amountEnrollA)), IntegerEntry(kBalanceB, (balanceB + amountEnrollB))], nil)) |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let version = "1.0.0" | |
5 | 5 | ||
6 | 6 | let kVersion = "version" | |
7 | 7 | ||
8 | 8 | let kActive = "active" | |
9 | 9 | ||
10 | 10 | let kDeprecated = "deprecated_" | |
11 | 11 | ||
12 | 12 | let kAssetIdA = "A_asset_id" | |
13 | 13 | ||
14 | 14 | let kAssetIdB = "B_asset_id" | |
15 | 15 | ||
16 | 16 | let kBalanceA = "A_asset_balance" | |
17 | 17 | ||
18 | 18 | let kBalanceB = "B_asset_balance" | |
19 | 19 | ||
20 | 20 | let kBalanceInitA = "A_asset_init" | |
21 | 21 | ||
22 | 22 | let kBalanceInitB = "B_asset_init" | |
23 | 23 | ||
24 | 24 | let kShareAssetId = "share_asset_id" | |
25 | 25 | ||
26 | 26 | let kShareAssetSupply = "share_asset_supply" | |
27 | 27 | ||
28 | 28 | let kFee = "commission" | |
29 | 29 | ||
30 | 30 | let kCause = "shutdown_cause" | |
31 | 31 | ||
32 | 32 | let kFirstHarvest = "first_harvest" | |
33 | 33 | ||
34 | 34 | let kFirstHarvestHeight = "first_harvest_height" | |
35 | 35 | ||
36 | 36 | let kShareLimit = "share_limit_on_first_harvest" | |
37 | 37 | ||
38 | 38 | let kBasePeriod = "base_period" | |
39 | 39 | ||
40 | 40 | let kPeriodLength = "period_length" | |
41 | 41 | ||
42 | 42 | let kStartHeight = "start_height" | |
43 | 43 | ||
44 | 44 | let kUSDNAddress = "staking_usdnnsbt_address" | |
45 | 45 | ||
46 | 46 | let kEURNAddress = "staking_eurn_address" | |
47 | 47 | ||
48 | 48 | let kLeasingAmount = "leasing_amount" | |
49 | 49 | ||
50 | 50 | let kUSDNAssetId = "usdn_asset_id" | |
51 | 51 | ||
52 | 52 | let kEURNAssetId = "eurn_asset_id" | |
53 | 53 | ||
54 | + | let kL2MPAssetId = "l2mp_asset_id" | |
55 | + | ||
54 | 56 | let kStakingAssets = "staking_assets" | |
55 | 57 | ||
56 | 58 | let kOracleActive = "active_all_contracts" | |
57 | 59 | ||
58 | 60 | let kDiscounts = "discounts" | |
59 | 61 | ||
60 | 62 | let kDiscountValues = "discount_values" | |
61 | 63 | ||
62 | 64 | let kUserGSwopInGov = "_GSwop_amount" | |
63 | 65 | ||
64 | 66 | let kUserSwopInGov = "_SWOP_amount" | |
65 | 67 | ||
66 | 68 | let kOraclePool = "pool_" | |
67 | 69 | ||
68 | 70 | let kAdminPubKey1 = "admin_pub_1" | |
69 | 71 | ||
70 | 72 | let kAdminPubKey2 = "admin_pub_2" | |
71 | 73 | ||
72 | 74 | let kAdminPubKey3 = "admin_pub_3" | |
73 | 75 | ||
74 | 76 | let kAdminInvokePubKey = "admin_invoke_pub" | |
75 | 77 | ||
76 | 78 | let kMoneyBoxAddress = "money_box_address" | |
77 | 79 | ||
78 | 80 | let kTeamBoxAddress = "team_box_address" | |
79 | 81 | ||
80 | 82 | let kVotingAddress = "voting_address" | |
81 | 83 | ||
82 | 84 | let kGovAddress = "governance_address" | |
83 | 85 | ||
84 | 86 | let kFarmingAddress = "farming_address" | |
85 | 87 | ||
86 | - | let oracle = Address(base58'3MvVBtsXroQpy1tsPw21TU2ET9A8WfmrNjz') | |
88 | + | let kL2MPAddress = "staking_l2mp_address" | |
89 | + | ||
90 | + | let oracle = Address(base58'3PEbqViERCoKnmcSULh6n2aiMvUdSQdCsom') | |
87 | 91 | ||
88 | 92 | func getBase58FromOracle (key) = match getString(oracle, key) { | |
89 | 93 | case string: String => | |
90 | 94 | fromBase58String(string) | |
91 | 95 | case nothing => | |
92 | 96 | throw((key + "is empty")) | |
93 | 97 | } | |
94 | 98 | ||
95 | 99 | ||
96 | 100 | let adminPubKey1 = getBase58FromOracle(kAdminPubKey1) | |
97 | 101 | ||
98 | 102 | let adminPubKey2 = getBase58FromOracle(kAdminPubKey2) | |
99 | 103 | ||
100 | 104 | let adminPubKey3 = getBase58FromOracle(kAdminPubKey3) | |
101 | 105 | ||
102 | 106 | let adminInvokePubKey = getBase58FromOracle(kAdminInvokePubKey) | |
103 | 107 | ||
104 | 108 | let moneyBoxAddress = Address(getBase58FromOracle(kMoneyBoxAddress)) | |
105 | 109 | ||
106 | 110 | let teamBoxAddress = Address(getBase58FromOracle(kTeamBoxAddress)) | |
107 | 111 | ||
108 | 112 | let votingAddress = Address(getBase58FromOracle(kVotingAddress)) | |
109 | 113 | ||
110 | 114 | let govAddress = Address(getBase58FromOracle(kGovAddress)) | |
111 | 115 | ||
112 | 116 | let farmingAddress = Address(getBase58FromOracle(kFarmingAddress)) | |
113 | 117 | ||
114 | 118 | let USDN = getBase58FromOracle(kUSDNAssetId) | |
115 | 119 | ||
116 | 120 | let EURN = getBase58FromOracle(kEURNAssetId) | |
117 | 121 | ||
122 | + | let L2MP = getBase58FromOracle(kL2MPAssetId) | |
123 | + | ||
118 | 124 | let stakingAssets = getStringValue(oracle, kStakingAssets) | |
119 | 125 | ||
120 | 126 | let stakingUSDNAddress = Address(getBase58FromOracle(kUSDNAddress)) | |
121 | 127 | ||
122 | 128 | let stakingEURNAddress = Address(getBase58FromOracle(kEURNAddress)) | |
129 | + | ||
130 | + | let stakingL2MPAddress = Address(getBase58FromOracle(kL2MPAddress)) | |
123 | 131 | ||
124 | 132 | let basePeriod = valueOrErrorMessage(getInteger(votingAddress, kBasePeriod), "Empty kBasePeriod") | |
125 | 133 | ||
126 | 134 | let startHeight = valueOrErrorMessage(getInteger(votingAddress, kStartHeight), "Empty kStartHeight") | |
127 | 135 | ||
128 | 136 | let periodLength = valueOrErrorMessage(getInteger(votingAddress, kPeriodLength), "Empty kPeriodLength") | |
129 | 137 | ||
130 | 138 | let firstHarvestEndPeriod = ((basePeriod + ((height - startHeight) / periodLength)) + 3) | |
131 | 139 | ||
132 | 140 | let active = getBooleanValue(oracle, kOracleActive) | |
133 | 141 | ||
134 | 142 | let feeScale6 = 1000000 | |
135 | 143 | ||
136 | 144 | let scale8 = 100000000 | |
137 | 145 | ||
138 | 146 | let scale16 = toBigInt(10000000000000000) | |
139 | 147 | ||
140 | 148 | func accountBalance (assetId,pool) = match assetId { | |
141 | 149 | case id: ByteVector => | |
142 | 150 | assetBalance(pool, id) | |
143 | 151 | case waves: Unit => | |
144 | 152 | wavesBalance(pool).available | |
145 | 153 | case _ => | |
146 | 154 | throw("Match error") | |
147 | 155 | } | |
148 | 156 | ||
149 | 157 | ||
150 | 158 | func stakedAmount (assetId,pool) = { | |
151 | 159 | let stakedAmountCalculated = match assetId { | |
152 | 160 | case aId: ByteVector => | |
153 | 161 | if ((aId == USDN)) | |
154 | 162 | then getInteger(stakingUSDNAddress, ((("rpd_balance_" + toBase58String(aId)) + "_") + toString(pool))) | |
155 | 163 | else if ((aId == EURN)) | |
156 | 164 | then getInteger(stakingEURNAddress, ((("%s%s%s__stakingBalance__" + toBase58String(aId)) + "__") + toString(pool))) | |
157 | - | else 0 | |
165 | + | else if ((aId == L2MP)) | |
166 | + | then { | |
167 | + | let available = { | |
168 | + | let @ = invoke(stakingL2MPAddress, "getUserAssetsREADONLY", [pool], nil) | |
169 | + | if ($isInstanceOf(@, "(Int, Int, Int, Int, Int)")) | |
170 | + | then @ | |
171 | + | else throw(($getType(@) + " couldn't be cast to (Int, Int, Int, Int, Int)")) | |
172 | + | } | |
173 | + | if ((available == available)) | |
174 | + | then available | |
175 | + | else throw("Strict value is not equal to itself.") | |
176 | + | } | |
177 | + | else 0 | |
158 | 178 | case _: Unit => | |
159 | 179 | valueOrElse(getInteger(pool, kLeasingAmount), 0) | |
160 | 180 | case _ => | |
161 | 181 | throw("Match error") | |
162 | 182 | } | |
163 | 183 | match stakedAmountCalculated { | |
164 | 184 | case i: Int => | |
165 | 185 | i | |
166 | 186 | case _ => | |
167 | 187 | 0 | |
168 | 188 | } | |
169 | 189 | } | |
170 | 190 | ||
171 | 191 | ||
172 | 192 | func getAssetInfo (assetId) = match assetId { | |
173 | 193 | case id: String|ByteVector => | |
174 | - | let $ | |
194 | + | let $t044634635 = match id { | |
175 | 195 | case aId: ByteVector => | |
176 | 196 | $Tuple2(toBase58String(aId), aId) | |
177 | 197 | case aId: String => | |
178 | 198 | $Tuple2(aId, fromBase58String(aId)) | |
179 | 199 | case _ => | |
180 | 200 | throw("Match error") | |
181 | 201 | } | |
182 | - | let stringId = $ | |
183 | - | let bytesId = $ | |
202 | + | let stringId = $t044634635._1 | |
203 | + | let bytesId = $t044634635._2 | |
184 | 204 | let info = valueOrErrorMessage(assetInfo(bytesId), (("Asset " + stringId) + " doesn't exist")) | |
185 | 205 | $Tuple3(stringId, info.name, info.decimals) | |
186 | 206 | case waves: Unit => | |
187 | 207 | $Tuple3("WAVES", "WAVES", 8) | |
188 | 208 | case _ => | |
189 | 209 | throw("Match error") | |
190 | 210 | } | |
191 | 211 | ||
192 | 212 | ||
193 | 213 | func suspend (cause) = [BooleanEntry(kActive, false), StringEntry(kCause, cause)] | |
194 | 214 | ||
195 | 215 | ||
196 | 216 | func calculateFeeDiscount (userAddr) = { | |
197 | 217 | let swopAmount = valueOrElse(getInteger(govAddress, (toString(userAddr) + kUserSwopInGov)), 0) | |
198 | 218 | let gSwopAmount = valueOrElse(getInteger(govAddress, (toString(userAddr) + kUserGSwopInGov)), swopAmount) | |
199 | 219 | let discountValues = split(getStringValue(oracle, kDiscountValues), ",") | |
200 | 220 | let discounts = split(getStringValue(oracle, kDiscounts), ",") | |
201 | 221 | if (if ((gSwopAmount >= parseIntValue(discountValues[0]))) | |
202 | 222 | then (parseIntValue(discountValues[1]) > gSwopAmount) | |
203 | 223 | else false) | |
204 | 224 | then (feeScale6 - parseIntValue(discounts[0])) | |
205 | 225 | else if (if ((gSwopAmount >= parseIntValue(discountValues[1]))) | |
206 | 226 | then (parseIntValue(discountValues[2]) > gSwopAmount) | |
207 | 227 | else false) | |
208 | 228 | then (feeScale6 - parseIntValue(discounts[1])) | |
209 | 229 | else if (if ((gSwopAmount >= parseIntValue(discountValues[2]))) | |
210 | 230 | then (parseIntValue(discountValues[3]) > gSwopAmount) | |
211 | 231 | else false) | |
212 | 232 | then (feeScale6 - parseIntValue(discounts[2])) | |
213 | 233 | else if (if ((gSwopAmount >= parseIntValue(discountValues[3]))) | |
214 | 234 | then (parseIntValue(discountValues[4]) > gSwopAmount) | |
215 | 235 | else false) | |
216 | 236 | then (feeScale6 - parseIntValue(discounts[3])) | |
217 | 237 | else if ((gSwopAmount >= parseIntValue(discountValues[4]))) | |
218 | 238 | then (feeScale6 - parseIntValue(discounts[4])) | |
219 | 239 | else feeScale6 | |
220 | 240 | } | |
221 | 241 | ||
222 | 242 | ||
223 | 243 | func calculateFees (pmtAmount,minAmountToReceive,tokenFrom,tokenTo,fee,feeGov,feeTeam) = { | |
224 | 244 | let amountWithoutFee = fraction(tokenTo, pmtAmount, (pmtAmount + tokenFrom)) | |
225 | 245 | let amountWithFee = fraction(amountWithoutFee, (feeScale6 - fee), feeScale6) | |
226 | 246 | let governanceReward = fraction(amountWithoutFee, feeGov, feeScale6) | |
227 | 247 | let teamReward = fraction(amountWithoutFee, feeTeam, feeScale6) | |
228 | 248 | if ((minAmountToReceive > amountWithFee)) | |
229 | 249 | then throw(((("Calculated amount to receive " + toString(amountWithFee)) + " is less than specified minimum ") + toString(minAmountToReceive))) | |
230 | 250 | else $Tuple4(amountWithoutFee, amountWithFee, governanceReward, teamReward) | |
231 | 251 | } | |
232 | 252 | ||
233 | 253 | ||
234 | 254 | func calculateVirtPay (pmtAmount,balance,fee) = { | |
235 | 255 | let F = (feeScale6 - fee) | |
236 | 256 | let k = fraction(fee, 55, 100) | |
237 | 257 | let a = (scale8 + fraction((F * k), scale8, (feeScale6 * feeScale6))) | |
238 | 258 | let b = ((((balance + fraction(balance, F, feeScale6)) + fraction(pmtAmount, F, feeScale6)) - pmtAmount) - fraction(pmtAmount, (F * k), (feeScale6 * feeScale6))) | |
239 | 259 | let c = (-(toBigInt(balance)) * toBigInt(pmtAmount)) | |
240 | 260 | let D = ((toBigInt(b) * toBigInt(b)) - fraction((toBigInt(4) * c), toBigInt(a), toBigInt(scale8))) | |
241 | 261 | toInt(fraction((-(toBigInt(b)) + sqrtBigInt(D, 0, 0, DOWN)), toBigInt(scale8), toBigInt((2 * a)))) | |
242 | 262 | } | |
243 | 263 | ||
244 | 264 | ||
245 | 265 | func parsePaymentAsset (assetId) = if ((assetId == base58'')) | |
246 | 266 | then unit | |
247 | 267 | else assetId | |
248 | 268 | ||
249 | 269 | ||
250 | 270 | func suspendSuspicious (accountBalanceA,accountBalanceB,balanceA,balanceB,assetIdA,assetIdB) = suspend(((((((((((((((("Suspicious state. Actual balances: " + toString(accountBalanceA)) + " ") + assetIdA) + ", ") + toString(accountBalanceB)) + " ") + assetIdB) + ". State: ") + toString(balanceA)) + " ") + assetIdA) + ", ") + toString(balanceB)) + " ") + assetIdB)) | |
251 | 271 | ||
252 | 272 | ||
253 | 273 | func isActive () = if (active) | |
254 | 274 | then unit | |
255 | 275 | else throw("DApp is inactive at this moment") | |
256 | 276 | ||
257 | 277 | ||
258 | 278 | func isOraclePool (poolAddress) = if (isDefined(getString(oracle, (kOraclePool + poolAddress)))) | |
259 | 279 | then unit | |
260 | 280 | else throw("DApp is not registered pool") | |
261 | 281 | ||
262 | 282 | ||
263 | 283 | func isDepricated (poolAddress) = if (!(valueOrElse(getBoolean(oracle, (kDeprecated + poolAddress)), false))) | |
264 | 284 | then unit | |
265 | 285 | else throw("Pool is deprecated. Only withdraw action allowed.") | |
266 | 286 | ||
267 | 287 | ||
268 | 288 | func getPoolBalances (pool,assetIdA,assetIdB) = { | |
269 | 289 | let balanceA = getIntegerValue(pool, kBalanceA) | |
270 | 290 | let balanceB = getIntegerValue(pool, kBalanceB) | |
271 | 291 | let stakedAmountA = stakedAmount(assetIdA, pool) | |
272 | 292 | let stakedAmountB = stakedAmount(assetIdB, pool) | |
273 | 293 | let accountBalanceA = (accountBalance(assetIdA, pool) + stakedAmountA) | |
274 | 294 | let accountBalanceB = (accountBalance(assetIdB, pool) + stakedAmountB) | |
275 | - | let shareSupply = getIntegerValue(pool, kShareAssetSupply) | |
276 | - | $Tuple5(balanceA, balanceB, accountBalanceA, accountBalanceB, shareSupply) | |
295 | + | $Tuple6(balanceA, balanceB, accountBalanceA, accountBalanceB, stakedAmountA, stakedAmountB) | |
277 | 296 | } | |
297 | + | ||
298 | + | ||
299 | + | func getLpSupply (pool) = getIntegerValue(pool, kShareAssetSupply) | |
278 | 300 | ||
279 | 301 | ||
280 | 302 | func getPoolAssets (pool) = { | |
281 | 303 | let strAssetIdA = getStringValue(pool, kAssetIdA) | |
282 | 304 | let strAssetIdB = getStringValue(pool, kAssetIdB) | |
283 | 305 | let assetIdA = if ((strAssetIdA == "WAVES")) | |
284 | 306 | then unit | |
285 | 307 | else fromBase58String(strAssetIdA) | |
286 | 308 | let assetIdB = if ((strAssetIdB == "WAVES")) | |
287 | 309 | then unit | |
288 | 310 | else fromBase58String(strAssetIdB) | |
289 | 311 | let shareAssetId = fromBase58String(getStringValue(pool, kShareAssetId)) | |
290 | 312 | $Tuple5(strAssetIdA, strAssetIdB, assetIdA, assetIdB, shareAssetId) | |
291 | 313 | } | |
292 | 314 | ||
293 | 315 | ||
294 | 316 | func getFeeParams (pool,caller) = { | |
295 | 317 | let feeDiscount = calculateFeeDiscount(caller) | |
296 | 318 | let fee = fraction(getIntegerValue(pool, kFee), feeDiscount, feeScale6, CEILING) | |
297 | 319 | let govFee = fraction(fee, 35, 100) | |
298 | 320 | let teamFee = fraction(fee, 10, 100) | |
299 | 321 | $Tuple3(fee, govFee, teamFee) | |
300 | 322 | } | |
301 | 323 | ||
302 | 324 | ||
303 | 325 | func calcLPAmountReplensishTwoTokens (pmtA,pmtB,pmtIdA,pmtIdB,balA,balB,shareAssetSupply) = { | |
304 | - | let $ | |
305 | - | let pmtStrAssetIdA = $ | |
306 | - | let pmtAssetNameA = $ | |
307 | - | let pmtDecimalsA = $ | |
308 | - | let $ | |
309 | - | let pmtStrAssetIdB = $ | |
310 | - | let pmtAssetNameB = $ | |
311 | - | let pmtDecimalsB = $ | |
326 | + | let $t0997610048 = getAssetInfo(pmtIdA) | |
327 | + | let pmtStrAssetIdA = $t0997610048._1 | |
328 | + | let pmtAssetNameA = $t0997610048._2 | |
329 | + | let pmtDecimalsA = $t0997610048._3 | |
330 | + | let $t01005310125 = getAssetInfo(pmtIdB) | |
331 | + | let pmtStrAssetIdB = $t01005310125._1 | |
332 | + | let pmtAssetNameB = $t01005310125._2 | |
333 | + | let pmtDecimalsB = $t01005310125._3 | |
312 | 334 | let initial = ((balA + balB) == 0) | |
313 | - | let $ | |
335 | + | let $t01016810827 = if (initial) | |
314 | 336 | then $Tuple5(pmtA, pmtB, 0, pmtIdA, toBigInt(1)) | |
315 | 337 | else { | |
316 | 338 | let ratioShareTokensInA = fraction(scale16, toBigInt(pmtA), toBigInt(balA)) | |
317 | 339 | let ratioShareTokensInB = fraction(scale16, toBigInt(pmtB), toBigInt(balB)) | |
318 | 340 | if ((ratioShareTokensInB > ratioShareTokensInA)) | |
319 | 341 | then { | |
320 | 342 | let pmt = fraction(pmtA, balB, balA) | |
321 | 343 | $Tuple5(pmtA, pmt, (pmtB - pmt), pmtIdB, ratioShareTokensInA) | |
322 | 344 | } | |
323 | 345 | else { | |
324 | 346 | let pmt = fraction(pmtB, balA, balB) | |
325 | 347 | $Tuple5(pmt, pmtB, (pmtA - pmt), pmtIdA, ratioShareTokensInB) | |
326 | 348 | } | |
327 | 349 | } | |
328 | - | let pmtAmountA = $ | |
329 | - | let pmtAmountB = $ | |
330 | - | let change = $ | |
331 | - | let changeAssetId = $ | |
332 | - | let shareTokenRatio = $ | |
350 | + | let pmtAmountA = $t01016810827._1 | |
351 | + | let pmtAmountB = $t01016810827._2 | |
352 | + | let change = $t01016810827._3 | |
353 | + | let changeAssetId = $t01016810827._4 | |
354 | + | let shareTokenRatio = $t01016810827._5 | |
333 | 355 | let shareTokenToPayAmount = if (initial) | |
334 | 356 | then { | |
335 | 357 | let shareDecimals = ((pmtDecimalsA + pmtDecimalsB) / 2) | |
336 | 358 | fraction(pow(pmtAmountA, pmtDecimalsA, 5, 1, pmtDecimalsA, DOWN), pow(pmtAmountB, pmtDecimalsB, 5, 1, pmtDecimalsB, DOWN), pow(10, 0, shareDecimals, 0, 0, DOWN)) | |
337 | 359 | } | |
338 | 360 | else toInt(fraction(shareTokenRatio, toBigInt(shareAssetSupply), scale16)) | |
339 | 361 | $Tuple5(shareTokenToPayAmount, change, changeAssetId, pmtAmountA, pmtAmountB) | |
340 | 362 | } | |
341 | 363 | ||
342 | 364 | ||
343 | - | func | |
365 | + | func calcLPAmountReplenishOneToken (pmtAmount,pmtAssetId,aId,bId,balA,balB,lpSupply,fee,govFee,teamFee,virtGetMinAmount) = if ((pmtAssetId == aId)) | |
344 | 366 | then { | |
345 | 367 | let virtPayAmount = calculateVirtPay(pmtAmount, balA, fee) | |
346 | - | let $ | |
347 | - | let amountWithoutFee = $ | |
348 | - | let amountWithFee = $ | |
349 | - | let governanceReward = $ | |
350 | - | let tReward = $ | |
368 | + | let $t01169111838 = calculateFees(virtPayAmount, virtGetMinAmount, balA, balB, fee, govFee, teamFee) | |
369 | + | let amountWithoutFee = $t01169111838._1 | |
370 | + | let amountWithFee = $t01169111838._2 | |
371 | + | let governanceReward = $t01169111838._3 | |
372 | + | let tReward = $t01169111838._4 | |
351 | 373 | let balanceAVirt = (balA + virtPayAmount) | |
352 | 374 | let balanceBVirt = (((balB + amountWithoutFee) - governanceReward) - tReward) | |
353 | 375 | let newBalanceA = (balA + pmtAmount) | |
354 | 376 | let newBalanceB = ((balB - governanceReward) - tReward) | |
355 | 377 | let ratioShareTokensInA = fraction(toBigInt((pmtAmount - virtPayAmount)), scale16, toBigInt(balanceAVirt)) | |
356 | 378 | let ratioShareTokensInB = fraction(toBigInt(amountWithFee), scale16, toBigInt(balanceBVirt)) | |
357 | 379 | let shareTokenToPayAmount = toInt(fraction(min([ratioShareTokensInA, ratioShareTokensInB]), toBigInt(lpSupply), scale16)) | |
358 | 380 | let shareTokenToPayAmountInBoth = toInt(fraction(fraction(toBigInt((pmtAmount - virtPayAmount)), scale16, toBigInt(balA)), toBigInt(lpSupply), scale16)) | |
359 | 381 | let loss = fraction((shareTokenToPayAmount - shareTokenToPayAmountInBoth), scale8, shareTokenToPayAmountInBoth) | |
360 | 382 | $Tuple7(shareTokenToPayAmount, newBalanceA, newBalanceB, governanceReward, tReward, bId, loss) | |
361 | 383 | } | |
362 | 384 | else { | |
363 | 385 | let virtPayAmount = calculateVirtPay(pmtAmount, balB, fee) | |
364 | - | let $ | |
365 | - | let amountWithoutFee = $ | |
366 | - | let amountWithFee = $ | |
367 | - | let governanceReward = $ | |
368 | - | let tReward = $ | |
386 | + | let $t01288213029 = calculateFees(virtPayAmount, virtGetMinAmount, balB, balA, fee, govFee, teamFee) | |
387 | + | let amountWithoutFee = $t01288213029._1 | |
388 | + | let amountWithFee = $t01288213029._2 | |
389 | + | let governanceReward = $t01288213029._3 | |
390 | + | let tReward = $t01288213029._4 | |
369 | 391 | let balanceAVirt = (((balA + amountWithoutFee) - governanceReward) - tReward) | |
370 | 392 | let balanceBVirt = (balB + virtPayAmount) | |
371 | 393 | let newBalanceA = ((balA - governanceReward) - tReward) | |
372 | 394 | let newBalanceB = (balB + pmtAmount) | |
373 | 395 | let ratioShareTokensInA = fraction(toBigInt(amountWithFee), scale16, toBigInt(balanceAVirt)) | |
374 | 396 | let ratioShareTokensInB = fraction(toBigInt((pmtAmount - virtPayAmount)), scale16, toBigInt(balanceBVirt)) | |
375 | 397 | let shareTokenToPayAmount = toInt(fraction(min([ratioShareTokensInA, ratioShareTokensInB]), toBigInt(lpSupply), scale16)) | |
376 | 398 | let shareTokenToPayAmountInBoth = toInt(fraction(fraction(toBigInt((pmtAmount - virtPayAmount)), scale16, toBigInt(balB)), toBigInt(lpSupply), scale16)) | |
377 | 399 | let loss = fraction((shareTokenToPayAmount - shareTokenToPayAmountInBoth), scale8, shareTokenToPayAmountInBoth) | |
378 | 400 | $Tuple7(shareTokenToPayAmount, newBalanceA, newBalanceB, governanceReward, tReward, aId, loss) | |
379 | 401 | } | |
380 | 402 | ||
381 | 403 | ||
382 | 404 | func calcLPReplenishDiffProp (pmtA,pmtB,pmtIdA,pmtIdB,balA,balB,lpSupply,fee,govFee,teamFee,virtGetMinAmount) = { | |
383 | - | let $ | |
384 | - | let lpTwoAmount = $ | |
385 | - | let change = $ | |
386 | - | let changeAssetId = $ | |
387 | - | let pmtAmountA = $ | |
388 | - | let pmtAmountB = $ | |
405 | + | let $t01419614344 = calcLPAmountReplensishTwoTokens(pmtA, pmtB, pmtIdA, pmtIdB, balA, balB, lpSupply) | |
406 | + | let lpTwoAmount = $t01419614344._1 | |
407 | + | let change = $t01419614344._2 | |
408 | + | let changeAssetId = $t01419614344._3 | |
409 | + | let pmtAmountA = $t01419614344._4 | |
410 | + | let pmtAmountB = $t01419614344._5 | |
389 | 411 | if ((change > 0)) | |
390 | 412 | then { | |
391 | - | let $ | |
392 | - | let lpOne = $ | |
393 | - | let newBalanceA = $ | |
394 | - | let newBalanceB = $ | |
395 | - | let governanceReward = $ | |
396 | - | let tReward = $ | |
397 | - | let gId = $ | |
398 | - | let loss = $ | |
413 | + | let $t01437614610 = calcLPAmountReplenishOneToken(change, changeAssetId, pmtIdA, pmtIdB, (balA + pmtAmountA), (balB + pmtAmountB), lpSupply, fee, govFee, teamFee, virtGetMinAmount) | |
414 | + | let lpOne = $t01437614610._1 | |
415 | + | let newBalanceA = $t01437614610._2 | |
416 | + | let newBalanceB = $t01437614610._3 | |
417 | + | let governanceReward = $t01437614610._4 | |
418 | + | let tReward = $t01437614610._5 | |
419 | + | let gId = $t01437614610._6 | |
420 | + | let loss = $t01437614610._7 | |
399 | 421 | $Tuple7((lpTwoAmount + lpOne), loss, newBalanceA, newBalanceB, governanceReward, tReward, gId) | |
400 | 422 | } | |
401 | 423 | else $Tuple7(lpTwoAmount, 0, (balA + pmtAmountA), (balB + pmtAmountB), 0, 0, unit) | |
402 | 424 | } | |
403 | 425 | ||
404 | 426 | ||
405 | 427 | @Callable(i) | |
406 | 428 | func calcLPReplenishDiffPropREADONLY (callerBytes,args,pAmounts,pAssetIds) = { | |
407 | - | let $ | |
408 | - | let strAssetIdA = $ | |
409 | - | let strAssetIdB = $ | |
410 | - | let assetIdA = $ | |
411 | - | let assetIdB = $ | |
412 | - | let shareAssetId = $ | |
413 | - | let $ | |
414 | - | let balA = $ | |
415 | - | let balB = $ | |
416 | - | let accBalA = $ | |
417 | - | let accBalB = $ | |
418 | - | let lpSupply = | |
429 | + | let $t01494615036 = getPoolAssets(i.caller) | |
430 | + | let strAssetIdA = $t01494615036._1 | |
431 | + | let strAssetIdB = $t01494615036._2 | |
432 | + | let assetIdA = $t01494615036._3 | |
433 | + | let assetIdB = $t01494615036._4 | |
434 | + | let shareAssetId = $t01494615036._5 | |
435 | + | let $t01504115123 = getPoolBalances(i.caller, assetIdA, assetIdB) | |
436 | + | let balA = $t01504115123._1 | |
437 | + | let balB = $t01504115123._2 | |
438 | + | let accBalA = $t01504115123._3 | |
439 | + | let accBalB = $t01504115123._4 | |
440 | + | let lpSupply = getLpSupply(i.caller) | |
419 | 441 | let pmtA = parseIntValue(args[0]) | |
420 | 442 | let pmtB = parseIntValue(args[1]) | |
421 | 443 | let virtGetMinAmount = parseIntValue(args[2]) | |
422 | - | let $ | |
423 | - | let fee = $ | |
424 | - | let govFee = $ | |
425 | - | let teamFee = $ | |
426 | - | let $ | |
427 | - | let lp = $ | |
428 | - | let loss = $ | |
429 | - | let newBalanceA = $ | |
430 | - | let newBalanceB = $ | |
431 | - | let governanceReward = $ | |
432 | - | let tReward = $ | |
433 | - | let aId = $ | |
444 | + | let $t01529815365 = getFeeParams(i.caller, i.originCaller) | |
445 | + | let fee = $t01529815365._1 | |
446 | + | let govFee = $t01529815365._2 | |
447 | + | let teamFee = $t01529815365._3 | |
448 | + | let $t01537015562 = calcLPReplenishDiffProp(pmtA, pmtB, assetIdA, assetIdB, balA, balB, lpSupply, fee, govFee, teamFee, virtGetMinAmount) | |
449 | + | let lp = $t01537015562._1 | |
450 | + | let loss = $t01537015562._2 | |
451 | + | let newBalanceA = $t01537015562._3 | |
452 | + | let newBalanceB = $t01537015562._4 | |
453 | + | let governanceReward = $t01537015562._5 | |
454 | + | let tReward = $t01537015562._6 | |
455 | + | let aId = $t01537015562._7 | |
434 | 456 | $Tuple2(nil, $Tuple2(nil, [lp, loss, newBalanceA, newBalanceB, governanceReward, tReward, aId])) | |
435 | 457 | } | |
436 | 458 | ||
437 | 459 | ||
438 | 460 | ||
439 | 461 | @Callable(i) | |
440 | 462 | func calcLPReplenishTwoTokensREADONLY (callerBytes,args,pAmounts,pAssetIds) = { | |
441 | - | let $ | |
442 | - | let strAssetIdA = $ | |
443 | - | let strAssetIdB = $ | |
444 | - | let assetIdA = $ | |
445 | - | let assetIdB = $ | |
446 | - | let shareAssetId = $ | |
447 | - | let $ | |
448 | - | let balA = $ | |
449 | - | let balB = $ | |
450 | - | let accBalA = $ | |
451 | - | let accBalB = $ | |
452 | - | let lpSupply = | |
463 | + | let $t01580515895 = getPoolAssets(i.caller) | |
464 | + | let strAssetIdA = $t01580515895._1 | |
465 | + | let strAssetIdB = $t01580515895._2 | |
466 | + | let assetIdA = $t01580515895._3 | |
467 | + | let assetIdB = $t01580515895._4 | |
468 | + | let shareAssetId = $t01580515895._5 | |
469 | + | let $t01590015982 = getPoolBalances(i.caller, assetIdA, assetIdB) | |
470 | + | let balA = $t01590015982._1 | |
471 | + | let balB = $t01590015982._2 | |
472 | + | let accBalA = $t01590015982._3 | |
473 | + | let accBalB = $t01590015982._4 | |
474 | + | let lpSupply = getLpSupply(i.caller) | |
453 | 475 | let pmtA = parseIntValue(args[0]) | |
454 | 476 | let pmtB = parseIntValue(args[1]) | |
455 | - | let $ | |
456 | - | let lp = $ | |
457 | - | let change = $ | |
458 | - | let changeAssetId = $ | |
459 | - | let pmtAmountA = $ | |
460 | - | let pmtAmountB = $ | |
477 | + | let $t01610616249 = calcLPAmountReplensishTwoTokens(pmtA, pmtB, assetIdA, assetIdB, balA, balB, lpSupply) | |
478 | + | let lp = $t01610616249._1 | |
479 | + | let change = $t01610616249._2 | |
480 | + | let changeAssetId = $t01610616249._3 | |
481 | + | let pmtAmountA = $t01610616249._4 | |
482 | + | let pmtAmountB = $t01610616249._5 | |
461 | 483 | $Tuple2(nil, $Tuple2(nil, [lp, change, changeAssetId, pmtAmountA, pmtAmountB])) | |
462 | 484 | } | |
463 | 485 | ||
464 | 486 | ||
465 | 487 | ||
466 | 488 | @Callable(i) | |
467 | 489 | func withdrawREADONLY (callerBytes,args,pAmounts,pAssetIds) = { | |
468 | - | let $ | |
469 | - | let strAssetIdA = $ | |
470 | - | let strAssetIdB = $ | |
471 | - | let assetIdA = $ | |
472 | - | let assetIdB = $ | |
473 | - | let shareAssetId = $ | |
474 | - | let $ | |
475 | - | let balanceA = $ | |
476 | - | let balanceB = $ | |
477 | - | let accountBalanceA = $ | |
478 | - | let accountBalanceB = $ | |
479 | - | let shareAssetSupply = | |
490 | + | let $t01646016550 = getPoolAssets(i.caller) | |
491 | + | let strAssetIdA = $t01646016550._1 | |
492 | + | let strAssetIdB = $t01646016550._2 | |
493 | + | let assetIdA = $t01646016550._3 | |
494 | + | let assetIdB = $t01646016550._4 | |
495 | + | let shareAssetId = $t01646016550._5 | |
496 | + | let $t01655516661 = getPoolBalances(i.caller, assetIdA, assetIdB) | |
497 | + | let balanceA = $t01655516661._1 | |
498 | + | let balanceB = $t01655516661._2 | |
499 | + | let accountBalanceA = $t01655516661._3 | |
500 | + | let accountBalanceB = $t01655516661._4 | |
501 | + | let shareAssetSupply = getLpSupply(i.caller) | |
480 | 502 | let withdrawAmount = parseIntValue(args[0]) | |
481 | - | let $ | |
503 | + | let $t01676416926 = if ((size(args) == 3)) | |
482 | 504 | then $Tuple2(parseIntValue(args[1]), parseIntValue(args[2])) | |
483 | 505 | else $Tuple2(balanceA, balanceB) | |
484 | - | let balA = $ | |
485 | - | let balB = $ | |
506 | + | let balA = $t01676416926._1 | |
507 | + | let balB = $t01676416926._2 | |
486 | 508 | let amountToPayA = fraction(withdrawAmount, balA, shareAssetSupply) | |
487 | 509 | let amountToPayB = fraction(withdrawAmount, balB, shareAssetSupply) | |
488 | 510 | $Tuple2(nil, $Tuple2(nil, [amountToPayA, amountToPayB])) | |
489 | 511 | } | |
490 | 512 | ||
491 | 513 | ||
492 | 514 | ||
493 | 515 | @Callable(i) | |
494 | 516 | func init (callerBytes,args,pAmounts,pAssetIds) = { | |
495 | 517 | let caller = Address(callerBytes) | |
496 | - | let $ | |
497 | - | let pmtAmountA = $ | |
498 | - | let pmtAssetIdA = $ | |
499 | - | let $ | |
500 | - | let pmtAmountB = $ | |
501 | - | let pmtAssetIdB = $ | |
518 | + | let $t01728117359 = $Tuple2(pAmounts[0], parsePaymentAsset(pAssetIds[0])) | |
519 | + | let pmtAmountA = $t01728117359._1 | |
520 | + | let pmtAssetIdA = $t01728117359._2 | |
521 | + | let $t01736417442 = $Tuple2(pAmounts[1], parsePaymentAsset(pAssetIds[1])) | |
522 | + | let pmtAmountB = $t01736417442._1 | |
523 | + | let pmtAssetIdB = $t01736417442._2 | |
502 | 524 | if (!(containsElement([adminPubKey1, adminPubKey2, adminPubKey3, adminInvokePubKey], i.originCallerPublicKey))) | |
503 | 525 | then throw("Only admin can call this function") | |
504 | 526 | else if ((size(args) != 1)) | |
505 | 527 | then throw("Wrong args size") | |
506 | 528 | else if (isDefined(getBoolean(caller, kActive))) | |
507 | 529 | then throw("DApp is already active") | |
508 | 530 | else if ((pmtAssetIdA == pmtAssetIdB)) | |
509 | 531 | then throw("Assets must be different") | |
510 | 532 | else { | |
511 | - | let $ | |
512 | - | let pmtStrAssetIdA = $ | |
513 | - | let pmtAssetNameA = $ | |
514 | - | let pmtDecimalsA = $ | |
515 | - | let $ | |
516 | - | let pmtStrAssetIdB = $ | |
517 | - | let pmtAssetNameB = $ | |
518 | - | let pmtDecimalsB = $ | |
533 | + | let $t01787717954 = getAssetInfo(pmtAssetIdA) | |
534 | + | let pmtStrAssetIdA = $t01787717954._1 | |
535 | + | let pmtAssetNameA = $t01787717954._2 | |
536 | + | let pmtDecimalsA = $t01787717954._3 | |
537 | + | let $t01796318040 = getAssetInfo(pmtAssetIdB) | |
538 | + | let pmtStrAssetIdB = $t01796318040._1 | |
539 | + | let pmtAssetNameB = $t01796318040._2 | |
540 | + | let pmtDecimalsB = $t01796318040._3 | |
519 | 541 | let firstHarvest = (args[0] == "true") | |
520 | 542 | let shareName = ((("s" + take(pmtAssetNameA, 7)) + "_") + take(pmtAssetNameB, 7)) | |
521 | 543 | let shareDescription = ((((("ShareToken of SwopFi protocol for " + pmtAssetNameA) + " and ") + pmtAssetNameB) + " at address ") + toString(this)) | |
522 | 544 | let shareDecimals = ((pmtDecimalsA + pmtDecimalsB) / 2) | |
523 | 545 | let arg1 = pow(pmtAmountA, pmtDecimalsA, 5, 1, pmtDecimalsA, DOWN) | |
524 | 546 | let arg2 = pow(pmtAmountB, pmtDecimalsB, 5, 1, pmtDecimalsB, DOWN) | |
525 | 547 | let arg3 = pow(10, 0, shareDecimals, 0, 0, DOWN) | |
526 | 548 | let shareInitialSupply = fraction(arg1, arg2, arg3) | |
527 | 549 | let shareIssue = Issue(shareName, shareDescription, shareInitialSupply, shareDecimals, true) | |
528 | 550 | let shareIssueId = calculateAssetId(shareIssue) | |
529 | 551 | let stake1 = if (contains(stakingAssets, pmtStrAssetIdA)) | |
530 | 552 | then invoke(i.caller, "stakeUnstake", [true, pmtAmountA, pmtStrAssetIdA], nil) | |
531 | 553 | else 0 | |
532 | 554 | if ((stake1 == stake1)) | |
533 | 555 | then { | |
534 | 556 | let stake2 = if (contains(stakingAssets, pmtStrAssetIdB)) | |
535 | 557 | then invoke(i.caller, "stakeUnstake", [true, pmtAmountB, pmtStrAssetIdB], nil) | |
536 | 558 | else 0 | |
537 | 559 | if ((stake2 == stake2)) | |
538 | 560 | then { | |
539 | 561 | let baseEntry = [StringEntry(kVersion, version), BooleanEntry(kActive, true), StringEntry(kAssetIdA, pmtStrAssetIdA), StringEntry(kAssetIdB, pmtStrAssetIdB), IntegerEntry(kBalanceA, pmtAmountA), IntegerEntry(kBalanceB, pmtAmountB), IntegerEntry(kFee, getIntegerValue(oracle, "base_fee_cpmm")), shareIssue, StringEntry(kShareAssetId, toBase58String(shareIssueId)), IntegerEntry(kShareAssetSupply, shareInitialSupply), ScriptTransfer(caller, shareInitialSupply, shareIssueId)] | |
540 | 562 | if (firstHarvest) | |
541 | 563 | then $Tuple2(nil, $Tuple2((baseEntry ++ [BooleanEntry(kFirstHarvest, firstHarvest), IntegerEntry(kFirstHarvestHeight, (startHeight + (firstHarvestEndPeriod * periodLength)))]), nil)) | |
542 | 564 | else $Tuple2(nil, $Tuple2(baseEntry, nil)) | |
543 | 565 | } | |
544 | 566 | else throw("Strict value is not equal to itself.") | |
545 | 567 | } | |
546 | 568 | else throw("Strict value is not equal to itself.") | |
547 | 569 | } | |
548 | 570 | } | |
549 | 571 | ||
550 | 572 | ||
551 | 573 | ||
552 | 574 | @Callable(i) | |
553 | 575 | func initWithInitRatio (callerBytes,args,pAmounts,pAssetIds) = { | |
554 | 576 | let caller = Address(callerBytes) | |
555 | - | let $ | |
556 | - | let amtAssetA = $ | |
557 | - | let amtAssetB = $ | |
558 | - | let assetIdAStr = $ | |
559 | - | let assetIdBStr = $ | |
560 | - | let firstHarvest = $ | |
577 | + | let $t02026120461 = $Tuple5(parseIntValue(args[0]), parseIntValue(args[1]), args[2], args[3], (args[4] == "true")) | |
578 | + | let amtAssetA = $t02026120461._1 | |
579 | + | let amtAssetB = $t02026120461._2 | |
580 | + | let assetIdAStr = $t02026120461._3 | |
581 | + | let assetIdBStr = $t02026120461._4 | |
582 | + | let firstHarvest = $t02026120461._5 | |
561 | 583 | if (!(containsElement([adminPubKey1, adminPubKey2, adminPubKey3, adminInvokePubKey], i.originCallerPublicKey))) | |
562 | 584 | then throw("Only admin can call this function") | |
563 | 585 | else if ((size(args) != 5)) | |
564 | 586 | then throw("Wrong args size") | |
565 | 587 | else if (isDefined(getBoolean(caller, kActive))) | |
566 | 588 | then throw("DApp is already active") | |
567 | 589 | else if ((assetIdAStr == assetIdBStr)) | |
568 | 590 | then throw("Assets must be different") | |
569 | 591 | else { | |
570 | - | let $ | |
571 | - | let pmtStrAssetIdA = $ | |
572 | - | let pmtAssetNameA = $ | |
573 | - | let pmtDecimalsA = $ | |
574 | - | let $ | |
575 | - | let pmtStrAssetIdB = $ | |
576 | - | let pmtAssetNameB = $ | |
577 | - | let pmtDecimalsB = $ | |
592 | + | let $t02089620973 = getAssetInfo(assetIdAStr) | |
593 | + | let pmtStrAssetIdA = $t02089620973._1 | |
594 | + | let pmtAssetNameA = $t02089620973._2 | |
595 | + | let pmtDecimalsA = $t02089620973._3 | |
596 | + | let $t02098221059 = getAssetInfo(assetIdBStr) | |
597 | + | let pmtStrAssetIdB = $t02098221059._1 | |
598 | + | let pmtAssetNameB = $t02098221059._2 | |
599 | + | let pmtDecimalsB = $t02098221059._3 | |
578 | 600 | let shareName = ((("s" + take(pmtAssetNameA, 7)) + "_") + take(pmtAssetNameB, 7)) | |
579 | 601 | let shareDescription = ((((("ShareToken of SwopFi protocol for " + pmtAssetNameA) + " and ") + pmtAssetNameB) + " at address ") + toString(this)) | |
580 | 602 | let shareDecimals = ((pmtDecimalsA + pmtDecimalsB) / 2) | |
581 | 603 | let shareInitialSupply = 0 | |
582 | 604 | let shareIssue = Issue(shareName, shareDescription, shareInitialSupply, shareDecimals, true) | |
583 | 605 | let shareIssueId = calculateAssetId(shareIssue) | |
584 | 606 | let baseEntry = [StringEntry(kVersion, version), BooleanEntry(kActive, true), StringEntry(kAssetIdA, pmtStrAssetIdA), StringEntry(kAssetIdB, pmtStrAssetIdB), IntegerEntry(kBalanceInitA, amtAssetA), IntegerEntry(kBalanceInitB, amtAssetB), IntegerEntry(kBalanceA, 0), IntegerEntry(kBalanceB, 0), IntegerEntry(kFee, getIntegerValue(oracle, "base_fee_cpmm")), shareIssue, StringEntry(kShareAssetId, toBase58String(shareIssueId)), IntegerEntry(kShareAssetSupply, shareInitialSupply)] | |
585 | 607 | if (firstHarvest) | |
586 | 608 | then $Tuple2(nil, $Tuple2((baseEntry ++ [BooleanEntry(kFirstHarvest, firstHarvest), IntegerEntry(kFirstHarvestHeight, (startHeight + (firstHarvestEndPeriod * periodLength)))]), nil)) | |
587 | 609 | else $Tuple2(nil, $Tuple2(baseEntry, nil)) | |
588 | 610 | } | |
589 | 611 | } | |
590 | 612 | ||
591 | 613 | ||
592 | 614 | ||
593 | 615 | @Callable(i) | |
594 | 616 | func keepLimitForFirstHarvest (callerBytes,args,pAmounts,pAssetIds) = valueOrElse(isOraclePool(toString(i.caller)), valueOrElse(isActive(), if (!(containsElement([adminPubKey1, adminPubKey2, adminPubKey3, adminInvokePubKey], i.originCallerPublicKey))) | |
595 | 617 | then throw("Only admin can call this function") | |
596 | 618 | else if ((size(args) != 1)) | |
597 | 619 | then throw("Wrong args size") | |
598 | 620 | else { | |
599 | 621 | let shareLimit = parseIntValue(args[0]) | |
600 | 622 | $Tuple2(nil, $Tuple2([IntegerEntry(kShareLimit, shareLimit)], nil)) | |
601 | 623 | })) | |
602 | 624 | ||
603 | 625 | ||
604 | 626 | ||
605 | 627 | @Callable(i) | |
606 | 628 | func exchange (callerBytes,args,pAmounts,pAssetIds) = valueOrElse(isOraclePool(toString(i.caller)), valueOrElse(isDepricated(toString(i.caller)), valueOrElse(isActive(), { | |
607 | 629 | let caller = Address(callerBytes) | |
608 | - | let $ | |
609 | - | let pmtAmount = $ | |
610 | - | let pmtAssetId = $ | |
630 | + | let $t02348523561 = $Tuple2(pAmounts[0], parsePaymentAsset(pAssetIds[0])) | |
631 | + | let pmtAmount = $t02348523561._1 | |
632 | + | let pmtAssetId = $t02348523561._2 | |
611 | 633 | let minAmountToReceive = parseIntValue(args[0]) | |
612 | - | let $ | |
613 | - | let strAssetIdA = $ | |
614 | - | let strAssetIdB = $ | |
615 | - | let assetIdA = $ | |
616 | - | let assetIdB = $ | |
617 | - | let $ | |
618 | - | let balanceA = $ | |
619 | - | let balanceB = $ | |
620 | - | let accountBalanceA = $ | |
621 | - | let accountBalanceB = $ | |
634 | + | let $t02362623702 = getPoolAssets(i.caller) | |
635 | + | let strAssetIdA = $t02362623702._1 | |
636 | + | let strAssetIdB = $t02362623702._2 | |
637 | + | let assetIdA = $t02362623702._3 | |
638 | + | let assetIdB = $t02362623702._4 | |
639 | + | let $t02371123817 = getPoolBalances(i.caller, assetIdA, assetIdB) | |
640 | + | let balanceA = $t02371123817._1 | |
641 | + | let balanceB = $t02371123817._2 | |
642 | + | let accountBalanceA = $t02371123817._3 | |
643 | + | let accountBalanceB = $t02371123817._4 | |
622 | 644 | if ((size(args) != 1)) | |
623 | 645 | then throw("Wrong args size") | |
624 | 646 | else if (if ((balanceA == 0)) | |
625 | 647 | then true | |
626 | 648 | else (balanceB == 0)) | |
627 | 649 | then throw("Can't exchange with zero balance") | |
628 | 650 | else if ((0 >= minAmountToReceive)) | |
629 | 651 | then throw(("Minimal amount to receive must be positive. Actual: " + toString(minAmountToReceive))) | |
630 | 652 | else if ((size(pAmounts) != 1)) | |
631 | 653 | then throw("One attached payment expected") | |
632 | 654 | else if (!(containsElement([assetIdA, assetIdB], pmtAssetId))) | |
633 | 655 | then throw(((("Incorrect asset attached. Expected: " + strAssetIdA) + " or ") + strAssetIdB)) | |
634 | 656 | else if (if ((balanceA > accountBalanceA)) | |
635 | 657 | then true | |
636 | 658 | else (balanceB > accountBalanceB)) | |
637 | 659 | then $Tuple2(nil, ([ScriptTransfer(caller, pmtAmount, pmtAssetId)] ++ suspendSuspicious(accountBalanceA, accountBalanceB, balanceA, balanceB, strAssetIdA, strAssetIdB))) | |
638 | 660 | else { | |
639 | - | let $ | |
640 | - | let fee = $ | |
641 | - | let govFee = $ | |
642 | - | let teamFee = $ | |
643 | - | let $ | |
661 | + | let $t02471724784 = getFeeParams(i.caller, i.originCaller) | |
662 | + | let fee = $t02471724784._1 | |
663 | + | let govFee = $t02471724784._2 | |
664 | + | let teamFee = $t02471724784._3 | |
665 | + | let $t02479725148 = if ((pmtAssetId == assetIdA)) | |
644 | 666 | then calculateFees(pmtAmount, minAmountToReceive, balanceA, balanceB, fee, govFee, teamFee) | |
645 | 667 | else calculateFees(pmtAmount, minAmountToReceive, balanceB, balanceA, fee, govFee, teamFee) | |
646 | - | let amountWithoutFee = $ | |
647 | - | let amountWithFee = $ | |
648 | - | let governanceReward = $ | |
649 | - | let teamReward = $ | |
650 | - | let $ | |
668 | + | let amountWithoutFee = $t02479725148._1 | |
669 | + | let amountWithFee = $t02479725148._2 | |
670 | + | let governanceReward = $t02479725148._3 | |
671 | + | let teamReward = $t02479725148._4 | |
672 | + | let $t02516225497 = if ((pmtAssetId == assetIdA)) | |
651 | 673 | then $Tuple3((balanceA + pmtAmount), (((balanceB - amountWithFee) - governanceReward) - teamReward), assetIdB) | |
652 | 674 | else $Tuple3((((balanceA - amountWithFee) - governanceReward) - teamReward), (balanceB + pmtAmount), assetIdA) | |
653 | - | let newBalanceA = $ | |
654 | - | let newBalanceB = $ | |
655 | - | let assetIdSend = $ | |
656 | - | let $ | |
675 | + | let newBalanceA = $t02516225497._1 | |
676 | + | let newBalanceB = $t02516225497._2 | |
677 | + | let assetIdSend = $t02516225497._3 | |
678 | + | let $t02551125771 = if ((pmtAssetId == assetIdA)) | |
657 | 679 | then $Tuple2(pmtAmount, ((amountWithFee + governanceReward) + teamReward)) | |
658 | 680 | else $Tuple2(((amountWithFee + governanceReward) + teamReward), pmtAmount) | |
659 | - | let stakeAmountA = $ | |
660 | - | let stakeAmountB = $ | |
681 | + | let stakeAmountA = $t02551125771._1 | |
682 | + | let stakeAmountB = $t02551125771._2 | |
661 | 683 | let stake1 = if (contains(stakingAssets, strAssetIdA)) | |
662 | 684 | then invoke(i.caller, "stakeUnstake", [(pmtAssetId == assetIdA), stakeAmountA, strAssetIdA], nil) | |
663 | 685 | else 0 | |
664 | 686 | if ((stake1 == stake1)) | |
665 | 687 | then { | |
666 | 688 | let stake2 = if (contains(stakingAssets, strAssetIdB)) | |
667 | 689 | then invoke(i.caller, "stakeUnstake", [(pmtAssetId == assetIdB), stakeAmountB, strAssetIdB], nil) | |
668 | 690 | else 0 | |
669 | 691 | if ((stake2 == stake2)) | |
670 | 692 | then $Tuple2(nil, $Tuple2([IntegerEntry(kBalanceA, newBalanceA), IntegerEntry(kBalanceB, newBalanceB), ScriptTransfer(caller, amountWithFee, assetIdSend), ScriptTransfer(moneyBoxAddress, governanceReward, assetIdSend), ScriptTransfer(teamBoxAddress, teamReward, assetIdSend)], [amountWithFee, assetIdSend])) | |
671 | 693 | else throw("Strict value is not equal to itself.") | |
672 | 694 | } | |
673 | 695 | else throw("Strict value is not equal to itself.") | |
674 | 696 | } | |
675 | 697 | }))) | |
676 | 698 | ||
677 | 699 | ||
678 | 700 | ||
679 | 701 | @Callable(i) | |
680 | 702 | func replenishWithTwoTokens (callerBytes,args,pAmounts,pAssetIds) = valueOrElse(isOraclePool(toString(i.caller)), valueOrElse(isDepricated(toString(i.caller)), valueOrElse(isActive(), { | |
681 | 703 | let caller = Address(callerBytes) | |
682 | 704 | let pmtAssetIdA = parsePaymentAsset(pAssetIds[0]) | |
683 | 705 | let pmtAssetIdB = parsePaymentAsset(pAssetIds[1]) | |
684 | 706 | let stakeFarming = (args[0] == "true") | |
685 | 707 | let lockType = parseIntValue(args[1]) | |
686 | - | let $ | |
687 | - | let strAssetIdA = $ | |
688 | - | let strAssetIdB = $ | |
689 | - | let assetIdA = $ | |
690 | - | let assetIdB = $ | |
691 | - | let shareAssetId = $ | |
692 | - | let $ | |
693 | - | let balanceA = $ | |
694 | - | let balanceB = $ | |
695 | - | let accountBalanceA = $ | |
696 | - | let accountBalanceB = $ | |
697 | - | let shareAssetSupply = | |
708 | + | let $t02708627176 = getPoolAssets(i.caller) | |
709 | + | let strAssetIdA = $t02708627176._1 | |
710 | + | let strAssetIdB = $t02708627176._2 | |
711 | + | let assetIdA = $t02708627176._3 | |
712 | + | let assetIdB = $t02708627176._4 | |
713 | + | let shareAssetId = $t02708627176._5 | |
714 | + | let $t02718527291 = getPoolBalances(i.caller, assetIdA, assetIdB) | |
715 | + | let balanceA = $t02718527291._1 | |
716 | + | let balanceB = $t02718527291._2 | |
717 | + | let accountBalanceA = $t02718527291._3 | |
718 | + | let accountBalanceB = $t02718527291._4 | |
719 | + | let shareAssetSupply = getLpSupply(i.caller) | |
698 | 720 | if ((size(args) != 2)) | |
699 | 721 | then throw("Wrong args size") | |
700 | 722 | else if (if ((size(pAmounts) != 2)) | |
701 | 723 | then (size(pAmounts) != 3) | |
702 | 724 | else false) | |
703 | 725 | then throw("Two or three payments expected") | |
704 | 726 | else if (if ((pmtAssetIdA != assetIdA)) | |
705 | 727 | then true | |
706 | 728 | else (pmtAssetIdB != assetIdB)) | |
707 | 729 | then throw(((("Incorrect assets attached. Expected: " + strAssetIdA) + " and ") + strAssetIdB)) | |
708 | 730 | else if (if ((balanceA > accountBalanceA)) | |
709 | 731 | then true | |
710 | 732 | else (balanceB > accountBalanceB)) | |
711 | 733 | then $Tuple2(nil, ([ScriptTransfer(caller, pAmounts[0], pmtAssetIdA), ScriptTransfer(caller, pAmounts[1], pmtAssetIdB)] ++ (if ((size(pAmounts) == 3)) | |
712 | 734 | then [AttachedPayment(if ((pAssetIds[2] == base58'')) | |
713 | 735 | then unit | |
714 | 736 | else pAssetIds[2], pAmounts[2])] | |
715 | 737 | else (nil ++ suspendSuspicious(accountBalanceA, accountBalanceB, balanceA, balanceB, strAssetIdA, strAssetIdB))))) | |
716 | 738 | else { | |
717 | - | let $ | |
718 | - | let shareTokenToPayAmount = $ | |
719 | - | let change = $ | |
720 | - | let changeAssetId = $ | |
721 | - | let pmtAmountA = $ | |
722 | - | let pmtAmountB = $ | |
739 | + | let $t02828028478 = calcLPAmountReplensishTwoTokens(pAmounts[0], pAmounts[1], pmtAssetIdA, pmtAssetIdB, balanceA, balanceB, shareAssetSupply) | |
740 | + | let shareTokenToPayAmount = $t02828028478._1 | |
741 | + | let change = $t02828028478._2 | |
742 | + | let changeAssetId = $t02828028478._3 | |
743 | + | let pmtAmountA = $t02828028478._4 | |
744 | + | let pmtAmountB = $t02828028478._5 | |
723 | 745 | if ((shareTokenToPayAmount == 0)) | |
724 | 746 | then throw("Too small amount to replenish") | |
725 | 747 | else if ((0 > change)) | |
726 | 748 | then throw("Change < 0") | |
727 | 749 | else { | |
728 | 750 | let stake1 = if (contains(stakingAssets, strAssetIdA)) | |
729 | 751 | then invoke(i.caller, "stakeUnstake", [true, pmtAmountA, strAssetIdA], nil) | |
730 | 752 | else 0 | |
731 | 753 | if ((stake1 == stake1)) | |
732 | 754 | then { | |
733 | 755 | let stake2 = if (contains(stakingAssets, strAssetIdB)) | |
734 | 756 | then invoke(i.caller, "stakeUnstake", [true, pmtAmountB, strAssetIdB], nil) | |
735 | 757 | else 0 | |
736 | 758 | if ((stake2 == stake2)) | |
737 | 759 | then { | |
738 | 760 | let shareTokenST = if (stakeFarming) | |
739 | 761 | then { | |
740 | 762 | let stPayments = ([AttachedPayment(shareAssetId, shareTokenToPayAmount)] ++ (if ((size(pAmounts) == 3)) | |
741 | 763 | then [AttachedPayment(if ((pAssetIds[2] == base58'')) | |
742 | 764 | then unit | |
743 | 765 | else pAssetIds[2], pAmounts[2])] | |
744 | 766 | else nil)) | |
745 | 767 | let reissue = invoke(i.caller, "reissueShareToken", [shareTokenToPayAmount], nil) | |
746 | 768 | if ((reissue == reissue)) | |
747 | 769 | then { | |
748 | 770 | let stake3 = invoke(farmingAddress, "lockShareTokensFromPool", [callerBytes, toString(i.caller), lockType], stPayments) | |
749 | 771 | if ((stake3 == stake3)) | |
750 | 772 | then nil | |
751 | 773 | else throw("Strict value is not equal to itself.") | |
752 | 774 | } | |
753 | 775 | else throw("Strict value is not equal to itself.") | |
754 | 776 | } | |
755 | 777 | else [Reissue(shareAssetId, shareTokenToPayAmount, true), ScriptTransfer(caller, shareTokenToPayAmount, shareAssetId)] | |
756 | 778 | $Tuple2(nil, $Tuple2(([IntegerEntry(kBalanceA, (balanceA + pmtAmountA)), IntegerEntry(kBalanceB, (balanceB + pmtAmountB)), IntegerEntry(kShareAssetSupply, (shareAssetSupply + shareTokenToPayAmount)), ScriptTransfer(caller, change, changeAssetId)] ++ shareTokenST), nil)) | |
757 | 779 | } | |
758 | 780 | else throw("Strict value is not equal to itself.") | |
759 | 781 | } | |
760 | 782 | else throw("Strict value is not equal to itself.") | |
761 | 783 | } | |
762 | 784 | } | |
763 | 785 | }))) | |
764 | 786 | ||
765 | 787 | ||
766 | 788 | ||
767 | 789 | @Callable(i) | |
768 | 790 | func replenishWithOneToken (callerBytes,args,pAmounts,pAssetIds) = valueOrElse(isOraclePool(toString(i.caller)), valueOrElse(isDepricated(toString(i.caller)), valueOrElse(isActive(), { | |
769 | 791 | let caller = Address(callerBytes) | |
770 | 792 | let pmtAssetId = parsePaymentAsset(pAssetIds[0]) | |
771 | 793 | let pmtAmount = pAmounts[0] | |
772 | 794 | let virtGetMinAmount = parseIntValue(args[0]) | |
773 | 795 | let stakeFarming = (args[1] == "true") | |
774 | 796 | let lockType = parseIntValue(args[2]) | |
775 | - | let $ | |
776 | - | let strAssetIdA = $ | |
777 | - | let strAssetIdB = $ | |
778 | - | let assetIdA = $ | |
779 | - | let assetIdB = $ | |
780 | - | let shareAssetId = $ | |
781 | - | let $ | |
782 | - | let balanceA = $ | |
783 | - | let balanceB = $ | |
784 | - | let accountBalanceA = $ | |
785 | - | let accountBalanceB = $ | |
786 | - | let shareAssetSupply = | |
797 | + | let $t03073730827 = getPoolAssets(i.caller) | |
798 | + | let strAssetIdA = $t03073730827._1 | |
799 | + | let strAssetIdB = $t03073730827._2 | |
800 | + | let assetIdA = $t03073730827._3 | |
801 | + | let assetIdB = $t03073730827._4 | |
802 | + | let shareAssetId = $t03073730827._5 | |
803 | + | let $t03083230938 = getPoolBalances(i.caller, assetIdA, assetIdB) | |
804 | + | let balanceA = $t03083230938._1 | |
805 | + | let balanceB = $t03083230938._2 | |
806 | + | let accountBalanceA = $t03083230938._3 | |
807 | + | let accountBalanceB = $t03083230938._4 | |
808 | + | let shareAssetSupply = getLpSupply(i.caller) | |
787 | 809 | let initial = ((balanceA + balanceB) == 0) | |
788 | 810 | if ((size(args) != 3)) | |
789 | 811 | then throw("Wrong args size") | |
790 | 812 | else if (if ((size(pAmounts) != 1)) | |
791 | 813 | then (size(pAmounts) != 2) | |
792 | 814 | else false) | |
793 | 815 | then throw("Two or one attached assets expected") | |
794 | 816 | else if (if ((pmtAssetId != assetIdA)) | |
795 | 817 | then (pmtAssetId != assetIdB) | |
796 | 818 | else false) | |
797 | 819 | then throw(((("Incorrect asset attached. Expected: " + strAssetIdA) + " or ") + strAssetIdB)) | |
798 | 820 | else if (initial) | |
799 | 821 | then throw("For initial exchanger you need to use two tokens") | |
800 | 822 | else if (if ((balanceA > accountBalanceA)) | |
801 | 823 | then true | |
802 | 824 | else (balanceB > accountBalanceB)) | |
803 | 825 | then $Tuple2(nil, ([ScriptTransfer(caller, pmtAmount, pmtAssetId)] ++ (if ((size(pAmounts) == 2)) | |
804 | 826 | then [AttachedPayment(if ((pAssetIds[2] == base58'')) | |
805 | 827 | then unit | |
806 | 828 | else pAssetIds[2], pAmounts[2])] | |
807 | 829 | else (nil ++ suspendSuspicious(accountBalanceA, accountBalanceB, balanceA, balanceB, strAssetIdA, strAssetIdB))))) | |
808 | 830 | else { | |
809 | - | let $ | |
810 | - | let fee = $ | |
811 | - | let govFee = $ | |
812 | - | let teamFee = $ | |
813 | - | let $ | |
814 | - | let pmtAssetIdStr = $ | |
815 | - | let pmtAssetIdName = $ | |
816 | - | let $ | |
817 | - | let shareTokenToPayAmount = $ | |
818 | - | let newBalanceA = $ | |
819 | - | let newBalanceB = $ | |
820 | - | let govReward = $ | |
821 | - | let teamReward = $ | |
822 | - | let govRewardAsset = $ | |
831 | + | let $t03189931966 = getFeeParams(i.caller, i.originCaller) | |
832 | + | let fee = $t03189931966._1 | |
833 | + | let govFee = $t03189931966._2 | |
834 | + | let teamFee = $t03189931966._3 | |
835 | + | let $t03197532037 = getAssetInfo(pmtAssetId) | |
836 | + | let pmtAssetIdStr = $t03197532037._1 | |
837 | + | let pmtAssetIdName = $t03197532037._2 | |
838 | + | let $t03205532300 = calcLPAmountReplenishOneToken(pmtAmount, pmtAssetId, assetIdA, assetIdB, balanceA, balanceB, shareAssetSupply, fee, govFee, teamFee, virtGetMinAmount) | |
839 | + | let shareTokenToPayAmount = $t03205532300._1 | |
840 | + | let newBalanceA = $t03205532300._2 | |
841 | + | let newBalanceB = $t03205532300._3 | |
842 | + | let govReward = $t03205532300._4 | |
843 | + | let teamReward = $t03205532300._5 | |
844 | + | let govRewardAsset = $t03205532300._6 | |
823 | 845 | let govRewardAssetStr = if ((govRewardAsset == assetIdA)) | |
824 | 846 | then strAssetIdA | |
825 | 847 | else strAssetIdB | |
826 | 848 | if ((shareTokenToPayAmount == 0)) | |
827 | 849 | then throw("Too small amount to replenish") | |
828 | 850 | else { | |
829 | 851 | let stake1 = if (contains(stakingAssets, pmtAssetIdStr)) | |
830 | 852 | then invoke(i.caller, "stakeUnstake", [true, pmtAmount, pmtAssetIdStr], nil) | |
831 | 853 | else 0 | |
832 | 854 | if ((stake1 == stake1)) | |
833 | 855 | then { | |
834 | 856 | let stake2 = if (contains(stakingAssets, govRewardAssetStr)) | |
835 | 857 | then invoke(i.caller, "stakeUnstake", [false, (govReward + teamReward), govRewardAssetStr], nil) | |
836 | 858 | else 0 | |
837 | 859 | if ((stake2 == stake2)) | |
838 | 860 | then { | |
839 | 861 | let shareTokenST = if (stakeFarming) | |
840 | 862 | then { | |
841 | 863 | let stPayments = ([AttachedPayment(shareAssetId, shareTokenToPayAmount)] ++ (if ((size(pAmounts) == 2)) | |
842 | 864 | then [AttachedPayment(if ((pAssetIds[1] == base58'')) | |
843 | 865 | then unit | |
844 | 866 | else pAssetIds[1], pAmounts[1])] | |
845 | 867 | else nil)) | |
846 | 868 | let reissue = invoke(i.caller, "reissueShareToken", [shareTokenToPayAmount], nil) | |
847 | 869 | if ((reissue == reissue)) | |
848 | 870 | then { | |
849 | 871 | let stake3 = invoke(farmingAddress, "lockShareTokensFromPool", [callerBytes, toString(i.caller), lockType], stPayments) | |
850 | 872 | if ((stake3 == stake3)) | |
851 | 873 | then nil | |
852 | 874 | else throw("Strict value is not equal to itself.") | |
853 | 875 | } | |
854 | 876 | else throw("Strict value is not equal to itself.") | |
855 | 877 | } | |
856 | 878 | else [Reissue(shareAssetId, shareTokenToPayAmount, true), ScriptTransfer(caller, shareTokenToPayAmount, shareAssetId)] | |
857 | 879 | $Tuple2(nil, $Tuple2(([IntegerEntry(kBalanceA, newBalanceA), IntegerEntry(kBalanceB, newBalanceB), IntegerEntry(kShareAssetSupply, (shareAssetSupply + shareTokenToPayAmount)), ScriptTransfer(moneyBoxAddress, govReward, govRewardAsset), ScriptTransfer(teamBoxAddress, teamReward, govRewardAsset)] ++ shareTokenST), nil)) | |
858 | 880 | } | |
859 | 881 | else throw("Strict value is not equal to itself.") | |
860 | 882 | } | |
861 | 883 | else throw("Strict value is not equal to itself.") | |
862 | 884 | } | |
863 | 885 | } | |
864 | 886 | }))) | |
865 | 887 | ||
866 | 888 | ||
867 | 889 | ||
868 | 890 | @Callable(i) | |
869 | 891 | func withdraw (callerBytes,args,pAmounts,pAssetIds) = valueOrElse(isOraclePool(toString(i.caller)), valueOrElse(isActive(), { | |
870 | 892 | let caller = Address(callerBytes) | |
871 | - | let $ | |
872 | - | let strAssetIdA = $ | |
873 | - | let strAssetIdB = $ | |
874 | - | let assetIdA = $ | |
875 | - | let assetIdB = $ | |
876 | - | let shareAssetId = $ | |
877 | - | let $ | |
878 | - | let balanceA = $ | |
879 | - | let balanceB = $ | |
880 | - | let accountBalanceA = $ | |
881 | - | let accountBalanceB = $ | |
882 | - | let shareAssetSupply = | |
883 | - | let $ | |
893 | + | let $t03436834458 = getPoolAssets(i.caller) | |
894 | + | let strAssetIdA = $t03436834458._1 | |
895 | + | let strAssetIdB = $t03436834458._2 | |
896 | + | let assetIdA = $t03436834458._3 | |
897 | + | let assetIdB = $t03436834458._4 | |
898 | + | let shareAssetId = $t03436834458._5 | |
899 | + | let $t03446734573 = getPoolBalances(i.caller, assetIdA, assetIdB) | |
900 | + | let balanceA = $t03446734573._1 | |
901 | + | let balanceB = $t03446734573._2 | |
902 | + | let accountBalanceA = $t03446734573._3 | |
903 | + | let accountBalanceB = $t03446734573._4 | |
904 | + | let shareAssetSupply = getLpSupply(i.caller) | |
905 | + | let $t03463535015 = if ((size(pAmounts) == 1)) | |
884 | 906 | then { | |
885 | 907 | let pAsset = parsePaymentAsset(pAssetIds[0]) | |
886 | 908 | if ((pAsset != shareAssetId)) | |
887 | 909 | then throw(("Incorrect asset attached. Expected: " + toBase58String(shareAssetId))) | |
888 | 910 | else $Tuple2(pAmounts[0], pAsset) | |
889 | 911 | } | |
890 | 912 | else $Tuple2(0, shareAssetId) | |
891 | - | let pmtAmount = $ | |
892 | - | let pmtAssetId = $ | |
913 | + | let pmtAmount = $t03463535015._1 | |
914 | + | let pmtAssetId = $t03463535015._2 | |
893 | 915 | if ((size(args) != 1)) | |
894 | 916 | then throw("Wrong args size") | |
895 | 917 | else if ((size(pAmounts) > 1)) | |
896 | 918 | then throw("One attached payment expected") | |
897 | 919 | else if (if ((balanceA > accountBalanceA)) | |
898 | 920 | then true | |
899 | 921 | else (balanceB > accountBalanceB)) | |
900 | 922 | then $Tuple2(nil, ([ScriptTransfer(caller, pmtAmount, pmtAssetId)] ++ suspendSuspicious(accountBalanceA, accountBalanceB, balanceA, balanceB, strAssetIdA, strAssetIdB))) | |
901 | 923 | else { | |
902 | 924 | let unlockAmount = parseIntValue(valueOrElse(args[0], "0")) | |
903 | 925 | let unlock = if ((unlockAmount > 0)) | |
904 | 926 | then invoke(farmingAddress, "withdrawShareTokensFromPool", [callerBytes, toString(i.caller), unlockAmount], nil) | |
905 | 927 | else 0 | |
906 | 928 | if ((unlock == unlock)) | |
907 | 929 | then { | |
908 | 930 | let withdrawAmount = (pmtAmount + unlockAmount) | |
909 | 931 | let amountToPayA = fraction(withdrawAmount, balanceA, shareAssetSupply) | |
910 | 932 | let amountToPayB = fraction(withdrawAmount, balanceB, shareAssetSupply) | |
911 | 933 | let stake1 = if (contains(stakingAssets, strAssetIdA)) | |
912 | 934 | then invoke(i.caller, "stakeUnstake", [false, amountToPayA, strAssetIdA], nil) | |
913 | 935 | else 0 | |
914 | 936 | if ((stake1 == stake1)) | |
915 | 937 | then { | |
916 | 938 | let stake2 = if (contains(stakingAssets, strAssetIdB)) | |
917 | 939 | then invoke(i.caller, "stakeUnstake", [false, amountToPayB, strAssetIdB], nil) | |
918 | 940 | else 0 | |
919 | 941 | if ((stake2 == stake2)) | |
920 | 942 | then $Tuple2([ScriptTransfer(i.caller, unlockAmount, shareAssetId)], $Tuple2([IntegerEntry(kBalanceA, (balanceA - amountToPayA)), IntegerEntry(kBalanceB, (balanceB - amountToPayB)), IntegerEntry(kShareAssetSupply, (shareAssetSupply - withdrawAmount)), Burn(shareAssetId, withdrawAmount), ScriptTransfer(caller, amountToPayA, assetIdA), ScriptTransfer(caller, amountToPayB, assetIdB)], nil)) | |
921 | 943 | else throw("Strict value is not equal to itself.") | |
922 | 944 | } | |
923 | 945 | else throw("Strict value is not equal to itself.") | |
924 | 946 | } | |
925 | 947 | else throw("Strict value is not equal to itself.") | |
926 | 948 | } | |
927 | 949 | })) | |
928 | 950 | ||
929 | 951 | ||
930 | 952 | ||
931 | 953 | @Callable(i) | |
932 | 954 | func withdrawOneToken (callerBytes,args,pAmounts,pAssetIds) = valueOrElse(isOraclePool(toString(i.caller)), valueOrElse(isDepricated(toString(i.caller)), valueOrElse(isActive(), { | |
933 | 955 | let caller = Address(callerBytes) | |
934 | 956 | let withdrawAsset = if ((args[0] == "")) | |
935 | 957 | then unit | |
936 | 958 | else fromBase58String(args[0]) | |
937 | - | let $ | |
938 | - | let strAssetIdA = $ | |
939 | - | let strAssetIdB = $ | |
940 | - | let assetIdA = $ | |
941 | - | let assetIdB = $ | |
942 | - | let shareAssetId = $ | |
943 | - | let $ | |
944 | - | let balanceA = $ | |
945 | - | let balanceB = $ | |
946 | - | let accountBalanceA = $ | |
947 | - | let accountBalanceB = $ | |
948 | - | let shareAssetSupply = | |
949 | - | let $ | |
959 | + | let $t03723337323 = getPoolAssets(i.caller) | |
960 | + | let strAssetIdA = $t03723337323._1 | |
961 | + | let strAssetIdB = $t03723337323._2 | |
962 | + | let assetIdA = $t03723337323._3 | |
963 | + | let assetIdB = $t03723337323._4 | |
964 | + | let shareAssetId = $t03723337323._5 | |
965 | + | let $t03733237438 = getPoolBalances(i.caller, assetIdA, assetIdB) | |
966 | + | let balanceA = $t03733237438._1 | |
967 | + | let balanceB = $t03733237438._2 | |
968 | + | let accountBalanceA = $t03733237438._3 | |
969 | + | let accountBalanceB = $t03733237438._4 | |
970 | + | let shareAssetSupply = getLpSupply(i.caller) | |
971 | + | let $t03750037852 = if ((size(pAmounts) == 1)) | |
950 | 972 | then { | |
951 | 973 | let pAsset = parsePaymentAsset(pAssetIds[0]) | |
952 | 974 | if ((pAsset != shareAssetId)) | |
953 | 975 | then throw(("Incorrect asset attached. Expected: " + toBase58String(shareAssetId))) | |
954 | 976 | else $Tuple2(pAmounts[0], pAsset) | |
955 | 977 | } | |
956 | 978 | else $Tuple2(0, shareAssetId) | |
957 | - | let pmtAmount = $ | |
958 | - | let pmtAssetId = $ | |
979 | + | let pmtAmount = $t03750037852._1 | |
980 | + | let pmtAssetId = $t03750037852._2 | |
959 | 981 | let virtMinToRecive = parseIntValue(args[1]) | |
960 | 982 | if ((size(args) != 3)) | |
961 | 983 | then throw("Wrong args size") | |
962 | 984 | else if ((size(pAmounts) > 1)) | |
963 | 985 | then throw("One attached payment expected") | |
964 | 986 | else if ((pmtAssetId != shareAssetId)) | |
965 | 987 | then throw(("Incorrect asset attached. Expected: " + toBase58String(shareAssetId))) | |
966 | 988 | else if (!(containsElement([assetIdA, assetIdB], withdrawAsset))) | |
967 | 989 | then throw("Incorrect withdraw asset.") | |
968 | 990 | else if (if ((balanceA > accountBalanceA)) | |
969 | 991 | then true | |
970 | 992 | else (balanceB > accountBalanceB)) | |
971 | 993 | then $Tuple2(nil, ([ScriptTransfer(caller, pmtAmount, pmtAssetId)] ++ suspendSuspicious(accountBalanceA, accountBalanceB, balanceA, balanceB, strAssetIdA, strAssetIdB))) | |
972 | 994 | else { | |
973 | 995 | let unlockAmount = parseIntValue(valueOrElse(args[2], "0")) | |
974 | 996 | let unlock = if ((unlockAmount > 0)) | |
975 | 997 | then invoke(farmingAddress, "withdrawShareTokensFromPool", [callerBytes, toString(i.caller), unlockAmount], nil) | |
976 | 998 | else 0 | |
977 | 999 | if ((unlock == unlock)) | |
978 | 1000 | then { | |
979 | 1001 | let withdrawAmount = (pmtAmount + unlockAmount) | |
980 | 1002 | let amountToPayA = fraction(withdrawAmount, balanceA, shareAssetSupply) | |
981 | 1003 | let amountToPayB = fraction(withdrawAmount, balanceB, shareAssetSupply) | |
982 | - | let $ | |
983 | - | let fee = $ | |
984 | - | let govFee = $ | |
985 | - | let teamFee = $ | |
986 | - | let $ | |
1004 | + | let $t03911939186 = getFeeParams(i.caller, i.originCaller) | |
1005 | + | let fee = $t03911939186._1 | |
1006 | + | let govFee = $t03911939186._2 | |
1007 | + | let teamFee = $t03911939186._3 | |
1008 | + | let $t03919939613 = if ((withdrawAsset == assetIdA)) | |
987 | 1009 | then calculateFees(amountToPayB, virtMinToRecive, (balanceB - amountToPayB), (balanceA - amountToPayA), fee, govFee, teamFee) | |
988 | 1010 | else calculateFees(amountToPayA, virtMinToRecive, (balanceA - amountToPayA), (balanceB - amountToPayB), fee, govFee, teamFee) | |
989 | - | let amountWithoutFee = $ | |
990 | - | let amountWithFee = $ | |
991 | - | let governanceReward = $ | |
992 | - | let teamReward = $ | |
993 | - | let $ | |
1011 | + | let amountWithoutFee = $t03919939613._1 | |
1012 | + | let amountWithFee = $t03919939613._2 | |
1013 | + | let governanceReward = $t03919939613._3 | |
1014 | + | let teamReward = $t03919939613._4 | |
1015 | + | let $t03962640936 = if ((withdrawAsset == assetIdA)) | |
994 | 1016 | then { | |
995 | 1017 | let unstake = if (contains(stakingAssets, strAssetIdA)) | |
996 | 1018 | then invoke(i.caller, "stakeUnstake", [false, (((amountToPayA + amountWithFee) + governanceReward) + teamReward), strAssetIdA], nil) | |
997 | 1019 | else 0 | |
998 | 1020 | if ((unstake == unstake)) | |
999 | 1021 | then $Tuple4(((((balanceA - amountToPayA) - amountWithFee) - governanceReward) - teamReward), balanceB, assetIdA, [ScriptTransfer(caller, (amountToPayA + amountWithFee), assetIdA)]) | |
1000 | 1022 | else throw("Strict value is not equal to itself.") | |
1001 | 1023 | } | |
1002 | 1024 | else { | |
1003 | 1025 | let unstake = if (contains(stakingAssets, strAssetIdB)) | |
1004 | 1026 | then invoke(i.caller, "stakeUnstake", [false, (((amountToPayB + amountWithFee) + governanceReward) + teamReward), strAssetIdB], nil) | |
1005 | 1027 | else 0 | |
1006 | 1028 | if ((unstake == unstake)) | |
1007 | 1029 | then $Tuple4(balanceA, ((((balanceB - amountToPayB) - amountWithFee) - governanceReward) - teamReward), assetIdB, [ScriptTransfer(caller, (amountToPayB + amountWithFee), assetIdB)]) | |
1008 | 1030 | else throw("Strict value is not equal to itself.") | |
1009 | 1031 | } | |
1010 | - | let newBalanceA = $ | |
1011 | - | let newBalanceB = $ | |
1012 | - | let govRewardAssetId = $ | |
1013 | - | let userTransfer = $ | |
1032 | + | let newBalanceA = $t03962640936._1 | |
1033 | + | let newBalanceB = $t03962640936._2 | |
1034 | + | let govRewardAssetId = $t03962640936._3 | |
1035 | + | let userTransfer = $t03962640936._4 | |
1014 | 1036 | $Tuple2([ScriptTransfer(i.caller, unlockAmount, shareAssetId)], $Tuple2(([IntegerEntry(kBalanceA, newBalanceA), IntegerEntry(kBalanceB, newBalanceB), IntegerEntry(kShareAssetSupply, (shareAssetSupply - withdrawAmount)), Burn(shareAssetId, withdrawAmount), ScriptTransfer(moneyBoxAddress, governanceReward, govRewardAssetId), ScriptTransfer(teamBoxAddress, teamReward, govRewardAssetId)] ++ userTransfer), nil)) | |
1015 | 1037 | } | |
1016 | 1038 | else throw("Strict value is not equal to itself.") | |
1017 | 1039 | } | |
1018 | 1040 | }))) | |
1019 | 1041 | ||
1020 | 1042 | ||
1021 | 1043 | ||
1022 | 1044 | @Callable(i) | |
1023 | 1045 | func takeIntoAccountExtraFunds (callerBytes,args,pAmounts,pAssetIds) = valueOrElse(isOraclePool(toString(i.caller)), valueOrElse(isActive(), { | |
1024 | - | let $ | |
1025 | - | let strAssetIdA = $ | |
1026 | - | let strAssetIdB = $ | |
1027 | - | let assetIdA = $ | |
1028 | - | let assetIdB = $ | |
1046 | + | let $t04169641772 = getPoolAssets(i.caller) | |
1047 | + | let strAssetIdA = $t04169641772._1 | |
1048 | + | let strAssetIdB = $t04169641772._2 | |
1049 | + | let assetIdA = $t04169641772._3 | |
1050 | + | let assetIdB = $t04169641772._4 | |
1029 | 1051 | let claim = if (if ((assetIdA == USDN)) | |
1030 | 1052 | then true | |
1031 | 1053 | else (assetIdB == USDN)) | |
1032 | 1054 | then invoke(i.caller, "claimNetrinoRewards", nil, nil) | |
1033 | - | else | |
1055 | + | else nil | |
1034 | 1056 | if ((claim == claim)) | |
1035 | 1057 | then { | |
1036 | - | let $t04129341399 = getPoolBalances(i.caller, assetIdA, assetIdB) | |
1037 | - | let balanceA = $t04129341399._1 | |
1038 | - | let balanceB = $t04129341399._2 | |
1039 | - | let accountBalanceA = $t04129341399._3 | |
1040 | - | let accountBalanceB = $t04129341399._4 | |
1058 | + | let $t04195642092 = getPoolBalances(i.caller, assetIdA, assetIdB) | |
1059 | + | let balanceA = $t04195642092._1 | |
1060 | + | let balanceB = $t04195642092._2 | |
1061 | + | let accountBalanceA = $t04195642092._3 | |
1062 | + | let accountBalanceB = $t04195642092._4 | |
1063 | + | let stakedAmountA = $t04195642092._5 | |
1064 | + | let stakedAmountB = $t04195642092._6 | |
1041 | 1065 | let amountEnrollA = (accountBalanceA - balanceA) | |
1042 | 1066 | let amountEnrollB = (accountBalanceB - balanceB) | |
1067 | + | let $t04221242526 = if ((assetIdA == L2MP)) | |
1068 | + | then $Tuple2((accountBalanceA - stakedAmountA), amountEnrollB) | |
1069 | + | else if ((assetIdB == L2MP)) | |
1070 | + | then $Tuple2(amountEnrollA, (accountBalanceB - stakedAmountB)) | |
1071 | + | else $Tuple2(amountEnrollA, amountEnrollB) | |
1072 | + | let amountToStakeA = $t04221242526._1 | |
1073 | + | let amountToStakeB = $t04221242526._2 | |
1043 | 1074 | if ((size(args) != 0)) | |
1044 | 1075 | then throw("Wrong args size") | |
1045 | 1076 | else if ((moneyBoxAddress != i.originCaller)) | |
1046 | 1077 | then throw("Only the wallet can call this function") | |
1047 | 1078 | else if (if ((0 > amountEnrollA)) | |
1048 | 1079 | then true | |
1049 | 1080 | else (0 > amountEnrollB)) | |
1050 | 1081 | then suspend("Enroll amount negative") | |
1051 | 1082 | else if (if ((amountEnrollA == 0)) | |
1052 | 1083 | then (amountEnrollB == 0) | |
1053 | 1084 | else false) | |
1054 | 1085 | then throw("No money to take") | |
1055 | 1086 | else { | |
1056 | 1087 | let stake1 = if (if (contains(stakingAssets, strAssetIdA)) | |
1057 | - | then ( | |
1088 | + | then (amountToStakeA > 0) | |
1058 | 1089 | else false) | |
1059 | - | then invoke(i.caller, "stakeUnstake", [true, | |
1090 | + | then invoke(i.caller, "stakeUnstake", [true, amountToStakeA, strAssetIdA], nil) | |
1060 | 1091 | else 0 | |
1061 | 1092 | if ((stake1 == stake1)) | |
1062 | 1093 | then { | |
1063 | 1094 | let stake2 = if (if (contains(stakingAssets, strAssetIdB)) | |
1064 | - | then ( | |
1095 | + | then (amountToStakeB > 0) | |
1065 | 1096 | else false) | |
1066 | - | then invoke(i.caller, "stakeUnstake", [true, | |
1097 | + | then invoke(i.caller, "stakeUnstake", [true, amountToStakeB, strAssetIdB], nil) | |
1067 | 1098 | else 0 | |
1068 | 1099 | if ((stake2 == stake2)) | |
1069 | 1100 | then $Tuple2(nil, $Tuple2([IntegerEntry(kBalanceA, (balanceA + amountEnrollA)), IntegerEntry(kBalanceB, (balanceB + amountEnrollB))], nil)) | |
1070 | 1101 | else throw("Strict value is not equal to itself.") | |
1071 | 1102 | } | |
1072 | 1103 | else throw("Strict value is not equal to itself.") | |
1073 | 1104 | } | |
1074 | 1105 | } | |
1075 | 1106 | else throw("Strict value is not equal to itself.") | |
1076 | 1107 | })) | |
1077 | 1108 | ||
1078 | 1109 | ||
1079 | 1110 | @Verifier(tx) | |
1080 | 1111 | func verify () = { | |
1081 | 1112 | let multiSignedByAdmins = { | |
1082 | 1113 | let adminPubKey1Signed = if (sigVerify(tx.bodyBytes, tx.proofs[0], adminPubKey1)) | |
1083 | 1114 | then 1 | |
1084 | 1115 | else 0 | |
1085 | 1116 | let adminPubKey2Signed = if (sigVerify(tx.bodyBytes, tx.proofs[1], adminPubKey2)) | |
1086 | 1117 | then 1 | |
1087 | 1118 | else 0 | |
1088 | 1119 | let adminPubKey3Signed = if (sigVerify(tx.bodyBytes, tx.proofs[2], adminPubKey3)) | |
1089 | 1120 | then 1 | |
1090 | 1121 | else 0 | |
1091 | 1122 | (((adminPubKey1Signed + adminPubKey2Signed) + adminPubKey3Signed) >= 2) | |
1092 | 1123 | } | |
1093 | 1124 | multiSignedByAdmins | |
1094 | 1125 | } | |
1095 | 1126 |
github/deemru/w8io/026f985 208.49 ms ◑