Open
Conversation
- Added `update-btc-price` function to update the BTC price. - Added `get-current-btc-price` read-only function to retrieve the current BTC price. - Added `set-oracle-address` function to set a new oracle address. - Included necessary assertions for authorization and parameter validation.
- Implemented `deposit-sbtc` function to allow users to deposit sBTC. - Implemented `create-option` function to create new options with specified parameters. - Added necessary assertions for parameter validation and balance checks. - Updated user balances and option storage accordingly.
- Added `exercise-option` function to allow users to exercise their options. - Added `expire-option` function to handle the expiration of options. - Included necessary assertions for authorization, expiry checks, and status validation. - Updated user balances and option status accordingly.
…idelines - Detailed overview of the sBTC Options Protocol. - Description of core trading functions, oracle functions, and administrative functions. - Explanation of system parameters, error codes, and data structures. - Security features and integration guide for implementing an oracle and creating options.
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.
Overview
This PR introduces a comprehensive implementation of the sBTC Options Protocol, a decentralized platform for Bitcoin options trading on Stacks. The protocol leverages sBTC for collateral and settlement, providing a secure and efficient way to trade Bitcoin options.
Key Features
Changes
Core Protocol Implementation
deposit-sbtc,create-option)exercise-option,expire-option)Security & Validation
Documentation
Impact
This implementation provides a foundation for secure and efficient Bitcoin options trading on Stacks, enabling:
Deployment Notes
Checklist
Additional Notes
The protocol is ready for security audit and testing in a staging environment before mainnet deployment.