Fathom Protocol
  • Introduction
  • FXD Stablecoin
    • FXD Smart Contract Architecture
    • Minting and Burning Mechanisms with LTV Ratio
    • Soft-Pegging to the US Dollar
    • Opening and closing position flows
    • BookKeeping mechanism
      • Stablecoin Accounting
      • Collateral Accounting
    • Liquidation
      • Fixed Spread Liquidation Strategy
      • Liquidation process walk through
    • Emergency Shutdown
    • Maths for position safety
    • Fee structure
    • Risk Management
    • Interfaces
      • ProxyWalletRegistry
      • ProxyWallet
        • FathomStablecoinProxyActions
      • CollateralPoolConfig
      • BookKeeper
      • FXD
      • LiquidationEngine
      • FlashMintModule
      • PriceFeed
      • ShowStopper
      • StabilityFeeCollector
      • SystemDebtEngine
      • AdminControls
    • Deployments
      • XDC Network
    • User Guides
      • Open FXD position
      • Top Up FXD Position
      • Repay and close FXD position
    • Fathom Stablecoin Smart Contracts
    • Fathom Stablecoin Subgraph
  • Vaults
    • Key Features
    • Definitions
    • Architecture
    • Fees
    • Workflows
    • Vault Management
    • Strategy Creation
    • Interfaces
      • Factory
      • Vault
      • BaseStrategy
      • TokenizedStrategy
    • Deployments
      • XDC Network
    • User Guides
      • Deposit and Withdraw in Vault
    • Fathom Vaults Smart Contracts
    • Fathom Vaults Subgraph
  • Lending
    • Core Concepts
    • Protocol Mechanics
    • Architecture
    • Interfaces
      • FmToken
      • VariableDebtToken
      • StableDebtToken
      • L2Pool
      • PoolAddressesProvider
    • User Guides
      • Supply, Borrow, Repay and Withdraw Asset
    • Deployments
      • XDC Network
    • Fathom Lending Smart Contracts
    • Fathom Lending Subgraph
  • DEX
    • Core Concepts
    • Architecture
    • Interfaces
      • Factory
      • Pair
      • Router
    • User Guides
      • Providing Liquidity
      • Swapping Assets
    • Deployments
      • XDC Network
    • Fathom DEX Smart Contracts
    • Fathom DEX Subgraph
  • DAO
    • DAO Structure
    • Governance Process
    • Staking Process
    • Treasury Management
    • Risk Management and Security Measures
    • Contributing to Fathom DAO
    • Interfaces
      • FTHM
      • Staking
        • Vault
        • RewardsCalculator
        • vFTHM
      • Governance
        • TimelockController
    • Deployments
      • XDC Network
    • User Guides
      • Staking
      • Proposing
      • Voting
    • Fathom DAO Smart Contracts
    • Fathom DAO Subgraph
  • Whitepaper
    • Version 1.0
  • Resources
  • FXD Deployments
  • FTHM Deployments
  • Privacy Policy
  • Terms of Service
Powered by GitBook

Copyright© Fathom App 2024.

On this page
  • Storage Variables
  • Set Functions:
  • Get Functions:
  • Disabled ERC20 Functions
  • Events

Was this helpful?

Export as PDF
  1. Lending
  2. Interfaces

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:

  • transfer

  • allowance

  • approve

  • transferFrom

  • increaseAllowance

  • decreaseAllowance

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.

PreviousFmTokenNextStableDebtToken

Last updated 11 months ago

Was this helpful?