IDEX is a high-performance decentralized perpetual swaps exchange. It operates on XCHAIN, an IDEX specific Arbitrum Orbit layer 2. XCHAIN's performance supports gas free and nearly instant settlement of all IDEX transactions. Positions on IDEX are collateralized by USDC bridged into XCHAIN via Stargate's Hydra protocol.
For more information about IDEX please visit https://idex.io/
Status
Select the category you'd like to explore
Assets in Scope
Impacts in Scope
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.
Whitehat Educational Resources & Technical Info
- Documentation
- Smart Contracts: https://github.com/idexio/idex-contracts-ikon
- API: https://api-docs-v4.idex.io/
- Technical education: Technical articles, ReadMe's, whitepaper, etc
Is this an upgrade of an existing system? If so, which? And what are the main differences?
No, it is a new system design.
What ERC20 / ERC721 / ERC777 / ERC1155 token standards are supported? Which are not?
IDEX supports a single whitelisted ERC20 token as collateral for deposits and withdrawals. Specifically, IDEX deposits and withdrawals are limited to Stargate v2 Hydra-wrapped USDC on XCHAIN.
What external dependencies are there?
Stargate v2 and LayerZero v2 provide bridge support for depositing and withdrawing USDC. See ExchangeStargateV2Adapter.sol. Pyth provides index and oracle pricing. See PythIndexPriceAdapter.sol and PythOraclePriceAdapter.sol.
Where might whitehats confuse out-of-scope code to be in-scope?
IDEX has multiple third party integrations and components including the Stargate/Layerzero protocol, Pyth oracle prices, and the Arbitrum Orbit layer 2 settlement network. IDEX specific components to support these integrations, e.g. the index price adapter contracts, are in scope, while any issues or exploits with the third party systems themselves (e.g. a bridge exploit) are out of scope.
Are there any unusual points about your protocol that may confuse whitehats?
IDEX employs a hybrid design where the API, order books, and the matching engine operate off chain while smart contracts custody funds and verify operations. As a result, nearly all contract functionality is permissioned. Aside from standard owner and admin wallets, a designated dispatcher wallet, also operated by IDEX, is solely responsible for submitting trade settlements, liquidations, funding payments, etc. The use of a single dispatcher wallet guarantees the settlement sequence of off-chain actions within the contracts.
Where do you suspect there may be bugs?:
There are a few key areas that deserve extra attention.
Unauthorized access to permissioned components
- Admin access (both onchain admin functions and offchain admin system access)
- Upgrade mechanism exploits
- Access to user wallet delegated key
- Ability to place orders, cancel orders, or withdraw funds without wallet signature
Trading and smart contract rules violations
- Trade settlement violating the terms of the wallet-authorized orders
- Margin requirement violations allowing wallets to exceed allowed leverage
- Balance tracking errors leading to loss of funds
What is the test suite setup information?
- See the GitHub README for test suite operation.
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.
- Issues resulting from index or oracle price manipulation.
- Issues due to very low pricing.
- Loss of unrealized profits during wallet exit withdrawals.
- Loss of withdrawn value due to old oracle pricing during exit withdrawals.
- Issues related to the USDC proxy implementation being switched to something malicious.
- EarningsEscrow.sol contract replay prevention mechanism only includes the contract’s address.
- Behavior within the stated design intent as defined in documentation.
- See the previously completed audits for identified issues.
Previous Audits
IDEX’s completed audit reports can be found at https://github.com/idexio/idex-contracts-ikon/tree/main/audits. Any unfixed vulnerabilities mentioned in these reports are not eligible for a reward.
- 0xMacro A-1
- 0xMacro B-1
- PeckShield
Direct theft of any user funds, whether at-rest or in-motion, other than unclaimed yield
Permanent freezing of funds
Protocol insolvency
Execute arbitrary system commands
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)
Taking down the application/website
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, Commenting, Voting, Making trades, Withdrawals, etc.
Subdomain takeover with already-connected wallet interaction
Direct theft of user funds
Malicious interactions with an already-connected wallet, such as: Modifying transaction arguments or parameters Substituting contract addresses Submitting malicious transactions
Injection of malicious HTML or XSS through metadata
Theft of unclaimed yield
Out of scope
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
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
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