📄
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.1 Competition

The base Competition contract is an interface for tracking competition progression and results. It serves as the foundation for the other two competition types, enabling organizers to create and manage events with ease.

Function 1: start

function start() public onlyOwner whenNotLive whenNotExpired

This function starts the competition.

Name
Type
Description

(no params)

Function 2: setTeamNames

function setTeamNames(string[] calldata _names) public onlyOwner whenNotLive

This function sets the team names in the competition.

Name
Type
Description

_names

string[] calldata

Array of team names.

Function 3: completeMatch

function completeMatch(uint256 _matchId, uint8 _winningTeamId) external onlyOwner whenInProgress

This function completes a match and records the winning team.

Name
Type
Description

_matchId

uint256

The ID of the match.

_winningTeamId

uint8

The ID of the winning team.

Function 4: advanceRound

function advanceRound(uint8[] calldata _matchResults) public onlyOwner whenInProgress

This function advances the competition to the next round using the provided match results.

Name
Type
Description

_matchResults

uint8[] calldata

Array of winning team IDs.

Function 5: advanceRound

function advanceRound() public onlyOwner whenInProgress

This function advances the competition to the next round, assuming all matches are completed.

Name
Type
Description

(no params)

Function 6: getCompetitionProgression

function getCompetitionProgression() public view returns(MatchOutcome[] memory bracketProgress_)

This function returns the competition's bracket progression.

Name
Type
Description

bracketProgress_

MatchOutcome[] memory

Array of match outcomes.

Function 7: getMatchOutcome

function getMatchOutcome(uint256 _matchId) external view returns(MatchOutcome memory matchOutcome_)

This function returns the outcome of a specific match.

Name
Type
Description

_matchId

uint256

The ID of the match.

matchOutcome_

MatchOutcome memory

The match outcome.

PreviousCompetition Implementation TypesNext3.2 PredictableCompetition

Last updated 1 year ago