DeGate
Submit a BugProgram Overview
DeGate is a decentralized orderbook exchange (DEX) built on the Ethereum blockchain that utilizes zero-knowledge technology. DeGate DEX offers spot market trading with limit orders and also offers a grid trading function.
DeGate operates as a decentralized autonomous organization (DAO). The DEX platform is focused on being user-friendly and is built on the principle of Trustlessness. With DeGate’s unique Efficient Gas Saving technology, users can expect super-low gas fees while using a decentralized protocol. Another critical component of DeGate is the Permissionless Listing feature which enables any token to be listed in a permissionless manner on DeGate’s orderbook DEX.
For more information about DeGate, please visit https://docs.degate.com/.
DeGate Testnet is currently live on https://testnet.degate.com/, and more details can be found in the product documentation (https://docs.degate.com/v/product_en/overview)
The bounty environment has been deployed on Public Testnet, whose code was open sourced on Github, along with the Protocol Specification Docs, Circuit Design Docs and Smart Contract Design Docs.
For Whitehats: It is highly recommended that you review the details of this program in full. Although many Bug Bounty Programs have standard terms and conditions, this is a Custom Program which has its own unique set of impacts and eligibility requirements.
Payouts are handled by the DeGate team directly and are denominated in USD. However, payouts are done in USDC. DeGate commits to honoring payouts according to the terms set out in this program at the time of report submission, and to treat this program as the agreement and source of truth concerning bug reports and responsible disclosures. For more information, please see Rewards by Threat Level section further down below.
Primacy of Impact vs Primacy of Rules
For the purposes of determining report validity, this is a Primacy of Impact program.
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.
Smart Contracts and Zero Knowledge Proof Circuit
Smart Contracts and Circuit - PoC, Regarding the 'Critical' level issues, the Proof of Concept (POC) for the circuit and smart contract is valid only if the white hat individuals involved can show that they can initiate and carry out attacks on their own. There is no such restriction for POCs of levels other than 'Critical'.Exceptions may be made in cases where the vulnerability is objectively evident from simply mentioning the vulnerability and where it exists. However, the bug reporter may be required to provide a PoC at any point in time.
For more information on PoCs please visit: Proof of Concept (PoC) Guidelines and Rules
All smart contracts of DeGate can be found at: https://github.com/degatedev/protocols/tree/degate1.1.0/packages/loopring_v3/contracts Due to the code submitted in GitHub commit #180138 and #5964b5 being trial-run beta code, which is structured to facilitate delayed upgradability, the effects arising from the implementation of this upgradability feature can forward to report in boosted bug bounty, see details in: https://immunefi.com/bounty/boosteddegatebugbounty/
Web/App
Web/App - Bug reports are to include a runnable Proof of Concept (PoC) in order to prove impact.
All web/app bug reports must come with a PoC with an end-effect impacting an asset-in-scope in order to be considered for a reward. All PoC content must adhere to the PoC guidelines and rules of Immunefi. In the event that a PoC requires an attack on a web/app asset provided, they must still adhere to the rules provided, otherwise eligibility for a reward may be revoked. For more information on PoCs please visit: Proof of Concept (PoC) Guidelines and Rules
Known Issue Assurance
DeGate commits to providing Known Issue Assurance to bug submissions through their program. This means that DeGate will either disclose known issues publicly, or at the very least, privately via a self-reported bug submission.
In a potential scenario of a mediation, this allows for a more objective and streamlined process, in order to prove that an issue is known. Otherwise, assuming the bug report is valid, it would result in the report being considered as in-scope, and due a reward.
Previous Audits
DeGate’s completed audit reports and known issues can be found at:
https://github.com/degatedev/protocols/blob/degate_mainnet/packages/loopring_v3/security_audit/DeGate_Report_EN-final2023.pdf (Previous code)
Any unfixed vulnerability 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, DeGate has satisfied the requirements for the Immunefi Standard Badge.
Rewards by Threat Level
Reward Distribution
Please review how rewards are distributed based on the Immunefi Vulnerability Severity Classification System V2.3. This is a simplified 4-level scale system with separate scales for Smart Contracts and Websites/Apps.
Reward Calculation for Critical Level Reports
For critical and high smart contract bugs, the reward amount is paid at a fixed rate of $1.1M and $100,000 respectively. This means than in order to qualify, the security researcher must demonstrate:
Reward of $1.1M:
- Direct theft of funds greater than $1M
- Direct permanent freezing of funds greater than $2.5M
Reward of 100K:
- Direct theft of funds less than $1M
- Direct permanent freezing of less than $2.5M
- Theft of any funds that requires malicious actions of DeGate operator
- Permanent freezing of any funds requires malicious actions of DeGate operator
Repeatable Attack Limitations
-
If the smart contract where the vulnerability exists can be upgraded or paused, only the initial attacks within the first hour 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 can not 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
- In the event of temporary freezing, the reward increases at a multiplier of two from the full frozen value for every additional 15 days that the funds are temporarily frozen, up until a max cap of the high reward. This is because as the duration of the freezing lenghents, 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.
For critical web/apps, bug reports will be rewarded with USD 100 000, only if the impact leads to a direct loss of funds without any user action required.
All other impacts that would be classified as Critical would be rewarded within the range based on demonstrated ‘non-funds at risk’ impact, at the discretion of DeGate. The rest of the severity levels are paid out according to the Impact in Scope table.
Reward Payment Terms
The calculation of the net amount rewarded is based on the average price between CoinMarketCap.com and CoinGecko.com at the time the bug report was submitted. No adjustments are made based on liquidity availability.
Smart Contract
- Critical
- Level
- USD $100,000 - $1,110,000
- Payout
- High
- Level
- USD $5,000 - $100,000
- Payout
- Medium
- Level
- USD $5,000
- Payout
- Low
- Level
- USD $1,500
- Payout
Websites and Applications
- Critical
- Level
- USD $5,000 - $100,000
- Payout
- High
- Level
- USD $2,500 - $5,000
- Payout
- Medium
- Level
- USD $2,500
- Payout
- Low
- Level
- USD $1,000
- Payout
Assets in scope
- Smart Contract - Exchange DataType
- Smart Contract - IBlock VerifierType
- Smart Contract - IDeposit ContractType
- Smart Contract - IExchange V3Type
- Smart Contract - ILoopring V3Type
- Smart Contract - Block VerifierType
- Smart Contract - Default Deposit ContractType
- Smart Contract - Exchange V3Type
- Smart Contract - Loopring V3Type
- Smart Contract - Verification KeysType
- Smart Contract - Lib ExchangeType
- Smart Contract - Lib TransactionsType
- Smart Contract - LibType
- Smart Contract - AuxType
- Smart Contract - Universal CircuitType
- Smart Contract - Base Transaction CircuitType
- Smart Contract - CircuitType
- Smart Contract - Noop CircuitType
- Smart Contract - Deposit CircuitType
- Smart Contract - Account Update CircuitType
- Smart Contract - App Key Update CircuitType
- Smart Contract - Transfer CircuitType
- Smart Contract - Withdraw CircuitType
- Smart Contract - Spot Trade CircuitType
- Smart Contract - Order Cancel CircuitType
- Smart Contract - Account GadgetsType
- Smart Contract - Batch Order GadgetsType
- Smart Contract - Matching GadgetsType
- Smart Contract - Math GadgetsType
- Smart Contract - Merkle TreeType
- Smart Contract - Order GadgetsType
- Smart Contract - Signature GadgetsType
- Smart Contract - Storage GadgetsType
- Smart Contract - ConstantsType
- TargetSmart Contract - DataType
- TargetSmart Contract - UtilsType
- TargetSmart Contract - Primacy of ImpactType
- Websites and Applications - Main WebsiteType
- Websites and Applications - Python SDKType
- Websites and Applications - Go SDKType
- Websites and Applications - Api docsType
- Websites and Applications - BackendType
- TargetWebsites and Applications - Primacy of ImpactType
Impacts only apply to assets in active use by the project like contracts on mainnet or web/app assets used in production. Any impact that applies to assets not in active use, like test or mock files, are out-of-scope of the bug bounty program unless explicitly mentioned as in-scope.
- All smart contracts of DeGate can be found at: https://github.com/degatedev/protocols/tree/degate1.1.0/packages/loopring_v3/contracts
Dev Environment and Documentation:
DeGate has included dev documentation and/or instructions to help in reviewing code and exploring for bugs:
- https://docs.degate.com/v/product_en/overview
- https://github.com/degatedev/protocols/blob/degate1.1.0/DeGate%20Protocol%20Specification%20Document.md
- https://github.com/degatedev/protocols/blob/degate1.1.0/Circuit%20Design.md
- https://github.com/degatedev/protocols/blob/degate1.1.0/Smart%20Contract%20Design.md
Impacts to other assets
Hackers are encouraged to submit issues outside of the outlined Impacts and Assets in Scope.
If whitehats can demonstrate a critical impact on code in production for an asset not in scope, DeGate encourages you to submit your bug report using the “primacy of impact exception” asset.
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.
Smart Contract
- Direct theft of funds exceeding 1,000,000 USD from the Default Deposit ContractCriticalImpact
- Permanent freezing of funds exceeding 2,500,000 USD in the Default Deposit ContractCriticalImpact
- Theft of funds from the Default Deposit Contract that requires malicious actions from the DeGate OperatorHighImpact
- Permanent freezing of funds from the Default Deposit Contract that requires malicious actions from the DeGate OperatorHighImpact
- Direct theft of user funds from the Default Deposit Contract that is less than 1,000,000 USDHighImpact
- Permanent freezing of funds in the Default Deposit Contract that is less than 2,500,000 USDHighImpact
- Force DeGate into Exodus ModeHighImpact
- Impact of this malicious contract verification through zk-proofHighImpact
- The amount of tokens in the L2 is inconsistent with that of the L1, except for Non-Standard tokens (Zero Knowledge Proof Circuit)HighImpact
- Climbing blocks fails to recovery the asset tree (Zero Knowledge Proof Circuit)HighImpact
- Temporary freezing of funds: Minimum freezing of 15 days (Zero Knowledge Proof Circuit)HighImpact
- Prevent new token from registering (Zero Knowledge Proof Circuit)HighImpact
- Steal trading fee or gas fee (Zero Knowledge Proof Circuit)HighImpact
- Prevent new users from registering (Zero Knowledge Proof Circuit)HighImpact
- The account cannot be used (Zero Knowledge Proof Circuit)HighImpact
- Theft of unclaimed yieldHighImpact
- Permanent freezing of unclaimed yieldHighImpact
- Smart contract unable to operate due to lack of token funds: Minimum 24hrsMediumImpact
- Block stuffing for profitMediumImpact
- Griefing (e.g. no profit motive for an attacker, but damage to the users or the protocol)MediumImpact
- Theft of unclaimed yieldMediumImpact
- Unbounded gas consumptionMediumImpact
- Circuit fails to work correctly, but doesn’t lose value (Zero Knowledge Proof Circuit)LowImpact
- Contract fails to deliver promised returns, but doesn't lose valueLowImpact
Websites and Applications
- Execute arbitrary system commandsCriticalImpact
- Retrieve sensitive data/files from a running server such as: /etc/shadow, database passwords, blockchain keys (this does not include non-sensitive environment variables, open source code, or usernames)CriticalImpact
- Taking state-modifying authenticated actions (with or without blockchain state interaction) on behalf of other users without any interaction by that user, such as: changing registration information, making trades, internal transfer, withdrawals, etc.CriticalImpact
- Malicious interactions with an already-connected wallet such as: modifying transaction arguments or parameters, substituting contract addresses, submitting malicious transactionsCriticalImpact
- Injecting/modifying the static content on the target application without Javascript (Persistent) such as: HTML injection without Javascript Replacing existing text with arbitrary text Arbitrary file uploads, etcHighImpact
- Changing non-sensitive details of other users (including modifying browser local storage) without already-connected wallet interaction and with up to one click of user interaction, such as: theme config, langage config, post only config, traded pairsMediumImpact
- Injecting/modifying the static content on the target application without Javascript (Reflected) such as: reflected HTML injection, loading external site dataMediumImpact
- Redirecting users to malicious websites (Open Redirect)MediumImpact
- Changing details of other users (including modifying browser local storage) without already-connected wallet interaction and with significant user interaction such as: iframing leading to modifying the backend/browser state (demonstrate impact with PoC)LowImpact
- Taking over broken or expired outgoing links such as: Social media handles, etcLowImpact
- Temporarily disabling user to access target site, such as: locking up the victim from login, cookie bombing, etcLowImpact
If whitehats can demonstrate a critical impact on code in production for an asset not in scope, DeGate encourages you to submit your bug report using the “primacy of impact exception” asset.
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
Blockchain/DLT & 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
- Impacts involving balance changes and authority freezes caused by the token contract itself, such as rebase tokens
- Impacts involving the need to use more than 300 ETH in gas fees to force entry into Exodus Mode through block stuffing, storage occupation, or executing other potential economic
Websites and Apps
- Theoretical impacts without any proof or demonstration
- Impacts involving attacks requiring physical access to the victim device
- Impacts involving attacks requiring access to the local network of the victim
- Reflected plain text injection (e.g. url parameters, path, etc.)
- This does not exclude reflected HTML injection with or without JavaScript
- This does not exclude persistent plain text injection
- Any impacts involving self-XSS
- Captcha bypass using OCR without impact demonstration
- CSRF with no state modifying security impact (e.g. logout CSRF)
- Impacts related to missing HTTP Security Headers (such as X-FRAME-OPTIONS) or cookie security flags (such as “httponly”) without demonstration of impact
- Server-side non-confidential information disclosure, such as IPs, server names, and most stack traces
- Impacts causing only the enumeration or confirmation of the existence of users or tenants
- Impacts caused by vulnerabilities requiring un-prompted, in-app user actions that are not part of the normal app workflows
- Lack of SSL/TLS best practices
- Impacts that only require DDoS
- UX and UI impacts that do not materially disrupt use of the platform
- Impacts primarily caused by browser/plugin defects
- Leakage of non sensitive API keys (e.g. Etherscan, Infura, Alchemy, etc.)
- Any vulnerability exploit requiring browser bugs for exploitation (e.g. CSP bypass)
- SPF/DMARC misconfigured records)
- Missing HTTP Headers without demonstrated impact
- Automated scanner reports without demonstrated impact
- UI/UX best practice recommendations
- Non-future-proof NFT rendering
- Vulnerabilities primarily caused by browser/plugin defects
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