Skip to main content

IAmmalgamCallee

Git Source

This interface should be implemented by anyone wishing to use callbacks in the swap, borrow, and borrowLiquidity functions in the IAmmalgamPair interface.

Functions

swapCall

Handles a swap call in the Ammalgam protocol.

Callback passed as calldata to swap functions in IAmmalgamPair.

function swapCall(address sender, uint256 amountX, uint256 amountY, bytes calldata data) external;

Parameters

NameTypeDescription
senderaddressThe address of the sender initiating the swap call.
amountXuint256The amount of token X involved in the swap.
amountYuint256The amount of token Y involved in the swap.
databytesThe calldata provided to the swap function.

borrowCall

Handles a borrow call in the Ammalgam protocol.

Callback passed as calldata to borrow and borrowLiquidity functions in IAmmalgamPair.

function borrowCall(address sender, uint256 amountX, uint256 amountY, uint256 amountL, bytes calldata data) external;

Parameters

NameTypeDescription
senderaddressThe address of the sender initiating the borrow call.
amountXuint256The amount of token X involved in the borrow.
amountYuint256The amount of token Y involved in the borrow.
amountLuint256The amount of liquidity involved in the borrow.
databytesThe calldata provided to the borrow function.