Hedera Agent Kit plugin for Stader liquid staking on Hedera.
Stake HBAR → receive HBARX (a yield-bearing liquid staking token). HBARX earns staking rewards while remaining transferable and usable in DeFi — enabling a full agent-driven yield loop with hak-saucerswap-plugin:
Stake HBAR → receive HBARX → LP on SaucerSwap → farm rewards
npm install hak-stader-pluginimport HederaAgentKit from "@hashgraph/hedera-agent-kit";
import { staderPlugin, STADER_MAINNET } from "hak-stader-plugin";
const agent = new HederaAgentKit(
process.env.HEDERA_ACCOUNT_ID!,
process.env.HEDERA_PRIVATE_KEY!,
{ network: "mainnet" }
);
agent.registerPlugin(staderPlugin, {
...STADER_MAINNET,
network: "mainnet",
});Or using environment variables (see docs/CONFIGURATION.md):
STADER_NETWORK=mainnetagent.registerPlugin(staderPlugin);| Tool | Type | Description |
|---|---|---|
stader_stake_hbar |
Transaction | Stake HBAR and receive HBARX |
stader_approve_hbarx |
Transaction | Approve HBARX allowance before unstaking |
stader_unstake_hbar |
Transaction | Initiate unstake (1-day unbonding) |
stader_claim_withdrawal |
Transaction | Claim HBAR after unbonding period |
stader_get_pending_withdrawals |
Query | List pending withdrawal requests |
stader_get_hbarx_balance |
Query | Get HBARX token balance for an account |
stader_get_exchange_rate |
Query | Get HBARX/HBAR exchange rate and TVL |
stader_get_staking_info |
Query | Get protocol status (paused, unbonding time) |
See docs/TOOLS.md for full parameter reference.
| Field | Mainnet | Testnet |
|---|---|---|
| Staking contract | 0.0.1027588 |
0.0.48247334* |
| Undelegation contract | 0.0.1027587 |
0.0.48247333* |
| HBARX token | 0.0.834116 |
0.0.48247328* |
| Treasury account | 0.0.1412503 |
0.0.48247329* |
* Testnet deployment is no longer active on the current Hedera testnet environment.
Unstaking HBARX requires three steps:
- Approve —
stader_approve_hbarx(grant HBARX allowance to the staking contract) - Unstake —
stader_unstake_hbar(burns HBARX, begins 1-day unbonding) - Claim —
stader_claim_withdrawal(after unbonding, retrieves HBAR)
The on-chain getExchangeRate() function is deprecated and returns 1.0. This plugin computes the real rate from treasury_hbar / hbarx_supply via the Hedera Mirror Node. The true rate reflects accrued staking rewards (~1.4 HBAR/HBARX as of mid-2025).
MIT — Juanma Gomez