Part of the fees generated by the Idle DAO product suite is used to acquire $IDLE from the market and distribute it to stkIDLE holders on a weekly basis, as compensation for their long-term commitment.
Fees are distributed weekly: the proportional amount of fees that each user is to receive is calculated based on their $stkIDLE balance relative to the total $stkIDLE supply, and this amount is calculated at the start of the week.
The actual distribution occurs at the end of the week based on the fees that were collected. As such, a user that creates a new vote-lock should expect to receive their first fee payout at the end of the following epoch week.
The available $IDLE to distribute is tracked via the “token checkpoint”, updated at a minimum every 24 hours.
Fees that are received between the last checkpoint of the previous week and the first checkpoint of the new week will be split evenly between the weeks.
Fees distribution might be limited by high network fees (aka gas fees); in that case, accrued fees will be distributed the week after.
Stakers can claim their fees by calling claim().
Protocol fees are converted from underlying tokens in wETH and then allocated to some protocol beneficiaries from the FeeCollector, such as the Fee Treasury (owned by Idle DAO) and the Rebalancer (for operational expenses).
As part of IIP-10, the Sushiswap exchanger was added as a beneficiary to FeeCollector.
This contract exchanges the protocol fees from wETH to $IDLE via SushiSwap and deposits the $IDLE to the FeeDistributor.
The SushiSwap Exchanger is implemented as an upgradeable contract to make this process sustainable for the future: if liquidity for $IDLE migrates to another exchange, the contract can be upgraded.
The SushiSwap exchanger implements a FeeExchanger interface which is located here.