Skip to content

Events ​

Swap ​

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

Emitted on token swaps

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 ​

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

Emitted when liquidity is added with shares specified.

Parameters ​

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

LogWithdrawPerfectColLiquidity ​

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

Emitted when liquidity is withdrawn with shares specified.

Parameters ​

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

LogBorrowPerfectDebtLiquidity ​

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

Emitted when liquidity is borrowed with shares specified.

Parameters ​

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

LogPaybackPerfectDebtLiquidity ​

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

Emitted when liquidity is paid back with shares specified.

Parameters ​

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

LogDepositColLiquidity ​

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

Emitted when liquidity is deposited with specified token0 & token1 amount

Parameters ​

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

LogWithdrawColLiquidity ​

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

Emitted when liquidity is withdrawn with specified token0 & token1 amount

Parameters ​

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

LogBorrowDebtLiquidity ​

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

Emitted when liquidity is borrowed with specified token0 & token1 amount

Parameters ​

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

LogPaybackDebtLiquidity ​

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

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

Parameters ​

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

LogWithdrawColInOneToken ​

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

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

Parameters ​

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

LogPaybackDebtInOneToken ​

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

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

Parameters ​

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

LogArbitrage ​

solidity
event LogArbitrage(int256 routing, uint256 amtOut)

Emitted when internal arbitrage between 2 pools happen

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