ordinals / ord

👁‍🗨 Rare and exotic sats
https://ordinals.com
Creative Commons Zero v1.0 Universal
3.74k stars 1.31k forks source link

Rune gambling #3318

Open casey opened 3 months ago

casey commented 3 months ago

Use block hash as a source of randomness. Huge concern is miners being able to manipulate bets by grinding favorable block hashes. A possible mitigation for that is to make the bet in block N and resolve the bet in block M > N.

Gambling could be simple odds, i.e., double or nothing, or a form of collaborative betting where runes are assigned to a random output of the transaction, which was @sondotpin's idea.

Rock-Lee-520 commented 3 months ago

it is a wonderful idea.

cryptoni9n commented 2 months ago

some gambol ideas:

standard flip/war (2 player): some number of runes are locked into bet by each party (can be x for x, or x for y). Variations could be flagged for best 2 out of 3, allow double or nothing, and so on. Flip would then assign a random number 1-10 to each party - high number wins the rune pot and is assigned total output for bet resolution.

example 1: Player 1 bets 2 UNCOMMON.GOODS and Player 2 bets 2 UNCOMMON.GOODS. Flip initiates and assigns Player 1 the value 5 and Player 2 is assigned the value 7. Player 2 wins the pot and wins total of 4 UNCOMMON.GOODS (2 from Player 1, and 2 that he put into the pot himself)

example 2: Player 1 bets 2 UNCOMMON•GOODS and Player 2 bets 20,000 GAME•WORLD•COIN. Flip initiates and assigns Player 1 the value 5 and Player 2 is assigned the value 2. Player 1 wins the pot and wins total of 2 UNCOMMON.GOODS and 20,000 GAME•WORLD•COIN.

BTC price bet (1-many): bet creator bets Y runes that BTC/USD price will or will not break X by block height Z, according to some designated and agreed upon source of truth. Bet creator would specify a TTL block height that keeps the bet open for the takers to participate by. Prior to TTL height, the Taker would take opposite side and need to match the rune bet with a like and in kind rune stack. Can be configured to accept one or more takers per bet instantiation, depending on initial bet configuration and rune total posted. If no takers by TTL height, bet closes and runes are returned to bet creator.

example 1: Player 1 wants to make an open wager that BTC price will be >=$80,000 USD/BTC on (official price site) at any point before block height 850,500. Player 1 is willing to wager 95,000 RUNNING•BITCOIN per taker, and allows a maximum of 20 takers, so locks 1,900,000 RUNNING•BITCOIN in the wager. Player 1 specifies a TTL height for bet participation to refer to when the bet should stop allowing takers. Wager is published and each taker can take 1 of the 20 bets available for 95,000. 5 total takers participate before the TTL block. Excess rune amount that was untaken (1,425,000) should return to bettor after TTL block. Bet settles once

scenario a - price is reached: Player 1 receives 95,000 from each of the 5 takers plus the 475,000 he put up for a total of 950,000 RUNNING•BITCOIN runes.

scenario b - price is not reached: Player 1 loses once block height 850,500 is reached and loses 95,000 to each of the 5 takers. Each of the 5 takers receives total of 190,000 RUNNING•BITCOIN runes (95,000 that they posted, 95,000 that they won).