Summary:
As the final public post before we go to an onchain vote for Compound’s bug bounty program on Immunefi, it is a great pleasure to share the bug bounty draft with the Compound DAO. We have worked with many of the delegates and have received feedback from Compound Labs on the best way to create an efficient and successful program to help secure the protocol’s code.
We would also like to update the DAO regarding the bug bounty program administrators and a new addition to the proposal.
Previous Proposal: Immunefi Bug Bounty Program for Compound Finance
The final version of the draft was created in collaboration with OpenZepellin, Dmitry from Woof, Arr00, Juanbug from PGov, Alex D, Cal Blockchain Club, and Compound Labs.
Below is a description of each sections of the draft:
- Program Overview: This informational section is a description of the protocol.
- KYC: KYC information will be collected by Immunefi and provided to the program administrators.
- Responsible Publication: This is the publication policy for Security Researchers (SRs) on publicizing any bugs that they have discovered. We have determined that “Category 3: Approval Required” is appropriate for Compound’s program.
- Primacy of Impact vs. Primacy of Rule: We concluded that Primacy of Impact would be best for Compound, but limited to Critical level findings only. This means that if an SR is able to find any of the four critical impacts (Manipulation of governance voting, Direct Theft, Permanent freezing of funds, or Protocol Insolvency) for any smart contract assets that are not in-scope of the program, they may submit a bug report.
- Proof of Concept (PoC) Requirements: Every bug submission will require a PoC by the SR. PoC is a runnable code that demonstrates that a bug/vulnerability and its impact are real without actually exploiting the vulnerability in a live environment. This will help improve the quality of every report that will be triaged by Immunefi and then reviewed by the bounty program administrators.
- Public Disclosures of Known Issues: This section pertains to any publicly known issues of Compound that will be out of scope. We have two known issues listed: Hundred Finance exploit and Disclosed Griefing Bug. If there are other publicly known issues that are reported but not listed in the draft, the program administrators will have the opportunity to provide evidence to deny the duplicate report. If there are any future known issues, we can easily add them to the program at any time after the launch. Private known issues (issues known internally) can be self-reported and kept out of scope.
- Previous Audits: Any findings from past audits will be out of scope.
- Feasibility limitations: This section lays out a set of feasibility limitations that projects should or should not cite when downgrading a bug report’s impact, severity, or payout amount. The feasibility limitations standards lists (linked above) what SRs and projects can/cannot cite when reviewing a bug report
- Immunefi Standard Badge: Immunefi’s Standard Badge is placed on programs that have the most recent, updated recommendations from Immunefi.
- Rewards by Threat Level: This section is the criteria to help determine what determines the minimum and maximum reward per Critical and High level reports
- Reward Calculations for Critical Level Report: This criteria helps determine the $1M USD reward or the $50,000 USD critical reward range. If an SR is able to exploit 10% or more of the funds-at-risk, they will be rewarded the $1M USD. A minimum reward of $50,000 USD is to be rewarded to incentivize SRs against withholding a critical bug report.
- Repeatable Attack Limitation: Immunefi refers to bug reports with an impact that occurs over multiple attacks, rather than all at once, as “repeatable attacks”. We’ve developed a standard that helps calculate the reward that would need to be issued to the SR based on the attack details, duration and/or potential blocking methods from the project.
- Reward Calculation for High Level Reports: Depending on the funds at risk, an SR will be rewarded between $10,000-$50,000 USD depending on the funds at risk.
- Temporary Freezing: The impact of 'Temporary freezing of funds’ varies significantly in how it affects a project. Users of a DEX may suffer seriously if funds are frozen for even one block, while users of a small Staking Protocol may not suffer seriously even if funds are frozen for one day. For this reason different projects have different validity and reward amount terms for this impact. That’s why we developed a standard that will help determine the final payout to the whitehat based on the vulnerability details like funds affected and the duration of the freeze.
- Assets in Scope: The assets that are listed are all contracts from V2 and V3, excluding testnet contracts, implementation contracts, and contracts owned by third parties.
- Impacts in Scope: The impacts in-scope are based off of Immmunefi’s severity classification system. NFT-related impacts were removed. Medium impact “Block stuffing” and “Unbounded gas consumption” have also been removed and will not be part of the Immunefi’s updated severity classification system releasing in the future. “Block stuffing” is a component of an attack vector and not the end impact. “Unbounded Gas Consumption” is not the end impact, which instead is the smart contract being unable to operate. Within itself, it cannot be an end impact after further evaluation.
- Out of Scope and Rules: The OOS and Rules are our default list. No adjustments have been made.
Here are all sections of the Compound’s bug bounty program draft:
Program Overview:
Compound is a protocol on the Ethereum blockchain that establishes money markets, which are pools of assets with algorithmically derived interest rates, based on the supply and demand for the asset. Suppliers (and borrowers) of an asset interact directly with the protocol, earning (and paying) a floating interest rate, without having to negotiate terms such as maturity, interest rate, or collateral with a peer or counterparty.
Each money market is unique to an Ethereum asset (such as Ether, an ERC-20 stablecoin such as DAI, or an ERC-20 utility token such as Augur), and contains a transparent and publicly-inspectable ledger, with a record of all transactions and historical interest rates.
Compound III is an EVM compatible protocol that enables supplying of crypto assets as collateral in order to borrow the base asset. Accounts can also earn interest by supplying the base asset to the protocol.
The initial deployment of Compound III is on Ethereum and the base asset is USDC.
For more information about Compound Finance, please visit https://compound.finance/
Compound DAO provides rewards in COMP, denominated in USD. For more details about the payment process, please view the Rewards by Threat Level section further below.
Governance-Run Program
Though Immunefi considers any processes around fixing the bug report to be outside the consideration of payments, it is understood that this needs to be accounted for in a DAO environment. Specifically, fixes may take more time to be implemented, and need to be fully deployed before payouts can be made due to the payment process being more transparent with DAO processes. For example, if a payout process is initiated while a bug still has not been fixed, it may provide enough information for one or more people to find the vulnerability and exploit it. Because of this, payments may be delayed until a discovered bug has been appropriately addressed.
Given the extensive DAO proposal process, all validated bug reports will be grouped into a proposal at the end of each calendar month to reduce the burden on the DAO, as well as to streamline reporting for the bug bounty program. This monthly proposal will go over each bug report due for payout and explain the impacted asset or assets, the severity level, and the actions being taken by the respective people and entities mandated by the DAO.
Immunefi’s onchain proposal for Compound’s bug bounty program and monthly proposals are sponsored by PGov. For more information about PGov, please visit PGov's Delegate Profile
KYC Requirement
Immunefi will be requesting KYC information in order to pay for successful bug submissions. The following information will be required:
- Full name
- Date of birth
- Proof of address (either a redacted bank statement with address or a recent utility bill)
- Copy of Passport or other Government issued ID
Eligibility Criteria
Security researchers who wish to participate must adhere to the rules of engagement set forth in this program and cannot be:
- On OFACs SDN list
- Official contributor, both past or present
- Employees and/or individuals closely associated with the project
- Security auditors that directly or indirectly participated in the audit review
Responsible Publication
Compound DAO adheres to category 3 - Approval Required. This Policy determines what information researchers are allowed to make public from their submitted bug reports. For more information about the category selected, please refer to our Responsible Publication page.
Primacy of Impact vs Primacy of Rules
Compound DAO adheres to the Primacy of Impact for the following impacts:
- Smart Contract - Critical
Primacy of Impact means that the impact is prioritized rather than a specific asset. This encourages security researchers to report on all bugs with an in-scope impact, even if the affected assets are not in scope. For more information, please see Best Practices: Primacy of Impact
When submitting a report on Immunefi’s dashboard, the security researcher should select the Primacy of Impact asset placeholder. If the team behind this project has multiple programs, those other programs are not covered under Primacy of Impact for this program. Instead, check if those other projects have a bug bounty program on Immunefi.
If the project has any testnet and/or mock files, those will not be covered under Primacy of Impact.
All other impacts are considered under the Primacy of Rules, which means that they are bound by the terms and conditions set within this program.
Proof of Concept (PoC) Requirements
A PoC, demonstrating the bug’s impact, is required for this program and has to comply with the Immunefi PoC Guidelines and Rules.
Public Disclosure of Known Issues
Bug reports covering previously-discovered bugs (listed below) are not eligible for a reward within this program. This includes known issues that the project is aware of but has consciously decided not to “fix”, necessary code changes, or any implemented operational mitigating procedures that can lessen potential risk.
Previous Audits
Compound Finance’s completed audit reports can be found listed below. Any unfixed vulnerabilities mentioned in these reports are not eligible for a reward.
Feasibility Limitations
The project may be receiving reports that are valid (the bug and attack vector are real) and cite assets and impacts that are in scope, but there may be obstacles or barriers to executing the attack in the real world. In other words, there is a question about how feasible the attack really is. Conversely, there may also be mitigation measures that projects can take to prevent the impact of the bug, which are not feasible or would require unconventional action and hence, should not be used as reasons for downgrading a bug’s severity.
Therefore, Immunefi has developed a set of feasibility limitation standards which by default states what security researchers, as well as projects, can or cannot cite when reviewing a bug report.
Immunefi Standard Badge
By adhering to Immunefi’s best practice recommendations, Compound Finance has satisfied the requirements for the Immunefi Standard Badge.
Rewards by Threat Level
Rewards are distributed according to the impact of the vulnerability based on the Immunefi Vulnerability Severity Classification System V2.3.
Reward Calculation for Critical Level Reports
For critical smart contract bugs, the reward amount is 10% of the funds directly affected up to a maximum of USD 1 000 000. The calculation of the amount of funds at risk is based on the time and date the bug report is submitted. However, a minimum reward of USD 50 000 is to be rewarded in order to incentivize security researchers against withholding a critical bug report.
Repeatable Attack Limitations
-
If the smart contract where the vulnerability exists can be upgraded or paused, only the initial attack will be considered for a reward. This is because the project can mitigate the risk of further exploitation by upgrading or pausing the component where the vulnerability exists. The reward amount will depend on the severity of the impact and the funds at risk.
-
For critical repeatable attacks on smart contracts that cannot be upgraded or paused, the project will consider the cumulative impact of the repeatable attacks for a reward. This is because the project cannot prevent the attacker from repeatedly exploiting the vulnerability until all funds are drained and/or other irreversible damage is done. Therefore, this warrants a reward equivalent to 10% of funds at risk, capped at the maximum critical reward.
Reward Calculation for High Level Reports
-
High vulnerabilities concerning theft or permanent freezing of unclaimed yield are rewarded within a range of USD 10 000 to USD 50 000 depending on the funds at risk, capped at the maximum high reward.
-
In the event of temporary freezing, the reward doubles from the full frozen value for every additional [24h] that the funds are temporarily frozen, up until a max cap of the high reward. This is because as the duration of the freezing lengthens, the potential for greater damage and subsequent reputational harm intensifies. Thus, by increasing the reward proportionally with the frozen duration, the project ensures stronger incentives for bug disclosure of this nature.
Category | Severity | Reward Amount | PoC Required |
---|---|---|---|
Smart Contract | Critical | USD 50 000 - USD 1 000 000 | Yes |
Smart Contract | High | USD 10 000 - USD 50 000 | Yes |
Smart Contract | Medium | USD 5 000 | Yes |
Smart Contract | Low | USD 1 000 | Yes |
Impacts in Scope:
Only the following impacts are accepted within this bug bounty program. All other impacts are not considered as in-scope, even if they affect something in the assets in scope table.
(The list of assets are not listed for this proposal due to the fact that there are over 200 contracts. We added all V2 and V3 contracts but excluded testnet contracts, implementation contracts, and contracts owned by third parties.)
Impacts in Scope
Impact | Severity level |
---|---|
Manipulation of governance voting result deviating from voted outcome and resulting in a direct change from intended effect of original results | Critical |
Direct theft of any user funds, whether at-rest or in-motion, other than unclaimed yield | Critical |
Permanent freezing of funds | Critical |
Protocol insolvency | Critical |
Theft of unclaimed yield | High |
Permanent freezing of unclaimed yield | High |
Temporary freezing of funds | High |
Smart contract unable to operate due to lack of token funds | Medium |
Griefing (e.g. no profit motive for an attacker, but damage to the users or the protocol) | Medium |
Theft of coins or tokens (e.g gas) in a smart contract intended for transaction fees | Medium |
Contract fails to deliver promised returns, but doesn’t lose value | Low |
Note: The medium impact “Theft of Gas” is worded differently from our severity classification system V2.3. Immunefi will be updating the classification system in the near future. There is not a material change in the intention of the new text from the old one, but it does solidify the definition of “gas” to remove the chance of any misunderstandings.
Out of Scope & Rules
These impacts are out of scope for this bug bounty program.
All Categories:
- Impacts requiring attacks that the reporter has already exploited themselves, leading to damage
- Impacts caused by attacks requiring access to leaked keys/credentials
- Impacts caused by attacks requiring access to privileged addresses (governance, strategist) except in such cases where the contracts are intended to have no privileged access to functions that make the attack possible
- Impacts relying on attacks involving the depegging of an external stablecoin where the attacker does not directly cause the depegging due to a bug in code
- Mentions of secrets, access tokens, API keys, private keys, etc. in Github will be considered out of scope without proof that they are in-use in production
- Best practice recommendations
- Feature requests
- Impacts on test files and configuration files unless stated otherwise in the bug bounty program
- Impacts caused by attacks requiring access to privileged addresses (including, but not limited to: governance and strategist contracts) without additional modifications to the privileges attributed
- Impacts requiring phishing or other social engineering attacks against project’s employees and/or customers
Smart Contract Specific:
- Incorrect data supplied by third party oracles
- Not to exclude oracle manipulation/flash loan attacks
- Impacts requiring basic economic and governance attacks (e.g. 51% attack)
- Lack of liquidity impacts
- Impacts from Sybil attacks
- Impacts involving centralization risks
Prohibited Activities:
- Any testing on mainnet or public testnet deployed code; all testing should be done on local-forks of either public testnet or mainnet
- Any testing with pricing oracles or third-party smart contracts
- Attempting phishing or other social engineering attacks against our employees and/or customers
- Any testing with third-party systems and applications (e.g. browser extensions) as well as websites (e.g. SSO providers, advertising networks)
- Any denial of service attacks that are executed against project assets
- Automated testing of services that generates significant amounts of traffic
- Public disclosure of an unpatched vulnerability in an embargoed bounty
Program Administrators:
After speaking to several delegates, we have determined that OpenZeppelin, Dmitry and Arr00 would be the best fit as primary program administrators of Compound’s bug bounty program; with Compound Labs’ team as secondary eyes, if a conclusion cannot be made amongst the three. At this time, this would be based on their willingness to volunteer to manage the bug bounty program. However, their role as the administrator of Compound’s program will be discussed and compensated in a future Pause Guardian compensation initiative.
KYC Inclusion to Subscription Pricing:
KYC requirement in a bug bounty program is important criteria for certain projects to avoid conflict of interest or legal matters such as SRs cannot be (on) OFACs SDN list, past/present contributor, employees or individuals closely associated with a project, or auditors that participated in one’s project. Immunefi is happy to offer 30 KYCs included in the USD 57 500 without any additional costs. Onfido is the KYC provider for Immunefi.
Once a bug report is a confirmed valid report by the program administrator, Immunefi will collect full name, copy of passport or government-issued ID, and proof of address via email to the SR. The information would be passed to the program administrators after the SR successfully completes the KYC. 14 days after we forward the data to the program administrators, Immunefi will delete the KYC information for security measures.
Final Thoughts:
I encourage everyone to review the draft and post any questions or concerns one may have regarding Compound’s bug bounty program. I am happy to help answer and explain any sections privately if one prefers. Anyone can message me in the forum or on Telegram @joe_immunefi.
Contributing Members:
- Michael Lewellen (OpenZeppelin)
- Dmitry
- Arr00
- Juanbug from PGov
- Alex D.
- Cal Blockchain Club
- Compound Labs (only feedback provided)