Overview
How Does It Work?
When users wish to borrow, they first need to link their account and collateral vaults to the borrowed-from vault through the EVC. Thanks to that, the liability vault, also known as the controller, will be consulted whenever a user wants to perform an action that could potentially impact the account's solvency, such as withdrawing collateral or taking a borrow. The EVC is responsible for calling the controller to determine whether the action is allowed or if it should be blocked to prevent account insolvency. You can think of the EVC as a special-purpose multicall contract that provides:
- Caller authentication
- Account and vault status enforcement
- Multiple operations batching
For more detailed information, see the EVC dedicated website.
Key Concepts
Authentication and Authorization
The EVC handles authentication while vaults manage authorization. When integrating with the EVC, it's important to understand this separation of concerns:
- The EVC verifies that requests come from authorized users or contracts
- Vaults determine if the authenticated user has sufficient permissions or balances for the requested operation
Account Management
The EVC provides each Ethereum address with 256 virtual accounts which allow a user to maintain multiple isolated positions within a single wallet. When integrating with the EVC, you can leverage these virtual accounts to:
- Build multiple borrowing positions (because each account can have at most one open borrow position)
- Isolate different trading strategies
- Manage risk across different positions
Batch Operations
One of the EVC's core features is the ability to batch multiple operations into a single transaction. This enables:
- Efficient position building
- Complex trading strategies
- Gas optimization for users
Operators
Operators are a powerful feature that extends beyond traditional token approvals. An operator is a contract or EOA that can act on behalf of a specified account. When enabled, operators can interact with vaults (i.e. withdraw/borrow funds) and perform other account operations on the EVC-aware contracts on behalf of the account that enabled them.
Common use cases for operators include:
- Stop-loss/take-profit position modifiers
- Trailing stop orders
- Position management automation
- Keeper-based custom liquidation strategies
For more detailed information, see the EVC dedicated website.