56348 sc insight incorrect apy calculation in mytstrategy approxapy causes underreported yields
Submitted on Oct 14th 2025 at 20:05:31 UTC by @Gakarot for Audit Comp | Alchemix V3
Report ID: #56348
Report Type: Smart Contract
Report severity: Insight
Target: https://github.com/alchemix-finance/v3-poc/blob/immunefi_audit/src/MYTStrategy.sol
Impacts:
Description
Brief/Intro
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.
Was this helpful?