High Level Architecture
Last updated
Last updated
Locust integrates on-chain smart contracts with an off-chain executor. This architecture delivers a DeFi native product with high levels of customization, flexible strategies, and excellent performance.
Core Components
Fund Contract (Vault):
User Interactions: Users deposit funds into the Fund Contract and redeem them when needed.
Purpose: It acts as a secure vault for storing user assets and serves as the central repository for fund management.
Strategy Contract:
Fund Withdrawal: The Strategy Contract periodically withdraws funds from the Fund Contract to implement specific investment strategies.
Periodic Repayment: To support ongoing user redemptions and ensure accurate accounting, the Strategy Contract periodically repays a portion of the funds back to the Fund Contract.
Authz Grants: This contract issues authorization (Authz) grants to the off-chain Locust executor, defining what actions the executor is permitted to perform.
Locust Off-Chain Executor:
Management Role: It manages the funds held within the Strategy Contract, executing strategy-specific operations.
Security via Authz: The executor is only authorized to sign messages on behalf of the Strategy Contract when it holds the appropriate Authz permissions. This design ensures that every action taken is explicitly permitted and verificable on-chain.