Update Mid-TVL cToken Implementations
01Summary
Update the cToken implementation contract for mid-TVL assets by upgrading to Solidity 0.8.10, removing SafeMath/CarefulMath libraries in favor of native checked math, and replacing custom error codes with reverts and custom errors. Five mid-TVL cToken proxy contracts will be upgraded to the new implementation at 0x3363BAe2Fc44dA742Df13CD3ee94b6bB868ea376.
- Type
- contract upgrade
Key changes
- Upgrade Solidity version to 0.8.10 for cToken and related contracts(medium)
- Remove SafeMath and CarefulMath libraries, relying on Solidity 0.8's native checked arithmetic(medium)
- Replace custom error code return values with reverts and custom errors for structured error handling(medium)
Notable concerns
- This is a patch for mid-TVL assets only; a final batch of cTokens will be upgraded in a future proposal
- Audits were completed by ChainSecurity and OpenZeppelin with all identified issues either fixed or out of scope
Generated by Kvorum
02Description
Update Mid-TVL cToken Implementations
Summary
This proposal is a patch developed by Equilibria which updates the cToken implementation contract for mid TVL assets. The new implementation has been deployed to 0x3363BAe2Fc44dA742Df13CD3ee94b6bB868ea376.
Changelog
These changes implement the following:
- Upgrade the Solidity version of the cToken and related contracts to 0.8.10 - all contracts in the repo were changed to 0.8.10 but only the cTokens will be upgraded as part of upcoming governance proposals. This is due to the complexity of having multiple Solidity versions in the same repo.
- Remove the usage of SafeMath and CarefulMath in favor of Solidity 0.8’s checked math - Solidity will now automatically revert when math errors occur (overflows, division by zero, etc)
- Remove the custom errorCode return values in favor of reverts and custom errors - this allows for a more structured way to deal with errors rather than enum or string comparisons.
The last batch of cTokens will be upgraded in a future proposal if this one passes and causes no issues.
The previous upgrade can be seen here: Proposal 96
Development
The code changes can be viewed here: Pull Request #152.
Audits of these changes were completed by ChainSecurity and OpenZeppelin and all issues were either fixed or out of scope for this change. For further discussion, please view the Community Forum thread.
03Mismatch analysis
The proposal states that a single new cToken implementation contract deployed at 0x3363BAe2Fc44dA742Df13CD3ee94b6bB868ea376 will be applied to mid-TVL cToken markets. All five decoded actions call the standard Compound _setImplementation(address,bool,bytes) function on five distinct cToken proxy contracts, each pointing to exactly this same implementation address with allowUpgrade=true and empty calldata. This matches the description's stated intent of upgrading multiple mid-TVL cTokens to the single new implementation. The description does not name the specific five market addresses, but this is reasonable summarization consistent with the 'mid TVL assets' framing and does not omit any financially significant or control-altering action beyond what is described. No value, target, or scope mismatches were found; the implementation address matches exactly across all actions and the description. Confidence is high because the addresses can be directly verified byte-for-byte against the calldata.
Generated by Kvorum
04Actions
- Target
- 0x95b4…325b
- Value
- 0 wei
- Function
- _setImplementation(address,bool,bytes)
- Arguments
{ "0": "0x3363BAe2Fc44dA742Df13CD3ee94b6bB868ea376", "1": true, "2": "0x" }- Calldata
- Target
- 0xface…b0c7
- Value
- 0 wei
- Function
- _setImplementation(address,bool,bytes)
- Arguments
{ "0": "0x3363BAe2Fc44dA742Df13CD3ee94b6bB868ea376", "1": true, "2": "0x" }- Calldata
- Target
- 0x70e3…e8e4
- Value
- 0 wei
- Function
- _setImplementation(address,bool,bytes)
- Arguments
{ "0": "0x3363BAe2Fc44dA742Df13CD3ee94b6bB868ea376", "1": true, "2": "0x" }- Calldata
- Target
- 0x1239…ad86
- Value
- 0 wei
- Function
- _setImplementation(address,bool,bytes)
- Arguments
{ "0": "0x3363BAe2Fc44dA742Df13CD3ee94b6bB868ea376", "1": true, "2": "0x" }- Calldata
- Target
- 0x35a1…d550
- Value
- 0 wei
- Function
- _setImplementation(address,bool,bytes)
- Arguments
{ "0": "0x3363BAe2Fc44dA742Df13CD3ee94b6bB868ea376", "1": true, "2": "0x" }- Calldata
05Tally
Summed from votes
06Voters
No votes recorded yet.
07Forum
No forum thread is confidently linked to this proposal.