Skip to content

Add token2022-integration-guard skill#153

Open
mohit-1710 wants to merge 1 commit into
solanabr:mainfrom
mohit-1710:feat/token2022-integration-guard
Open

Add token2022-integration-guard skill#153
mohit-1710 wants to merge 1 commit into
solanabr:mainfrom
mohit-1710:feat/token2022-integration-guard

Conversation

@mohit-1710

Copy link
Copy Markdown

Adds token2022-integration-guard as a submodule. It is the consumer side of Token-2022.

The kit and the existing entries cover issuing and inspecting extension tokens. This is what a program actually has to do when it must accept an arbitrary, possibly hostile mint (AMM, vault, lending, escrow) without getting drained or bricked. Inspectors tell you a mint is hostile. This guard refuses it on-chain.

What's in it:

  • a compiling Anchor 1.0 guard vault: an on-chain extension allowlist that rejects hostile mints (permanent delegate, transfer hook, frozen-default, confidential), a delta-measured fee-safe deposit, and a reentrancy-aware withdraw
  • a t22-scan CLI that returns a per-profile verdict with a real CI exit code, verified against live mainnet (PYUSD rejects on an active permanent delegate, USDC allows)
  • 6 LiteSVM attack tests that load the real spl_token_2022 program and prove each guard blocks its attack

Reproduce:

cd token2022-integration-guard/examples/guard && anchor build --ignore-keys && bun run test   # 6 passing
cd token2022-integration-guard/tools/t22-scan && bun install && bun run scan 2b1kV6DkPAnxd5ixfnxCpjxmKwqjjaYmCZfHsFu24GXo --profile=vault   # REJECT, exit 2

Follows the kit shape: skill/SKILL.md router to focused files, plus agents/, commands/, rules/, install.sh. MIT. Happy to have it submoduled under ext/ instead if you prefer.

Repo: https://github.com/mohit-1710/token2022-integration-guard

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant