pub trait Adl {
// Required methods
fn validate_adl(
&self,
oracle: &Oracle,
is_long: bool,
max_staleness: u64,
) -> Result<(), CoreError>;
fn latest_adl_time(&self, is_long: bool) -> Result<i64, CoreError>;
fn update_adl_state(
&mut self,
oracle: &Oracle,
is_long: bool,
) -> Result<(), Error>;
}
Expand description
Trait for defining operations related to auto-deleveraging.
Required Methods§
Sourcefn validate_adl(
&self,
oracle: &Oracle,
is_long: bool,
max_staleness: u64,
) -> Result<(), CoreError>
fn validate_adl( &self, oracle: &Oracle, is_long: bool, max_staleness: u64, ) -> Result<(), CoreError>
Validate if the ADL can be executed.