For every interest payment to any user's account, the protocol will take a fees:
The total fees accrued for the protocol will be kept in a variable
totalFee, for each of the underlying asset in a Forge. i.e. in a mapping
mapping(address => uint256) totalFee
- Let's assume that m(t1, t2) is how much an amount of yield tokens will
grow, from t1 to t2 .
- For Aave:
- For Compound:
This means that if totalFee was last updated in
t1 and there is an additional amount of
The governance address could ping the forge at anytime, with a list of underlying asset addresses, to withdraw the
totalFee to the treasury address.