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

Was this helpful?

Export as PDF
  1. FXD Stablecoin
  2. Interfaces
  3. ProxyWallet

FathomStablecoinProxyActions

https://github.com/Into-the-Fathom/fathom-stablecoin-smart-contracts/blob/master/contracts/main/proxy-actions/FathomStablecoinProxyActions.sol

The FathomStablecoinProxyActions contract enables complex operations such as opening, managing, and interacting with positions (vaults) that hold collateral and issue stablecoins. It handles tasks like depositing collateral, drawing stablecoins against it, paying back debt, and unlocking collateral.

The address for this interface should be the address of the particular ProxyWallet.

Functions:

Admin Functions:

  • whitelist(address _bookKeeper, address _usr):

    • Arguments:

      • _bookKeeper: The address of the bookkeeper contract.

      • _usr: The address to be whitelisted.

  • blacklist(address _bookKeeper, address _usr):

    • Arguments:

      • _bookKeeper: The address of the bookkeeper contract.

      • _usr: The address to be blacklisted.

Position Management Functions:

  • allowManagePosition(address _manager, uint256 _positionId, address _user, uint256 _ok):

    • Arguments:

      • _manager: Address of the position management contract.

      • _positionId: Numeric ID of the position.

      • _user: Address of the user to be allowed or disallowed.

      • _ok: Permission flag (typically 0 or 1).

  • allowMigratePosition(address _manager, address _user, uint256 _ok):

    • Arguments:

      • _manager: Address of the position management contract.

      • _user: Address of the user whose migration permissions are being set.

      • _ok: Permission flag (typically 0 or 1).

  • exportPosition(address _manager, uint256 _positionId, address _destination):

    • Arguments:

      • _manager: Address of the position management contract.

      • _positionId: Numeric ID of the position.

      • _destination: Address where the position should be exported.

  • importPosition(address _manager, address _source, uint256 _positionId):

    • Arguments:

      • _manager: Address of the position management contract.

      • _source: Address from which the position is imported.

      • _positionId: Numeric ID of the position.

  • movePosition(address _manager, uint256 _source, uint256 _destination):

    • Arguments:

      • _manager: Address of the position management contract.

      • _source: Numeric ID of the source position.

      • _destination: Numeric ID of the destination position.

Collateral and Stablecoin Management Functions:

  • safeLockXDC(address _manager, address _xdcAdapter, uint256 _positionId, address _owner, bytes calldata _data):

    • Arguments:

      • _manager: Address of the manager contract.

      • _xdcAdapter: Address of the XDC adapter contract.

      • _positionId: Numeric ID of the position.

      • _owner: Address of the owner of the position.

      • _data: Additional data passed in call.

  • draw(address _manager, address _stabilityFeeCollector, address _stablecoinAdapter, uint256 _positionId, uint256 _amount, bytes calldata _data):

    • Arguments:

      • _manager: Address of the manager contract.

      • _stabilityFeeCollector: Address of the stability fee collector.

      • _stablecoinAdapter: Address of the stablecoin adapter.

      • _positionId: Numeric ID of the position.

      • _amount: Amount of stablecoins to draw.

      • _data: Additional data passed in call.

Events:

  • LogBorrowedAmount(address _positionAddress, uint256 _FXDBorrowAmount):

    • Arguments:

      • _positionAddress: Address of the position from which stablecoins were borrowed.

      • _FXDBorrowAmount: Amount of stablecoins borrowed.

  • LogPaidAmount(address _positionAddress, uint256 _FXDPaidAmount):

    • Arguments:

      • _positionAddress: Address of the position to which stablecoins were repaid.

      • _FXDPaidAmount: Amount of stablecoins repaid.

PreviousProxyWalletNextCollateralPoolConfig

Last updated 11 months ago

Was this helpful?