# Check a token’s spending allowance

[Read this guide on KeySigner](https://keysigner.io/integrations/guides/inspect-a-test-token-allowance/)

Find the contract that could spend a test token, check the limit, and verify the allowance after you remove it.

## Before you start

- Use test tokens and a disposable wallet on a network where the app has an official test deployment, or use a local test token to rehearse the allowance check. Record the chain, token contract, owner address, expected spender and token decimals.
- Use a read-only chain explorer or RPC call to check allowance(owner, spender) on the token contract. For Permit2, also check its allowance for the token and app spender when the flow stores a Permit2 allowance.

## Data and access

- **Shared or checked**. The token contract records the owner address, spender and spending limit. You can check the exact allowance after the change.
- **Check separately**. Other spenders, other tokens, and active site account grants have separate approval state.

## 1. Uniswap

If the test flow uses Permit2, distinguish the ERC-20 approval to the Permit2 contract from the separate signature authorizing a specific spend. Read the token, app spender, amount and any validity window presented by the wallet before approving.

**Check.** Record the token’s Permit2 allowance and the app-specific authorization separately. Match the displayed spender and limit to the test action.

## 2. Aave

For a direct Aave V3 supply of an ERC-20 token, compare the spender in the wallet with the official Pool address for that chain and market. Read the underlying token’s allowance for that Pool and compare the limit with your test supply amount.

**Check.** The wallet’s spender matches the expected Pool for that market. The read is for the test owner’s allowance to that exact Pool.

## 3. Compound

For a direct Compound III supply, check the ERC-20 allowance for the selected Comet market. Treat Comet’s account manager permission as a separate grant with its own scope and review any prompts that set it independently.

**Check.** The reported allowance is for the correct Comet market. Any manager grant has its own record.

## 4. Curve

For a direct ERC-20 swap through Curve Router NG, verify the router address against Curve’s deployment list. Check the input token’s allowance for that router. Review the swap’s input amount and minimum output as separate fields.

**Check.** The wallet spender matches the listed Router NG address. The swap review separately shows the expected input and minimum output.

## 5. Balancer

For a Balancer V3 router operation that uses Permit2, review the token approval to Permit2 and the Permit2 authorization for the exact router. Check the allowance amount and expiry shown for each grant where present.

**Check.** You have distinct entries for the ERC-20 grant to Permit2 and the router authorization, with the scope of each visible.

## 6. Read before and after

Read the allowance, set a small test limit, then remove it in the test environment. After each confirmation, read the same owner, token and spender again. With Permit2, separately inspect the app authorization and any remaining ERC-20 grant to Permit2.

**Check.** After removal, the selected authorization reads zero for the same owner and spender. Record any separate grant you left in place.

## Check your result

The intended spender receives only the test allowance you approved. After removal, the scoped allowance you revoked reads zero and a different spender’s allowance is unchanged.

[How to verify your setup](https://keysigner.io/integrations/verify-a-setup/)

## If you get stuck

### The allowance stays unchanged

Check the chain, owner, token and spender addresses against the confirmed test transaction. Convert the integer amount using the token’s decimals. With Permit2, confirm whether the step changed the on-chain token allowance, changed a stored Permit2 allowance, or only requested a signature.

## Tools in this guide

- [Uniswap](https://keysigner.io/integrations/uniswap/)
- [Aave](https://keysigner.io/integrations/aave/)
  - [Check how borrowing affects health and liquidation risk](https://aave.com/help/borrowing/liquidations)
- [Compound](https://keysigner.io/integrations/compound/)
  - [Review collateral and borrowing in Compound III](https://docs.compound.finance/collateral-and-borrowing/)
- [Curve](https://keysigner.io/integrations/curve/)
  - [Review swap assets and minimum output](https://docs.curve.finance/user/dex/guides/swap)
- [Balancer](https://keysigner.io/integrations/balancer/)
  - [Read Balancer’s wind-down notice and timeline](https://forum.balancer.fi/t/bip-928-orderly-winddown-of-balancer-and-distribution-of-the-treasury/7107)

## Setup instructions

- [Understand Uniswap Permit2 approvals](https://developers.uniswap.org/docs/protocols/permit2/overview)
- [Check the Aave V3 Pool supply requirements](https://aave.com/docs/aave-v3/smart-contracts/pool)
- [Read the Compound III supply prerequisites](https://github.com/compound-finance/compound-finance.github.io/blob/master/docs/pages/v3/collateral-and-borrowing.md)
- [Read the Curve Router NG deployment list](https://github.com/curvefi/curve-router-ng/blob/master/README.md)
- [See the two approvals in Balancer’s V3 router example](https://github.com/balancer/pool-operation-examples-v3/blob/main/scripts/foundry/add-liquidity/AddLiquidityUnbalanced.s.sol)
- [Inspect a wallet request before approval](https://keysigner.io/integrations/guides/inspect-a-wallet-request-before-approval/)

[More guides for this task](https://keysigner.io/integrations/tasks/check-key-approval/)
