You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[BUG] Time-decay scoring formula overflows for wallets with reputation accumulated over long periods #883
The exponential decay calculation uses Math.exp() on an exponent that grows unbounded with wallet age in days, producing Infinity/NaN for sufficiently old wallets.
Component
Backend
Frontend
Smart Contract
SDK
Documentation
Other:
Steps to Reproduce
Seed a wallet with a reputation event timestamped several years in the past.
Trigger a reputation score recalculation.
Inspect the computed score.
Check for NaN/Infinity in the result.
Expected Behavior
The decay formula should remain numerically stable regardless of wallet age (e.g. clamp or use a normalized time base).
Actual Behavior
Sufficiently old timestamps produce NaN, which then poisons any aggregate score that includes that event.
Environment
Node Version: 20.x
OS: Linux / macOS
Browser (if applicable): N/A
Network (Testnet/Mainnet): Testnet
Error Messages/Logs
NaN
Screenshots
N/A — backend/API issue, not applicable.
Additional Context
The decay exponent isn't clamped to a sane maximum age before being passed to Math.exp.
Possible Solution
Clamp the age input to a reasonable maximum (e.g. decay effectively reaches ~0 after N days) before computing the exponential.
Activity