Assessment reports>Stable Predeposit>Threat Model>totalAssets

Function: totalAssets()

This function extends the ERC-4626 view by counting deployed USDT while the vault sits in Yield or Unwind phases, giving depositors visibility into accrued yield before withdrawals reopen.

Branches and code coverage

Intended branches

  • Always include super.totalAssets(), which captures on-contract USDT.

  • When _mode is Yield or Unwind, add SPUSDT.balanceOf(address(this)) to represent deployed USDT.

Function call analysis

  • IERC20(address(SPUSDT)).balanceOf(address(this))

    • What is controllable? SPUSDT is fixed during construction — the balance reflects Spark's accounting for supplied USDT.

    • If the return value is controllable, how is it used and how can it go wrong? N/A.

    • What happens if it reverts, reenters or does other unusual control flow? N/A.

Zellic © 2025Back to top ↑