Forkast Knowledge Center
Platform Mechanics

Smart Contracts

14min

This section provides an overview of the core smart contracts within the Forkast prediction market architecture. Each contract plays a critical role in enabling smooth, secure, and efficient prediction market functionality.

Smart Contracts Deployed

Forkast utilizes a range of specialized smart contracts tailored to the needs of its prediction market and Web3 ecosystem. Below is an overview of these contracts, their purpose, and functionality.

ο»Ώ

The following list of contracts are deployed for supporting the operation of Forkast Prediction Market.

Gnosis Conditional Tokens

  • Purpose: Manages conditional tokens in the prediction market.
  • Functionality: Enables the creation of tokens representing future events. These tokens can be transferred between users and redeemed once event outcomes are determined.

CTF Exchange

  • Purpose: Facilitates the exchange of conditional tokens through an Order Book model.
  • Functionality: Orders for conditional tokens are created and matched offchain using a standard order book mechanism. Once matched, orders are submitted to the onchain contract for validation and execution.

Gnosis Safe Proxy

  • Purpose: Represents the user's wallet within the prediction market platform.
  • Functionality: Allows for gas-free, multi-call transactions. Users sign a message off-chain for transactions, which a relayer then submits to the Gnosis Safe Proxy contract. The contract validates and executes the transaction.
  • Note: This is a minimal proxy contract; all calls are executed via delegate calls to its implementation.

Gnosis Safe Proxy Factory

  • Purpose: Deploys Gnosis Safe Proxy contracts.
  • Functionality: Uses OpenZeppelin CREATE2, enabling the deployment and retrieval of wallet contract addresses deterministically.

Platform Credits Token

  • Purpose: Manages the Platform Credit token used on the Forkast platform.
  • Functionality: Allows users to convert Platform Credit to supported stablecoins. Once the minimum conditions are met, users can convert credits to stablecoins in their connected wallet.
  • Restriction: Only allows token transfers among whitelisted contracts within the system and from user EOA accounts to their UserWalletProxy.

MultiSend Contract

  • Purpose: A utility contract designed to streamline transaction batching for development companies managing complex operations in dApps or systems.
  • Functionality: Enables the bundling of multiple transactions into one, ensuring that all transactions succeed or none are executed. Transactions are encoded as packed bytes and processed through call or delegatecall. Particularly useful for optimizing gas costs and reducing on-chain operations in development pipelines.
  • Note: This contract should be called via delegatecall to ensure proper execution and transaction integrity.
ο»Ώ

The following list of contracts are deployed for supporting the CGX Token Ecosystem.

CGX Token Contract

  • Purpose: The primary utility token of the company and platform, designed to facilitate transactions, incentivize user engagement, and drive ecosystem growth.
  • Functionality: A fungible ERC-20 token, enabling seamless integration with various platform features such as staking and rewards distribution.
  • Note: As the backbone of the platform economy, the CGX token contract includes provisions for minting, burning, and governance to adapt to evolving ecosystem needs.

Rewards Contract

  • Purpose: Facilitates the distribution of CGX token rewards during the Token Generation Event (TGE) and subsequent incentive campaigns.
  • Functionality: Supports reward allocation to eligible users based on predefined criteria, such as activity history, staking history, etc. Utilizes signature proof verification for eligibility validation and ensures transparent and efficient reward claims.

Staking Contract

  • Purpose: Provides a robust staking mechanism for users to lock CGX tokens and earn rewards, encouraging long-term participation and platform loyalty.
  • Functionality: Allows users to stake CGX tokens with flexible lock durations and configurable reward multipliers. Tracks multiple user stakes, integrates with reward distribution mechanisms, and supports withdrawal structures for early unstaking.

Loot Box Contracts

  • Purpose: Owned and operated by LYNC World, these contracts provide CGX staking rewards in the form of Loot Boxes, adding gamification elements to user incentives.
  • Functionality: Allocates Loot Boxes as rewards based on users’ total stakes. Each loot box contains randomized rewards, which are distributed upon claiming. The contract ensures fairness through provable randomness and maintains transparency in reward allocation.
  • Note: Learn more about Loot Box functionality here.
ο»Ώ

Deployed Contracts

Below is a list of the deployed contracts, including their addresses and links to the blockchain explorer for verification.

Name

Address

Link

Platform Credits

0x5E43470EA6d946F31920b09904A51a53A4557Eb5

ο»ΏViewο»Ώ

GnosisSafe

0xb588A9b41ba6b9645E680e3A4b725240c186BDAf

ο»ΏViewο»Ώ

GnosisSafeProxyFactory

0x02f376fE3e11634A866D2087F01427B09A235599

ο»ΏViewο»Ώ

Platform Credits

0x5E43470EA6d946F31920b09904A51a53A4557Eb5

ο»ΏViewο»Ώ

ConditionalTokens

0xf74159bc0C8ef2f9660aF1B131Bea9BBa675c710

ο»ΏViewο»Ώ

CTFExchange

0x520fE655590e6feE13656590f1bE3eDf31fE099C

ο»ΏViewο»Ώ

MultiSend

0xe78e19491724e0ACdA38eCf3364a91A98fd1f33b

ο»ΏViewο»Ώ

Rewards

0x1b3c309BD7f9D9a7E2da62964AAdCd16E0B8aB8c

ο»ΏViewο»Ώ

Staking

0xff5E3520626e66b9Caa70b9d8Cef7974e520Ba76

ο»ΏViewο»Ώ

CGX Token

0x656fe582b4c6dc95c598ea54dc820eb36152e2f7

ο»ΏViewο»Ώ

Loot Box Multicall

TBD

N/A

ο»Ώ