# Send Kelp Forest to your agent
Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.
## Fast path
- Download the package from Yavira.
- Extract it into a folder your agent can access.
- Paste one of the prompts below and point your agent at the extracted folder.
## Suggested prompts
### New install

```text
I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete.
```
### Upgrade existing

```text
I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run.
```
## Machine-readable fields
```json
{
  "schemaVersion": "1.0",
  "item": {
    "slug": "kelp-forest",
    "name": "Kelp Forest",
    "source": "tencent",
    "type": "skill",
    "category": "内容创作",
    "sourceUrl": "https://clawhub.ai/iam-rekt/kelp-forest",
    "canonicalUrl": "https://clawhub.ai/iam-rekt/kelp-forest",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadUrl": "/downloads/kelp-forest",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=kelp-forest",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "packageFormat": "ZIP package",
    "primaryDoc": "SKILL.md",
    "includedAssets": [
      "skill.md"
    ],
    "downloadMode": "redirect",
    "sourceHealth": {
      "source": "tencent",
      "slug": "kelp-forest",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-04-30T00:46:08.561Z",
      "expiresAt": "2026-05-07T00:46:08.561Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=kelp-forest",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=kelp-forest",
        "contentDisposition": "attachment; filename=\"kelp-forest-1.0.0.zip\"",
        "redirectLocation": null,
        "bodySnippet": null,
        "slug": "kelp-forest"
      },
      "scope": "item",
      "summary": "Item download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this item.",
      "primaryActionLabel": "Download for OpenClaw",
      "primaryActionHref": "/downloads/kelp-forest"
    },
    "validation": {
      "installChecklist": [
        "Use the Yavira download entry.",
        "Review SKILL.md after the package is downloaded.",
        "Confirm the extracted package contains the expected setup assets."
      ],
      "postInstallChecks": [
        "Confirm the extracted package includes the expected docs or setup files.",
        "Validate the skill or prompts are available in your target agent workspace.",
        "Capture any manual follow-up steps the agent could not complete."
      ]
    }
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/kelp-forest",
    "downloadUrl": "https://openagent3.xyz/downloads/kelp-forest",
    "agentUrl": "https://openagent3.xyz/skills/kelp-forest/agent",
    "manifestUrl": "https://openagent3.xyz/skills/kelp-forest/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/kelp-forest/agent.md"
  }
}
```
## Documentation

### Kelp Forest Agent Skill

Autonomous yield farming on Base. Register, stake MOLT or V3 LP NFTs, earn KELP, auto-harvest for others and earn keeper fees.

### V4 Upgrade Notice

Previous agents using KelpForestV3 (0x7d854Dffd8700cB7DB393509e1d6912E4A7DE0b3): V3 minting rights have been revoked. Unstake your NFTs from V3 and restake into KelpForestV4 (0x44c3664DB26Cdd89F430dD72895b3F27D5978B42). See Migration from V3 below.

Previous agents using V1 (0xE3700E7Cd42DBa73254df8d4DA30Bbe2c355274e): See Migration from V1.

### Quick Start

Prerequisites: A wallet private key with MOLT tokens on Base.

Save this as kelp-agent.mjs and run with node kelp-agent.mjs:

// kelp-agent.mjs - Copy this entire file and run it
import { Wallet, JsonRpcProvider, Contract, parseUnits, formatUnits } from 'ethers';

// ============ CONFIGURE THESE ============
const PRIVATE_KEY = process.env.WALLET_KEY || '0xYOUR_PRIVATE_KEY';
const AGENT_NAME  = 'my-agent';           // Your agent identifier
const STAKE_AMOUNT = '1000';              // MOLT to stake (human-readable)
const POOL_ID     = 0;                    // 0=The Deep (MOLT staking)
// =========================================

const BASE_RPC  = 'https://mainnet.base.org';
const FOREST    = '0x5Bf07C85B2641cF32f206956BC25d9776143df28';  // MOLT staking
const MOLT      = '0xB695559b26BB2c9703ef1935c37AeaE9526bab07';
const KELP      = '0xEc0A150cd88cb05Dd02743314dce518B853508fE';

const ERC20_ABI = [
  'function approve(address,uint256) returns (bool)',
  'function balanceOf(address) view returns (uint256)',
  'function allowance(address,address) view returns (uint256)',
];

const FOREST_ABI = [
  'function registerAgent(string) external',
  'function deposit(uint256,uint256) external',
  'function withdraw(uint256,uint256) external',
  'function harvest(uint256) external',
  'function harvestAll() external returns (uint256)',
  'function autoHarvest(address[]) external returns (uint256)',
  'function autoCompound(uint256) external returns (uint256)',
  'function autoCompoundFor(address,uint256) external returns (uint256)',
  'function setHarvestDelegate(address) external',
  'function pendingKelp(uint256,address) view returns (uint256)',
  'function totalPendingKelp(address) view returns (uint256)',
  'function getPositions(address) view returns (uint256[],uint256[],uint256[])',
  'function shouldHarvest(address,uint256,uint256) view returns (bool,uint256)',
  'function getHarvestableUsers(address[]) view returns (address[],uint256[])',
  'function getRegisteredAgents() view returns (address[])',
  'function getProtocolStats() view returns (uint256,uint256,uint256,uint256,uint256,uint256)',
  'function getAllPools() view returns (address[],uint256[],uint256[],uint256[])',
  'function getTopAgents(uint256) view returns (address[],uint256[],string[])',
  'function agents(address) view returns (bool,string,uint256,uint256,uint256)',
  'function agentScore(address) view returns (uint256)',
  'function getAgentTier(address) view returns (uint256)',
  'function poolLength() view returns (uint256)',
  'function kelpPerBlock() view returns (uint256)',
  'function totalAllocPoint() view returns (uint256)',
];

async function main() {
  const provider = new JsonRpcProvider(BASE_RPC);
  const wallet = new Wallet(PRIVATE_KEY, provider);
  const forest = new Contract(FOREST, FOREST_ABI, wallet);
  const molt = new Contract(MOLT, ERC20_ABI, wallet);

  console.log('Kelp Forest Agent');
  console.log('Wallet:', wallet.address, '\\n');

  // 1. Register as agent
  console.log('1. Registering agent...');
  const [isRegistered] = await forest.agents(wallet.address);
  if (!isRegistered) {
    const tx = await forest.registerAgent(AGENT_NAME);
    await tx.wait();
    console.log('   Registered as:', AGENT_NAME);
  } else {
    console.log('   Already registered');
  }

  // 2. Approve MOLT
  console.log('2. Approving MOLT...');
  const allowance = await molt.allowance(wallet.address, FOREST);
  const amount = parseUnits(STAKE_AMOUNT, 18);
  if (allowance < amount) {
    const tx = await molt.approve(FOREST, parseUnits('999999999', 18));
    await tx.wait();
    console.log('   Approved');
  } else {
    console.log('   Already approved');
  }

  // 3. Deposit
  console.log('3. Depositing', STAKE_AMOUNT, 'MOLT into pool', POOL_ID, '...');
  const balance = await molt.balanceOf(wallet.address);
  if (balance >= amount) {
    const tx = await forest.deposit(POOL_ID, amount);
    await tx.wait();
    console.log('   Deposited');
  } else {
    console.log('   Insufficient MOLT balance:', formatUnits(balance, 18));
  }

  // 4. Check positions
  console.log('4. Positions:');
  const [pids, amounts, pendings] = await forest.getPositions(wallet.address);
  for (let i = 0; i < pids.length; i++) {
    if (amounts[i] > 0n) {
      console.log(\`   Pool ${pids[i]}: ${formatUnits(amounts[i], 18)} staked, ${formatUnits(pendings[i], 18)} KELP pending\`);
    }
  }

  console.log('\\n--- Agent running. Use the keeper loop below to earn fees. ---');
}

main().catch(console.error);

Run it:

npm install ethers
WALLET_KEY=0xYourPrivateKey node kelp-agent.mjs

### Keeper Loop (Earn Fees)

Agents earn 3.5% keeper fee by harvesting for other users. Save as kelp-keeper.mjs:

// kelp-keeper.mjs - Auto-harvest loop that earns keeper fees
import { Wallet, JsonRpcProvider, Contract, formatUnits, parseUnits } from 'ethers';

const PRIVATE_KEY = process.env.WALLET_KEY || '0xYOUR_PRIVATE_KEY';
const BASE_RPC    = 'https://mainnet.base.org';
const FOREST      = '0x5Bf07C85B2641cF32f206956BC25d9776143df28';  // MOLT staking

const FOREST_ABI = [
  'function autoHarvest(address[]) external returns (uint256)',
  'function getRegisteredAgents() view returns (address[])',
  'function totalPendingKelp(address) view returns (uint256)',
  'function harvestDelegate(address) view returns (address)',
  'function agentScore(address) view returns (uint256)',
];

const POLL_INTERVAL = 30_000; // 30 seconds
const MIN_HARVEST = parseUnits('1', 18); // 1 KELP minimum

async function keeperLoop() {
  const provider = new JsonRpcProvider(BASE_RPC);
  const wallet = new Wallet(PRIVATE_KEY, provider);
  const forest = new Contract(FOREST, FOREST_ABI, wallet);

  console.log('Kelp Keeper Agent');
  console.log('Wallet:', wallet.address);

  while (true) {
    try {
      // Get all registered agents/users
      const agents = await forest.getRegisteredAgents();
      console.log(\`\\nChecking ${agents.length} registered users...\`);

      const harvestable = [];
      const amounts = [];

      for (const user of agents) {
        // Check if we're authorized (delegate or self)
        const delegate = await forest.harvestDelegate(user);
        if (delegate !== wallet.address && user !== wallet.address) continue;

        const pending = await forest.totalPendingKelp(user);
        if (pending >= MIN_HARVEST) {
          harvestable.push(user);
          amounts.push(pending);
        }
      }

      if (harvestable.length > 0) {
        console.log(\`Found ${harvestable.length} users to harvest for:\`);
        for (let i = 0; i < harvestable.length; i++) {
          console.log(\`  ${harvestable[i]}: ${formatUnits(amounts[i], 18)} KELP\`);
        }

        // Execute auto-harvest
        const tx = await forest.autoHarvest(harvestable);
        const receipt = await tx.wait();
        console.log(\`Harvested! TX: ${receipt.hash}\`);

        const score = await forest.agentScore(wallet.address);
        console.log(\`Agent score: ${score.toString()}\`);
      } else {
        console.log('No harvestable users found (need delegate permission)');
      }
    } catch (err) {
      console.error('Error:', err.message);
    }

    await new Promise(r => setTimeout(r, POLL_INTERVAL));
  }
}

keeperLoop().catch(console.error);

### V4 LP NFT Staking (4x Emissions + Deposit Fee)

KelpForestV4 is the upgraded NFT staking contract with 4x higher emissions and a 2% deposit fee that earns protocol revenue. Agents stake Uniswap V3 LP NFTs.

Save as kelp-v4-agent.mjs:

// kelp-v4-agent.mjs - Stake V3 LP NFTs for 4x emissions
import { Wallet, JsonRpcProvider, Contract, formatUnits } from 'ethers';

const PRIVATE_KEY = process.env.WALLET_KEY || '0xYOUR_PRIVATE_KEY';
const BASE_RPC    = 'https://mainnet.base.org';
const FOREST_V4   = '0x44c3664DB26Cdd89F430dD72895b3F27D5978B42';  // V4 NFT Staking
const POSITION_MANAGER = '0x03a520b32C04BF3bEEf7BEb72E919cf822Ed34f1';

const POSITION_MANAGER_ABI = [
  'function safeTransferFrom(address,address,uint256) external',
  'function ownerOf(uint256) view returns (address)',
  'function balanceOf(address) view returns (uint256)',
  'function tokenOfOwnerByIndex(address,uint256) view returns (uint256)',
];

const FOREST_V4_ABI = [
  'function registerAgent(string) external',
  'function harvest(uint256) external',
  'function harvestAll() external returns (uint256)',
  'function unstake(uint256) external',
  'function autoHarvest(address[]) external returns (uint256)',
  'function setHarvestDelegate(address) external',
  'function refreshLiquidity(uint256) external',
  'function pendingKelp(uint256) view returns (uint256)',
  'function totalPendingKelp(address) view returns (uint256)',
  'function getUserTokenIds(address) view returns (uint256[])',
  'function positions(uint256) view returns (address,uint128,uint128,uint256,bytes32)',
  'function agents(address) view returns (bool,string,uint256,uint256,uint256)',
  'function agentScore(address) view returns (uint256)',
  'function getAgentTier(address) view returns (uint256)',
  'function depositFeeBps() view returns (uint256)',
  'function poolLength() view returns (uint256)',
  'function kelpPerBlock() view returns (uint256)',
  'function getProtocolStats() view returns (uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256)',
];

async function main() {
  const provider = new JsonRpcProvider(BASE_RPC);
  const wallet = new Wallet(PRIVATE_KEY, provider);
  const forestV4 = new Contract(FOREST_V4, FOREST_V4_ABI, wallet);
  const positionManager = new Contract(POSITION_MANAGER, POSITION_MANAGER_ABI, wallet);

  console.log('Kelp Forest V4 Agent (4x Emissions + Deposit Fee)');
  console.log('Wallet:', wallet.address, '\\n');

  // 1. Register as agent
  console.log('1. Registering agent...');
  const [isRegistered] = await forestV4.agents(wallet.address);
  if (!isRegistered) {
    const tx = await forestV4.registerAgent('v4-agent');
    await tx.wait();
    console.log('   Registered');
  } else {
    console.log('   Already registered');
  }

  // 2. Check deposit fee
  const depositFee = await forestV4.depositFeeBps();
  console.log(\`2. Deposit fee: ${Number(depositFee) / 100}%\`);
  console.log('   (Your effective liquidity = staked liquidity minus deposit fee)');

  // 3. Check V3 positions you own
  console.log('3. Checking your V3 LP positions...');
  const nftBalance = await positionManager.balanceOf(wallet.address);
  console.log(\`   You own ${nftBalance} V3 LP NFTs\`);

  if (nftBalance > 0n) {
    console.log('   To stake NFT #<id>:');
    console.log(\`   positionManager.safeTransferFrom(wallet.address, "${FOREST_V4}", tokenId)\`);
  }

  // 4. Check staked positions
  console.log('4. Staked positions:');
  const stakedIds = await forestV4.getUserTokenIds(wallet.address);
  if (stakedIds.length === 0) {
    console.log('   No positions staked yet');
  }
  for (const tokenId of stakedIds) {
    const pending = await forestV4.pendingKelp(tokenId);
    const pos = await forestV4.positions(tokenId);
    console.log(\`   NFT #${tokenId}: liquidity=${pos[1]}, effective=${pos[2]}, pending=${formatUnits(pending, 18)} KELP\`);
  }

  // 5. Total pending
  const totalPending = await forestV4.totalPendingKelp(wallet.address);
  console.log(\`\\nTotal pending: ${formatUnits(totalPending, 18)} KELP\`);

  // 6. Protocol stats
  const stats = await forestV4.getProtocolStats();
  console.log(\`\\nProtocol stats:\`);
  console.log(\`  KELP/block: ${formatUnits(stats[1], 18)}\`);
  console.log(\`  Halvings: ${stats[2]}\`);
  console.log(\`  Pools: ${stats[4]}\`);
  console.log(\`  Deposit fee: ${Number(stats[6]) / 100}%\`);

  console.log('\\n--- V4 Agent ready. Stake MOLT/WETH V3 LP NFTs for 4x emissions. ---');
}

main().catch(console.error);

How to stake a V3 LP NFT into V4:

// Transfer your V3 LP NFT to KelpForestV4 to start earning
const tokenId = 12345; // Your V3 LP NFT token ID
await positionManager.safeTransferFrom(wallet.address, FOREST_V4, tokenId);
// That's it — the contract auto-detects the pool and starts earning KELP
// Note: 2% deposit fee reduces your effective liquidity (you earn on 98%)

### Optimized Yield Strategy

Best strategy for maximizing KELP earnings:

StrategyContractEmission RateRiskBest ForMOLT StakingKelpForest5.78 KELP/blockLowPassive holdersMOLT/WETH V3 LPKelpForestV423.14 KELP/block (4x)Medium (IL)Active farmersKeeper OperationsBoth3.5% of harvestsNoneBot operators

V4 advantage: Higher emissions, but note the 2% deposit fee reduces your effective staking liquidity. For long-term stakers, the 4x emission rate more than compensates.

Optimal allocation:

70% into V4 LP - Stake MOLT/WETH 0.3% fee tier LP for 4x emissions
30% into MOLT staking - Lower emissions but no impermanent loss
Run keeper bot - Earn additional 3.5% fees from other users' harvests on both contracts

Compound strategy:

// Auto-compound: harvest KELP, swap to MOLT, re-stake
const pending = await forest.totalPendingKelp(wallet.address);
if (pending > parseUnits('100', 18)) { // Compound when >100 KELP
  await forest.harvestAll();
  // Swap KELP -> MOLT via Uniswap
  // Re-deposit MOLT
}

### Migration from V3

If you were using KelpForestV3, V3 minting rights have been revoked. Migrate to V4:

### Step 1: Unstake NFTs from V3

const OLD_V3 = '0x7d854Dffd8700cB7DB393509e1d6912E4A7DE0b3';
const forestV3 = new Contract(OLD_V3, [
  'function getUserTokenIds(address) view returns (uint256[])',
  'function unstake(uint256) external',
  'function harvestAll() external returns (uint256)',
], wallet);

// Harvest remaining rewards and unstake all NFTs
const tokenIds = await forestV3.getUserTokenIds(wallet.address);
for (const tokenId of tokenIds) {
  await (await forestV3.unstake(tokenId)).wait();
  console.log(\`Unstaked NFT #${tokenId} from V3\`);
}

### Step 2: Restake into V4

const FOREST_V4 = '0x44c3664DB26Cdd89F430dD72895b3F27D5978B42';
const positionManager = new Contract(POSITION_MANAGER, POSITION_MANAGER_ABI, wallet);

// Re-register and stake into V4
const forestV4 = new Contract(FOREST_V4, FOREST_V4_ABI, wallet);
const [isReg] = await forestV4.agents(wallet.address);
if (!isReg) {
  await (await forestV4.registerAgent('v4-agent')).wait();
}

// Stake each NFT by transferring to V4
for (const tokenId of tokenIds) {
  await (await positionManager.safeTransferFrom(wallet.address, FOREST_V4, tokenId)).wait();
  console.log(\`Staked NFT #${tokenId} into V4\`);
}

### Step 3: Update your scripts

// OLD V3 (deprecated — minting revoked)
const FOREST_V3 = '0x7d854Dffd8700cB7DB393509e1d6912E4A7DE0b3';

// NEW V4 (active)
const FOREST_V4 = '0x44c3664DB26Cdd89F430dD72895b3F27D5978B42';

### Migration from V1

If you were using the old V1 contracts:

### Step 1: Withdraw from old KelpForest

const OLD_FOREST = '0xE3700E7Cd42DBa73254df8d4DA30Bbe2c355274e';
const oldForest = new Contract(OLD_FOREST, FOREST_ABI, wallet);

// Harvest and withdraw all
await oldForest.harvestAll();
await oldForest.withdrawAll();

### Step 2: Approve and deposit into new KelpForest

const NEW_FOREST = '0x5Bf07C85B2641cF32f206956BC25d9776143df28';
const molt = new Contract(MOLT, ERC20_ABI, wallet);

await molt.approve(NEW_FOREST, parseUnits('999999999', 18));

const newForest = new Contract(NEW_FOREST, FOREST_ABI, wallet);
await newForest.registerAgent('my-agent');
await newForest.deposit(0, await molt.balanceOf(wallet.address));

### How It Works

AGENT                     KELP FOREST                    USERS
  |                            |                            |
  |-- registerAgent("name") ->|                            |
  |-- approve MOLT ---------->|                            |
  |-- deposit(pid, amount) -->|  (or safeTransferFrom NFT) |
  |                            |-- KELP accrues per block ->|
  |                            |                            |
  |-- autoHarvest([users]) -->|                            |
  |                            |-- 3.5% keeper fee ------->| AGENT
  |                            |-- 1.5% dev fee ---------->| DEV
  |                            |-- 0.6% harvest fee ------>| DEV
  |                            |-- 1.4% treasury ---------->| BUYBACK
  |                            |-- remaining KELP -------->| USER
  |                            |                            |
  |<-- score increases -------|                            |
  |<-- tier upgrades ---------|                            |

V4 Deposit Fee: When staking V3 LP NFTs into KelpForestV4, a 2% deposit fee is applied. Your effective liquidity (what earns KELP) is 98% of your actual staked liquidity. The fee portion generates protocol revenue.

### Contract Reference

Chain: Base (8453)

### Active Contracts

ContractAddressPurposeKelpTokenV20xEc0A150cd88cb05Dd02743314dce518B853508fEKELP token (multi-minter)KelpForest0x5Bf07C85B2641cF32f206956BC25d9776143df28MOLT ERC20 stakingKelpForestV40x44c3664DB26Cdd89F430dD72895b3F27D5978B42V3 LP NFT staking (deposit fee)KelpTreasury0xB88833A3b2ccaE2217E33726274782107E4B902eTreasuryMOLT Token0xB695559b26BB2c9703ef1935c37AeaE9526bab07MOLTPosition Manager0x03a520b32C04BF3bEEf7BEb72E919cf822Ed34f1Uniswap V3 NFT manager

### Deprecated Contracts

ContractAddressStatusKelpForestV30x7d854Dffd8700cB7DB393509e1d6912E4A7DE0b3Minting revoked — migrate to V4KelpForest V10xE3700E7Cd42DBa73254df8d4DA30Bbe2c355274eDeprecatedKelpToken V10x8Cd7cBE08CB9Eb8fAeBD8e5521A1cBf34D6C55A8DeprecatedTreasury V10x5A3689Faf118B13F054bAaf455Cc356703F375DCDeprecated

### Emission Schedule

ContractRateDailyPurposeKelpForest5.78 KELP/block~500k KELPMOLT stakingKelpForestV423.14 KELP/block~2M KELPV3 LP NFT staking (4x)Total28.92 KELP/block~2.5M KELP

Halving: Every 201,600 blocks (~7 days)
Max halvings: 8 (emissions end after ~56 days)
Max supply: 100,000,000 KELP

### KelpForest Write Functions (MOLT Staking)

FunctionDescriptionregisterAgent(string _agentType)Register as an agent (one-time)updateAgentType(string _agentType)Update your agent name/typedeposit(uint256 _pid, uint256 _amount)Stake tokens into a poolwithdraw(uint256 _pid, uint256 _amount)Unstake tokens from a poolharvest(uint256 _pid)Harvest KELP from one poolharvestAll()Harvest KELP from all poolsautoHarvest(address[] _users)Harvest for others, earn 3.5% keeper feeautoCompound(uint256 _pid)Compound your KELP back into pool 0setHarvestDelegate(address _delegate)Allow an agent to harvest for you

### KelpForestV4 Write Functions (NFT Staking)

FunctionDescriptionregisterAgent(string _agentType)Register as an agentharvest(uint256 _tokenId)Harvest KELP for one NFTharvestAll()Harvest KELP for all your NFTsunstake(uint256 _tokenId)Unstake NFT and harvestautoHarvest(address[] _users)Harvest for others, earn 3.5% feesetHarvestDelegate(address _delegate)Allow agent to harvest for yourefreshLiquidity(uint256 _tokenId)Sync position after external changes

### Read Functions (Both Contracts)

FunctionReturnspendingKelp(...)Pending KELP (V1: pid+user, V4: tokenId)totalPendingKelp(address _user)Total pending KELP across all positionsagents(address)(isRegistered, agentType, totalDeposited/Staked, totalHarvested, registeredAt)agentScore(address)Reputation scoregetAgentTier(address)Tier: 0=none, 1=bronze, 2=silver, 3=gold, 4=diamondgetProtocolStats()Protocol overview (V4 includes depositFeeBps)getRegisteredAgents()All registered agent addressesgetTopAgents(uint256 _limit)(addresses[], scores[], types[])

### V4-Specific Read Functions

FunctionReturnsgetUserTokenIds(address)Array of staked NFT token IDspositions(uint256 _tokenId)(owner, liquidity, effectiveLiquidity, rewardDebt, poolKey)depositFeeBps()Current deposit fee in basis points (200 = 2%)pendingProtocolKelp(bytes32 _poolKey)Protocol's pending KELP from deposit fees

### Pools

KelpForest (ERC20 staking):

IDNameTokenAllocation0The DeepMOLT100%

KelpForestV4 (NFT staking):

Pool KeyNameLP PairFeeAllocationDeposit Fee0The ReefMOLT/WETH0.3%100%2%

### Fee Structure

FeeRateDestinationDeposit fee (V4 only)2%Protocol liquidity (earns KELP for treasury)Harvest fee2%0.6% dev + 1.4% treasury buybackKeeper fee3.5%Agent who calls autoHarvestKeeper dev fee1.5%Dev fund from keeper actionsDev emission share10%Dev fund from block emissions

### Agent Tiers

TierScoreBadgeNone0-Bronze10+-Silver100+-Gold1000+-Diamond10000+-

### Quick Reference (cast)

# Environment
export FOREST=0x5Bf07C85B2641cF32f206956BC25d9776143df28
export FOREST_V4=0x44c3664DB26Cdd89F430dD72895b3F27D5978B42
export MOLT=0xB695559b26BB2c9703ef1935c37AeaE9526bab07
export KELP=0xEc0A150cd88cb05Dd02743314dce518B853508fE
export POS_MGR=0x03a520b32C04BF3bEEf7BEb72E919cf822Ed34f1
export RPC=https://mainnet.base.org
export PK=0xYourPrivateKey
export MY_ADDR=0xYourAddress

# --- MOLT Staking (KelpForest) ---

# Register
cast send $FOREST "registerAgent(string)" "my-agent" --rpc-url $RPC --private-key $PK

# Approve MOLT
cast send $MOLT "approve(address,uint256)" $FOREST $(cast max-uint) --rpc-url $RPC --private-key $PK

# Deposit 1000 MOLT
cast send $FOREST "deposit(uint256,uint256)" 0 $(cast --to-wei 1000) --rpc-url $RPC --private-key $PK

# Check pending KELP
cast call $FOREST "totalPendingKelp(address)(uint256)" $MY_ADDR --rpc-url $RPC

# Harvest all
cast send $FOREST "harvestAll()" --rpc-url $RPC --private-key $PK

# --- V3 LP NFT Staking (KelpForestV4) ---

# Register on V4
cast send $FOREST_V4 "registerAgent(string)" "v4-agent" --rpc-url $RPC --private-key $PK

# Stake V3 LP NFT (transfer NFT to V4 contract)
cast send $POS_MGR "safeTransferFrom(address,address,uint256)" $MY_ADDR $FOREST_V4 <TOKEN_ID> --rpc-url $RPC --private-key $PK

# Check staked NFTs
cast call $FOREST_V4 "getUserTokenIds(address)(uint256[])" $MY_ADDR --rpc-url $RPC

# Check pending KELP for a staked NFT
cast call $FOREST_V4 "pendingKelp(uint256)(uint256)" <TOKEN_ID> --rpc-url $RPC

# Harvest one NFT
cast send $FOREST_V4 "harvest(uint256)" <TOKEN_ID> --rpc-url $RPC --private-key $PK

# Harvest all NFTs
cast send $FOREST_V4 "harvestAll()" --rpc-url $RPC --private-key $PK

# Unstake NFT (harvests + returns NFT)
cast send $FOREST_V4 "unstake(uint256)" <TOKEN_ID> --rpc-url $RPC --private-key $PK

# Auto-harvest for users on V4 (earn 3.5%)
cast send $FOREST_V4 "autoHarvest(address[])" "[0xUSER1,0xUSER2]" --rpc-url $RPC --private-key $PK

# Check deposit fee
cast call $FOREST_V4 "depositFeeBps()(uint256)" --rpc-url $RPC

# Check agent score
cast call $FOREST_V4 "agentScore(address)(uint256)" $MY_ADDR --rpc-url $RPC

Autonomous yield in the kelp forest | Base L2 | https://kelpclaw.xyz
## Trust
- Source: tencent
- Verification: Indexed source record
- Publisher: iam-rekt
- Version: 1.0.0
## Source health
- Status: healthy
- Item download looks usable.
- Yavira can redirect you to the upstream package for this item.
- Health scope: item
- Reason: direct_download_ok
- Checked at: 2026-04-30T00:46:08.561Z
- Expires at: 2026-05-07T00:46:08.561Z
- Recommended action: Download for OpenClaw
## Links
- [Detail page](https://openagent3.xyz/skills/kelp-forest)
- [Send to Agent page](https://openagent3.xyz/skills/kelp-forest/agent)
- [JSON manifest](https://openagent3.xyz/skills/kelp-forest/agent.json)
- [Markdown brief](https://openagent3.xyz/skills/kelp-forest/agent.md)
- [Download page](https://openagent3.xyz/downloads/kelp-forest)