DEV Community

999DEX
999DEX

Posted on

I Built the First DEX on BlockDAG Blockchain — Here's What I Learned

I Built the First DEX on BlockDAG Blockchain

999DEX is live at https://999dex.com — the first native DEX on BlockDAG blockchain (Chain ID: 1404). 15 smart contracts deployed in 6 days.

Critical Gotcha: EVM Target

BlockDAG does not support the PUSH0 opcode (added in Ethereum Shanghai). Compiling with default settings silently breaks at deploy time.

Fix:

// hardhat.config.js
solidity: {
  version: "0.8.20",
  settings: {
    optimizer: { enabled: true, runs: 200 },
    evmVersion: "berlin"  // ← critical for BlockDAG
  }
}
Enter fullscreen mode Exit fullscreen mode

Bonding Curve Math

Cost to buy N tokens from position S — exact, no rounding:

cost = N × BASE_PRICE + SLOPE × (S × N + N²/2)
Enter fullscreen mode Exit fullscreen mode

36/36 unit tests passing.

Architecture

BondingCurve — fair launch phase, price discovery until 300k BDAG raised.

PoolFactory — post-graduation AMM, creates liquidity pool with raised BDAG.

FeeDistributor — automated fee split: 50% stakers / 30% treasury / 20% buyback-burn.

What We Built

  • Meme token launcher (bonding curve, fair launch)
  • AMM DEX with liquidity pools
  • Contract Studio — deploy ERC-20/NFT/DAO/Multisig/Staking/Vesting with zero code
  • Solidity IDE in-browser (compile + deploy)
  • $999 staking (earn 50% of platform fees)
  • DAO governance on-chain
  • 35 pages, all live

Contract Addresses (BlockDAG Mainnet)

Add BlockDAG to MetaMask

RPC: https://rpc.primordial.bdagscan.com | Chain ID: 1404 | Symbol: BDAG


999DEX is an independent community platform. Not affiliated with BlockDAG Network Labs.

Top comments (0)