π Execution Flow
Execution Flow
This section explains how a strategy is executed end-to-end when a user deposits funds into MALGIST.
High-Level Flow
User
β UniversalVault
β Read Strategy
β Split Capital
β Call Adapters
β Update StateAll execution happens on-chain inside the UniversalVault.
Step-by-Step Execution
1. User Deposit
User deposits a single asset (e.g. USDC) into the UniversalVault
Funds are locked in the vault (non-custodial)
2. Strategy Read
Vault reads the selected Strategy contract
Strategy provides:
Target protocols
Allocation percentages
Execution order
Strategy is read-only and cannot move funds
3. Capital Split
Vault calculates how much capital goes to each step
Example:
60% β Lending protocol
40% β DEX liquidity or yield source
No funds leave the vault without validation.
4. Adapter Calls
Vault calls approved adapters via the Adapter Registry
Each adapter:
Receives instructions from the vault
Executes protocol-specific logic
Adapters interact directly with external DeFi protocols
5. State Updates
Vault updates internal accounting:
User balances
Strategy allocation
Fees
Execution results are stored on-chain
Events are emitted for monitoring and analytics
Key Guarantees
β Funds always remain under vault control
β Strategies cannot execute arbitrary calls
β Only approved adapters can be used
β Execution is deterministic and auditable
β‘οΈ Next: Security & Risk (how MALGIST minimizes execution and protocol risks)
Last updated

