Dutch Auctions

Dutch auctions in the Lazy Summer Protocol facilitate efficient reward token sales. When ARKs harvest rewards, RAFT automatically auctions these tokens using a Dutch auction mechanism where prices decline over time until meeting a buyer or reaching the end price.

The auction process is fully automated:

  1. ARK harvests rewards

  2. RAFT initiates auction

  3. Price declines according to chosen curve

  4. Tokens are purchased or auction concludes

  5. Proceeds are converted to vault tokens to enhance yields

Here's how a typical auction flow looks in code:

// Example auction creation by RAFT
function _startAuction(address ark, address rewardToken) internal {
    uint256 totalTokens = obtainedTokens[ark][rewardToken] + 
                         unsoldTokens[ark][rewardToken];
                         
    DutchAuctionLibrary.Auction memory newAuction = _createAuctionWithParams(
        IERC20(rewardToken),
        IERC20(IArk(ark).asset()),
        totalTokens,
        address(this),
        arkAuctionParameters[ark][rewardToken]
    );
}

Core Auction Functions

Auction Creation:

Price Calculation:

Token Purchase:

Integration with RAFT

The RAFT contract handles auction automation:

Price Decay Functions

Two decay functions are available:

The chosen decay function determines how price decreases over the auction duration.

Last updated

Was this helpful?