How Betonchain Works
Betting
Market Creation
Betting is opened 5 minutes after bet positions are intitialized for a game. Betting is closed 15 minutes before game start time. These buffers are represented by uint256 public betStartBuffer
and uint256 public betEndBuffer
contract variables and are updateable.
Market Finalization
After a batch request of game results is fulfilled on-chain, corresponding bet positions are closed and locked/available user balances are adjusted based on results. Any unused collateral is freed and rolled over to new active bet positions. Any house profit is claimed at the end of an LP round. For more details on house liquidity, visit this section.
It can currently take up to ~12-24 hours after game completion for results to post and user balances to update. Please be patient!
Odds
Odds and game data is stored on-chain after requests to the Chainlink node are fulfilled. Deployed jobs request our public API endpoints and parse responses.
Response data from /chainlink
endpoints called by our contracts is all uint256
for low gas consumption.
GET https://betonchain.gg/api/chainlink/health (not called on-chain) should return the response
Fantasy
Betonchain offers accessible, secure, and trustless on-chain Fantasy contests through a dedicated Progressive Web DApp (PWDA). Contests are created and managed via protocol smart contracts. To install the app, visit https://betonchain.gg/ from your mobile device.
Contests are currently at a team-level, and transpire over various time lengths (daily, weekly, season-long, etc). These include 50/50 Matchup Winner and other types of player contests. Players create and submit their lineups along with an entry fee to participate.
The prize pool consists of all collected entry fees minus a winners fee charged by the protocol. Prize pools are evenly distributed to winners.
Winners can claim their winnings at any time. Winners and losers are finalized off-chain depending on the pool type, and are easily verifyable.
Odds and game data is available on-chain and pulled from our Chainlink consumer. For team-level fantasy contests, a player's points are determined by their selected positions' odds. For example, the underdog in a matchup would yield more points than the favored team. Winners and losers are determined based on points earned.
Users earn no points for postponed or canceled games. If a contest pool consists only of postponed or canceled games, then everyone is tied.
Contest Types
50/50 Matchup WInner
Players submit a lineup of matchup winners. Top 50% of the players win, bottom 50% lose. Ties are determined at random via Chainlink VRF. If there is an odd number of players, there will be an extra winner.
All or Nothing Matchup Winner
Players submit a lineup of matchup winners. The top player wins the entire prize pool, everyone else loses. Ties are determined at random via Chainlink VRF.
Long Tail Matchup Winner
Players submit a lineup of matchup winners. Ties are determined at random via Chainlink VRF. The prize pool distribution depends on the number of participants as follows:
Participants | Position Paid | Prize |
---|---|---|
1 | 1st | 100% |
2 - 4 | 1st and 2nd | 70% and 30% |
5 - 9 | 1st 2nd and 3rd | 50% 30% and 20% |
10 - 19 | 1st 2nd 3rd and 4th | 50% 25% 15% and 10% |
20+ | 1st 2nd 3rd 4th and 5th | 40% 25% 20% 10% and 5% |
LP Vaults
Betonchain pools liquidity in USDT, USDC and DAI. These tokens are provided by LPs and used to seed active bet positions with collateral. LPs are directly incentivized by the protocol via juice from fixed-odds. The protocol's immutable contract checks ensure potential payouts based on odds and volume on counter positions and seeded liquidity. Seeded liquidity for bet positions are managed by the Betonchain DAO and are a % of TVL in House liquidity pools to manage risk.
Betonchain can drive infinite volume (provided seeded liquidity is large enough).
If available collateral is fully used for a bet position, betting would be halted for that position (0 max bet allowed) until users, or automated betting vaults, take risk on a counter position. Betonchain is arbitrage-proof with no fees (besides inherent juice), slippage, or skew.
API
Our API aggregates consistent, accurate and real-time odds data from 11+ high volume bookies across more than a dozen sports leagues. The backend stack includes scripts that ensure attribute bindings and perform pragma optimized database operations with custom error handling and logging. Our API is written in Rust and features robust request handlers with consistent responses and powerful request routing. For more information on the API please visit the framework docs or reach out on our Discord.
Smart Contracts
Contract methods that initialize and update state variables (game results, odds, etc.) are immutable and directly pull data from the Chainlink consumer contract BetConsumer.sol. BetCore.sol interacts with child contracts and faciltiates betting on Moneylines, Over Under, Point Spread and Parlays with fund forwarding and available user balances. BetPoolDeployer.sol creates and manages on-chain fantasy pools.
Contracts emit events relevant to the scope of their functionalities, for more details please visit the Developers section.
Last updated