Hunt prep
Before you test Alchemix contest
What 17 disclosed reports say about Alchemix contest: what was found and paid, what was fixed, and where it may be worth looking next.
- with a public bounty
- 0
- median public bounty
- –
- highest public bounty
- –
Gaps worth testing
Not written yet for this program. The numbers below are up to date.
What was found and what it paid
Public bounties only; many reports disclose without the amount.
| Class | Reports | Paid | Median | Highest | In all |
|---|---|---|---|---|---|
| Business logic lesson | 11 | 0 | – | – | $0 |
| DoS lesson | 4 | 0 | – | – | $0 |
| Smart contracts lesson | 2 | 0 | – | – | $0 |
What was fixed
All reportsThe newest fixes, in our words. A fixed bug is not worth re-reporting, but a sibling feature, an older API version or a regression may be.
-
Alchemist can mint AlTokens above their assigned ceiling by calling lowerHasMinted()
The permission on lowerHasMinted() should be restricted to a higher-privileged role such as onlySentinel(), or the function should be removed.
Disclosed
-
EthAssetManager and ThreePoolAssetManager don’t control Meta tokens decimals
The contracts should either enforce 18 decimals at construction time or normalise token amounts by their decimals in the minting calculation.
Disclosed
-
AutoleverageBase: Must approve 0 first
The approve function should first set the allowance to zero before setting it to the maximum value.
Disclosed
-
No Storage Gap for Upgradeable Contract Might Lead to Storage Slot Collision
Add an appropriate storage gap at the end of each upgradeable contract, following OpenZeppelin's upgradeable contract templates.
Disclosed
-
Lido adapter incorrectly calculates the price of the underlying token
The price function should be updated to include an extra step that approximates the conversion rate from stETH to ETH, for example by using the same Curve pool as in unwrap().
Disclosed
-
A well financed attacker could prevent any other users from minting synthetic tokens
The Limiters library should be extended with a method to increase the mint limit, called during burn.
Disclosed
-
TransmuterBuffer’s setAlchemist will freeze deposited funds
The function should require that all exposure to the old Alchemist is closed, for example by checking that getAvailableFlow and getTotalCredit are zero.
Disclosed
-
DoS in wrap and unwrap
The check should compare the return value to the amount instead of NO_ERROR, as recommended in the report.
Disclosed
-
TransmuterBuffer’s _alchemistWithdraw use hard coded slippage that can lead to user losses
The function should accept a slippage parameter with a default of 1%, so it can be adjusted when needed.
Disclosed
-
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 should be changed so debt is reduced by market-buying alToken with the underlying token and burning it, rather than crediting it at a fixed ratio.
Disclosed
-
If totalShares for a token falls to zero while there is pendingCredit the contract will become stuck
The contract should be fixed by preventing totalShares from becoming zero, for example by requiring the last user to leave at least one unit or by burning initial shares.
Disclosed
-
YearnTokenAdapter allows a maximum loss of 100% when withdrawing
The contract should allow the user to specify the maximum acceptable loss (slippage) instead of hardcoding it, or leave the parameter blank to use the vault's default of 0.01%.
Disclosed
-
YearnTokenAdapter’s wrap can become stuck as it uses one step approval for an arbitrary underlying
The wrap function should reset the approval to zero before setting the new amount.
Disclosed
-
[gALCX.sol] Attacker can make the contract unusable when totalSupply is 0
The contract should handle the case where totalSupply is zero but the contract's token balance is greater than zero, for example by skipping the exchange rate update or setting a default rate.
Disclosed
-
TransmuterBuffer.sol calls depositUnderlying with no slippage bounds
A slippage calculation similar to the withdraw function should be implemented to protect against this.
Disclosed