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

Rewrite data model and interface for token-vesting program #3

Open
s-medvedev opened this issue Mar 22, 2022 · 0 comments
Open

Rewrite data model and interface for token-vesting program #3

s-medvedev opened this issue Mar 22, 2022 · 0 comments
Assignees

Comments

@s-medvedev
Copy link
Contributor

s-medvedev commented Mar 22, 2022

The data model of the original contract involves storing the balance to which the funds will be withdrawn. Using this data, the contract allows any user to withdraw funds, as well as the owner of the balance to set a new withdrawal address.
However, the account owner can be changed using the spl-token program. This change can be made outside of the vesting contract and violates the integrity of the user's vote weight data in the governance contract.

To ensure data integrity, it was decided to change the contract data model, as well as the method interface.

Changes to be made:

  1. store the owner in the vesting record, not the withdrawal address
  2. change the list of accounts in the instructions in accordance with the changes in the model
  3. replace the ChangeDestination instruction with ChangeOwner

┆Issue is synchronized with this Jira Task by Unito

@s-medvedev s-medvedev self-assigned this Mar 22, 2022
s-medvedev pushed a commit that referenced this issue Mar 22, 2022
mich-master pushed a commit that referenced this issue Mar 22, 2022
…te with spl-governance #3 (#4)

Co-authored-by: Semen Medvedev <[email protected]>
@sync-by-unito sync-by-unito bot closed this as completed Jun 14, 2022
@YYYurchenko YYYurchenko reopened this Jun 14, 2022
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

No branches or pull requests

2 participants