F-2025-0012·developer-experience

Consider adding a totalStaked per address getter

Acknowledgedstakingnft-boostrewards
TL;DR

Contract exposes per-address position IDs but no aggregate totalStaked-per-address getter, requiring clients to iterate and sum positions client-side.

Severity
INFO
Impact
LOW
Likelihood
LOW
Method
MManual review
CAT.
Complexity
LOW
Exploitability
LOW
02Section · Description

Description

The contract provides getPositionIdsForAddress to retrieve all position IDs for a wallet, but lacks a convenient way to get the total amount staked across all positions for a specific user. Currently, to get this information, a client would need to:

  1. Call getPositionIdsForAddress.
  2. Iterate through each ID.
  3. Call getPositionById for each position.
  4. Sum up the tokensStaked values.

It might be useful to add a getTotalStakedForAddress() function.

F-2025-0012

oog
zealynx

Smart Contract Security Digest

Monthly exploit breakdowns, audit checklists, and DeFi security research — straight to your inbox

© 2026 Zealynx