Debets Protocol
Welcome to the Debets Documentation
Last updated
Welcome to the Debets Documentation
Last updated
Debets Protocol is a decentralized, p2p (peer to pool) iGaming platform, where players bet against each other (Liquidity providers) instead of against a bookmaker or a Web2 casino. It is built completely on blockchain technology, and powered by smart contracts.
Debets is a permissionless system, which means that the system allows any ERC20 token holder to open a bet with their tokens. In this platform, you can become the House(adding liquidity) or be a player. Anyone can bet, provide liquidity, or create new markets at will.
Non custodial – Fully decentralized, Debets never holds users’ funds or tokens. Smart contracts manage all transactions.
Transparency – Every transaction is publicly visible and recorded on-chain.
Provably Fair – ChainLink VRF provides the players with automated and verifiable assurances directly on-chain that game and bet outcomes are provably fair and were not tampered with by the oracle, outside entities, or the Debets Protocol.
Be the House – Anyone can deposit ERC20 tokens into the Debets pool to act as the House, backing bets placed on the platform and sharing in the profits from betting activity.
Permissionless – No barriers. ERC20 holders can create or play freely.
Decentralized iGaming Operator – Developers can integrate the Debets protocol to design custom games and earn revenue from player wagers.
Anonymous– No KYC, identity checks, or sign-up process—start betting without pre-funding or personal data.
Debets Protocol represents a new paradigm in online gambling by transforming the casino model into a decentralized, community-driven protocol. By combining permissionless access, open integration for developers, and a DeFi-inspired liquidity model, Debets elevates itself from a mere casino DApp to a foundational infrastructure for Web3 gaming. The design empowers anyone to participate in the traditionally closed-off casino economy: players enjoy fair, transparent games with no need to trust an operator, while liquidity providers and game developers share in the revenue streams that were once reserved for casino owners. This aligns incentives across all participants and fosters a robust ecosystem. For Web3 developers, Debets offers a sophisticated platform to build upon – one that has solved key challenges of fairness, liquidity, and speed – allowing them to focus on creative game design and user experience. Researchers and protocol designers can study Debets as a pioneering example of how to marry decentralized finance mechanisms with gaming to achieve greater capital efficiency and decentralization of profit. In summary, Debets is setting the stage for the next generation of on-chain iGaming platforms: it is not just an application, but the backbone protocol upon which a fairer and more inclusive global gambling industry can be constructed.
Debets’ peer-to-pool model (P2Pool) fundamentally increases capital efficiency compared to traditional peer-to-peer betting or centralized houses. In a peer-to-peer wager, each bet needs a direct counterparty or a dedicated pot of capital from the house to cover that specific bet, which can leave a lot of capital idle. In Debets, however, all players draw from and contribute to a common liquidity pool. This means a single pool of funds can back many independent bets simultaneously, as long as the total risk is within the pool’s capacity. By aggregating bettors and liquidity providers, Debets ensures that capital is continuously utilized across multiple games and bets, rather than sitting dormant waiting for a matching bet. The smart contracts only accept wagers that the pool can afford to payout in the worst-case scenario​, and furthermore cap the maximum potential payout of any single bet to 1% of the pool’s total liquidity​. These safeguards prevent a scenario where one bet could ever drain the entire pool, thereby allowing the pool’s funds to be safely leveraged for concurrent betting activity.
This pooled model greatly enhances capital efficiency. For liquidity providers, every token they contribute is effectively participating in an ongoing series of bets, earning the house edge on each – analogous to an interest-bearing asset that’s constantly generating returns from user activity. There is minimal idle liquidity; even unutilized funds in the pool serve as a buffer that instills confidence for larger bets. For players, the peer-to-pool approach means there’s always liquidity to take the other side of a bet (no need to wait for a peer match), resulting in instant bet execution and settlement as long as the bet size is within limits. In summary, Debets’ P2Pool architecture optimizes the utilization of capital by shared risk pooling: many small risk exposures are combined, smoothing out outcomes and making the system more efficient and liquid. This is a direct transplant of DeFi’s liquidity pooling mechanism into iGaming, yielding a more liquid and scalable betting environment than either traditional bookmaking or on-chain peer-to-peer markets could achieve.
The Debets system is implemented through a set of smart contracts that work in unison, each handling a specific aspect of the platform’s functionality. The architecture is composed of the following key modules:
Game Logic Contracts: These are contracts deployed for each type of game, containing the bet processing, odds calculation, and outcome determination logic for that game. A game contract interacts with Chainlink VRF or other oracles to obtain random numbers or external event results, and once a result with a valid proof is received, it executes the win/loss determination and payout calculation. The game contract also allocates a portion of the wager amount as a commission to the developer and referrer according to predefined rates ​before finalizing the bet settlement.
Liquidity Pool Contracts: These contracts manage the pooled funds for a specific token. A pool contract accepts deposits from liquidity providers, mints and burns LP tokens to represent shares, and handles transferring payouts to winners or absorbing losses into the pool based on game outcomes​. Typically, each supported ERC20 token corresponds to a separate pool contract; if a new token market is introduced, a new pool contract can be deployed to support betting in that token​.
Randomness & Oracle Integration: This module encompasses the interfaces with external data sources (such as Chainlink VRF for randomness or other oracles for external events). Debets uses a VRF coordinator contract to request and retrieve secure random values​. For games based on real-world events (e.g. sports betting), the architecture can similarly incorporate other oracle feeds; the contracts are designed to accept and verify such inputs to settle bets accordingly.
Configuration & Management: When a developer deploys a new game on Debets, they can configure parameters such as the house beneficiary address (to receive the developer’s commission), the commission rates, and referral reward percentages​. These parameters are set during contract initialization and enforced by the contract logic during each bet settlement, ensuring that fees and rewards are automatically distributed to the designated addresses.
All of these contracts run on the Sonic blockchain and intercommunicate through function calls and events. For example, when a user places a bet via a front-end interface, the transaction is sent to the appropriate game logic contract. The game contract then calls the liquidity pool contract to lock an amount sufficient to cover a potential payout, triggers a randomness request, and pauses until the result returns. Once a random outcome is received, the game contract applies the predetermined logic to determine win or loss. If the player wins, the game contract instructs the liquidity pool contract to pay out the winnings to the player’s address; if the player loses, their stake remains in the pool, increasing the pool’s balance. At the same time, the contract automatically transfers the specified commission percentages to the developer’s payout address (and any referrer’s address), achieving instant revenue distribution. This modular, layered design enhances the system’s extensibility and maintainability: each contract module can be audited independently, and the modules interact through well-defined interfaces. If new game types need to be supported or new oracle data integrated in the future, the relevant module can be deployed or upgraded without affecting other parts, allowing the system to evolve in a stable manner.
Debets has chosen to deploy on the Sonic network to harness its exceptional performance, significantly enhancing user experience and positioning Web3 casinos as competitive alternatives to their Web2 counterparts. Sonic, a high-performance Layer 1 blockchain, offers extremely high TPS (transactions per second) with an average transaction fee of just $0.01, while maintaining full Ethereum Virtual Machine (EVM) compatibility.
This superior throughput and cost efficiency enable Debets to achieve settlement times of approximately 3 seconds—matching the instantaneous standards of Web2 casinos and addressing the latency issues often associated with early Web3 platforms. Sonic’s performance ensures a seamless betting and settlement experience, while its low fees reduce costs for players and liquidity providers, facilitating more efficient participation.
By leveraging Sonic, Debets empowers Web3 casinos to compete with Web2 platforms, delivering a fast, fair, and cost-effective decentralized betting experience to users.
We set out to rethink the online gambling experience, creating a Web3 decentralized application that solves the pitfalls of modern Web2 casinos. According to the American Gaming Association (AGA), commercial gaming revenue hit a record-breaking $53 billion in 2021. Yet, this massive industry remains largely controlled by centralized Web2 platforms—Debets aims to change that.