Alchemix contest - cryptphi'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: 47/62

Findings: 1

Award: $179.97

🌟 Selected for report: 0

🚀 Solo Findings: 0

  1. TransferOwnership should be two step process

Lack of two-step procedure for critical operations leaves them error-prone if the address is incorrect, the new address will take on the functionality of the new role immediately

for Ex : -Alice deploys a new version of the whitehack group address. When she invokes the whitehack group address setter to replace the address, she accidentally enters the wrong address. The new address now has access to the role immediately and is too late to revert

Affected functions: gALCX.transferOwnership()

Tools Used

Manual review

use a two-step procedure for all non-recoverable critical operations to prevent irrecoverable mistakes.

  1. Missing zero address check The following functions have missing zero address check for the corresponding parameter

EthAssetManager.setOperator() EthAssetManager.setRewardReceiver() EthAssetManager.setTransmuterBuffer() AlchemicTokenV2Base.mint() - recipient param AlchemicTokenV1.mint() - recipient param

Tools Used

Manual review

Consider adding zero address check

  1. Unsafe approve in AutoleverageBase.sol The functions below made an approve call without checking the boolean result. ERC20 standard specify that the token can return false if the approve was not made, so it's mandatory to check the result of approve methods.

Functions affected: AutoleverageBase.approve() AutoleverageCurveMetapool._curveSwap() WETHGateWay.refreshAllowance()

##Tools Used Manual review

Use safe approve or check the boolean result

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