P2p ecash betting on video games (at the moment, flappy bird)

Motivation: Viral games + lighthing/zaps/ecash betting = fun + growNostr

I have a 2 player flappy bird game built, players join a room and use pusher tocreate a webRTC connection and then pass game data back and forth.

To add ecash-based betting, the most straightforward way looks like...

Scratch that. The most straightforward way would be to custody the ecash myself but I don't want to do that BC its the least cypherpunk option and also unlicensed money transmitter.

The next simplest way looks like doing pay-to-pubkey multisigs with a 2-of-3 req (players 1 and 2 and the game server). When a winner wins, the server and the winner sign the pay-to-pubkey in the mint so the winner can take it.

I need to test out if the sigs can be sent async or if you need both at the same time. If they're async that would be bad BC the loser could snipe the winnings.

Next option looks like doing pay to pubkey multisigs again but only require 1 of 3. This would use a DLC to publish one of the 3 game outcomes. Or could I just make 3 different pubkeys and send the SIG on the backend?

While these are still fairly custodial, at least with the P2PK you can have an expiration so the players can refund if something weird happens

Reply to this note

Please Login to reply.

Discussion

No replies yet.