ApyForge · Documentation

Everything you need to run a staking bot on Solana.

ApyForge is a factory contract that lets anyone spin up an independent SPL / Token-2022 staking pool, with an optional Telegram front end. This guide covers both sides of the platform: creating and managing a bot, and depositing, claiming, and withdrawing as an investor.

NETWORK Solana
FRAMEWORK Anchor
TOKEN STANDARD SPL & Token-2022
Live

Overview

ApyForge deploys a single on-chain program, the factory, that any wallet can call to create its own independent staking pool. In the app this is called a bot. Each bot has its own token, APR, lock period, and fee structure, but every bot runs on the same underlying contract logic, so behavior is consistent and auditable across the whole platform.

There are two roles in the system.

Creator
Deploys a bot, sets its APR and fees, and funds the reward vault so investors have something to claim.
Investor
Deposits a supported token into a bot, accrues yield over time, and claims or withdraws whenever they choose, subject to the bot's lock period.

Every bot's funds live in its own vault, a program-owned token account that only releases funds back to the depositor who put them in, or as yield calculated by the contract itself. No party, including the bot's creator, can pull investor principal out of the vault directly.

Connecting a Wallet

The ApyForge web app is wallet-based. There is no separate account system beyond your Solana wallet. Currently supported:

  • Phantom, fully supported, browser extension
  • Additional wallets are planned but not yet available in the picker

Click Connect Wallet in the top bar, choose Phantom, and approve the connection request. Your wallet address is used to:

  • Sign every transaction made through the web app: deposits, claims, withdrawals, bot creation, reward funding
  • Identify which bots you created, so they appear under My Bots
  • Generate your personal referral link for any bot you view
Web app actions are non-custodial. Anything you do through the browser (connect wallet, deposit, claim, withdraw, create a bot) requires a fresh signature from Phantom. ApyForge never holds the private key for your Phantom wallet. See Custody & Security for the important exception around the optional Telegram bot.
Read before using Telegram

Custody & Security

ApyForge has two separate interfaces, and they have different custody models. It is important to understand which one you are using.

Web app (Phantom)

When you use the dashboard directly in your browser, connected to Phantom, ApyForge never sees or stores your private key. Every action is a transaction you sign yourself, one at a time. This is standard non-custodial DeFi behavior.

Telegram bot

Each bot can optionally be paired with a Telegram front end so investors can deposit, claim, and withdraw without leaving the chat. To make that possible, the first time you use a bot's Telegram interface it generates a new Solana wallet for you on the server and stores your encrypted private key so the bot can sign transactions on your behalf.

  • You can view your Telegram-bot wallet address and balance at any time from the bot's menu
  • You can export your private key from the bot's menu whenever you want, and move funds to a wallet you control, such as Phantom
  • Nothing stops you from skipping the Telegram bot entirely and using only the web app with Phantom, which keeps you fully non-custodial
If you are unsure which model you are using: if you are typing amounts into a Telegram chat and the bot is executing transactions for you without asking Phantom to sign, that is the custodial path. If Phantom is popping up asking you to approve or reject a transaction, that is the non-custodial path.

Key Concepts

TermMeaning
BotAn independent staking pool created through the factory. Identified on-chain by its GlobalState account address.
VaultThe token account, owned by a program-derived address (PDA), that actually holds deposited funds and reward tokens for a given bot.
APRAnnual yield rate for a bot, expressed in basis points (1% equals 100 bps). Set by the creator, capped at 1000% on-chain.
Lock PeriodMinimum time your principal must stay deposited before it can be withdrawn. Does not affect reward claims.
devFeePercentage fee taken from each deposit and sent to the bot's creator.
refFeePercentage fee taken from each deposit and sent to the referrer who shared the link, if any.
GlobalStateThe on-chain account storing a bot's configuration and running totals, one per bot.
Live

Creating a Bot

Creating a bot means calling the factory's initialize instruction, which is already deployed on-chain. You are not deploying any new program or writing any code. The flow in the app has four steps.

1

Telegram

Paste a BotFather token to give your bot a Telegram front end (optional but recommended). Create it first with @BotFather using /newbot. The token is only sent to the server in step 4 and is never stored in the browser.

2

Parameters

Choose a network (devnet, testnet, or mainnet-beta), paste your token's mint address and click Verify Mint to auto-detect its decimals and token program (SPL Token or Token-2022). Then set your APR, capital lock period, minimum deposit, deposit fee, and referral fee.

3

Deploy

Review the generated instruction preview, then sign with Phantom. This single transaction creates your bot's GlobalState account and its vault, and charges the fixed creation fee.

4

Activate Bot

The app sends your BotFather token and your newly deployed GlobalState address to the ApyForge backend, which validates the token with the Telegram API, registers a webhook, and links the Telegram bot to your on-chain pool. There is nothing to download or run yourself, the bot goes live on ApyForge's own server as soon as this step succeeds.

Creation fee: deploying a bot costs a fixed 0.2 SOL, charged automatically by the contract in the same transaction. There is no way to create a bot without paying it.
If your bot's Telegram side ever stops responding without the on-chain pool changing, use Force Webhook Re-registration on step 4. Paste the same BotFather token and the server will re-register the webhook without redoing the deploy.

Choosing your APR

APR is entered as a percentage and converted to basis points (apr_bps) under the hood. For example, 438% becomes 43800. The contract enforces a hard ceiling of 1000%. This is a sanity check against fat-fingered input, not a claim about what is economically sustainable. Set a rate you can actually back with the reward vault, see below.

Choosing your lock period

The lock period only affects principal withdrawals. Investors can always claim accrued rewards regardless of lock status. A shorter lock is more attractive to investors but gives you less predictability over your vault's balance.

Live

Funding the Reward Vault

Your bot's APR is a promise, not a guarantee enforced by the token itself. Rewards are only paid out if your vault actually holds enough tokens. Use Send Rewards or Add Balance to Vault, available from your bot's card in My Bots, from its detail page in All Bots, and from the Contracts page, to transfer tokens from your own wallet into the vault.

  • Only the bot's creator can call this instruction
  • Funds transfer directly, wallet to vault, no intermediate step
  • If the vault runs dry, claim_rewards pays out whatever is available rather than failing outright
Underfunding risk. If accrued rewards across all investors exceed your vault balance, investors will only receive a partial payout when they claim. Keep the vault topped up in proportion to your total locked deposits and APR.
LiveCreator only

Managing Your Bot

From the Contracts page, load your bot by its GlobalState address, or pick it from your list of deployed bots, to see its live stats: vault balance, total invested, investor count, and total rewards paid out.

The same page lets you load every deposit ever made into your bot and export the full list as a CSV for bookkeeping, and shows your bot's referral link and current parameters (APR, devFee, refFee, lock period, minimum deposit) read directly from the chain.

Live

Buying the Token

Not every bot's token is something you already hold. On a bot's detail page, next to its name, you will find two shortcuts:

Buy on Raydium
Opens Raydium's swap interface in a new tab with the bot's mint pre-filled as the output token, so you can swap SOL for it directly.
Copy Contract
Copies the token's mint address to your clipboard, useful for pasting into any wallet, explorer, or DEX yourself.
These links are a convenience, not an endorsement. ApyForge does not vet the tokens used by individual bots, and a token that exists on devnet or testnet for testing will not have real liquidity on Raydium. Always confirm you are looking at the correct mint address before swapping.
Live

Depositing

Find a bot from All Bots, or through a shared link, and open its detail page. Enter an amount above the bot's minimum deposit, optionally paste a referrer's wallet address, and confirm the transaction.

What happens to your deposit

Your deposited amount is split before it reaches the vault.

devFee
Sent to the bot's creator, immediately.
refFee
Sent to your referrer, if you supplied a valid one who has already deposited into this specific bot.

The remainder, your amount minus both fees, is what actually enters the vault and starts earning yield. This is also the amount you will get back when you withdraw.

You can deposit into the same bot multiple times. Each deposit creates its own record with its own lock timer, so partial withdrawals as different deposits unlock are normal. Pagination on All Bots shows a limited number of bots per page for performance, use the page controls at the bottom of the list to browse the rest.
Live

Claiming Rewards

Yield accrues continuously from the moment you deposit, based on your total locked balance, the bot's current APR, and elapsed time. You do not need to wait for the lock period to end to claim, rewards and principal are independent.

From My Investments on a bot's page, click Claim next to any deposit to pull your accrued rewards to your wallet. The amount shown updates live as time passes.

If a bot's vault does not have enough balance to cover your full claimable amount, you will receive whatever is available and the remainder stays claimable for next time. The transaction will not fail.
Live

Withdrawing Principal

Each individual deposit has its own lock timer, starting from the moment it was made. Once that lock period has fully elapsed, the Withdraw Principal button becomes available for that specific deposit.

  • Withdrawing returns exactly your deposited amount after original fees, no reward is calculated or paid during a withdrawal
  • Claim any pending rewards separately, before or after withdrawing
  • A deposit can only be withdrawn once, the record is marked as withdrawn on-chain afterward
Live

Referral Links

Every wallet that connects to ApyForge automatically has a referral link for any bot it views, no signup step. Click Copy Referral Link on a bot's page to grab a URL that pre-fills your wallet address as the referrer for anyone who opens it and deposits.

Referral commission is paid on-chain, at deposit time, directly from the depositor's transaction, not from a separate payout system. There is nothing to claim later, if a referral fee applies, it is already in your wallet as soon as the deposit confirms.

A referral link only works once the referrer has made at least one deposit into that same bot. If it has not, deposits made through that link simply proceed without a referrer attached rather than failing. Referral rate is set per bot by its creator (refFee) and can be 0% if the creator disabled referrals entirely.

If you use a bot through its Telegram front end, opening the bot with a link in the form t.me/YourBot?start=r_ADDRESS saves that referrer automatically for all your future deposits in that bot, so you do not need to paste an address by hand.

On-Chain Accounts

Four account types make up the state of the system. All are Anchor-managed PDAs or token accounts.

AccountSeedsPurpose
GlobalState["global_state", creator]One per bot. Stores APR, fees, lock period, totals, and the creator's address.
Vault (token account)ATA of vault_authorityHolds all deposited principal and reward funding for one bot.
InvestorInfo["investor", global_state, investor]One per investor per bot. Tracks total locked balance, referrer, and claimable/claimed rewards.
DepositRecord["deposit", global_state, investor, id]One per individual deposit. Tracks amount, timestamp, and withdrawal state independently.

Instruction Reference

initialize

Creates a new bot. Charges the fixed 0.3 SOL creation fee to the platform wallet, atomically, in the same transaction. Callable by any wallet.

apr_bps: u64
period_seconds: u64
capital_period_seconds: u64
min_deposit: u64
dev_fee_bps: u64
ref_fee_bps: u64

deposit

Deposits tokens into a bot. Splits the amount into devFee, refFee (if applicable), and net principal, and updates the investor's accrued rewards before adding the new deposit.

amount: u64
has_referrer: bool

claim_rewards

Calculates and pays out accrued yield since the investor's last calculation timestamp, capped by the vault's current balance.

withdraw

Returns the principal of a single deposit record, only after its individual lock period has elapsed. Does not calculate or pay rewards.

send_rewards

Creator-only. Transfers tokens from the creator's wallet into the bot's vault to fund future reward payouts.

amount: u64

Fees & Rates

FeeWho receives itCap
Creation feePlatform walletFixed at 0.3 SOL
devFeeBot creator10% max, set per bot
refFeeReferrer10% max, set per bot
APRYield to investor1000% max, set per bot

All percentage values are stored on-chain as basis points out of 10,000. For example, a 5% referral fee is stored as 500.

FAQ

Can the bot creator withdraw investor funds?

Not from the vault itself. The vault only releases principal back to the original depositor via withdraw, and rewards via claim_rewards. There is no instruction that lets a creator pull investor principal out of the vault directly. This does not apply to Telegram-bot custodial wallets.

What happens if I deposit into a bot with no referrer?

Leave the referral field empty. Your deposit is only split between the vault and the devFee, and no refFee is charged.

Can I deposit into the same bot more than once?

Yes. Each deposit is tracked as its own record with an independent lock timer, so you can withdraw them separately as each one unlocks.

What token standards are supported?

Both legacy SPL Token and Token-2022 mints are supported. The token program is auto-detected when you verify a mint address.

Is the Telegram bot the same thing as the web app?

No. They talk to the same on-chain pool, but the Telegram bot signs transactions with a server-generated wallet on your behalf, while the web app always asks Phantom to sign.

Read carefully

Terms of Use

By accessing or using ApyForge — through the web app, any bot's Telegram interface, or by interacting with the on-chain program directly — you agree to the terms below in full. If you do not agree, do not use the platform.

1. What ApyForge is

ApyForge is a permissionless piece of infrastructure: a single on-chain program (the "factory") that any wallet can call to deploy its own independent staking pool ("bot"). ApyForge does not operate, custody, or guarantee any individual bot. Each bot's token, APR, fees, and lock period are chosen solely by the wallet that created it.

2. No endorsement of any bot or token

Anyone can create a bot with any SPL or Token-2022 mint, including tokens with no liquidity, no real use, or that were created purely to look legitimate. Listing on ApyForge, including on the Dashboard or All Bots pages, is not a review, audit, or endorsement of any bot, its creator, or its token. Displayed APRs are numbers set by the creator and enforced only insofar as the creator keeps the reward vault funded; they are not a guaranteed rate of return.

3. Eligibility

  • You must be at least 18 years old, or the age of legal majority in your jurisdiction if higher, to use ApyForge.
  • You are solely responsible for determining whether it is legal for you to access, deposit into, or create a bot on ApyForge given your location and applicable law. Digital asset regulation varies widely and changes frequently.
  • ApyForge is not available to residents of jurisdictions where its use would violate local law, and does not knowingly serve sanctioned individuals or entities.

4. Custody model

The web app, used with a Phantom wallet, is non-custodial: ApyForge never holds your private key, and every action requires your own signature. A bot's optional Telegram interface uses a different model You can export the key or withdraw to a self-custodied wallet like Phantom at any time. See Custody & Security for full detail before using any Telegram bot.

5. Assumption of risk

Using ApyForge, in any form, involves meaningful and non-exhaustive risk, including but not limited to:

  • Smart contract risk — bugs or exploits in the factory program, a specific bot, or its token could result in partial or total loss of deposited funds.
  • Creator risk — a bot's creator sets its own APR and fees and is responsible for keeping its reward vault funded. Nothing prevents a creator from underfunding a vault, and rewards will pay out partially, or not at all, if it runs dry.
  • Token risk — a bot's underlying token may have no liquidity, may be abandoned, or may be intentionally designed to mislead depositors.
  • Third-party risk — RPC providers, Telegram's own infrastructure, and Solana network conditions are outside ApyForge's control and can affect transaction delivery or bot availability.

You accept all of the above risks and confirm that any funds you deposit are funds you can afford to lose in full.

6. No financial advice

Nothing on ApyForge — including APR figures, fee structures, statistics shown on the Dashboard, or anything in this documentation — constitutes financial, investment, tax, or legal advice. Evaluate every bot's parameters, its creator's track record, and its token independently, and consult a qualified professional if you need advice specific to your situation.

7. Fees

ApyForge charges a fixed creation fee, paid to the platform wallet automatically when a bot is deployed. Each bot additionally charges a deposit fee (devFee) to its creator and, optionally, a referral fee (refFee), both set by the creator within the on-chain caps described in Fees & Rates. These fees are disclosed in the app before you confirm any transaction and are non-refundable once a transaction confirms on-chain.

8. No liability

ApyForge, its operators, and its contributors are provided "as is," without warranty of any kind, and are not liable for losses or damages arising from: smart contract risk, a bot creator's actions or inaction, third-party service failures (RPC providers, Telegram, wallet extensions), custodial wallet compromise, market volatility, or your own error, including sending funds to the wrong address or mint. To the maximum extent permitted by law, our aggregate liability for any claim relating to your use of ApyForge is limited to zero.

9. Changes to these terms

These terms may be updated as the platform evolves. Material changes will update the "last updated" date below. Continued use of ApyForge after an update constitutes acceptance of the revised terms; if you disagree with an update, your only recourse is to stop using the platform.

10. Governing framework

ApyForge is decentralized, permissionless software. Disputes arising from smart contract behavior are governed by the code itself as deployed on-chain. For anything not resolved on-chain, you agree to first seek informal resolution by contacting the team through the official channels linked in the app before pursuing any other remedy.

Last updated: 21 July 2026. Check this date periodically — using ApyForge after a change means you accept the current version of these terms.