Caviar is an on-chain, gas-efficient automated market maker (AMM) protocol for trading non-fungible tokens (NFTs) with ERC20 tokens and ETH, supporting both whole and fractional amounts.
Caviar replaces the traditional order book model with liquidity pools and AMM algorithms, consisting of the following main components:
Liquidity Pools: Smart contracts that hold NFTs and associated reserve assets. Users deposit NFTs and reserve assets to provide market liquidity, earning fees from trades in the pool they contribute to.
Automated Market Maker: An algorithm that determines NFT prices within liquidity pools based on supply and demand, allowing users to trade NFTs for reserve assets without a direct buyer or seller. The algorithm adjusts NFT prices as trades occur.
Caviar offers two types of liquidity pools:
Shared Pools: A single pool for an NFT and reserve asset (e.g., ETH) open for deposits from anyone. Depositors receive LP tokens representing their pool ownership share. The shared pool uses the xy=k invariant for price adjustments, with liquidity providers earning a 1% fee for each trade. In shared pools, Caviar employs a desirability classifier that groups NFTs into categories such as floor, mid, rare, and grail based on their desirability. Each category has its own shared pool, enabling trading of an entire collection.
Custom Pools: Advanced pools created by liquidity providers with customizable parameters, such as concentrated liquidity, stolen NFT filtering, custom fee rates, flash loan support, and NFT weightings. Custom pools have a single owner (the creator), who receives an NFT representing their pool ownership. Like shared pools, liquidity providers earn fees from trades against their pool.