Asset Vault Creation
The Asset Vault (branded: Arcade Vault) is a holding contract that functions as a safe storage mechanism for multiple assets. Asset Vault contracts could hold any or all of ETH, ERC20s, ERC721, ERC1155, and/or CryptoPunks.
All Asset Vaults are open to loan offers. After an AssetVault is created, additional deposits are always possible by sending a given asset to the AssetVault's contract address.
- The user initializes vault creation by transacting with the VaultFactory smart contract. After the transaction is complete, the user's wallet obtains a VaultFactory token (ERC721) representing ownership of the Asset Vault.
initializeBundle(), createVault(), mint()
- The user transfers assets to the specific Asset Vault they have created.
Asset Vault Withdrawals
For security purposes, Asset Vaults are natively created with withdrawals disabled. Loans can only be initiated when withdrawals are disabled. Only the user has the ability to switch from withdraws disabled to withdrawn enabled. If a user enables withdrawals, the vault cannot be entered into a lending agreement and cannot be transferred to another user.
In the default state, deposited assets cannot be withdrawn Only after the Vault owner calls "enableWithdraw()", the state is set to a withdrawEnabled state. Withdraws cannot be disabled once enabled.
- User enables withdrawals from the AssetVault.
- The AssetVault transfers the entire balance of the specified token(s) (ETH, ERC20s, ERC721, ERC1155, and/or CryptoPunks) to the user's wallet.
withdrawERC20(), withdrawERC721(), withdrawERC1155(), withdrawETH(), withdrawPunk()
Updated 6 months ago