Compound WBTC migration: required adjustments

Compound protocol is planning to migrate cTokens from an immutable version to an upgradable one.

This new model brings a new interest rate methodology and it allows the protocol to embed new features into cTokens.

The migration plan begins with WBTC and continues with BAT, ZRX, USDC, and finally ETH.

The upgradable cWBTC contacts have already been deployed, and Legacy market migration: WBTC, Proposal 41 passed yesterday and has been already queued.

The proposal consists of switching the COMP Distribution from the old contracts to the new market.

In a couple of days, the proposed changes will be executed for the WBTC market and idleWBTC will no longer farm $COMP.

This change will not affect short-term operations: the two WBTC markets will run in parallel, with users incentivized to move to the new contracts. When the legacy market will be small enough, Compound will deprecate it.

Next Steps

The Idle community should start discussing the topic, and then the Pilot League (@salome @emixprime) could collect feedback to set up a Temperature Check.

From the tech side, new idleWBTC contracts need to be developed and deployed, implementing the cWBTC updates. The adjustment would require an on-chain proposal through a formal IIP.

:arrow_right: During this period, the idleWBTC pool will continue to accrue WBTC interests, and $COMP farming will be enabled with the proposal execution.

9 Likes

I don’t understand why they didn’t start legacy migration for a smaller market instead of a bigger one like WBTC.

Anyway, Idle side, I think we really need to implement the cWBTC updates, so I’d definitely add that point in the IIP5.

I’d like to hear more voices from the community about that, I think it’s a priority.

7 Likes

As the $COMP rewards for the WBTC Pool will stop in the next days I would favour a faster process instead of the formal IIP framework.

My suggestion to the community will be to start a snapvote ASAP and ask the community to include the necessary changes to the WBTC contract in the same IIP5 that enables IDLE rewards in the WETH pool.

9 Likes

After some tests, it seems that we cannot do this directly, by simply callling setAllAvailableTokensAndWrappers, but we have instead to make a small upgrade to the main IdleTokenGovernance contract.

The contract was not designed to support this specific use case (ie the change of the saved cToken address associated with the COMP reward) so a method is missing for updating the cToken variable here idle-contracts/IdleTokenGovernance.sol at develop · Idle-Labs/idle-contracts · GitHub

This means that the formal proposal for the new wbtc wrapper (which btw is ready and it’s the same already audited and in use for DAI and USDT) should be postponed until the new implementation for IdleTokenGovernance is ready and a proposal to set it has been executed. These changes can be bundled with others which are in the works and should be audited in April

4 Likes