Discreet Luck is a DLC-based prediction market on bitcoin. Unlike other DLC-based prediction markets, Discreet Luck does not suffer from the poor UX of order book models (i.e., having to wait for orders to be filled). Orders on Discreet Luck can be automatically filled by market makers leveraging Polymarket's deep liquidity, without the end-user having to use anything other than native BTC and bitcoin.
Technical Implementation 💻
Process:
Discreet Luck involves bitcoin, BTC, DLCs, Nostr, Polygon network, Polymarket smart contracts, and the Polymarket API.
The Polymarket API is used to post the current spread of liquid markets on Nostr, with unique tags for identification. Then, users can optionally use those suggested values (or their own custom odds) for creating DLC 'OfferCreate's, posting them back onto Nostr.
Any user can accept those bids/OfferCreates, but that would require the bid creator to wait online for the order to be filled.
Instead, any user that's willing to also use USDC on Polygon can accept the DLC bid on bitcoin, with BTC, and automatically hedge themself on Polymarket with a Polygon onchain transaction. Polymarket is also the default oracle for these DLCs, but theoretically any oracle could be used.
Nostr offers censorship-resistance and the existing liquidity on Polymarket drastically improves UX. Importantly, any user can market-make, and additional steps can be taken to avoid any loss of funds (e.g., hedging against not only the prediction market but also the price of BTC using a Polygon AMM).
Tooling:
Bitcoin: local regtest node
Nostr: superrain repo
DLC: AtomicFinance libraries
Polymarket: Polymarket official API
Polygon: Hardhat dev env
User Experience & Design 🎨
DIscreet Luck has a superior UX to other bitcoin prediction markets due to the ability for market makers to 'extend' external liquidity to bitcoin-only users.
Innovation & Creativity 💡
Unlike other prediction markets, this one uses Nostr for counterparty discovery (end-users can also fill any bids that market makers have not already filled) and integrates with Polymarket, a crypto app with deep liquidity (on certain markets) and mainstream attention.
Potential Impact 🌍
Polymarket does billions of dollars in volume. However, it relies on USDC, which is a centralized ERC-20 token with a blacklist function that can freeze funds. Discreet Luck allows BTC-only users to indirectly access that liquidity and volume, through the permissionless market makers.
Business Model 💼
Anyone can market make on Discreet Luck. Theoretically, market makers would only accept bitcoin-side bids that are slightly outside the Polymarket spread, so they can better ensure a profit; then, you'd expect a race to the bottom. The business model for Discreet Luck itself would be to charge small fees (~0.5-2% of volume) on the frontend. Users can interface with Nostr on their own, of course, but as we've seen with crypto apps such as Uniswap and Pumpfun, most users are more than willing to pay a premium for a convenient frontend.
Well, I couldn't get the DLCs to work. I intend to fix my usage of the AtomicFinance libraries, or build them another way. Also, the Nostr custom tags need to be given more thought for better organization - especially once there are unfilled orders mixed in with filled orders!
🚀 TABConf 6 Hackathon Submission
Project Name: Discreet Luck
Team Members 👥
Project Description 📝
Discreet Luck is a DLC-based prediction market on bitcoin. Unlike other DLC-based prediction markets, Discreet Luck does not suffer from the poor UX of order book models (i.e., having to wait for orders to be filled). Orders on Discreet Luck can be automatically filled by market makers leveraging Polymarket's deep liquidity, without the end-user having to use anything other than native BTC and bitcoin.
Technical Implementation 💻
Process: Discreet Luck involves bitcoin, BTC, DLCs, Nostr, Polygon network, Polymarket smart contracts, and the Polymarket API. The Polymarket API is used to post the current spread of liquid markets on Nostr, with unique tags for identification. Then, users can optionally use those suggested values (or their own custom odds) for creating DLC 'OfferCreate's, posting them back onto Nostr. Any user can accept those bids/OfferCreates, but that would require the bid creator to wait online for the order to be filled. Instead, any user that's willing to also use USDC on Polygon can accept the DLC bid on bitcoin, with BTC, and automatically hedge themself on Polymarket with a Polygon onchain transaction. Polymarket is also the default oracle for these DLCs, but theoretically any oracle could be used. Nostr offers censorship-resistance and the existing liquidity on Polymarket drastically improves UX. Importantly, any user can market-make, and additional steps can be taken to avoid any loss of funds (e.g., hedging against not only the prediction market but also the price of BTC using a Polygon AMM).
Tooling: Bitcoin: local regtest node Nostr: superrain repo DLC: AtomicFinance libraries Polymarket: Polymarket official API Polygon: Hardhat dev env
User Experience & Design 🎨
DIscreet Luck has a superior UX to other bitcoin prediction markets due to the ability for market makers to 'extend' external liquidity to bitcoin-only users.
Innovation & Creativity 💡
Unlike other prediction markets, this one uses Nostr for counterparty discovery (end-users can also fill any bids that market makers have not already filled) and integrates with Polymarket, a crypto app with deep liquidity (on certain markets) and mainstream attention.
Potential Impact 🌍
Polymarket does billions of dollars in volume. However, it relies on USDC, which is a centralized ERC-20 token with a blacklist function that can freeze funds. Discreet Luck allows BTC-only users to indirectly access that liquidity and volume, through the permissionless market makers.
Business Model 💼
Anyone can market make on Discreet Luck. Theoretically, market makers would only accept bitcoin-side bids that are slightly outside the Polymarket spread, so they can better ensure a profit; then, you'd expect a race to the bottom. The business model for Discreet Luck itself would be to charge small fees (~0.5-2% of volume) on the frontend. Users can interface with Nostr on their own, of course, but as we've seen with crypto apps such as Uniswap and Pumpfun, most users are more than willing to pay a premium for a convenient frontend.
Demo Video 🎥
https://drive.google.com/file/d/1WGMBBzK6cGDW8OqYaQ7EhmZol7I1CzgQ/view?usp=sharing
GitHub Repository 📂
https://github.com/RedVelvetZip/tabconf2024
Additional Resources (Optional) 📚
Docs - https://github.com/RedVelvetZip/tabconf2024/blob/main/discreetluck/README.md Thread - https://x.com/redvelvetzip/status/1849103839065981050
Future Plans 🔮
Well, I couldn't get the DLCs to work. I intend to fix my usage of the AtomicFinance libraries, or build them another way. Also, the Nostr custom tags need to be given more thought for better organization - especially once there are unfilled orders mixed in with filled orders!
Feedback for Organizers (Optional) 📣
-