RAFT

RAFT maximizes yield in the Lazy Summer Protocol by managing reward tokens generated by ARKs. When users deposit into a Fleet through a Vault, their assets are distributed across ARKs that generate yield. RAFT harvests these rewards, converts them through auctions into the Fleet's base asset, and returns them to increase overall returns.

Core Functions

RAFT operates automatically to:

  1. Harvest rewards generated by ARKs

  2. Convert rewards to base assets through Dutch auctions

  3. Return converted assets to enhance vault yields

As a vault user, RAFT requires no direct interaction. The system works continuously to optimize returns on deposited assets.

Impact on Returns

When ARKs generate rewards in external tokens, RAFT ensures optimal conversion back to the base asset. Dutch auctions start at higher prices and decrease gradually, finding the market-clearing price while protecting value.

Yield Enhancement

Consider a DAI vault with $1000 deposited. The ARKs generate COMP and AAVE rewards. RAFT:

  • Collects these reward tokens automatically

  • Auctions them for DAI through Dutch auctions

  • Returns the DAI to increase vault value

  • Reflects gains in vault share price

Harvest Management

The harvest system tracks rewards per ARK and initiates auctions:

function _harvest(address ark, bytes calldata rewardData) internal returns (
    address[] memory harvestedTokens, 
    uint256[] memory harvestedAmounts
) {
    (harvestedTokens, harvestedAmounts) = IArk(ark).harvest(rewardData);
    for (uint256 i = 0; i < harvestedTokens.length; i++) {
        obtainedTokens[ark][harvestedTokens[i]] += harvestedAmounts[i];
    }
}

Auction System

Dutch auctions handle reward token conversion:

mapping(address => mapping(address => DutchAuctionLibrary.Auction)) public auctions;

function buyTokens(address ark, address rewardToken, uint256 amount) external returns (uint256) {
    DutchAuctionLibrary.Auction storage auction = auctions[ark][rewardToken];
    uint256 paymentAmount = auction.buyTokens(amount);
    paymentTokensToBoard[ark][rewardToken] += paymentAmount;
}

Asset Return

Converted assets return to ARKs through boarding:

function _board(address rewardToken, address ark, bytes memory data) internal {
    uint256 balance = paymentTokensToBoard[ark][rewardToken];
    if (balance > 0) {
        paymentToken.forceApprove(ark, balance);
        IArk(ark).board(balance, data);
        paymentTokensToBoard[ark][rewardToken] = 0;
    }
}

Integration Points

RAFT connects with:

FleetCommander

  • Controls ARK deployment

  • Manages asset allocation

  • Sets permissions

ARKs

  • Generate rewards

  • Accept boarded assets

  • Provide harvest functions

Last updated

Was this helpful?