Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add augurrank-btc-fork.clar #1

Closed
wants to merge 1 commit into from
Closed

Add augurrank-btc-fork.clar #1

wants to merge 1 commit into from

Conversation

0xc22b
Copy link
Collaborator

@0xc22b 0xc22b commented Nov 30, 2024

A Stacks smart contract stores user BTC price prediction and verifies accuracy with an AMM pool.

This smart contract is for a prediction game. The game lets users predict whether BTC prices will increase or decrease in the following 100 Bitcoin blocks (approximately 16 hours). After 100 Bitcoin blocks, admin calls verify with the correct Stacks block height without needing to provide BTC prices, as BTC prices can be retrieved from ALEX AMM pools with the at-block function.

AFAIK, currently, there is no way to get Bitcoin block height from Stacks block height and vice versa. Getting Bitcoin block height in the at-block function still returns the latest height. That's why verify can be called by admin only. At least the verified result is transparent, and the admin can re-verify with the correct Stacks block height.

After #1615 is fixed, verify will be more robust and can be called by anyone.

@0xc22b 0xc22b closed this Jan 13, 2025
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.

1 participant