Decentralized lottery game on Bitcoin.

How can this work? Tweet thread👇
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
 

Keep Current with muneeb.btc

muneeb.btc Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

PDF

Twitter may remove this content at anytime! Save it as PDF for later use!

Try unrolling a thread yourself!

how to unroll video
  1. Follow @ThreadReaderApp to mention us!

  2. From a Twitter thread mention us with a keyword "unroll"
@threadreaderapp unroll

Practice here first or read more on our help page!

More from @muneeb

19 Aug
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.
Read 10 tweets
2 Aug
City governments can embrace Bitcoin and crypto faster than nations.

Miami Mayor @FrancisSuarez is experimenting with crypto to give Miami a Bitcoin-yielding treasury.

A thread on cities and crypto👇
1/ There are at least two ways city governments can embrace crypto: 

(a) cities can put Bitcoin on their balance sheet, and

(b) they can issue a "governance token" to engage their citizens.
2/ Cities like NYC run on billions of dollars. Like public companies, city governments can also diversify their cash balances into Bitcoin.

@michael_saylor wrote the book for Bitcoin corporate treasuries; forward-looking mayors like Suarez might write a similar book for cities.
Read 9 tweets
30 Jul
“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.
Read 8 tweets
26 Jul
Native Bitcoin swaps are now live!

Why is this a big deal? Tweet thread👇
1/ What is this?

Users can do trustless BTC swaps to stablecoins, derivatives, perpetuals, and other crypto assets.

All by pure Bitcoin transactions on the main BTC chain.

Users can purchase any digital assets (like NFTs and decentralized domains).
2/ This is a big f—king deal. Why?

Bitcoin has established itself as digital gold, but you can’t use BTC to trade without going through:

(a) centralized exchanges, or
(b) alt blockchains w/ wrapped BTC

Not anymore!
Read 8 tweets
30 Jun
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.)
Read 7 tweets
28 Jun
Back on Twitter after a week of disconnecting from it 👋

It looks like @AriDavidPaul is giving $1M in cash to someone who can implement CryptoKitties on Bitcoin.

Here is how to build that👇
1/ The straightforward way to do this would be to use SIP-009 that defines NFTs on Stacks. However, you’d be paying gas fees in Stacks (not Bitcoin).

Apps like boom.money already do this.

Link: github.com/stacksgov/sips…
2/ One can argue that these NFTs “settle on Bitcoin” but are not “on” BTC.

Fair enough.

Stacks recognizes pure Bitcoin transactions for transfers/ownership, i.e., pay a gas fee in BTC.

How to use that in CryptoKitties?
Read 6 tweets

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3/month or $30/year) and get exclusive features!

Become Premium

Too expensive? Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal Become our Patreon

Thank you for your support!

Follow Us on Twitter!

:(