LendgineRouter

Code

LendgineRouter.sol

Events

Mint

event Mint(address indexed from, address indexed lendgine, uint256 collateral, uint256 shares, address indexed to);

Emitted when a power perpetual token (PPT) is minted using this router.

Burn

event Burn(address indexed from, address indexed lendgine, uint256 collateral, uint256 shares, address indexed to);

Emitted when a PPT is burned using this router.

Errors

LivelinessError

error LivelinessError();

Occurs when a transaction is processed later than the deadline specified.

ValidationError

Occurs when a callback invocation is not valid because it is not called by a lendgine deployed by the PowerMaker factory.

AmountError

Occurs when output amounts aren't sufficient according to the specified minimums.

Read-only functions

factory

Returns the address of the PowerMaker factory this router is connected to.

uniswapV2Factory

Returns the address of the UniswapV2 factory this router is connected to.

uniswapV3Factory

Returns the address of the UniswapV3 factory this router is connected to.

weth

Returns the address of the Wrapped Ether contract.

State-changing functions

mint

Mints power perpetual tokens (PPT) with safety checks and obtains maximum leverage by swapping on an external market.

burn

Burns PPT with safety checks. Mints the required liquidity that is to be paid back and then unlocks the remaining collateral.

Last updated