def __init__(self, badger: BadgerSystem, key):
        self.badger = badger
        self.key = key
        self.sett = badger.getSett(key)
        self.strategy = badger.getStrategy(key)
        self.controller = Controller.at(self.sett.controller())
        self.want = interface.IERC20(self.sett.token())
        self.resolver = self.init_resolver(self.strategy.getName())
        self.snaps = {}
        self.settSnaps = {}
        self.entities = {}

        assert self.want == self.strategy.want()

        # Common entities for all strategies
        self.addEntity("sett", self.sett.address)
        self.addEntity("strategy", self.strategy.address)
        self.addEntity("controller", self.controller.address)
        self.addEntity("governance", self.strategy.governance())
        self.addEntity("governanceRewards", self.controller.rewards())
        self.addEntity("strategist", self.strategy.strategist())

        destinations = self.resolver.get_strategy_destinations()
        for key, dest in destinations.items():
            self.addEntity(key, dest)
Exemplo n.º 2
0
def multisig_action(badger: BadgerSystem):
    multi = GnosisSafe(badger.opsMultisig)
    key = "native.bDiggBtcb"

    vault = badger.getSett(key)
    strategy = badger.getStrategy(key)

    multi.execute(
        MultisigTxMetadata(description="Set PoolId"),
        {"to": strategy.address, "data": strategy.setWantPid.encode_input(104)},
    )

    assert strategy.wantPid() == 104
Exemplo n.º 3
0
def single_user_harvest_flow(badger: BadgerSystem, settConfig, user):
    strategy = badger.getStrategy(settConfig["id"])
    want = interface.IERC20(registry.pancake.chefPairs.bnbBtcb)
    snap = SnapshotManager(badger, settConfig["id"])
    sett = badger.getSett(settConfig["id"])
    settKeeper = accounts.at(sett.keeper(), force=True)
    strategyKeeper = accounts.at(strategy.keeper(), force=True)
    randomUser = accounts[6]

    tendable = strategy.isTendable()

    startingBalance = want.balanceOf(user)

    depositAmount = startingBalance // 200
    assert startingBalance >= depositAmount
    assert startingBalance >= 0

    # Deposit
    want.approve(sett, MaxUint256, {"from": user})
    snap.settDeposit(depositAmount, {"from": user})

    assert want.balanceOf(sett) > 0
    print("want.balanceOf(sett)", want.balanceOf(sett))

    # Earn
    snap.settEarn({"from": settKeeper})

    if tendable:
        with brownie.reverts("onlyAuthorizedActors"):
            strategy.tend({"from": randomUser})

    numTends = 48
    timeBetweenTends = days(365) // numTends

    console.print({"numTends": numTends, "timeBetweenTends": timeBetweenTends})

    for i in range(0, numTends):
        console.print("Tend {}".format(i))
        snap.settTend({"from": strategyKeeper})
        chain.sleep(timeBetweenTends)
        chain.mine()

    with brownie.reverts("onlyAuthorizedActors"):
        strategy.harvest({"from": randomUser})

    snap.settHarvest({"from": strategyKeeper})
    def __init__(
            self,
            badger: BadgerSystem,
            snap: SnapshotManager,
            settId: str,
            seed: int = 0,  # Default seed is 0 or unset, will generate.
    ):
        self.accounts = accounts[9:]  # Use the 10th account onwards.
        # User accounts (need to be provisioned before running sim).
        self.users = []

        self.debug = True

        self.badger = badger
        self.snap = snap
        self.sett = badger.getSett(settId)
        self.strategy = badger.getStrategy(settId)
        self.want = badger.getStrategyWant(settId)
        self.settKeeper = accounts.at(self.sett.keeper(), force=True)
        self.strategyKeeper = accounts.at(self.strategy.keeper(), force=True)

        # Actors generate valid actions based on the actor type. For example,
        # user actors need to have deposited first before they can withdraw
        # (withdraw before deposit is an invalid action).
        self.actors = [
            SettKeeperActor(self, self.settKeeper),
            StrategyKeeperActor(self, self.strategyKeeper),
            ChainActor(),
        ]
        if isinstance(snap, DiggSnapshotManager):
            self.actors.append(DiggActor(self, self.badger.deployer))
        # Ordered valid actions generated by actors.
        self.actions = []

        self.state = SimulationManagerState.IDLE

        # Track seed so we can configure this value if we want to repro test failures.
        self.seed = seed
        if self.seed == 0:
            self.seed = int(time.time())
        console.print(f"initialized simulation manager with seed: {self.seed}")
        random.seed(self.seed)
        console.print("Random Seed")
        self.provisioner = self._initProvisioner(settId)
        console.print("initialization complete")
Exemplo n.º 5
0
def snap_strategy_balance(badger: BadgerSystem, key, manager):
    digg = badger.digg

    strategy = badger.getStrategy(key)
    sett = badger.getSett(key)

    want = interface.IERC20(strategy.want())
    wbtc = interface.IERC20(registry.tokens.wbtc)

    state = {
        "manager (badger)": badger.token.balanceOf(manager),
        "manager (digg)": digg.token.balanceOf(manager),
        "manager (want)": want.balanceOf(manager),
        "manager (wbtc)": wbtc.balanceOf(manager),
        "balanceOfPool": strategy.balanceOfPool(),
        "balanceOfWant": strategy.balanceOfWant(),
        "balanceOf": strategy.balanceOf(),
        "pricePerFullShare": sett.getPricePerFullShare(),
    }
    return state
Exemplo n.º 6
0
def setup_badger(badger: BadgerSystem):
    # Set paths

    key = "native.bDiggBtcb"
    sett = badger.getSett(key)
    strategy = badger.getStrategy(key)

    multi = GnosisSafe(badger.opsMultisig)

    multi.execute(
        MultisigTxMetadata(description="Set path"),
        {
            "to":
            strategy.address,
            "data":
            strategy.setTokenSwapPath.encode_input(
                registry.pancake.cake,
                strategy.token0(),
                [
                    registry.pancake.cake, registry.tokens.btcb,
                    strategy.token0()
                ],
            ),
        },
    )

    multi.execute(
        MultisigTxMetadata(description="Set path"),
        {
            "to":
            strategy.address,
            "data":
            strategy.setTokenSwapPath.encode_input(
                registry.pancake.cake,
                strategy.token1(),
                [registry.pancake.cake, registry.tokens.btcb],
            ),
        },
    )
Exemplo n.º 7
0
def init_prod_digg(badger: BadgerSystem, user):
    deployer = badger.deployer

    digg = badger.digg

    multi = GnosisSafe(badger.devMultisig)

    digg_liquidity_amount = 1000000000
    wbtc_liquidity_amount = 100000000

    print("TOKEN_LOCKER_ROLE", TOKEN_LOCKER_ROLE)
    locker_role = "0x4bf6f2cdcc8ad6c087a7a4fbecf46150b3686b71387234cac2b3e2e6dc70e345"

    # TODO: Have this as proxy in real deploy
    seederLogic = DiggSeeder.deploy({"from": deployer})

    seeder = deploy_proxy(
        "DiggSeeder",
        DiggSeeder.abi,
        seederLogic.address,
        badger.devProxyAdmin.address,
        seederLogic.initialize.encode_input(digg.diggDistributor),
        deployer,
    )

    # # Take initial liquidity from DAO
    # aragon = AragonSystem()
    # voting = aragon.getVotingAt("0xdc344bfb12522bf3fa58ef0d6b9a41256fc79a1b")

    # PROD: Configure DIGG
    digg.uFragmentsPolicy.setCpiOracle(
        digg.cpiMedianOracle,
        {"from": deployer},
    )
    digg.uFragmentsPolicy.setMarketOracle(
        digg.marketMedianOracle,
        {"from": deployer},
    )
    digg.uFragmentsPolicy.setOrchestrator(
        digg.orchestrator,
        {"from": deployer},
    )
    digg.uFragments.setMonetaryPolicy(
        digg.uFragmentsPolicy,
        {"from": deployer},
    )

    # ===== Upgrade DAOTimelock to allow voting =====
    # print(badger.logic.SimpleTimelockWithVoting.address)
    # timelockWithVotingLogic = SimpleTimelockWithVoting.at(badger.logic.SimpleTimelockWithVoting.address)
    # timelock = interface.ISimpleTimelockWithVoting(badger.daoBadgerTimelock.address)

    # multi.execute(
    #     MultisigTxMetadata(description="Upgrade DAO Badger Timelock to Allow voting",),
    #     {
    #         "to": badger.devProxyAdmin.address,
    #         "data": badger.devProxyAdmin.upgrade.encode_input(
    #             badger.daoBadgerTimelock, timelockWithVotingLogic
    #         ),
    #     },
    # )

    # # ===== Vote to move initial liquidity funds to multisig  =====
    # tx = multi.execute(
    #     MultisigTxMetadata(description="Vote on DAO Timelock from multisig",),
    #     {
    #         "to": timelock.address,
    #         "data": timelock.vote.encode_input(0, True, True)
    #     },
    # )

    # # Approve DAO voting as recipient
    # multi.execute(
    #     MultisigTxMetadata(description="Approve DAO voting as recipient",),
    #     {
    #         "to": badger.rewardsEscrow.address,
    #         "data": badger.rewardsEscrow.approveRecipient.encode_input(voting),
    #     },
    # )

    # # Vote on DAO voting as rewardsEscrow

    # before = badger.token.balanceOf(badger.rewardsEscrow)

    # tx = multi.execute(
    #     MultisigTxMetadata(description="Vote on Rewards Escrow from multisig",),
    #     {
    #         "to": badger.rewardsEscrow.address,
    #         "data": badger.rewardsEscrow.call.encode_input(
    #             voting, 0, voting.vote.encode_input(0, True, True)
    #         ),
    #     },
    # )

    # after = badger.token.balanceOf(badger.rewardsEscrow)

    # print(tx.call_trace())

    # assert after == before

    # crvRen = interface.IERC20(registry.curve.pools.renCrv.token)
    wbtc = interface.IERC20(registry.tokens.wbtc)
    # assert crvRen.balanceOf(badger.devMultisig) >= wbtc_liquidity_amount * 10 ** 10 * 2

    # crvPool = interface.ICurveZap(registry.curve.pools.renCrv.swap)

    # # crvPool.Remove_liquidity_one_coin(
    # #     wbtc_liquidity_amount * 10 ** 10, 1, wbtc_liquidity_amount
    # # )

    # # ===== Convert crvRen to wBTC on multisig =====
    # tx = multi.execute(
    #     MultisigTxMetadata(description="Withdraw crvRen for 100% WBTC",),
    #     {
    #         "to": crvPool.address,
    #         "data": crvPool.remove_liquidity_one_coin.encode_input(
    #             wbtc_liquidity_amount * 10 ** 10 * 2, 1, wbtc_liquidity_amount * 2
    #         ),
    #     },
    # )

    # assert wbtc.balanceOf(badger.devMultisig) >= wbtc_liquidity_amount * 2

    # ===== Move initial liquidity funds to Seeder =====
    multi.execute(
        MultisigTxMetadata(
            description="Transfer initial liquidity WBTC to the Seeder", ),
        {
            "to": wbtc.address,
            "data": wbtc.transfer.encode_input(seeder, 200000000),
        },
    )

    # ===== Move DIGG to Seeder =====
    digg.token.transfer(seeder, digg.token.totalSupply(), {"from": deployer})

    # ===== Move Required Badger to Seeder from RewardsEscrow =====
    multi.execute(
        MultisigTxMetadata(
            description="Move Required Badger to Seeder from RewardsEscrow", ),
        {
            "to":
            badger.rewardsEscrow.address,
            "data":
            badger.rewardsEscrow.transfer.encode_input(badger.token, seeder,
                                                       Wei("30000 ether")),
        },
    )

    # ===== Add DIGG token to all geyser distribution lists =====
    # (Also, add Seeder as approved schedule creator)
    geyser_keys = [
        "native.badger",
        "native.renCrv",
        "native.sbtcCrv",
        "native.tbtcCrv",
        "native.uniBadgerWbtc",
        "harvest.renCrv",
        "native.sushiWbtcEth",
        "native.sushiBadgerWbtc",
        "native.uniDiggWbtc",
        "native.sushiDiggWbtc",
    ]

    for key in geyser_keys:
        geyser = badger.getGeyser(key)
        print(key, geyser)
        id = multi.addTx(
            MultisigTxMetadata(
                description="Add DIGG token to distribution tokens on {} geyser"
                .format(key), ),
            {
                "to": geyser.address,
                "data": geyser.addDistributionToken.encode_input(digg.token),
            },
        )

        tx = multi.executeTx(id)

        assert geyser.hasRole(DEFAULT_ADMIN_ROLE, badger.devMultisig)

        multi.execute(
            MultisigTxMetadata(
                description="Allow Seeder to set unlock schedules on {} geyser"
                .format(key), ),
            {
                "to": geyser.address,
                "data": geyser.grantRole.encode_input(locker_role, seeder),
            },
        )

        assert geyser.hasRole(locker_role, seeder)

    # Seeder needs to have admin role to config Faucets. Remove role as part of seed.
    rewards_keys = [
        "native.digg",
        "native.uniDiggWbtc",
        "native.sushiDiggWbtc",
    ]

    for key in rewards_keys:
        rewards = badger.getSettRewards(key)
        rewards.grantRole(DEFAULT_ADMIN_ROLE, seeder, {"from": deployer})
        rewards.grantRole(DEFAULT_ADMIN_ROLE, badger.devMultisig,
                          {"from": deployer})
        rewards.renounceRole(DEFAULT_ADMIN_ROLE, deployer, {"from": deployer})

    # print(digg.token.balanceOf(deployer))
    # assert digg.token.balanceOf(deployer) == digg.token.totalSupply()
    # digg.token.transfer(seeder, digg.token.totalSupply(), {"from": deployer})
    # wbtc = interface.IERC20(token_registry.wbtc)
    # wbtc.transfer(seeder, 200000000, {"from": user})

    # ===== Seed Prep =====

    print("wbtc.balanceOf(seeder)", wbtc.balanceOf(seeder))
    assert digg.token.balanceOf(seeder) >= digg.token.totalSupply()
    assert wbtc.balanceOf(seeder) >= 200000000

    print(digg.diggDistributor.address)
    print("digg.diggDistributor", digg.diggDistributor.isOpen())
    digg.diggDistributor.transferOwnership(seeder, {"from": deployer})

    print("prePreSeed", digg.token.balanceOf(seeder))

    seeder.preSeed({"from": deployer})

    print("postPreSeed", digg.token.balanceOf(seeder))

    seeder.seed({"from": deployer})

    # seeder.transferOwnership(badger.devMultisig, {'from': deployer})

    # tx = multi.execute(
    #     MultisigTxMetadata(description="Withdraw crvRen for 100% WBTC",),
    #     {
    #         "to": seeder.address,
    #         "data": seeder.preSeed.encode_input(),
    #     },
    # )

    # seeder.initialize({"from": deployer})

    # Unpause all Setts
    setts_to_unpause = [
        "native.digg",
        "native.uniDiggWbtc",
        "native.sushiDiggWbtc",
    ]

    for key in setts_to_unpause:
        sett = badger.getSett(key)

        id = multi.addTx(
            MultisigTxMetadata(description="Unpause Sett {}".format(key), ),
            {
                "to": sett.address,
                "data": sett.unpause.encode_input(),
            },
        )

        tx = multi.executeTx(id)
        assert sett.paused() == False
Exemplo n.º 8
0
def setup_badger(badger: BadgerSystem):
    configs = {
        "native.pancakeBnbBtcb": {
            "want": registry.pancake.chefPairs.bnbBtcb,
            "token0": registry.tokens.btcb,
            "token1": registry.tokens.bnb,
            "performanceFeeStrategist": 1000,
            "performanceFeeGovernance": 1000,
            "withdrawalFee": 50,
            "wantPid": registry.pancake.chefPids.bnbBtcb,
        },
        "native.bBadgerBtcb": {
            "want": registry.pancake.chefPairs.bBadgerBtcb,
            "token0": registry.tokens.bBadger,
            "token1": registry.tokens.btcb,
            "performanceFeeStrategist": 1000,
            "performanceFeeGovernance": 1000,
            "withdrawalFee": 50,
            "wantPid": registry.pancake.chefPids.bBadgerBtcb,
        },
        "native.bDiggBtcb": {
            "want": registry.pancake.chefPairs.bDiggBtcb,
            "token0": registry.tokens.bDigg,
            "token1": registry.tokens.btcb,
            "performanceFeeStrategist": 1000,
            "performanceFeeGovernance": 1000,
            "withdrawalFee": 50,
            "wantPid": registry.pancake.chefPids.bDiggBtcb,
        },
    }

    # Set paths

    key = "native.bDiggBtcb"
    sett = badger.getSett(key)
    strategy = badger.getStrategy(key)

    multi = GnosisSafe(badger.opsMultisig)

    multi.execute(
        MultisigTxMetadata(description="Set path"),
        {
            "to":
            strategy.address,
            "data":
            strategy.setTokenSwapPath.encode_input(
                registry.pancake.cake,
                strategy.token0(),
                [
                    registry.pancake.cake, registry.tokens.btcb,
                    strategy.token0()
                ],
            ),
        },
    )

    multi.execute(
        MultisigTxMetadata(description="Set path"),
        {
            "to":
            strategy.address,
            "data":
            strategy.setTokenSwapPath.encode_input(
                registry.pancake.cake,
                strategy.token1(),
                [
                    registry.pancake.cake, registry.tokens.btcb,
                    strategy.token1()
                ],
            ),
        },
    )
Exemplo n.º 9
0
def single_user_harvest_flow(badger: BadgerSystem, sett_id, user):
    controller = badger.getController("native")
    strategy = badger.getStrategy(sett_id)
    want = interface.IERC20(strategy.want())
    snap = SnapshotManager(badger, sett_id)
    sett = badger.getSett(sett_id)
    strategist = accounts.at(strategy.strategist(), force=True)

    console.log({
        "key":
        sett_id,
        "want":
        strategy.want(),
        "token0":
        strategy.token0(),
        "token1":
        strategy.token1(),
        "path0":
        strategy.getTokenSwapPath(registry.pancake.cake, strategy.token0()),
        "path1":
        strategy.getTokenSwapPath(registry.pancake.cake, strategy.token1()),
    })

    strategist = badger.deployer
    settKeeper = accounts.at(sett.keeper(), force=True)
    strategyKeeper = accounts.at(strategy.keeper(), force=True)
    randomUser = accounts[6]

    tendable = strategy.isTendable()

    startingBalance = want.balanceOf(user)

    depositAmount = startingBalance // 200
    assert startingBalance >= depositAmount
    assert startingBalance >= 0

    # Deposit
    want.approve(sett, MaxUint256, {"from": user})
    snap.settDeposit(depositAmount, {"from": user})

    assert want.balanceOf(sett) > 0
    print("want.balanceOf(sett)", want.balanceOf(sett))

    # Earn
    snap.settEarn({"from": settKeeper})

    numTends = 48
    timeBetweenTends = days(0.5) // numTends

    console.print({"numTends": numTends, "timeBetweenTends": timeBetweenTends})

    for i in range(0, numTends):
        console.print("Tend {}".format(i))
        snap.settTend({"from": strategyKeeper})
        chain.sleep(timeBetweenTends)
        chain.mine()

    snap.settHarvest({"from": strategyKeeper})

    # if tendable:
    #     snap.settTend({"from": strategyKeeper})

    # snap.settWithdraw(depositAmount // 2, {"from": user})

    # chain.sleep(days(3))
    # chain.mine()

    # snap.settHarvest({"from": strategyKeeper})
    # snap.settWithdraw(depositAmount // 2 - 1, {"from": user})

    assert False
Exemplo n.º 10
0
def confirm_setup_rewards(badger: BadgerSystem):
    # Badger Tree
    confirm_badger_tree_params(
        badger,
        badger.badgerTree,
        DotMap(
            admin=badger.devMultisig,
            rootUpdater=badger.deployer,
            guardian=badger.deployer,
            # initialBalance=badger.initialBadgerTreeBalance,
        ),
    )

    # Rewards Escrow
    confirm_rewards_escrow_params(badger.rewardsEscrow,
                                  DotMap(owner=badger.devMultisig))

    # Badger Hunt
    confirm_badger_hunt_params(
        badger.badgerHunt,
        DotMap(
            token=badger.token,
            merkleRoot=EmptyBytes32,
            epochDuration=days(1),
            rewardReductionPerEpoch=2000,
            claimsStart=badger_config.globalStartTime,
            gracePeriod=days(2),
            rewardsEscrow=badger.rewardsEscrow,
            currentRewardRate=10000,
        ),
    )

    # Badger Geysers
    common_geyser_params = DotMap(
        tokenLockers=[badger.rewardsEscrow.address],
        admin=badger.devMultisig,
        initialDistributionToken=badger.token,
    )

    params = common_geyser_params
    params.stakingToken = badger.getSett("native.renCrv")
    confirm_badger_geyser_params(badger.getGeyser("native.renCrv"), params)

    params.stakingToken = badger.getSett("native.sbtcCrv")
    confirm_badger_geyser_params(badger.getGeyser("native.sbtcCrv"), params)

    params.stakingToken = badger.getSett("native.tbtcCrv")
    confirm_badger_geyser_params(badger.getGeyser("native.tbtcCrv"), params)

    params.stakingToken = badger.getSett("native.badger")
    confirm_badger_geyser_params(badger.getGeyser("native.badger"), params)

    params.stakingToken = badger.getSett("harvest.renCrv")
    confirm_badger_geyser_params(badger.getGeyser("harvest.renCrv"), params)

    # # Ensure staking not possible
    # for key, geyser in badger.geysers.items():
    #     with brownie.reverts("BadgerGeyser: Distribution not started"):
    #         geyser.stake(0, "0x", {"from": badger.deployer})
    #         geyser.stakeFor(0, "0x", badger.deployer, {"from": badger.deployer})

    # Badger Balances
    # Some of the initial supply is distributed to Sett special StakingRewards pools & BadgerTree
    assert (badger.token.balanceOf(
        badger.rewardsEscrow) == badger.initialRewardsEscrowBalance)

    assert (badger.token.balanceOf(
        badger.badgerHunt) == badger_config.huntParams.badgerAmount)

    assert (badger.token.balanceOf(badger.daoBadgerTimelock) ==
            badger_config.tokenLockParams.badgerLockAmount)
Exemplo n.º 11
0
def confirm_setup_sett(badger: BadgerSystem):
    common_controller_params = DotMap(
        governance=badger.deployer,
        strategist=badger.deployer,
        keeper=badger.keeper,
        onesplit=registry.onesplit.contract,
        rewards=badger.dao.agent,
    )

    # ===== Confirm Controller =====

    # Native Controller
    params = common_controller_params

    params.setts = [
        [
            badger.token,
            badger.getSett("native.badger"),
            badger.getStrategy("native.badger"),
        ],
        [
            registry.curve.pools.sbtcCrv.token,
            badger.getSett("native.sbtcCrv"),
            badger.getStrategy("native.sbtcCrv"),
        ],
        [
            registry.curve.pools.renCrv.token,
            badger.getSett("native.renCrv"),
            badger.getStrategy("native.renCrv"),
        ],
        [
            registry.curve.pools.tbtcCrv.token,
            badger.getSett("native.tbtcCrv"),
            badger.getStrategy("native.tbtcCrv"),
        ],
    ]
    print(badger.getStrategy("native.tbtcCrv"))
    confirm_controller_params(badger.getController("native"), params)

    # Harvest Controller
    params = common_controller_params
    params.setts = [[
        registry.curve.pools.renCrv.token,
        badger.getSett("harvest.renCrv"),
        badger.getStrategy("harvest.renCrv"),
    ]]
    confirm_controller_params(badger.getController("harvest"), params)

    # ===== Confirm Setts =====

    # Native Setts
    # TODO: Change governance and strategist to prod values
    common_native_sett_params = DotMap(
        governance=badger.deployer,
        strategist=AddressZero,
        keeper=badger.deployer,
        controller=badger.getController("native"),
        min=9500,
    )

    params = common_native_sett_params
    params.token = badger.token
    params.name = "Badger Sett Badger"
    params.symbol = "bBADGER"
    # params.name = "Badger Sett BadgerTest"
    # params.symbol = "bBGTEST"
    confirm_sett_params(badger.getSett("native.badger"), params)

    params = common_native_sett_params
    params.token = registry.curve.pools.sbtcCrv.token
    params.name = "Badger Sett Curve.fi renBTC/wBTC/sBTC"
    params.symbol = "bcrvRenWSBTC"
    confirm_sett_params(badger.getSett("native.sbtcCrv"), params)

    params = common_native_sett_params
    params.token = registry.curve.pools.renCrv.token
    params.name = "Badger Sett Curve.fi renBTC/wBTC"
    params.symbol = "bcrvRenWBTC"
    confirm_sett_params(badger.getSett("native.renCrv"), params)

    params = common_native_sett_params
    params.token = registry.curve.pools.tbtcCrv.token
    params.name = "Badger Sett Curve.fi tBTC/sbtcCrv"
    params.symbol = "btbtc/sbtcCrv"
    confirm_sett_params(badger.getSett("native.tbtcCrv"), params)

    # Harvest Setts
    harvest_sett_params = DotMap(
        governance=badger.deployer,
        strategist=AddressZero,
        keeper=badger.deployer,
        controller=badger.getController("harvest"),
        min=9500,
        token=registry.curve.pools.renCrv.token,
        name="Badger SuperSett (Harvest) Curve.fi renBTC/wBTC",
        symbol="bSupercrvRenWBTC",
    )
    confirm_sett_params(badger.getSett("harvest.renCrv"), harvest_sett_params)

    # ===== Confirm Strategies =====

    common_strategy_params = DotMap(
        governance=badger.deployer,
        strategist=badger.deployer,
        keeper=badger.keeper,
        controller=badger.getController("native"),
        guardian=badger.guardian,
        performanceFeeGovernance=1000,
        performanceFeeStrategist=1000,
        withdrawalFee=75,
    )

    # ===== Native Strategies =====

    # == Badger Native ==
    params = common_strategy_params
    params.name = "StrategyBadgerRewards"
    params.want = badger.token
    params.performanceFeeGovernance = 0
    params.performanceFeeStrategist = 0
    params.withdrawalFee = 0

    confirm_strategy_common_params(badger.getStrategy("native.badger"), params)

    confirm_strategy_badger_rewards_params(
        badger.getStrategy("native.badger"),
        DotMap(geyser=badger.getSettRewards("native.badger")),
    )

    # == Badger LP ==
    params = common_strategy_params
    params.name = "StrategyBadgerLpMetaFarm"
    params.want = badger.pair
    params.performanceFeeGovernance = 0
    params.performanceFeeStrategist = 0
    params.withdrawalFee = 0

    confirm_strategy_common_params(badger.getStrategy("native.uniBadgerWbtc"),
                                   params)

    confirm_strategy_badger_rewards_params(
        badger.getStrategy("native.uniBadgerWbtc"),
        DotMap(geyser=badger.getSettRewards("native.uniBadgerWbtc")),
    )

    # == Native SbtcCrv ==
    params = common_strategy_params
    params.name = "StrategyCurveGauge"
    params.want = registry.curve.pools.sbtcCrv.token
    params.performanceFeeGovernance = 1000
    params.performanceFeeStrategist = 1000
    params.withdrawalFee = 75

    confirm_strategy_common_params(badger.getStrategy("native.sbtcCrv"),
                                   params)

    params = common_strategy_params
    params.name = "StrategyCurveGauge"
    params.want = registry.curve.pools.renCrv.token
    params.performanceFeeGovernance = 1000
    params.performanceFeeStrategist = 1000
    params.withdrawalFee = 75

    confirm_strategy_common_params(badger.getStrategy("native.renCrv"), params)

    params = common_strategy_params
    params.name = "StrategyCurveGauge"
    params.want = registry.curve.pools.tbtcCrv.token
    params.performanceFeeGovernance = 1000
    params.performanceFeeStrategist = 1000
    params.withdrawalFee = 75

    confirm_strategy_common_params(badger.getStrategy("native.tbtcCrv"),
                                   params)

    # Harvest Strategies
    params.name = "StrategyHarvestMetaFarm"
    params.controller = badger.getController("harvest")
    params.want = registry.curve.pools.renCrv.token
    params.performanceFeeGovernance = 0
    params.performanceFeeStrategist = 0
    params.farmPerformanceFeeGovernance = 1000
    params.farmPerformanceFeeStrategist = 1000
    params.withdrawalFee = 75
    params.harvestVault = registry.harvest.vaults.renCrv
    params.vaultFarm = registry.harvest.farms.fRenCrv
    params.metaFarm = registry.harvest.farms.farm
    params.badgerTree = badger.badgerTree

    confirm_strategy_common_params(badger.getStrategy("harvest.renCrv"),
                                   params)
    confirm_strategy_harvest_meta_farm_params(
        badger.getStrategy("harvest.renCrv"), params)
    """
    def confirm_strategy_harvest_meta_farm_params(strategy, params):
    assert strategy.harvestVault() == params.harvestVault
    assert strategy.vaultFarm() == params.vaultFarm
    assert strategy.metaFarm() == params.metaFarm
    assert strategy.badgerTree() == params.badgerTree

    assert strategy.farm() == registry.harvest.farmToken
    assert strategy.depositHelper() == registry.harvest.depositHelper
    assert strategy.weth() == registry.tokens.weth

    assert (
        strategy.farmPerformanceFeeGovernance() == params.farmPerformanceFeeGovernance
    )
    assert (
        strategy.farmPerformanceFeeStrategist() == params.farmPerformanceFeeStrategist
    )
    """

    # Supporting Infrastructure: Rewards
    confirm_staking_rewards_params(
        badger.getSettRewards("native.badger"),
        DotMap(approvedStaker=badger.getStrategy("native.badger")),
    )

    confirm_staking_rewards_params(
        badger.getSettRewards("native.uniBadgerWbtc"),
        DotMap(approvedStaker=badger.getStrategy("native.uniBadgerWbtc")),
    )