social-dist0rtion-protocol / planet-a

The Tragedy of the CO₂mmons
MIT License
10 stars 3 forks source link

Select random outputs to scale on multiple users #26

Closed vrde closed 5 years ago

vrde commented 5 years ago

Note: merge #20 before this.

Problem: many users might handshake at the same time, selecting the same output for their transaction. This will create double spends, failed transactions, and unhappy users.

Solution: given that all outputs have enough tokens to spend, select and use a random one for the transaction. This requires also to make multiple outputs available to the contract address before the start of the game.