Skip to content
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

feat(supplementary-contracts): add TokenUnlocking to supplementary #16824

Closed
wants to merge 18 commits into from

Conversation

adaki2004
Copy link
Contributor

Added the first version of TokenUnlocking contract.

Pretty simple, but there are some todo, please search for that text.

So my question (i also asked in discord DM):

Base situation, per those quarterly/half-yearly unvesting and it’s excersise :

  1. Bob gets purchase notice from company (for the actual amount)
  2. Bob decides to buy
  3. If buy happened that amount of TKO token is deposited into the contract.

But the question here is: Is Bob really paying OR he acknowledges that he wants to get those tokens and he will pay once he will withdraw ?

  1. Bob is paying for his tokens 'upfront', right. In case int the smart contract there is no need to maintain a costToWithdraw and costToken variables, because the purchase notice has to be paid before the vested amount is deposited into the contract. (If so, i have to remove them and contract gets simpler).
    OR
  2. payment still remains the same ? During withdrawal, Bob pays for it.

And in the situation above steps nr. 1 & 2 is just a "YES-I-ACKNOWEDGE-I-WANT-MY-TOKENS", but Bob does not have to pay immediately (just at withdrawal).

Somewhat i'm kind of in favor of the second version, because of the following reason:

  • Bob knows TKO price NOW, but since those vested tokens not immediately unlocked, he does not know the price at time of unlock. So would be uncertain, if it worth to get those tokens or not.
  • In case of grant nr. 1, it is OK since price is max 0.01 usd per token, but in case of grant nr. 2, we wont know what will be the price at unlocking...

@adaki2004
Copy link
Contributor Author

adaki2004 commented Apr 24, 2024

@dantaik No idea why it shows so many diffs.. I based my branch off of this, could you please resolve this issue or let me know how can i ?
kép

Copy link

feat(supplementary-contracts): add TokenUnlocking to supplementary

Generated at commit: 00542b4eea6d283c5f8c06acf596bba1bc0b25b2

🚨 Report Summary

Severity Level Results
Contracts Critical
High
Medium
Low
Note
Total
2
2
0
6
40
50
Dependencies Critical
High
Medium
Low
Note
Total
0
0
0
0
0
0

For more details view the full report in OpenZeppelin Code Inspector

@dantaik
Copy link
Contributor

dantaik commented Apr 24, 2024

@dantaik No idea why it shows so many diffs.. I based my branch off of this, could you please resolve this issue or let me know how can i ? kép

You should create a new PR off the main branch, copy your new files there and compile. We shall also use the npm to manage contracts dependency without using forge's /lib folder.

@adaki2004 adaki2004 closed this Apr 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants