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

Ability to stake CVX on deposit #299

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

Ability to stake CVX on deposit #299

wants to merge 2 commits into from

Conversation

0xIryna
Copy link
Collaborator

@0xIryna 0xIryna commented Mar 14, 2024

Scope:

  • upon deposit, CVX is either staked or left in the contract depending on how close the current timestamp is to the next epoch
  • within 24 hours before the next epoch, anybody can unstake CVX and lock it
  • staked CVX is unstaked if there isn't enough unlocked CVX to fulfill withdrawals
  • relocking was removed from requestWithdraw and withdrawLocked functions

Further improvement suggestions:

  • do not call _processExpiredLocks on deposit
  • add a check for expired locks, rather than calling _processExpiredLocks
  • leave deposited CVX in the contract and stake it periodically based on accumulated value and proximity to the epoch

@0xIryna 0xIryna changed the title Feat/cvx staking Ability to stake CVX on deposit Mar 14, 2024
@0xIryna 0xIryna marked this pull request as ready for review March 14, 2024 23:34
@0xIryna 0xIryna requested a review from Philogy March 14, 2024 23:48
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.

1 participant