DataTypes
Intent
solidity
struct Intent {
uint256 strikePrice;
uint256 interestRate;
uint256 duration;
}
Name | Type | Description |
---|---|---|
strikePrice | uint256 | The price at which borrower pays back to the lender |
interestRate | uint256 | The interest that has to be paid on the asset |
duration | uint256 | The time before which borrower much repay the asset |
IntentCollection
solidity
struct IntentCollection {
address collToken;
address borrowToken;
uint256 minSingleLoanAmt;
uint256 maxSingleLoanAmt;
uint256 expiresAt;
bool isEnabled;
Intent[] intents;
}
Name | Type | Description |
---|---|---|
collToken | address | Address of the collateral token |
borrowToken | address | Address of the borrow token |
minSingleLoanAmt | uint256 | The minimum amount of loan that must be borrowed |
maxSingleLoanAmt | uint256 | The maximum amount of loan that can be borrowed |
expiresAt | uint256 | The time duration before which the loan must be repayed |
isEnabled | bool | If this collection is valid or not |
intents | Intent[] | An array of all intents in this collection |
BorrowParams
solidity
struct BorrowParams {
uint256 collectionId;
uint256 intentId;
uint256 collAmt;
}
Name | Type | Description |
---|---|---|
collectionId | uint256 | The collection number associated with a particular vault |
intentId | uint256 | The intent index that resonates with the borrower's interest |
collAmt | uint256 | The amount of collateral the borrower wants to lend against |
LoanData
solidity
struct LoanData {
address borrower;
address lenderVault;
address collToken;
address borrowToken;
uint256 collAmt;
uint256 borrowAmt;
uint256 repaidAmt;
uint256 expiresAt;
}
Name | Type | Description |
---|---|---|
borrower | address | Address of the borrower |
lenderVault | address | Address of the vault |
collToken | address | Address of the collateral token |
borrowToken | address | Address of the borrow token |
borrowAmt | uint256 | The amount of assets the user wants to borrow |
repaidAmt | uint256 | The amount of collateral user has already paid |
expiresAt | uint256 | The time duration before which the loan must be repayed |
LoanExecParams
solidity
struct LoanExecParams {
address vault;
uint256 collSwapAmount;
BorrowParams borrowParams;
address swapper;
bytes swapperData;
}
Name | Type | Description |
---|---|---|
vault | address | Address of the vault |
collSwapAmount | uint256 | Amount of asset to be swapped for leverage |
borrowParams | BorrowParams | The Borrow Parameters set by borrower |
swapper | address | Address of the swapper |
swapperData | bytes | The ABI Encoded Data that contains info about the swap |
LoanRepayParams
solidity
struct LoanRepayParams {
address loan;
address swapper;
uint256 repayAmount;
bytes swapperData;
}
Name | Type | Description |
---|---|---|
loan | address | Address of the loan contract |
swapper | address | Address of the swapper |
repayAmount | uint256 | The Amount of assets to be repaid |
swapperData | bytes | The ABI Encoded Data that contains info about the swap |