ITridentPool

Git Source

Trident pool interface.

Functions

getAmountOut

Simulates a trade and returns the expected output.

The pool does not need to include a trade simulator directly in itself - it can use a library.

function getAmountOut(bytes calldata data) external view returns (uint256 finalAmountOut);

Parameters

NameTypeDescription
databytesABI-encoded params that the pool requires.

Returns

NameTypeDescription
finalAmountOutuint256The amount of output tokens that will be sent to the user if the trade is executed.

getAmountIn

Simulates a trade and returns the expected output.

The pool does not need to include a trade simulator directly in itself - it can use a library.

function getAmountIn(bytes calldata data) external view returns (uint256 finalAmountIn);

Parameters

NameTypeDescription
databytesABI-encoded params that the pool requires.

Returns

NameTypeDescription
finalAmountInuint256The amount of input tokens that are required from the user if the trade is executed.