The current claims rate limiter can easily be sybil attacked to avoid burn. The goal of the rate limiter was to require that miners should have to take on at least 1 day of price exposure to their mining rewards before they can sell. This would be better achieved through a vesting schedule.
In this pr, I've introduced an hourly vesting schedule as a [u64; 25] type on the proof account. A miner receives rewards in the [0] slot and every hour they move forward one position in the array through the vest_rewards function (done as part of every mine and claim).
Only rewards in the [24] slot are considered fully vested and may be claimed.
The current claims rate limiter can easily be sybil attacked to avoid burn. The goal of the rate limiter was to require that miners should have to take on at least 1 day of price exposure to their mining rewards before they can sell. This would be better achieved through a vesting schedule.
In this pr, I've introduced an hourly vesting schedule as a
[u64; 25]
type on the proof account. A miner receives rewards in the[0]
slot and every hour they move forward one position in the array through thevest_rewards
function (done as part of everymine
andclaim
).Only rewards in the
[24]
slot are considered fully vested and may be claimed.