Skip to content

Example commit message#684

Merged
greatest0fallt1me merged 1 commit into
Predictify-org:masterfrom
Songu3020:Add-storage-rent-budget-pre-flight-check-on-create-market-to-prevent-under-funded-archives
Jun 27, 2026
Merged

Example commit message#684
greatest0fallt1me merged 1 commit into
Predictify-org:masterfrom
Songu3020:Add-storage-rent-budget-pre-flight-check-on-create-market-to-prevent-under-funded-archives

Conversation

@Songu3020

Copy link
Copy Markdown
Contributor

#closes
#634

PR title
chore: document create_market rent-preflight blockers
PR description
Summary
Investigated adding a storage-rent preflight to create_market. No code changes were made because the proposed contract-side check cannot be implemented securely with Soroban SDK 25.
Findings
env.storage().instance().get_ttl() is available only through SDK test utilities, not deployed WASM contracts.
Multiplying persistent-key count by TTL and comparing it with a single instance TTL mixes incompatible units and would reject valid market creation.
Actual rent depends on serialized entry sizes and network rent configuration.
Rent must be estimated through transaction simulation before submission.
Recommended approach
Validate configured TTL targets against env.storage().max_ttl() on-chain.
Perform actual rent estimation and fee validation client-side using Soroban transaction simulation.
Avoid presenting instance TTL as proof that the caller paid sufficient rent.
Verification
Command:
cargo test -p predictify-hybrid market_creation_validation_tests -- --nocapture
Baseline compilation currently fails in require_auth_coverage_tests.rs because four oracle configuration calls omit the new max_deviation_bps: Option argument.
Notes
Working tree remains clean.
No unwrap() calls or dependency changes were introduced.
Implementation requires agreement on the feasible client-side simulation/on-chain TTL-validation design.

@drips-wave

drips-wave Bot commented Jun 27, 2026

Copy link
Copy Markdown

@Songu3020 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

@greatest0fallt1me greatest0fallt1me merged commit 555ac6d into Predictify-org:master Jun 27, 2026
1 check failed
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.

2 participants