High Level Architecture
Understanding the inner workings of Enclave
Last updated
Understanding the inner workings of Enclave
Last updated
Paymaster contracts (ERC 4337) that manages user requests for withdrawing funds from the VLL. Responsible for verifying solver signatures and communicating settlement plans to the middleware for solver settlement based on the amount lent to the user for powering the user's desired action.
Enclave vault is a singleton contract deployed across all supported networks to receive and manage USDC liquidity from users. The vault interfaces with underlying defi protocols (including DEXs, lending pools, etc) to manage the treasury of consolidated user liquidity and increase ROI on passive liquidity for the protocol, LPs and Enclave end users.
The middleware component is used as a communication layer between the different components deployed across chains. This includes messaging for facilitating state synchronization of liquidity across different networks, facilitating solver settlement and LP withdrawals.
Bridging protocols are used to rebalance liquidity between chains. The rebalancer services is responsible for managing bridging and liquidity between networks. We believe that end-users should never have to interface with complex concepts and infrastructure such as native gas fees and bridging protocols.
Intent solver marketplace is a network of solvers and a decentralised intent-pool that serves as an orderbook for matching user intents and solver bids. Enclave's current auction house is a single solver maintained by Enclave that places bids on user intents. This system will be upgraded over time by onboarding multiple solvers, decentralizing the intent pool, incorporating economic incentives (ex. staking / AVS) and optimizing for the following:
Resilience - No single point of failure
Availability - User intents must be matched with a solver bid
Latency - User intents must be solved within a threshold time period
Solvers failing to meet the tenets of the system will be met with economic penalties (ex. slashing)
The rebalancer service is responsible for managing the portfolio of assets within the Enclave VLL across various networks. This service continuously monitors and adjusts the asset allocation to optimize returns in an automated fashion driven by configured parameters subject to change by governance proposals.
Enclave maintains sophisticated low latency indexing infrastructure to support all the components of the system mentioned earlier. Managing virtual balances for Enclave USD and other cross chain assets deployed on the VLL demands accurate and real-time state synchronisation of transaction states on all supported networks.
Enclave indexes all transfers, balances, liquidity pools and associated events to build a comprehensive real-time index for ensuring the secure and efficient functioning of the components that constitute Enclave VLL and USD.