Update cSUSHI cToken Implementation
01Summary
Upgrade cSUSHI cToken implementation to Solidity 0.8.6 with custom errors instead of error codes. No core logic changes intended. Implementation audited by ChainSecurity.
- Type
- contract upgrade
Key changes
- Upgrade Solidity version from previous version to 0.8.6(medium)
- Replace SafeMath and CarefulMath with Solidity 0.8 built-in checked math(medium)
- Replace custom errorCode return values with reverts and custom errors(medium)
- No intended behavior changes in successful execution paths(high)
Notable concerns
- Changes affect error handling behavior - failures will now revert instead of returning error codes
- Future cToken upgrades planned pending results of this proposal
- Multiple Solidity versions maintained in repository during transition period
Generated by Kvorum
02Description
Update cSUSHI cToken Implementation
Summary
This proposal is a patch developed by Equilibria which updates the cToken implementation contract for cSUSHI to a more recent Solidity version (0.8.6) and removes error codes in favor of reverts with custom errors. No other core logic changes are intended. The new implementation has been deployed to 0xFcB924Ae46C7DDc6ad4F873a59ad6F3b5A2e20d5
Changelog
These changes implement the following:
- Upgrade the Solidity version of the cToken and related contracts to 0.8.6 - all contracts in the repo were changed to 0.8.6 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.
It is important to note that the goal is to have no behavior changes in the happy path case, and to only move away from errorCodes and to revert in the failure case (both math errors and checks). All existing unit and scenario tests should pass with only changes to the error code cases.
More cTokens will be upgraded in a future proposal if this one passes and causes no issues.
Development
The code changes can be viewed here: Pull Request #152.
An audit was completed by the ChainSecurity Team 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 single decoded action is a standard Compound _setImplementation call on the cSUSHI cToken proxy, pointing to the new implementation address 0xFcB924Ae46C7DDc6ad4F873a59ad6F3b5A2e20d5 — this exactly matches the address given in the proposal's Summary section as the deployed patched implementation. The proposal's stated intent (swap in a new, functionally-equivalent implementation with updated Solidity version and error handling) aligns precisely with what a _setImplementation call does: it swaps the logic contract behind the cToken proxy without altering state. The allowResign=true and empty bytes arguments are standard boilerplate for this call type and not something the description would be expected to itemize. There is no other action in the calldata, and the description does not claim any additional actions (e.g., parameter changes, transfers, or role grants) beyond the implementation swap, so there's nothing extra or omitted. Confidence is high because the target address in the description is a specific, checkable Ethereum address that matches the calldata argument exactly.重
Generated by Kvorum
04Actions
- Target
- 0x4b01…c9d7
- Value
- 0 wei
- Function
- _setImplementation(address,bool,bytes)
- Arguments
{ "0": "0xFcB924Ae46C7DDc6ad4F873a59ad6F3b5A2e20d5", "1": true, "2": "0x" }- Calldata
05Tally
Summed from votes
06Voters
| Voter | Choice | % of total | Rationale | ||
|---|---|---|---|---|---|
| EA0xea6c…3bf7 | Against | 306K | 81.38% | — | 5y ago |
| 8D0x8d07…a265 | Against | 70K | 18.62% | — | 5y ago |
07Forum
No forum thread is confidently linked to this proposal.