> For the complete documentation index, see [llms.txt](https://docs.nftx.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.nftx.io/security/audits.md).

# Audits

Who has reviewed the NFTX v4 contracts — manual audits by Sherlock and Hooks.wtf, plus regular AI-assisted review rounds built on Trail of Bits and Uniswap security skills.

NFTX v4 runs on **non-upgradeable** contracts, so a bug can't be patched in place after deployment. That makes review before deployment the main line of defense. The contracts have been through two kinds of review:

* **Manual audits** by independent security researchers at Sherlock and Hooks.wtf.
* **AI-assisted review rounds** that we run ourselves on a regular cadence, using open-source security skills published by Trail of Bits and Uniswap.

{% hint style="warning" %}
Audited does not mean risk-free. No matter how well reviewed a protocol is, there is always the possibility of uncaught vulnerabilities. Only deposit what you are comfortable putting at risk.
{% endhint %}

## Manual audits

### Sherlock

<figure><picture><source srcset="https://28497356-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FX3gO8jlVac9EJva8tztA%2Fuploads%2Fgit-blob-acc3c53bcbd5252838f6f091edce4bbecd5291f2%2Fsherlock-logo-dark.svg?alt=media" media="(prefers-color-scheme: dark)"><img src="https://28497356-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FX3gO8jlVac9EJva8tztA%2Fuploads%2Fgit-blob-99daaa37894de5c97b2fef926c485db3ca4979d2%2Fsherlock-logo.svg?alt=media" alt="Sherlock" width="280"></picture><figcaption></figcaption></figure>

[Sherlock](https://sherlock.xyz) ran a public audit contest on the codebase, where independent security researchers compete to find vulnerabilities and a lead senior auditor reviews alongside them. The contest ran under the protocol's original name, **Flayer** — the codebase that NFTX v4 is built on.

* **Format:** public audit contest, 72,500 USDC prize pool
* **Dates:** 2 – 15 September 2024
* **Lead security expert:** zzykxx, alongside 80 other researchers who found valid issues
* **Scope:** the core contracts — [Locker](https://docs.nftx.io/contracts/locker.md), [Listings](https://docs.nftx.io/contracts/listings.md), [Collection Token](https://docs.nftx.io/contracts/collection-token.md), [Tax Calculator](https://docs.nftx.io/contracts/tax-calculator.md), the Uniswap V4 hook implementation, [Collection Shutdown](https://docs.nftx.io/contracts/collection-shutdown.md) and their supporting contracts
* **Result:** the final report lists 25 high-severity and 22 medium-severity issues, all public
* **Status:** all issues found have been acknowledged or remediated

Contracts added since the contest, such as the [NFTX Flex Hook](https://docs.nftx.io/contracts/nftx-flex-hook.md), were not part of the contest scope; they are covered by the review rounds described below.

{% file src="/files/SCjocSJ9ku1IXooB0Ryz" %}
Sherlock's final security review for Flayer (PDF, 179 pages).
{% endfile %}

The full contest details, including the detailed scope, are on the [Sherlock contest page](https://audits.sherlock.xyz/contests/468).

### Hooks.wtf

<figure><picture><source srcset="https://28497356-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FX3gO8jlVac9EJva8tztA%2Fuploads%2Fgit-blob-6e3803f09b48a7f97a12ea2109d2d4ee864a9c4e%2Fhooks-wtf-logo-dark.png?alt=media" media="(prefers-color-scheme: dark)"><img src="https://28497356-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FX3gO8jlVac9EJva8tztA%2Fuploads%2Fgit-blob-5c15cf452506ac7354a9ac62af3cf714a159a86f%2Fhooks-wtf-logo.png?alt=media" alt="Hooks.wtf" width="240"></picture><figcaption></figcaption></figure>

[Hooks.wtf](https://hooks.wtf) is a Uniswap V4 specialist agency. They carried out a manual audit of the core NFTX v4 contracts, and the full report is published on their site.

* **Format:** manual audit
* **Audited commit:** `6e4a1f6`
* **Scope:** [Locker](https://docs.nftx.io/contracts/locker.md), [Listings](https://docs.nftx.io/contracts/listings.md), the [NFTX V4 Hook](https://docs.nftx.io/contracts/nftx-v4-hook.md) and [NFTX Flex Hook](https://docs.nftx.io/contracts/nftx-flex-hook.md), [Collection Shutdown](https://docs.nftx.io/contracts/collection-shutdown.md), and the [Zap](https://docs.nftx.io/contracts/zap.md) and [Migrator Zap](https://docs.nftx.io/contracts/migrator-zap.md)
* **Result:** every issue raised is of medium severity or below. The report found no path that mints a collection token without depositing an NFT, none that removes an NFT from the Locker without burning a token, and no gaps in access control.
* **Status:** all issues found have been acknowledged or remediated

None of the issues put deposited NFTs or LP principal at risk of theft. They do allow fees to be diverted away from LPs, buyers to overpay when using the zap, and core flows to be blocked at very little cost to the caller. The audit assumes the contract owner is trusted; collection creators, listers, LPs, swappers and the NFT contracts themselves are all treated as untrusted.

<a href="https://nftx-audit-001.hooks.wtf/" class="button primary">View the Hooks.wtf report</a>

## AI-assisted review rounds

A one-off audit covers the code as it stood on one day. NFTX v4 keeps shipping new contracts, so between manual audits we run regular AI-assisted security reviews against the current code. Each round is a set of independent passes over the contracts, and each pass follows a published security skill — a written methodology that tells the reviewing agent what to look for and how.

{% hint style="info" %}
These rounds are run by the NFTX team using open-source skills that Trail of Bits and Uniswap publish. They are not audits performed by Trail of Bits or by Uniswap Labs, and neither organization has reviewed or endorsed NFTX.
{% endhint %}

### Trail of Bits skills

<figure><picture><source srcset="https://28497356-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FX3gO8jlVac9EJva8tztA%2Fuploads%2Fgit-blob-c5ca1a925a0bcffdd567406195bda49bd5bc3b1f%2Ftrail-of-bits-logo-dark.svg?alt=media" media="(prefers-color-scheme: dark)"><img src="https://28497356-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FX3gO8jlVac9EJva8tztA%2Fuploads%2Fgit-blob-f86f0dc16ba06d25fd8b62c4bfccd889f6fde83f%2Ftrail-of-bits-logo.svg?alt=media" alt="Trail of Bits" width="180"></picture><figcaption></figcaption></figure>

[Trail of Bits](https://www.trailofbits.com) publishes its smart contract review methodology as open-source [skills](https://github.com/trailofbits/skills). Our rounds use:

* **Entry-point analysis and audit context building** — map every externally callable function and the trust assumptions behind it before hunting for bugs.
* **Secure workflow and development guidelines** — check the codebase against Trail of Bits' secure development practices.
* **Token integration analysis** — check how the contracts handle the ERC20 and ERC721 tokens they touch, including non-standard ones.
* **Variant analysis** — once a bug is found, search the rest of the codebase for the same pattern.

### Uniswap skills

<figure><img src="https://28497356-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FX3gO8jlVac9EJva8tztA%2Fuploads%2Fgit-blob-238cd325a93e5fdedd6a982438614d794d36077e%2Funiswap-logo.svg?alt=media" alt="Uniswap" width="220"><figcaption></figcaption></figure>

Uniswap publishes AI skills for building on the protocol in [uniswap-ai](https://github.com/Uniswap/uniswap-ai). We use its **v4 security foundations** skill, a threat model written specifically for Uniswap V4 hooks. It covers hook permissions, delta accounting, access control on hook callbacks, and the ways a hook can be manipulated through the pool it is attached to. Both the [NFTX V4 Hook](https://docs.nftx.io/contracts/nftx-v4-hook.md) and the [NFTX Flex Hook](https://docs.nftx.io/contracts/nftx-flex-hook.md) are reviewed against it.

### How a round works

1. **Scope.** A round targets a specific commit, usually ahead of a release or after a large batch of changes has merged. Anything documented in an earlier round is excluded, so each round looks for new issues.
2. **Review.** Several passes run in parallel, each following one of the skills above. When independent passes land on the same defect, we treat that as a strong signal.
3. **Triage and fix.** Every finding gets a severity and is either fixed or recorded with the reason the risk was accepted. After a large merge we also re-verify earlier fixes against the merged code, to catch regressions.

AI-assisted review is a complement to manual audits, not a replacement. It is cheap enough to repeat every time the code changes, which a manual audit is not, but it can miss issues a human auditor would catch and can report issues that turn out not to be real. We treat its output as leads to verify by hand, not as verdicts.

## Bug bounty

There is currently no active bug bounty for NFTX v4. If that changes, the program details will be published on this page.
