Skip to content

feat: Optimize contract storage layouts and TTL policies#409

Open
Stephan-Thomas wants to merge 1 commit into
gear5labs:masterfrom
Stephan-Thomas:feat/optimize-storage-and-ttl-policies
Open

feat: Optimize contract storage layouts and TTL policies#409
Stephan-Thomas wants to merge 1 commit into
gear5labs:masterfrom
Stephan-Thomas:feat/optimize-storage-and-ttl-policies

Conversation

@Stephan-Thomas
Copy link
Copy Markdown

  • CoreVault: Add TTL for ForceExit requests (50h) and Deposit records (7d)
  • MultiHopSwap: Implement TTL for pool state (30d) with extension on swaps
  • HTLC: Add TTL for swaps based on expiry ledger plus grace period
  • FlashLoanGuard: Set TTL for price snapshots (1d) to ensure freshness
  • LendingLiquidation: Implement TTL extension for positions (30d)
  • RelayerSlashing: Add TTL for relayer info (30d) to maintain active records
  • BtcRelay: Set TTL for claimed transaction records (30d)
  • StrategyRegistry: Add TTL for vote data (7d) to decay stale governance
  • PoRValidator: Set TTL for validation status (1d) to force periodic re-validation

Benefits:

  • Improved storage resource efficiency through automatic TTL expiration
  • Prevention of stale data accumulation indefinitely
  • Dynamic TTL extension for active/frequently-accessed data
  • Clear governance patterns for temporary vs persistent storage
  • Better predictability in storage costs and maintenance

Closes #399

- CoreVault: Add TTL for ForceExit requests (50h) and Deposit records (7d)
- MultiHopSwap: Implement TTL for pool state (30d) with extension on swaps
- HTLC: Add TTL for swaps based on expiry ledger plus grace period
- FlashLoanGuard: Set TTL for price snapshots (1d) to ensure freshness
- LendingLiquidation: Implement TTL extension for positions (30d)
- RelayerSlashing: Add TTL for relayer info (30d) to maintain active records
- BtcRelay: Set TTL for claimed transaction records (30d)
- StrategyRegistry: Add TTL for vote data (7d) to decay stale governance
- PoRValidator: Set TTL for validation status (1d) to force periodic re-validation

Benefits:
- Improved storage resource efficiency through automatic TTL expiration
- Prevention of stale data accumulation indefinitely
- Dynamic TTL extension for active/frequently-accessed data
- Clear governance patterns for temporary vs persistent storage
- Better predictability in storage costs and maintenance
@drips-wave
Copy link
Copy Markdown

drips-wave Bot commented Jun 1, 2026

@Stephan-Thomas Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Contract] Optimize contract storage layouts and TTL policies across the workspace

1 participant