Strategy Composition

Strategies are generated dynamically based on the structure of DeFi liquidity pools. The building blocks for strategies are strategy steps and strategy sequences. The universe of possible strategy sequences together form a strategy graph.
This page describes how OptyFi strategies are composed.


  • LP Token: Represents ownership in a liquidity pool.
  • Vault Token: Represents ownership in an OptyFi vault. It should be noted that vaults are a type of liquidity pool, therefore vault tokens are also LP Tokens.
  • Input Token (aka Underlying Token): The asset deposited into or held by a pool or vault.
  • Output Token (aka LP Token): The token received when depositing into a pool. Output tokens are interchangeably referred to as LP Tokens.
  • Reward Token: The token distributed by a Protocol to reward its users and/or community. Examples include OPTY, COMP and CRV.

Strategy Step

A strategy step is the fundamental building block of a strategy. A strategy step may consist of a deposit step or a borrow step.

Deposit Step

Depositing an underlying token into a pool and receiving an LP token in return is considered a deposit strategy step.

Borrow Step

Depositing an underlying token into a pool as collateral and then borrowing an underlying token from a different pool is considered a borrow strategy step.

Strategy Sequence

A strategy sequence is comprised of multiple strategy steps.
If a token is deposited into a pool and the LP token you receive in return can be deposited into a second pool, then you can "string together" two strategy steps to form a two-step strategy sequence.
This process can be generalized into n-steps based on the condition outputToken(step[n-1]) = inputToken(step[n]).
In today's DeFi reality, strategy sequences are usually limited to a maximum of two deposit steps or two deposit steps with a borrow step.