
A vault is a piece of blockchain architecture used for the storage, deposit, and withdrawal of different types of cryptocurrency assets, especially in decentralized finance (DeFi) protocols. For example, when a user stakes, lends, borrows, or mints different crypto assets, a DeFi protocol must automatically exchange the correct number of assets between different parties via smart contracts. A vault mechanism can also be used to maintain a 1:1 stablecoin peg with fiat currencies by adding and removing different cryptocurrencies (often baskets of currencies) and stablecoins during times of high buy or sell pressure.