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

Vault: Add per-epoch withdraw caps for each vault #3

Open
buffalu opened this issue Jul 25, 2024 · 2 comments · May be fixed by #29
Open

Vault: Add per-epoch withdraw caps for each vault #3

buffalu opened this issue Jul 25, 2024 · 2 comments · May be fixed by #29
Labels
good first issue Good for newcomers

Comments

@buffalu
Copy link
Contributor

buffalu commented Jul 25, 2024

Add per-epoch withdraw caps on a vault basis as a pro-rata share of the vault stake which prevents excess withdraws

@buffalu buffalu added the good first issue Good for newcomers label Jul 25, 2024
@aoikurokawa
Copy link
Contributor

Hi. @buffalu
I want to make sure thatI am understanding correctly.
So what you means is that adding new those attributes to the Vault like below?

Ex:

#[derive(Debug, Clone, Copy, PartialEq, BorshDeserialize, BorshSerialize)]
pub struct Vault {
    ...
    
    /// The maximum amount of tokens that can be withdrawn per epoch
    epoch_withdraw_cap: u64,

    /// The current epoch number
    current_epoch: u64,

    /// The amount of tokens withdrawn in the current epoch
    epoch_withdrawn_amount: u64,
}

@buffalu
Copy link
Contributor Author

buffalu commented Aug 2, 2024

Hi. @buffalu I want to make sure thatI am understanding correctly. So what you means is that adding new those attributes to the Vault like below?

Ex:

#[derive(Debug, Clone, Copy, PartialEq, BorshDeserialize, BorshSerialize)]
pub struct Vault {
    ...
    
    /// The maximum amount of tokens that can be withdrawn per epoch
    epoch_withdraw_cap: u64,

    /// The current epoch number
    current_epoch: u64,

    /// The amount of tokens withdrawn in the current epoch
    epoch_withdrawn_amount: u64,
}

yeah, exactly! i think blocked on #10 but should be done with that in the next 24 hours

@aoikurokawa aoikurokawa linked a pull request Aug 11, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants