KVORUM
compoundSource: Compound governor bravo · #101

Update Mid-TVL cToken Implementations

executedApr 22, 2022, 12:52 AM UTCby580x589c…9a4d

01Summary

AISummary by Kvorumclaude-haiku-4-5

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
Contracts0x95b4ef2869ebd94beb4eee400a99824bf5dc325b0xface851a4921ce59e912d19329929ce6da6eb0c70x70e36f6bf80a52b3b46b3af8e106cc0ed743e8e40x12392f67bdf24fae0af363c24ac620a2f67dad860x35a18000230da775cac24873d00ff85bccded550
Generated by Kvorum
model: claude-haiku-4-5
provider: anthropic
profile: anthropic-fast-v1
prompt: v1.0
generated: 2mo ago
Read the description ↗

02Description

226 words

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

AIMismatch analysis by Kvorumclaude-sonnet-5
Consistent

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
model: claude-sonnet-5
provider: anthropic
profile: anthropic-strong-v1
prompt: v1.0
generated: 2mo ago
Review the decoded actions ↗

04Actions

5 total
#0_setImplementation(address,bool,bytes)chain 0x1
Target
0x95b4…325b
Value
0 wei
Function
_setImplementation(address,bool,bytes)
Arguments
{
  "0": "0x3363BAe2Fc44dA742Df13CD3ee94b6bB868ea376",
  "1": true,
  "2": "0x"
}
Calldata
#1_setImplementation(address,bool,bytes)chain 0x1
Target
0xface…b0c7
Value
0 wei
Function
_setImplementation(address,bool,bytes)
Arguments
{
  "0": "0x3363BAe2Fc44dA742Df13CD3ee94b6bB868ea376",
  "1": true,
  "2": "0x"
}
Calldata
#2_setImplementation(address,bool,bytes)chain 0x1
Target
0x70e3…e8e4
Value
0 wei
Function
_setImplementation(address,bool,bytes)
Arguments
{
  "0": "0x3363BAe2Fc44dA742Df13CD3ee94b6bB868ea376",
  "1": true,
  "2": "0x"
}
Calldata
#3_setImplementation(address,bool,bytes)chain 0x1
Target
0x1239…ad86
Value
0 wei
Function
_setImplementation(address,bool,bytes)
Arguments
{
  "0": "0x3363BAe2Fc44dA742Df13CD3ee94b6bB868ea376",
  "1": true,
  "2": "0x"
}
Calldata
#4_setImplementation(address,bool,bytes)chain 0x1
Target
0x35a1…d550
Value
0 wei
Function
_setImplementation(address,bool,bytes)
Arguments
{
  "0": "0x3363BAe2Fc44dA742Df13CD3ee94b6bB868ea376",
  "1": true,
  "2": "0x"
}
Calldata

05Tally

Summed from votes

Voters0
VP participating0
Outcome (current)—
Current support—

06Voters

0 total

No votes recorded yet.

07Forum

No forum thread is confidently linked to this proposal.