Deploying and Configuring a Kodiak Farm
Deploying and Configuring a Kodiak Farm
This guide will walk you through the process of deploying a new Kodiak Farm contract and configuring it to distribute rewards for staked tokens.
Overview
Kodiak Farm is a DeFi staking solution that allows users to earn rewards by staking their tokens. As a farm creator, you can customize various parameters to determine how rewards are distributed, including reward rates, lock periods, and multipliers.
Prerequisites
Before deploying a Kodiak Farm, ensure you have:
An Ethereum-compatible wallet (like MetaMask) connected to the appropriate network
The contract address of the token users will stake (LP token)
The contract address of the token(s) you will distribute as rewards
Sufficient reward tokens to fund the farm
ETH/native tokens for transaction fees
Deploying a Kodiak Farm Contract
Step 1: Access the Farm Deployment Interface
Navigate to the "Create Farm" page in the Kodiak app.
Step 2: Enter Staking Token Details
Staking Token Address: Enter the LP token address (beginning with "0x...") that users will stake to earn rewards.
Note: This is typically a liquidity pool (LP) token or Kodiak Island token, but can be any ERC-20 compatible token.
Step 3: Configure Reward Token Settings
In the "Reward Token" section:
Reward Token Address: Either select a token from the dropdown menu or enter the contract address of your reward token.
Reward Manager Address: Enter the address that will have permission to manage reward distributions. This address will have special privileges to adjust reward parameters.
Important: The reward manager will have significant control over the reward token, being able to adjust reward rates and withdraw tokens. In most cases, this should be an address you control, or a team multi-sig.
Monthly Reward Amount: Specify the total amount of tokens to be distributed as rewards each month.
Calculation: The system will automatically calculate the per-second distribution rate based on this amount.
To add multiple reward tokens, click the "+ Add Reward Token" button in the top-right corner of the section.
Step 4: Initialize Deployment
Click the "Deploy Farm" button at the bottom of the page to proceed to the deploying farm.
Configuring Farm Parameters
After deploying the farm contract, you'll need to configure it before users can begin staking. The farm status will initially show as "Not Started".
Step 1: Review Farm Configuration (Step 1/2)
The configuration page displays "Step 1/2" in the top-right corner, indicating this is the first of two configuration steps.
Step 2: Verify Reward Token Configuration
Custom Token: Confirm the reward token address is correct (e.g., 0x1319d21A0eC48F847C15823fc3e8bC7f5aae9ca2).
Reward Rate: Review the reward distribution rate. The interface displays this as:
Raw rate (e.g., 9999999.99999999999072)
Human-readable equivalent (e.g., 3.85802469/sec)
Reward Manager: Verify the reward manager address is correct (e.g., 0x4f5F9dB14E195484cf7790fD3946CF6e66A166B0).
Step 3: Set Staking Token Cap
The staking token cap determines the maximum amount of tokens that can be staked in your farm.
Important: Enter
-1
to set an unlimited cap (maximum uint256 value). This allows unlimited staking in your farm.
Step 4: Configure Reward Multipliers and Lock Periods
Maximum Multiplier: Use the slider to set the maximum reward multiplier (e.g., 3x). This value determines how much additional rewards users can earn by staking for longer periods.
Minimum Lock Time: Set the minimum required staking period in days. Users must stake for at least this duration before they can withdraw.
Set to
0 day(s)
if you don't want to enforce a minimum staking periodHigher values increase commitment but may deter some users
Lock Time for Max Multiplier: Set the staking duration (in days) required to receive the maximum reward multiplier.
In the example shown, users need to stake for 30 days to receive the 3x multiplier
Shorter lock periods will receive proportionally smaller multipliers
Rewards Duration: Set the total period (in days) during which farming rewards will be distributed.
This determines how long your farm will be active
Ensure you have sufficient reward tokens to cover this entire period
Step 5: Review and Finalize Configuration
To reset all parameters to default values, click the "Reset" button.
When you're satisfied with all settings, click the "Review Changes" button to proceed to the final confirmation step.
Starting the Farm
After completing the configuration, you'll need to start the farm to activate it.
Step 1: Final Review
Review all parameters one final time to ensure they're set correctly.
Step 2: Ensure Sufficient Reward Tokens
Before starting the farm, make sure:
Your wallet or the contract has sufficient reward tokens to cover the entire rewards duration
You have enough Bera to pay for the transaction fee
Critical: If the contract or wallet doesn't have enough reward tokens, the farm cannot be started.
Step 3: Activate the Farm
Click the "Start Farm" button to activate your farm.
After successful activation, the farm status will change from "Not Started" to "Active".
Troubleshooting Common Issues
Farm Won't Start
Problem: Clicking "Start Farm" doesn't activate the farm
Solution: Verify you have sufficient reward tokens. Check both your wallet balance and any allowances granted to the farm contract.
Incorrect Parameters
Problem: Parameters appear incorrect after configuration
Solution: Use the "Reset" button during configuration and set them again. Double-check all values before finalizing.
Transaction Failures
Problem: Transactions fail during deployment or configuration
Solution: Ensure you have sufficient ETH/native tokens for gas. Verify all addresses are correctly formatted and valid on the network.
Conclusion
Congratulations! You've successfully deployed and configured a Kodiak Farm. Users can now stake their tokens and earn rewards based on your configured parameters.
For additional assistance or feature requests, please contact the Kodiak Finance support team via Discord
Last updated