Skip to content

[contracts] Vault views: getPositions, getTotalAmounts, getPoolKey, sharePrice, TVL cap #30

@ozpool

Description

@ozpool

Context

Read-only views used by frontend + keeper + tests. Includes TVL cap enforcement on deposit.

Ref: PRISM_PRD_v1.0.html §Day 1 Core Interfaces.

Scope

In scope:

  • All IVault views
  • Share price helper
  • TVL cap check integrated into deposit revert path

Out of scope:

  • Historical views (post-MVP)

Acceptance Criteria

  • Views return consistent values across deposit/withdraw cycles
  • Compiles with forge build (Solidity 0.8.25)
  • Custom errors only (Errors.sol); no string reverts
  • ReentrancyGuardTransient on PoolManager-facing externals where applicable
  • NatSpec on every external/public
  • Unit tests: happy + reverts + access control
  • forge test -vvv passes; forge fmt --check clean
  • Slither + Aderyn: no new findings
  • Gas snapshot saved; no regression vs CLAUDE.md §Gas Targets

Dependencies

References

  • N/A

Estimate

S

Metadata

Metadata

Assignees

Labels

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions