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
  • Functions
  • Events

Was this helpful?

Export as PDF
  1. Lending
  2. Interfaces

FmToken

https://github.com/Into-the-Fathom/fathom-lending-platform-smart-contracts/blob/master/contracts/protocol/tokenization/FmToken.sol

The FmToken is an interest-bearing token used within the Fathom protocol. It represents the user's stake in the underlying assets supplied to the protocol. This document provides details on the storage, functions, and events related to the FmToken contract.

Functions

ERC20 Functions

  • name() external view returns (string memory): Returns the name of the token.

  • symbol() external view returns (string memory): Returns the symbol of the token.

  • decimals() external view returns (uint8): Returns the decimals of the token.

  • totalSupply() public view returns (uint256): Returns the total supply of the token.

  • balanceOf(address account) public view returns (uint256): Returns the balance of the specified account.

  • transfer(address recipient, uint256 amount) external returns (bool): Transfers tokens from the caller to the specified recipient.

  • allowance(address owner, address spender) external view returns (uint256): Returns the allowance of the spender for the owner's tokens.

  • approve(address spender, uint256 amount) external returns (bool): Approves the spender to use the specified amount of the caller's tokens.

  • transferFrom(address sender, address recipient, uint256 amount) external returns (bool): Transfers tokens from the sender to the recipient using the allowance mechanism.

Incentive Functions

  • getIncentivesController() external view returns (IFathomIncentivesController): Returns the address of the incentives controller.

  • setIncentivesController(IFathomIncentivesController controller) external: Sets a new incentives controller.

Minting and Burning

  • mint(address caller, address onBehalfOf, uint256 amount, uint256 index) external returns (bool): Mints tokens to the specified user.

  • burn(address from, address receiverOfUnderlying, uint256 amount, uint256 index) external: Burns tokens from the specified user and transfers the underlying asset to the specified receiver.

  • mintToTreasury(uint256 amount, uint256 index) external: Mints tokens to the treasury.

Other Functions

  • transferOnLiquidation(address from, address to, uint256 value) external: Transfers tokens during liquidation.

  • transferUnderlyingTo(address target, uint256 amount) external: Transfers the underlying asset to the specified target.

  • handleRepayment(address user, address onBehalfOf, uint256 amount) external: Handles repayment of the underlying asset.

  • permit(address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) external: Approves spending of tokens using a signed message.

Events

  • BalanceTransfer(address indexed from, address indexed to, uint256 value, uint256 index): Emitted during the transfer of tokens.

  • Mint(address indexed caller, address indexed onBehalfOf, uint256 value, uint256 balanceIncrease, uint256 index): Emitted during the minting of tokens.

  • Burn(address indexed from, address indexed target, uint256 value, uint256 balanceIncrease, uint256 index): Emitted during the burning of tokens.

  • Transfer(address indexed from, address indexed to, uint256 value): Emitted during the transfer of tokens.

  • Approval(address indexed owner, address indexed spender, uint256 value): Emitted when approval for spending is granted.

PreviousInterfacesNextVariableDebtToken

Last updated 11 months ago

Was this helpful?