IPrimaryLendingPlatformLeverage
Overview
License: MIT
Functions info
isLeveragePosition (0x3226d284)
Checks if a user has a leverage position for a project token.
Parameters:
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:
user
address
The address of the user.
projectToken
address
The address of the project token.
calculateAddingAmount (0x545c5699)
Calculates the additional collateral amount needed for the specified user and project token.
Parameters:
user
address
The address of the user.
projectToken
address
The address of the project token.
marginCollateralCount
uint256
The margin collateral amount.
Return values:
addingAmount
uint256
The additional collateral amount needed.
leveragedBorrowFromRelatedContract (0xb21cacd5)
Allows a related contract to borrow funds on behalf of a user to enter a leveraged position and update related token's prices.
Parameters:
prjInfo
struct Asset.Info
Information about the project token, including its address and type.
lendingInfo
struct Asset.Info
Information about the lending token, including its address and type.
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.
leverageType
uint8
The type of leverage position.
priceIds
bytes32[]
An array of bytes32 price identifiers to update.
updateData
bytes[]
An array of bytes update data for the corresponding price identifiers.
Last updated