Events ​
Swap ​
event Swap(bool swap0to1, uint256 amountIn, uint256 amountOut, address to)
Emitted on token swaps
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 ​
event LogDepositPerfectColLiquidity(uint256 shares, uint256 token0Amt, uint256 token1Amt)
Emitted when liquidity is added with shares specified.
Parameters ​
Name | Type | Description |
---|---|---|
shares | uint256 | Expected exact shares to be received. |
token0Amt | uint256 | Amount of token0 deposited. |
token1Amt | uint256 |
LogWithdrawPerfectColLiquidity ​
event LogWithdrawPerfectColLiquidity(uint256 shares, uint256 token0Amt, uint256 token1Amt)
Emitted when liquidity is withdrawn with shares specified.
Parameters ​
Name | Type | Description |
---|---|---|
shares | uint256 | shares burned |
token0Amt | uint256 | Amount of token0 withdrawn. |
token1Amt | uint256 | Amount of token1 withdrawn. |
LogBorrowPerfectDebtLiquidity ​
event LogBorrowPerfectDebtLiquidity(uint256 shares, uint256 token0Amt, uint256 token1Amt)
Emitted when liquidity is borrowed with shares specified.
Parameters ​
Name | Type | Description |
---|---|---|
shares | uint256 | shares minted |
token0Amt | uint256 | Amount of token0 borrowed. |
token1Amt | uint256 | Amount of token1 borrowed. |
LogPaybackPerfectDebtLiquidity ​
event LogPaybackPerfectDebtLiquidity(uint256 shares, uint256 token0Amt, uint256 token1Amt)
Emitted when liquidity is paid back with shares specified.
Parameters ​
Name | Type | Description |
---|---|---|
shares | uint256 | shares burned |
token0Amt | uint256 | Amount of token0 paid back. |
token1Amt | uint256 | Amount of token1 paid back. |
LogDepositColLiquidity ​
event LogDepositColLiquidity(uint256 amount0, uint256 amount1, uint256 shares)
Emitted when liquidity is deposited with specified token0 & token1 amount
Parameters ​
Name | Type | Description |
---|---|---|
amount0 | uint256 | Amount of token0 deposited. |
amount1 | uint256 | Amount of token1 deposited. |
shares | uint256 | Amount of shares minted. |
LogWithdrawColLiquidity ​
event LogWithdrawColLiquidity(uint256 amount0, uint256 amount1, uint256 shares)
Emitted when liquidity is withdrawn with specified token0 & token1 amount
Parameters ​
Name | Type | Description |
---|---|---|
amount0 | uint256 | Amount of token0 withdrawn. |
amount1 | uint256 | Amount of token1 withdrawn. |
shares | uint256 | Amount of shares burned. |
LogBorrowDebtLiquidity ​
event LogBorrowDebtLiquidity(uint256 amount0, uint256 amount1, uint256 shares)
Emitted when liquidity is borrowed with specified token0 & token1 amount
Parameters ​
Name | Type | Description |
---|---|---|
amount0 | uint256 | Amount of token0 borrowed. |
amount1 | uint256 | Amount of token1 borrowed. |
shares | uint256 | Amount of shares minted. |
LogPaybackDebtLiquidity ​
event LogPaybackDebtLiquidity(uint256 amount0, uint256 amount1, uint256 shares)
Emitted when liquidity is paid back with specified token0 & token1 amount
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 ​
event LogWithdrawColInOneToken(uint256 shares, uint256 token0Amt, uint256 token1Amt)
Emitted when liquidity is withdrawn with shares specified into one token only.
Parameters ​
Name | Type | Description |
---|---|---|
shares | uint256 | shares burned |
token0Amt | uint256 | Amount of token0 withdrawn. |
token1Amt | uint256 | Amount of token1 withdrawn. |
LogPaybackDebtInOneToken ​
event LogPaybackDebtInOneToken(uint256 shares, uint256 token0Amt, uint256 token1Amt)
Emitted when liquidity is paid back with shares specified from one token only.
Parameters ​
Name | Type | Description |
---|---|---|
shares | uint256 | shares burned |
token0Amt | uint256 | Amount of token0 paid back. |
token1Amt | uint256 | Amount of token1 paid back. |
LogArbitrage ​
event LogArbitrage(int256 routing, uint256 amtOut)
Emitted when internal arbitrage between 2 pools happen
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 |