Intro to Octant v2 Vaults
Octant v2 Vaults are ERC-4626 vaults designed to make your life as a builder easier.
We want you to focus on the boundless DeFi integration opportunities for Octant v2 rather than getting caught up in accounting minutiae, wildly expensive audits, and reinventing the wheel.
Our basic approach is to separate vault implementation from yield strategy logic to make v2 strategy integration approachable, secure, and extensible.
The TokenizedStrategy Contract

Octant v2’s TokenizedStrategy.sol is a fork of Yearn v3’s TokenizedStrategy.sol. Our primary modifications focus on profit distribution (via the PaymentSplitter).
TokenizedStrategy is an abstract contract that contains all the ERC-4626 logic: accounting, access controls, and share management (i.e., it takes care of the most high-risk, intricate, & repetitive stuff for you).
With its use of virtual functions, it can adapt to different yield generation patterns across implementations. There are currently two concrete implementations:
- YieldDonatingTokenizedStrategy: For DeFi strategies that periodically pay rewards in discrete tokens. The yield received is converted to shares and sent to the Payment Splitter. Examples include Aave lending, Yearn's strategies, & traditional ETH staking.
- YieldSkimmingTokenizedStrategy: For DeFi strategies with assets that appreciate over time via rewards. The calculated asset appreciation (which could be negative— there is a recovery mechanism) is used to dilute the shares supply by minting them to the Payment Splitter. Examples include liquid staking tokens that appreciate vs ETH (rETH), rebasing tokens, & compounding tokens.
TokenizedStrategy is also used as the proxy implementation for BaseStrategy. Custom strategies (see the next section) delegate all calls that are not implemented by the strategy itself to TokenizedStrategy, including ERC-4626 calls, while using the strategy's own storage.
TokenizedStrategy handles all the vault mechanics and calls back to the strategy as needed. The contract only needs to be deployed once per network because of his proxy structure. This reusability means it can be leveraged by any number of strategies.
A single struct at a custom storage slot in TokenizedStrategy holds all global variables, so strategy implementations don’t need to worry about collisions.
The BaseStrategy Contract
BaseStrategy.sol is the abstract contract from which custom yield strategies inherit.
To create a custom strategy, you’ll MUST implement three core functions. One handles deploying funds into the external protocol, the second handles withdrawals, and the third is responsible for harvesting rewards and reporting the total assets.
Each function encapsulates the strategy-specific logic required to interact with the protocol you're integrating:
function _deployFunds(uint256 _amount) internal virtual {
// The strategy-specific logic to deposit funds into the external protocol
}
function _freeFunds(uint256 _amount) internal virtual {
// The strategy-specific logic to withdraw funds from the external protocol
}
function _harvestAndReport() internal virtual returns (uint256 _totalAssets) {
// The strategy-specific logic to claim rewards from the external protocol and calculate total value
}
These are the only functions that Octant v2 strategy builders must focus on — a much more manageable task than faithfully implementing all the ERC-4626 functionality.
Here’s an example transaction flow:
- When someone calls deposit()on a custom strategy (because it’s not defined there), a fallback function automatically delegates that call to the appropriate TokenizedStrategy implementation (i.e., YieldDonatingTokenizedStrategy or YieldSkimmingTokenizedStrategyYieldSkimmingTokenizedStrategy).
- The TokenizedStrategy implementation handles the logic to deposit funds, calculate shares, & mint them.
- It then calls back to the custom strategy deployFunds()—the method inherited from BaseStrategy.
- deployFunds()calls- _deployFunds(), which has been overridden to implement the logic required to deposit funds into the external protocol.
Optional overrides include _tend, _tendTrigger, availableDepositLimit, availableWithdrawLimit and _emergencyWithdraw
Ready to start building?
Check out our Strategy Development Example to see just how easy it is to start building on Octant v2.