58356 sc insight the alchemist tokeauto strategies doesn t use recommended best practice by tokeauto

Submitted on Nov 1st 2025 at 14:55:25 UTC by @Davuka for Audit Comp | Alchemix V3arrow-up-right

  • Report ID: #58356

  • Report Type: Smart Contract

  • Report severity: Insight

  • Target: https://github.com/alchemix-finance/v3-poc/blob/immunefi_audit/src/strategies/mainnet/TokeAutoEth.sol

  • Impacts:

    • Violating recommended best practice

Description

Brief/Intro

Alchemist allocates collateral into Auto Finance without validating whether the destination vault’s debt data is stale before performing read/write operations against the AutoPool. As a result, strategies may receive wrong share amounts due to the use of stale debt report data.

Vulnerability Details

It is our recommendation to check for stale debt reporting before performing a read or write operation against the Autopool. While our systems strive to ensure that the reporting information is always up to date, outages or other network issues have the possibility to prevent this. Should the debt reporting data be stale, users shares and or value can be misrepresented.

To check for this state the Autopool exposes a oldestDebtReporting() function. If this returned timestamp is older than 1 day, you should prevent your operation from executing.

From the Auto finance documentation, the above recommendation was stated for all integrating protocols.

It is important to note that Tokemak implements an internal function totalAssetsTimeChecked to biasly handle scenarios whereby the debt report is stale. This function does not revert when stale data is detected instead, it applies extreme pricing rules (ceiling for deposits, floor for withdrawals) to protect Tokemak’s Autopool from suffering losses. However, this fallback mechanism only protects Tokemak itself. It does not guarantee that integrators will receive accurate valuations or correct share assignments. As a result, integrators such as Alchemist must still enforce a stale-data cutoff check themselves.

Impact Details

Alchemist Toke strategies do not enforce checks for stale debt reporting before depositing or withdrawing assets from Toke autopools. In situations where the Autopool data is outdated, Alchemist may receive fewer shares minted than they should.

References

Link to the totalAssetsTimeChecked: https://github.com/Tokemak/v2-core-pub/blob/de163d5a1edf99281d7d000783b4dc8ade03591e/src/vault/libs/AutopoolDebt.sol#L349

Link to the doc recommendation: https://docs.auto.finance/developer-docs/integrating/checking-for-stale-data

Proof of Concept

Proof of Concept

a) Clone the auto finance repo: https://github.com/Tokemak/v2-core-pub b) Create StaleDebt.t.sol file at test/unit/vault/StaleDebt.t.sol

c) run this command: forge test --match-path test/unit/vault/StaleDebt.t.sol --match-test test_ExistingPriceUsedWhenStaleDestinationRepriceIsLower -vvv

Was this helpful?