ITridentPool
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
Name | Type | Description |
---|---|---|
data | bytes | ABI-encoded params that the pool requires. |
Returns
Name | Type | Description |
---|---|---|
finalAmountOut | uint256 | The 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
Name | Type | Description |
---|---|---|
data | bytes | ABI-encoded params that the pool requires. |
Returns
Name | Type | Description |
---|---|---|
finalAmountIn | uint256 | The amount of input tokens that are required from the user if the trade is executed. |