Technical design
Raga Finance's vault system is designed to manage user deposits, execute investment strategies, handle fees, and optimize yield generation through a combination of on-chain smart contracts and off-chain executors.
VaultContract:
Function: Serves as the primary interface for users and protocols to deposit funds.
Responsibilities:
Accepts user deposits and issues corresponding shares.
Manages the allocation of funds to various strategies.
Tracks and distributes rewards earned from strategies.
StrategyManager:
Function: Oversees the management and approval of investment strategies.
Responsibilities:
Maintains a registry of whitelisted strategies.
Ensures strategies meet predefined risk and compliance criteria.
Coordinates with VaultContract for fund allocation.
FeeModule:
Function: Calculates and collects fees associated with deposits, rewards, and early withdrawals.
Responsibilities:
Applies deposit fees (0–1%) upon asset entry.
Deducts reward fees (0–10%) from earnings.
Imposes withdrawal fees (0–1%) for early exits.
Strategies:
Function: Individual smart contracts implementing specific investment strategies.
Responsibilities:
Execute investment logic (e.g., yield farming, lending).
Interact with external DeFi protocols to generate returns.
Report performance and manage allocated funds.
Offchain Executor:
Function: An off-chain service responsible for initiating and managing transactions related to strategies.
Responsibilities:
Triggers fund movements between VaultContract and Strategies.
Claims rewards from external protocols.
Reinvests earnings back into strategies or VaultContract.
Last updated