Open
Conversation
|
👋 ejacquier, thanks for creating this pull request! To help reviewers, please consider creating future PRs as drafts first. This allows you to self-review and make any final changes before notifying the team. Once you're ready, you can mark it as "Ready for review" to request feedback. Thanks! |
tarcisiozf
requested changes
Mar 18, 2026
starter-templates/prediction-market/prediction-market-ts/market-creation/workflow.ts
Outdated
Show resolved
Hide resolved
starter-templates/prediction-market/prediction-market-ts/market-creation/workflow.ts
Show resolved
Hide resolved
dz235
suggested changes
Mar 20, 2026
There was a problem hiding this comment.
Potential issues:
- Market definition: The current cron schedule creates 24 markets per day, all sharing an identical question: "Will BTC be above $100,000 by [date]?".
- Resolution logic: The question uses the phrase "by [date]", which implies the market resolves Yes if BTC exceeds the strike price at any point before expiration. However both the resolution and dispute workflows evaluate outcome using a single spot price read. Under current logic, a price of $99,000 resolves the market as No, even if BTC traded above $100,000 earlier in the market's lifecycle.
Suggestions:
- Consider using Data Streams instead of Data Feeds. DS's timestamped historical prices, such as a price report showing BTC >$100,000 at time T, could be used to resolve or dispute a market. This would also demonstrate CRE’s ability to read off-chain data. (and for an extra point, the same workflow could even include onchain verification of a streams report!)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Prediction Market - New Template
Full prediction market lifecycle with 3 workflows sharing a single PredictionMarket smart contract, resolved deterministically using Chainlink BTC/USD Data Feed on-chain.
Workflows:
Key details: