Address publication model
| Surface | Public contract |
|---|---|
| Deployment-specific addresses | Published from the repo-owned v2/config/ethereum/addresses.json carrier; always verify the target environment before transacting |
| Protocol entrypoint | DerivaDEX uses a diamond-style contract entrypoint for protocol actions and governance-executed upgrades |
| Token contracts | DDX governance/fee flows and USDC collateral flows remain separate token surfaces |
| Zero address | 0x0000000000000000000000000000000000000000 means the surface is not active or not published for that environment |
Publication scope
This page intentionally publishes the public-facing environment set rather than every carrier environment inv2/config/ethereum/addresses.json.
| Scope rule | Public contract |
|---|---|
| Published environments on this page | derivadex, staging, and testnet |
| Other carrier environments | Additional carrier environments in addresses.json are not automatically part of the public docs contract just because they exist in the repo |
| Environment targeting | Verify both the environment label and the address set; do not rely on chain ID alone when multiple environments share the same chain |
Published environment addresses
| Environment | Chain ID | DerivaDEX diamond | Governance | DDX | USDC | Checkpoint |
|---|---|---|---|---|---|---|
derivadex | 1 | 0x6fb8aa6fc6f27e591423009194529ae126660027 | 0xbfd5a73bafc692190846e04fa7b3f22325b249c2 | 0x3A880652F47bFaa771908C07Dd8673A787dAEd3A | 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48 | 0x7e9487aa950a68bacebcf8f6ff32ed30697516a6 |
staging | 11155111 | 0xa51e331dcbe8d6f987230bcfed662aab9ce17691 | 0x4e59e84ffe91bad132d0b2e0f6e0fef79e93fb36 | 0x9755e77d5cebb77d5733a0b69aace7d346bb3037 | 0x781055cc9129e1ed1298b9e8305c3733233e984f | 0xbeab25ea000b7b0a796d92910615821af2ab4425 |
testnet | 11155111 | 0x5d1a3b4181d3cad422f404f28e9e972d0ba4dad6 | 0x159705706583ecdf5075d917070dd8d9b8e3b411 | 0x5b1049d81e29bad0ae77392276e030161fc4a4c8 | 0x9623ea5645d21fb21f94e582c683c011a76bb9d2 | 0x407880a3a16533af966e230108be286218d52df3 |
Environment targeting cautions
| Caution | Why it matters |
|---|---|
| Chain ID is not enough by itself | staging and testnet both use 11155111, so chain ID alone does not tell you which DerivaDEX address set you should target |
| Zero-address readings are environment-specific | A surface can be inactive in one environment while a related funded or checkpoint surface is live in another |
| Repo carrier beats copied snippets | Treat addresses.json as the current publication carrier instead of relying on screenshots, forum posts, or older docs copies |
Core contract surfaces
| Address key | Role | Why it matters |
|---|---|---|
derivaDEXAddress | Diamond proxy entrypoint | Use this address for protocol-facing contract interactions rather than facet implementation addresses |
governanceAddress | Governance execution surface | Relevant for DIPs, queued proposals, and executed parameter changes |
checkpointAddress | Checkpoint and settlement anchor | Relevant for public settlement verification and withdrawal eligibility |
registrationAddress | Registration and admission surface | Relevant for user onboarding and access gating |
specsAddress | Product and risk-parameter surface | Relevant for market-spec and parameter changes |
collateralAddress | Collateral-management surface | Relevant for deposits, withdrawals, and collateral bookkeeping |
stakeAddress | Governance-staking surface | Relevant for governance participation and staking-related flows |
insuranceFundAddress / fundedInsuranceFundAddress | Insurance-fund surface | Relevant for liquidation and solvency backstop behavior |
pauseAddress | Safety and pause surface | Relevant for emergency or governed market controls |
Activation caveats by environment
| Surface family | derivadex | staging | testnet | Interpretation rule |
|---|---|---|---|---|
insuranceFundAddress | non-zero | non-zero | zero | Do not assume the insurance-fund entrypoint is active in every published environment |
fundedInsuranceFundAddress | non-zero | non-zero | non-zero | A funded insurance-related surface can be present even when insuranceFundAddress itself is zero in another environment |
pauseAddress | non-zero | non-zero | non-zero | Safety-control surfaces remain environment-specific but currently published across the public set |
checkpointAddress | non-zero | non-zero | non-zero | Settlement/checkpoint verification remains environment-dependent and should be matched to the correct address set |
Diamond and ABI handling rules
- Verify the active deployment before using any address.
- Do not assume testnet, staging, and mainnet share the same addresses.
- When using diamond and facet ABIs, call the diamond proxy address rather than a facet implementation address unless a separate address key explicitly names a non-diamond surface.
- Treat repo-carried address keys as the current reference carrier; do not copy addresses from historical screenshots or older posts without checking the current environment.
Public source carriers for deeper lookup
| Need | Repo carrier |
|---|---|
| current published address set | v2/config/ethereum/addresses.json |
| diamond loupe and cut interfaces | v2/packages/protocol-harness/contracts/src/diamond/IDiamondLoupe.sol, v2/packages/protocol-harness/contracts/src/diamond/IDiamondCut.sol |
| governance facet interface and events | v2/packages/protocol-harness/contracts/src/facets/interfaces/IGovernance.sol, v2/packages/protocol-harness/contracts/src/facets/Governance.sol |
| token delegation and vote events | v2/packages/protocol-harness/contracts/src/tokens/DDX.sol |
Public lookup workflow
| If you need to confirm… | Use this first | Then validate with… |
|---|---|---|
| which address to target in one environment | the published environment table above | the matching environment entry in v2/config/ethereum/addresses.json |
| which ABI or interface to bind | the core contract surface map on this page | the relevant facet or token interface in the repo carrier |
| whether one function lives behind the diamond | the diamond rules on this page | loupe calls such as facetAddress(bytes4) against the diamond proxy |
| whether a governance action really executed | the governance process reference and public transaction evidence | governance events emitted from the deployed contracts |
ABI, facet, and event publication status
| Topic | Public contract |
|---|---|
| Diamond ABI handling | Use the diamond proxy address with the ABI or interface that matches the action you are performing |
| Facet documentation | Public docs do not yet publish one separate page for every facet implementation; treat this page as the contract map and use the linked repo-carried interfaces when you need ABI-level detail |
| Event and data structures | Public docs do not yet ship a standalone event catalog for every governance or trading facet; use the public reference pages plus the linked repo-carried interfaces and sources when event-level integration detail matters |
Gas and execution-cost note
Gas behavior on Ethereum applies to deposits, withdrawals, governance actions, checkpoints, and other on-chain contract interactions. The public docs do not yet publish a timeless gas-optimization or per-function gas-cost table, so treat any gas expectations as network- and deployment-conditional unless a current public reference says otherwise.Governance-relevant token and contract functions
| Function or concept | Public relevance |
|---|---|
delegate | Assign DDX voting power to another address |
delegateBySig | Delegate voting power through a signed message flow when supported |
getCurrentVotes | Read current voting power for an address |
checkpoints | Inspect historical vote-accounting checkpoints for governance state |