origin-js
origin-js copied to clipboard
Tool for vesting employee token grants
At a minimum, this tool would need to:
- Transfer tokens to a set of Ethereum address(es) for each employee, respecting each grant's vesting cliff and schedule
- Help preserve privacy of each grantholder
- Some sort of logging or way of reporting / verifying vesting-related actions
- A dry run mode to show operations without actually performing them, as a sanity check
This could be implemented as a command-line JS tool that uses an input JSON file that contains grant information. The input file would be maintained by @joshfraser and/or @matthewliu to start.
I've sketched out what I'm thinking:

The contract I have so far is here: https://github.com/OriginProtocol/origin-js/blob/cuongdo/token_vesting/contracts/contracts/token/TokenVesting.sol
Some tests are here: https://github.com/OriginProtocol/origin-js/blob/cuongdo/token_vesting/contracts/test/TestTokenVesting.js
@nick @joshfraser any comments?
This looks right to me. We may want to consider processing all the distributions on the same day of the month for added privacy, but that's an ongoing fight I'm having with @matthewliu.
It sounds like we'll need to keep a hot wallet on the server that is running the cron job to cover gas. Not a big deal given the amount at stake.
Update: we've had some discussions, but nothing conclusive yet. Will continue to explore ideas but will postpone further implementation until mainnet launch is further along.