Technical documentation and architecture for Boosties
Diagram of coveYFI and veYFI Snapshot Voting interactions
IYearnStakingDelegate.RewardSplit
YSD.harvest(gauge)
will call GaugeRewardReceiver.harvest( address swapAndLock, address treasury, IYearnStakingDelegate.RewardSplit calldata rewardSplit )
which claims dYFI emission from the associated Gauge and distributes it based on the given RewardSplit.DYfiRedeemer.massRedeem(address[], uint256[] dYfiAmounts)
which borrows the required ETH from a flash loan provider, takes dYFI tokens from the approvers, redeem them for YFI, sells some of the YFI to ETH via Curve using chainlink price adjusted with slippage for ETH flashloan payback, then returns the remaining YFI to the users who it took dYFI from. The slippage parameter is controlled by the DAO but limited by immutable max parameter such that sufficient YFI can be sold for the flash loan payment. Any extra ETH that is left due to slippage expectation is sent to the caller of massRedeem()
to incentivize automation.Sequence diagram of the massRedeem call
YearnStakingDelegate.harvest(address gauge)
notifyRewardAmount()
, allowing Yearn Gauge token depositors to earn dYFI rewards.Diagram of YearnStakingDelegate and Harvest interactions
Diagram of the gauge reward claiming process