DebtTokenBase
Base contract for different types of debt tokens, like StableDebtToken or VariableDebtToken
_borrowAllowances
DELEGATION_WITH_SIG_TYPEHASH
_underlyingAsset
constructor
Constructor.
approveDelegation
Delegates borrowing power to a user on the specific debt token. Delegation will still respect the liquidation constraints (even if delegated, a delegatee cannot force a delegator HF to go below 1)
Parameters
Name | Type | Description |
---|---|---|
delegatee | address | The address receiving the delegated borrowing power |
amount | uint256 | The maximum amount being delegated. |
delegationWithSig
Delegates borrowing power to a user on the specific debt token via ERC712 signature
Parameters
Name | Type | Description |
---|---|---|
delegator | address | The delegator of the credit |
delegatee | address | The delegatee that can use the credit |
value | uint256 | The amount to be delegated |
deadline | uint256 | The deadline timestamp, type(uint256).max for max deadline |
v | uint8 | The V signature param |
r | bytes32 | The R signature param |
s | bytes32 | The S signature param |
borrowAllowance
Returns the borrow allowance of the user
Parameters
Name | Type | Description |
---|---|---|
fromUser | address | The user to giving allowance |
toUser | address | The user to give allowance to |
Return Values
Name | Type | Description |
---|---|---|
[0] | uint256 | The current allowance of |
_approveDelegation
Updates the borrow allowance of a user on the specific debt token.
Parameters
Name | Type | Description |
---|---|---|
delegator | address | The address delegating the borrowing power |
delegatee | address | The address receiving the delegated borrowing power |
amount | uint256 | The allowance amount being delegated. |
_decreaseBorrowAllowance
Decreases the borrow allowance of a user on the specific debt token.
Parameters
Name | Type | Description |
---|---|---|
delegator | address | The address delegating the borrowing power |
delegatee | address | The address receiving the delegated borrowing power |
amount | uint256 | The amount to subtract from the current allowance |