SlowMist Audit Report For Memecoin Staking
SlowMist Audit Report For Memecoin Staking
1 Executive Summary
2 Audit Methodology
3 Project Overview
4 Code Overview
5 Audit Result
6 Statement
1 Executive Summary
On 2024.01.30, the SlowMist security team received the 9GAG team's security audit application for Memecoin
Staking, developed the audit plan according to the agreement of both parties and the characteristics of the project,
The SlowMist security team adopts the strategy of "white box lead, black, grey box assists" to conduct a complete
security test on the project in the way closest to the real attack.
Black box testing Conduct security tests from an attacker's perspective externally.
Conduct security testing on code modules through the scripting tool, observing the
Grey box testing
internal running status, mining weaknesses.
White box Based on the open source code, non-open source code, to detect whether there are
testing vulnerabilities in programs such as nodes, SDK, etc.
Level Description
Critical severity vulnerabilities will have a significant impact on the security of the DeFi
Critical
project, and it is strongly recommended to fix the critical vulnerabilities.
High severity vulnerabilities will affect the normal operation of the DeFi project. It is
High
strongly recommended to fix high-risk vulnerabilities.
Medium severity vulnerability will affect the operation of the DeFi project. It is
Medium
recommended to fix medium-risk vulnerabilities.
Low severity vulnerabilities may affect the operation of the DeFi project in certain
Low scenarios. It is suggested that the project team should evaluate and consider whether
these vulnerabilities need to be fixed.
Weakness There are safety risks theoretically, but it is extremely difficult to reproduce in engineering.
The security audit process of SlowMist security team for smart contract includes two steps:
Smart contract codes are scanned/tested for commonly known and more specific vulnerabilities using
Manual audit of the codes for security issues. The contracts are manually analyzed to look for any potential
problems.
Following is the list of commonly known vulnerabilities that was considered during the audit of the smart contract:
1 Overflow Audit -
3 Project Overview
This is the staking protocol of Memecoin, including Claim, Delegation and Staking parts.
No zero address
N4 Others Suggestion Fixed
check
4 Code Overview
https://github.com/9gag/memecoin-staking-audit
The SlowMist Security team analyzed the visibility of major contracts during the audit, the result as follows:
MemecoinMultiClaim
_getRequester Private - -
MemecoinDelegatable
delegate External - -
MemecoinDelegatableUpgradeable
delegate External - -
MemecoinDelegate
allowance External - -
isAuthorized External - -
MemecoinStaking
Can Modify
_authorizeUpgrade Internal onlyUpgrader
State
MemecoinStaking
Can Modify
<Constructor> Public -
State
Can Modify
initialize External initializer
State
Can Modify
_stake Private -
State
Can Modify
_unstake Private -
State
Can Modify
_redeemRewards Private -
State
_verifyProof Private - -
Can Modify
stakeRewards External onlyOwner
State
Can Modify
setStakingActive External onlyOwner
State
Can Modify
setStakingStartDate External onlyOwner
State
Can Modify
setUpgrader External onlyOwner
State
Can Modify
renounceUpgrader External onlyOwner
State
totalSupply External - -
stakeOf External - -
getRewardRedeeme
External - -
dAt
Content
In the MemecoinStaking contract, the Owner role can modify important parameters in the contract.
MemecoinStaking.sol#L204-L208,L211-L216,L222-L228,L233-L240
function setStakingActive
function setStakingStartDate
function setUpgrader
function renounceUpgrader
Since the MemecoinStaking contract adopts the UUPS upgrade mode, the upgrader role can upgrade the contract.
MemecoinStaking.sol#L47
Solution
In the short term, transferring owner ownership to multisig contracts is an effective solution to avoid single-point risk.
But in the long run, it is a more reasonable solution to implement a privilege separation strategy and set up multiple
privileged roles to manage each privileged function separately. The authority involving user funds should be managed
by the community, and the authority involving emergency contract suspension can be managed by the EOA address.
This ensures both a quick response to threats and the safety of user funds.
Status
Acknowledged
Category: Others
Content
In the MemecoinMultiClaim contract, the constructor function does not check the return value when calling the
approve function of the memecoin token contract.The _redeemRewards function and the stakeOf function
don't check the return value when calling the _verifyProof function.
MemecoinMultiClaim.sol#L39-L49,L130-L147,L252-L266
unchecked {
balanceOf[user] += amount;
}
emit Transfer(address(this), user, amount);
usersRewardRedeemedAt[user][rewardId] = block.timestamp;
emit RewardRedeemed(user, rewardId, amount, block.timestamp);
}
}
balance += amount;
}
}
}
Solution
Status
Fixed
Category: Others
Content
In the MemecoinStaking contract, the three variables name , symbol , and decimals are not used.
MemecoinStaking.sol#L42-L44
Solution
Status
Fixed; These code have no clear context in the audited commit, but clear context is provided in the final version.
Category: Others
Content
In the MemecoinStaking contract, the initialize function doesn't perform a zero address check on the
_delegate parameter.
MemecoinStaking.sol#L54-L62
Solution
Status
Fixed
5 Audit Result
Summary conclusion: The SlowMist security team use a manual and SlowMist team's analysis tool to audit the
project, during the audit work we found 1 medium risk, 3 suggestion vulnerabilities.
6 Statement
SlowMist issues this report with reference to the facts that have occurred or existed before the issuance of this
For the facts that occurred or existed after the issuance, SlowMist is not able to judge the security status of this
project, and is not responsible for them. The security audit analysis and other contents of this report are based on the
documents and materials provided to SlowMist by the information provider till the date of the insurance report
(referred to as "provided information"). SlowMist assumes: The information provided is not missing, tampered with,
deleted or concealed. If the information provided is missing, tampered with, deleted, concealed, or inconsistent with
the actual situation, the SlowMist shall not be liable for any loss or adverse effect resulting therefrom. SlowMist only
conducts the agreed security audit on the security situation of the project and issues this report. SlowMist is not