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.
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.
A malicious bundler could submit a bundle of user operations with insufficient gas, causing the inner call to fail even when users set correct gas limits. This results in a denial of service for the user, and the user or paymaster still pays for the failed execution, potentially draining funds.
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.
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.
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.
SmartAccount.sol is an upgradable contract that inherits from contracts with storage but no storage gaps, which could cause storage slot collisions when upgrading. An attacker or owner could upgrade to a broken implementation, potentially corrupting storage and causing loss of funds or functionality.
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.
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.
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.
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.
The tokenGasPriceFactor value used to calculate ERC20 gas refunds was not included in the signed transaction data, so a transaction submitter could change it after the owner signed and receive a larger refund, stealing the wallet's funds.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
The withdraw function calls a loop over an unbounded reward rate log, which can grow large if rewards are updated frequently and users are inactive. An attacker could cause a withdrawal transaction to revert due to out-of-gas, potentially freezing user funds.
BS
Biconomy - Smart Contract Wallet contest
Medium
Instant results are busy. Press Enter to search every report.
No direct matches. Search every report above, or try a bug class like IDOR or SSRF.