Skip to main content

Build on top of DerivaDEX smart contracts

  1. Pick the exact DerivaDEX environment before you bind any address or ABI.
  2. Load the published address set from the current public contract reference.
  3. Bind facet ABIs to the DerivaDEX diamond proxy address rather than to facet implementation addresses.
  4. Separate contract-driven actions from API-driven market-data and sequencing workflows.
  5. Verify the result against the correct environment after every write or governance-sensitive interaction.

Start with environment targeting

  1. Open Smart Contract Addresses and Core Contract Reference.
  2. Confirm the environment label, chain ID, and contract address set match the deployment you actually intend to target.
  3. Do not rely on chain ID alone when multiple published environments share the same chain.

Bind the diamond correctly

  1. Use the DerivaDEX diamond address as the call target for protocol-facing interactions.
  2. Use the ABI or interface that matches the facet function you need, but bind it to the diamond address.
  3. Keep the interaction layer typed so selector mistakes and upgrade drift are easier to detect.

Keep the contract layer separate from market-state integration

  • use contract surfaces for on-chain actions, governance-linked operations, and settlement-adjacent reads
  • use REST for initial public market or account snapshots
  • use realtime feeds for live updates and order/account event streams
Do not treat smart-contract calls as a replacement for the public REST and realtime integration layers.

Recheck upgrade-sensitive assumptions

  1. Treat selector availability as deployment-dependent rather than timeless.
  2. Re-verify ABI and selector assumptions after upgrades or environment changes.
  3. Reconfirm that a non-zero address in the published environment set still matches the surface your integration expects.

Boundary rule

This page documents the safe public integration posture for published contract surfaces. It does not publish a complete facet-by-facet ABI catalog, private deployment workflow, or a promise that every selector is stable across all environments.

Next routes

Last modified on April 12, 2026