PrimaryLendingPlatformWrappedTokenGatewayZksync
Overview
License: MIT
The PrimaryLendingPlatformWrappedTokenGatewayZksync contract is the contract that provides the functionality for lending platform system using WETH for Zksync network.
Contract that provides the functionality for lending platform system using WETH. Inherit from PrimaryLendingPlatformWrappedTokenGatewayCore.
Functions info
withdraw (0x4143d0f6)
Allows users to withdraw their WETH tokens and receive Ether and update related token's prices.
Parameters:
Name | Type | Description |
---|---|---|
projectTokenAmount | uint256 | Amount of project tokens to withdraw. |
priceIds | bytes32[] | An array of price identifiers used to update the price oracle. |
updateData | bytes[] | An array of update data used to update the price oracle. |
borrow (0xbeadd4d8)
Borrows lending tokens for the caller and converts them to Ether and update related token's prices.
Parameters:
Name | Type | Description |
---|---|---|
projectToken | address | Address of the project token. |
lendingTokenAmount | uint256 | Amount of lending tokens to borrow. |
priceIds | bytes32[] | An array of price identifiers used to update the price oracle. |
updateData | bytes[] | An array of update data used to update the price oracle. |
liquidateWithProjectETH (0x3d82a5ca)
Liquidates a position by providing project tokens in Ether and update related token's prices.
Parameters:
Name | Type | Description |
---|---|---|
_account | address | Address of the account to be liquidated. |
_lendingToken | address | Address of the lending token. |
_lendingTokenAmount | uint256 | Amount of lending tokens to liquidate. |
priceIds | bytes32[] | An array of price identifiers used to update the price oracle. |
updateData | bytes[] | An array of update data used to update the price oracle. |
liquidateWithLendingETH (0x49b009d4)
Liquidates a position by providing lending tokens in Ether and update related token's prices.
Parameters:
Name | Type | Description |
---|---|---|
_account | address | Address of the account to be liquidated. |
_projectToken | address | Address of the project token. |
_lendingTokenAmount | uint256 | Amount of lending tokens in Ether to liquidate. |
priceIds | bytes32[] | An array of price identifiers used to update the price oracle. |
updateData | bytes[] | An array of update data used to update the price oracle. |
updateFee | uint256 | Update fee pays for updating price. |
leveragedBorrowWithProjectETH (0xd5790a86)
Borrows lending tokens in a leveraged position using project tokens in Ether and update related token's prices.
Parameters:
Name | Type | Description |
---|---|---|
_lendingToken | address | Address of the lending token. |
_notionalExposure | uint256 | The notional exposure of the leveraged position. |
_marginCollateralAmount | uint256 | Amount of collateral in margin. |
buyCalldata | bytes | Calldata for buying project tokens. |
leverageType | uint8 | The type of leverage. |
priceIds | bytes32[] | An array of price identifiers used to update the price oracle. |
updateData | bytes[] | An array of update data used to update the price oracle. |
updateFee | uint256 | Update fee pays for updating price. |
Last updated