Works with the AI Agents you already use
Spl Token 2022 Security
by BanditXBT
Token and Token-2022 extension risks, mint/freeze authority checks, and a listing/collateral risk screen.
Free
About this skill
If your program accepts arbitrary mints, you are accepting arbitrary behavior. Allowlist, or code for the worst case.
Two token programs exist (legacy SPL Token and Token-2022). A token account/mint is owned by one of them. Never hardcode only the legacy program; accept the correct one by validating the mint's owner. In Anchor use token_interface (InterfaceAccount<Mint>, InterfaceAccount<TokenAccount>, Interface<TokenInterface>) and CPI through the passed and validated token program (use transfer_checked, which verifies mint and decimals).
| Extension | Risk |
|---|---|
| Transfer fee | Received amount < sent amount; accounting by amount overcredits. Compute net via the mint's fee config or measure balance delta. |
| Transfer hook | Arbitrary program runs on every transfer: extra required accounts, reentrancy-like behavior, compute use, and ability to block transfers (DoS/freeze-like). |
| Permanent delegate | A delegate can transfer/burn from any holder's account, including your vault. Reject for custody/collateral. |
| Non-transferable | Cannot move: deposits can't be withdrawn. |
| Default account state / freeze | New accounts may start frozen; issuer can freeze your vault. |
| Mint close authority | Mint can be closed (if supply 0) and re-created. |
| Interest-bearing / scaled UI amount | Displayed amount ≠ raw amount; use raw amounts for accounting, UI conversion only in clients. |
| Confidential transfer | Balances not visible on-chain; incompatible with most accounting. |
| CPI guard, memo-required | Transfers via CPI may be refused; memo required. |
| Pausable / metadata / group pointers | Pausable halts transfers; metadata is untrusted text. |
The extension set keeps growing (newer additions include scaled UI amounts and pausable mints): read the current Token-2022 docs for the live list instead of trusting this table as complete. Policy: maintain an extension allowlist; on init, read the mint's extension list and reject unsupported ones. Re-check where extensions can be changed post-hoc (authorities can add some extensions later: guard with authority checks).
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before buying a skill.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
2 uses
Times used to date
Free to use
No account required to browse
Trust & safety
Security scan
Security scan passed 13 days ago
- Free with an Agensi account
Requires
Nothing to install.
Permissions
No special permissions declared or detected
What's inside
Frequently Asked Questions
New in Security
Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for Security.