Introducing Harber.io- combining prediction markets and NFTs for the first time

Andrew Stanger
Jan 13 · 3 min read

“Don’t bet on it, own it”

Live now on Kovan- www.harber.io. Video demo here. Github repo here.

If you think Manchester United will win the English Premier League, instead of simply putting money on them, rent the Manchester United token.

Everyone knows NFT wallets look better with a football team in it

Harber.io is a unique gambling platform, built on top of Augur. There is one NFT per team/outcome. To rent a token, users set a daily rental price and deposit DAI to fund the rent. Token ownership changes via modified Harberger tax rules.

At the end of the season/event, all holders of the winning NFT will receive a split of the total rental payments in proportion to how long they have held the token. Unlike more traditional gambling, your winnings are not determined by how much money you invest. All that matters is how long you own the token for.

Augur V2 is used as an Oracle. All rental payments are funnelled straight to Augur and used to purchase ‘complete sets’, or a share of every outcome. Upon market resolution, these are sold and the proceeds distributed to the winners.

Tokens are fully ERC721 compliant (and can be viewed in any ERC721 wallet) with the exception that only the contract can modify the owner.

How does it work?

Finally, an excuse to create a Donald Trump NFT

To rent a token, simply choose a daily rental price and deposit some DAI to fund the rent. If the token is already owned, no problem- just set a higher rental price and you will immediately become the new owner. Unlike traditional Harberger Tax rules, the new owner does not need to pay anything to the previous owner.

Users are free to withdraw their unused deposits at any time.

If your deposit runs out (or you withdraw it), token ownership will revert to the previous owner. Crucially, the price will also revert to what it was at the time- you will never end up paying a higher rental price than you originally set. If there are no previous owners, the token becomes unowned, and the price is set to zero.

For a more fleshed out and numerical example, see the ‘Example Flow’ in the Github readme here.

Harber will be funded by a 1% fee on rent.

This is my first dapp and would welcome any feedback or suggestions (or if you would like to get involved). My telegram is mcplums.

Acknowledgements

This project began as a fork of Simon de la Rouviere’s brilliant project ThisArtworkIsAlwaysOnSale so I am very grateful to him.

I am currently doing the Consensys Solidity Bootcamp and am grateful to my mentors, especially Dipesh, Nich, Amal and Josh.

Exhibiting an extreme tolerance for stupid questions, I am also very grateful to Micah and others from the Augur discord. Thanks also to Chris from my local meetup.

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade