livepeer / merkle-mine

Token distribution based on providing Merkle proofs of inclusion in genesis state to generate allocation
29 stars 9 forks source link

Add cliff to MerkleMine contract #1

Closed dob closed 6 years ago

dob commented 6 years ago

We should add a genesis param that specifies the start of the 3rd party distribution mining period. This should either be given as a block number, or as an offset from the startBlock.

The mine() function should require that if the caller isn't the recipient then the current block number is >= this param.

The calculations in callerTokenAmountPerBlock() should calculate the mining period using this param rather than the startBlock.

yondonfu commented 6 years ago

This is now implemented by the callerAllocationStartBlock state variable and the requirement check that if the caller isn't the recipient that the current block number >= callerAllocationStartBlock is here: https://github.com/livepeer/merkle-mine/blob/master/contracts/MerkleMine.sol#L143