Implement Core BitLock Contract with NFT Marketplace and Staking Functionality#1
Open
timileyin-create wants to merge 5 commits into
Open
Implement Core BitLock Contract with NFT Marketplace and Staking Functionality#1timileyin-create wants to merge 5 commits into
timileyin-create wants to merge 5 commits into
Conversation
…ants - Define protocol parameters including minimum collateral ratio, protocol fee, total staked, yield rate, and total supply. - Establish main token storage map with fields for owner, URI, collateral, staking status, stake timestamp, and fractional shares. - Add error codes for various contract operations to ensure robust error handling. - Include comprehensive contract metadata detailing the purpose, summary, and features of BitLock. This commit sets up the foundational elements required for the BitLock Bitcoin-backed NFT exchange with staking and fractional ownership capabilities.
- Implement mint-nft function to mint new NFTs with collateral backing. - Validate URI format and length. - Ensure sufficient collateral is provided by the sender. - Transfer collateral to the contract and update the token storage map. - Increment total supply of tokens upon successful minting. This commit introduces the core functionality for minting NFTs within the BitLock contract, ensuring proper validation and collateralization.
… transfer - Added `transfer-nft` function to handle NFT ownership transfer. - Added `list-nft` function to list NFTs for sale. - Added `purchase-nft` function to handle NFT purchases and update ownership. - Added `transfer-shares` function to transfer fractional shares between users.
- Added `stake-nft` function to enable NFT staking for yield generation. - Added `unstake-nft` function to allow unstaking of NFTs and claiming rewards. - Implemented read-only functions to retrieve token, listing, fractional shares, and staking rewards information. - Added `calculate-rewards` read-only function to compute current staking rewards. This commit enhances the BitLock contract with staking capabilities and essential read-only queries for data retrieval.
… claiming - Implement `stake-nft` function to enable NFT staking for yield generation. - Implement `unstake-nft` function to allow unstaking of NFTs and claiming rewards. - Add read-only functions to retrieve token, listing, fractional shares, and staking rewards information. - Implement `calculate-rewards` read-only function to compute current staking rewards. - Add private `claim-staking-rewards` function to handle reward distribution during unstaking. This commit enhances the BitLock contract with staking capabilities, reward calculation, and essential read-only queries for data retrieval.
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 the foundational components for BitLock – a Bitcoin-backed NFT exchange protocol on Stacks L2. It enables:
✅ Collateralized NFT Minting
✅ Decentralized Marketplace
✅ Fractional Ownership
✅ Yield-Generating Staking
Key Changes
1. Core Contract Architecture (
feat: Initialize BitLock contract)min-collateral-ratio: 150%protocol-fee: 2.5%yield-rate: 5% APY2. NFT Lifecycle Management (
feat: Add mint-nft)3. Marketplace Engine (
feat: Implement NFT transfer...)4. Staking Module (
feat: Implement staking...)Compliance Alignment
Reviewer Notes
mint-nft