Documentation v0.98
  • Documentation Summary
  • Understanding Dexponent
  • Stakeholders Guide
    • Liquidity Providers
    • Farm Owner's Guide
    • Verifiers
  • Protocol Overview
    • Root Farm Strategy
  • Example Strategies
    • Lido stETH Yield Farm
    • TAO Top 10 Farm
    • USDC Leverage Lend Aave Farm
    • $ETH Liquid Staked Lending
    • Real‑World Asset Stable Yield Strategy
    • $MEME Index Stake Farm
    • $ETH Liquidity Pool Farm
    • TAO-DXP Re-Stake Strategy
  • Sharpe Consensus
    • Performance Benchmarking
    • Proof of returns
Powered by GitBook
On this page
  • Understanding the FarmStrategy Abstract Contract
  • Step 1: Creating Your Strategy
  • Step 2: Applying for Farm Approval
  • Step3: Creating Liquidity Pools
  • Final Deployment
  1. Stakeholders Guide

Farm Owner's Guide

Creating and Deploying Custom DeFi Strategies

As a farm owner, you are responsible for deploying and managing Farms, which are yield generation strategies within the protocol. Each Farm operates as a distinct strategy, such as staking, lending, or other DeFi approaches and built on the standardised FarmStrategy abstract contract. This modular framework allows you to customise, upgrade, and optimise your strategies. This comprehensive guide walks through the process of creating, customising, and deploying your own yield strategies (farms) through our protocol. As a farm owner, you'll be able to implement custom DeFi strategies that can be accessed by users across the platform.

Understanding the FarmStrategy Abstract Contract

The FarmStrategy abstract contract standardises how Farms are implemented, ensuring flexibility, security, and upgradability. Below is an overview of its key components:

Contract Structure

solidity

abstract contract FarmStrategy is Ownable, ReentrancyGuard {
    /// @notice The associated Farm contract.
    address public farm;
    /// @notice The principal asset for this strategy (address(0) for native ETH).
    address public asset;


    event LiquidityDeployed(uint256 amount);
    event LiquidityWithdrawn(uint256 amount);
    event RewardsGenerated(uint256 amount);


    constructor(address _farm, address _asset) {
        farm = _farm;
        asset = _asset;
    }


    /// @notice Deploy liquidity into the strategy.
    function deployLiquidity(uint256 amount) external virtual payable;
    
    /// @notice Withdraw liquidity from the strategy.
    function withdrawLiquidity(uint256 amount) external virtual;
    
    /// @notice Harvest generated rewards from the strategy.
    function harvestRewards() external virtual returns (uint256);
}

Key Features

  • Ownable: Restricts critical functions (e.g., strategy upgrades) to the farm owner.

  • ReentrancyGuard: Prevents reentrancy attacks for enhanced security.

  • Modular Design: Virtual functions (deployLiquidity, withdrawLiquidity, harvestRewards) allow customisation of strategy logic.

  • Events: Emit LiquidityDeployed, LiquidityWithdrawn, and RewardsGenerated for transparency and tracking.

  • Asset Flexibility: Supports any ERC-20 token or native ETH (address(0)).

Step by Step Guide for Farm Owners

The farm creation and deployment process consists of three main steps:

  1. Creating your strategy with customized parameters

  2. Applying for farm approval with your contract implementation

  3. Setting up liquidity pools that pair your strategy's principal asset with DXP

Let's explore each step in detail.

Step 1: Creating Your Strategy

To begin creating your custom yield strategy, navigate to the "Farm Manager" section and select "Create Strategy." You'll be presented with a form containing several important configuration options:

1.1 Strategy Details

Strategy Name Choose a descriptive name that clearly communicates the purpose and approach of your strategy. This name will be visible to all users browsing available strategies.

Strategy Type Select the category that best represents your strategy's approach. The platform currently supports various types including:

  • Staking

  • Yield Farming

  • Liquidity Providing

  • Options Writing

  • Automated Market Making

Each type has specific parameters and optimization techniques associated with it. For this guide, we'll focus on the "Staking" strategy type.

1.2 Token Selection

Principal Tokens Select the principal token that users will deposit into your strategy. This is typically the asset being staked. Common choices include ETH, USDC, USDT, and other major tokens.

Claim Token This represents the secondary token in your strategy, which may be used for reclaiming the provided liquidity. In many cases, this will be $DXP, our native protocol token.

1.3 Protocol Selection

Choose the underlying DeFi protocol that your strategy will interact with. Your selection will determine many aspects of how your strategy functions, including available yields, risk profiles, and technical implementation requirements. Options include:

Uniswap Best for strategies focused on automated market making (AMM) and liquidity provision using the Uniswap V3 concentrated liquidity model.

Aave Ideal for lending and borrowing strategies, allowing for yield optimization through the Aave lending protocol.

Compound Suitable for strategies that utilize lending markets and the COMP token incentives within the Compound ecosystem.

Curve Specialized for stablecoin trading and yield farming, particularly effective for low-slippage trades between similar assets.

Yearn Focused on yield optimization across multiple protocols with automated rebalancing capabilities.

Others For specialized protocols or custom implementations not covered by the main options.

1.4 Strategy Parameters

These parameters define the economic and risk characteristics of your strategy:

Initial Investment The minimum amount required to initialize your strategy. This serves as a baseline for calculating returns and helps users understand the entry point.

Target APY The projected annual percentage yield your strategy aims to achieve. While this is an estimate and not guaranteed, it should be realistic based on historical performance and current market conditions.

Capital Allocation Defines how funds will be distributed across different components of your strategy. For complex strategies involving multiple protocols or assets, this becomes particularly important.

Market Cap The maximum total value that can be deployed through your strategy. Setting an appropriate cap helps manage risk and ensure the strategy remains effective as it scales.

Duration The recommended time horizon for the strategy, indicating whether it's designed for short, medium, or long-term deployment. The default setting is 12 months.

Strategy Fee The percentage fee you'll collect from profits generated by your strategy. This rewards you as the farm owner for creating and maintaining a successful strategy.

1.5 Risk Management

Risk Tolerance Select the appropriate risk level for your strategy:

  • Low: Conservative approaches with emphasis on capital preservation

  • Medium: Balanced risk-reward profile suitable for most users

  • High: Aggressive strategies that may offer higher returns with increased volatility

Slippage Tolerance Define the maximum acceptable price difference between expected and executed transactions. Lower values (0.5%) are suitable for stable pairs and high-liquidity markets, while higher values (1-2%) may be necessary for more volatile or exotic pairs.

Gas Settings Configure transaction speed preferences:

  • Standard (20 GWEI): Economical option for non-time-sensitive operations

  • Fast (25 GWEI): Balanced option for normal operations

  • Rapid (30 GWEI): Priority execution for time-sensitive transactions

Auto-compound Returns Enable this option to automatically reinvest generated yields, potentially increasing overall returns through compounding effects. This is particularly effective for long-term strategies. Once you've configured all parameters, click "Create Farm Strategy" to save your configuration and proceed to the next step.

Step 2: Applying for Farm Approval

After creating your strategy configuration, you'll need to apply for approval by providing your smart contract implementation. This step ensures that your strategy meets our protocol's standards for security, efficiency, and compatibility.

2.1 Implementing Your Strategy Contract

Your strategy contract must implement our standard interfaces and inherit from our base contracts on our supported networks. The contract should handle:

  • Asset deposits and withdrawals

  • Yield generation logic specific to your chosen protocol

  • Fee distribution mechanisms

  • Safety measures and circuit breakers

Once your contract is deployed to one of our supported mainnet (or testnet for initial testing), you'll need to provide the contract address during the application process.

2.2 Submitting Your Application

Navigate to the "Apply for Farm" section where you'll complete a step-by-step application:

  1. Basic Information Verification The system will verify your account details and eligibility for farm creation.

  2. Strategy Contract Submission Enter your deployed contract address in the format: 0x09AaB95d0e96073687417A7e808Cd72706daDBae

  3. Review and Submit Carefully review all information before submitting your application. Once submitted, our team will review your strategy implementation.

The review process typically takes up to 24 hours, during which our team will:

  • Verify the contract code for security vulnerabilities

  • Ensure compliance with protocol standards

  • Test integration with our system

Step3: Creating Liquidity Pools

After your strategy is approved, the final step is setting up liquidity pools. Our protocol automatically deploys a liquidity pool pairing DXP (our native token) with the principal asset of your strategy.

3.1 Configuring Your Pool

Navigate to the "Create Pool" section where you'll:

  1. Select Token Pair Choose your strategy's principal token (e.g., ETH) which will be paired with DXP automatically.

  2. Set Fee Tier Select the appropriate fee tier based on the expected trading characteristics:

  • 0.01%: For very stable pairs with minimal price movement

  • 0.05%: Recommended for stable pairs like major cryptocurrencies

  • 0.3%: Suitable for most standard cryptocurrency pairs

  • 1%: Reserved for exotic pairs with high volatility

  1. Define Price Range and Deposit Amounts In the next step (not shown in screenshots), you'll set the price range for concentrated liquidity and the initial deposit amounts for both tokens.

3.2 Pool Deployment

Once configuration is complete, the pool will be automatically created and linked to your strategy. This provides several benefits:

  • Creates a direct market for users to trade between your strategy's asset and DXP

  • Enhances overall liquidity in the ecosystem

  • Provides additional yield opportunities for liquidity providers

Final Deployment

After all three steps are completed and approved, your custom yield strategy will be deployed to the platform and become available to users. As the farm owner, you'll be able to:

  • Monitor performance through the dashboard

  • Collect strategy fees as users deposit assets

  • Make adjustments to parameters as market conditions change

  • Build a reputation as a successful strategy creator

PreviousLiquidity ProvidersNextVerifiers

Last updated 1 month ago