Introduction
Compatibilities
- Solc version : 0.8.30
- Chains used : Base, Sepolia Base
- License SPDX-License-Identifier (BUSL-1.1)
Tesnet
Overview
Protocol allows users to provide liquidity, swap shares and place bets on prediction. Fees collected by activities support the system (vaults) and reward participants. A network component provides additional benefits (not define yet).
This diagram illustrates the overall functioning of the protocol, which is structured around several features :
-
1. Vault (ERC-4626) :
-
Users can deposit USDC into "Vault ERC-4626" representing prediction categories. In return, they receive "Shares X" (tokens representing their share in the vault) and can withdraw their USDC in exchange for their "Shares X".
-
The vault maintain a reserve fluctuating between 2% and 10% of the total value of USDC deposited to cover risks related to predictions (i.e. bookmaker).
-
The vault is fed by USDC generated from fees collected on prediction gains (~8%).
-
The global vault global is also fed by USDC generated from fees collected on prediction gains (~2%).
-
⁇ [To define] : Others fees collected on the protocol (e.g. swap fees, LP fees)
-
-
2. Pool balancer (weighted pool) & swap
-
Users can provide liquidity (USDC, Share X) in the "Balancer Pool" to earn fees on swaps and yield on their BPT (Balancer Pool Token).
-
We can collect fees on swap with a HookContract (not define)
-
⚠️ We need to check whether we need to take any action to make the Balancer Pool accessible on the balancer interface.
Balancer Fees
- Yield fees = 10% (on the BPT yield)
- 50% for balancer
- 50% for us + LPs
- Swap fees = 10%
- 50% for balancer
- 50% for us + LPs
The systeme is designed to be open to arbitrage bots that can regulate the pools by connecting to the Balancer API and the vault directly onchain.
-
-
3. Predictions
-
User can place bets on "Predictions" in USDC.
- Differents types of predictions are available (e.g sports, crypto, etc) managed by the centralized protocol?
-
Winners receive their winnings in USDC, minus a 20% fee for the protocol.
-
The amount won is supported by the vault linked to the prediction (or a unique vault?), which maintains a reserve to cover risks associated with predictions.
-
Admin manager
- ⚠️ We can automate the process :
- Create a vault when creating a categorie (e.g FootballTeam, BITCOIN, etc)
- Link a prediction to a category and then to the correspondant vault
- Create the balancer pool when creating a vault
- Maybe we should wait a certain balance in the vault before creating the balancer pool
CCIP
The CCIP (Cross-Chain Interoperability Protocol) is used to convert METADEXDAO from the source chain (POLYGON) to TRENDEXONE in the destination chain (BASE).