DFMM Strategies: Automating Portfolio Management

Cover Image for DFMM Strategies: Automating Portfolio Management
Zach Thielemann
Zach Thielemann

DFMM Strategies: Automating Portfolio Management

The Dynamic Function Market Maker (DFMM) protocol enables a paradigm shift in the practical implementation of decentralized exchange technology. Each DFMM allows for the construction of expressive and dynamic automated portfolios we refer to as strategies. A paramaterized DFMM is a strategy. Let's dig deeper into the components of a DFMM strategy and how these novel primitives construct expressive and dynamic automated portfolios.

Anatomy of a DFMM Strategy

Depositors allocate to Strategies that have their desired payoffs. Strategies can be permissionlessly parameterized to create different payoffs. All strategies These properties allow for a rich strategy design space.

Trading Function

Trading functions determine the price of assets within a liquidity pool. Automated Market Makers (AMMs) typically differentiate themselves through their trading functions. Uniswap, Curve, and Balancer are all common examples of such architecture.

Each DFMM allows users to create a fully configurable strategy.

Parameterization & Business Logic

Some may be familiar with the trading function parameters of Uniswap V3. Select two assets, a fee level, and a price range. While these parameters are intuitive to many, the accessibility of a particular pricing equation should not limit sophistication.

Similar to hooks in Uniswap V4, strategies may freely implement generic business logic, affecting both underlying pool functionality and trading function parameters. Parameterization logic can be informed by control theory, external chain state (i.e. Axiom), third-party protocol dependencies, business requirements, regulatory restrictions, or simply the strategy author's discretion.


The DFMM protocol tokenizes positions in its pools as ERC-20 tokens. Developers can compose these tokens in other DFMM strategies to construct dynamic, diversified portfolios. Third-party protocol integrations unlock additional payoffs and composability, such as lending for short payoffs, further expanding the utility of DFMMs.

Example DFMMs

Over the past few months, Primitive has developed and modeled DFMMs and a number of strategies with Arbiter. We are excited to share a sneak peek into the limitless potential of DFMM as we continue building.

Constant Sum

Constant sum is the most primitive trading function. This function is parameterized by choosing a price. This DFMM can parameterize a strategy that deploys all assets at a single price. Due to its similarity to a single-tick order book, this trading function enables primitives like RFQ and stop-loss orders.

View our constant sum strategy example: https://github.com/primitivefinance/DFMM/blob/main/src/ConstantSum

Geometric Mean

Geometric mean trading functions create a value-weighted portfolio of assets. This DFMM is parameterized by weights and a swap fee. For example, we may parameterize a strategy by selecting a weight of 0.80 for token X{X} and 0.20 for token Y{Y} to create an automatically rebalancing 80%/20% portfolio of X/Y{X/Y}. This DFMM enables strategies like dollar cost averaging and portfolio weight targeting.

View our geometric mean strategy example: https://github.com/primitivefinance/DFMM/tree/main/src/GeometricMean


The LogNormal DFMM distributes liquidity in a log-normal distribution. Three variables parameterize these strategies: μ\mu (mean), σ\sigma (width), and the swap fee. LogNormal excels at providing deep, configurable liquidity. Additional business logic may manipulate these parameters to create various time-sensitive, correlated portfolios, such as staked assets that consistently accrue value.

View our LogNormal strategy example: https://github.com/primitivefinance/DFMM/tree/main/src/LogNormal

The Build is On!

Expect frequent updates on Primitive-authored DFMM strategies. The future of DeFi is coming, and we couldn't be more excited to build alongside our incredible community.