PairLib
Table of Contents
-
$FEE_DENOMINATOR
: string
-
$SLIPPAGE
: string
-
amountWithSlippage()
: string
-
getAmountIn()
: mixed
-
getAmountOut()
: mixed
-
getFeeDenominator()
: string
-
getSlippage()
: string
-
quote()
: mixed
-
setFeeDenominator()
: void
-
setSlippage()
: void
-
toFormat()
: string
$FEE_DENOMINATOR
private
string
$FEE_DENOMINATOR
= "9998"
$SLIPPAGE
private
string
$SLIPPAGE
= "10"
amountWithSlippage()
public
amountWithSlippage(string $amount, MathInterface $math) : string
Parameters
-
$amount
: string
-
-
$math
: MathInterface
-
Return values
string
—
getAmountIn()
public
getAmountIn(mixed $amountOut, mixed $reserveIn, mixed $reserveOut, MathInterface $math) : mixed
Parameters
-
$amountOut
: mixed
-
-
$reserveIn
: mixed
-
-
$reserveOut
: mixed
-
-
$math
: MathInterface
-
Return values
mixed
—
getAmountOut()
public
getAmountOut(mixed $amountIn, mixed $reserveIn, mixed $reserveOut, MathInterface $math) : mixed
Parameters
-
$amountIn
: mixed
-
-
$reserveIn
: mixed
-
-
$reserveOut
: mixed
-
-
$math
: MathInterface
-
Return values
mixed
—
getFeeDenominator()
public
getFeeDenominator() : string
Return values
string
—
getSlippage()
public
getSlippage() : string
Return values
string
—
quote()
public
quote(mixed $amountA, mixed $reserveA, mixed $reserveB, MathInterface $math) : mixed
Parameters
-
$amountA
: mixed
-
-
$reserveA
: mixed
-
-
$reserveB
: mixed
-
-
$math
: MathInterface
-
Return values
mixed
—
setFeeDenominator()
public
setFeeDenominator(string $value) : void
Parameters
-
$value
: string
-
Return values
void
—
setSlippage()
public
setSlippage(string $value) : void
Parameters
-
$value
: string
-
Return values
void
—
public
toFormat(string $amount, string $denominator) : string
Parameters
-
$amount
: string
-
-
$denominator
: string
-
Return values
string
—