Alchemix contest - kenta'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: 42/62

Findings: 2

Award: $267.59

🌟 Selected for report: 0

🚀 Solo Findings: 0

AlchemicTokenV2

1 Lock pragmas to specific compiler version.

Contracts should be deployed with the same compiler version and flags that they have been tested with thoroughly. Locking the pragma helps to ensure that contracts do not accidentally get deployed using, for example, an outdated compiler version that might introduce bugs that affect the contract system negatively.

pragma solidity 0.8.11;

2 No explanation why the execution is reverted. _checkState is used to check validations. However, this implementation gives no explanation for why the execution is reverted. Especially if a function uses this _checkState much time, there is no way to recognize which argument is wrong.

https://github.com/code-423n4/2022-05-alchemix/blob/main/contracts-full/AlchemistV2.sol#L1726-L1730

Add different statement why the process is reverted.

AlchemicTokenV2.sol gas optimization

1 delete unused import statement.

https://github.com/code-423n4/2022-05-alchemix/blob/main/contracts-full/AlchemicTokenV2.sol#L6

2 use cache for amos[underlyingToken] in _flushToAmo. amos[underlyingToken]is called twice in _flushToAmo. You can use cache to save gas costs.

https://github.com/code-423n4/2022-05-alchemix/blob/main/contracts-full/TransmuterBuffer.sol#L567-L568

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