Compound Labs is in the process of developing patches to the Comptroller and CToken in order to improve gas efficiency and security.
This is in-progress work, but I wanted to share the changes publicly as soon as possible so that the community may audit them and leave feedback while in active development and testing.
Given the limited scope of the changes, we recommend a community bug bounty and peer review in place of a formal audit.
The changes are as follows:
#123: Markets with a collateral factor of 0% and borrowing paused would be considered deprecated by the Comptroller, and allowed to be completely liquidated. This allows the closure of all outstanding borrows and the removal of reserves in deprecated markets including SAI, REP, and future migrations.
#125: A gas optimization for the
claimComp function, significantly improving the gas cost of claiming COMP across multiple markets at once.
#124: Modifies the seize function to transfer 2.8% of a liquidation to cToken reserves, reducing the risk of cascading liquidations that could render the protocol insolvent. With each liquidation, the protocol’s ability to recover (or utilize reserves) increases. Note: this reduces the effective liquidator incentive to ~5%, the historical baseline.
Thank you for your review and comments!