Smart Contract Reference

Updated June 2025

OddsForgeV2 on BNB Smart Chain

All prediction market activity on OddsForge is powered by the OddsForgeV2 smart contract, deployed on BNB Smart Chain (BSC). The smart contract handles market creation, trading (buying and selling shares), market resolution, and payout claims — all on-chain and fully transparent.

BSC was chosen for its low transaction fees, fast block times (~3 seconds), and broad wallet support, making it accessible for traders of all sizes.

Contract Address:
0xb144043806E6287851e50F24A90e00e8d5B90bB8

View on BscScan →

Key Contract Functions

The OddsForgeV2 contract exposes several core functions that drive the platform. Here is a summary of the most important ones:

buy(marketId, outcome, amount)

Purchases shares in a specific market outcome (Yes or No). The AMM calculates the number of shares you receive based on the current pool reserves and the Constant Product formula. A small fee is deducted and distributed to the liquidity pool.

sell(marketId, outcome, shares)

Sells shares back to the AMM pool. The contract calculates the payout based on the current reserves. Like buying, a small fee applies. You receive the proceeds directly in your wallet.

claimWinnings(marketId)

After a market has been resolved, holders of winning shares call this function to redeem their shares for $1.00 each. The contract verifies that the market is resolved, checks your share balance, and transfers the payout to your wallet in a single transaction.

createMarket(title, description, endDate, ...)

Creates a new prediction market with the specified parameters. This function is admin-only — it can only be called by authorized addresses. It initializes the AMM pool with the provided liquidity.

resolveMarket(marketId, outcome)

Resolves a market by recording the winning outcome on-chain. This function is also admin-only. Once called, the market is permanently settled and winning shares become redeemable.

Read functions: The contract also provides read-only functions such as getMarket, getPrice, and getUserShares that allow anyone to query market data, current prices, and individual holdings without making a transaction.

Fee Structure

A small fee is charged on each buy and sell transaction. These fees serve two purposes:

Fee rates are configured in the smart contract and are visible on-chain. The exact fee percentage is displayed on the trade confirmation screen before you submit any transaction.

Security Features

The OddsForgeV2 smart contract incorporates multiple layers of security:

Always verify the contract address: Before interacting with OddsForge, confirm that you are connected to the correct contract address: 0xb144043806E6287851e50F24A90e00e8d5B90bB8. Bookmark the official site and never interact with contracts from unverified sources.

On-Chain Transparency

One of the core advantages of OddsForge is that every trade, market creation, and resolution happens on-chain. This means:

You can view the full transaction history, contract state, and event logs for OddsForgeV2 at any time by visiting the contract page on BscScan.

Interacting with the Contract

Most users interact with the OddsForgeV2 contract through the OddsForge web application, which provides a user-friendly interface for all actions. However, advanced users can also interact directly with the contract using:

Developer resources: The contract ABI is available on BscScan under the "Contract" tab. You can use this ABI with any Web3 library to read market data or submit transactions programmatically.

Did this answer your question?