Events ​
Events ​
Swap ​
Emitted on token swaps
event Swap(bool swap0to1, uint256 amountIn, uint256 amountOut, address to);
Parameters
Name | Type | Description |
---|---|---|
swap0to1 | bool | Indicates whether the swap is from token0 to token1 or vice-versa. |
amountIn | uint256 | The amount of tokens to be sent to the vault to swap. |
amountOut | uint256 | The amount of tokens user got from the swap. |
to | address | Recepient of swapped tokens. |
LogDepositPerfectColLiquidity ​
Emitted when liquidity is added with shares specified.
event LogDepositPerfectColLiquidity(uint256 shares, uint256 token0Amt, uint256 token1Amt);
Parameters
Name | Type | Description |
---|---|---|
shares | uint256 | Expected exact shares to be received. |
token0Amt | uint256 | Amount of token0 deposited. |
token1Amt | uint256 |
LogWithdrawPerfectColLiquidity ​
Emitted when liquidity is withdrawn with shares specified.
event LogWithdrawPerfectColLiquidity(uint256 shares, uint256 token0Amt, uint256 token1Amt);
Parameters
Name | Type | Description |
---|---|---|
shares | uint256 | shares burned |
token0Amt | uint256 | Amount of token0 withdrawn. |
token1Amt | uint256 | Amount of token1 withdrawn. |
LogBorrowPerfectDebtLiquidity ​
Emitted when liquidity is borrowed with shares specified.
event LogBorrowPerfectDebtLiquidity(uint256 shares, uint256 token0Amt, uint256 token1Amt);
Parameters
Name | Type | Description |
---|---|---|
shares | uint256 | shares minted |
token0Amt | uint256 | Amount of token0 borrowed. |
token1Amt | uint256 | Amount of token1 borrowed. |
LogPaybackPerfectDebtLiquidity ​
Emitted when liquidity is paid back with shares specified.
event LogPaybackPerfectDebtLiquidity(uint256 shares, uint256 token0Amt, uint256 token1Amt);
Parameters
Name | Type | Description |
---|---|---|
shares | uint256 | shares burned |
token0Amt | uint256 | Amount of token0 paid back. |
token1Amt | uint256 | Amount of token1 paid back. |
LogDepositColLiquidity ​
Emitted when liquidity is deposited with specified token0 & token1 amount
event LogDepositColLiquidity(uint256 amount0, uint256 amount1, uint256 shares);
Parameters
Name | Type | Description |
---|---|---|
amount0 | uint256 | Amount of token0 deposited. |
amount1 | uint256 | Amount of token1 deposited. |
shares | uint256 | Amount of shares minted. |
LogWithdrawColLiquidity ​
Emitted when liquidity is withdrawn with specified token0 & token1 amount
event LogWithdrawColLiquidity(uint256 amount0, uint256 amount1, uint256 shares);
Parameters
Name | Type | Description |
---|---|---|
amount0 | uint256 | Amount of token0 withdrawn. |
amount1 | uint256 | Amount of token1 withdrawn. |
shares | uint256 | Amount of shares burned. |
LogBorrowDebtLiquidity ​
Emitted when liquidity is borrowed with specified token0 & token1 amount
event LogBorrowDebtLiquidity(uint256 amount0, uint256 amount1, uint256 shares);
Parameters
Name | Type | Description |
---|---|---|
amount0 | uint256 | Amount of token0 borrowed. |
amount1 | uint256 | Amount of token1 borrowed. |
shares | uint256 | Amount of shares minted. |
LogPaybackDebtLiquidity ​
Emitted when liquidity is paid back with specified token0 & token1 amount
event LogPaybackDebtLiquidity(uint256 amount0, uint256 amount1, uint256 shares);
Parameters
Name | Type | Description |
---|---|---|
amount0 | uint256 | Amount of token0 paid back. |
amount1 | uint256 | Amount of token1 paid back. |
shares | uint256 | Amount of shares burned. |
LogWithdrawColInOneToken ​
Emitted when liquidity is withdrawn with shares specified into one token only.
event LogWithdrawColInOneToken(uint256 shares, uint256 token0Amt, uint256 token1Amt);
Parameters
Name | Type | Description |
---|---|---|
shares | uint256 | shares burned |
token0Amt | uint256 | Amount of token0 withdrawn. |
token1Amt | uint256 | Amount of token1 withdrawn. |
LogPaybackDebtInOneToken ​
Emitted when liquidity is paid back with shares specified from one token only.
event LogPaybackDebtInOneToken(uint256 shares, uint256 token0Amt, uint256 token1Amt);
Parameters
Name | Type | Description |
---|---|---|
shares | uint256 | shares burned |
token0Amt | uint256 | Amount of token0 paid back. |
token1Amt | uint256 | Amount of token1 paid back. |
LogArbitrage ​
Emitted when internal arbitrage between 2 pools happen
event LogArbitrage(int256 routing, uint256 amtOut);
Parameters
Name | Type | Description |
---|---|---|
routing | int256 | if positive then routing is amtIn of token0 in deposit & borrow else token0 withdraw & payback |
amtOut | uint256 | if routing is positive then token1 withdraw & payback amount else token1 deposit & borrow |