How arcadia-finance/arcadia-vaults works
Main Components
a) Core Vault Components:
• Vault Factory (proxy pattern)
• Vault Logic Contract (upgradeable)
• ERC-721 Token Interface (for vault representation)
b) Pricing Module System:
• Primary Price Feeds
• Derived Price Feeds
• Pricing Module Registry
c) Asset Support Layer:
• ERC20 Handler
• ERC4626 Handler
• Uniswap/Sushiswap V2 LP Handler
• Uniswap V3 LP Handler
• NFT Floor Price Handler
• AAVE aToken Handler
d) External Integrations:
• Price Oracles
• DEX Interfaces (Uniswap, Sushiswap, Curve)
• Lending Protocols (AAVE)
• NFT Marketplaces
┌─ External Layer ─────────────────────┐
• Oracles │ DEXes │ Lending │ NFT Markets │
• ┘
• ↕
┌─ Integration Layer ──────────────────┐
• Price Feeds │ Protocol Connectors │
• ┘
• ↕
┌─ Core Layer ────────────────────────┐
• Vault Logic │ Factory │ Access Control│
• ┘
• ↕
┌─ Asset Handler Layer ───────────────┐
• ERC20 │ ERC4626 │ LP │ NFT │ aToken │
• ┘
Important Relationships
a) Deployment Flow:
• User → Vault Factory → Proxy Vault Instance
• Vault Logic Contract ←→ Proxy Vault
b) Asset Management Flow:
• Vault → Asset Handlers → External Protocols
• Price Modules → Oracle/DEX Data → Vault
c) Upgrade Path:
• Governance → New Vault Logic → User Opt-in
Implementation Details
• PricingModules directory structure
• Security implementations
• Test infrastructure
• External protocol interfaces
Security boundaries
Keep the abstraction level focused on the architectural components while maintaining enough detail to show the sophisticated pricing and asset handling mechanisms that make this project unique.
Remember to indicate the flow of both assets and price data through the system, as these are crucial aspects of the vault's functionality.