harvester. The vault is where users deposit and withdraw their underlying and yield assets. Strats stands for strategies and they are the strategies the protocol uses to generate yields. For example, it is using Compound, Harvest, Yearn and YCredit as yield strategies. Harvester is the interface to harvest yields from the vaults and then swap them for yield assets (ETH, WBTC, YFI).
Vault.sol, which does the following
DividenToken.soland follows the ERC-1726 standard. The reason why the dividend per share has to be magnified by a constant
magnitudeis to avoid rounding errors for small numbers (See this post for more information). The purpose of storage
magnifiedDividendCorrectionsis to account for a user’s balance change. When a user’s balance is updated in the vault, his dividend should remain the same. However, the computed value of “dividend per share x user balance“ has changed as a result of user balance change. Dividend correction is introduced to counter the change in user balance.
setStratcan only be called by the timelock address and by doing this changes the vault’s yield strategy to a new one.
harvestVault, which internally calls the vault’s method
swapExactTokensForTokens. This is a standard method name/signature for most decentralized exchanges so the router should be interchangeable.
calcTotalValueso that the vault contract can interact with each strategy interchangeably.