Overview
The Ethereum Vault Connector (EVC) enables advanced transaction patterns including batching, sub-accounts, and deferred checks. This guide covers how to integrate EVC functionality into your application.EVC Address
EVC Contract:0xceAA7cdCD7dDBee8601127a9Abb17A974d613db4
Core Concepts
Batching
Execute multiple operations atomically in a single transaction.Sub-Accounts
Each address can have up to 256 virtual sub-accounts for position isolation.Operators
Delegate permissions to trusted addresses for automated operations.Deferred Checks
Temporarily violate limits as long as final state is valid.Basic Integration
Connecting to EVC
Batching Operations
Simple Batch
Complex Batch with Multiple Vaults
Sub-Account Operations
Addressing Sub-Accounts
Sub-accounts are addressed asaddress:subAccountId:
Operations on Sub-Accounts
Querying Sub-Account Balances
Operator Management
Setting an Operator
Operator Operations
Operators can execute transactions on behalf of users:Deferred Checks
Deferred checks allow operations that temporarily violate limits:Advanced Patterns
Leveraged Position Opening
Position Rebalancing
Error Handling
Handling Reverts
Validating Before Execution
Gas Optimization
Batch Size
- Group related operations together
- Don’t batch too many operations (gas limit)
- Consider gas costs vs. separate transactions
Sub-Account Usage
- Use sub-accounts to isolate positions
- Don’t create unnecessary sub-accounts
- Consider gas costs of sub-account operations
Security Considerations
Operator Permissions
- Only grant to trusted addresses
- Regularly review operator list
- Revoke unused operators
- Consider time-limited permissions
Batch Validation
- Validate all inputs before batching
- Check return values
- Handle all possible error cases
- Test edge cases
Testing
Local Testing
Integration Testing
- Test on testnet
- Verify all operations succeed or fail together
- Test edge cases
- Monitor gas usage
Need Help?
If you have questions about EVC integration or need developer assistance:- Join our Telegram community for discussions
- Open a support ticket on Discord