Core Functions of Yield Source Adapters
Each Yield Source Adapter must implement the following standardized functions according to the FRAG-22 protocol specifications:- Asset Allocation
-
Function:
allocate(amount: u64)Moves specified assets from the FRAG-22 Reserve Account to the external yield source.
-
Function:
- Yield Harvesting
-
Function:
harvest() → yield_amount: u64Retrieves generated yields from external yield sources and deposits them into the FRAG-22 Reward Reserve Account.
-
Function:
- Asset Withdrawal
-
Function:
withdraw(amount: u64)Withdraws assets from the external yield sources back to the FRAG-22 Reserve Account.
-
Function:
- Status Reporting
-
Function:
report_status() → {allocated_assets: u64, accumulated_yield: u64}Reports the current state of allocated assets and total accumulated yield, ensuring internal transparency and accurate record-keeping.
-
Function:
Adapter Structure and Operation Flow
Existing Implementations (by Fragmetric)
Fragmetric currently maintains two fully operational Yield Source Adapters integrated within FRAG-22:- Liquid Staking Adapter
- Restaking Adapter