Summary
Soroban persistent storage entries have a TTL measured in ledgers. If a creator's key goes untouched for long enough, their state entries can expire and be evicted from the ledger. A creator with an active community should never hit this — but one that has a quiet period followed by renewed interest will find their state gone and need to re-register, losing all historical supply and holder data. Every buy or sell should extend the TTL for that creator's storage so activity keeps the data alive automatically.
Scope
- After every successful
buy or sell for a creator, call `env.storage().persistent().extend_ttl()'\ on all storage keys associated with that creator (creator config, supply, holder map, fee config)
- The extension target should be a named constant (e.g.
CREATOR_TTL_LEDGERS) defined in a config module so it can be updated without touching the trade logic
- Add a view function
get_creator_ttl_remaining(creator_id) -> u32 that returns the ledgers remaining on the creator's primary storage key
- Creator registration should also set the initial TTL to the same constant
Acceptance Criteria
Coordinate on Telegram
Summary
Soroban persistent storage entries have a TTL measured in ledgers. If a creator's key goes untouched for long enough, their state entries can expire and be evicted from the ledger. A creator with an active community should never hit this — but one that has a quiet period followed by renewed interest will find their state gone and need to re-register, losing all historical supply and holder data. Every buy or sell should extend the TTL for that creator's storage so activity keeps the data alive automatically.
Scope
buyorsellfor a creator, call `env.storage().persistent().extend_ttl()'\ on all storage keys associated with that creator (creator config, supply, holder map, fee config)CREATOR_TTL_LEDGERS) defined in a config module so it can be updated without touching the trade logicget_creator_ttl_remaining(creator_id) -> u32that returns the ledgers remaining on the creator's primary storage keyAcceptance Criteria
CREATOR_TTL_LEDGERSCREATOR_TTL_LEDGERSCREATOR_TTL_LEDGERSget_creator_ttl_remainingreturns a positive value for a live creatorCREATOR_TTL_LEDGERSis defined as a named constant, not a magic numberCoordinate on Telegram