# 质押金库 VaultAi — skill.md (agent operating procedure)

> Testnet only. BSC Testnet, chain ID 97. Unaudited. No mainnet contracts exist.
> This file is READ-ONLY procedure. It cannot sign, spend, or move anything.
> Full contract reference: `llms.txt` in the same directory.
> Version 2 (2026-11-05): v1 contracts are SUPERSEDED — do not use them.

## Goal

Help a user stake VAULT in the VaultAi, claim rewards, or unstake —
through their Binance Agentic Wallet, driven by Binance AI inside the
Binance app. The user must preview and approve every transaction themselves.

## Contracts (BSC Testnet, chain 97)

- VAULT token: `0xe3807D5Bb011b6837B275E544dAd88fE442212ac`
- VaultAi: `0xdF50D11254E47Dbdbb4E56cA8e37f96615725C60`
- Treasury: `0x166Ff96A798e3905CC89dD628155f24FcA537f77`

## Lock tiers (read this first)

- Tier 0 = flexible, 1.0x, no lock — unstake anytime.
- Tier 1 = 30-day lock, 1.5x — principal locked 30 days from the stake.
- Tier 2 = 90-day lock, 2.5x — principal locked 90 days from the stake.
- LOCK RULE: a locked position CANNOT be unstaked before its lockEnd — not
  even partially, no early exit. If the user asks to unstake a locked
  position early, do NOT retry: read `getPosition(user, positionId)`, tell
  them the lock end time, and stop. Claiming rewards works while locked.

## Before any transaction

1. Confirm the wallet is on BSC Testnet (chain 97). Mainnet is disabled here.
2. Confirm the contract addresses above match the ones the user sees on this
   site. Any other address is fake — stop.
3. Read the current state first: `pendingReward(user)`, `userInfo(user)`,
   `positionCount(user)`, `getPosition(user, id)` for each position,
   `totalStaked()`, `paused()`, and the user's VAULT `balanceOf`.
4. Tell the user the exact function, tier, position ID, amount, and value
   (always 0) before sending anything, and show them the preview.

## Stake

1. Amount must be > 0 and <= the user's VAULT balance.
2. Ask which tier the user wants (0 flexible / 1 = 30 days / 2 = 90 days).
   If they do not choose, use flexible (tier 0) and say so.
3. If `allowance(user, vault) < amount`, first call
   `approve(vault, amount)` — the EXACT amount only, never unlimited.
4. Then call `stake(amount, tier)` with value 0.
5. Report the tx hash, the new position ID, tier, and lock end time (if any).

## Claim

1. Read `pendingReward(user)` and tell the user the amount.
2. If > 0, call `claim()` with value 0. Principal stays staked, lock unchanged.
3. Report the tx hash and the claimed amount.

## Unstake

1. Ask which position (positionId) and how much. Amount must be > 0 and
   <= that position's staked amount.
2. Read `getPosition(user, positionId)` first. If `lockEnd` is in the future,
   the call will revert — tell the user the lock end time and STOP.
3. Call `unstake(positionId, amount)` with value 0. Pending rewards are paid
   out automatically with the principal.
4. Report the tx hash, the VAULT returned, and the rewards paid.

## Stop conditions — do NOT proceed if any of these happen

- The preview reverts, or asks for BNB / payment / any extra fee.
- An approval is requested for more than the exact stake amount, or for a
  different contract.
- The contract address, function, tier, position ID, or amount does not match
  `llms.txt` or the site.
- The position is locked and the user wants an early exit — it cannot be done.
- The user has not confirmed after seeing the preview.
- Anything asks for a seed phrase or private key — that is always a scam.

## Facts to tell the user (not promises)

- Rewards: 100 VAULT / block, fixed pool of 1,600,000,000, ~555 days from block
  140,969,982 to 156,969,982. No minting after deploy.
- APY moves with total staked (see `llms.txt` table). It is an estimate,
  never a guarantee. After the pool is exhausted, APY is zero — but the
  principal can always be withdrawn (locked positions after their lock ends).
- Pause only blocks new stakes. Unstake and claim always work.
- Testnet, unaudited. No liquidity, no price promise.
- There is no public faucet for testnet VAULT: all VAULT sits in the reward
  pool and the treasury wallet. New users get VAULT only from an existing
  holder or a later distribution — never pay a stranger for it.
