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
_modeis Yield or Unwind, addSPUSDT.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.