Cyfrin / 2024-08-tadle

Other
4 stars 9 forks source link

Tadle Protocol

Prize Pool

About the Project

Tadle is a cutting-edge pre-market infrastructure designed to unlock illiquid assets in the crypto pre-market.

Our first product, the Points Marketplace, empowers projects to unlock the liquidity and value of points systems before conducting the Token Generation Event (TGE). By facilitating seamless trading and providing a secure, trustless environment, Tadle ensures that your community can engage with your tokens and points dynamically and efficiently.

Actors

Maker
- Create buy offer
- Create sell offer
- Cancel your offer
- Abort your offer

Taker
- Place taker orders
- Relist stocks as new offers

Sell Offer Maker
- Deliver tokens during settlement

General User
- Fetch balances info
- Withdraw funds from your balances

Admin (Trust)
- Create a marketplace
- Take a marketplace offline
- Initialize system parameters, like WETH contract address, referral commission rate, etc.
- Set up collateral token list, like ETH, USDC, LINK, ankrETH, etc.
- Set `TGE` parameters for settlement, like token contract address, TGE time, etc.
- Grant privileges for users’ commission rates
- Pause all the markets

Scope (contracts)

src
├── core
│   ├── CapitalPool.sol
│   ├── DeliveryPlace.sol
│   ├── PreMarkets.sol
│   ├── SystemConfig.sol
│   └── TokenManager.sol
├── factory
│   ├── ITadleFactory.sol
│   └── TadleFactory.sol
├── interfaces
│   ├── ICapitalPool.sol
│   ├── IDeliveryPlace.sol
│   ├── IPerMarkets.sol
│   ├── ISystemConfig.sol
│   └── ITokenManager.sol
├── libraries
│   ├── MarketPlaceLibraries.sol
│   └── OfferLibraries.sol
└── storage
    ├── CapitalPoolStorage.sol
    ├── DeliveryPlaceStorage.sol
    ├── OfferStatus.sol
    ├── PerMarketsStorage.sol
    ├── SystemConfigStorage.sol
    └── TokenManagerStorage.sol

Compatibilities

Compatibilities:
  Blockchains:
      - Ethereum/Any EVM
  Tokens:
      - ETH
      - WETH
      - ERC20 (any token that follows the ERC20 standard)

Setup

Prerequisites:

forge install OpenZeppelin/openzeppelin-contracts

Build:

forge build

Tests:

forge test -vvv

Known Issues

No known issues reported.

Additional Known Issues, as detected by LightChaser, can be found here.