IPrimaryLendingPlatformLeverage
Overview
License: MIT
Functions info
isLeveragePosition (0x3226d284)
Checks if a user has a leverage position for a project token.
Parameters:
Name | Type | Description |
---|---|---|
user | address | The address of the user. |
projectToken | address | The address of the project token. |
deleteLeveragePosition (0x0614a25a)
Deletes a leverage position for a user and project token.
Parameters:
Name | Type | Description |
---|---|---|
user | address | The address of the user. |
projectToken | address | The address of the project token. |
leveragedBorrowFromRelatedContract (0x68d7a4c3)
Allows a related contract to borrow funds on behalf of a user to enter a leveraged position.
Parameters:
Name | Type | Description |
---|---|---|
projectToken | address | The address of the project token the user wants to invest in. |
lendingToken | address | The address of the lending token used for collateral. |
notionalExposure | uint256 | The notional exposure of the user's investment. |
marginCollateralAmount | uint256 | The amount of collateral to be deposited by the user. |
buyCalldata | bytes | The calldata used for buying the project token on the DEX. |
borrower | address | The address of the user for whom the funds are being borrowed. |
calculateAddingAmount (0x545c5699)
Calculates the additional collateral amount needed for the specified user and project token.
Parameters:
Name | Type | Description |
---|---|---|
user | address | The address of the user. |
projectToken | address | The address of the project token. |
marginCollateralCount | uint256 | The margin collateral amount. |
Return values:
Name | Type | Description |
---|---|---|
addingAmount | uint256 | The additional collateral amount needed. |
leveragedBorrowFromRelatedContract (0x30c1f2fd)
Allows a related contract to borrow funds on behalf of a user to enter a leveraged position.
Parameters:
Name | Type | Description |
---|---|---|
projectToken | address | The address of the project token the user wants to invest in. |
lendingToken | address | The address of the lending token used for collateral. |
notionalExposure | uint256 | The notional exposure of the user's investment. |
marginCollateralAmount | uint256 | The amount of collateral to be deposited by the user. |
buyCalldata | bytes | The calldata used for buying the project token on the DEX. |
borrower | address | The address of the user for whom the funds are being borrowed. |
priceIds | bytes32[] | The priceIds need to update. |
updateData | bytes[] | The updateData provided by PythNetwork. |
Last updated