Feed the PoolTogether prize (Hackathon: New York Blockchain Week)
It is a simple contract usefull for increasing the prize of PoolTogether. When someone deposits DAI
, using feedPrize
function, the amount is splitted and a portion of it is deposited into PoolTogether to increase the sponsored amount
and the another portion is reserved to Idle Finance.
The sponsored amount
earns interest but is not eligible to win, I choosed this mechanism instead
of depositing eligible tickets to prevent the deposited amount
to act as some sort of prize monopolization. Instead the deposit is lend into idle finance to gain interests. I decided to use Idle for earning interests because it tends to maximilise the yield chasing the best APR.
Every time a user deposits or withdraws, the contract does some sort of rebalancing between the deposited amount in PoolTogether and that the one into Idle. The amount in PoolTogether does not change, all interests is used for the weekly prize but the amount in idle increases. If the two amounts are balanced then it divides 50%/50% between PoolTogether and Idle. The same behavior is obtained if there is any amount left after a rebalance process.
In a long run this contract can earn interests only by using funds obtained by other interests. If users withdraw all DAI
deposited into this contract, it can continue to increase the weekly prize, forever. I would like to imagine this contract with funds generated by interest locked forever into it, useful for increasing the prize, week by week.
N.B The contract is not completed yet and not tested.