tx · FQJkm5Aogrt7psbfx8LYFeSGcqsZKB9cxWY9bE2JPVe8 3MxWgDbE9EmjQj8b3LfFwa91FZizptyeQXS: -0.14000000 Waves 2022.11.14 15:49 [2316822] smart account 3MxWgDbE9EmjQj8b3LfFwa91FZizptyeQXS > SELF 0.00000000 Waves
{ "type": 13, "id": "FQJkm5Aogrt7psbfx8LYFeSGcqsZKB9cxWY9bE2JPVe8", "fee": 14000000, "feeAssetId": null, "timestamp": 1668430189701, "version": 2, "chainId": 84, "sender": "3MxWgDbE9EmjQj8b3LfFwa91FZizptyeQXS", "senderPublicKey": "C7xgcYqQ8qV8rmvzAjhQWq4cz82F6VJfXMNygvrTXsfW", "proofs": [ "32rW7Dt13UtgT1mZMqjKdNUXW5LUhspsBhCQ3eou7ze3TUoGarQZjtvKGaa1p88maNJSmP5QqZTLXDeJU63Va9Ln", "5AfjQ5iAtcuo7XNmBB85qfE87fyH2dVN4SmoqtraeZEiSe4aHToRk6EDbPmGoNAMUjuFyGFGEhpbUdzAYNTkyUDL" ], "script": "base64:BgJmCAISBAoCEQESBQoDCAEBEgUKAwEEARIECgIRCBIDCgEBEgYKBAgIAQgSBAoCCAESAwoBERIECgIRARIFCgMBCAgSBAoCCAESBQoDCAEBEgASABIECgIRBBIECgIBARIAEgASABIAWgAJUFJFQ0lTSU9OAMCEPQAFTUFYX0EAwIQ9AAxNQVhfQV9DSEFOR0UACgAIREVDSU1BTFMABgANTUlOX1JBTVBfVElNRQkAaQIAgKMFADwAB3ZlcnNpb24CBTMuMC4wAAhrVmVyc2lvbgIHdmVyc2lvbgAHa0Fzc2V0cwIJYXNzZXRfaWRzAA1rQXNzZXRCYWxhbmNlAghfYmFsYW5jZQAHa0FjdGl2ZQIGYWN0aXZlAAtrQWN0aXZlR2xvYgIUYWN0aXZlX2FsbF9jb250cmFjdHMABmtDYXVzZQIOc2h1dGRvd25fY2F1c2UADWtTaGFyZUFzc2V0SWQCDnNoYXJlX2Fzc2V0X2lkABFrU2hhcmVB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nByb29mcwABBQxhZG1pblB1YktleTIAAQAABBJhZG1pblB1YktleTNTaWduZWQDCQD0AwMIBQJ0eAlib2R5Qnl0ZXMJAJEDAggFAnR4BnByb29mcwACBQxhZG1pblB1YktleTMAAQAACQBnAgkAZAIJAGQCBRJhZG1pblB1YktleTFTaWduZWQFEmFkbWluUHViS2V5MlNpZ25lZAUSYWRtaW5QdWJLZXkzU2lnbmVkAAIEByRtYXRjaDAFAnR4AwkAAQIFByRtYXRjaDACF0ludm9rZVNjcmlwdFRyYW5zYWN0aW9uBANpbnYFByRtYXRjaDAEE2NhbGxUYWtlSW50b0FjY291bnQDCQAAAggFA2ludgRkQXBwBQR0aGlzCQAAAggFA2ludghmdW5jdGlvbgIZdGFrZUludG9BY2NvdW50RXh0cmFGdW5kcwcEDXNpZ25lZEJ5QWRtaW4DAwMJAPQDAwgFAnR4CWJvZHlCeXRlcwkAkQMCCAUCdHgGcHJvb2ZzAAAFDGFkbWluUHViS2V5MQYJAPQDAwgFAnR4CWJvZHlCeXRlcwkAkQMCCAUCdHgGcHJvb2ZzAAAFDGFkbWluUHViS2V5MgYJAPQDAwgFAnR4CWJvZHlCeXRlcwkAkQMCCAUCdHgGcHJvb2ZzAAAFDGFkbWluUHViS2V5MwYJAPQDAwgFAnR4CWJvZHlCeXRlcwkAkQMCCAUCdHgGcHJvb2ZzAAAFEWFkbWluUHViS2V5SW52b2tlAwMFE2NhbGxUYWtlSW50b0FjY291bnQFDXNpZ25lZEJ5QWRtaW4HBgUTbXVsdGlTaWduZWRCeUFkbWlucwUTbXVsdGlTaWduZWRCeUFkbWlucwwR4h0=", "height": 2316822, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 4q3Vp3qM3eNq4RPCGQm1hT9GtXi47KZS539WZp4kZnkL Next: 45hJedv3552NyZDqW11cbB7HkKbTgt8t2wQFCcLsa2p6 Diff:
Old | New | Differences | |
---|---|---|---|
20 | 20 | let kAssetBalance = "_balance" | |
21 | 21 | ||
22 | 22 | let kActive = "active" | |
23 | + | ||
24 | + | let kActiveGlob = "active_all_contracts" | |
23 | 25 | ||
24 | 26 | let kCause = "shutdown_cause" | |
25 | 27 | ||
89 | 91 | ||
90 | 92 | let lpFarmingAddress = Address(getBase58FromOracle(kLPFarmingAddress)) | |
91 | 93 | ||
92 | - | let USDN = base58' | |
94 | + | let USDN = base58'DG2xFkPdDwKUoBkzGAhQtLpSGzfXLiCYPEzeKH2Ad24p' | |
93 | 95 | ||
94 | 96 | let stakingAssets = [toBase58String(USDN)] | |
95 | 97 | ||
96 | 98 | let active = getBooleanValue(this, kActive) | |
99 | + | ||
100 | + | let activeGlob = valueOrElse(getBoolean(oracle, kActiveGlob), true) | |
97 | 101 | ||
98 | 102 | let shareAssetId = fromBase58String(getStringValue(this, kShareAssetId)) | |
99 | 103 | ||
123 | 127 | func throwIsActive () = throw("DApp is already active") | |
124 | 128 | ||
125 | 129 | ||
126 | - | func isActive () = if (active) | |
130 | + | func isActive () = if (if (active) | |
131 | + | then activeGlob | |
132 | + | else false) | |
127 | 133 | then unit | |
128 | 134 | else throw("DApp is inactive at this moment") | |
129 | 135 | ||
288 | 294 | else $Tuple2(D, false) | |
289 | 295 | } | |
290 | 296 | ||
291 | - | let $ | |
297 | + | let $t065826648 = { | |
292 | 298 | let $l = iter15 | |
293 | 299 | let $s = size($l) | |
294 | 300 | let $acc0 = $Tuple2(toBigInt(S), false) | |
302 | 308 | ||
303 | 309 | $f1_2($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15) | |
304 | 310 | } | |
305 | - | let D = $ | |
306 | - | let finished = $ | |
311 | + | let D = $t065826648._1 | |
312 | + | let finished = $t065826648._2 | |
307 | 313 | if ((finished == false)) | |
308 | 314 | then throw(("get_D() not finished with " + toString(D))) | |
309 | 315 | else toInt(D) | |
329 | 335 | let D = get_D(xp_, amp) | |
330 | 336 | let Ann = (amp * nCoins) | |
331 | 337 | func S_c (acc,i) = { | |
332 | - | let $ | |
333 | - | let S_ = $ | |
334 | - | let c = $ | |
338 | + | let $t072197236 = acc | |
339 | + | let S_ = $t072197236._1 | |
340 | + | let c = $t072197236._2 | |
335 | 341 | let x_ = if ((in == i)) | |
336 | 342 | then x | |
337 | 343 | else xp_[i] | |
342 | 348 | else $Tuple2(S_, c) | |
343 | 349 | } | |
344 | 350 | ||
345 | - | let $ | |
351 | + | let $t074447499 = { | |
346 | 352 | let $l = iter10 | |
347 | 353 | let $s = size($l) | |
348 | 354 | let $acc0 = $Tuple2(0, toBigInt(D)) | |
356 | 362 | ||
357 | 363 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
358 | 364 | } | |
359 | - | let S_ = $ | |
360 | - | let c_ = $ | |
365 | + | let S_ = $t074447499._1 | |
366 | + | let c_ = $t074447499._2 | |
361 | 367 | let c = fraction(c_, toBigInt(D), toBigInt((Ann * nCoins))) | |
362 | 368 | let bD = toBigInt(((S_ + (D / Ann)) - D)) | |
363 | 369 | func y_proc (acc,_i) = if ((acc._2 == true)) | |
374 | 380 | else $Tuple2(y, false) | |
375 | 381 | } | |
376 | 382 | ||
377 | - | let $ | |
383 | + | let $t079818048 = { | |
378 | 384 | let $l = iter16 | |
379 | 385 | let $s = size($l) | |
380 | 386 | let $acc0 = $Tuple2(toBigInt(D), false) | |
388 | 394 | ||
389 | 395 | $f1_2($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16) | |
390 | 396 | } | |
391 | - | let y = $ | |
392 | - | let finished = $ | |
397 | + | let y = $t079818048._1 | |
398 | + | let finished = $t079818048._2 | |
393 | 399 | if ((finished == false)) | |
394 | 400 | then throw(("getY() not finished with " + toString(y))) | |
395 | 401 | else toInt(y) | |
403 | 409 | else { | |
404 | 410 | let Ann = (A_ * nCoins) | |
405 | 411 | func S_c (acc,i) = { | |
406 | - | let $ | |
407 | - | let S_ = $ | |
408 | - | let c = $ | |
412 | + | let $t084278444 = acc | |
413 | + | let S_ = $t084278444._1 | |
414 | + | let c = $t084278444._2 | |
409 | 415 | let x_ = if (if ((in != i)) | |
410 | 416 | then (nCoins > i) | |
411 | 417 | else false) | |
418 | 424 | else $Tuple2(S_, c) | |
419 | 425 | } | |
420 | 426 | ||
421 | - | let $ | |
427 | + | let $t086648719 = { | |
422 | 428 | let $l = iter10 | |
423 | 429 | let $s = size($l) | |
424 | 430 | let $acc0 = $Tuple2(0, toBigInt(D)) | |
432 | 438 | ||
433 | 439 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
434 | 440 | } | |
435 | - | let S_ = $ | |
436 | - | let c_ = $ | |
441 | + | let S_ = $t086648719._1 | |
442 | + | let c_ = $t086648719._2 | |
437 | 443 | let c = fraction(c_, toBigInt(D), toBigInt((Ann * nCoins))) | |
438 | 444 | let bD = toBigInt(((S_ + (D / Ann)) - D)) | |
439 | 445 | func y_D_proc (acc,i) = if ((acc._2 == true)) | |
450 | 456 | else $Tuple2(y, false) | |
451 | 457 | } | |
452 | 458 | ||
453 | - | let $ | |
459 | + | let $t092029271 = { | |
454 | 460 | let $l = iter16 | |
455 | 461 | let $s = size($l) | |
456 | 462 | let $acc0 = $Tuple2(toBigInt(D), false) | |
464 | 470 | ||
465 | 471 | $f1_2($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16) | |
466 | 472 | } | |
467 | - | let y = $ | |
468 | - | let finished = $ | |
473 | + | let y = $t092029271._1 | |
474 | + | let finished = $t092029271._2 | |
469 | 475 | if ((finished == false)) | |
470 | 476 | then throw(("get_y_D() not finished with " + toString(y))) | |
471 | 477 | else toInt(y) | |
482 | 488 | let new_y = get_y_D(amp, i, xp, D1) | |
483 | 489 | let dy_0 = (xp[i] - new_y) | |
484 | 490 | func xp_reduced_proc (acc,xp_j) = { | |
485 | - | let $ | |
486 | - | let xp_reduced = $ | |
487 | - | let index = $ | |
491 | + | let $t099129941 = acc | |
492 | + | let xp_reduced = $t099129941._1 | |
493 | + | let index = $t099129941._2 | |
488 | 494 | let dx_expected = if ((index == i)) | |
489 | 495 | then (fraction(xp_j, D1, D0) - new_y) | |
490 | 496 | else (xp_j - fraction(xp_j, D1, D0)) | |
491 | 497 | $Tuple2((xp_reduced :+ (xp_j - fraction(_fee, dx_expected, feeScale6))), (index + 1)) | |
492 | 498 | } | |
493 | 499 | ||
494 | - | let $ | |
500 | + | let $t01020310267 = { | |
495 | 501 | let $l = xp | |
496 | 502 | let $s = size($l) | |
497 | 503 | let $acc0 = $Tuple2(nil, 0) | |
505 | 511 | ||
506 | 512 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
507 | 513 | } | |
508 | - | let xp_reduced = $ | |
509 | - | let index = $ | |
514 | + | let xp_reduced = $t01020310267._1 | |
515 | + | let index = $t01020310267._2 | |
510 | 516 | let xp_reduced_i = xp_reduced[i] | |
511 | 517 | let dy = ((xp_reduced_i - get_y_D(amp, i, xp_reduced, D1)) - 1) | |
512 | 518 | $Tuple2(dy, (dy_0 - dy)) | |
530 | 536 | ||
531 | 537 | func calcStakingParams (stake,amount,assetId) = if (stake) | |
532 | 538 | then { | |
533 | - | let $ | |
534 | - | let call = $ | |
535 | - | let stakingAddr = $ | |
539 | + | let $t01083110897 = calcStakingFuncAndAddres(stake, assetId) | |
540 | + | let call = $t01083110897._1 | |
541 | + | let stakingAddr = $t01083110897._2 | |
536 | 542 | $Tuple4(call, stakingAddr, nil, [AttachedPayment(assetId, amount)]) | |
537 | 543 | } | |
538 | 544 | else { | |
539 | - | let $ | |
540 | - | let call = $ | |
541 | - | let stakingAddr = $ | |
545 | + | let $t01098311049 = calcStakingFuncAndAddres(stake, assetId) | |
546 | + | let call = $t01098311049._1 | |
547 | + | let stakingAddr = $t01098311049._2 | |
542 | 548 | $Tuple4(call, stakingAddr, [amount, toBase58String(assetId)], nil) | |
543 | 549 | } | |
544 | 550 | ||
545 | 551 | ||
546 | 552 | func stake (amount,assetIdString) = if (containsElement(stakingAssets, assetIdString)) | |
547 | 553 | then { | |
548 | - | let $ | |
549 | - | let call = $ | |
550 | - | let addr = $ | |
551 | - | let params = $ | |
552 | - | let payments = $ | |
554 | + | let $t01123611338 = calcStakingParams(true, amount, fromBase58String(assetIdString)) | |
555 | + | let call = $t01123611338._1 | |
556 | + | let addr = $t01123611338._2 | |
557 | + | let params = $t01123611338._3 | |
558 | + | let payments = $t01123611338._4 | |
553 | 559 | invoke(addr, call, params, payments) | |
554 | 560 | } | |
555 | 561 | else 0 | |
557 | 563 | ||
558 | 564 | func unstake (amount,assetIdString) = if (containsElement(stakingAssets, assetIdString)) | |
559 | 565 | then { | |
560 | - | let $ | |
561 | - | let call = $ | |
562 | - | let addr = $ | |
563 | - | let params = $ | |
564 | - | let payments = $ | |
566 | + | let $t01152311626 = calcStakingParams(false, amount, fromBase58String(assetIdString)) | |
567 | + | let call = $t01152311626._1 | |
568 | + | let addr = $t01152311626._2 | |
569 | + | let params = $t01152311626._3 | |
570 | + | let payments = $t01152311626._4 | |
565 | 571 | invoke(addr, call, params, payments) | |
566 | 572 | } | |
567 | 573 | else 0 | |
590 | 596 | func checkSuspicious () = { | |
591 | 597 | let contractBalances = _xp() | |
592 | 598 | func checkBalance (acc,assetId) = { | |
593 | - | let $ | |
594 | - | let suspicious = $ | |
595 | - | let i = $ | |
599 | + | let $t01223712262 = acc | |
600 | + | let suspicious = $t01223712262._1 | |
601 | + | let i = $t01223712262._2 | |
596 | 602 | if (suspicious) | |
597 | 603 | then $Tuple2(suspicious, i) | |
598 | 604 | else { | |
714 | 720 | let D0 = if ((shareSupply == 0)) | |
715 | 721 | then 0 | |
716 | 722 | else getDMem(xp, amp) | |
717 | - | let $ | |
723 | + | let $t01547015724 = if (if ((lockType > 0)) | |
718 | 724 | then (msg.payments[(size(msg.payments) - 1)].assetId == unit) | |
719 | 725 | else false) | |
720 | 726 | then $Tuple2(removeByIndex(msg.payments, (size(msg.payments) - 1)), [msg.payments[(size(msg.payments) - 1)]]) | |
721 | 727 | else $Tuple2(msg.payments, nil) | |
722 | - | let payments = $ | |
723 | - | let lockFee = $ | |
728 | + | let payments = $t01547015724._1 | |
729 | + | let lockFee = $t01547015724._2 | |
724 | 730 | let paymentsSize = size(payments) | |
725 | 731 | func validPayments (n) = if ((paymentsSize > nCoins)) | |
726 | 732 | then throw(("payments size > " + toString(nCoins))) | |
757 | 763 | then (suspendSuspicious(suspicious._2) ++ returnPayments(msg.caller, payments)) | |
758 | 764 | else { | |
759 | 765 | func parsePayments (acc,assetId) = { | |
760 | - | let $ | |
761 | - | let newBalances = $ | |
762 | - | let i = $ | |
766 | + | let $t01659416620 = acc | |
767 | + | let newBalances = $t01659416620._1 | |
768 | + | let i = $t01659416620._2 | |
763 | 769 | func parsePayment (newBalance,payment) = if ((getStrAssetId(payment.assetId) == assetId)) | |
764 | 770 | then (newBalance + payment.amount) | |
765 | 771 | else newBalance | |
781 | 787 | $Tuple2((newBalances :+ newBalace), (i + 1)) | |
782 | 788 | } | |
783 | 789 | ||
784 | - | let $ | |
790 | + | let $t01697017037 = { | |
785 | 791 | let $l = assetIds | |
786 | 792 | let $s = size($l) | |
787 | 793 | let $acc0 = $Tuple2(nil, 0) | |
795 | 801 | ||
796 | 802 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
797 | 803 | } | |
798 | - | let newBalances = $ | |
799 | - | let k = $ | |
804 | + | let newBalances = $t01697017037._1 | |
805 | + | let k = $t01697017037._2 | |
800 | 806 | if (checkDAppThreshold(newBalances)) | |
801 | 807 | then throw() | |
802 | 808 | else { | |
806 | 812 | else { | |
807 | 813 | let feeDiscount = calculateFeeDiscount(msg.caller) | |
808 | 814 | func calcScriptActions (acc,newBalance) = { | |
809 | - | let $ | |
810 | - | let invBalances = $ | |
811 | - | let scriptActions = $ | |
812 | - | let i = $ | |
815 | + | let $t01735717398 = acc | |
816 | + | let invBalances = $t01735717398._1 | |
817 | + | let scriptActions = $t01735717398._2 | |
818 | + | let i = $t01735717398._3 | |
813 | 819 | if ((shareSupply > 0)) | |
814 | 820 | then { | |
815 | 821 | let _fee = ((fraction(fee, feeDiscount, feeScale6, CEILING) * nCoins) / (4 * (nCoins - 1))) | |
847 | 853 | } | |
848 | 854 | } | |
849 | 855 | ||
850 | - | let $ | |
856 | + | let $t01910319191 = { | |
851 | 857 | let $l = newBalances | |
852 | 858 | let $s = size($l) | |
853 | 859 | let $acc0 = $Tuple3(nil, nil, 0) | |
861 | 867 | ||
862 | 868 | $f1_2($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
863 | 869 | } | |
864 | - | let invBalances = $ | |
865 | - | let scriptActions = $ | |
870 | + | let invBalances = $t01910319191._1 | |
871 | + | let scriptActions = $t01910319191._2 | |
866 | 872 | let D2 = getDMem(invBalances, amp) | |
867 | 873 | let mint_amount = if ((shareSupply == 0)) | |
868 | 874 | then D1 | |
874 | 880 | let re = invoke(this, "reissueShare", [mint_amount], nil) | |
875 | 881 | if ((re == re)) | |
876 | 882 | then { | |
877 | - | let s = invoke(farmingAddress, " | |
883 | + | let s = invoke(farmingAddress, "lockShareTokensFromPool", [msg.caller.bytes, toString(this), lockType], ([AttachedPayment(shareAssetId, mint_amount)] ++ lockFee)) | |
878 | 884 | if ((s == s)) | |
879 | 885 | then (scriptActions :+ IntegerEntry(kShareAssetSupply, (shareSupply + mint_amount))) | |
880 | 886 | else throw("Strict value is not equal to itself.") | |
901 | 907 | let D0 = getDMem(xp, amp) | |
902 | 908 | let feeDiscount = calculateFeeDiscount(user) | |
903 | 909 | func calcInvBalances (acc,newBalance) = { | |
904 | - | let $ | |
905 | - | let invBalances = $ | |
906 | - | let i = $ | |
910 | + | let $t02046720493 = acc | |
911 | + | let invBalances = $t02046720493._1 | |
912 | + | let i = $t02046720493._2 | |
907 | 913 | let _fee = ((fraction(fee, feeDiscount, feeScale6, CEILING) * nCoins) / (4 * (nCoins - 1))) | |
908 | 914 | let fees = { | |
909 | 915 | let idealBalance = fraction(D1, xp[i], D0) | |
916 | 922 | $Tuple2((invBalances :+ invariantBalance), (i + 1)) | |
917 | 923 | } | |
918 | 924 | ||
919 | - | let $ | |
925 | + | let $t02109521165 = { | |
920 | 926 | let $l = newBalances | |
921 | 927 | let $s = size($l) | |
922 | 928 | let $acc0 = $Tuple2(nil, 0) | |
930 | 936 | ||
931 | 937 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
932 | 938 | } | |
933 | - | let invBalances = $ | |
934 | - | let k = $ | |
939 | + | let invBalances = $t02109521165._1 | |
940 | + | let k = $t02109521165._2 | |
935 | 941 | let D2 = getDMem(invBalances, amp) | |
936 | 942 | let mintAmount = fraction(shareSupply, (D2 - D0), D0) | |
937 | 943 | $Tuple2(nil, mintAmount) | |
986 | 992 | then throw("Exchange resulted in fewer coins than expected") | |
987 | 993 | else { | |
988 | 994 | func makeNewBalances (acc,tokenBalance) = { | |
989 | - | let $ | |
990 | - | let newBalances = $ | |
991 | - | let i = $ | |
995 | + | let $t02320623232 = acc | |
996 | + | let newBalances = $t02320623232._1 | |
997 | + | let i = $t02320623232._2 | |
992 | 998 | if ((i == fromIndex)) | |
993 | 999 | then $Tuple2((newBalances :+ (tokenBalance + dx)), (i + 1)) | |
994 | 1000 | else if ((i == toIndex)) | |
996 | 1002 | else $Tuple2((newBalances :+ tokenBalance), (i + 1)) | |
997 | 1003 | } | |
998 | 1004 | ||
999 | - | let $ | |
1005 | + | let $t02348323544 = { | |
1000 | 1006 | let $l = xp | |
1001 | 1007 | let $s = size($l) | |
1002 | 1008 | let $acc0 = $Tuple2(nil, 0) | |
1010 | 1016 | ||
1011 | 1017 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
1012 | 1018 | } | |
1013 | - | let newBalances = $ | |
1014 | - | let i = $ | |
1019 | + | let newBalances = $t02348323544._1 | |
1020 | + | let i = $t02348323544._2 | |
1015 | 1021 | if (checkDAppThreshold(newBalances)) | |
1016 | 1022 | then throw() | |
1017 | 1023 | else { | |
1053 | 1059 | then (suspendSuspicious(suspicious._2) ++ returnPayments(msg.originCaller, msg.payments)) | |
1054 | 1060 | else { | |
1055 | 1061 | func calcScriptActions (acc,balance) = { | |
1056 | - | let $ | |
1057 | - | let scriptActions = $ | |
1058 | - | let i = $ | |
1062 | + | let $t02483524863 = acc | |
1063 | + | let scriptActions = $t02483524863._1 | |
1064 | + | let i = $t02483524863._2 | |
1059 | 1065 | let wAmount = fraction(balance, pmtAmount, shareSupply) | |
1060 | 1066 | if (assert((wAmount >= minAmounts[i]))) | |
1061 | 1067 | then throw("Withdrawal resulted in fewer coins than expected") | |
1067 | 1073 | } | |
1068 | 1074 | } | |
1069 | 1075 | ||
1070 | - | let $ | |
1076 | + | let $t02535325421 = { | |
1071 | 1077 | let $l = _xp() | |
1072 | 1078 | let $s = size($l) | |
1073 | 1079 | let $acc0 = $Tuple2(nil, 0) | |
1081 | 1087 | ||
1082 | 1088 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
1083 | 1089 | } | |
1084 | - | let scriptActions = $ | |
1085 | - | let i = $ | |
1090 | + | let scriptActions = $t02535325421._1 | |
1091 | + | let i = $t02535325421._2 | |
1086 | 1092 | (scriptActions ++ [Burn(shareAssetId, pmtAmount), IntegerEntry(kShareAssetSupply, (shareSupply - pmtAmount))]) | |
1087 | 1093 | } | |
1088 | 1094 | } | |
1108 | 1114 | else msg.payments[0].amount | |
1109 | 1115 | } | |
1110 | 1116 | else 0 | |
1111 | - | let unlock = invoke(farmingAddress, " | |
1117 | + | let unlock = invoke(farmingAddress, "withdrawShareTokensFromPool", [msg.caller.bytes, toString(this), unlockAmount], nil) | |
1112 | 1118 | if ((unlock == unlock)) | |
1113 | 1119 | then { | |
1114 | 1120 | let withdrawAmount = (pmtAmount + unlockAmount) | |
1149 | 1155 | let outIndex = valueOrErrorMessage(indexOf(assetIds, tokenOut), "unknown token out") | |
1150 | 1156 | let tokenOutB58 = fromBase58String(tokenOut) | |
1151 | 1157 | let xp = _xp() | |
1152 | - | let $ | |
1153 | - | let dy = $ | |
1154 | - | let dy_fee = $ | |
1158 | + | let $t02747927561 = _calcWithdrawOneCoin(xp, pmtAmount, outIndex, msg.originCaller) | |
1159 | + | let dy = $t02747927561._1 | |
1160 | + | let dy_fee = $t02747927561._2 | |
1155 | 1161 | if (assert((dy >= minAmount))) | |
1156 | 1162 | then throw("Not enough coins removed") | |
1157 | 1163 | else { | |
1158 | 1164 | let governanceFees = fraction(dy_fee, feeGovernance, feeScale6) | |
1159 | 1165 | let dy_and_fee = (dy + dy_fee) | |
1160 | 1166 | func makeNewBalances (acc,tokenBalance) = { | |
1161 | - | let $ | |
1162 | - | let newBalances = $ | |
1163 | - | let i = $ | |
1167 | + | let $t02781927845 = acc | |
1168 | + | let newBalances = $t02781927845._1 | |
1169 | + | let i = $t02781927845._2 | |
1164 | 1170 | if ((i == outIndex)) | |
1165 | 1171 | then $Tuple2((newBalances :+ (tokenBalance - dy_and_fee)), (i + 1)) | |
1166 | 1172 | else $Tuple2((newBalances :+ tokenBalance), (i + 1)) | |
1167 | 1173 | } | |
1168 | 1174 | ||
1169 | - | let $ | |
1175 | + | let $t02801228073 = { | |
1170 | 1176 | let $l = xp | |
1171 | 1177 | let $s = size($l) | |
1172 | 1178 | let $acc0 = $Tuple2(nil, 0) | |
1180 | 1186 | ||
1181 | 1187 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
1182 | 1188 | } | |
1183 | - | let newBalances = $ | |
1184 | - | let v = $ | |
1189 | + | let newBalances = $t02801228073._1 | |
1190 | + | let v = $t02801228073._2 | |
1185 | 1191 | if (checkDAppThreshold(newBalances)) | |
1186 | 1192 | then throw() | |
1187 | 1193 | else { | |
1223 | 1229 | else msg.payments[0].amount | |
1224 | 1230 | } | |
1225 | 1231 | else 0 | |
1226 | - | let unlock = invoke(farmingAddress, " | |
1232 | + | let unlock = invoke(farmingAddress, "withdrawShareTokensFromPool", [msg.caller.bytes, toString(this), unlockAmount], nil) | |
1227 | 1233 | if ((unlock == unlock)) | |
1228 | 1234 | then { | |
1229 | 1235 | let withdrawAmount = (pmtAmount + unlockAmount) | |
1257 | 1263 | let balances = _xp() | |
1258 | 1264 | let D0 = getDMem(balances, amp) | |
1259 | 1265 | func calcNewBalances (acc,balance) = { | |
1260 | - | let $ | |
1261 | - | let newBalances = $ | |
1262 | - | let i = $ | |
1266 | + | let $t03011630142 = acc | |
1267 | + | let newBalances = $t03011630142._1 | |
1268 | + | let i = $t03011630142._2 | |
1263 | 1269 | let newBalance = (balance + (if (deposit) | |
1264 | 1270 | then amounts[i] | |
1265 | 1271 | else -(amounts[i]))) | |
1339 | 1345 | else { | |
1340 | 1346 | let balances = _xp() | |
1341 | 1347 | func takeExtraFunds (acc,assetId) = { | |
1342 | - | let $ | |
1343 | - | let sum = $ | |
1344 | - | let i = $ | |
1348 | + | let $t03248432502 = acc | |
1349 | + | let sum = $t03248432502._1 | |
1350 | + | let i = $t03248432502._2 | |
1345 | 1351 | let tokenB58 = fromBase58String(assetId) | |
1346 | 1352 | let rBalance = (assetBalance(this, tokenB58) + stakedAmount(tokenB58)) | |
1347 | 1353 | let enrollAmount = (rBalance - balances[i]) |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let PRECISION = 1000000 | |
5 | 5 | ||
6 | 6 | let MAX_A = 1000000 | |
7 | 7 | ||
8 | 8 | let MAX_A_CHANGE = 10 | |
9 | 9 | ||
10 | 10 | let DECIMALS = 6 | |
11 | 11 | ||
12 | 12 | let MIN_RAMP_TIME = (86400 / 60) | |
13 | 13 | ||
14 | 14 | let version = "3.0.0" | |
15 | 15 | ||
16 | 16 | let kVersion = "version" | |
17 | 17 | ||
18 | 18 | let kAssets = "asset_ids" | |
19 | 19 | ||
20 | 20 | let kAssetBalance = "_balance" | |
21 | 21 | ||
22 | 22 | let kActive = "active" | |
23 | + | ||
24 | + | let kActiveGlob = "active_all_contracts" | |
23 | 25 | ||
24 | 26 | let kCause = "shutdown_cause" | |
25 | 27 | ||
26 | 28 | let kShareAssetId = "share_asset_id" | |
27 | 29 | ||
28 | 30 | let kShareAssetSupply = "share_asset_supply" | |
29 | 31 | ||
30 | 32 | let kFee = "commission" | |
31 | 33 | ||
32 | 34 | let kDAppThresholdCoef = "dAppThresholdCoef" | |
33 | 35 | ||
34 | 36 | let kUSDNAddress = "staking_usdnnsbt_address" | |
35 | 37 | ||
36 | 38 | let kDiscounts = "discounts" | |
37 | 39 | ||
38 | 40 | let kDiscountValues = "discount_values" | |
39 | 41 | ||
40 | 42 | let kUserSwopInGov = "_SWOP_amount" | |
41 | 43 | ||
42 | 44 | let kUserGSwopInGov = "_GSwop_amount" | |
43 | 45 | ||
44 | 46 | let kAdminPubKey1 = "admin_pub_1" | |
45 | 47 | ||
46 | 48 | let kAdminPubKey2 = "admin_pub_2" | |
47 | 49 | ||
48 | 50 | let kAdminPubKey3 = "admin_pub_3" | |
49 | 51 | ||
50 | 52 | let kAdminInvokePubKey = "admin_invoke_pub" | |
51 | 53 | ||
52 | 54 | let kMoneyBoxAddress = "money_box_address" | |
53 | 55 | ||
54 | 56 | let kGovAddress = "governance_address" | |
55 | 57 | ||
56 | 58 | let kVotingAddress = "voting_address" | |
57 | 59 | ||
58 | 60 | let kFarmingAddress = "farming_address" | |
59 | 61 | ||
60 | 62 | let kLPFarmingAddress = "lp_farming" | |
61 | 63 | ||
62 | 64 | let oracle = Address(base58'3MvVBtsXroQpy1tsPw21TU2ET9A8WfmrNjz') | |
63 | 65 | ||
64 | 66 | func getBase58FromOracle (key) = match getString(oracle, key) { | |
65 | 67 | case string: String => | |
66 | 68 | fromBase58String(string) | |
67 | 69 | case nothing => | |
68 | 70 | throw((key + "is empty")) | |
69 | 71 | } | |
70 | 72 | ||
71 | 73 | ||
72 | 74 | let adminPubKey1 = getBase58FromOracle(kAdminPubKey1) | |
73 | 75 | ||
74 | 76 | let adminPubKey2 = getBase58FromOracle(kAdminPubKey2) | |
75 | 77 | ||
76 | 78 | let adminPubKey3 = getBase58FromOracle(kAdminPubKey3) | |
77 | 79 | ||
78 | 80 | let adminPubKeyInvoke = getBase58FromOracle(kAdminInvokePubKey) | |
79 | 81 | ||
80 | 82 | let moneyBoxAddress = Address(getBase58FromOracle(kMoneyBoxAddress)) | |
81 | 83 | ||
82 | 84 | let govAddress = Address(getBase58FromOracle(kGovAddress)) | |
83 | 85 | ||
84 | 86 | let stakingUSDNAddress = Address(getBase58FromOracle(kUSDNAddress)) | |
85 | 87 | ||
86 | 88 | let votingAddress = Address(getBase58FromOracle(kVotingAddress)) | |
87 | 89 | ||
88 | 90 | let farmingAddress = Address(getBase58FromOracle(kFarmingAddress)) | |
89 | 91 | ||
90 | 92 | let lpFarmingAddress = Address(getBase58FromOracle(kLPFarmingAddress)) | |
91 | 93 | ||
92 | - | let USDN = base58' | |
94 | + | let USDN = base58'DG2xFkPdDwKUoBkzGAhQtLpSGzfXLiCYPEzeKH2Ad24p' | |
93 | 95 | ||
94 | 96 | let stakingAssets = [toBase58String(USDN)] | |
95 | 97 | ||
96 | 98 | let active = getBooleanValue(this, kActive) | |
99 | + | ||
100 | + | let activeGlob = valueOrElse(getBoolean(oracle, kActiveGlob), true) | |
97 | 101 | ||
98 | 102 | let shareAssetId = fromBase58String(getStringValue(this, kShareAssetId)) | |
99 | 103 | ||
100 | 104 | let shareSupply = getIntegerValue(this, kShareAssetSupply) | |
101 | 105 | ||
102 | 106 | let feeScale6 = 1000000 | |
103 | 107 | ||
104 | 108 | let fee = getIntegerValue(this, kFee) | |
105 | 109 | ||
106 | 110 | let feeGovernance = fraction(40, feeScale6, 100) | |
107 | 111 | ||
108 | 112 | let initial_A = getIntegerValue(this, "initial_A") | |
109 | 113 | ||
110 | 114 | let future_A = getIntegerValue(this, "future_A") | |
111 | 115 | ||
112 | 116 | let initial_A_time = valueOrElse(getInteger(this, "initial_A_time"), 0) | |
113 | 117 | ||
114 | 118 | let future_A_time = valueOrElse(getInteger(this, "future_A_time"), 0) | |
115 | 119 | ||
116 | 120 | let assetIds = split(getStringValue(this, kAssets), ",") | |
117 | 121 | ||
118 | 122 | let nCoins = size(assetIds) | |
119 | 123 | ||
120 | 124 | func suspend (cause) = [BooleanEntry(kActive, false), StringEntry(kCause, cause)] | |
121 | 125 | ||
122 | 126 | ||
123 | 127 | func throwIsActive () = throw("DApp is already active") | |
124 | 128 | ||
125 | 129 | ||
126 | - | func isActive () = if (active) | |
130 | + | func isActive () = if (if (active) | |
131 | + | then activeGlob | |
132 | + | else false) | |
127 | 133 | then unit | |
128 | 134 | else throw("DApp is inactive at this moment") | |
129 | 135 | ||
130 | 136 | ||
131 | 137 | func isAdminCall (i) = if (containsElement([adminPubKey1, adminPubKey2, adminPubKey3], i.callerPublicKey)) | |
132 | 138 | then unit | |
133 | 139 | else throw("Only admin can call this function") | |
134 | 140 | ||
135 | 141 | ||
136 | 142 | func isSelfCall (i) = if ((this == i.caller)) | |
137 | 143 | then unit | |
138 | 144 | else throw("Only contract itself can call this function") | |
139 | 145 | ||
140 | 146 | ||
141 | 147 | let big2 = toBigInt(2) | |
142 | 148 | ||
143 | 149 | let iter10 = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] | |
144 | 150 | ||
145 | 151 | let iter15 = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14] | |
146 | 152 | ||
147 | 153 | let iter16 = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15] | |
148 | 154 | ||
149 | 155 | let blockTimestamp = height | |
150 | 156 | ||
151 | 157 | func assert (a) = if (a) | |
152 | 158 | then false | |
153 | 159 | else true | |
154 | 160 | ||
155 | 161 | ||
156 | 162 | func calculateFeeDiscount (userAddr) = { | |
157 | 163 | let user = match userAddr { | |
158 | 164 | case u: Address => | |
159 | 165 | toString(u) | |
160 | 166 | case u: String => | |
161 | 167 | u | |
162 | 168 | case _ => | |
163 | 169 | throw("Unknow type of user Addr") | |
164 | 170 | } | |
165 | 171 | let swopAmount = valueOrElse(getInteger(govAddress, (user + kUserGSwopInGov)), 0) | |
166 | 172 | let gSwopAmount = valueOrElse(getInteger(govAddress, (user + kUserGSwopInGov)), swopAmount) | |
167 | 173 | let discountValues = split(getStringValue(oracle, kDiscountValues), ",") | |
168 | 174 | let discounts = split(getStringValue(oracle, kDiscounts), ",") | |
169 | 175 | if (if ((gSwopAmount >= parseIntValue(discountValues[0]))) | |
170 | 176 | then (parseIntValue(discountValues[1]) > gSwopAmount) | |
171 | 177 | else false) | |
172 | 178 | then (feeScale6 - parseIntValue(discounts[0])) | |
173 | 179 | else if (if ((gSwopAmount >= parseIntValue(discountValues[1]))) | |
174 | 180 | then (parseIntValue(discountValues[2]) > gSwopAmount) | |
175 | 181 | else false) | |
176 | 182 | then (feeScale6 - parseIntValue(discounts[1])) | |
177 | 183 | else if (if ((gSwopAmount >= parseIntValue(discountValues[2]))) | |
178 | 184 | then (parseIntValue(discountValues[3]) > gSwopAmount) | |
179 | 185 | else false) | |
180 | 186 | then (feeScale6 - parseIntValue(discounts[2])) | |
181 | 187 | else if (if ((gSwopAmount >= parseIntValue(discountValues[3]))) | |
182 | 188 | then (parseIntValue(discountValues[4]) > gSwopAmount) | |
183 | 189 | else false) | |
184 | 190 | then (feeScale6 - parseIntValue(discounts[3])) | |
185 | 191 | else if ((gSwopAmount >= parseIntValue(discountValues[4]))) | |
186 | 192 | then (feeScale6 - parseIntValue(discounts[4])) | |
187 | 193 | else feeScale6 | |
188 | 194 | } | |
189 | 195 | ||
190 | 196 | ||
191 | 197 | func _A () = { | |
192 | 198 | let t1 = future_A_time | |
193 | 199 | let A1 = future_A | |
194 | 200 | if ((t1 > blockTimestamp)) | |
195 | 201 | then { | |
196 | 202 | let A0 = initial_A | |
197 | 203 | let t0 = initial_A_time | |
198 | 204 | if ((A1 > A0)) | |
199 | 205 | then (A0 + (((A1 - A0) * (blockTimestamp - t0)) / (t1 - t0))) | |
200 | 206 | else (A0 - (((A0 - A1) * (blockTimestamp - t0)) / (t1 - t0))) | |
201 | 207 | } | |
202 | 208 | else A1 | |
203 | 209 | } | |
204 | 210 | ||
205 | 211 | ||
206 | 212 | func _xp () = { | |
207 | 213 | func assetBalances (acc,assetId) = (acc :+ valueOrElse(getInteger(this, (assetId + kAssetBalance)), 0)) | |
208 | 214 | ||
209 | 215 | let $l = assetIds | |
210 | 216 | let $s = size($l) | |
211 | 217 | let $acc0 = nil | |
212 | 218 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
213 | 219 | then $a | |
214 | 220 | else assetBalances($a, $l[$i]) | |
215 | 221 | ||
216 | 222 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
217 | 223 | then $a | |
218 | 224 | else throw("List size exceeds 10") | |
219 | 225 | ||
220 | 226 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
221 | 227 | } | |
222 | 228 | ||
223 | 229 | ||
224 | 230 | func _xp_mem (xp) = xp | |
225 | 231 | ||
226 | 232 | ||
227 | 233 | func sumList (acc,element) = (acc + element) | |
228 | 234 | ||
229 | 235 | ||
230 | 236 | func get_D (xp,amp) = { | |
231 | 237 | let @ = invoke(this, "D", [xp, amp], nil) | |
232 | 238 | if ($isInstanceOf(@, "Int")) | |
233 | 239 | then @ | |
234 | 240 | else throw(($getType(@) + " couldn't be cast to Int")) | |
235 | 241 | } | |
236 | 242 | ||
237 | 243 | ||
238 | 244 | func get_D_internal (xp,amp) = { | |
239 | 245 | let S = { | |
240 | 246 | let $l = xp | |
241 | 247 | let $s = size($l) | |
242 | 248 | let $acc0 = 0 | |
243 | 249 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
244 | 250 | then $a | |
245 | 251 | else sumList($a, $l[$i]) | |
246 | 252 | ||
247 | 253 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
248 | 254 | then $a | |
249 | 255 | else throw("List size exceeds 10") | |
250 | 256 | ||
251 | 257 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
252 | 258 | } | |
253 | 259 | if ((S == 0)) | |
254 | 260 | then 0 | |
255 | 261 | else { | |
256 | 262 | let Ann = (amp * nCoins) | |
257 | 263 | let AnnS = (toBigInt(Ann) * toBigInt(S)) | |
258 | 264 | let Ann1 = toBigInt((Ann - 1)) | |
259 | 265 | func Dproc (acc,i) = if ((acc._2 == true)) | |
260 | 266 | then acc | |
261 | 267 | else { | |
262 | 268 | let Dprev = acc._1 | |
263 | 269 | func D_PProc (D_P,i) = if ((nCoins > i)) | |
264 | 270 | then ((D_P * Dprev) / (toBigInt(xp[i]) * toBigInt(nCoins))) | |
265 | 271 | else D_P | |
266 | 272 | ||
267 | 273 | let D_P = { | |
268 | 274 | let $l = iter10 | |
269 | 275 | let $s = size($l) | |
270 | 276 | let $acc0 = Dprev | |
271 | 277 | func $f1_1 ($a,$i) = if (($i >= $s)) | |
272 | 278 | then $a | |
273 | 279 | else D_PProc($a, $l[$i]) | |
274 | 280 | ||
275 | 281 | func $f1_2 ($a,$i) = if (($i >= $s)) | |
276 | 282 | then $a | |
277 | 283 | else throw("List size exceeds 10") | |
278 | 284 | ||
279 | 285 | $f1_2($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
280 | 286 | } | |
281 | 287 | let D = fraction((AnnS + (toBigInt(nCoins) * D_P)), Dprev, ((Ann1 * Dprev) + (toBigInt((nCoins + 1)) * D_P))) | |
282 | 288 | if ((D > Dprev)) | |
283 | 289 | then if ((1 >= toInt((D - Dprev)))) | |
284 | 290 | then $Tuple2(D, true) | |
285 | 291 | else $Tuple2(D, false) | |
286 | 292 | else if ((1 >= toInt((Dprev - D)))) | |
287 | 293 | then $Tuple2(D, true) | |
288 | 294 | else $Tuple2(D, false) | |
289 | 295 | } | |
290 | 296 | ||
291 | - | let $ | |
297 | + | let $t065826648 = { | |
292 | 298 | let $l = iter15 | |
293 | 299 | let $s = size($l) | |
294 | 300 | let $acc0 = $Tuple2(toBigInt(S), false) | |
295 | 301 | func $f1_1 ($a,$i) = if (($i >= $s)) | |
296 | 302 | then $a | |
297 | 303 | else Dproc($a, $l[$i]) | |
298 | 304 | ||
299 | 305 | func $f1_2 ($a,$i) = if (($i >= $s)) | |
300 | 306 | then $a | |
301 | 307 | else throw("List size exceeds 15") | |
302 | 308 | ||
303 | 309 | $f1_2($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15) | |
304 | 310 | } | |
305 | - | let D = $ | |
306 | - | let finished = $ | |
311 | + | let D = $t065826648._1 | |
312 | + | let finished = $t065826648._2 | |
307 | 313 | if ((finished == false)) | |
308 | 314 | then throw(("get_D() not finished with " + toString(D))) | |
309 | 315 | else toInt(D) | |
310 | 316 | } | |
311 | 317 | } | |
312 | 318 | ||
313 | 319 | ||
314 | 320 | func getDMem (xp,amp) = get_D(_xp_mem(xp), amp) | |
315 | 321 | ||
316 | 322 | ||
317 | 323 | func getY (in,out,x,xp_) = if (assert((in != out))) | |
318 | 324 | then throw("same coin") | |
319 | 325 | else if (assert(if ((out >= 0)) | |
320 | 326 | then (in >= 0) | |
321 | 327 | else false)) | |
322 | 328 | then throw("below zero") | |
323 | 329 | else if (assert(if ((nCoins > out)) | |
324 | 330 | then (nCoins > in) | |
325 | 331 | else false)) | |
326 | 332 | then throw("above N_COINS") | |
327 | 333 | else { | |
328 | 334 | let amp = _A() | |
329 | 335 | let D = get_D(xp_, amp) | |
330 | 336 | let Ann = (amp * nCoins) | |
331 | 337 | func S_c (acc,i) = { | |
332 | - | let $ | |
333 | - | let S_ = $ | |
334 | - | let c = $ | |
338 | + | let $t072197236 = acc | |
339 | + | let S_ = $t072197236._1 | |
340 | + | let c = $t072197236._2 | |
335 | 341 | let x_ = if ((in == i)) | |
336 | 342 | then x | |
337 | 343 | else xp_[i] | |
338 | 344 | if (if ((i != out)) | |
339 | 345 | then (nCoins > i) | |
340 | 346 | else false) | |
341 | 347 | then $Tuple2((S_ + x_), fraction(c, toBigInt(D), toBigInt((x_ * nCoins)))) | |
342 | 348 | else $Tuple2(S_, c) | |
343 | 349 | } | |
344 | 350 | ||
345 | - | let $ | |
351 | + | let $t074447499 = { | |
346 | 352 | let $l = iter10 | |
347 | 353 | let $s = size($l) | |
348 | 354 | let $acc0 = $Tuple2(0, toBigInt(D)) | |
349 | 355 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
350 | 356 | then $a | |
351 | 357 | else S_c($a, $l[$i]) | |
352 | 358 | ||
353 | 359 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
354 | 360 | then $a | |
355 | 361 | else throw("List size exceeds 10") | |
356 | 362 | ||
357 | 363 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
358 | 364 | } | |
359 | - | let S_ = $ | |
360 | - | let c_ = $ | |
365 | + | let S_ = $t074447499._1 | |
366 | + | let c_ = $t074447499._2 | |
361 | 367 | let c = fraction(c_, toBigInt(D), toBigInt((Ann * nCoins))) | |
362 | 368 | let bD = toBigInt(((S_ + (D / Ann)) - D)) | |
363 | 369 | func y_proc (acc,_i) = if ((acc._2 == true)) | |
364 | 370 | then acc | |
365 | 371 | else { | |
366 | 372 | let y_prev = acc._1 | |
367 | 373 | let y = (((y_prev * y_prev) + c) / ((big2 * y_prev) + bD)) | |
368 | 374 | if ((y > y_prev)) | |
369 | 375 | then if ((1 >= toInt((y - y_prev)))) | |
370 | 376 | then $Tuple2(y, true) | |
371 | 377 | else $Tuple2(y, false) | |
372 | 378 | else if ((1 >= toInt((y_prev - y)))) | |
373 | 379 | then $Tuple2(y, true) | |
374 | 380 | else $Tuple2(y, false) | |
375 | 381 | } | |
376 | 382 | ||
377 | - | let $ | |
383 | + | let $t079818048 = { | |
378 | 384 | let $l = iter16 | |
379 | 385 | let $s = size($l) | |
380 | 386 | let $acc0 = $Tuple2(toBigInt(D), false) | |
381 | 387 | func $f1_1 ($a,$i) = if (($i >= $s)) | |
382 | 388 | then $a | |
383 | 389 | else y_proc($a, $l[$i]) | |
384 | 390 | ||
385 | 391 | func $f1_2 ($a,$i) = if (($i >= $s)) | |
386 | 392 | then $a | |
387 | 393 | else throw("List size exceeds 16") | |
388 | 394 | ||
389 | 395 | $f1_2($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16) | |
390 | 396 | } | |
391 | - | let y = $ | |
392 | - | let finished = $ | |
397 | + | let y = $t079818048._1 | |
398 | + | let finished = $t079818048._2 | |
393 | 399 | if ((finished == false)) | |
394 | 400 | then throw(("getY() not finished with " + toString(y))) | |
395 | 401 | else toInt(y) | |
396 | 402 | } | |
397 | 403 | ||
398 | 404 | ||
399 | 405 | func get_y_D (A_,in,xp,D) = if (assert((in >= 0))) | |
400 | 406 | then throw("i below zero") | |
401 | 407 | else if (assert((nCoins > in))) | |
402 | 408 | then throw("i above N_COINS") | |
403 | 409 | else { | |
404 | 410 | let Ann = (A_ * nCoins) | |
405 | 411 | func S_c (acc,i) = { | |
406 | - | let $ | |
407 | - | let S_ = $ | |
408 | - | let c = $ | |
412 | + | let $t084278444 = acc | |
413 | + | let S_ = $t084278444._1 | |
414 | + | let c = $t084278444._2 | |
409 | 415 | let x_ = if (if ((in != i)) | |
410 | 416 | then (nCoins > i) | |
411 | 417 | else false) | |
412 | 418 | then xp[i] | |
413 | 419 | else 0 | |
414 | 420 | if (if ((nCoins > i)) | |
415 | 421 | then (in != i) | |
416 | 422 | else false) | |
417 | 423 | then $Tuple2((S_ + x_), fraction(c, toBigInt(D), toBigInt((x_ * nCoins)))) | |
418 | 424 | else $Tuple2(S_, c) | |
419 | 425 | } | |
420 | 426 | ||
421 | - | let $ | |
427 | + | let $t086648719 = { | |
422 | 428 | let $l = iter10 | |
423 | 429 | let $s = size($l) | |
424 | 430 | let $acc0 = $Tuple2(0, toBigInt(D)) | |
425 | 431 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
426 | 432 | then $a | |
427 | 433 | else S_c($a, $l[$i]) | |
428 | 434 | ||
429 | 435 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
430 | 436 | then $a | |
431 | 437 | else throw("List size exceeds 10") | |
432 | 438 | ||
433 | 439 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
434 | 440 | } | |
435 | - | let S_ = $ | |
436 | - | let c_ = $ | |
441 | + | let S_ = $t086648719._1 | |
442 | + | let c_ = $t086648719._2 | |
437 | 443 | let c = fraction(c_, toBigInt(D), toBigInt((Ann * nCoins))) | |
438 | 444 | let bD = toBigInt(((S_ + (D / Ann)) - D)) | |
439 | 445 | func y_D_proc (acc,i) = if ((acc._2 == true)) | |
440 | 446 | then acc | |
441 | 447 | else { | |
442 | 448 | let y_prev = acc._1 | |
443 | 449 | let y = (((y_prev * y_prev) + c) / ((big2 * y_prev) + bD)) | |
444 | 450 | if ((y > y_prev)) | |
445 | 451 | then if ((1 >= toInt((y - y_prev)))) | |
446 | 452 | then $Tuple2(y, true) | |
447 | 453 | else $Tuple2(y, false) | |
448 | 454 | else if ((1 >= toInt((y_prev - y)))) | |
449 | 455 | then $Tuple2(y, true) | |
450 | 456 | else $Tuple2(y, false) | |
451 | 457 | } | |
452 | 458 | ||
453 | - | let $ | |
459 | + | let $t092029271 = { | |
454 | 460 | let $l = iter16 | |
455 | 461 | let $s = size($l) | |
456 | 462 | let $acc0 = $Tuple2(toBigInt(D), false) | |
457 | 463 | func $f1_1 ($a,$i) = if (($i >= $s)) | |
458 | 464 | then $a | |
459 | 465 | else y_D_proc($a, $l[$i]) | |
460 | 466 | ||
461 | 467 | func $f1_2 ($a,$i) = if (($i >= $s)) | |
462 | 468 | then $a | |
463 | 469 | else throw("List size exceeds 16") | |
464 | 470 | ||
465 | 471 | $f1_2($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16) | |
466 | 472 | } | |
467 | - | let y = $ | |
468 | - | let finished = $ | |
473 | + | let y = $t092029271._1 | |
474 | + | let finished = $t092029271._2 | |
469 | 475 | if ((finished == false)) | |
470 | 476 | then throw(("get_y_D() not finished with " + toString(y))) | |
471 | 477 | else toInt(y) | |
472 | 478 | } | |
473 | 479 | ||
474 | 480 | ||
475 | 481 | func _calcWithdrawOneCoin (xp,_token_amount,i,caller) = { | |
476 | 482 | let feeDiscount = calculateFeeDiscount(caller) | |
477 | 483 | let amp = _A() | |
478 | 484 | let _fee = ((fraction(fee, feeDiscount, feeScale6, CEILING) * nCoins) / (4 * (nCoins - 1))) | |
479 | 485 | let total_supply = shareSupply | |
480 | 486 | let D0 = get_D(xp, amp) | |
481 | 487 | let D1 = (D0 - fraction(_token_amount, D0, total_supply)) | |
482 | 488 | let new_y = get_y_D(amp, i, xp, D1) | |
483 | 489 | let dy_0 = (xp[i] - new_y) | |
484 | 490 | func xp_reduced_proc (acc,xp_j) = { | |
485 | - | let $ | |
486 | - | let xp_reduced = $ | |
487 | - | let index = $ | |
491 | + | let $t099129941 = acc | |
492 | + | let xp_reduced = $t099129941._1 | |
493 | + | let index = $t099129941._2 | |
488 | 494 | let dx_expected = if ((index == i)) | |
489 | 495 | then (fraction(xp_j, D1, D0) - new_y) | |
490 | 496 | else (xp_j - fraction(xp_j, D1, D0)) | |
491 | 497 | $Tuple2((xp_reduced :+ (xp_j - fraction(_fee, dx_expected, feeScale6))), (index + 1)) | |
492 | 498 | } | |
493 | 499 | ||
494 | - | let $ | |
500 | + | let $t01020310267 = { | |
495 | 501 | let $l = xp | |
496 | 502 | let $s = size($l) | |
497 | 503 | let $acc0 = $Tuple2(nil, 0) | |
498 | 504 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
499 | 505 | then $a | |
500 | 506 | else xp_reduced_proc($a, $l[$i]) | |
501 | 507 | ||
502 | 508 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
503 | 509 | then $a | |
504 | 510 | else throw("List size exceeds 10") | |
505 | 511 | ||
506 | 512 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
507 | 513 | } | |
508 | - | let xp_reduced = $ | |
509 | - | let index = $ | |
514 | + | let xp_reduced = $t01020310267._1 | |
515 | + | let index = $t01020310267._2 | |
510 | 516 | let xp_reduced_i = xp_reduced[i] | |
511 | 517 | let dy = ((xp_reduced_i - get_y_D(amp, i, xp_reduced, D1)) - 1) | |
512 | 518 | $Tuple2(dy, (dy_0 - dy)) | |
513 | 519 | } | |
514 | 520 | ||
515 | 521 | ||
516 | 522 | func getStrAssetId (assetId) = match assetId { | |
517 | 523 | case id: ByteVector => | |
518 | 524 | toBase58String(id) | |
519 | 525 | case waves: Unit => | |
520 | 526 | "WAVES" | |
521 | 527 | case _ => | |
522 | 528 | throw("Match error") | |
523 | 529 | } | |
524 | 530 | ||
525 | 531 | ||
526 | 532 | func calcStakingFuncAndAddres (stake,assetId) = if (stake) | |
527 | 533 | then $Tuple2("lockNeutrino", stakingUSDNAddress) | |
528 | 534 | else $Tuple2("unlockNeutrino", stakingUSDNAddress) | |
529 | 535 | ||
530 | 536 | ||
531 | 537 | func calcStakingParams (stake,amount,assetId) = if (stake) | |
532 | 538 | then { | |
533 | - | let $ | |
534 | - | let call = $ | |
535 | - | let stakingAddr = $ | |
539 | + | let $t01083110897 = calcStakingFuncAndAddres(stake, assetId) | |
540 | + | let call = $t01083110897._1 | |
541 | + | let stakingAddr = $t01083110897._2 | |
536 | 542 | $Tuple4(call, stakingAddr, nil, [AttachedPayment(assetId, amount)]) | |
537 | 543 | } | |
538 | 544 | else { | |
539 | - | let $ | |
540 | - | let call = $ | |
541 | - | let stakingAddr = $ | |
545 | + | let $t01098311049 = calcStakingFuncAndAddres(stake, assetId) | |
546 | + | let call = $t01098311049._1 | |
547 | + | let stakingAddr = $t01098311049._2 | |
542 | 548 | $Tuple4(call, stakingAddr, [amount, toBase58String(assetId)], nil) | |
543 | 549 | } | |
544 | 550 | ||
545 | 551 | ||
546 | 552 | func stake (amount,assetIdString) = if (containsElement(stakingAssets, assetIdString)) | |
547 | 553 | then { | |
548 | - | let $ | |
549 | - | let call = $ | |
550 | - | let addr = $ | |
551 | - | let params = $ | |
552 | - | let payments = $ | |
554 | + | let $t01123611338 = calcStakingParams(true, amount, fromBase58String(assetIdString)) | |
555 | + | let call = $t01123611338._1 | |
556 | + | let addr = $t01123611338._2 | |
557 | + | let params = $t01123611338._3 | |
558 | + | let payments = $t01123611338._4 | |
553 | 559 | invoke(addr, call, params, payments) | |
554 | 560 | } | |
555 | 561 | else 0 | |
556 | 562 | ||
557 | 563 | ||
558 | 564 | func unstake (amount,assetIdString) = if (containsElement(stakingAssets, assetIdString)) | |
559 | 565 | then { | |
560 | - | let $ | |
561 | - | let call = $ | |
562 | - | let addr = $ | |
563 | - | let params = $ | |
564 | - | let payments = $ | |
566 | + | let $t01152311626 = calcStakingParams(false, amount, fromBase58String(assetIdString)) | |
567 | + | let call = $t01152311626._1 | |
568 | + | let addr = $t01152311626._2 | |
569 | + | let params = $t01152311626._3 | |
570 | + | let payments = $t01152311626._4 | |
565 | 571 | invoke(addr, call, params, payments) | |
566 | 572 | } | |
567 | 573 | else 0 | |
568 | 574 | ||
569 | 575 | ||
570 | 576 | func stakedAmount (assetId) = { | |
571 | 577 | let stakedAmountCalculated = match assetId { | |
572 | 578 | case aId: ByteVector => | |
573 | 579 | if ((aId == USDN)) | |
574 | 580 | then getInteger(stakingUSDNAddress, ((("rpd_balance_" + toBase58String(aId)) + "_") + toString(this))) | |
575 | 581 | else 0 | |
576 | 582 | case _: Unit => | |
577 | 583 | 0 | |
578 | 584 | case _ => | |
579 | 585 | throw("Match error") | |
580 | 586 | } | |
581 | 587 | match stakedAmountCalculated { | |
582 | 588 | case i: Int => | |
583 | 589 | i | |
584 | 590 | case _ => | |
585 | 591 | 0 | |
586 | 592 | } | |
587 | 593 | } | |
588 | 594 | ||
589 | 595 | ||
590 | 596 | func checkSuspicious () = { | |
591 | 597 | let contractBalances = _xp() | |
592 | 598 | func checkBalance (acc,assetId) = { | |
593 | - | let $ | |
594 | - | let suspicious = $ | |
595 | - | let i = $ | |
599 | + | let $t01223712262 = acc | |
600 | + | let suspicious = $t01223712262._1 | |
601 | + | let i = $t01223712262._2 | |
596 | 602 | if (suspicious) | |
597 | 603 | then $Tuple2(suspicious, i) | |
598 | 604 | else { | |
599 | 605 | let aBalance = (assetBalance(this, fromBase58String(assetId)) + stakedAmount(fromBase58String(assetId))) | |
600 | 606 | if ((contractBalances[i] > aBalance)) | |
601 | 607 | then $Tuple2(true, i) | |
602 | 608 | else $Tuple2(false, (i + 1)) | |
603 | 609 | } | |
604 | 610 | } | |
605 | 611 | ||
606 | 612 | let $l = assetIds | |
607 | 613 | let $s = size($l) | |
608 | 614 | let $acc0 = $Tuple2(false, 0) | |
609 | 615 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
610 | 616 | then $a | |
611 | 617 | else checkBalance($a, $l[$i]) | |
612 | 618 | ||
613 | 619 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
614 | 620 | then $a | |
615 | 621 | else throw("List size exceeds 10") | |
616 | 622 | ||
617 | 623 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
618 | 624 | } | |
619 | 625 | ||
620 | 626 | ||
621 | 627 | func suspendSuspicious (i) = suspend(("Suspicious state with asset: " + assetIds[i])) | |
622 | 628 | ||
623 | 629 | ||
624 | 630 | func returnPayments (caller,payments) = { | |
625 | 631 | func parsePayments (acc,payment) = (acc :+ ScriptTransfer(caller, payment.amount, payment.assetId)) | |
626 | 632 | ||
627 | 633 | let $l = payments | |
628 | 634 | let $s = size($l) | |
629 | 635 | let $acc0 = nil | |
630 | 636 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
631 | 637 | then $a | |
632 | 638 | else parsePayments($a, $l[$i]) | |
633 | 639 | ||
634 | 640 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
635 | 641 | then $a | |
636 | 642 | else throw("List size exceeds 10") | |
637 | 643 | ||
638 | 644 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
639 | 645 | } | |
640 | 646 | ||
641 | 647 | ||
642 | 648 | func checkDAppThreshold (newBalances) = { | |
643 | 649 | let dAppThresholdCoef = valueOrErrorMessage(getInteger(this, kDAppThresholdCoef), "No dAppThresholdCoef key") | |
644 | 650 | let thresholdScale = 10000 | |
645 | 651 | let maxBalance = max(newBalances) | |
646 | 652 | let minBalance = min(newBalances) | |
647 | 653 | let ratio = fraction(maxBalance, thresholdScale, minBalance) | |
648 | 654 | if ((ratio > (dAppThresholdCoef * thresholdScale))) | |
649 | 655 | then throw("New balance in assets of the DApp is less than threshold") | |
650 | 656 | else false | |
651 | 657 | } | |
652 | 658 | ||
653 | 659 | ||
654 | 660 | func checkCoins (assetIds) = { | |
655 | 661 | let coins = split(assetIds, ",") | |
656 | 662 | if ((size(coins) > 10)) | |
657 | 663 | then throw("To many coins, max coins size 10") | |
658 | 664 | else { | |
659 | 665 | func checkCoin (error,assetId) = { | |
660 | 666 | let asset = valueOrErrorMessage(fromBase58String(assetId), ("fromBase58String: " + assetId)) | |
661 | 667 | let decimals = valueOrErrorMessage(assetInfo(asset), ("assetInfo: " + assetId)).decimals | |
662 | 668 | if ((decimals != DECIMALS)) | |
663 | 669 | then throw("wrong decimals") | |
664 | 670 | else false | |
665 | 671 | } | |
666 | 672 | ||
667 | 673 | let $l = coins | |
668 | 674 | let $s = size($l) | |
669 | 675 | let $acc0 = false | |
670 | 676 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
671 | 677 | then $a | |
672 | 678 | else checkCoin($a, $l[$i]) | |
673 | 679 | ||
674 | 680 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
675 | 681 | then $a | |
676 | 682 | else throw("List size exceeds 10") | |
677 | 683 | ||
678 | 684 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
679 | 685 | } | |
680 | 686 | } | |
681 | 687 | ||
682 | 688 | ||
683 | 689 | @Callable(msg) | |
684 | 690 | func D (xp,amp) = { | |
685 | 691 | let D = get_D_internal(xp, amp) | |
686 | 692 | $Tuple2([IntegerEntry("D", D)], D) | |
687 | 693 | } | |
688 | 694 | ||
689 | 695 | ||
690 | 696 | ||
691 | 697 | @Callable(msg) | |
692 | 698 | func init (assetIds,_A,_dAppThresholdCoef) = if (!(isDataStorageUntouched(this))) | |
693 | 699 | then throw("Already initialized") | |
694 | 700 | else if ((0 >= _A)) | |
695 | 701 | then throw("Amp must be must > 0") | |
696 | 702 | else if ((0 >= _dAppThresholdCoef)) | |
697 | 703 | then throw("dApp Threshold Coef must be > 0") | |
698 | 704 | else { | |
699 | 705 | let shareName = "s_Multi_USD" | |
700 | 706 | let shareDescription = ("ShareToken of SwopFi protocol for MultiStable USD pool at address " + toString(this)) | |
701 | 707 | let issueToken = Issue(shareName, shareDescription, 0, 6, true) | |
702 | 708 | let tokenId = calculateAssetId(issueToken) | |
703 | 709 | if (checkCoins(assetIds)) | |
704 | 710 | then throw() | |
705 | 711 | else [StringEntry(kVersion, version), StringEntry(kAssets, assetIds), IntegerEntry("initial_A", _A), IntegerEntry("future_A", _A), IntegerEntry(kFee, getIntegerValue(oracle, "base_fee_flat")), StringEntry(kShareAssetId, toBase58String(tokenId)), IntegerEntry(kShareAssetSupply, 0), IntegerEntry(kDAppThresholdCoef, _dAppThresholdCoef), BooleanEntry(kActive, true), issueToken] | |
706 | 712 | } | |
707 | 713 | ||
708 | 714 | ||
709 | 715 | ||
710 | 716 | @Callable(msg) | |
711 | 717 | func addLiquidity (minMintAmount,stakeFarming,lockType) = valueOrElse(isActive(), { | |
712 | 718 | let amp = _A() | |
713 | 719 | let xp = _xp() | |
714 | 720 | let D0 = if ((shareSupply == 0)) | |
715 | 721 | then 0 | |
716 | 722 | else getDMem(xp, amp) | |
717 | - | let $ | |
723 | + | let $t01547015724 = if (if ((lockType > 0)) | |
718 | 724 | then (msg.payments[(size(msg.payments) - 1)].assetId == unit) | |
719 | 725 | else false) | |
720 | 726 | then $Tuple2(removeByIndex(msg.payments, (size(msg.payments) - 1)), [msg.payments[(size(msg.payments) - 1)]]) | |
721 | 727 | else $Tuple2(msg.payments, nil) | |
722 | - | let payments = $ | |
723 | - | let lockFee = $ | |
728 | + | let payments = $t01547015724._1 | |
729 | + | let lockFee = $t01547015724._2 | |
724 | 730 | let paymentsSize = size(payments) | |
725 | 731 | func validPayments (n) = if ((paymentsSize > nCoins)) | |
726 | 732 | then throw(("payments size > " + toString(nCoins))) | |
727 | 733 | else if ((1 > paymentsSize)) | |
728 | 734 | then throw("payments size < 1") | |
729 | 735 | else if (if ((shareSupply == 0)) | |
730 | 736 | then (nCoins != paymentsSize) | |
731 | 737 | else false) | |
732 | 738 | then throw("initial deposit requires all coins") | |
733 | 739 | else { | |
734 | 740 | func paymantValid (acc,payment) = if (containsElement(assetIds, getStrAssetId(payment.assetId))) | |
735 | 741 | then true | |
736 | 742 | else throw("Invalid asset in payment") | |
737 | 743 | ||
738 | 744 | let $l = payments | |
739 | 745 | let $s = size($l) | |
740 | 746 | let $acc0 = false | |
741 | 747 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
742 | 748 | then $a | |
743 | 749 | else paymantValid($a, $l[$i]) | |
744 | 750 | ||
745 | 751 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
746 | 752 | then $a | |
747 | 753 | else throw("List size exceeds 10") | |
748 | 754 | ||
749 | 755 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
750 | 756 | } | |
751 | 757 | ||
752 | 758 | if (!(validPayments(paymentsSize))) | |
753 | 759 | then throw() | |
754 | 760 | else { | |
755 | 761 | let suspicious = checkSuspicious() | |
756 | 762 | if (suspicious._1) | |
757 | 763 | then (suspendSuspicious(suspicious._2) ++ returnPayments(msg.caller, payments)) | |
758 | 764 | else { | |
759 | 765 | func parsePayments (acc,assetId) = { | |
760 | - | let $ | |
761 | - | let newBalances = $ | |
762 | - | let i = $ | |
766 | + | let $t01659416620 = acc | |
767 | + | let newBalances = $t01659416620._1 | |
768 | + | let i = $t01659416620._2 | |
763 | 769 | func parsePayment (newBalance,payment) = if ((getStrAssetId(payment.assetId) == assetId)) | |
764 | 770 | then (newBalance + payment.amount) | |
765 | 771 | else newBalance | |
766 | 772 | ||
767 | 773 | let newBalace = { | |
768 | 774 | let $l = payments | |
769 | 775 | let $s = size($l) | |
770 | 776 | let $acc0 = xp[i] | |
771 | 777 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
772 | 778 | then $a | |
773 | 779 | else parsePayment($a, $l[$i]) | |
774 | 780 | ||
775 | 781 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
776 | 782 | then $a | |
777 | 783 | else throw("List size exceeds 10") | |
778 | 784 | ||
779 | 785 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
780 | 786 | } | |
781 | 787 | $Tuple2((newBalances :+ newBalace), (i + 1)) | |
782 | 788 | } | |
783 | 789 | ||
784 | - | let $ | |
790 | + | let $t01697017037 = { | |
785 | 791 | let $l = assetIds | |
786 | 792 | let $s = size($l) | |
787 | 793 | let $acc0 = $Tuple2(nil, 0) | |
788 | 794 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
789 | 795 | then $a | |
790 | 796 | else parsePayments($a, $l[$i]) | |
791 | 797 | ||
792 | 798 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
793 | 799 | then $a | |
794 | 800 | else throw("List size exceeds 10") | |
795 | 801 | ||
796 | 802 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
797 | 803 | } | |
798 | - | let newBalances = $ | |
799 | - | let k = $ | |
804 | + | let newBalances = $t01697017037._1 | |
805 | + | let k = $t01697017037._2 | |
800 | 806 | if (checkDAppThreshold(newBalances)) | |
801 | 807 | then throw() | |
802 | 808 | else { | |
803 | 809 | let D1 = getDMem(newBalances, amp) | |
804 | 810 | if (assert((D1 > D0))) | |
805 | 811 | then throw("D1 > D0") | |
806 | 812 | else { | |
807 | 813 | let feeDiscount = calculateFeeDiscount(msg.caller) | |
808 | 814 | func calcScriptActions (acc,newBalance) = { | |
809 | - | let $ | |
810 | - | let invBalances = $ | |
811 | - | let scriptActions = $ | |
812 | - | let i = $ | |
815 | + | let $t01735717398 = acc | |
816 | + | let invBalances = $t01735717398._1 | |
817 | + | let scriptActions = $t01735717398._2 | |
818 | + | let i = $t01735717398._3 | |
813 | 819 | if ((shareSupply > 0)) | |
814 | 820 | then { | |
815 | 821 | let _fee = ((fraction(fee, feeDiscount, feeScale6, CEILING) * nCoins) / (4 * (nCoins - 1))) | |
816 | 822 | let fees = { | |
817 | 823 | let idealBalance = fraction(D1, xp[i], D0) | |
818 | 824 | let difference = if ((idealBalance > newBalance)) | |
819 | 825 | then (idealBalance - newBalance) | |
820 | 826 | else (newBalance - idealBalance) | |
821 | 827 | fraction(_fee, difference, feeScale6) | |
822 | 828 | } | |
823 | 829 | let governanceFees = fraction(fees, feeGovernance, feeScale6) | |
824 | 830 | let finalBalance = (newBalance - fees) | |
825 | 831 | let invariantBalance = (newBalance - fees) | |
826 | 832 | let pmt = (newBalance - xp[i]) | |
827 | 833 | let lpFees = (fees - governanceFees) | |
828 | 834 | let inv = if ((pmt > 0)) | |
829 | 835 | then stake((pmt - fees), assetIds[i]) | |
830 | 836 | else unstake(fees, assetIds[i]) | |
831 | 837 | if ((inv == inv)) | |
832 | 838 | then { | |
833 | 839 | let airdrop = if ((lpFees > 0)) | |
834 | 840 | then invoke(lpFarmingAddress, "airDrop", nil, [AttachedPayment(fromBase58String(assetIds[i]), lpFees)]) | |
835 | 841 | else 0 | |
836 | 842 | if ((airdrop == airdrop)) | |
837 | 843 | then $Tuple3((invBalances :+ invariantBalance), (scriptActions ++ [ScriptTransfer(moneyBoxAddress, governanceFees, fromBase58String(assetIds[i])), IntegerEntry((assetIds[i] + kAssetBalance), finalBalance)]), (i + 1)) | |
838 | 844 | else throw("Strict value is not equal to itself.") | |
839 | 845 | } | |
840 | 846 | else throw("Strict value is not equal to itself.") | |
841 | 847 | } | |
842 | 848 | else { | |
843 | 849 | let inv = stake(newBalance, assetIds[i]) | |
844 | 850 | if ((inv == inv)) | |
845 | 851 | then $Tuple3((invBalances :+ newBalance), (scriptActions :+ IntegerEntry((assetIds[i] + kAssetBalance), newBalance)), (i + 1)) | |
846 | 852 | else throw("Strict value is not equal to itself.") | |
847 | 853 | } | |
848 | 854 | } | |
849 | 855 | ||
850 | - | let $ | |
856 | + | let $t01910319191 = { | |
851 | 857 | let $l = newBalances | |
852 | 858 | let $s = size($l) | |
853 | 859 | let $acc0 = $Tuple3(nil, nil, 0) | |
854 | 860 | func $f1_1 ($a,$i) = if (($i >= $s)) | |
855 | 861 | then $a | |
856 | 862 | else calcScriptActions($a, $l[$i]) | |
857 | 863 | ||
858 | 864 | func $f1_2 ($a,$i) = if (($i >= $s)) | |
859 | 865 | then $a | |
860 | 866 | else throw("List size exceeds 10") | |
861 | 867 | ||
862 | 868 | $f1_2($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
863 | 869 | } | |
864 | - | let invBalances = $ | |
865 | - | let scriptActions = $ | |
870 | + | let invBalances = $t01910319191._1 | |
871 | + | let scriptActions = $t01910319191._2 | |
866 | 872 | let D2 = getDMem(invBalances, amp) | |
867 | 873 | let mint_amount = if ((shareSupply == 0)) | |
868 | 874 | then D1 | |
869 | 875 | else fraction(shareSupply, (D2 - D0), D0) | |
870 | 876 | if (assert((mint_amount >= minMintAmount))) | |
871 | 877 | then throw("Slippage screwed you") | |
872 | 878 | else if (stakeFarming) | |
873 | 879 | then { | |
874 | 880 | let re = invoke(this, "reissueShare", [mint_amount], nil) | |
875 | 881 | if ((re == re)) | |
876 | 882 | then { | |
877 | - | let s = invoke(farmingAddress, " | |
883 | + | let s = invoke(farmingAddress, "lockShareTokensFromPool", [msg.caller.bytes, toString(this), lockType], ([AttachedPayment(shareAssetId, mint_amount)] ++ lockFee)) | |
878 | 884 | if ((s == s)) | |
879 | 885 | then (scriptActions :+ IntegerEntry(kShareAssetSupply, (shareSupply + mint_amount))) | |
880 | 886 | else throw("Strict value is not equal to itself.") | |
881 | 887 | } | |
882 | 888 | else throw("Strict value is not equal to itself.") | |
883 | 889 | } | |
884 | 890 | else (scriptActions ++ [Reissue(shareAssetId, mint_amount, true), ScriptTransfer(msg.caller, mint_amount, shareAssetId), IntegerEntry(kShareAssetSupply, (shareSupply + mint_amount))]) | |
885 | 891 | } | |
886 | 892 | } | |
887 | 893 | } | |
888 | 894 | } | |
889 | 895 | }) | |
890 | 896 | ||
891 | 897 | ||
892 | 898 | ||
893 | 899 | @Callable(msg) | |
894 | 900 | func calcMintAmount (newBalances,user) = { | |
895 | 901 | let amp = _A() | |
896 | 902 | let xp = _xp() | |
897 | 903 | let D1 = getDMem(newBalances, amp) | |
898 | 904 | if ((shareSupply == 0)) | |
899 | 905 | then $Tuple2(nil, D1) | |
900 | 906 | else { | |
901 | 907 | let D0 = getDMem(xp, amp) | |
902 | 908 | let feeDiscount = calculateFeeDiscount(user) | |
903 | 909 | func calcInvBalances (acc,newBalance) = { | |
904 | - | let $ | |
905 | - | let invBalances = $ | |
906 | - | let i = $ | |
910 | + | let $t02046720493 = acc | |
911 | + | let invBalances = $t02046720493._1 | |
912 | + | let i = $t02046720493._2 | |
907 | 913 | let _fee = ((fraction(fee, feeDiscount, feeScale6, CEILING) * nCoins) / (4 * (nCoins - 1))) | |
908 | 914 | let fees = { | |
909 | 915 | let idealBalance = fraction(D1, xp[i], D0) | |
910 | 916 | let difference = if ((idealBalance > newBalance)) | |
911 | 917 | then (idealBalance - newBalance) | |
912 | 918 | else (newBalance - idealBalance) | |
913 | 919 | fraction(_fee, difference, feeScale6) | |
914 | 920 | } | |
915 | 921 | let invariantBalance = (newBalance - fees) | |
916 | 922 | $Tuple2((invBalances :+ invariantBalance), (i + 1)) | |
917 | 923 | } | |
918 | 924 | ||
919 | - | let $ | |
925 | + | let $t02109521165 = { | |
920 | 926 | let $l = newBalances | |
921 | 927 | let $s = size($l) | |
922 | 928 | let $acc0 = $Tuple2(nil, 0) | |
923 | 929 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
924 | 930 | then $a | |
925 | 931 | else calcInvBalances($a, $l[$i]) | |
926 | 932 | ||
927 | 933 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
928 | 934 | then $a | |
929 | 935 | else throw("List size exceeds 10") | |
930 | 936 | ||
931 | 937 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
932 | 938 | } | |
933 | - | let invBalances = $ | |
934 | - | let k = $ | |
939 | + | let invBalances = $t02109521165._1 | |
940 | + | let k = $t02109521165._2 | |
935 | 941 | let D2 = getDMem(invBalances, amp) | |
936 | 942 | let mintAmount = fraction(shareSupply, (D2 - D0), D0) | |
937 | 943 | $Tuple2(nil, mintAmount) | |
938 | 944 | } | |
939 | 945 | } | |
940 | 946 | ||
941 | 947 | ||
942 | 948 | ||
943 | 949 | @Callable(msg) | |
944 | 950 | func reissueShare (amount) = valueOrElse(isSelfCall(msg), [Reissue(shareAssetId, amount, true)]) | |
945 | 951 | ||
946 | 952 | ||
947 | 953 | ||
948 | 954 | @Callable(msg) | |
949 | 955 | func getDy (assetFrom,assetTo,dx,userAddress) = { | |
950 | 956 | let xp = _xp() | |
951 | 957 | let fromIndex = valueOrErrorMessage(indexOf(assetIds, assetFrom), "unknown token in") | |
952 | 958 | let toIndex = valueOrErrorMessage(indexOf(assetIds, assetTo), "unknown token out") | |
953 | 959 | let x = (xp[fromIndex] + dx) | |
954 | 960 | let y = getY(fromIndex, toIndex, x, xp) | |
955 | 961 | let dy = ((xp[toIndex] - y) - 1) | |
956 | 962 | let feeDiscount = calculateFeeDiscount(Address(fromBase58String(userAddress))) | |
957 | 963 | let _fee = fraction(fraction(fee, feeDiscount, feeScale6, CEILING), dy, feeScale6) | |
958 | 964 | $Tuple2(nil, $Tuple2((dy - _fee), _fee)) | |
959 | 965 | } | |
960 | 966 | ||
961 | 967 | ||
962 | 968 | ||
963 | 969 | @Callable(msg) | |
964 | 970 | func exchange (tokenOut,min_dy) = valueOrElse(isActive(), if ((size(msg.payments) != 1)) | |
965 | 971 | then throw("size(payments) != 1") | |
966 | 972 | else { | |
967 | 973 | let suspicious = checkSuspicious() | |
968 | 974 | if (suspicious._1) | |
969 | 975 | then (suspendSuspicious(suspicious._2) ++ returnPayments(msg.caller, msg.payments)) | |
970 | 976 | else { | |
971 | 977 | let payment = msg.payments[0] | |
972 | 978 | let tokenIn = getStrAssetId(payment.assetId) | |
973 | 979 | let tokenOutB58 = fromBase58String(tokenOut) | |
974 | 980 | let dx = payment.amount | |
975 | 981 | let fromIndex = valueOrErrorMessage(indexOf(assetIds, tokenIn), "unknown token in") | |
976 | 982 | let toIndex = valueOrErrorMessage(indexOf(assetIds, tokenOut), "unknown token out") | |
977 | 983 | let xp = _xp() | |
978 | 984 | let x = (xp[fromIndex] + dx) | |
979 | 985 | let y = getY(fromIndex, toIndex, x, xp) | |
980 | 986 | let _dy = ((xp[toIndex] - y) - 1) | |
981 | 987 | let feeDiscount = calculateFeeDiscount(msg.originCaller) | |
982 | 988 | let _fee = fraction(_dy, fraction(fee, feeDiscount, feeScale6, CEILING), feeScale6) | |
983 | 989 | let dy = (_dy - _fee) | |
984 | 990 | let governanceFees = fraction(_fee, feeGovernance, feeScale6) | |
985 | 991 | if (assert((dy >= min_dy))) | |
986 | 992 | then throw("Exchange resulted in fewer coins than expected") | |
987 | 993 | else { | |
988 | 994 | func makeNewBalances (acc,tokenBalance) = { | |
989 | - | let $ | |
990 | - | let newBalances = $ | |
991 | - | let i = $ | |
995 | + | let $t02320623232 = acc | |
996 | + | let newBalances = $t02320623232._1 | |
997 | + | let i = $t02320623232._2 | |
992 | 998 | if ((i == fromIndex)) | |
993 | 999 | then $Tuple2((newBalances :+ (tokenBalance + dx)), (i + 1)) | |
994 | 1000 | else if ((i == toIndex)) | |
995 | 1001 | then $Tuple2((newBalances :+ (tokenBalance - _dy)), (i + 1)) | |
996 | 1002 | else $Tuple2((newBalances :+ tokenBalance), (i + 1)) | |
997 | 1003 | } | |
998 | 1004 | ||
999 | - | let $ | |
1005 | + | let $t02348323544 = { | |
1000 | 1006 | let $l = xp | |
1001 | 1007 | let $s = size($l) | |
1002 | 1008 | let $acc0 = $Tuple2(nil, 0) | |
1003 | 1009 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
1004 | 1010 | then $a | |
1005 | 1011 | else makeNewBalances($a, $l[$i]) | |
1006 | 1012 | ||
1007 | 1013 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
1008 | 1014 | then $a | |
1009 | 1015 | else throw("List size exceeds 10") | |
1010 | 1016 | ||
1011 | 1017 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
1012 | 1018 | } | |
1013 | - | let newBalances = $ | |
1014 | - | let i = $ | |
1019 | + | let newBalances = $t02348323544._1 | |
1020 | + | let i = $t02348323544._2 | |
1015 | 1021 | if (checkDAppThreshold(newBalances)) | |
1016 | 1022 | then throw() | |
1017 | 1023 | else { | |
1018 | 1024 | let s = stake(payment.amount, getStrAssetId(payment.assetId)) | |
1019 | 1025 | if ((s == s)) | |
1020 | 1026 | then { | |
1021 | 1027 | let us = unstake(_dy, tokenOut) | |
1022 | 1028 | if ((us == us)) | |
1023 | 1029 | then { | |
1024 | 1030 | let lpFees = (_fee - governanceFees) | |
1025 | 1031 | let airdrop = if ((lpFees > 0)) | |
1026 | 1032 | then invoke(lpFarmingAddress, "airDrop", nil, [AttachedPayment(tokenOutB58, lpFees)]) | |
1027 | 1033 | else 0 | |
1028 | 1034 | if ((airdrop == airdrop)) | |
1029 | 1035 | then $Tuple2([IntegerEntry((tokenIn + kAssetBalance), x), IntegerEntry((tokenOut + kAssetBalance), (xp[toIndex] - _dy)), ScriptTransfer(msg.caller, dy, tokenOutB58), ScriptTransfer(moneyBoxAddress, governanceFees, tokenOutB58)], [dy, tokenOutB58]) | |
1030 | 1036 | else throw("Strict value is not equal to itself.") | |
1031 | 1037 | } | |
1032 | 1038 | else throw("Strict value is not equal to itself.") | |
1033 | 1039 | } | |
1034 | 1040 | else throw("Strict value is not equal to itself.") | |
1035 | 1041 | } | |
1036 | 1042 | } | |
1037 | 1043 | } | |
1038 | 1044 | }) | |
1039 | 1045 | ||
1040 | 1046 | ||
1041 | 1047 | ||
1042 | 1048 | @Callable(msg) | |
1043 | 1049 | func withdraw (minAmounts) = valueOrElse(isActive(), if ((size(msg.payments) != 1)) | |
1044 | 1050 | then throw("size(payments) != 1") | |
1045 | 1051 | else { | |
1046 | 1052 | let pmtAmount = msg.payments[0].amount | |
1047 | 1053 | let pmtAssetId = msg.payments[0].assetId | |
1048 | 1054 | if ((shareAssetId != pmtAssetId)) | |
1049 | 1055 | then throw("unknown payment token") | |
1050 | 1056 | else { | |
1051 | 1057 | let suspicious = checkSuspicious() | |
1052 | 1058 | if (suspicious._1) | |
1053 | 1059 | then (suspendSuspicious(suspicious._2) ++ returnPayments(msg.originCaller, msg.payments)) | |
1054 | 1060 | else { | |
1055 | 1061 | func calcScriptActions (acc,balance) = { | |
1056 | - | let $ | |
1057 | - | let scriptActions = $ | |
1058 | - | let i = $ | |
1062 | + | let $t02483524863 = acc | |
1063 | + | let scriptActions = $t02483524863._1 | |
1064 | + | let i = $t02483524863._2 | |
1059 | 1065 | let wAmount = fraction(balance, pmtAmount, shareSupply) | |
1060 | 1066 | if (assert((wAmount >= minAmounts[i]))) | |
1061 | 1067 | then throw("Withdrawal resulted in fewer coins than expected") | |
1062 | 1068 | else { | |
1063 | 1069 | let us = unstake(wAmount, assetIds[i]) | |
1064 | 1070 | if ((us == us)) | |
1065 | 1071 | then $Tuple2((scriptActions ++ [IntegerEntry((assetIds[i] + kAssetBalance), (balance - wAmount)), ScriptTransfer(msg.originCaller, wAmount, fromBase58String(assetIds[i]))]), (i + 1)) | |
1066 | 1072 | else throw("Strict value is not equal to itself.") | |
1067 | 1073 | } | |
1068 | 1074 | } | |
1069 | 1075 | ||
1070 | - | let $ | |
1076 | + | let $t02535325421 = { | |
1071 | 1077 | let $l = _xp() | |
1072 | 1078 | let $s = size($l) | |
1073 | 1079 | let $acc0 = $Tuple2(nil, 0) | |
1074 | 1080 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
1075 | 1081 | then $a | |
1076 | 1082 | else calcScriptActions($a, $l[$i]) | |
1077 | 1083 | ||
1078 | 1084 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
1079 | 1085 | then $a | |
1080 | 1086 | else throw("List size exceeds 10") | |
1081 | 1087 | ||
1082 | 1088 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
1083 | 1089 | } | |
1084 | - | let scriptActions = $ | |
1085 | - | let i = $ | |
1090 | + | let scriptActions = $t02535325421._1 | |
1091 | + | let i = $t02535325421._2 | |
1086 | 1092 | (scriptActions ++ [Burn(shareAssetId, pmtAmount), IntegerEntry(kShareAssetSupply, (shareSupply - pmtAmount))]) | |
1087 | 1093 | } | |
1088 | 1094 | } | |
1089 | 1095 | }) | |
1090 | 1096 | ||
1091 | 1097 | ||
1092 | 1098 | ||
1093 | 1099 | @Callable(msg) | |
1094 | 1100 | func withdrawWithUnlock (minAmounts,unlockAmount) = valueOrElse(isActive(), if ((0 >= unlockAmount)) | |
1095 | 1101 | then throw("Unlock amount must be positive") | |
1096 | 1102 | else { | |
1097 | 1103 | let suspicious = checkSuspicious() | |
1098 | 1104 | if (suspicious._1) | |
1099 | 1105 | then (suspendSuspicious(suspicious._2) ++ returnPayments(msg.caller, msg.payments)) | |
1100 | 1106 | else { | |
1101 | 1107 | let pmtAmount = if ((size(msg.payments) > 0)) | |
1102 | 1108 | then if ((size(msg.payments) != 1)) | |
1103 | 1109 | then throw("size(payments) != 1") | |
1104 | 1110 | else { | |
1105 | 1111 | let pmtAssetId = msg.payments[0].assetId | |
1106 | 1112 | if ((shareAssetId != pmtAssetId)) | |
1107 | 1113 | then throw("unknown payment token") | |
1108 | 1114 | else msg.payments[0].amount | |
1109 | 1115 | } | |
1110 | 1116 | else 0 | |
1111 | - | let unlock = invoke(farmingAddress, " | |
1117 | + | let unlock = invoke(farmingAddress, "withdrawShareTokensFromPool", [msg.caller.bytes, toString(this), unlockAmount], nil) | |
1112 | 1118 | if ((unlock == unlock)) | |
1113 | 1119 | then { | |
1114 | 1120 | let withdrawAmount = (pmtAmount + unlockAmount) | |
1115 | 1121 | let inv = invoke(this, "withdraw", [minAmounts], [AttachedPayment(shareAssetId, withdrawAmount)]) | |
1116 | 1122 | if ((inv == inv)) | |
1117 | 1123 | then nil | |
1118 | 1124 | else throw("Strict value is not equal to itself.") | |
1119 | 1125 | } | |
1120 | 1126 | else throw("Strict value is not equal to itself.") | |
1121 | 1127 | } | |
1122 | 1128 | }) | |
1123 | 1129 | ||
1124 | 1130 | ||
1125 | 1131 | ||
1126 | 1132 | @Callable(msg) | |
1127 | 1133 | func calcWithdrawOneCoin (tokenAmount,tokenOut,user) = if ((0 >= tokenAmount)) | |
1128 | 1134 | then throw("Amount must be positive") | |
1129 | 1135 | else { | |
1130 | 1136 | let i = valueOrErrorMessage(indexOf(assetIds, tokenOut), "unknown token out") | |
1131 | 1137 | $Tuple2(nil, _calcWithdrawOneCoin(_xp(), tokenAmount, i, Address(fromBase58String(user)))._1) | |
1132 | 1138 | } | |
1133 | 1139 | ||
1134 | 1140 | ||
1135 | 1141 | ||
1136 | 1142 | @Callable(msg) | |
1137 | 1143 | func withdrawOneCoin (tokenOut,minAmount) = valueOrElse(isActive(), if ((size(msg.payments) != 1)) | |
1138 | 1144 | then throw("size(payments) != 1") | |
1139 | 1145 | else { | |
1140 | 1146 | let suspicious = checkSuspicious() | |
1141 | 1147 | if (suspicious._1) | |
1142 | 1148 | then (suspendSuspicious(suspicious._2) ++ returnPayments(msg.originCaller, msg.payments)) | |
1143 | 1149 | else { | |
1144 | 1150 | let pmtAmount = msg.payments[0].amount | |
1145 | 1151 | let pmtAssetId = msg.payments[0].assetId | |
1146 | 1152 | if ((pmtAssetId != shareAssetId)) | |
1147 | 1153 | then throw("unknown token") | |
1148 | 1154 | else { | |
1149 | 1155 | let outIndex = valueOrErrorMessage(indexOf(assetIds, tokenOut), "unknown token out") | |
1150 | 1156 | let tokenOutB58 = fromBase58String(tokenOut) | |
1151 | 1157 | let xp = _xp() | |
1152 | - | let $ | |
1153 | - | let dy = $ | |
1154 | - | let dy_fee = $ | |
1158 | + | let $t02747927561 = _calcWithdrawOneCoin(xp, pmtAmount, outIndex, msg.originCaller) | |
1159 | + | let dy = $t02747927561._1 | |
1160 | + | let dy_fee = $t02747927561._2 | |
1155 | 1161 | if (assert((dy >= minAmount))) | |
1156 | 1162 | then throw("Not enough coins removed") | |
1157 | 1163 | else { | |
1158 | 1164 | let governanceFees = fraction(dy_fee, feeGovernance, feeScale6) | |
1159 | 1165 | let dy_and_fee = (dy + dy_fee) | |
1160 | 1166 | func makeNewBalances (acc,tokenBalance) = { | |
1161 | - | let $ | |
1162 | - | let newBalances = $ | |
1163 | - | let i = $ | |
1167 | + | let $t02781927845 = acc | |
1168 | + | let newBalances = $t02781927845._1 | |
1169 | + | let i = $t02781927845._2 | |
1164 | 1170 | if ((i == outIndex)) | |
1165 | 1171 | then $Tuple2((newBalances :+ (tokenBalance - dy_and_fee)), (i + 1)) | |
1166 | 1172 | else $Tuple2((newBalances :+ tokenBalance), (i + 1)) | |
1167 | 1173 | } | |
1168 | 1174 | ||
1169 | - | let $ | |
1175 | + | let $t02801228073 = { | |
1170 | 1176 | let $l = xp | |
1171 | 1177 | let $s = size($l) | |
1172 | 1178 | let $acc0 = $Tuple2(nil, 0) | |
1173 | 1179 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
1174 | 1180 | then $a | |
1175 | 1181 | else makeNewBalances($a, $l[$i]) | |
1176 | 1182 | ||
1177 | 1183 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
1178 | 1184 | then $a | |
1179 | 1185 | else throw("List size exceeds 10") | |
1180 | 1186 | ||
1181 | 1187 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
1182 | 1188 | } | |
1183 | - | let newBalances = $ | |
1184 | - | let v = $ | |
1189 | + | let newBalances = $t02801228073._1 | |
1190 | + | let v = $t02801228073._2 | |
1185 | 1191 | if (checkDAppThreshold(newBalances)) | |
1186 | 1192 | then throw() | |
1187 | 1193 | else { | |
1188 | 1194 | let us = unstake(dy_and_fee, tokenOut) | |
1189 | 1195 | if ((us == us)) | |
1190 | 1196 | then { | |
1191 | 1197 | let lpFees = (dy_fee - governanceFees) | |
1192 | 1198 | let airdrop = if ((lpFees > 0)) | |
1193 | 1199 | then invoke(lpFarmingAddress, "airDrop", nil, [AttachedPayment(tokenOutB58, lpFees)]) | |
1194 | 1200 | else 0 | |
1195 | 1201 | if ((airdrop == airdrop)) | |
1196 | 1202 | then [ScriptTransfer(msg.originCaller, dy, tokenOutB58), IntegerEntry((assetIds[outIndex] + kAssetBalance), (xp[outIndex] - dy_and_fee)), Burn(shareAssetId, pmtAmount), ScriptTransfer(moneyBoxAddress, governanceFees, tokenOutB58), IntegerEntry(kShareAssetSupply, (shareSupply - pmtAmount))] | |
1197 | 1203 | else throw("Strict value is not equal to itself.") | |
1198 | 1204 | } | |
1199 | 1205 | else throw("Strict value is not equal to itself.") | |
1200 | 1206 | } | |
1201 | 1207 | } | |
1202 | 1208 | } | |
1203 | 1209 | } | |
1204 | 1210 | }) | |
1205 | 1211 | ||
1206 | 1212 | ||
1207 | 1213 | ||
1208 | 1214 | @Callable(msg) | |
1209 | 1215 | func withdrawOneCoinWithUnlock (tokenOut,minAmount,unlockAmount) = valueOrElse(isActive(), if ((0 >= unlockAmount)) | |
1210 | 1216 | then throw("Unlock amount must be positive") | |
1211 | 1217 | else { | |
1212 | 1218 | let suspicious = checkSuspicious() | |
1213 | 1219 | if (suspicious._1) | |
1214 | 1220 | then (suspendSuspicious(suspicious._2) ++ returnPayments(msg.caller, msg.payments)) | |
1215 | 1221 | else { | |
1216 | 1222 | let pmtAmount = if ((size(msg.payments) > 0)) | |
1217 | 1223 | then if ((size(msg.payments) != 1)) | |
1218 | 1224 | then throw("size(payments) != 1") | |
1219 | 1225 | else { | |
1220 | 1226 | let pmtAssetId = msg.payments[0].assetId | |
1221 | 1227 | if ((shareAssetId != pmtAssetId)) | |
1222 | 1228 | then throw("unknown payment token") | |
1223 | 1229 | else msg.payments[0].amount | |
1224 | 1230 | } | |
1225 | 1231 | else 0 | |
1226 | - | let unlock = invoke(farmingAddress, " | |
1232 | + | let unlock = invoke(farmingAddress, "withdrawShareTokensFromPool", [msg.caller.bytes, toString(this), unlockAmount], nil) | |
1227 | 1233 | if ((unlock == unlock)) | |
1228 | 1234 | then { | |
1229 | 1235 | let withdrawAmount = (pmtAmount + unlockAmount) | |
1230 | 1236 | let inv = invoke(this, "withdrawOneCoin", [tokenOut, minAmount], [AttachedPayment(shareAssetId, withdrawAmount)]) | |
1231 | 1237 | if ((inv == inv)) | |
1232 | 1238 | then nil | |
1233 | 1239 | else throw("Strict value is not equal to itself.") | |
1234 | 1240 | } | |
1235 | 1241 | else throw("Strict value is not equal to itself.") | |
1236 | 1242 | } | |
1237 | 1243 | }) | |
1238 | 1244 | ||
1239 | 1245 | ||
1240 | 1246 | ||
1241 | 1247 | @Callable(msg) | |
1242 | 1248 | func A () = $Tuple2(nil, _A()) | |
1243 | 1249 | ||
1244 | 1250 | ||
1245 | 1251 | ||
1246 | 1252 | @Callable(msg) | |
1247 | 1253 | func getVirtualPrice () = { | |
1248 | 1254 | let D = get_D(_xp(), _A()) | |
1249 | 1255 | $Tuple2(nil, fraction(D, PRECISION, shareSupply)) | |
1250 | 1256 | } | |
1251 | 1257 | ||
1252 | 1258 | ||
1253 | 1259 | ||
1254 | 1260 | @Callable(msg) | |
1255 | 1261 | func calcTokenAmount (amounts,deposit) = { | |
1256 | 1262 | let amp = _A() | |
1257 | 1263 | let balances = _xp() | |
1258 | 1264 | let D0 = getDMem(balances, amp) | |
1259 | 1265 | func calcNewBalances (acc,balance) = { | |
1260 | - | let $ | |
1261 | - | let newBalances = $ | |
1262 | - | let i = $ | |
1266 | + | let $t03011630142 = acc | |
1267 | + | let newBalances = $t03011630142._1 | |
1268 | + | let i = $t03011630142._2 | |
1263 | 1269 | let newBalance = (balance + (if (deposit) | |
1264 | 1270 | then amounts[i] | |
1265 | 1271 | else -(amounts[i]))) | |
1266 | 1272 | $Tuple2((newBalances :+ newBalance), (i + 1)) | |
1267 | 1273 | } | |
1268 | 1274 | ||
1269 | 1275 | let newBalances = ( let $l = balances | |
1270 | 1276 | let $s = size($l) | |
1271 | 1277 | let $acc0 = $Tuple2(nil, 0) | |
1272 | 1278 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
1273 | 1279 | then $a | |
1274 | 1280 | else calcNewBalances($a, $l[$i]) | |
1275 | 1281 | ||
1276 | 1282 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
1277 | 1283 | then $a | |
1278 | 1284 | else throw("List size exceeds 10") | |
1279 | 1285 | ||
1280 | 1286 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10))._1 | |
1281 | 1287 | let D1 = getDMem(newBalances, amp) | |
1282 | 1288 | let diff = if (deposit) | |
1283 | 1289 | then (D1 - D0) | |
1284 | 1290 | else (D0 - D1) | |
1285 | 1291 | $Tuple2(nil, fraction(diff, shareSupply, D0)) | |
1286 | 1292 | } | |
1287 | 1293 | ||
1288 | 1294 | ||
1289 | 1295 | ||
1290 | 1296 | @Callable(msg) | |
1291 | 1297 | func rampA (_futureA,_futureTime) = valueOrElse(isActive(), valueOrElse(isAdminCall(msg), if (assert((blockTimestamp >= (initial_A_time + MIN_RAMP_TIME)))) | |
1292 | 1298 | then throw("too often") | |
1293 | 1299 | else if (assert((_futureTime >= (blockTimestamp + MIN_RAMP_TIME)))) | |
1294 | 1300 | then throw("insufficient time") | |
1295 | 1301 | else { | |
1296 | 1302 | let _initial_A = _A() | |
1297 | 1303 | if (assert(if ((_futureA > 0)) | |
1298 | 1304 | then (MAX_A > _futureA) | |
1299 | 1305 | else false)) | |
1300 | 1306 | then throw("out of base range") | |
1301 | 1307 | else if (assert(if (if ((_futureA >= _initial_A)) | |
1302 | 1308 | then ((_initial_A * MAX_A_CHANGE) >= _futureA) | |
1303 | 1309 | else false) | |
1304 | 1310 | then true | |
1305 | 1311 | else if ((_initial_A > _futureA)) | |
1306 | 1312 | then ((_futureA * MAX_A_CHANGE) >= _initial_A) | |
1307 | 1313 | else false)) | |
1308 | 1314 | then throw("out of range") | |
1309 | 1315 | else [IntegerEntry("initial_A", _initial_A), IntegerEntry("future_A", _futureA), IntegerEntry("initial_A_time", blockTimestamp), IntegerEntry("future_A_time", _futureTime)] | |
1310 | 1316 | })) | |
1311 | 1317 | ||
1312 | 1318 | ||
1313 | 1319 | ||
1314 | 1320 | @Callable(msg) | |
1315 | 1321 | func stopRampA () = valueOrElse(isActive(), valueOrElse(isAdminCall(msg), { | |
1316 | 1322 | let currentA = _A() | |
1317 | 1323 | [IntegerEntry("initial_A", currentA), IntegerEntry("future_A", currentA), IntegerEntry("initial_A_time", blockTimestamp), IntegerEntry("future_A_time", blockTimestamp)] | |
1318 | 1324 | })) | |
1319 | 1325 | ||
1320 | 1326 | ||
1321 | 1327 | ||
1322 | 1328 | @Callable(msg) | |
1323 | 1329 | func shutdown () = valueOrElse(isAdminCall(msg), if (!(active)) | |
1324 | 1330 | then throw(("DApp is already suspended. Cause: " + valueOrElse(getString(this, kCause), "the cause wasn't specified"))) | |
1325 | 1331 | else suspend("Paused by admin")) | |
1326 | 1332 | ||
1327 | 1333 | ||
1328 | 1334 | ||
1329 | 1335 | @Callable(msg) | |
1330 | 1336 | func activate () = valueOrElse(isAdminCall(msg), if (active) | |
1331 | 1337 | then throwIsActive() | |
1332 | 1338 | else [BooleanEntry(kActive, true), DeleteEntry(kCause)]) | |
1333 | 1339 | ||
1334 | 1340 | ||
1335 | 1341 | ||
1336 | 1342 | @Callable(msg) | |
1337 | 1343 | func takeIntoAccountExtraFunds () = valueOrElse(isActive(), if ((msg.caller != moneyBoxAddress)) | |
1338 | 1344 | then throw("Only the wallet can call this function") | |
1339 | 1345 | else { | |
1340 | 1346 | let balances = _xp() | |
1341 | 1347 | func takeExtraFunds (acc,assetId) = { | |
1342 | - | let $ | |
1343 | - | let sum = $ | |
1344 | - | let i = $ | |
1348 | + | let $t03248432502 = acc | |
1349 | + | let sum = $t03248432502._1 | |
1350 | + | let i = $t03248432502._2 | |
1345 | 1351 | let tokenB58 = fromBase58String(assetId) | |
1346 | 1352 | let rBalance = (assetBalance(this, tokenB58) + stakedAmount(tokenB58)) | |
1347 | 1353 | let enrollAmount = (rBalance - balances[i]) | |
1348 | 1354 | if ((0 > enrollAmount)) | |
1349 | 1355 | then suspend(("Enroll amount negative for asset" + assetId)) | |
1350 | 1356 | else { | |
1351 | 1357 | let airdrop = if ((enrollAmount > 0)) | |
1352 | 1358 | then invoke(lpFarmingAddress, "airDrop", nil, [AttachedPayment(tokenB58, enrollAmount)]) | |
1353 | 1359 | else 0 | |
1354 | 1360 | if ((airdrop == airdrop)) | |
1355 | 1361 | then $Tuple2((sum + enrollAmount), (i + 1)) | |
1356 | 1362 | else throw("Strict value is not equal to itself.") | |
1357 | 1363 | } | |
1358 | 1364 | } | |
1359 | 1365 | ||
1360 | 1366 | let k = { | |
1361 | 1367 | let $l = assetIds | |
1362 | 1368 | let $s = size($l) | |
1363 | 1369 | let $acc0 = $Tuple2(0, 0) | |
1364 | 1370 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
1365 | 1371 | then $a | |
1366 | 1372 | else takeExtraFunds($a, $l[$i]) | |
1367 | 1373 | ||
1368 | 1374 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
1369 | 1375 | then $a | |
1370 | 1376 | else throw("List size exceeds 10") | |
1371 | 1377 | ||
1372 | 1378 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
1373 | 1379 | } | |
1374 | 1380 | if ((k._1 == 0)) | |
1375 | 1381 | then throw("No money to take") | |
1376 | 1382 | else nil | |
1377 | 1383 | }) | |
1378 | 1384 | ||
1379 | 1385 | ||
1380 | 1386 | @Verifier(tx) | |
1381 | 1387 | func verify () = { | |
1382 | 1388 | let multiSignedByAdmins = { | |
1383 | 1389 | let adminPubKey1Signed = if (sigVerify(tx.bodyBytes, tx.proofs[0], adminPubKey1)) | |
1384 | 1390 | then 1 | |
1385 | 1391 | else 0 | |
1386 | 1392 | let adminPubKey2Signed = if (sigVerify(tx.bodyBytes, tx.proofs[1], adminPubKey2)) | |
1387 | 1393 | then 1 | |
1388 | 1394 | else 0 | |
1389 | 1395 | let adminPubKey3Signed = if (sigVerify(tx.bodyBytes, tx.proofs[2], adminPubKey3)) | |
1390 | 1396 | then 1 | |
1391 | 1397 | else 0 | |
1392 | 1398 | (((adminPubKey1Signed + adminPubKey2Signed) + adminPubKey3Signed) >= 2) | |
1393 | 1399 | } | |
1394 | 1400 | match tx { | |
1395 | 1401 | case inv: InvokeScriptTransaction => | |
1396 | 1402 | let callTakeIntoAccount = if ((inv.dApp == this)) | |
1397 | 1403 | then (inv.function == "takeIntoAccountExtraFunds") | |
1398 | 1404 | else false | |
1399 | 1405 | let signedByAdmin = if (if (if (sigVerify(tx.bodyBytes, tx.proofs[0], adminPubKey1)) | |
1400 | 1406 | then true | |
1401 | 1407 | else sigVerify(tx.bodyBytes, tx.proofs[0], adminPubKey2)) | |
1402 | 1408 | then true | |
1403 | 1409 | else sigVerify(tx.bodyBytes, tx.proofs[0], adminPubKey3)) | |
1404 | 1410 | then true | |
1405 | 1411 | else sigVerify(tx.bodyBytes, tx.proofs[0], adminPubKeyInvoke) | |
1406 | 1412 | if (if (callTakeIntoAccount) | |
1407 | 1413 | then signedByAdmin | |
1408 | 1414 | else false) | |
1409 | 1415 | then true | |
1410 | 1416 | else multiSignedByAdmins | |
1411 | 1417 | case _ => | |
1412 | 1418 | multiSignedByAdmins | |
1413 | 1419 | } | |
1414 | 1420 | } | |
1415 | 1421 |
github/deemru/w8io/026f985 410.51 ms ◑