Skip to content

Code4rena

Alchemix contest

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

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

Disclosed reports

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

Business logic

EthAssetManager and ThreePoolAssetManager don’t control Meta tokens decimals

The contracts assume meta pool tokens always have 18 decimals when calculating minting slippage, but the token decimals are not controlled. If a meta token has different decimals, minting can become impossible or slippage protection can be bypassed, potentially causing fund loss.

Alchemix contest

Medium
Business logic

AutoleverageBase: Must approve 0 first

The contract's internal approve function sets a token allowance directly to the maximum value without first resetting it to zero. For tokens like USDT that require a zero allowance before changing a non-zero one, the approval call would fail, potentially blocking the contract's operations.

Alchemix contest

Medium
Smart contracts

No Storage Gap for Upgradeable Contract Might Lead to Storage Slot Collision

Several upgradeable contracts lack a storage gap, so if a base contract is later upgraded to add a new state variable, it could overwrite a variable in a child contract. This could cause loss of user funds or make the contract malfunction completely.

Alchemix contest

Medium
Business logic

TransmuterBuffer’s setAlchemist will freeze deposited funds

The setAlchemist function does not check for open positions with the old Alchemist before switching to a new one. If an admin changes the Alchemist while funds remain deposited, those funds become frozen and require manual recovery.

Alchemix contest

Medium
DoS

DoS in wrap and unwrap

The wrap and unwrap functions in the Fuse token adapter incorrectly compare the return value of mint and redeem against a zero error code, but those functions return the amount minted or redeemed. This causes the functions to revert even when the operation succeeds, making the adapter unusable.

Alchemix contest

Medium
Business logic

TransmuterBuffer’s _alchemistWithdraw use hard coded slippage that can lead to user losses

The TransmuterBuffer contract's _alchemistWithdraw function uses a hard-coded 1% slippage tolerance, which can cause users to lose up to 1% of their funds without consent when there are insufficient shares, or make withdrawals impossible when market conditions require a larger slippage. This leads to either modest user fund loss or temporary freezing of funds.

Alchemix contest

Medium
Business logic

Debt can be repaid with a depegged underlyingToken, which can be exploited by arbitrageurs and drives the market price of alToken to match the worst depegged underlyingToken

The repay function converts any accepted underlying token to debt at a fixed 1:1 ratio regardless of its market price, so a depegged token can repay the same nominal debt for less real value. An arbitrageur could mint alToken, buy the cheap depegged token, repay debt with it, withdraw collateral and sell the leftover alToken for profit, pushing the alToken price down to the depegged token's price.

Alchemix contest

Medium
Business logic

YearnTokenAdapter allows a maximum loss of 100% when withdrawing

The YearnTokenAdapter contract hardcodes a maximum loss of 100% when withdrawing from a Yearn vault, meaning there is no slippage check. An attacker could exploit this by manipulating the vault's share price to cause a loss of funds for users withdrawing through the adapter.

Alchemix contest

Medium
DoS

[gALCX.sol] Attacker can make the contract unusable when totalSupply is 0

The gALCX contract's bumpExchangeRate function divides by totalSupply without checking for zero, so if an attacker sends ALCX tokens directly to the contract while totalSupply is zero, the function reverts. This makes stake, unstake, and migrateSource unusable, effectively denying service to legitimate users.

Alchemix contest

Medium
Business logic

TransmuterBuffer.sol calls depositUnderlying with no slippage bounds

The TransmuterBuffer contract calls depositUnderlying with a minimum output of zero, so any amount of slippage is accepted. If the buffer is invoked at an unfavourable time, a large portion of the deposited funds could be lost to slippage.

Alchemix contest

Medium
Business logic

registerAsset misuse can permanently disable TransmuterBuffer and break the system

The TransmuterBuffer contract's refreshStrategies function requires its registeredUnderlyings array to match the Alchemist's supportedUnderlyingTokens. Since registerAsset can only add to this array and there is no way to remove entries, if an extra asset is registered or the Alchemist is switched to one with fewer assets, refreshStrategies becomes permanently blocked, disabling the contract.

Alchemix contest

Medium
Smart contracts

New gALCX token denomination can be depressed by the first depositor

The first depositor of a new gALCX contract can make a tiny stake and then directly transfer a large amount of ALCX to inflate the exchange rate, causing later depositors' shares to be rounded down and their funds captured by the attacker. This allows the attacker to steal a portion of subsequent deposits.

Alchemix contest

Medium