Skip to content

[Chore] Record the dust-position stale-entry_time gaming vector #577

Description

@collinsezedike

Summary

Record the dust-position stale-entry_time gaming vector as a forward-looking constraint, ahead of any future duration-gated feature.

Motivation

entry_time stamps only on a caller's first-ever deposit and never updates while their balance stays non-zero. Leaving a single-stroop dust balance after withdrawing lets a much-later large deposit inherit the original day-one timestamp. No current entry point reads entry_time for anything but display, so this has zero effect today — but it would be directly exploitable the moment any duration-gated feature (a fee discount, a loyalty multiplier, vesting) is built on top of it, and that's exactly the kind of gap that's cheap to note now and expensive to discover after the feature ships.

Proposed Solution

If no duration-gated feature is currently planned: no code change needed now, just don't build one against raw entry_time without revisiting this first. If one is planned: switch to a size-weighted average timestamp on top-up, so a large late deposit meaningfully pulls entry_time forward rather than inheriting the original stamp wholesale.

Scope

Field Value
Area Contracts
Protocol affected None
Network testnet, mainnet
Breaking change? No — no code change unless a duration-gated feature is scoped

Alternatives Considered

Fixing it preemptively regardless of whether any duration-gated feature exists: not worth the complexity today, since entry_time currently has zero functional consequence beyond display.

Acceptance Criteria

  • Noted as a known constraint wherever entry_time is documented (docs/contracts.md or equivalent)
  • Revisited before any feature reads entry_time for anything beyond display

Metadata

Metadata

Assignees

Labels

Stellar WaveIssues in the Stellar wave programchoreBuild, CI, dependency updates, or repository maintenancecontractsInvolves writing or testing Rust/Soroban contracts in packages/contractstrivialSelf-contained task, completable in < 2 hours with no deep protocol knowledge required

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions