Prepared by:
HALBORN
Last Updated 03/11/2026
Date of Engagement: April 5th, 2022 - June 17th, 2022
100% of all REPORTED Findings have been addressed
All findings
18
Critical
0
High
0
Medium
3
Low
3
Informational
12
Moonwell Finance engaged Halborn to conduct a security audit on their smart contracts beginning on 2022-04-05 and ending on 2022-06-17. The security assessment was scoped to the smart contracts provided to the Halborn team.
The team at Halborn was provided a week for the engagement and assigned a full-time security engineer to audit the security of the smart contract. The security engineer is a blockchain and smart-contract security expert with advanced penetration testing, smart-contract hacking, and deep knowledge of multiple blockchain protocols.
The purpose of this audit is to:
Ensure that smart contract functions operate as intended.
Identify potential security issues with the smart contracts.
In summary, Halborn identified some security risks that were addressed by the Moonwell Finance team.
Halborn performed a combination of manual and automated security testing to balance efficiency, timeliness, practicality, and accuracy regarding the scope of the smart contract audit. While manual testing is recommended to uncover flaws in logic, process, and implementation; automated testing techniques help enhance coverage of smart contracts and can quickly identify items that do not follow security best practices. The following phases and associated tools were used throughout the term of the audit:
Research into architecture and purpose.
Smart Contract manual code review and walkthrough.
Graphing out functionality and contract logic/connectivity/functions(solgraph)
Manual Assessment of use and safety for the critical Solidity variables and functions in scope to identify any arithmetic related vulnerability classes.
Dynamic Analysis (ganache-cli, brownie, hardhat).
\begin{enumerate} \item Moonwell Finance Token Sale Contracts \begin{enumerate} \item Repository: \href{https://github.com/moonwell-fi/moonwell-contracts-private/tree/726dcbaef18670d344fa5621c23c4db0e403583a/contracts/tokensale}{Token Sale} \item Commit ID: \href{https://github.com/moonwell-fi/moonwell-contracts-private/tree/726dcbaef18670d344fa5621c23c4db0e403583a/contracts/tokensale}{726dcbaef18670d344fa5621c23c4db0e403583a} \item New PR : \href{ https://github.com/moonwell-fi/moonwell-contracts-private/pull/43 }{PR} \item New Commit : \href{ https://github.com/moonwell-fi/moonwell-contracts-private/tree/9c51e4860c3f768190036ddcc7dbc4ef3d497c1f/contracts/tokensale }{New Commit} \end{enumerate} \item Out-of-Scope \begin{enumerate} \item test/*.sol \end{enumerate} \end{enumerate}
Out-of-scope: External contract, libraries and financial related attacks.
FIX Commit ID : 762cdc4cd9a8d09f29765f9e143b25af0ebe9720
TAG : artemis-v1
Critical
0
High
0
Medium
3
Low
3
Informational
12
Impact x Likelihood
HAL-01
HAL-04
HAL-05
HAL-02
HAL-03
HAL-06
HAL-07
HAL-08
HAL-09
HAL-10
HAL-11
HAL-12
HAL-13
HAL-14
HAL-15
HAL-16
HAL-17
HAL-18
| Security analysis | Risk level | Remediation Date |
|---|---|---|
| EXPIRED TOKENS ARE NOT CONSIDERED IN THE VOTING POWER | Medium | Solved - 06/16/2022 |
| OLD TOKENS ARE NOT RECOVERABLE WHEN THE NEW TOKEN IS SET | Medium | Solved - 04/13/2022 |
| OWNER CAN RESET ALLOCATIONS - DELEGATIONS | Medium | Risk Accepted |
| MISSING EVENTS FOR ADMIN ONLY FUNCTIONS THAT CHANGE CRITICAL PARAMETERS | Low | Not Applicable |
| UNNEEDED INITIALIZATION OF UINT256 VARIABLES TO 0 | Low | Solved - 04/13/2022 |
| MISSING ZERO ADDRESS CHECKS | Low | Not Applicable |
| USING ++I CONSUMES LESS GAS THAN I+=1 IN LOOPS | Informational | Solved - 04/13/2022 |
| CACHING THE LENGTH IN THE FOR LOOPS | Informational | Solved - 04/13/2022 |
| REVERT STRING SIZE OPTIMIZATION | Informational | Acknowledged |
| MISSING CHECKS FOR NON-ZERO TRANSFER VALUE CALLS | Informational | Solved - 04/13/2022 |
| BLOCK WITH GAS LIMIT | Informational | Acknowledged |
| EXPERIMENTAL KEYWORD USAGE | Informational | Solved - 04/13/2022 |
| UPGRADE AT LEAST PRAGMA 0.8.10 | Informational | Solved - 04/13/2022 |
| OPEN TODOS | Informational | Solved - 06/16/2022 |
| CHANGING FUNCTION VISIBILITY FROM PUBLIC TO EXTERNAL CAN SAVE GAS | Informational | Solved - 06/16/2022 |
| DIRECT USAGE OF ECRECOVER ALLOWS SIGNATURE MALLEABILITY | Informational | Solved - 06/16/2022 |
| MISSING EVENTS | Informational | Solved - 06/16/2022 |
| OPTIMIZE UNSIGNED INTEGER COMPARISON | Informational | Not Applicable |
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
Halborn strongly recommends conducting a follow-up assessment of the project either within six months or immediately following any material changes to the codebase, whichever comes first. This approach is crucial for maintaining the project’s integrity and addressing potential vulnerabilities introduced by code modifications.
// Download the full report
Smart Contract Assessment
* Use Google Chrome for best results
** Check "Background Graphics" in the print settings if needed