Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Specialized smart contract on the blockchain that manages pooled user funds. Each vault can be connected to various investment strategies, automated by the corresponding strategy contracts. Vaults are compliant to ERC-4626.
A strategy within Fathom Vaults is a self-contained smart contract designed to maximize returns from assets held within a vault. Strategy allows seamlessly manage the vault's assets by deploying them into optimized yield-generating opportunities.
In the Fathom Vaults ecosystem, a Tokenized Strategy is a specialized form of a strategy that doubles as an independent vault. Compliant with the ERC-4626 standard, this setup not only facilitates yield generation but also allows users to directly invest in the strategy. Upon investment, individuals receive shares that represent their stake, enabling a straightforward way to participate in specific investment strategies without intermediaries.
The Vaults Factory is a core component deployed to streamline the creation of Allocator Vaults under Fathom Governance. This factory ensures that new vaults are deployed in a standardized, efficient, and secure manner, adhering to the latest protocols and specifications set forth by the governance. This setup promotes trust and consistency across all deployments, significantly simplifying the process of launching new investment vehicles on the platform.
Funds sent from a vault to a strategy intended to generate returns.
A function where a vault accounts for the performance of its strategies, applying any relevant fees, and managing profit distribution.
Fathom Vaults is a cutting-edge financial platform that leverages blockchain technology to offer optimized asset management solutions. Built on a robust and secure framework, Fathom Vaults allows users to participate in a variety of investment strategies that not only include traditional DeFi protocols but also extend into Real-World Assets (RWA) and Trade Finance. Central to the ecosystem is the FXD stablecoin, a stable digital currency that provides a stable medium of exchange and a store of value across various investment strategies.
Dynamic Investment Strategies: Engage in multiple investment strategies spanning decentralized finance, real-world assets, and trade finance. These strategies are designed to cater to different risk appetites and investment goals.
Stablecoin Integration: Utilize the FXD stablecoin within the platform, the stable asset, to gain yields in on-chain native way.
Decentralized Governance: Fathom Vaults operates under a community-driven Fathom governance model, allowing FXD holders to vote on key decisions, including strategy approvals and fee adjustments.
Security and Transparency: Smart contracts are publicly auditable and have undergone rigorous security audits. Transparency in fee structure and strategy performance metrics is maintained to ensure trust and accountability.
Accessibility and Integration: Designed with a focus on user experience, Fathom Vaults offers easy integration options for third-party services and developers, providing detailed documentation and access to on-chain data.
At the core of Fathom Vaults' architecture are the smart contracts that handle vault operations, strategy implementation, and interactions with the FXD stablecoin. Here is a simplified view of the system:
User Interface (UI): Web3 compatible interfaces that allow users to interact with vaults, deposit and withdraw funds, and participate in governance.
Smart Contracts:
Vault Contracts: Manage the deposits, withdrawals, and allocation of funds to various strategies.
Strategy Contracts: Execute specific investment protocols, manage performance, and handle rewards distribution.
Governance Contracts: Facilitate voting and administrative functions driven by community governance.
Off-Chain Data Storage: Utilizes Graph Node and Subgraphs for indexing and querying blockchain data efficiently, enhancing the responsiveness and scalability of the platform.
Off-Chain Services: The Reports Processor automates the report processing for vault strategies. Monitoring & Risk Management AI Agents and Monitoring Systems bring more reliability and capital efficiency to the vaults and strategies.
API Gateway: Offers a seamless connection between the frontend and smart contracts, facilitating data flow and transaction execution across the platform.
FXD Stablecoin: FXD is the backbone of the Fathom Vaults ecosystem, designed to mitigate price volatility and provide a reliable medium of exchange. Vaults allow FXD holders to invest in various on-chain and off-chain products leveraging their portfolio.
AI Agents: They work for users and vault managers. On the user side, they allow users to structure the vaults' portfolio. For vault managers, they offer help structuring the strategies' allocations.

Fathom Vaults are designed to streamline and enhance the experience for both users (investors), vault and strategy managers. Here's an overview of the typical workflows for each type of participant:
User (Investor) Workflow
Account Setup: Users begin by connecting their wallet to the Fathom interface. This setup involves ensuring that they hold FXD, the native stablecoin of the Fathom ecosystem, which is used for transactions within the vaults.
Vault Selection: Users navigate through the available vaults, each tailored to different risk preferences and investment strategies. The vaults are transparently described regarding their strategies, historical performance, and risk levels.
Deposit: Once a suitable vault is selected, users can deposit their FXD into the vault. This transaction involves transferring FXD from their personal wallets into the vault’s contract, where the FXD is then utilized according to the vault’s specific strategy.
Yield Generation: After the deposit, the vault automatically employs the user's FXD in various DeFi, RWA, or TradeFinance strategies based on the predefined rules of the vault. These strategies are designed to optimize returns while considering risk management.
Earnings and Reports: Users can track the performance of their investments through the dashboard that provides real-time data on earnings and the overall health of the vault. Periodic reports and alerts can also be configured for active monitoring.
Withdrawal: At any point, users can choose to withdraw their principal along with any returns generated, subject to the terms of the vault such as lock-up periods and withdrawal fees. The withdrawal process is straightforward, crediting the FXD back into the user’s wallet.
Vault and Strategy Manager Workflow
Strategy Deployment: Vault manager can be develops and deployers of the strategies within the Fathom ecosystem. These strategies might involve a mix of yield farming, lending protocols, or investment in real-world assets.
Vault Configuration: Once a strategy is ready, it is integrated into a vault. Managers configure the vault settings, including fees, risk management rules, and performance targets.
Capital Management: The primary role of the vault manager is to manage the capital pooled in the vault effectively. This involves deciding how much capital to allocate to different investments and managing the liquidity to meet withdrawal demands.
Reporting and Communication: It is crucial for managers to maintain transparency with the investors. This involves regular updates on vault performance, upcoming changes or proposals, and any significant market movements that may affect the vault.
Fee Collection and Reinvestment: Managers collect performance-based fees as compensation for managing the vault. These fees are a percentage of the profits generated and are automatically deducted from the returns. Managers may also reinvest a portion of their earnings back into the vault to align their interests with those of the investors.

Fathom Vaults are designed to be straightforward and accessible to anyone with a vision for creating effective investment strategies. Unlike traditional systems that may centralize management, Fathom democratizes the ability to deploy, manage, and derive earnings from personalized vault configurations.
Deployment
Each vault version comes with its own Factory deployed for easy and secure vault deployment. To deploy a vault, interact with the factory using the deployVault method, which clones a pre-existing vault setup, ensuring consistency and reliability.
Setup
Post-deployment, you can customize your vault's settings:
Roles: Define roles for different operational aspects of your vault. You can assign roles like strategy addition, debt management, and profit reporting.
Deposit Limits: Initially set to zero, you'll need to configure this to start accepting deposits.
Strategy Management
Vaults manage debt among various strategies that generate yields.
Add Strategy: Integrate new strategies to allocate funds.
Update Strategy: Adjust strategy settings, including maximum debt limits.
Revoke Strategy: Safely remove strategies that no longer align with the vault’s objectives.
Running the Vault
Operate your vault with simplicity:
Debt Allocation: Manage how funds are distributed among strategies.
Reporting: Regularly update the vault on strategy performance, capturing gains or losses and handling fee applications.
Profit Distribution: Manage how and when profits are distributed to shareholders.
Customization
Enhance your vault’s functionality with additional features:
Accountant: Attach custom fee logic.
Deposit/Withdraw Modules: Customize rules for fund flows.
Queue Management: Optimize strategy execution order.
Fathom Vaults have Protocol Fees, and Performance Fees. These fees are taken each time a vault or strategy reports gains, effectively ensuring that the ecosystem is sustainable and that the developers, as well as the infrastructure maintainers, are compensated for their contributions.
Control and Customization
The Fathom governance model empowers vault and strategy managers with autonomy over the fee mechanisms. They can determine the extent of fees charged, which provides an incentive structure aligned with the success of their strategies. At the same time, it offers rewards to the Fathom platform for providing the foundational infrastructure utilized by these financial instruments.
Governance and Fee Settings
The protocol fees are governed and adjustable through Fathom Governance, with the possible range set from 0% to 50%. This wide range allows for significant flexibility in adjusting to market conditions and strategy performance. Additionally, Fathom Governance possesses the capability to specify custom fee settings for individual vaults and strategies, enabling a tailored approach to fee imposition based on specific needs and circumstances.
Fee Distribution Example
To illustrate, consider a scenario where a strategy yields a profit of 100 FXD:
Performance Fee: 20%
Protocol Fee: 10% of the Performance Fee
Calculations:
Total Fees: 100 FXD * 20% = 20 FXD
Protocol Fees: 20 FXD * 10% = 2 FXD
Performance Fees: 20 FXD - 2 FXD = 18 FXD
In this example, 18 FXD is allocated to the strategy managers or the specified recipients of the performance fees, while 2 FXD is directed to the Fathom Treasury to support ongoing development and maintenance.
To deposit and then withdraw your FXD in the Vault, follow the steps below:
Go to Fathom DApp.
Check your desired Vault by clicking the arrow icon at the right.
It is also better to check the Strategies this Vault is utilizing.
Click "Deposit".
Enter the amount you would like to deposit. The shares token you will receive represents your part of the Vault pool. It does not equal your deposit by one-to-one.
Click "Deposit"
You may be required to approve the FXD transfer before the actual transfer (depending on your previous deposits).
Sign and send the transaction in your Wallet.
To withdraw your deposit and earnings, click the "Manage" button. Please be aware that, based on the Vault and its Strategies, you may face losses and withdraw less than you deposited.
Enter the amount you would like to withdraw. The shares token you will burn represents your part of the Vault pool. It does not equal your deposit by one-to-one.
Click "Withdraw"
You may be required to approve the shares token transfer before the actual transfer (depending on your previous withdrawals).
Sign and send the transaction in your Wallet.
Wait for the transaction to be processed.
Once the transaction has gone through, you'll see your deposit in "Your Position" on the same page, and the Vault will be marked as "Earning".
Wait for the transaction to be processed.
Once the transaction has gone through, you'll see your "Your Position" on the same page to have fewer assets or disappear if you return all the money.






https://github.com/Into-the-Fathom/fathom-vaults-smart-contracts/blob/master/contracts/vault/packages/VaultPackage.sol
FathomVault is proxy, and its implementation is VaultPackage.
The VaultPackage serves as the template for creating and managing vaults within the Fathom ecosystem. It supports a variety of operations including asset management, strategy implementation, and fee assessment in an efficient and secure manner.
profitMaxUnlockTime (uint256): Maximum time over which profits from the vault are unlocked.
assetContract (ERC20): ERC20 token contract address of the vault's primary asset.
decimalsValue (uint8): Decimal precision of the vault's primary asset.
sharesName (string): Name of the token shares issued by the vault.
sharesSymbol (string): Symbol of the token shares issued by the vault.
factory (address): Address of the factory contract that deployed the vault.
accountant (address): Address of the accountant contract responsible for managing the vault's fee assessments.
assetType (uint256): Type identifier for the asset, addressing specific behaviors or requirements.
defaultQueue (address[]): The default strategy queue used for managing assets.
useDefaultQueue (bool): Flag determining if the default strategy queue is always used.
depositLimit (uint256): Maximum amount of assets that can be deposited into the vault.
depositLimitModule (address): Address of the contract handling dynamic deposit limits.
withdrawLimitModule (address): Address of the contract handling dynamic withdrawal limits.
minimumTotalIdle (uint256): Minimum amount of total idle assets required in the vault.
strategies (mapping(address => StrategyParams)): Mapping of strategy addresses to their operational parameters.
setAccountantArguments:
newAccountant (address): Address of the new accountant contract.
setDefaultQueueArguments:
newDefaultQueue (address[] calldata): Array of strategy addresses to update the default queue.
setUseDefaultQueueArguments:
_useDefaultQueue (bool): New boolean value to set the use of the default queue.
setDepositLimitArguments:
_depositLimit (uint256): New deposit limit for the vault.
setDepositLimitModuleArguments:
_depositLimitModule (address): Address of the new deposit limit module.
setWithdrawLimitModuleArguments:
_withdrawLimitModule (address): Address of the new withdrawal limit module.
setMinimumTotalIdleArguments:
_minimumTotalIdle (uint256): New minimum total idle assets for the vault.
setProfitMaxUnlockTimeArguments:
_newProfitMaxUnlockTime (uint256): New maximum time for profit unlocking.
addStrategyArguments:
newStrategy (address): Address of the new strategy to add to the vault.
revokeStrategyArguments:
strategy (address): Strategy address to revoke.
force (bool): Flag to force revocation, potentially incurring losses.
updateMaxDebtForStrategyArguments:
strategy (address): Strategy address to update.
newMaxDebt (uint256): New maximum debt for the strategy.
shutdownVaultShuts down the vault, preventing new deposits and initiating asset liquidation processes.
getDebtArguments:
strategy (address): Strategy address to query the current debt.
Returns: Current debt amount for the specified strategy.
totalSupplyReturns the total supply of shares issued by the vault.
totalAssetsReturns the total assets managed by the vault, including both idle assets and those engaged in strategies.
unlockedSharesReturns the number of shares that have been unlocked based on the vault's profit unlocking schedule.
pricePerShareReturns the current price per share of the vault, based on the underlying asset value.
UpdatedAccountantParameters:
newAccountant (address): Address of the updated accountant.
UpdatedDefaultQueueParameters:
newDefaultQueue (address[]): Updated array of strategy addresses for the default queue.
UpdatedUseDefaultQueueParameters:
_useDefaultQueue (bool): Updated flag state for using the default queue.
UpdatedDepositLimitParameters:
_depositLimit (uint256): New deposit limit set for the vault.
UpdatedDepositLimitModuleParameters:
_depositLimitModule (address): Address of the newly set deposit limit module.
UpdatedWithdrawLimitModuleParameters:
_withdrawLimitModule (address): Address of the newly set withdrawal limit module.
UpdatedMinimumTotalIdleParameters:
_minimumTotalIdle (uint256): New minimum total idle assets set for the vault.
UpdatedProfitMaxUnlockTimeParameters:
_newProfitMaxUnlockTime (uint256): New maximum time for unlocking vault profits.
https://github.com/Into-the-Fathom/fathom-vaults-smart-contracts/blob/master/contracts/strategy/BaseStrategy.sol
The BaseStrategy provides a foundation for creating ERC-4626 compliant vaults, which integrate seamlessly with a TokenizedStrategy implementation contract. This structure allows for ease in developing customizable strategies while maintaining a consistent interface and functionality through delegation.
onlySelf: Ensures that the function is called internally by the strategy itself, typically to confirm actions are a result of delegate calls from the strategy to the TokenizedStrategy.
onlyManagement: Verifies that the caller is authorized under the strategy’s management role, controlling strategy operational parameters.
onlyKeepers: Restricts function access to authorized keepers or management, facilitating routine maintenance and operational tasks.
onlyEmergencyAuthorized: Limits access to emergency functions to addresses with emergency authorization, enhancing security and control in crisis situations.
tokenizedStrategyAddress: Address of the TokenizedStrategy implementation used across all strategies for handling logic and storage.
TokenizedStrategy: A reference to the TokenizedStrategy instance, treating the strategy as if it’s a library for internal function calls.
asset: The ERC20 token that the strategy operates on, used for yield-generating activities.
_deployFunds(uint256 _amount): Handles the deployment of specified amounts of the asset into yield-generating positions.
_freeFunds(uint256 _amount): Designed to release funds from investment positions, adjusting the strategy’s asset allocation.
_harvestAndReport(): Gathers yield and rebalances the strategy’s assets to reflect the actual holdings accurately.
_tend(uint256 _totalIdle): Manages the strategy’s assets between reporting periods, optimizing yield generation and position management.
_tendTrigger(): Indicates whether the _tend function should be invoked, based on specific strategy conditions or thresholds.
deployFunds(uint256 _amount): Delegates fund deployment to the TokenizedStrategy, allowing it to handle the specifics of asset investment.
freeFunds(uint256 _amount): Delegates the release of funds to the TokenizedStrategy, ensuring that withdrawal requests are honored efficiently.
harvestAndReport(): Provides an accurate and updated accounting of the strategy’s total assets, delegating reporting to the TokenizedStrategy.
tendThis(uint256 _totalIdle): Facilitates the active management of the strategy’s resources, optimizing asset allocation and performance.
shutdownWithdraw(uint256 _amount): Allows for the strategic withdrawal of funds in emergency scenarios, managed through the TokenizedStrategy to ensure consistency and reliability.
_delegateCall(bytes memory _calldata): Facilitates direct interactions with the TokenizedStrategy by forwarding calls and handling returned data or errors.
fallback(): Ensures all unspecified calls or data sent to the strategy are forwarded to the TokenizedStrategy, leveraging its logic and storage capabilities.
VaultPackage: 0xdC988aBC044e764C7b507F89A1755f7427a1CCb2
FactoryPackage: 0xF8E56b3578a274e4a1dF0FF9664f668F5728dCD8
Factory: 0x0c6e3fd64D5f33eac0DCCDd887A8c7512bCDB7D6
TokenizedStrategy: 0x21B5a34F8ae0387f247E9b01bA1B5c5B8A48971F
Accountant: 0x427Fd46B341C5a3E1eA19BE11D36E5c526A885d4
Educational: 0x3C8e9896933B374E638f9a5C309535409129aaA2. Strategies:
Educational: 0xE2DEa7e0c272dE04e8708674dAE73ebd6E5c1455
DeFi: 0x4dd9C4Cd9A8f24a8e4D51E07ae36d6Af4c4CB71B.
Strategies:
VaultPackage: 0xDBC692763f66c951EA9B0fb7f35a42E53893D709
FactoryPackage: 0xf300303bB87370E04aD1f7E183965e34314e4283
Factory: 0xE3E22410ea34661F2b7d5c13EDf7b0c069BD4153
Educational: 0xFEd8e57d02af00cAbBb9418F9C5e1928b4d14f01. Strategies:
Educational: 0xDF19A9B23d9292Af9e8675263C00C0e2AB980a6D
Liquidation: 0xc0AC2E5181F90fDa9E9264b5b1634B2c8bD88CDd
0xD797f2d5952F9bdEd7804a0D348fE75956bF73D8Accountant: 0xe732aAd84ed3a55B02FBE7DF10334c4d2a06afBf
Creating and managing a tokenized strategy in the Fathom ecosystem involves a few critical functions. Below, we detail the essential functions your strategy must implement, focusing on asset deployment, yield optimization, and operational functions for comprehensive management.
BaseStrategyBaseStrategy implements all of the required functionality to seamlessly integrate with the TokenizedStrategy implementation contract allowing anyone to easily build a fully permissionless ERC-4626 compliant Strategy by inheriting this contract and overriding three simple functions.
In the context of the BaseStrategy, there are a couple of built-in global variables that you will frequently access:
asset: This variable represents the ERC-20 token that your strategy will use as the primary asset for operations like deposits, withdrawals, and yield generation.
TokenizedStrategy: This variable refers to the interface or instance of the strategy that includes core functions and state variables necessary for the strategy's operation.
If your strategy requires additional data or needs to check on operational states, you can access these through the TokenizedStrategy variable. It provides access to various states like totalAssets managed by the strategy.
_deployFunds(uint256 _amount)Purpose
This function manages the deployment of the underlying asset into a yield-generating protocol each time a deposit is made into the strategy. It's responsible for ensuring that new deposits, as well as any funds previously not deployed, are effectively put to work to generate yield.
Parameters
_amount: Represents the total quantity of the underlying assets that are available to be deployed. This includes both the new deposits and any funds that were previously idle within the strategy.
Behavior and Considerations
Permissionless: This function can be called without specific permissions, which means the operations (like swaps or LP staking) can be initiated by any entity. This open access requires careful management to prevent manipulation.
Partial Deployment: The strategy can choose not to deploy all available funds depending on its needs or conditions in the underlying protocols.
_freeFunds(uint256 _amount)Purpose
This function is invoked when there is a need to withdraw funds from the yield source, typically triggered by a user's withdrawal request from the strategy.
Parameters
_amount: The amount of the underlying asset required to be liquidated from the yield source to meet withdrawal requests.
_harvestAndReport()Purpose
This function is central to the strategy's operational cycle, called periodically to manage the harvesting of rewards, reinvestment, and the reporting of the strategy's performance.
Returns
_totalAssets: Provides a verified total of the strategy’s assets, including those deployed and idle, ensuring accurate performance tracking and fee calculation.
Behavior and Considerations
Permissioned: Unlike other functions, this one is permissioned to ensure only authorized addresses can execute it, safeguarding against unauthorized or harmful actions.
Comprehensive Asset Accounting: It is crucial for this function to accurately account for all assets to ensure correct profit, loss, and fee calculations.
While overriding the primary functions in a strategy ensures basic compliance and operational capability, incorporating additional optional functions allows for more detailed control and customization of the strategy's behavior. These functions are instrumental for strategies seeking greater flexibility and complexity in managing asset interactions and operational constraints.
availableDepositLimit (address _owner)Purpose: Restricts the amount that can be deposited based on strategic constraints or protocol requirements.
Parameter: _owner is the depositor's address.
Returns: The maximum allowable deposit amount.
availableWithdrawLimit (address _owner)Purpose: Limits the amount that can be withdrawn, useful for managing liquidity or protocol constraints.
Parameter: _owner refers to the shareholder.
Returns: The permissible withdrawal amount.
Usage
_tend (uint256 _totalIdle)Purpose: Allows for periodic maintenance or adjustments of the strategy's assets without a full report.
Parameter: _totalIdle represents the amount of idle assets available.
Returns: None.
Usage
_tendTrigger ()Purpose: Indicates whether it's appropriate to perform a tend operation.
Returns: A boolean indicating whether a tend operation should be initiated.
Usage: Acts as a check to ensure that tend operations are called when necessary, based on specific strategy conditions or thresholds.
Best Practice: Implement logic that assesses current market conditions, strategy performance, or asset allocations to decide the necessity of a tend operation.
_emergencyWithdraw (uint256 _amount)Purpose: Facilitates the withdrawal of funds in emergency situations, particularly after a strategy shutdown.
Parameter: _amount specifies how much of the underlying asset to withdraw.
Returns: None.
These optional functions provide strategists with the tools to fine-tune their strategy's interaction with underlying assets, offering flexibility to adapt to a variety of operational scenarios and market conditions.
A critical operational process for strategists is the regular reporting of strategy performance. Reporting must be initiated by authorized addresses, specifically those designated as 'management' or 'keeper'. The report function is instrumental in aggregating accrued rewards, documenting any profits or losses, and managing the assessment and distribution of fees. This function underpins the yield generation for vault depositors and the fee accrual for strategists.
Strategies should be designed with the expectation that reporting occurs at intervals defined by the strategy’s specific profitMaxUnlockTime. This setup ensures that the strategy remains aligned with its yield targets and operational metrics.
_harvestAndReport is the primary function called during a report; it is pivotal for collecting rewards and recalibrating strategy assets and positions. Strategies that require more frequent operational checks or adjustments should implement and utilize _tend and tendTrigger functions to handle necessary actions between reports.
Strategies come equipped with several modifiable parameters that management can adjust as needed:
Changing Management: To change the strategy's management, initiate a two-step process. First, the existing management should invoke setPendingManagement(address) with the new management address. Subsequently, the new address must call acceptManagement() to finalize the transfer.
Keeper: The strategy manager has the ability to designate a new keeper by calling setKeeper(address).
Emergency Admin: Initially set to
Strategies incorporate two primary emergency functions:
Shutdown Strategy: Executable only by the management or emergency admin, this irreversible function halts new deposits and mints. However, it allows other operations such as withdrawals, redemptions, reports, and tending to continue, enabling ongoing profit and loss documentation and allowing users to access their funds post-shutdown. This function can be utilized in critical situations or to decommission a vault.
Emergency Withdraw: Upon strategy shutdown, management or the emergency admin may activate emergencyWithdraw(uint256 _amount) to extract a specified amount from the yield source and retain it within the vault in an idle state.
These emergency measures, along with any additional custom functions, are crucial tools for strategists to manage urgent scenarios effectively.
https://github.com/Into-the-Fathom/fathom-vaults-smart-contracts/blob/master/contracts/factory/packages/FactoryPackage.sol
Factory is proxy, and its implementation is FactoryPackage.
The FactoryPackage contract is responsible for managing and deploying vaults with specific configurations. It maintains control over the vault's deployment template, fee structure, and also tracks all deployed vaults.
vaultPackage: Address of the vault package used as the template for deploying new vaults.
feeRecipient: Address where collected fees are sent.
feeBPS: Basis points for calculating fees on transactions.
vaults: Dynamic array storing addresses of all vaults deployed by this factory.
vaultCreators: Mapping from vault address to the creator's address.
updateVaultPackageArguments:
_vaultPackage: New address for the vault package to update the template for future vault deployments.
updateFeeConfigArguments:
_feeRecipient: New address for receiving the fees collected from the operations.
_feeBPS: New basis points for the fee, updating how the fee percentage is calculated.
deployVaultArguments:
_profitMaxUnlockTime: The maximum time over which profits are unlocked in the deployed vault.
_assetType: Type identifier of the asset, useful for handling different asset behaviors or requirements.
getVaultsReturns: An array of addresses representing all vaults that have been deployed by this factory.
getVaultCreatorArguments:
_vault: The address of the vault for which the creator's address is queried.
Returns: The address of the creator who initially deployed the specified vault.
protocolFeeConfigReturns: A tuple containing the current fee basis points (uint16) and the address of the fee recipient. This provides a quick overview of how fees are being handled by the factory.
VaultPackageUpdatedParameters:
vaultPackage (address indexed): Emitted when the vault package address is updated.
FeeConfigUpdatedParameters:
feeRecipient (address indexed): Emitted when the fee recipient address is updated.
feeBPS (uint16 indexed): Emitted when the fee percentage basis points are updated.
VaultDeployedParameters:
vault (address indexed): Address of the newly deployed vault.
profitMaxUnlockTime (uint32 indexed): Profit unlock time for the vault.
https://github.com/Into-the-Fathom/fathom-vaults-smart-contracts/blob/master/contracts/strategy/TokenizedStrategy.sol
The TokenizedStrategy contract serves as a proxy-style implementation that centralizes logic, storage, and management for strategies inheriting from BaseStrategy. It facilitates the creation of ERC4626 compliant vaults by handling interactions and state transitions through delegated calls to this contract.
uint256 maxBest Practice: Implement logic to check protocol limits or system status to automatically adjust deposit capabilities.
uint256 maxBest Practice: Override to set limits based on current strategy liquidity or operational requirements.
Best Practice: Use this function to adjust positions based on market conditions or internal strategy targets.
Best Practice: Ensure that the logic is straightforward and failsafe to prevent complications during emergency operations.
address(0)setEmergencyAdmin(address)Performance Fee: The management can modify the performance fee rate, which is applied to gains during reporting, using setPerformanceFee(uint16). This setting adheres to defined minimum and maximum limits.
Performance Fee Recipient: Assign the recipient of the performance fees by calling setPerformanceFeeRecipient(address).
Profit Unlocking Period: Profits are gradually released to depositors over a period defined by profitMaxUnlockTime, which defaults to 10 days but can be adjusted by the strategist with setProfitMaxUnlockTime(uint256).
_asset: Address of the asset (usually a token) that the vault will manage.
_name: Human-readable name of the vault for identification.
_symbol: Symbol of the vault's token.
_accountant: Address of the accountant contract that manages fee assessments and other accounting tasks for the vault.
_admin: Address that will have administrative privileges over the newly created vault.
asset (address indexed): Asset managed by the vault.
name (string): Name of the vault.
symbol (string): Symbol of the vault’s token.
accountant (address): Accountant contract address.
admin (address): Admin address with privileges over the vault.
StrategyData: This struct consolidates all storage variables needed for a strategy, optimizing for gas efficiency by reducing the frequency of storage slot loading during function execution. Key elements include:initialDomainSeparator and initialChainId: Utilized for EIP-712 compliance across different chains.
totalSupply, totalIdle, and totalDebt: Track the total shares issued, the idle assets, and the assets actively deployed, respectively.
profitUnlockingRate and fullProfitUnlockDate: Manage the unlocking of profit over time.
management, keeper, emergencyAdmin: Addresses responsible for strategy management, routine maintenance, and emergency interventions.
Initialization and Strategy Setup: On the deployment of a new strategy, essential parameters like asset type, strategy name, and roles are established.
Asset Management: Functions to deploy funds (deployFunds), free funds (freeFunds), and report the strategy's performance (report) encapsulate core investment strategy operations.
Fee Management: The contract facilitates setting and adjusting performance fees, which are calculated on the profits generated by the strategy.
onlyManagement: Ensures that only the designated management address can perform certain administrative tasks.
onlyKeepers: Restricts sensitive operations such as reporting to either the designated keeper or management addresses.
onlyEmergencyAuthorized: Allows for emergency actions, such as strategy shutdown, to be executed by authorized emergency administrators.
Management Events: Such as UpdateManagement, signal changes in management roles or parameters.
Operational Events: Including Deposit and Withdraw, provide transactional transparency for assets moving in and out of the strategy.
Performance Reporting: The Reported event logs the outcomes of performance reports, detailing profits, losses, and fees.
deposit/mint: For adding assets to the strategy in exchange for shares.
withdraw/redeem: For removing assets from the strategy, optionally handling losses within specified bounds.
shutdownStrategy/emergencyWithdraw: For halting new investments and managing assets in response to adverse conditions.
setPerformanceFee, setKeeper, setEmergencyAdmin: Functions to adjust operational parameters and roles to respond to evolving strategy needs or external conditions.
shutdownStrategy: A critical function used to cease all investment activities, allowing the strategy to only handle withdrawals and necessary maintenance.
convertToShares/convertToAssets: Convert between the underlying asset and shares based on the current state of the strategy, aiding in calculations for deposits and withdrawals.
_updateBalances: Ensures internal accounting reflects the actual state of assets within the strategy, crucial after any interaction that alters the balance of deployed or idle assets.