> For the complete documentation index, see [llms.txt](https://docs.gofundmeme.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.gofundmeme.io/developers/gfm-methods/bonding-curve/pool-staking-network.md).

# Pool Staking Network

## 🔥 Staking in the Bonding Curve Pool

For **graduated Bonding Curve Pools**, LP fees are distributed through the pool’s **staking network**.

## 🎯 Fetching Staker Profile

Check your **staking balance**, claimed rewards, and available rewards.

```typescript
const stakerAccountData =
  await bondingCurvePool.actions.staking.fetchStakerAccount({
    staker: payer.publicKey,
  });

console.log("Staker Account Data:", JSON.stringify(stakerAccountData));
```

#### 📌 Example Response:

```json
{
  "staked": 95108188.8443,
  "stakingTimestamp": "2025-02-21T09:46:03.000Z",
  "claimed": {
    "tokenA": 0.153621963,
    "tokenB": 8530868.3904
  },
  "available": {
    "tokenA": 0.004289379,
    "tokenB": 154977.2035
  }
}
```

***

## ⛓️ Staking Tokens

Stake tokens into the **Bonding Curve Pool’s Staking Network** to earn rewards.

```typescript
const stakeTokensTransaction = await bondingCurvePool.actions.staking.stake({
  staker: payer.publicKey,
  amountUI: 112325.1425, // Staking 112,325.1425 tokens
});

const stakeTokensTxid = await sendAndConfirmTransaction(
  connection,
  stakeTokensTransaction,
  [payer]
);

console.log(
  `⛓️ Successfully staked tokens in the pool's Staking Network! TXID: ${stakeTokensTxid}`
);
```

***

## 🔓 Unstaking Tokens

Unstake your **Bonding Curve Pool** tokens partially or fully.

```typescript
const unstakeTokensTransaction =
  await bondingCurvePool.actions.staking.unstake({
    staker: payer.publicKey,
    amountUI: 112325.1425 / 2, // Unstaking 50% of staked tokens
  });

const unstakeTokensTxid = await sendAndConfirmTransaction(
  connection,
  unstakeTokensTransaction,
  [payer]
);

console.log(
  `🔓 Successfully unstaked tokens from the pool's Staking Network! TXID: ${unstakeTokensTxid}`
);
```

***

## 🎁 Claiming Staking Rewards

Claim your **LP rewards** from the **staking network**.

```typescript
const claimRewardsTransaction =
  await bondingCurvePool.actions.staking.claimRewards({
    staker: payer.publicKey,
  });

const claimRewardsTxid = await sendAndConfirmTransaction(
  connection,
  claimRewardsTransaction,
  [payer]
);

console.log(
  `🎁 Successfully claimed staking rewards! TXID: ${claimRewardsTxid}`
);
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.gofundmeme.io/developers/gfm-methods/bonding-curve/pool-staking-network.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
