MYTStrategy::_approxAPY() incorrectly divides the squared APR term by 2 * SECONDS_PER_YEAR, instead of just 2, effectively nullifying compounding growth in APY approximation. This leads to misreported yield rates across strategies.
Impact Details
APY and APR become near identical, misleading users and allocators relying on the snapshotYield() results for decision making or display.
References
Link to Code ---> https://github.com/alchemix-finance/v3-poc/blob/b2e2aba046c36ff5e1db6f40f399e93cd2bdaad0/src/MYTStrategy.sol#L230-L234
Mitigation
To correct the APY miscalculation, the squared APR term should not be divided by SECONDS_PER_YEAR. The denominator should only be 2, restoring the correct compounding approximation formula. Specifically, in MYTStrategy::_approxAPY(), replace:
Proof of Concept
Proof of Concept
Paste this test in file location: v3-poc/src/test/MYTStrategy.t.sol
Runnable Command: MAINNET_RPC_URL="https://eth-mainnet.g.alchemy.com/v2/YOUR_KEY" forge test --mt test_POC_IncorrectAPYCalculation -vvvvv
Note: This PoC runs on a local Foundry mainnet fork using a read only Alchemy RPC key.