-
Notifications
You must be signed in to change notification settings - Fork 11.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make TokenVesting more aligned with usual requirements #1214
Comments
What if we kept it out of the 2.0 release, since we know we're going to revamp it? It could then be later added in a minor release. |
https://github.com/JoinColony/colonyToken/blob/master/contracts/Vesting.sol - I like this one Let me know if you want me to submit a PR. But before we do it, please come up with clear specs. what I like about Colony's contracts:
|
@rstormsf We actually want to keep the current model where there is one vesting contract deployed per schedule per beneficiary, and Colony's The continuous release is the biggest issue with our current offering. We need the possibility to make it non-continuous because that's the way actual paper-based vesting contracts are signed. Those may, for example, vest monthly, i.e. release only at the end of each month. The frequency is one of the parameters that we have to add, but we need to do some more research on the typical vesting schedules used and try to support them. There may be other parameters necessary. |
@frangio
any reason to keep it that way vs having a |
@rstormsf Because it better sandboxes each investor's funds. It's also a simpler implementation, resulting in less attack surface. |
#1040 by @ninjaahhh proposed graded vesting, where the amount of tokens released during each period doesn't remain the same (in their project, it increased as time went by). We may want to consider adding this to our implementation. |
As a token contract owner, I would like to vest tokens to recipients on a “monthly” & non-linear basis, so that tokens are released on a controlled monthly interval (as opposed to token holders withdrawing at their leisure) |
Thanks for your input @thedon-chris! Would you (the owner) be in charge of doing the release of tokens (i.e. manually sending out transactions for each holder), or would the holders withdraw their tokens once they're able to do so (e.g. monthly)? Also, does this restriction come from a legal requirement? Are there any other aspects of the vesting scheme that you find don't fulfill your needs? |
@nventuro, I'm speaking as a representative of others by the way. I wouldn't want to manually send out the transactions for each holder, instead they would withdraw once they're able to do so (or monthly). Restriction does not come from a legal requirement AFAIK. |
I have something I'd like to share that might be of interest to this group. I have just completed implementation of a pretty sophisticated ERC20 contract for a full-featured vesting token. I rolled my own because what I've seen on the internet so far hasn't met our needs, which include many of the wishes expressed above. Our implementation is based on openzeppen-solidity as much as possible, and is built along the same guidelines of style and works harmoniously with it. I will be publishing this work on GitHub within the next day or so, and will post the link here for all to see when it's up. Here is a brief summary of its features and capabilities:
I am wrapping up loose ends with this work before I publish the source, but it will be soon. I am eager to receive any feedback and hear ideas for improvement that this group may have. Also, I hope many of you will find it useful, and can help me improve on it. Thanks!
|
We've shared the code to the world, for all to look at, reuse and improve upon. Another wish is to get some experienced fresh eyes on the Solidity code, to have a look for any obvious problems. Any comments, feedback or ideas will all be appreciated and used constructively. Please see here: https://github.com/mediarichio/ProxyToken A good starting might be: https://github.com/mediarichio/ProxyToken/blob/master/contracts/ERC20Vestable.sol Thank you :-) Note: We are currently experiencing issues with our GitHub repository, which at the moment is not reachable (you may see a 404). We are working with GitHub to resolve this as soon as possible. If you are unable to see ProxyToken, please check back in a day or two (I will remove this message once it has been resolved). Thank you for your patience. |
Wishes stated in the above conversation that are supported by my implementation:
What’s not supported, which I saw mentioned above:
Eager to hear your feedback. |
If someone is looking for a vesting contract, feel free to use this one: https://etherscan.io/address/0xd6d79f85d8cb962b15181aac0c1545d61b6c5672#code It's battle tested already with cliffs, monthly releases. https://gist.github.com/rstormsf/7cfb0c6b7a835c0c67b4a394b4fd9383 |
@rstormsf i made some amends to your contract here https://github.com/tapmydata/tap-protocol/blob/main/contracts/VestingVault.sol and added tests for it. Thanks. |
Here's a modified version as well that vests ether instead of tokens: https://github.com/dan13ram/grants-platform-contracts/blob/master/contracts/EtherVesting.sol It's the one used at opengrants.com |
Hello , I used the vestingvault contract but at the time of using addTokenGrant() , it throws an error of 'subtraction overflow' . I believe that is to say that owner does not have any token at the time of transfer to contract . but I provided all 1 billion token to owner in ERC20 contract at time of deployment. My contract vestingvault.sol is at Can somebody kindly debug the issue ? |
I'm on mobile but from your message only my first guess is: did owner approve the contract to be permitted to transferFrom? |
You mean I should run approve() in vesting contract ? |
On the token contract to approve the vesting to `transferFrom` the owner
…On Thu, Apr 29, 2021 at 10:23 AM ashishk74 ***@***.***> wrote:
I'm on mobile but from your message only my first guess is: did owner
approve the contract to be permitted to transferFrom?
You mean I should run approve() in vesting contract ?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#1214 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAEZHQN66P36PQENSWFRZRDTLFTUTANCNFSM4FP7R7AQ>
.
|
@ashishk74 @NoahMarconi Please open a different issue or a topic on the forum, as many people are probably subscribed to this issue and get notifications. |
Hi @djenning90 I've a question, Can we able to Vest Tokens for Multiple Users in 1 Trx, Let's say that we want to Vest the Tokens for 1000 Users, Is that possible? |
@alcuadrado mentioned to me that our
TokenVesting
contract is not aligned with the usual requirements for vesting, so some potential users have had to write their own implementations.For example, our contract does a "continuous" release of tokens, whereas the usual requirement is for tokens to be released in batches e.g. every month.
We should review the contract and make it conform to what users need.
I'm a bit concerned that this will be a breaking change but we won't be able to get it done for v2.0. So perhaps we should look into adding any parameters that we need now, and implement support for them later. For example, for the issue I described above we could add a "granularity" parameter in the constructor (problaby a bad name) and for now require that it is always zero. Just a thought.
The text was updated successfully, but these errors were encountered: