Area
Investment Vault / Storage
Complexity
Medium
File(s)
investment_vault/src/lib.rs:456, :808-812 (get_portfolio)
Problem
env.storage().persistent().extend_ttl(&key, 17280, 518400) is the only extend_ttl/TTL-bump call in the entire contract, capping the entry's guaranteed lifetime at ~518,400 ledgers (~30 days at 5s/ledger). If an investor deposits once and never deposits again, their TotalDeposited(account) entry can be archived after ~30 days; get_portfolio then silently reads unwrap_or(0), resetting a value documented as "lifetime deposited" back to zero with no error or event.
Scope
In:
- Extend the TTL window (or bump it on every read, e.g. from get_portfolio), or clearly document the 30-day limitation.
Out:
- Implementing a general storage-rent-monitoring service.
Acceptance Criteria
Area
Investment Vault / Storage
Complexity
Medium
File(s)
investment_vault/src/lib.rs:456, :808-812 (get_portfolio)
Problem
env.storage().persistent().extend_ttl(&key, 17280, 518400)is the only extend_ttl/TTL-bump call in the entire contract, capping the entry's guaranteed lifetime at ~518,400 ledgers (~30 days at 5s/ledger). If an investor deposits once and never deposits again, their TotalDeposited(account) entry can be archived after ~30 days; get_portfolio then silently reads unwrap_or(0), resetting a value documented as "lifetime deposited" back to zero with no error or event.Scope
In:
Out:
Acceptance Criteria