AVNBridge

AVNBridge Smart Contract Audit Report

Share
Share
EthereumEthereum
DeFiInfrastructure / Dev ToolingL1/L2 Chain Audit+3
EthereumEthereum
DeFiInfrastructure / Dev Tooling+4

QuillAudits audited the AVNBridge smart contracts on Ethereum between Oct 6, 2025 and Nov 3, 2025. The audit found 4 issues: 1 medium, 3 low, of which 3 resolved, 0 acknowledged and 1 partially resolved.

Project Description

AVNBridge contract is a cross-chain bridge between Ethereum (T1) and the Aventus Network (T2), facilitating the secure transfer of ETH, ERC20, and ERC777 tokens while managing a set of validators called “authors.” It allows the addition and removal of authors, the publication of T2 state roots to Ethereum, and the lifting or lowering of assets across chains. Security is enforced through EIP-712 signatures, quorum-based confirmations, and protections against replayed or duplicate transactions. Additionally, the contract is upgradeable via UUPS, owned through OwnableUpgradeable,and supports ERC777 tokens using the ERC1820 registry.

Timeline

S1
Oct 6, 2025
S2
Nov 3, 2025

Scope of Audit

The scope of this Audit was to analyze the AVNBridge Smart Contracts for quality, security, and correctness.

Methodology: the QuillAudits smart contract audit process.

speedometer
0
50%
60%
70%
90%
100%
99.2%
AUDIT SCORE
icon

Critical

High

Medium

Low

Informational

open00000
acknowledged00000
partially resolved00010
resolved00120

Medium Severity Issues

Inconsistent Address Check in rotateT1() Allows Overwriting Existing Author

Resolved
arrow-right
Description

The rotateT1() function lacks validation to prevent rotating to an address that is already in use by another author. This inconsistency with other functions in the codebase can lead to corrupted state where multiple author IDs map to the same address.
Vulnerability Details
Missing Validation
The rotateT1() function only checks if the new address is address(0), but does not verify if the address is already registered to another author:


function rotateT1(uint256[] calldata ids, address[] calldata newAddresses) external onlyOwner {
    // ...
    for (uint256 i; i < rotations; i++) {
      id = ids[i];
      newAddress = newAddresses[i];
      if (newAddress == address(0)) revert AddressIsZero(); // ✅ Checks for zero address
      // ❌ Missing: if (t1AddressToId[newAddress] != 0) revert T1AddressInUse(newAddress);
      
      oldAddress = idToT1Address[id];
      if (oldAddress == address(0)) revert NotAnAuthor();
      t1AddressToId[oldAddress] = 0;
      idToT1Address[id] = newAddress;
      t1AddressToId[newAddress] = id; // Overwrites existing mapping if address in use
    }
  }


Inconsistency with Other Functions

Other functions in the contract properly validate against duplicate addresses. For example, in _initialiseAuthors():

function _initialiseAuthors(...) private {
    // ...
    do {
      t1Address = t1Addresses[i];
      t1PubKey = abi.encode(t1PubKeysLHS[i], t1PubKeysRHS[i]);
      if (address(uint160(uint256(keccak256(t1PubKey)))) != t1Address) revert AddressMismatch();
      if (t1AddressToId[t1Address] != 0) revert T1AddressInUse(t1Address); // ✅ Checks for duplicate
      _activateAuthor(_addNewAuthor(t1Address, t2PubKeys[i]));
      // ...
    } while (i < numAuth);
  }

Contract

AVNBridge.sol

Recommendation

Add the same duplicate address check used in other functions:

function rotateT1(uint256[] calldata ids, address[] calldata newAddresses) external onlyOwner {
    uint256 rotations = ids.length;
    if (rotations != newAddresses.length) revert MissingKeys();
    uint256 id;
    address newAddress;

 address oldAddress;
    for (uint256 i; i < rotations; i++) {
      id = ids[i];
      newAddress = newAddresses[i];
      if (newAddress == address(0)) revert AddressIsZero();
+     if (t1AddressToId[newAddress] != 0) revert T1AddressInUse(newAddress); // ✅ Add duplicate check
      
      oldAddress = idToT1Address[id];
      if (oldAddress == address(0)) revert NotAnAuthor();
      t1AddressToId[oldAddress] = 0;
      idToT1Address[id] = newAddress;
      t1AddressToId[newAddress] = id;
    }
  }

Low Severity Issues

Appendix

Disclaimer

AVNBridge

AVNBridge

Medium Severity Issues
Low Severity Issues
Appendix
Disclaimer
View Report PDF

Get an Audit done today for your Smart Contract

Join 1500+ leaders who secured themselves from losing Billion Dollars

cta-banner
cta-banner-bgcta-banner-bg-mobile

Related audits

WE SECURE EVERYTHING YOU BUILD.

From day-zero risk mapping to exchange-ready audits, QuillAudits helps projects grow with confidence. Smart contracts, dApps, infrastructure, compliance: secured end to end.

QuillAudits Logo


ISO 27001Circle Alliance Program
Uniswap FoundationAethiropt-collectivePolygon SPNBNB Chain Kickstart

All Rights Reserved. © 2026. QuillAudits - LLC