def main():
    badger = connect_badger("deploy-final.json")
    admin = badger.devProxyAdmin
    multisig = badger.devMultisig
    contracts = badger.contracts_upgradeable
    deployer = badger.deployer

    expectedMultisig = "0xB65cef03b9B89f99517643226d76e286ee999e77"
    assert multisig == expectedMultisig
    """
    Total $BADGER 603,750

    Setts
    renbtcCRV — 83,437.5 $BADGER
    sbtcCRV — 83,437.5 $BADGER
    tbtcCRV — 83,437.5 $BADGER
    Badger — 70,000 $BADGER
    (NEW) wBTC/ETH Sushiswap LP — 40,000 $BADGER
    Badger <>wBTC Uniswap LP — 110,000 $BADGER
    (NEW) Badger <>wBTC Sushiswap LP— 50,000 $BADGER

    wbtc/eth = 34,285 $BADGER (which should be distributed evenly over 3 days ie today 1pm to tomorrow, tomorrow to wednesday, wed- thursday then new emissions)
    Badger <>wBTC Sushiswap LP— 30,000 $BADGER (10k/day)

    Super Sett
    Harvest renbtc CRV —83,437.5 $BADGER
    """

    rest = RewardsSchedule(badger)

    rest.setStart(to_timestamp(datetime.datetime(2020, 12, 31, 12, 00)))
    rest.setDuration(days(7))

    rest.setAmounts({
        "native.renCrv": Wei("83437.5 ether"),
        "native.sbtcCrv": Wei("83437.5 ether"),
        "native.tbtcCrv": Wei("83437.5 ether"),
        "native.badger": Wei("60000 ether"),
        "native.sushiWbtcEth": Wei("80000 ether"),
        "native.uniBadgerWbtc": Wei("80000 ether"),
        "native.sushiBadgerWbtc": Wei("80000 ether"),
        "harvest.renCrv": Wei("83437.5 ether"),
    })

    rest.testTransactions()

    rest.printState("Week 5 - Sushi Continues")

    total = rest.total
    expected = Wei("633750 ether")

    print("overall total ", total)
    print("expected total ", expected)

    assert total == expected

    console.print("\n[green] ✅ Total matches expected {} [/green]".format(
        val(expected)))
Ejemplo n.º 2
0
def get_active_rewards_schedule(badger: BadgerSystem):
    rest = RewardsSchedule(badger)
    rest.setStart(to_timestamp(datetime.datetime(2021, 5, 13, 12, 00)))
    rest.setDuration(days(7))

    # TODO: Set to read from config emissions. Emit auto-compounding events & on-chain readable data in Unified Rewards Logger.

    rest.setAmounts(emissions.active)
    rest.setTotals(emissions.active)
    return rest
Ejemplo n.º 3
0
    fragments_to_shares,
    initial_fragments_to_current_fragments,
    shares_to_fragments,
    to_digg_shares,
    val,
)
from rich import pretty
from rich.console import Console
from scripts.systems.badger_system import BadgerSystem, connect_badger
from tabulate import tabulate
from ape_safe import ApeSafe

console = Console()
pretty.install()

start = to_timestamp(datetime.datetime(2021, 7, 8, 13, 00))
duration = days(7)


def set_schedules(logger, schedules):
    for i in range(0, len(schedules)):
        schedule = schedules[i]
        logger.setUnlockSchedule(
            schedule.beneficiary,
            schedule.token,
            schedule.amount,
            schedule.start,
            schedule.end,
            schedule.duration,
        )