Skip to main content

Smart Contracts

Cookbook DEX operates on two major blockchain networks: Binance Smart Chain (BSC) and Base. Below are the official contract addresses and detailed information about our smart contract architecture.

Settlement Contracts

BSC Mainnet

Network: Binance Smart Chain (BSC)
Chain ID: 56
Settlement Contract Address: 0x638C2ADdc76986E189fF98b8224a1d2B2d43a501

View on BSCScan

Base Mainnet

Network: Base
Chain ID: 8453
Settlement Contract Address: 0x4333d6e8e1a617F71E3A6C3fB0f77aa4e6097F5A

View on BaseScan

Contract Architecture

Core Components

1. Settlement Contract

The settlement contract handles:

  • Order matching and execution
  • Cross-chain message verification
  • Emergency pause functionality

2. Order Book Logic

  • Limit order management
  • Order cancellation
  • Price-time priority matching
  • Slippage protection

Security Features

Multi-Signature Control

  • 3-of-5 multi-signature wallet for critical operations
  • Timelocked upgrades (48-hour delay)
  • Emergency pause functionality

Audited Code

  • Smart contracts audited by leading security firms
  • Ongoing security monitoring
  • Bug bounty program active

Decentralized Governance

  • Community governance for protocol upgrades
  • Transparent decision-making process
  • Token holder voting rights

Integration Guide

For Developers

Reading Contract State

// BSC Contract
const bscContract = new ethers.Contract(
'0x638C2ADdc76986E189fF98b8224a1d2B2d43a501',
settlementABI,
provider
);

// Base Contract
const baseContract = new ethers.Contract(
'0x4333d6e8e1a617F71E3A6C3fB0f77aa4e6097F5A',
settlementABI,
provider
);

Placing Orders

// Example limit order
const order = {
tokenIn: '0x...',
tokenOut: '0x...',
amountIn: ethers.parseEther('1'),
amountOutMin: ethers.parseEther('1800'),
deadline: Math.floor(Date.now() / 1000) + 3600,
recipient: userAddress
};

await contract.placeLimitOrder(order);

Supported Tokens

BSC

  • BNB (Native)
  • USDT, USDC, BUSD
  • Major DeFi tokens
  • Cross-chain wrapped assets

Base

  • ETH (Native)
  • USDC, DAI
  • cbETH, wstETH
  • Major DeFi tokens

Network Information

BSC Configuration

{
"chainId": 56,
"rpcUrls": ["https://bsc-dataseed.binance.org/"],
"blockExplorerUrls": ["https://bscscan.com"],
"nativeCurrency": {
"name": "BNB",
"symbol": "BNB",
"decimals": 18
}
}

Base Configuration

{
"chainId": 8453,
"rpcUrls": ["https://mainnet.base.org"],
"blockExplorerUrls": ["https://basescan.org"],
"nativeCurrency": {
"name": "Ethereum",
"symbol": "ETH",
"decimals": 18
}
}

Risk Disclaimer

Smart contract interactions carry inherent risks. Always:

  • Verify contract addresses before interaction
  • Use reputable wallet software
  • Start with small amounts when testing
  • Understand the risks of DeFi trading

Support

For technical support or integration questions: