Skip to content

Code4rena

Behodler contest

Every publicly disclosed report for Behodler contest and what kind of bugs they were.

disclosed reports
21
most reported class
Business logic
bug classes found
4
first disclosure
2022
Find Behodler contest on bugbounty.fyi Current scope, rewards and status, if it runs a public program.

Disclosed reports

Newest first. Only what Behodler contest chose to make public.

Business logic

Tolerance is not enforced during a flash governance decision

The governance tolerance check was applied after the function body ran, so during a flash governance decision the parameters were not restricted. An attacker could set a soul's fps to an extremely large value and then claim inflated Flan rewards.

Behodler contest

Medium
Business logic

You can flip governance decisions without extending vote duration

A voter can flip a governance decision at the last moment without triggering the vote-extension logic by first sending a vote that exactly cancels the current tally to zero, then sending another vote to change the outcome. This bypasses the intended protection that extends the voting period when a vote is flipped.

Behodler contest

Medium
Business logic

user won’t be able to get his rewards in case of staking with amount = 0

The stake function only calculates pending rewards when the staked amount is greater than zero, but it still updates the reward debt even for zero-amount stakes. A user with pending rewards who calls stake with zero loses those rewards because the debt is increased without crediting the reward.

Behodler contest

Medium
Business logic

UniswapHelper.buyFlanAndBurn is a subject to sandwich attacks

The buyFlanAndBurn function executes swaps without a minimum output amount, allowing a malicious bot to sandwich the trade and cause the contract to overspend input tokens. This results in a direct loss for the system.

Behodler contest

Medium
Business logic

Double transfer in the transferAndCall function of ERC677

The transferAndCall function in the ERC677 contract implementation transfers the specified token amount twice instead of once. An attacker could call this function to send tokens to a recipient and have double the amount deducted from their balance, potentially causing unintended token loss or manipulation.

Behodler contest

High
Smart contracts

Flash loan price manipulation in purchasePyroFlan()

The purchasePyroFlan() function calculates the flan-stablecoin price from Uniswap pool balances at a single point in time, which can be manipulated with a flash loan. An attacker could skew the pool price to obtain more flan and pyroflan than intended, especially when the pool has low liquidity.

Behodler contest

High
DoS

You can grief migrations by sending SCX to the UniswapHelper

The UniswapHelper contract checks that its SCX balance equals a parameter passed by the caller, but an attacker can send SCX directly to the contract to make the balance exceed the parameter, causing any migration to revert. This allows an attacker to prevent migrations until the extra SCX is used to buy and burn Flan.

Behodler contest

Medium
Business logic

All the scxMinted is at risk of being burnt.(Limbo.sol)

A zero value in a variable used to calculate adjustedRectangle would make excessSCX equal all scxMinted, and since adjustedRectangle is zero, nothing is deducted from scxMinted, putting all minted SCX at risk of being burnt. The check on line 224 would also fail for high-value migrations, preventing SCX from being sent to the AMM helper and LP from being minted.

Behodler contest

Medium
Business logic

Calling generateFLNQuote twice in every block prevents any migration

The public function generateFLNQuote can be called twice in the same block, causing the two most recent quotes to have the same block number. This makes the price stability check revert, blocking any migration that relies on it.

Behodler contest

Medium
Access control

Lack of access control in the parameterize function of proposal contracts

Proposal contracts allow anyone to call the parameterize function to change proposal parameters because it is only protected by the notCurrent modifier. An attacker can front-run a proposal transaction, alter the parameters to undesirable ones, causing the community to reject the proposal and the proposer to lose their deposit.

Behodler contest

Medium
Business logic

Burning a User’s Tokens for a Flash Proposal will not Deduct Their Balance

The burn function for flash governance proposals overwrites the user's pending decision with the default config instead of clearing it, so the user's tokens are not actually burned and their unlock time becomes a short duration. An attacker could exploit this to avoid the intended token burn and unlock their funds earlier than intended.

Behodler contest

Medium
Smart contracts

Reentrancy on Flash Governance Proposal Withdrawal

The withdrawGovernanceAsset function sends the asset to the caller before deleting the pending decision record, so a token that hands control back during the transfer lets the attacker withdraw repeatedly. An attacker could drain the contract's balance of the configured asset.

Behodler contest

Medium
DoS

Incorrect unlockTime can DOS withdrawGovernanceAsset

The unlockTime in the FlashGovernanceArbiter contract is incorrectly incremented by block.timestamp instead of being set to a fixed future time. An attacker could repeatedly call assertGovernanceApproved to push unlockTime far into the future, causing a denial of service for withdrawGovernanceAsset.

Behodler contest

Medium
Access control

Lack of access control on assertGovernanceApproved can cause funds to be locked

The assertGovernanceApproved function lacks access control, allowing anyone to call it with a victim's address and emergency flag set to true. This locks the victim's approved funds for the unlock period, preventing them from executing their governance decision.

Behodler contest

High
Business logic

wrong minting amount

The RebaseProxy contract's minting function used the proxy's total base balance instead of the amount being minted, causing an incorrect number of tokens to be minted. An attacker could potentially exploit this to mint an excessive amount of tokens.

Behodler contest

High
Smart contracts

LP pricing formula is vulnerable to flashloan manipulation

The LP token pricing formula in LimboDAO's burnAsset function can be manipulated by swapping a large amount of EYE tokens into the Uniswap pool, inflating the LP token value. An attacker can use a flashloan to temporarily inflate the pool, burn their LP tokens for more fate tokens, and then swap back, gaining extra voting power or profit.

Behodler contest

High
Business logic

Loss Of Flash Governance Tokens If They Are Not Withdrawn Before The Next Request

The contract overwrites a user's pending flash governance decision when assertGovernanceApproved is called again for the same target and sender, causing previously locked tokens to become unaccounted for and locked in the contract. An attacker can call this public function to make any arbitrary sender's tokens inaccessible.

Behodler contest

High