#[repr(C)]
pub enum CurveType {
ConstantProduct,
ConstantPrice,
Stable,
Offset,
}
Expand description
Curve types supported by the token-swap program.
Variants
ConstantProduct
Uniswap-style constant product curve, invariant = token_a_amount * token_b_amount
ConstantPrice
Flat line, always providing 1:1 from one token to another
Stable
Stable, like uniswap, but with wide zone of 1:1 instead of one point
Offset
Offset curve, like Uniswap, but the token B side has a faked offset
Trait Implementations
sourceimpl Default for CurveType
impl Default for CurveType
Sensible default of CurveType to ConstantProduct, the most popular and well-known curve type.
impl Copy for CurveType
impl StructuralPartialEq for CurveType
Auto Trait Implementations
impl RefUnwindSafe for CurveType
impl Send for CurveType
impl Sync for CurveType
impl Unpin for CurveType
impl UnwindSafe for CurveType
Blanket Implementations
impl<T> AbiExample for T
impl<T> AbiExample for T
default fn example() -> T
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more