1/ Satoshi Dice showed in 2012 how popular Bitcoin-based betting games could get.
Now with smart contracts for Bitcoin, developers can build much more sophisticated games. Let’s walk through a Powerball-like game.
2/ First, I’m not a lawyer, and any developer building such lottery games should consider appropriate laws in local jurisdictions.
I’m interested in the technical design and possibilities.
Putting the legal disclaimer aside, let’s dive in!
3/ At a high level, the lottery game on BTC looks like this:
- People send in their BTC.
- A random function draws a winner every x blocks.
- The winner gets the lottery.
- The smart contract optionally takes a small fee.
4/ The most important thing for the game is the random function. People should be able to trust that the function is truly random.
@WuYouFa built a lottery game 0.btc.us that uses Bitcoin block header hash as the random input.
5/ Bitcoin block hash as random input is neat but has a downside where Bitcoin miners might be incentivized to reorg the chain to win the lottery if it is big enough, e.g., Powerball in the US can have $500M+ wins.
Instead, you can use a VRF implemented by Stacks for Bitcoin.
6/ rickey.btc’s lottery game has all the basic functionality and is fun to play! I’d suggest the following modifications to make the UX more native to Bitcoin:
a) Use native BTC swaps (@Stacks feature) to take input from users.
b) Give the lottery reward in xBTC.
7/ A truly decentralized lottery game using Bitcoin can reach more people than Powerball in the US, and all results will be verifiably random.
Satoshi Dice (@ErikVoorhees) showed the power of BTC gaming in 2012.
Now, smart contracts for Bitcoin can take this to the next level.
• • •
Missing some Tweet in this thread? You can try to
force a refresh
The opportunity window for starting new layer-1 blockchains was in 2017-2018.
Some thoughts on the L1 landscape👇
1/ First, let’s separate Bitcoin (sound money) from smart contract platforms.
New money layers (e.g., Bitcoin forks) have failed miserably.
Bitcoin is the clear winner for sovereign money (with recent attempts from Ethereum to compete there.)
2/ Smart contract platforms, however, remain a rapidly growing and competitive market.
The opportunity window for starting new L1 blockchains for smart contracts was in 2017-2018. These platforms typically require 2-3 years of development before mainnet launch.
“When everyone zigs, Stacks zags.”
— Nick Grossman, USV
The popular opinion in crypto is that proof-of-stake is the future. Stacks recycles Bitcoin’s PoW and avoids PoS.
Why do we prefer PoW? Tweet thread👇
1/ First of all, intelligent people I respect, e.g., Silvio Micali (Algorand), are working on proof-of-stake, so clearly, I think it’s a design space worth exploring.
Given that enough smart people are already exploring PoS, I’m more interested in researching other designs.
2/ I don’t like slashing conditions in PoS. An event like a network partition (however rare that might be) can slash funds of honest nodes.
That’s why in Stacks, we had a design requirement not to have any slashing conditions.
Coindesk reported that USDC is planning to expand to Stacks.
This is a narrative violation that DeFi is not possible in the Bitcoin ecosystem.
So what are the benefits of USDC on Stacks? Thread👇
1/ USDC transactions would benefit from the security of Bitcoin.
USDC transactions on Stacks automatically settle on Bitcoin. To rewrite the history of these transactions, you’d need to rewrite the history of Bitcoin.
2/ Availability of USDC would open doors for USDC/BTC atomic swaps, i.e., with BTC on the main Bitcoin chain.
(@fmdroid already has a prototype of STX/BTC atomic swaps.)