The Compound protocol (v2) has been evolving since its launch in 2019.
Initially, all cToken contracts were immutable; this fit well with the protocol’s reliance on an administrator (the team at Compound Labs), to give users confidence that the functionality of the protocol wouldn’t change unnecessarily. As the admin powers were weakened, and then replaced entirely by Governance, new markets were introduced with upgradable cToken contracts.
The later-generation cToken contracts have a few advantages over the immutable, original model; the ability to sweep assets into other protocols (e.g. DAI into MakerDAO’s Dai Savings Rate), vote governance tokens, recover orphaned funds, and support future/upcoming features (like supply caps).
As follows, a list of cToken models:
SAI: Immutable (deprecated)
REP: Immutable (deprecated)
The community may want to consider migrating cTokens.
Migrating a market from an immutable cToken contract, to an upgradable one, requires creating a new market for the asset. This would create a duplicate market (e.g., there are two ETH markets, with their own interest rates), which users would voluntarily migrate to. After a period of time, the original market could be deprecated.
The downside of duplicated markets include separate interest rates / incentives, chores for the ecosystem, potential user confusion, etc.
Sample Migration Process
As follows, is a sample migration process that could be used by the community, for an example asset (e.g. BAT):
- Deploy a second cBAT contract (“new”), using the latest upgradable contracts; potentially deploy an updated interest rate model
- Deploy an updated price feed proxy, to recognize new cBAT
- Create a governance proposal, that adds support for new cBAT, and the new price feed proxy; set the new cBAT collateral factor and reserve factor equal to the legacy market;
- Incentivize the migration to the new market; set the reserve factor on the legacy market to 100%, disable the COMP distribution to the legacy market, and activate the COMP distribution for the new market
- After the ecosystem has had ample time to integrate the new market, deprecate the legacy market; disable supply/borrowing (but preserve repaying/withdrawing), and set the collateral factor for the legacy market to 0%
Migrating assets is cumbersome, and the community may want to approach this slowly, e.g. not at all, or one market at a time. Interfaces, dashboards, and tooling would have to be updated to reflect the new market.
Would love others thoughts / considerations as part of this process.