Vault

Um contrato inteligente que detém e gerencia ativos digitais, tipicamente para gerar rendimento ou participar de protocolos DeFi.

Vaults são estratégias automatizadas que interagem com vários protocolos DeFi para otimizar os retornos sobre os ativos depositados. Elas empregam diferentes estratégias, como empréstimo, staking e provisão de liquidez, para gerar rendimento. Os usuários depositam seus ativos em uma vault, e o contrato inteligente da vault executa automaticamente a estratégia escolhida. Vaults abstraem as complexidades de DeFi, permitindo que os usuários ganhem renda passiva sem gerenciar ativamente seus ativos. Elas geralmente envolvem taxas de uso e desempenho.

        graph LR
  Center["Vault"]:::main
  Pre_mathematics["mathematics"]:::pre --> Center
  click Pre_mathematics "/terms/mathematics"
  Rel_smart_contracts["smart-contracts"]:::related -.-> Center
  click Rel_smart_contracts "/terms/smart-contracts"
  Rel_smart_contract["smart-contract"]:::related -.-> Center
  click Rel_smart_contract "/terms/smart-contract"
  Rel_blockchain["blockchain"]:::related -.-> Center
  click Rel_blockchain "/terms/blockchain"
  classDef main fill:#7c3aed,stroke:#8b5cf6,stroke-width:2px,color:white,font-weight:bold,rx:5,ry:5;
  classDef pre fill:#0f172a,stroke:#3b82f6,color:#94a3b8,rx:5,ry:5;
  classDef child fill:#0f172a,stroke:#10b981,color:#94a3b8,rx:5,ry:5;
  classDef related fill:#0f172a,stroke:#8b5cf6,stroke-dasharray: 5 5,color:#94a3b8,rx:5,ry:5;
  linkStyle default stroke:#4b5563,stroke-width:2px;

      

🧠 Teste de conhecimento

1 / 3

🧒 Explique como se eu tivesse 5 anos

🏦 It's like a 'smart savings account'. Instead of you manually moving your money from one bank to another to find the best interest rate, you put your money in a Vault. The Vault then automatically finds the best deals, moves the money for you, and 'compounds' the interest back into your account so it grows faster.

🤓 Expert Deep Dive

Vaults in Decentralized Finance (DeFi) represent an evolution of smart contract-based asset management, abstracting complex, multi-protocol yield optimization strategies into a single, user-friendly interface. At their core, vaults are smart contracts that implement specific, often dynamic, investment strategies. These strategies can involve a spectrum of DeFi primitives:

Lending: Depositing assets into protocols like Aave or Compound to earn interest.
Liquidity Provision (LP): Supplying assets to Automated Market Makers (AMMs) such as Uniswap or Curve, often in pairs, to earn trading fees and sometimes additional token rewards.
Staking: Locking up native tokens (e.g., ETH 2.0, or governance tokens of other protocols) to secure networks or earn protocol-specific rewards.
Leveraged Yield Farming: Utilizing borrowed assets to amplify exposure to LP positions, aiming for higher yields but also increasing risk.
* Arbitrage: Exploiting price discrepancies across different DEXs or lending platforms.

The vault contract acts as an intermediary. Users deposit assets (e.g., ETH, stablecoins) into the vault. The vault's strategy contract then interacts with other DeFi protocols, often programmatically via Solidity function calls, to deploy these assets according to its predefined logic. This logic can be deterministic or employ oracles and off-chain computation for more complex decision-making. For instance, a vault might rebalance its LP positions based on impermanent loss thresholds or shift funds between lending protocols based on prevailing APYs.

Key architectural components include:

  1. Vault Contract: Manages user deposits/withdrawals, tracks user shares (often via ERC-20 tokens representing their stake), and holds the pooled assets.
  2. Strategy Contract: Contains the specific logic for interacting with external DeFi protocols. Multiple strategy contracts can exist for a single vault type, allowing for diversification or specialized approaches.
  3. Controller/Manager Contract: Often responsible for authorizing strategy contracts to interact with the vault, managing risk parameters, and potentially triggering strategy upgrades.

A common accounting mechanism involves shares and base assets. When a user deposits X amount of base asset, they receive Y amount of share tokens. As the vault's strategy generates yield, the base asset value behind each share token increases. A withdrawal of Y share tokens would then redeem Z amount of base asset, where Z > X, reflecting the accrued profits. Fees are typically deducted from the generated yield before distribution to users, often structured as a management fee (e.g., 2% APY) and a performance fee (e.g., 20% of profits above a certain threshold).

🔗 Termos relacionados

Pré-requisitos:

📚 Fontes