Skip to content

๐Ÿงพ Main Contracts

Overview of smart contracts used in the protocol.


๐Ÿฆ YVault

A Yearn V2-style vault with added support for AI allocation.

Key Functions:

  • deposit(uint256): Accepts USDC and mints shares.
  • withdraw(uint256): Burns shares, returns USDC.
  • setStrategy(address): Admin-only.
  • allocateFunds(uint256, address): Chainlink-only function to allocate funds.

Roles:

  • admin: Sets strategies, recovers tokens.
  • chainlink_admin: Only AutomationOwner can call allocateFunds().

๐Ÿ” AutomationOwner

Middleware between Chainlink Automation and vault.

  • Ensures only verified keepers can trigger fund allocation.
  • Can be extended to throttle or rate-limit allocations.

๐Ÿ“‰ Strategies

Each vault has one active strategy.

  • LowRiskAaveStrategy
  • HighRiskMorphoStrategy

Each strategy implements:

interface IStrategy {
  function execute(uint256 amount) external;
}