The harvest function is supposed to claim rewards, compound them into more want, and for partner strategies, send the partner token to the badger tree so it can be distributed
Facilitating use of Flashbots
The harvest function will return a uint256
this represents how much the harvest function earned, in want.
Calculating APY
The harvest function will emit
the Harvest(uint256 amount, uint256 block.time)
event to facilitate APY calculations
Sending rewards to the badger tree
If the strategy sends rewards to the badger tree, it can signal the amount sent via the event emit TreeDistribution(address Token, uint256 amount, uint256 block.number, uint256 block.timestamp)
This will be used by the Badger Tree bots to calculate rewards
Calculating Performance Fees
Pass the amount earned to _processPerformanceFees,
this function will calculate and transfer the fees to strategist and the DAO.
Calculating Performance Fees on Non-want (partner tokens)
Similarly, pass in the Amount as well as the token address to receive performance fees on tokens we don't auto-compound into want