F-2025-0012·developer-experience
Consider adding a totalStaked per address getter
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:
- Call
getPositionIdsForAddress. - Iterate through each ID.
- Call
getPositionByIdfor each position. - Sum up the
tokensStakedvalues.
It might be useful to add a getTotalStakedForAddress() function.

