Problem
Smart contract storage entries don't have explicit TTL (time-to-live) management. Soroban charges rent for persistent storage, and unused entries waste funds.
Context
Efficient storage management reduces operational costs and keeps the contract lean.
Proposed Solution
- Set appropriate TTLs for different data types
- Implement cleanup functions for expired data
- Use
temporary storage for short-lived data (e.g., flash loan guards)
- Use
instance storage for frequently accessed globals
Acceptance Criteria
Technical Notes
- Files: All contract modules that use
env.storage()
- Soroban storage types:
temporary, persistent, instance
Constraints
- Must not delete data that's still needed
Problem
Smart contract storage entries don't have explicit TTL (time-to-live) management. Soroban charges rent for persistent storage, and unused entries waste funds.
Context
Efficient storage management reduces operational costs and keeps the contract lean.
Proposed Solution
temporarystorage for short-lived data (e.g., flash loan guards)instancestorage for frequently accessed globalsAcceptance Criteria
Technical Notes
env.storage()temporary,persistent,instanceConstraints