Quantum Audit Logo
Ethereum · Smart Contract Security · Updated Jul 24, 2026

Is Balancer Safe? BAL

On-chain security analysis — is it a scam or legit?

Contract 0xba10…4e3d DexScreener ↗
Medium Risk How is this score calculated? →
Volume 24h
$509.6K
Liquidity
$4.78M
Price
$0.1231
Token Age
1y
Top 10 Holders
66.2%

Security Checklist

Contract VerifiedPass
Ownership RenouncedUnknown
No Mint FunctionFail
Liquidity LockedFail
Not a ProxyPass

Audit History

Jul 2329Jul 2330

Every audit run adds a dated snapshot — history is append-only and cannot be edited.

Audit Summary

This audit covers the provided Solidity source code for the `EnumerableSet` and `Address` libraries, which are OpenZeppelin dependencies. The full source code for the main contract, `BalancerGovernanceToken`, was not provided for analysis. The audited libraries are well-established and widely used, exhibiting high code quality and adherence to best practices. No critical or high-severity vulnerabilities were identified within the scope of the provided library code.

Final Recommendation: It is recommended to conduct a comprehensive security audit of the main `BalancerGovernanceToken` contract, which utilizes these libraries, to ensure its overall security posture. Pay close attention to how `EnumerableSet`'s non-guaranteed order is handled and how `Address.isContract` is used, if at all, in the main contract's logic. Ensure that the main contract pins a specific Solidity compiler version for production deployments to avoid potential inconsistencies.

Category Ratings

TechnicalLow
8/10

The technical review of the `EnumerableSet` and `Address` libraries reveals robust and efficient implementations (7.2 Code Security). Both libraries are standard OpenZeppelin components, benefiting from extensive community review and battle-testing. Operations within `EnumerableSet` are designed for

GovernanceMedium
4/10

As the provided source code consists solely of utility libraries (`EnumerableSet`, `Address`), there are no direct governance or economic mechanisms to assess (7.4 Economic, 7.5 Governance). The libraries themselves do not introduce any economic risks or governance vulnerabilities. Any such risks wo

UpgradesHigh
3/10

The provided source code consists of utility libraries and the prefill indicates `is_proxy: false`, therefore, upgradeability mechanisms are not directly applicable to these components (7.7 Upgrades). The libraries are designed to be immutable once deployed. Any upgradeability concerns would pertain

LP Distribution

Top-1 Unlocked Holder25.6%
Top-3 Unlocked55.0%

What Raised This Score

Each factor is an on-chain fact recorded at the time of this analysis. The score is computed from them by a deterministic function, so the same contract returns the same score for anyone who runs the audit. How scores are computed

Security Findings

5 Info
I-01InformationalUnresolved

EnumerableSet Order Instability

The `EnumerableSet` library explicitly states that the order of elements returned by `at(index)` is not guaranteed and may change upon addition or removal of other elements. This is an inherent design choice for achieving O(1) complexity for add/remove operations (7.1 Architecture).

Recommendation: Developers using `EnumerableSet` must not rely on the order of elements. If a stable order is required, an alternative data structure or additional logic to maintain order should be implemented in the consuming contract.
I-02InformationalUnresolved

`Address.isContract` Limitations

The `Address.isContract` function, as noted in its NatSpec, has limitations and cannot reliably determine if an address is an Externally Owned Account (EOA) or a contract under all circumstances (e.g., during contract construction, after self-destruct, or for addresses where a contract will be created) (7.2 Code Security).

Recommendation: Avoid using `Address.isContract` for critical access control or security-sensitive logic where a definitive determination of contract vs. EOA is required. Consider alternative mechanisms like role-based access control or explicit registration for trusted contracts.
I-03InformationalUnresolved

Potential Gas Costs for Large Set Iteration

While `add` and `remove` operations in `EnumerableSet` are O(1), iterating over a very large set using the `at(index)` function in a loop within a transaction could become prohibitively expensive in terms of gas. The `_values` array grows linearly with the number of elements (7.4 Economic).

Recommendation: If the consuming contract is expected to manage a very large number of elements and requires frequent iteration, consider off-chain processing or alternative designs that do not require on-chain iteration over the entire set. Implement pagination or limits for on-chain iteration if necessary.
I-04InformationalUnresolved

Compiler Version Flexibility

The `pragma solidity ^0.6.0` directive allows compilation with any Solidity compiler version from 0.6.0 up to, but not including, 0.7.0. While this offers flexibility, minor compiler behavior changes across patch versions could theoretically lead to subtle differences in bytecode or execution (7.2 Code Security).

Recommendation: For production deployments of the main contract, it is a best practice to pin to a specific, immutable compiler version (e.g., `pragma solidity 0.6.8;`) to ensure consistent bytecode generation and behavior across deployments and audits.
I-05InformationalUnresolved

Explicit Type Casting for `bytes32` Conversion

The library uses explicit type casting, such as `bytes32(uint256(value))` for `address` to `bytes32` conversions. This is a standard and correct way to handle these conversions in Solidity, ensuring that the values fit within the `bytes32` storage slot (7.2 Code Security).

Recommendation: No direct recommendation for the library itself. However, developers integrating or extending this library should be mindful of these type conversions and ensure similar explicit casting is used when converting between types to avoid truncation or unexpected behavior in their custom logic.

Would You Like a More Detailed Audit of Balancer?

Our AI-powered scanner gives you a deeper, real-time smart contract analysis — free, no signup required.

Get Detailed Audit
Run Free Audit →