Comment on page
An Arcadia Margin account (also named an Arcadia Vault in technical documentation) is a user-owned on-chain account that has two main functionalities: it holds a user's deposited and borrowed funds and it executes logic (withdraw, swap assets, borrow...).
In practice, it is a combination of two smart contracts: a proxy contract (ERC-1967) and a vault logic contract. We use a separate contract for each of the two functionalities mentioned above.
There are two reasons we use a proxy pattern for user vaults:
- The Vault logic only needs to be deployed once, this reduces the deployment costs per user to a minimum.
- It allows the owner of a vault to upgrade its Vault to use newly implemented features or assets, without the need to transfer assets or close positions and the contract address remains the same after an upgrade.
When Arcadia creates a new vault logic contract with; new features (eg. multi-chain Vaults), reduced the gas costs, or for a new token type (ERC4626 or tokens for new financial primitives such as bonds), users can upgrade their existing accounts to benefit from the new implementation. Each user has full control if and when they want to upgrade to a new logic contract. Users will not have to migrate assets or close DeFi positions when doing so.
The Arcadia protocol can in no way change the version of a user-owned deployed vault, or force a user to do an upgrade. Arcadia cannot change any logic in the existing vault logic either.