VariableDebtToken
https://github.com/Into-the-Fathom/fathom-lending-platform-smart-contracts/blob/master/contracts/protocol/tokenization/VariableDebtToken.sol
The VariableDebtToken contract is part of the Fathom lending protocol. It tracks users' borrowing positions at variable interest rates. This token is non-transferable and can only be minted or burned by the lending pool.
Storage Variables
DEBT_TOKEN_REVISION: Version of the debt token._underlyingAsset: The address of the underlying asset.POOL: Reference to the main Pool contract._incentivesController: Incentives controller for the token.
Set Functions:
approveDelegation: Delegates borrowing power to a user.delegationWithSig: Delegates borrowing power via signature.setIncentivesController: Sets the incentives controller.
Get Functions:
balanceOf: Returns the debt balance of a user.totalSupply: Returns the total supply of the debt token.borrowAllowance: Returns the borrow allowance for a user.name: Returns the name of the token.symbol: Returns the symbol of the token.decimals: Returns the number of decimals.getIncentivesController: Returns the incentives controller address.UNDERLYING_ASSET_ADDRESS: Returns the underlying asset address.
Mint/Burn Functions:
mint: Mints debt tokens to a user.burn: Burns debt tokens from a user.
Disabled ERC20 Functions
The following standard ERC20 functions are disabled as this is a non-transferable token:
transferallowanceapprovetransferFromincreaseAllowancedecreaseAllowance
These functions revert with an OPERATION_NOT_SUPPORTED error if called.
Events
Mint: Emitted when tokens are minted.Burn: Emitted when tokens are burned.BorrowAllowanceDelegated: Emitted when borrow allowance is delegated.Transfer: Emitted when tokens are transferred (disabled in this contract).Approval: Emitted when approval is given (disabled in this contract).Initialized: Emitted when the contract is initialized.
Last updated
Was this helpful?