How we exchanged christmas gifts with ethereum
We are experimenting with different things you can do with ethereum tokens, this time a gift exchange game minigame
Secret Santa is a Christmas tradition in which members of a group or community are randomly assigned a person to whom they give a gift. The identity of the gift giver is a secret not to be revealed until after the gift is opened.
While secret santa is usually IRL, A cool thing about Blockchain is that you can escrow assets of users and use them programmatically, and we did just that a few weeks ago with a ver simple smart contract. This is how it worked:
- The last week of the year, players could send 1 Darkwinds card to the santa contract.
- On January 1, a command was sent to shuffle all the cards
- Now, all who participated can claim a random gift
The results are in, and this is what’s happened:
- 6% of the total players sent gifts
- 5 players sent rare cards
- 1 player sent a very rare card
Players can claim their gift in the Loot section of Darkwinds.
This is a simple, but remarkable use of Ethereum because it provides the same utility of a lottery ball machine: It’s easy for us to prove that we’ll act honestly about gift allocation.
You can see the source code we used on GitHub, which should work with other ERC721 tokens too.