Open buffalu opened 2 months ago
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,
}
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
Add per-epoch withdraw caps on a vault basis as a pro-rata share of the vault stake which prevents excess withdraws