Skip to content

done veVIRTUAL #61

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

Open
wants to merge 17 commits into
base: main
Choose a base branch
from
Open

done veVIRTUAL #61

wants to merge 17 commits into from

Conversation

kahwaipd
Copy link
Collaborator

No description provided.

Copy link
Contributor

@twx-virtuals twx-virtuals left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we add a function to extend the lock duration without withdrawing? I know it is possible to toggle auto renew to set it to max but would be good to have flexibility to add a manually extension

Lock memory lock = locks[_msgSender()][index];
require(block.timestamp >= lock.end, "Lock is not expired");

IERC20(baseToken).safeTransfer(_msgSender(), lock.amount);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can switch the order of this to prevent re-entrancy attack

so move the index part + delete up then do the transfer

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