MegaVault is a user-facing feature that enables dYdX users to add USDC to provide liquidity to various markets, and earn yield in return. By aggregating liquidity from users, MegaVault ensures that every market maintains the necessary liquidity for smooth and efficient trading.
Vault Mechanics
At a technical level, MegaVault will operate multiple “sub-vaults.” A sub-vault uses users' USDC to run an automated market-making strategy for a given market. Users' USDC is allocated to these sub-vaults, and the yield they generate is aggregated and distributed to users who added USDC to MegaVault.
Adding and Removing Funds
Users can add funds into MegaVault at any time and start earning yield immediately. At a high level, users can think of adding funds as owning a percentage of the vault’s net equity (i.e., the vault’s USDC and position values).
Except in the case of Instant Market Listings, users will be able to remove funds from MegaVault at any time after adding them, though they may experience slippage based on MegaVault’s status, positions, and market conditions.
Operator
For MegaVault to work effectively, it requires a dedicated operator to configure and optimize settings across all sub-vaults continuously. This includes spread parameters, skew factors, and liquidity allocation weights determining how capital is deployed across markets. The operator must monitor market and vault activity and maintain these settings in real-time to ensure optimal market efficiency while protecting vault depositor returns.
On November 21, 2024, dYdX community electedGreave as MegaVault's operator, granting it the ability to update the parameters mentioned above.
To interact with MegaVault, connect a compatible wallet such as MetaMask, Coinbase Wallet, OKX Wallet, Keplr, or many others.
3. Select USDC Amount
Enter the amount of USDC you wish to add to MegaVault. Choose an amount that aligns with your investment strategy and risk tolerance.
4. Approve and Confirm the Transaction
Approve the transaction through your wallet by signing and confirming it. Ensure you have enough funds to cover the gas fees associated with the deposit.
5. USDC is added into MegaVault
Once approved, your USDC will be added to MegaVault and start earning yield immediately.
6. Generate Passive Income
With your USDC added, MegaVault begins automated market-making activities. You’ll earn a share of the profits from MegaVault’s operations and a portion of protocol revenue. Your earnings are added to your initial balance.
8. Remove USDC Anytime
MegaVault has no lock-up periods. Adding and removing USDC are instant. Visit the MegaVault page to remove your funds whenever you like.
FAQ
Where does MegaVault yield come from?
Currently, MegaVault yield comes from profit & loss on vault positions, funding rate payments, and 50% trading fee revenue share (as approved by the dYdX community on November 15, 2024). This trading fee revenue share can be adjusted by dYdX community anytime via dYdX Chain governance.
Will I receive the MegaVault APR shown in the front-end?
The APR is an estimated representation of annualized returns based on past performance which fluctuates significantly. Increases in MegaVault TVL will likely lead to reductions in APR as more users share the protocol revenue received by MegaVault.
For example, if protocol revenue is $10 and MegaVault has a TVL of $50, MegaVault's APR will be 20% (10/50*100%) . However, if the TVL increases to $100 and the $10 revenue remains unchanged, MegaVault's APR will reduce to 10% (20/100*100%).
The APR reflects MegaVault's past 30-day performance and is not an indicator of future performance. Performance is defined as PnL, protocol fees, and any other incentives provided by the community. MegaVault's performance depends on many factors that are outside of the protocol’s control. MegaVault has no track record, and any historical performance is not indicative of future performance or actual results.
Megavault returns are also only paid out once funds are removed and are subject to slippage (discussed below), so actual returns over the period the funds are in MegaVault may vary significantly from the estimated APR shown at the time the funds were added.
How is MegaVault APR calculated?
The APR shown on the UI is calculated by taking MegaVault’s total returns over the past 30 days (or a lesser period if 30-day data is not available, such as the first month of MegaVault’s operation) and multiplying it by 365/30 (i.e., ~12) to estimate the yearly return. In the initial month of the MegaVault, for example, the APR will reflect returns during the few days the MegaVault has been operational, extrapolated to the next 12 months.
The APR is calculated as follows:
If there is 30 days of data for MegaVault:
(30 day PnL/current TVL) * (365/30)
If there is less than 30 days of data for MegaVault:
(total PnL/current TVL) * (365/number of days for which data was available)
Where,30-day PnL is calculated as follows:
current PnL of MegaVault - previous PnL of MegaVault at the beginning of the 30 period
Current TVL is calculated as follows:
the sum of all USDC held by MegaVault + current value of all positions held by MegaVault
The current value of all positions held by MegaVault is calculated by summing the value of each position.
The value of each position held by MegaVault is calculated as follows:
size of position * oracle price
PnL of MegaVault is calculated by summing (i) the profit or loss on each position held by MegaVault; (ii) the protocol fee revenue paid to MegaVault; (iii) funding rate payments made to MegaVault; and (iv) other protocol incentives paid to MegaVault.
total PnL is calculated as follows:
current PnL of MegaVault - previous PnL of MegaVault at the beginning of the period
Can you lose money by adding funds to MegaVault?
Yes. MegaVault is designed to support the protocol and not maximize returns. MegaVault’s positions may have negative trading PnL, and those losses could outweigh returns from protocol fee sharing or other sources of return.
MegaVault takes automated positions in the associated protocol and, therefore, is not a source of guaranteed positive yield. Yield depends on many factors, including market conditions, vault positions, etc.
For example, if the vault strategy has a long position in a particular market and that market’s price drops, then the value of the vault position will decrease. In this example, the user’s percent ownership of the vault remains the same (assuming no new vault entrants), but the value of the ownership decreases. Thereafter, new entrants to the vault may buy vault ownership at lower vault values and dilute existing vault owners’ claim on future fees, or future vault PnL.
When I add funds to MegaVault, where is it taken from?
MegaVault will use cross-margined funds. Thus, when you add funds to MegaVault position while having any cross-positions open, your cross margin usage will increase.
Who will custody my MegaVault position?
You. When you add funds to MegaVault, you maintain control over your funds via the private keys associated with your wallet address. The funds you add to MegaVault will automatically participate in MegaVault trading strategies, but only you can remove your funds and access your USDC.
Can anyone add funds to MegaVault?
No. If you reside in, are located in, or have a registered office in the United States, Canada, or any other prohibited jurisdiction, you may not add funds to MegaVault. dYdX open-source software is not permitted to be deployed or accessed by users in certain prohibited jurisdictions, and detailed information can be found here.
Can my position be diluted?
Yes, the number of users who may participate and the amount of funds they add to MegaVault is unlimited and each addition of funds will dilute the proportion of fee revenue and PnL attributed.
For example, if protocol revenue is $10 and MegaVault has a TVL of $50 from two users, Alice ($40) and Bob ($10):
Alice will receive 80% of MegaVault future revenues (i.e. $8), and
Bob will receive 20% of future revenues (i.e. $2).
However, if protocol revenue is unchanged at $10 and instead TVL is increased to $100 from three users, Alice ($40), Bob ($10), and Carl ($50), Alice will receive 40% of revenues (i.e. $4), Bob will receive 10% of revenues (i.e. $1), and Carl will receive 50% of revenues (i.e. $5).
Why would withdrawals incur slippage?
When withdrawing from MegaVault, “slippage” can occur due to increased leverage from collateral outflows or the need to close positions to cover withdrawal outflows.
When funds are removed, MegaVault updates traded positions and frees up assets to meet your request. Removing funds reduces the amount of collateral MegaVault holds for each sub-vault position traded and increases MegaVault's leverage. The slippage fee is in proportion to how much funds removal increases the MegaVault leverage. An estimate of the slippage amount is shown on the UI. Slippage rates can be low and may be very high. MegaVault does not provide the ability to set the slippage level when removing funds. There are no hard limits on the leverage MegaVault assumes.
The greater the impact of funds removal on MegaVault leverage, the greater your slippage fee.
For example, assume the following in each of the below scenarios:
MegaVault has a TVL of $100k
MegaVault users A, B, and C each hold $50k, $30k, and $20k, respectively.
Scenario 1 (low leverage): MegaVault has not assumed any leverage and all assets are in an idle sub-vault.
A removes $50k, A would pay a 0% slippage fee and receive $50k
Subsequently, B removes $30k, B would pay a 0% slippage fee and receive $30k
C is the final party to remove funds, C removes $20k, pays a 0% slippage fee, and receives $20k
Scenario 2 (medium leverage): MegaVault has one isolated margin sub-vault position with 1x leverage, and no balance in the main vault. The isolated margin market has an initial margin fraction of 10% and a maintenance margin fraction of 50%. The sub-vault has quoting parameters of a half-spread of 30bps and a skew of 2.
A removes $50k, A would pay a 4.9% slippage fee and receive $47,550
Subsequently, B removes $30k, B would pay a 19.06% slippage fee and receive $24,280.26
C is the final party to remove funds, C removes $20k and would pay a 35.5% slippage fee and receive $12,900.18.
Scenario 3 (high leverage): MegaVault has one isolated margin sub-vault position with 8x leverage and a balance in the main vault. The isolated margin market has an initial margin fraction of 20% and a maintenance margin fraction of 10%. The sub-vault has quoting parameters of a half-spread of 30bps and a skew of 2.
A removes $50k, A would pay a 100% slippage fee and receive $0
Subsequently, B removes $30k, B would pay a 100% slippage fee and receive $0
C is the final party to remove funds, C removes $20k and would pay a 100% slippage fee and receive $0
Will users be able to directly interact with sub-vaults?
Currently, users cannot directly deposit into or withdraw from specific sub-vaults.
How does MegaVault keep track of user’s positions?
MegaVault keeps track of the proportion of MegaVault held by each user. Below is an example of how MegaVault does this.
Example Sequence of Events
Event #1: MegaVault has a total of 0 and Alice adds $90.
Results After #1:
MegaVault total : $90
Ownership
Alice: 100%
Pre-slippage position
Alice: $90
Event #2: Bob adds $10.
Results After #2:
MegaVault total: $100
Ownerships
Alice: 90%
Bob: 10%
Pre-slippage positions
Alice: $90
Bob: $10
Event #3: MegaVault receives $10 from protocol revenue share