Alchemix contest - shenwilly's results

A protocol for self-repaying loans with no liquidation risk.

General Information

Platform: Code4rena

Start Date: 05/05/2022

Pot Size: $125,000 DAI

Total HM: 17

Participants: 62

Period: 14 days

Judge: leastwood

Total Solo HM: 15

Id: 120

League: ETH

Alchemix

Findings Distribution

Researcher Performance

Rank: 44/62

Findings: 1

Award: $206.53

🌟 Selected for report: 0

🚀 Solo Findings: 0

Low Risk Vulnerabilities

1. Missing amount check in flushToAmo

There is no limit on how much amount a token can be flushed to Amo. A keeper can flush more than currentExchanged[underlyingToken] and expose users at risk of not being to claim their transmuted funds.

Add a check before L334 to ensure that there is at least currentExchanged[underlyingToken] amount of token left after flushing, similar to the check done during depositing fund.

2. Missing sanity check when setting creditUnlockRate

When creditUnlockRate is set to zero, pending user credit won't be unlocked over time. This could happen when creditUnlockBlocks is set larger than FIXED_POINT_SCALAR.

Consider adding sanity check to make sure blocks is lower than FIXED_POINT_SCALAR whenever creditUnlockRate is set:

3. Missing sanity check on setFlashFee

Missing sanity check when setting flashMintFee. When accidently set to an unreasonable amount, unaware users might lose fund when flashminting.

Add a reasonable maximum fee check:

function setFlashFee(uint256 newFee) external onlyAdmin { if (newFee > BPS / 2) { // max fee = 50% revert IllegalArgument(); } ... }

Affected code:

AuditHub

A portfolio for auditors, a security profile for protocols, a hub for web3 security.

Built bymalatrax © 2024

Auditors

Browse

Contests

Browse

Get in touch

ContactTwitter