BullBit

BullBit Smart Contract Audit Report

Share
Share
BaseBase
DeFiInfrastructure / Dev ToolingERC4337+1
BaseBase
DeFiInfrastructure / Dev Tooling+2

QuillAudits audited the BullBit smart contracts on Base between Apr 2, 2026 and May 5, 2026. The audit found 12 issues: 7 low, 5 informational, of which 11 resolved and 1 acknowledged.

kyc
KYC VerificationQuillAudits Verified
icon
kyc
Verified ContractsContract Verification Status
icon
kyc
Vigilant SquadQuillAudits Multilayered Audit
icon

Project Description

Bullbit is an account abstraction-based wallet system built on ERC-4337. The protocol consists of upgradeable smart wallets, a deterministic deployment factory, and a paymaster for gas sponsorship.
Users authenticate using WebAuthn-based passkeys, with additional support for backup EOA keys and guardian-based social recovery mechanisms. The WalletFactory deploys wallet proxies using CREATE2, enabling deterministic wallet addresses and centralized configuration such as auto-sweep settings and default parameters.
The SmartWallet contract manages account ownership, transaction execution, session keys, delegated permissions, and recovery flows. The Paymaster contract enables selective gas sponsorship for user operations, enforcing policy checks and whitelisting to control costs and usage.

Timeline

S1
Apr 2, 2026
IA
May 1, 2026
S2
May 5, 2026

Scope of Audit

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

Methodology: the QuillAudits smart contract audit process.

icon
speedometer
0
50%
60%
70%
90%
100%
97.0%
QUILLAUDITS SCORE
Remediation Score93
Operational Resilience73
Governance & Centralization70
Tests, Coverage & Doc78

Critical

High

Medium

Low

Informational

open00000
acknowledged00010
partially resolved00000
resolved00065

Low Severity Issues

Paymaster Sponsors Arbitrary Calls for Counterfactual Wallets Without Target Whitelist

Resolved
arrow-right
Description

When userOp.initCode.length > 0, the Paymaster enters the counterfactual wallet path and calls _isEssentialOperation(opSelector). This function returns true for execute(address,uint256,bytes) and executeBatch(address[],uint256[],bytes[]), causing an immediate approval return. This early return bypasses the target whitelist enforcement that is applied to all already-deployed wallets. Compounding this, the Paymaster performs no validation on the factory address embedded in initCode[0:20]. An attacker can supply an entirely attacker-controlled factory that deploys a malicious wallet whose validateUserOp unconditionally returns 0 (valid) regardless of the signature provided. Because the wallet passes account validation and the Paymaster's counterfactual path approves execute without checking targets, the EntryPoint executes the operation and charges the full gas cost to the Paymaster's EntryPoint deposit.

Contract

Paymaster.sol

Recommendation

If execute/executeBatch must be sponsored during deployment, route them through the same target whitelist enforcement as deployed wallets. Add factory address validation in initCode.

Redundant State and Unused Inheritance Increase Gas Costs

Resolved
arrow-right
Description

The contract includes EIP712Upgradeable inheritance and calls __EIP712_init("SmartWallet", "1") during initialization even though the current implementation does not appear to use any EIP-712 typed-data workflow. This adds unnecessary bytecode, initialization logic, and inherited storage complexity without improving functionality. Keeping unused inheritance in a wallet contract also makes the codebase harder to maintain because it suggests a signing model that is not actually enforced anywhere in the active flow.
The contract defines a dedicated withdrawNonce, but that variable is never read, incremented, or used to protect any withdrawal-specific operation. As a result, the project pays for an extra storage slot and additional conceptual complexity without receiving any replay-protection or execution benefit from it. Unused state variables are especially undesirable in upgradeable systems because storage layout should stay as lean and intentional as possible.The cancelRecovery function clears the entire pendingRecovery struct even though disabling the recovery flow only requires invalidating its active flag. Wiping every field in the struct causes additional storage writes and therefore increases gas consumption on a path that could be implemented more cheaply. While this is not a security bug, it is still an avoidable inefficiency that slightly worsens user cost and contract execution overhead.

Contract

SmartWallet.Sol

Recommendation

Remove the unused EIP712Upgradeable inheritance unless typed-data signing is actually needed, eliminate the unused withdrawNonce storage variable, and update recovery cancellation logic to perform only the minimum storage changes required to disable the pending recovery.

Excessively High Per-Transaction Gas Cost Cap

Resolved
arrow-right
Description

 The paymaster accepts any sponsored operation whose maxCost is up to MAX_GAS_COST = 1 ether (src/Paymaster.sol (line 29)). This cap is extremely high for a single UserOperation and does not appear aligned with the contract’s anti-spam objective. As a result, a single whitelisted operation can consume a disproportionately large portion of the paymaster’s ETH balance.

Contract

Paymaster.sol

Recommendation

Lower MAX_GAS_COST to a realistic ceiling derived from expected operation types and supported networks

Missing Chain ID in Backup Recovery Signed Message

Resolved
arrow-right
Description

The backup recovery message hash does not include block.chainid. It is currently built from "BULLBIT_BACKUP_RECOVERY", address(this), the new passkey values, and walletNonce only (src/SmartWallet.sol (line 1028)). If the same wallet address exists on another chain and the nonce is aligned, a backup signature collected for one chain can be replayed on that other chain.

Contract

SmartWallet.Sol

Recommendation

Include block.chainid in the signed recovery payload

Cross-Contract Storage Reads in validateUserOp Violate ERC-4337 v0.7 Simulation Rules (ERC-7562)

Acknowledged
arrow-right
Description

The production deployment target is the canonical ERC-4337 EntryPoint v0.7 (SimpleEntryPoint exists only as a local test fixture and is out of scope). On the canonical EntryPoint, every compliant bundler (alto, voltaire, skandha, stackup) enforces the ERC-7562 validation-scope rules during off-chain simulation before accepting a UserOp into the mempool.
validateUserOp→_validateSignature→ _validateEOASignatureWithPermission  reads four slots from an external, non-staked contract (WalletFactory) inside the account validation phase:
factory.getDefaultAutoSweepKey()
factory.getDefaultPoolContract()
factory.getDepositSelector()
factory.isTokenApproved(target)
None of these qualify as "associated storage" of the account under ERC-7562 Storage Rules: the first three are single global slots, and isTokenApproved is a mapping(address => bool) keyed by the target token, not by the wallet address.
Under ERC-7562, the only storage accesses permitted during account validation for an unstaked account are:
STO-010 — account's own storage (not satisfied — reads are external)
STO-021 / STO-022 — associated storage of the account in a non-entity contract (not satisfied — reads aren't keyed by address(this))
STO-033 — any storage in a non-entity contract, but only when a staked entity is in play (not satisfied — WalletFactory is never staked: addStake is not called anywhere, and the factory is not an entity of the UserOp in post-deployment flows)No permissive rule applies, so the reads are forbidden by default and will be rejected by any compliant bundler's simulation tracer.

Recommendation

Stake WalletFactory with the EntryPoint, OR cache the relevant Factory config inside the wallet at registration time and re-fetch only outside the validation phase, OR move Auto-Sweep validation into the execution phase entirely.

Recovery Flows Leave EOA Backup and Guardian Set Active

Resolved
arrow-right
Description

Both recovery functions invoke _revokeAllPasskeys() (clears passkeys) but neither clears the OTHER recovery mechanism's keys. 
After executeSocialRecovery: eoaOwners[oldEOA] remains true → _isOwner still returns true for old EOA → old EOA retains full execute/executeBatch access.
After recoverWithBackup: guardians, guardianList, guardianThreshold remain unchanged guardian quorum can immediately undo via executeSocialRecovery. 
This creates a permanent counter-recovery race: legitimate user does social recovery, attacker (still holding compromised EOA backup) immediately calls recoverWithBackup to undo, and so on. 
Attacker wins via mempool monitoring + front-running.

Recommendation

Each recovery function MUST clear ALL alternative authorization paths atomically: executeSocialRecovery should clear eoaOwners/eoaOwnerList (or require explicit re-add), and recoverWithBackup should clear guardians/guardianList/guardianThreshold. Optionally: provide a separate recoveryWithReset(...) that clears everything explicitly.

Missing __gap Arrays on UUPS Contracts

Resolved
arrow-right
Description

All three UUPS-upgradeable contracts have NO __gap arrays. While OZ v5 isolates parent state into ERC-7201 namespaces (so v5→v5 parent collision is unlikely), absence of gaps creates forward-compatibility hazards: future intermediate base contracts shifting child slots, field reordering during V2 refactor with no safety net.

Recommendation

Add uint256[50] private __gap; to each contract;

Informational Issues

Appendix

Disclaimer

BullBit

BullBit

Low Severity Issues
Informational 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