The contract stores token precision multipliers that are used in price calculations, but these multipliers are only updated when the owner calls rampTargetPrice or stopRampTargetPrice. As a result, a newly set target price does not take effect until another target price is set or the ramp is stopped.
The swap function does not split trades that cross the target price, instead using the new amplifier for the entire trade. This can lead to a worse average execution price and potentially allow a trader to profit by exploiting the two amplifiers.
The airdrop contract's validate function allowed a user who had already claimed their entire airdrop to reset their claimed amount to zero and claim again. An attacker could repeatedly claim tokens from the contract as long as it held a balance.
The vest() function in Vesting.sol does not check that the caller is the beneficiary, so anyone can add timelocks for any beneficiary. A malicious actor can repeatedly call vest() with tiny amounts to make the timelocks array very large, causing the claim() function's loop to exceed the gas limit and revert, making the vestment unclaimable.
The addInvestor() function does not check that the total amount allocated to investors stays within the investors_supply limit. An attacker with the admin private key could allocate more tokens than available and then claim all tokens.
The smart contracts call ERC20 transfer and transferFrom without checking the returned boolean, so for tokens that return false instead of reverting on failure, airdrop participants could lose their tokens. The report recommends using SafeERC20 to handle non-standard tokens.
The stopRampTargetPrice function changes the token precision multipliers, which alters the AMM pool price. An attacker can sandwich this change to profit from the price difference.
The claim() function in InvestorDistribution.sol contains a require statement that reverts when the remaining claimable amount is zero, preventing an investor from claiming their last tokens. An attacker cannot steal funds, but the availability of the investor's tokens is compromised because the normal claim path fails.
The LPToken contract's set_minter function does not validate that the new minter address is not zero. If called with the zero address, the minter role is permanently lost, preventing any future minter from being set.
The vest function in Vesting.sol allows any caller to overwrite the benRevocable mapping for any beneficiary, erasing previous revocation status. An attacker could set any beneficiary to revocable, bypassing the owner-only revoke mechanism.
The virtualPrice function is not monotonically increasing because the precision multiplier can be changed after pool setup, allowing the virtual price to be manipulated. This could mislead protocols that rely on virtualPrice and potentially harm liquidity providers.
The function MainToken.set_mint_multisig() does not check that the new minting multisig address is not the zero address. If called with the zero address, the system permanently loses its minting multisig without the ability to set a new one.
The public sale contract required callers to hold an NFT during the first four weeks, but an attacker could borrow an NFT via a flash loan, participate in the sale, and return the NFT in the same transaction. This allowed anyone to bypass the NFT-holder restriction and access the sale.
The sanity checks in the rampTargetPrice function are broken because the multiplication and division order causes the comparison to always fail when the future target price is smaller than the initial one. As a result, the admin cannot ramp the target price down by even 1 wei, preventing an important feature from working.
The custom swap pool calculates the ideal balance incorrectly when liquidity is provided in an imbalanced ratio, using the pool's stored balances instead of the new balances. An attacker could deposit tokens in a skewed ratio to receive more LP tokens than deserved, potentially draining value from the pool.
The custom precision multipliers in the pool constructor are calculated by multiplying the original precision multiplier by the target price and dividing by 10^18. If the target price is less than 10^18, the result rounds down to zero, breaking the pool and locking all funds.
The contract ignores the return value of low-level calls that send Ether to a burn address. If such a call fails, the Ether remains locked in the contract.
The BasicSale contract lacks an approve call to the vesting contract, so its withdrawShare function always reverts with an allowance error, permanently locking all mainToken sent to it.
The claim() function in the airdrop contract used an assert that fails when the remaining unclaimed amount equals the claimable amount, so a user could not claim the final portion of their airdrop through that function. An alternative function, claimExact(), still allowed the last part to be claimed, so funds were not lost but availability was affected.
The contract's ownership transfer function allows the owner to accidentally transfer ownership to an invalid or uncontrolled address, which would break all functions restricted to the owner. An attacker could not directly exploit this, but the mistake could render the contract unusable.
BF
Boot Finance 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.