📄
BRKT.gg Whitepaper
  • BRKT Labs - The Future of Prediction Markets
  • 1.1 Overview - BRKT
  • Protocol Smart Contracts
  • 2.1 CompetitionFactory
  • 2.2 ContractRouter
  • Competition Implementation Types
  • 3.1 Competition
  • 3.2 PredictableCompetition
  • 3.3 PaidPredictableCompetition
  • Key Features
  • 4.1 Expiration Epoch
  • 4.2 Modifiable Predictions
  • 4.3 Prize Pool Sharing Mechanism
  • 4.4 Custom Entry Fee
  • 4.5 API-connected Oracle
  • Upcoming Improvements: INVKR Oracle
  • 5.1 Off-Chain Oracle for Gas Cost Reduction, Enhanced Security, and Hyper Efficient Data Storage
  • 5.2 Maximum Number of Teams and Size Constraints
  • Cross-Chain and Chain Agnostic Competition Management
  • 6.1 Utilizing CREATE3 for Deterministic Deployment
  • 7.1 Tokenomics
  • Video Walkthrough for brkt.gg
Powered by GitBook
On this page

3.3 PaidPredictableCompetition

The PaidPredictableCompetition contract extends the PredictableCompetition features by adding customizable registration fee requirements, including customizable payment tokens. This implementation enables organizers to monetize their events while providing additional incentives for participants.

Function 1: createBracketPrediction

function createBracketPrediction(address _registrant, uint8[] calldata _matchPredictions) public override(PredictableCompetition, IPaidPredictableCompetition) whenNotLive

This function allows users to create a bracket prediction and handles the registration fee payment.

Name
Type
Description

_registrant

address

The address of the user creating the bracket prediction

_matchPredictions

uint8[]

An array containing the user's match predictions

Function 2: createBracketPredictionGasToken

function createBracketPredictionGasToken(address _registrant, uint8[] calldata _matchPredictions) external payable override whenNotLive

This function allows users to create a bracket prediction and handles the registration fee payment using gas token.

Name
Type
Description

_registrant

address

The address of the user creating the bracket prediction

_matchPredictions

uint8[]

An array containing the user's match predictions

Function 3: refundRegistrationFee

function refundRegistrationFee() external override whenExpired

This function allows users to request a refund of their registration fee when the competition has expired.

Function 4: claimRewards

function claimRewards() external override whenCompleted

This function allows users to claim their rewards when the competition is completed.

Function 5: calculatePendingRewards

function calculatePendingRewards(address _user) public view override returns(uint256 pendingRewards_)

This function calculates the pending rewards for a user.

Name
Type
Description

_user

address

The address of the user

Function 6: getBracketPredictionFeeInfo

function getBracketPredictionFeeInfo() external view override returns(RegistrationFeeInfo memory)

This function returns the registration fee information for bracket predictions.

Previous3.2 PredictableCompetitionNextKey Features

Last updated 1 year ago