Token contract audit: supply, roles and the behavior integrators rely on

A token contract audit checks that supply changes only the way the design says it can: who can mint, burn, pause or upgrade, that balances and allowances can't move without consent from the holder, and that the token behaves the way the protocols holding it expect. QuillShield audits the token together with its minters, vesting and bridge contracts, then checks each pull request against that audit.

Last updated . 6 minute read. By the QuillAudits Team.

What goes wrong in token contracts?

A token is often the smallest contract a team ships and the one every other contract trusts. Its bugs fall into five groups.

  • Roles that change supply. Mint, burn, pause, blacklist and upgrade functions decide who can create or destroy value. Access control is the largest loss category in the 2024 data: the OWASP Smart Contract Top 10, as Dedaub reports, attributes $953.2M of the $1.42B lost across 149 incidents to improper access control. See access control and centralization risk.
  • Arithmetic in batch and supply functions. Batch transfers, airdrops and supply caps multiply and sum user input, which is where overflow and unsafe casts live.
  • Allowances and signatures. approve, transferFrom and permit each have their own traps: the approval race condition, permit front-running, and signature replay when a signed message lacks a nonce, a domain separator or a deadline.
  • Behavior other contracts assume. Fees on transfer, rebasing balances, transfer hooks and missing return values all break integrators that expect a plain ERC-20. See fee-on-transfer token issues, ERC-20 return value issues and reentrancy, which shows how the transfer hooks of an ERC-777 token were used to re-enter a lending protocol.
  • Upgrades. An upgradeable token adds an initializer and a storage layout to protect, covered under uninitialized proxy and storage collision.

What has gone wrong before?

Protocol Beauty Ecosystem Coin (BEC)
Date NaN undefined 2018
Chain Ethereum
Loss No dollar figure in the source, but the bug minted an astronomical balance from nothing
What happened The batchOverflow bug in the BEC ERC-20 token, recorded as CVE-2018-10299, multiplied a recipient count by a value large enough to overflow, and the token minted an astronomical balance from nothing. Before Solidity 0.8 arithmetic wrapped silently, so nothing in the language stopped it.
Sources Dedaub

Solidity 0.8 makes this exact bug revert by default. Dedaub points out that the risk did not disappear: developers bring it back with unchecked blocks, low-level assembly, unsafe casts to smaller types and off-by-one accounting. A token audit still reads every batch and supply function as arithmetic, and the Solidity audit page has compiled code for the unchecked case.

Which bug classes should a token review cover?

Bug class Where it shows up in a token
Access control Mint, burn, pause, blacklist and upgrade functions without the right role check.
Centralization risk One key that can mint without limit, freeze holders or swap the implementation.
Integer overflow and underflow Batch transfers, airdrops and supply caps that multiply or sum user input.
Unsafe casting Balances or vote checkpoints stored in smaller types.
Approval race condition Changing an allowance from one non-zero value to another.
Permit front-running A permit submitted by someone else first, so the transaction the user sent reverts.
Signature replay Permits or meta-transactions without a nonce, a domain separator or a deadline.
Fee-on-transfer token issues Fees or rebasing that make the amount received differ from the amount sent.
ERC-20 return value issues Transfer functions that return nothing, or false, instead of reverting.
Reentrancy Transfer hooks, as in ERC-777, that call the sender or the receiver in the middle of a transfer.
Uninitialized proxy An upgradeable token whose initializer anyone can still call.
Storage collision A new implementation that reorders or reuses storage slots.
Rounding and precision Rebasing or share-based balances that round toward the caller.

How do a full audit and pull request checks fit a token team?

Scope the token with everything that can change its supply or move it on behalf of a holder: minters, vesting and airdrop contracts, the bridge adapter if the token lives on more than one chain, and the contracts that hold its admin roles. QuillShield reviews them as one codebase, so a role granted to a vesting contract is read together with the functions that role can call. The context you attach before the audit matters more for a token than for most code: write down the intended supply rules, who holds each role at launch and which integrations you expect, and attach the whitepaper and any previous audit reports.

Findings reach you only after a separate reviewer agent has tried to disprove them. Each one that holds up lists the exact lines, the impact and a recommended fix, with the proof of concept result on full audits.

After launch, a new minter, a fee switch or an upgrade arrives as a pull request, and QuillShield checks it against the security graph from the audit, with five checks included in each full audit of a GitHub or GitLab.com repository. Make the check required with branch protection or rulesets on GitHub, and a pull request with a High or Critical finding, or one at the threshold you set, can't merge. The guide to pull request checks on GitHub shows the setup.

QuillShield does not replace a manual audit. A token that will carry real value deserves one before launch: request a manual audit from QuillAudits, then keep QuillShield on the changes that follow. If the token crosses chains, the bridge audit page covers the other half.

What does a token contract audit cost?

A full audit is priced from the lines of Solidity in scope, not counting comments and blank lines, and starts at $49, so a small token sits at the low end of the price table. As of November 2026 the pricing page lists 100 lines at $79 and 1,000 lines at $379, and you see the exact price before anything is charged. Sign-up is free. New accounts get $50 in credit, good for up to half of an order. The credit expires after six months.

Start free and see the exact quote for your token before anything is charged.

What should you check before you launch a token?

  • Who can mint, burn, pause, blacklist and upgrade, and is each role held by the address you expect at launch?
  • Is there a cap or rate limit on minting, and is it enforced on every mint path?
  • Does every batch, airdrop or vesting function bound the numbers it multiplies or sums?
  • Does permit check the nonce, the deadline and a domain separator tied to the chain?
  • Does the token charge fees, rebase or call hooks on transfer, and is that written down for integrators?
  • Do transfer and transferFrom revert on failure rather than return false?
  • If the token is upgradeable, is the initializer on the implementation disabled, and is the storage layout checked on every upgrade?
  • If the token exists on several chains, can total supply across them ever exceed the cap?

FAQ

Do I need an audit if my token uses the OpenZeppelin ERC20?

You still need one, because the base contract is shared code while your roles, caps, fees, permit settings, vesting and upgrade path are new, and that is where token bugs live.

Which token features carry the most risk?

The features to watch are the ones that change balances outside a normal transfer: minting, burning, blacklisting, fees, rebasing and upgrades. In the 2024 OWASP figures that Dedaub cites, improper access control accounts for $953.2M of the $1.42B lost.

How much does a token contract audit cost with QuillShield?

Full audits start at $49 and follow the lines of Solidity in scope: as of November 2026, 100 lines cost $79 and 1,000 lines $379. New accounts get $50 in credit, good for up to half of an order.

Can QuillShield audit a token that is already deployed?

It audits source code, from a GitHub or GitLab.com repository, a git URL, a Foundry .zip of up to 50 MiB, a folder or a single .sol file. If you have the Solidity source of the token, run the audit on that.

Sources

QuillShield is building the security layer between AI and money, so you can keep shipping between audits.

Sign-up is free, and new accounts get $50 in credit, good for up to half of an order.

  1. 1Sign up and import a repo
  2. 2See the exact price before anything is charged
  3. 3Approve it, and the audit starts