Boost | IDEX-logo

Boost | IDEX

|

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/

Solidity

Evaluating

10d: 19h remaining
Max Bounty
$45,000
Rewards Pool
$45,000
Vault TVL
To be determined
Started
30 July 2024
Ended
23 August 2024
Rewards Token
USDC
nSLOC
6,000
  • Triaged by Immunefi

  • PoC required

Select the category you'd like to explore

Assets in Scope

Target
Type
Added on
Smart Contract - Smart Contract - Custodian.sol - 63
30 July 2024
Target
Type
Added on
Smart Contract - Smart Contract - EarningsEscrow.sol - 103
30 July 2024
Target
Type
Added on
Smart Contract - Smart Contract - Exchange.sol - 784
30 July 2024
Target
Type
Added on
Smart Contract - Smart Contract - Governance.sol - 368
30 July 2024
Target
Type
Added on
Websites and Applications - Testnet
30 July 2024
Target
Type
Added on
Websites and Applications - REST API
30 July 2024
Target
Type
Added on
Websites and Applications - WebSocket API
30 July 2024
Target
Type
Added on
Primacy Of Impact
Smart Contract
30 July 2024
Target
Type
Added on
Primacy Of Impact
Websites and Applications
30 July 2024
Target
Type
Added on
Smart Contract - Smart Contract - Owned.sol - 33
30 July 2024
Target
Type
Added on
Smart Contract - Smart Contract - USDCeMigrator.sol - 27
30 July 2024
Target
Type
Added on
Smart Contract - Smart Contract - ExchangeStargateV2Adapter.sol - 153
30 July 2024

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
  1. Smart Contracts: https://github.com/idexio/idex-contracts-ikon
  2. API: https://api-docs-v4.idex.io/
  • Technical education: Technical articles, ReadMe's, whitepaper, etc
  1. https://docs.idex.io/

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
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
Execute arbitrary system commands
Critical
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)
Critical
Taking down the application/website
Critical
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.
Critical
Subdomain takeover with already-connected wallet interaction
Critical
Direct theft of user funds
Critical
Malicious interactions with an already-connected wallet, such as: Modifying transaction arguments or parameters Substituting contract addresses Submitting malicious transactions
Critical
Injection of malicious HTML or XSS through metadata
High
Theft of unclaimed yield

Out of scope

Program's Out of Scope information

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