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

ProxyWalletRegistry

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

The ProxyWalletRegistry manages the creation and administration of proxy wallets. This contract serves as a registry to associate owners with their respective proxy wallets and includes features to manage access and operational states.

Events

  • LogAddToWhitelist:

    • Emitted when an address is added to the whitelist. Only in centralized mode.

    • Parameters:

      • _user (address indexed): The address added to the whitelist.

  • LogRemoveFromWhitelist:

    • Emitted when an address is removed from the whitelist. Only in centralized mode.

    • Parameters:

      • _user (address indexed): The address removed from the whitelist.

  • LogSetDecentralizedMode:

    • Emitted when the decentralized mode is toggled.

    • Parameters:

      • newValue (bool): The new state of the decentralized mode (true for enabled, false for disabled).

  • LogProxyWalletCreation:

    • Emitted when a new proxy wallet is created and associated with an owner.

    • Parameters:

      • owner (address): The owner of the new proxy wallet.

      • proxyWallet (address): The address of the newly created proxy wallet.

State Variables

  • proxies (mapping(address => ProxyWallet)):

    • Maps an owner's address to their corresponding proxy wallet.

  • factory (ProxyWalletFactory):

    • The factory contract used for creating new proxy wallets.

  • whitelisted (mapping(address => bool)):

    • Tracks whether addresses are whitelisted, which influences their ability to create proxy wallets. Only in centralized mode.

  • bookKeeper (IBookKeeper):

    • Reference to the BookKeeper contract used for managing financial interactions within the system.

  • isDecentralizedMode (bool):

    • A flag indicating whether the system is operating in a decentralized mode, affecting proxy wallet creation permissions.

Functions

Public/External Functions

  • initialize:

    • Initializes the ProxyWalletRegistry with necessary contract references.

    • Parameters:

      • _factory (address): Address of the ProxyWalletFactory contract.

      • _bookKeeper (address): Address of the BookKeeper contract.

  • addToWhitelist:

    • Adds an address to the whitelist. Only in centralized mode.

    • Parameters:

      • _usr (address): The address to add to the whitelist.

  • removeFromWhitelist:

    • Removes an address from the whitelist. Only in centralized mode.

    • Parameters:

      • _usr (address): The address to remove from the whitelist.

  • setDecentralizedMode:

    • Toggles the decentralized mode of the registry.

    • Parameters:

      • isOn (bool): Boolean to enable or disable decentralized mode.

  • pause and unpause:

    • Controls the paused state of the contract, restricting or enabling function execution based on the contract's operational state.

  • build0:

    • Convenience function that allows an owner to create a proxy wallet for themselves without specifying an owner explicitly.

  • build:

    • Creates a new proxy wallet for a specified owner if they are whitelisted or if the contract is in decentralized mode.

    • Parameters:

      • _owner (address): The intended owner of the new proxy wallet.

  • setOwner:

    • Changes the owner of a specific proxy wallet.

    • Parameters:

      • _newOwner (address): The new owner to set.

PreviousInterfacesNextProxyWallet

Last updated 11 months ago

Was this helpful?