Skip to content

Code4rena

Biconomy - Smart Contract Wallet contest

Every publicly disclosed report for Biconomy - Smart Contract Wallet contest and what kind of bugs they were.

disclosed reports
40
most reported class
Business logic
bug classes found
5
first disclosure
2022
Find Biconomy - Smart Contract Wallet contest on bugbounty.fyi Current scope, rewards and status, if it runs a public program.

Disclosed reports

Newest first. Only what Biconomy - Smart Contract Wallet contest chose to make public.

Business logic

Theft of funds under relaying the transaction

The smart contract wallet's gas refund calculation used the total calldata length, so an attacker could append zero bytes to a relayed transaction to inflate the refund beyond the actual gas spent. This could drain ether from the wallet.

Biconomy - Smart Contract Wallet contest

High
Access control

Arbitrary transactions possible due to insufficient signature validation

The smart wallet's signature check for contract signatures (EIP-1271) did not verify that the signer was the wallet owner, so an attacker could supply a fake signer contract that always returns the magic value. This allowed arbitrary transactions, including self-destructing the proxy to steal all funds or replacing the implementation to lock out the owner.

Biconomy - Smart Contract Wallet contest

High
Smart contracts

Griefing attacks on handleOps and multiSend logic

The handleOps function reverts the entire batch if any single user operation fails, and multiSend similarly reverts if any inner transaction fails. An attacker could front-run a relayer's batch with a transaction that executes only the last user operation, causing the relayer's transaction to revert after consuming gas for all other operations.

Biconomy - Smart Contract Wallet contest

Medium
Business logic

Transaction can fail due to batchId collision

The smart wallet uses a batchId-based nonce system where batchId 0 is reserved for EntryPoint transactions, but execTransaction does not prevent callers from using batchId 0. An attacker could call execTransaction with batchId 0 to increment the nonce, causing subsequent EntryPoint transactions to fail.

Biconomy - Smart Contract Wallet contest

Medium
Smart contracts

Doesn’t Follow ERC1271 Standard

The smart contract wallet's signature validation function does not follow the ERC-1271 standard: it uses the wrong magic value and function signature. As a result, signature verifier contracts fall back and return an unexpected value, causing execTransaction to always revert.

Biconomy - Smart Contract Wallet contest

Medium
Crypto

Cross-Chain Signature Replay Attack

The paymaster's signature hash for user operations omitted the chain ID, so the same signed operation could be replayed on a different chain. An attacker could reuse a user's signed operation to have the paymaster sponsor transactions on another chain, potentially causing financial loss to the paymaster.

Biconomy - Smart Contract Wallet contest

Medium
Smart contracts

Replay attack (EIP712 signed transaction)

The smart contract wallet checks the nonce for a batch but not the batch identifier itself, so a signed transaction can be replayed by submitting it under a different batch that shares the same nonce. An attacker could replay the first transaction of any batch an unlimited number of times, and later transactions a limited number of times.

Biconomy - Smart Contract Wallet contest

High
Access control

Attacker can gain control of counterfactual wallet

The counterfactual wallet address is derived without including the entrypoint, so an attacker can deploy the wallet with their own entrypoint and then use it to execute arbitrary calls, stealing any funds sent to the pre-computed address.

Biconomy - Smart Contract Wallet contest

High
Access control

Destruction of the SmartAccount implementation

The SmartAccount implementation contract could be left uninitialised, allowing an attacker to initialise it and then destroy it via a delegatecall to a selfdestruct contract. This would freeze all wallets that point to that implementation, including their funds.

Biconomy - Smart Contract Wallet contest

High
Access control

Methods used by EntryPoint has onlyOwner modifier

The execute and executeBatch functions in SmartAccount.sol are restricted to the owner by an onlyOwner modifier, but they are also intended to be callable by the EntryPoint contract. This breaks the interaction with EntryPoint, preventing the account from executing transactions via UserOperations.

Biconomy - Smart Contract Wallet contest

Medium
Business logic

Paymaster ETH can be drained with malicious sender

The paymaster's signature can be replayed because the sender contract can be upgraded to a malicious version that ignores nonces, allowing the same signed transaction to be submitted repeatedly. An attacker could drain the paymaster's deposits by repeatedly using a previously valid signature.

Biconomy - Smart Contract Wallet contest

High
Smart contracts

Users will lose a majority or even all of the rewards when the amount of total shares is too large, due to precision loss

The reward calculation in LiquidityFarming.sol divides by total staked shares, and when that number is very large the division rounds down to zero, so users receive no rewards. An attacker could cause this by adding a huge amount of liquidity, making total shares exceed a threshold and wiping out rewards for all stakers.

Biconomy - Smart Contract Wallet contest

High
Business logic

Wrong formula when add fee incentivePool can lead to loss of funds.

The getAmountToTransfer function in LiquidityPool incorrectly divides the entire incentivePool balance by BASE_DIVISOR when adding a fee, causing the pool to shrink rapidly to zero. This locks the accumulated tokens in the contract, leading to loss of funds.

Biconomy - Smart Contract Wallet contest

High
Access control

A pauser can brick the contracts

The contract's pauser role could call pause() and then renouncePauser(), leaving the contract permanently paused with no way to unpause. This would freeze all funds and make most contract methods unavailable.

Biconomy - Smart Contract Wallet contest

Medium
DoS

DoS by gas limit

The deposit function allows an attacker to add many NFTs to another user's staked list, causing that user's withdrawal to run out of gas when iterating the list. The victim can still withdraw NFTs one by one until reaching the problematic index.

Biconomy - Smart Contract Wallet contest

Medium
Business logic

Deleting nft Info can cause users’ nft.unpaidRewards to be permanently erased

When a user withdraws a staked NFT, the contract deletes all stored information for that NFT, including any unpaid rewards that were recorded because the contract lacked sufficient balance to pay them at that moment. This permanently erases the user's claim to those rewards, so they can never be recovered.

Biconomy - Smart Contract Wallet contest

High
Business logic

Incentive Pool can be drained without rebalancing the pool

The depositErc20 function allowed a user to set the destination chain to the same as the source chain and the receiver to themselves, which let them claim the incentive pool reward without actually rebalancing the pool. An attacker with sufficient collateral could repeatedly drain the incentive pool on each chain.

Biconomy - Smart Contract Wallet contest

Medium
Access control

Owners have absolute control over protocol

The smart contract gives the owner unchecked power to control executors, withdraw any tokens, upgrade the contract, change parameters instantly, and transfer ownership in one step. An attacker who compromises the owner could drain funds or disrupt the protocol.

Biconomy - Smart Contract Wallet contest

Medium
Business logic

Incompatibility With Rebasing/Deflationary/Inflationary token

The contracts do not account for tokens whose balances change during transfers or over time, such as rebasing, deflationary, or inflationary tokens. An attacker could exploit this by using such a token to cause incorrect accounting, potentially leading to loss of funds or other issues.

Biconomy - Smart Contract Wallet contest

Medium
Business logic

Sending tokens close to the maximum will fail and user will lose tokens

The deposit function checks the amount against a maximum limit without including the reward, while the sendFundsToUser function checks the amount plus reward against the same limit. If a user deposits an amount just below the limit, the reward can push the total over the limit, causing the executor's transaction to revert and the user to lose their funds.

Biconomy - Smart Contract Wallet contest

Medium
Business logic

Frontrunning of setPerTokenWalletCap edge case

The owner must manually check the maximum LP position before reducing the per-token wallet cap, but a user can add liquidity between the check and the update, leaving that user above the new cap. This can cause denial-of-service conditions for that user and break assumptions in other functions.

Biconomy - Smart Contract Wallet contest

Medium
Business logic

Improper Upper Bound Definition on the Fee

The fee parameters equilibriumFee and maxFee had no upper or lower bounds, so the owner could set them to extreme values. This could cause critical functions to revert or cause liquidity providers to lose all funds when paying the fee.

Biconomy - Smart Contract Wallet contest

Medium
Access control

LiquidityProviders : Setting new LP token will break contract

The contract owner can change the LP token contract at any time, which would make existing LP NFTs incompatible and prevent users from withdrawing their liquidity. This could lock user funds until the owner restores the original token.

Biconomy - Smart Contract Wallet contest

Medium
Business logic

Improper tokenGasPrice design can overcharge user for the gas cost by a huge margin

The gas fee calculation for token transfers uses an integer tokenGasPrice, which for tokens with few decimals (like WBTC or USDC) can result in a gas fee that is orders of magnitude higher than the actual gas cost. An attacker could exploit this to overcharge users by a huge margin.

Biconomy - Smart Contract Wallet contest

Medium