Automation Flow
The core of the Aegis value proposition is the autonomous lifecycle management of capital. This document details the continuous operational loop executed by the AutoFi Agents.
The Execution Loop
The AutoFi Agents operate on a continuous cycle, ensuring that user portfolios are constantly optimized. This loop consists of three primary phases:
Monitor (Observation)
The system aggregates real-time data from on-chain sources and external oracles.
Market Data: APY rates, token prices, and Total Value Locked (TVL) across all integrated instruments.
Risk Signals: Liquidity utilization rates in lending pools, protocol health statuses, and external social sentiment indicators (via the Social Signal module).
User State: The current composition of the user's Smart Address (cash vs. positions).
Analyze (Decision)
The AutoFi Agents process the incoming data against the user's active Strategy.
Opportunity Identification: Is there a higher yielding instrument available that fits the "Conservative" profile?
Risk Assessment: Has the current position's risk score exceeded the acceptable threshold? (e.g., sharp TVL drop).
Rebalance Trigger: Is the potential yield improvement sufficient to cover the gas costs and slippage of rebalancing?
Execute (Action)
If a valid trigger is identified, the Agent initiates a transaction.
Transaction Construction: The system builds the necessary call data (e.g.,
withdrawfrom Protocol A,approveToken,depositto Protocol B).Signing: The Agent Address signs the operation.
Broadcasting: The transaction is sent to the Base network mempool.
Verification: The system confirms transaction inclusion and updates the internal state.
Rebalancing Logic
Rebalancing is the mechanism by which Aegis maintains optimal performance. It is triggered by specific events:
Yield Optimization: When a new instrument offers a significantly higher APY than the current holding, and the difference outweighs the switching costs.
Risk Mitigation (Defensive):
TVL Crash: A sudden outflow of funds from a protocol triggers an immediate exit.
Utilization Spike: If a lending pool becomes highly utilized (nearing 100%), liquidity risk increases. The Agent exits to ensure funds remain withdrawable.
Concentration Limits: If Aegis's total exposure to a single pool becomes too high relative to that pool's size, the system halts new deposits or partially rebalances to diversify.
Deposit and Withdraw Flows
While investing is automated, the entry and exit flows involve specific asset handling.
Withdraw (Liquidity Retrieval)
Request: User requests a withdrawal amount via the interface.
Liquidation: The Agent calculates the necessary amount of positions to close. It executes a
Withdraw/Redeemon the underlying protocol.Conversion: If the underlying position was in a derivative asset (e.g., a yield-bearing token), it is swapped or redeemed back to the base asset (USDC).
Transfer: The USDC is sent from the Smart Address back to the User Address.
Last updated