DebtTokenBase

Base contract for different types of debt tokens, like StableDebtToken or VariableDebtToken

_borrowAllowances

mapping(address => mapping(address => uint256)) _borrowAllowances

DELEGATION_WITH_SIG_TYPEHASH

bytes32 DELEGATION_WITH_SIG_TYPEHASH

_underlyingAsset

address _underlyingAsset

constructor

constructor() internal

Constructor.

approveDelegation

function approveDelegation(address delegatee, uint256 amount) external

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

delegationWithSig

function delegationWithSig(address delegator, address delegatee, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) external

Delegates borrowing power to a user on the specific debt token via ERC712 signature

Parameters

borrowAllowance

function borrowAllowance(address fromUser, address toUser) external view returns (uint256)

Returns the borrow allowance of the user

Parameters

Return Values

_approveDelegation

function _approveDelegation(address delegator, address delegatee, uint256 amount) internal

Updates the borrow allowance of a user on the specific debt token.

Parameters

_decreaseBorrowAllowance

function _decreaseBorrowAllowance(address delegator, address delegatee, uint256 amount) internal

Decreases the borrow allowance of a user on the specific debt token.

Parameters