<!-- canonical: https://0xsimao.com/findings/trestle-address-triggering-taxes-burn -->

# address(0) can be added as a pair, triggering taxes on burn

Medium · Three Sigma · Modular blockchain infrastructure · 27th January 2024

Finding 3S-TR-M07 of the Trestle wTIA Bridge security review.

- Report: /reports/trestle-wtia-bridge
- Source: https://github.com/0xsimao/audits/blob/main/Three%20Sigma/2024-01-27-trestle.pdf

---

### Description

A pair with zero address may be [added](https://github.com/TrestleProtocol/Audit-Contracts/blob/main/src/Trestle.sol#L246) to the pairs mapping which means burns will be
taxed.

### Recommendation

Revert if the pair does not exist in recordAmmPairWith().

### Status

Addressed by disabling taxes.

Disclosed by 0xSimao (https://0xsimao.com/).

---

Related findings:

- [address(0) check could be added to `MetavaultRegistry::registerMetavault()`](https://0xsimao.com/findings/spectra-metavault-added-metavault-registry-register): Spectra MetaVault Bridge
