Freebets
A tool that enables granting freebets to any user.
The Freebet contract enables users to place freebets on any PrematchCore contract. Each freebet has specific attributes, including a denomination, expiration time, and minimum betting odds requirement.
Lifecycle
Let's consider the life cycle of a free bet, omitting technical details:
- You issue a freebet for a certain amount and with a specific deadline in the admin panel from yours freebet contract to the user's address. How-to in Distribution guide section.
- The user accesses your application's UI, sees a notification that a freebet is available to them until a certain date. How-to in Use freebets section.
- The user places a bet using the provided freebet*. (How-to in Place a bet section)
- After the event is resolved:
- If the bet wins, when the user claims their winnings (how-to in Redeem bets section), they receive a profit from the win (payout - freebet amount), and the amount of the issued freebet is returned to the freebet contract balance.
- If the bet loses, the freebet amount contributes to the revenue of the LP with your affiliate address.
* If the user fails to use the freebet by the deadline date, the freebet amount is returned to the balance of your freebet contract.
Keynotes
- Each Freebet contract is limited to a particular affiliate address to offer freebets exclusively to your customers.
- Distribution of freebets doesn't lock any liquidity before claim. You can create as much freebets as you want (even if available balance doesn't cover total amount). But we do not recommend abusing this feature: when trying to use the freebet, the customer will receive an error if the available balance is not enough.
- The Freebet distribution process is cost-effective for frontend operators (off-chain). Customers will pay the gas fees for the
bet
transaction, and the claim fee will be included as part of this process. This reduces the operational costs associated with distributing freebets. - When a freebet is used by the customer, the amount of the freebet is transferred from contract balance to LP.
- If freebet isn't claimed before expiration time, it just becomes expired, doesn't require any actions and disappears from available freebets list for the customer in rest api. Read how to use freebets in UI.
- When a freebet wins, the bettor receives only the difference between the winnings and the original bet amount. The amount of the freebet will be returned to your contract balance.
- If a freebet looses, it's accounted as a regular bet - the amount remains in the liquidity pool as a revenue.
Example of the flow:
- Top up the balance of ERC20 bet token on your freebet contract.
Let use for this example Gnosis chain, bet token is WXDAI (wrapped XDAI). - Distribute a freebet for 5 WXDAI.
Contract balance isn't changed. - The customer places a bet on an outcome with odds 1.5. Potential payout: 7.5 WXDAI.
Contract balance is reduced for bet amount - 5 WXDAI transferred to the LP. - Bet wins, after redeeming:
The customer will receive: 2.5 WXDAI.
Your freebet contract will receive: 5 WXDAI.
Start using freebets
- Request Freebet Contracts: Begin by making a request to the Azuro Protocol team (opens in a new tab) to create Freebet contracts for your use. Once approved, you will gain access to our Freebets admin panel, and your new contracts integrated into our subgraphs. As the contract owner, you have the flexibility to withdraw funds from the marketing budget at any time. Additionally, Freebet contracts will be deployed exclusively for your affiliate address, ensuring that your funds are allocated solely to your frontend.
-
Provide Liquidity: To check the liquidity balance, use the
balanceOf(freebetAddress)
function on the token contract or use UI of Freebets admin panel. You can top up your contract by simply sending tokens to your contract address, just as you would with a regular ERC-20 transfer.