Skip to content

[contracts] IVault interface: deposit, withdraw, rebalance, views, events, Position struct #19

@ozpool

Description

@ozpool

Context

Public Vault API every other contract and the frontend speaks through. Defined before Vault.sol so mocks + tests + impl compile against the same signatures.

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

Scope

In scope:

  • packages/contracts/src/interfaces/IVault.sol
  • struct Position { int24 tickLower; int24 tickUpper; uint128 liquidity; }
  • deposit, withdraw, rebalance, getPositions, getTotalAmounts, poolKey
  • Events: Deposit, Withdraw, Rebalanced, FeesCollected
  • Inherits IERC20

Out of scope:

Acceptance Criteria

  • Signatures match PRD §Day 1 exactly
  • Imports PoolKey from v4-core
  • 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

  • PRD §Day 1 IVault

Estimate

S

Metadata

Metadata

Assignees

Labels

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions