Contract Architecture
Saffron Vaults consist of four contract types: factories, vaults, adapters, and bearer tokens.VaultFactory / RestrictedVaultFactory
- Deploys new vaults and adapters from stored bytecode implementations
- Maintains protocol-level settings such as:
feeBps(protocol fee in basis points)feeReceiver(address receiving protocol fees)
- Registers and tracks all deployed instances with associated metadata
RestrictedVaultFactoryextendsVaultFactoryand:- Restricts all vault and adapter creation to
onlyOwner - Restricts initialization and configuration flows to
onlyOwner
- Restricts all vault and adapter creation to
UniV3Vault
- Core vault contract that coordinates fixed side and variable side deposits
- Starts automatically when both fixed and variable sides reach capacity
- Once started, funds are locked until maturity
- Enables fixed side positions to convert from
claimTokentofixedBearerTokenviaclaim()after vault start - Settles Uniswap V3 fee earnings at maturity and:
- Distributes variable side yield via
variableBearerToken - Mints protocol fees in
variableBearerToken(held by vault forfeeReceiverto claim)
- Distributes variable side yield via
- Allows early withdrawals only before the vault has started; no withdrawals after start until maturity
UniV3LimitedRangeAdapter
- Connects a vault to a specific Uniswap V3 pool over a defined tick range
- Mints, manages, and burns the Uniswap V3 position NFT on behalf of the vault
- Provides functions to:
- Add/remove liquidity
- Collect and return underlying liquidity and accumulated trading fees
- Enforces:
- Liquidity tolerance bounds (to protect against misconfiguration)
- Pool authenticity checks (ensuring the correct Uniswap V3 pool is used)
- Handles early capital return for fixed side withdrawals before the vault starts
UniV3FullRangeAdapter
- Extends
UniV3LimitedRangeAdapterwith full-range tick configuration - Automatically sets tick range to
MIN_TICKandMAX_TICKduring initialization - Provides the same functionality as
UniV3LimitedRangeAdapterbut covers the entire price range
VaultBearerToken
- ERC-20 token contract used for all vault position tokens
- Three instances created per vault:
claimToken— represents the initial fixed side depositfixedBearerToken— represents the fixed side position after claimingvariableBearerToken— represents variable side deposits and share of trading fees
- Minting and burning restricted to the owning vault contract