CollectionBet is a peer-to-peer marketplace that allows traders to buy and sell NFTs with future settlement. The protocol enables users to take long or short positions on NFT collections.
Key features include:
- Bullish traders can place buy orders for future NFT purchases at a discount
- Bearish traders can place sell orders to potentially profit from price decreases
- Uses EIP-712 for secure off-chain order creation
- Peer-to-peer trading without intermediaries
How it works:
-
Bullish traders (Bulls):
- Place buy orders for any NFT from a specific collection
- Pay a settlement price (usually discounted from the current floor price)
- Receive an NFT from the collection before the settlement deadline
-
Bearish traders (Bears):
- Place sell orders for any NFT from a specific collection
- Pay a security deposit (premium)
- Agree to sell an NFT at a predetermined price before the deadline
- Profit if the collection's floor price decreases
- Lose their security deposit if they fail to deliver the NFT
-
Off-chain Orders:
- Users can create off-chain orders using the EIP-712 standard
CollectionBet provides a unique way for traders to speculate on NFT collection prices, offering opportunities for both bullish and bearish market participants.
To set up and run tests for CollectionBet:
- Follow the instructions to install Foundry.
- Clone and install dependencies: git submodule update --init --recursive
- Run the tests:
forge test -vv --match-test test_OrderMatchsWithSufficientWETHBalance --match-contract CollectionBet
Note: Change the contract and function name to test different parts of the protocol.