Skip to main content

FeePolicy

FeePolicy

FeePolicyLibrary

RATE_PRECISION

uint256 RATE_PRECISION

MAX_FEE_RATE

int256 MAX_FEE_RATE

MIN_FEE_RATE

int256 MIN_FEE_RATE

RATE_MASK

uint256 RATE_MASK

InvalidFeePolicy

error InvalidFeePolicy()

encode

function encode(bool usesQuote_, int24 rate_) internal pure returns (FeePolicy feePolicy)

isValid

function isValid(FeePolicy self) internal pure returns (bool)

usesQuote

function usesQuote(FeePolicy self) internal pure returns (bool f)

rate

function rate(FeePolicy self) internal pure returns (int24 r)

calculateFee

function calculateFee(FeePolicy self, uint256 amount, bool reverseRounding) internal pure returns (int256 fee)

calculateOriginalAmount

function calculateOriginalAmount(FeePolicy self, uint256 amount, bool reverseFee) internal pure returns (uint256 originalAmount)