Skip to content

Events ​

Git Source

Events ​

Swap ​

Emitted on token swaps

solidity
event Swap(bool swap0to1, uint256 amountIn, uint256 amountOut, address to);

Parameters

NameTypeDescription
swap0to1boolIndicates whether the swap is from token0 to token1 or vice-versa.
amountInuint256The amount of tokens to be sent to the vault to swap.
amountOutuint256The amount of tokens user got from the swap.
toaddressRecepient of swapped tokens.

LogDepositPerfectColLiquidity ​

Emitted when liquidity is added with shares specified.

solidity
event LogDepositPerfectColLiquidity(uint256 shares, uint256 token0Amt, uint256 token1Amt);

Parameters

NameTypeDescription
sharesuint256Expected exact shares to be received.
token0Amtuint256Amount of token0 deposited.
token1Amtuint256

LogWithdrawPerfectColLiquidity ​

Emitted when liquidity is withdrawn with shares specified.

solidity
event LogWithdrawPerfectColLiquidity(uint256 shares, uint256 token0Amt, uint256 token1Amt);

Parameters

NameTypeDescription
sharesuint256shares burned
token0Amtuint256Amount of token0 withdrawn.
token1Amtuint256Amount of token1 withdrawn.

LogBorrowPerfectDebtLiquidity ​

Emitted when liquidity is borrowed with shares specified.

solidity
event LogBorrowPerfectDebtLiquidity(uint256 shares, uint256 token0Amt, uint256 token1Amt);

Parameters

NameTypeDescription
sharesuint256shares minted
token0Amtuint256Amount of token0 borrowed.
token1Amtuint256Amount of token1 borrowed.

LogPaybackPerfectDebtLiquidity ​

Emitted when liquidity is paid back with shares specified.

solidity
event LogPaybackPerfectDebtLiquidity(uint256 shares, uint256 token0Amt, uint256 token1Amt);

Parameters

NameTypeDescription
sharesuint256shares burned
token0Amtuint256Amount of token0 paid back.
token1Amtuint256Amount of token1 paid back.

LogDepositColLiquidity ​

Emitted when liquidity is deposited with specified token0 & token1 amount

solidity
event LogDepositColLiquidity(uint256 amount0, uint256 amount1, uint256 shares);

Parameters

NameTypeDescription
amount0uint256Amount of token0 deposited.
amount1uint256Amount of token1 deposited.
sharesuint256Amount of shares minted.

LogWithdrawColLiquidity ​

Emitted when liquidity is withdrawn with specified token0 & token1 amount

solidity
event LogWithdrawColLiquidity(uint256 amount0, uint256 amount1, uint256 shares);

Parameters

NameTypeDescription
amount0uint256Amount of token0 withdrawn.
amount1uint256Amount of token1 withdrawn.
sharesuint256Amount of shares burned.

LogBorrowDebtLiquidity ​

Emitted when liquidity is borrowed with specified token0 & token1 amount

solidity
event LogBorrowDebtLiquidity(uint256 amount0, uint256 amount1, uint256 shares);

Parameters

NameTypeDescription
amount0uint256Amount of token0 borrowed.
amount1uint256Amount of token1 borrowed.
sharesuint256Amount of shares minted.

LogPaybackDebtLiquidity ​

Emitted when liquidity is paid back with specified token0 & token1 amount

solidity
event LogPaybackDebtLiquidity(uint256 amount0, uint256 amount1, uint256 shares);

Parameters

NameTypeDescription
amount0uint256Amount of token0 paid back.
amount1uint256Amount of token1 paid back.
sharesuint256Amount of shares burned.

LogWithdrawColInOneToken ​

Emitted when liquidity is withdrawn with shares specified into one token only.

solidity
event LogWithdrawColInOneToken(uint256 shares, uint256 token0Amt, uint256 token1Amt);

Parameters

NameTypeDescription
sharesuint256shares burned
token0Amtuint256Amount of token0 withdrawn.
token1Amtuint256Amount of token1 withdrawn.

LogPaybackDebtInOneToken ​

Emitted when liquidity is paid back with shares specified from one token only.

solidity
event LogPaybackDebtInOneToken(uint256 shares, uint256 token0Amt, uint256 token1Amt);

Parameters

NameTypeDescription
sharesuint256shares burned
token0Amtuint256Amount of token0 paid back.
token1Amtuint256Amount of token1 paid back.

LogArbitrage ​

Emitted when internal arbitrage between 2 pools happen

solidity
event LogArbitrage(int256 routing, uint256 amtOut);

Parameters

NameTypeDescription
routingint256if positive then routing is amtIn of token0 in deposit & borrow else token0 withdraw & payback
amtOutuint256if routing is positive then token1 withdraw & payback amount else token1 deposit & borrow