LendgineRouter
Code
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
error ValidationError();
Occurs when a callback invocation is not valid because it is not called by a lendgine deployed by the PowerMaker factory.
AmountError
error AmountError();
Occurs when output amounts aren't sufficient according to the specified minimums.
Read-only functions
factory
function factory() external view returns (address);
Returns the address of the PowerMaker factory this router is connected to.
uniswapV2Factory
function uniswapV2Factory() external view returns (address);
Returns the address of the UniswapV2 factory this router is connected to.
uniswapV3Factory
function uniswapV3Factory() external view returns (address);
Returns the address of the UniswapV3 factory this router is connected to.
weth
function weth() external view returns (address);
Returns the address of the Wrapped Ether contract.
State-changing functions
mint
function mint(MintParams calldata params) external payable returns(uint256 shares);
Mints power perpetual tokens (PPT) with safety checks and obtains maximum leverage by swapping on an external market.
burn
function burn(BurnParams calldata params) external payable returns (uint256 amount);
Burns PPT with safety checks. Mints the required liquidity that is to be paid back and then unlocks the remaining collateral.
Last updated