Documentation API Reference Tokenomics
Docs Markets Smart Contract Reference

Smart Contract Reference

Contract addresses, key functions, and technical details for developers and advanced users.

Contract Addresses

ContractAddressNetwork
OddsForge V2 (Main) 0xb144043806E6287851e50F24A90e00e8d5B90bB8 BSC Mainnet
USDC (BEP-20) 0x8AC76a51cc950d9822D68b83fE1Ad97B32Cd580d BSC Mainnet
Operator Wallet 0xEe1C01eBE7181725F0aA8dE42B1E1237941272d4 BSC Mainnet
💡
Verify on BscScan: You can view the verified contract source code at bscscan.com.

Contract Overview

The OddsForgeV2 smart contract handles all core platform operations:

PropertyValue
Solidity Version^0.8.20
Fee Rate500 bps (5%)
Token StandardBEP-20 (USDC)
Access ControlOwnable (operator-only admin functions)

Key Functions

User Functions

These functions can be called by any user:

FunctionDescriptionParameters
deposit(uint256 amount) Deposit USDC into your OddsForge account amount — USDC amount (18 decimals)
withdraw(uint256 amount) Withdraw USDC from your available balance amount — USDC amount to withdraw
placeBet(uint256 poolId, uint8 side, uint256 amount) Place a trade on a market pool poolId — market ID, side — 1 (YES) or 2 (NO), amount — trade amount

View Functions (Read-Only)

These functions don't cost gas and return data:

FunctionReturns
getUserInfo(address user) (balance, totalDeposited, totalWithdrawn, totalBets, available)
getPoolInfo(uint256 poolId) (yesPool, noPool, totalPool, status, resolvedOutcome)
getUserBets(address user, uint256 poolId) (yesBets, noBets) — user's total trades on each side
estimatePayout(uint256 poolId, uint8 side, uint256 amount) (estimatedPayout, multiplier) — projected payout if that side wins

Admin Functions (Operator Only)

These functions can only be called by the contract operator:

FunctionDescription
createPool(string title, uint256 endTime) Create a new prediction market pool
resolvePool(uint256 poolId, uint8 outcome) Resolve a market — outcome 1 (YES) or 2 (NO)
cancelPool(uint256 poolId) Cancel a market and refund all traders
withdrawFees(uint256 amount) Withdraw accumulated platform fees

Contract Events

The contract emits events for all key actions, which can be monitored on-chain:

EventEmitted WhenData
Deposited User deposits USDC user, amount
Withdrawn User withdraws USDC user, amount
BetPlaced User places a trade user, poolId, side, amount
PoolResolved Market is resolved poolId, outcome, totalPrize, fee
PoolCancelled Market is cancelled poolId

Security Considerations

⚠️
For developers: Always verify contract addresses before interacting programmatically. Use the official addresses listed on this page and verify them on BscScan.

Interacting with the Contract

You can interact with the OddsForge contract in several ways:

  1. OddsForge Website — The simplest method. All contract interactions are handled through the UI.
  2. BscScan — Go to the contract page → "Write Contract" tab to call functions directly.
  3. ethers.js / web3.js — For developers building integrations or bots:
    const contract = new ethers.Contract(
      '0xb144043806E6287851e50F24A90e00e8d5B90bB8',
      ABI,
      signer
    );
    
    // Check your info
    const info = await contract.getUserInfo(walletAddress);
    console.log('Balance:', ethers.formatUnits(info.balance, 18));