Skip to content

fix(contract): extend Soroban instance storage TTL to prevent fund lo… - #42

Merged
thisisouvik merged 1 commit into
thisisouvik:mainfrom
Soumen1080:fix/contract-storage-ttl-extension
Aug 31, 2026
Merged

fix(contract): extend Soroban instance storage TTL to prevent fund lo…#42
thisisouvik merged 1 commit into
thisisouvik:mainfrom
Soumen1080:fix/contract-storage-ttl-extension

Conversation

@Soumen1080

Copy link
Copy Markdown
Contributor

close #7

Committed on the branch. The remaining steps — pushing and opening/merging a PR — need GitHub auth, and gh auth status reports you're not logged in, so I can't do those from here.

Done:

Branch fix/contract-storage-ttl-extension, commit bc92dd2
lib.rs: TTL bump helper (~30 days, threshold ~1 day) called from initialize, withdraw, engine_execute, plus a permissionless extend_ttl() keep-alive
test.rs: 2 new tests; all 6 pass, and the TTL assertion verifiably fails if the bump is removed

…ckup

The AutopilotVault never extended its instance storage TTL. Soroban
instance entries expire after a fixed number of ledgers, so a vault that
sat untouched past MAX_ENTRY_LIFETIME would lose its Owner/Engine/
IsInitialized entries and panic on withdraw(), locking funds with no
recovery path.

Bump the instance TTL to ~30 days whenever it drops below ~1 day, from
initialize() and from every state-touching entry point (withdraw,
engine_execute). Also add a permissionless extend_ttl() keep-alive so
the vault can be kept reachable without moving funds.

Fixes thisisouvik#7

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@vercel

vercel Bot commented Aug 31, 2026

Copy link
Copy Markdown

@Soumen1080 is attempting to deploy a commit to the thisisouvik's projects Team on Vercel.

A member of the Team first needs to authorize it.

@thisisouvik
thisisouvik merged commit 426ea3f into thisisouvik:main Aug 31, 2026
6 of 11 checks passed
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] Missing Soroban storage TTL extension - vault funds can become permanently locked

2 participants