Skip to main content

ERC20DebtLiquidityToken

Git Source

Inherits: ERC20DebtBase

Functions

constructor

constructor(
ERC20BaseConfig memory config
) ERC20DebtBase(config);

ownerMint

function ownerMint(
address sender,
address to,
uint256 assets,
uint256 shares
) public override(ERC20Base, IAmmalgamERC20) onlyOwner;

ownerBurn

function ownerBurn(address sender, address onBehalfOf, uint256, uint256 shares) public override onlyOwner;

borrowCall

We use the callback to transfer debt to the caller and transfer borrowed assets to the receiver. This contract never has assets or shares unless they were sent to it by the pair within the context of this function getting called. Calling this function directly will not do anything because there are no assets or shares to transfer.

function borrowCall(address sender, uint256 assetsX, uint256 assetsY, uint256 sharesL, bytes calldata data) public;

Parameters

NameTypeDescription
senderaddress
assetsXuint256amount of tokenX sent to this contract
assetsYuint256amount of tokenY sent to this contract
sharesLuint256amount of liquidity debt added to this contract
databytesencoded data containing the caller and receiver addresses