Module spl_token_swap::constraints[][src]

Various constraints as required for production environments

Structs

SwapConstraints

Encodes fee constraints, used in multihost environments where the program may be used by multiple frontends, to ensure that proper fees are being assessed. Since this struct needs to be created at compile-time, we only have access to const functions and constructors. Since SwapCurve contains a Box, it cannot be used, so we have to split the curves based on their types.

Constants

SWAP_CONSTRAINTS

Fee structure defined by program creator in order to enforce certain fees when others use the program. Adds checks on pool creation and swapping to ensure the correct fees and account owners are passed.