A cool opt-in UBI proof of concept for Aracon 2019.
The contract flow is splitted in two periods:
- contribution
- collection
Anyone can give ETH to the contract to be collected later by token holders.
People making money from Aracon are encouraged to contribute.
Other functions are disabled
- We don't accept ETH anymore (though we have to consider the fact that the contract may still receive some, for example via
selfdestruct
calls) - Token holders can claim a percentage of the contract's balance
- Token holder calls contract
- We compute the share as
toSend = this.balance / (tokenSupply / tokenBalance)
which equals totoSend = (this.balance * tokenBalance) / tokenSupply
- We
burn
the tokens of the holder, tokens vanishes! - We send him its reward