Vesting Distribution

Hey everyone,

I’m currently working on the distribution of vesting rewards. I’m pretty much done on the scraping scripts side of things, which you can check out here The code has not been reviewed yet by anyone, but the results seem about right.

As the best solution would be releasing the rewards on a block by block basis, I’d like to get as close as possible to that, in a gas efficient way of course. The current idea is using a merkle tree on chain, which should be fine. However, I need to figure out how to update the data as often as possible.

There could be a new contract deployed every week / month, but that would unfortunately increase the gas costs, especially for smaller farmers.

The other idea is, that we could update the data on one contract, again weekly/monthly. I feel like this would be the best solution. In my mind it works something like this:

    1. We freeze the claiming every Sunday (/ weekend)
    1. Go through the claim logs, subtract the amounts claimed
    1. Add the next weeks values
    1. Update the merkle tree root, clear the claimed map
    1. Unfreeze

This method is prone to human error though, and places more trust into the hands of the devs. Of course all the data would be verifiable, so it could be acceptable.

If you have any ideas, I’d love to hear them!


I’m not a dev so I cant comment on the technicals but I do want to ask if we should be factoring ETH2.0 developments into this vesting rewards solution?

There’s nothing to incorporate :smile:

1 Like

The merkle tree solution is technically very cool. It would be low cost for the team, but for the farmers it would mean extra gas to withdraw their vested Sushi. I still think that when we redo the SushiBar to add incentives to stay in longer, we could add a benefit of harvesting directly from the farms to the SushiBar. This would switch from a forced vesting, to a benefit for hodling. Carrot instead of stick. On top of that, in a few months the emissions would have already dropped significantly, so heavy dumping of Sushi isn’t much of an issue anymore.


That’d be harvesting (-> staking) continually, as the Sushi gets “unlocked”, or just ending vesting at the 6 month mark (February-March?) and allowing people to stake everything at once?

I’d say the current vestings would be put into the SushiBarV2 for the users… so they CAN withdraw it, but would lose the benefits of 6 months of vesting… from then on, newly harvested SUSHI can be harvested into the SushiBar for a benefit… it’s not fully designed yet as we’re busy with BentoBox now, but I would like to replace the ‘centralized’ vesting solution with something better and something decentralized :slight_smile: