WALLET DOCTOR

How to check and revoke Solana token approvals (delegates)

On Solana an "approval" is a token delegate. Here is how to find the ones left in your wallet, remove them, and what a revoke does not protect you from.

Short answer: list your token accounts with spl-token accounts -v, open each one with spl-token display <TOKEN_ACCOUNT> and look for a delegate. Remove it with spl-token revoke <TOKEN_ACCOUNT>. Use the token account address, not the mint.

What a delegate can do

Each SPL token account (one per token you hold) can name a single delegate with an allowance. Until it is revoked or the allowance is used up, the delegate can transfer or burn up to that amount from the account without asking you again. Some DEXs, staking and NFT programs set a delegate on purpose. A malicious site can ask you to sign an Approve too, and that is how part of the wallet drainers on Solana work.

1. Find token accounts that still have a delegate

solana config set --keypair <YOUR_KEYPAIR>     # or pass --owner <WALLET>
spl-token accounts -v                           # lists each token account address
spl-token display <TOKEN_ACCOUNT_ADDRESS>       # shows Delegation: delegate and allowance, if any

An explorer shows the same: open the token account (not the mint) and look for a delegate field. Accounts under the Token-2022 program can carry delegates the same way.

2. Revoke it

spl-token revoke <TOKEN_ACCOUNT_ADDRESS>

The account owner signs it, and it costs a normal transaction fee. Wallets that have a revoke or token-approvals screen send the same Revoke instruction. Closing an empty token account (spl-token close) also removes its delegate and returns the rent.

3. What a revoke does not fix

Check a wallet from code or an AI agent

Wallet Doctor answers both questions over HTTP. Each call is paid in USDC on Solana or Base with x402, with no signup or API key, and failed calls are not charged:

curl -i "https://wallet-doctor-x402.m-zikriz.workers.dev/v1/approvals?wallet=<WALLET>"          # token accounts with an active delegate — $0.005
curl -i "https://wallet-doctor-x402.m-zikriz.workers.dev/v1/drain_forensics?wallet=<WALLET>"    # last 25 tx, failed ones flagged, plus delegates — $0.0025
# first answer is HTTP 402 with payment requirements; an x402 client pays and retries
Let your agent run this check. Wallet Doctor is also a remote MCP server (https://manhourplan.com/wallet-doctor/mcp, listed in the MCP Registry as com.manhourplan/wallet-doctor); tools/list is free and shows each price.
Endpoints and how to payTry one call from your wallet

Data comes from public Solana RPC and may be incomplete or delayed. Information only, not security or financial advice.

FAQ

What is a token approval on Solana?

An SPL token account can name one delegate and an allowance. The delegate can transfer or burn up to that many tokens from the account without the owner signing again. It is set with the Approve instruction and removed with Revoke.

How do I revoke a token delegate on Solana?

Run spl-token revoke with the token account address (not the mint), signed by the account owner. Wallet apps with a revoke or approvals screen send the same Revoke instruction. It costs a normal transaction fee.

Does revoking stop a wallet drainer?

Only the delegate route. A drainer that got you to sign a transfer already moved the tokens, and a leaked seed phrase or private key gives full control. In that case move remaining funds to a new wallet.

Can an AI agent check approvals for me?

Wallet Doctor's /v1/approvals endpoint lists token accounts with an active delegate (SPL Token and Token-2022) for $0.005 per call in USDC over x402, with no signup. /v1/drain_forensics adds the last 25 transactions with failed ones flagged for $0.0025.