Skip to main content

IBorrowCallback

Git Source

Functions

ammalgamBorrowCallV1

The callback in the AmmalgamPair.borrow() function transfers borrowed amountXAssets and amountYAssets to the borrower which doesn't include the initial lending fee. The amountXShares and amountYShares minted debt shares for the borrower include the initial lending fee.

function ammalgamBorrowCallV1(
address sender,
uint256 amountXAssets,
uint256 amountYAssets,
uint256 amountXShares,
uint256 amountYShares,
bytes calldata data
) external;

Parameters

NameTypeDescription
senderaddress
amountXAssetsuint256The amount of token X involved in the borrow.
amountYAssetsuint256The amount of token Y involved in the borrow.
amountXSharesuint256The shares of token X involved in the borrow including the initial lending fee.
amountYSharesuint256The shares of token Y involved in the borrow including the initial lending fee.
databytesThe calldata provided to the borrow function.

ammalgamBorrowLiquidityCallV1

The callback in the AmmalgamPair.borrowLiquidity() function transfers borrowed amountXAssets and amountYAssets to the borrower which doesn't include the initial lending fee. The amountLShares minted debt shares for the borrower include the initial lending fee.

function ammalgamBorrowLiquidityCallV1(
address sender,
uint256 amountXAssets,
uint256 amountYAssets,
uint256 amountLShares,
bytes calldata data
) external;

Parameters

NameTypeDescription
senderaddress
amountXAssetsuint256The amount of token X involved in the borrow liquidity.
amountYAssetsuint256The amount of token Y involved in the borrow liquidity.
amountLSharesuint256The shares of liquidity involved in the borrow liquidity including the initial lending fee.
databytesThe calldata provided to the borrow liquidity function.