Memeswap V1

Memeswap V1 Smart Contract Audit Report

Share
Share
ScrollScrollBaseBaseBlastBlast
Uniswap v2AMM
ScrollScrollBaseBase+1
Uniswap v2AMM

QuillAudits audited the Memeswap V1 smart contracts on Scroll, Base and Blast between Jun 25, 2024 and Jul 30, 2024. The audit found 19 issues: 2 high, 3 medium, 4 low, 10 informational, of which 17 resolved and 2 acknowledged.

Project Description

Memeswap provides an alternative AMM for the trending meme launch activities. Memeswap is a fork of UniswapV2 with modifications.

Timeline

S1
Jun 25, 2024
S2
Jul 30, 2024

Scope of Audit

The scope of this audit was to analyze the MemeSwap Contract for quality, security, and correctness.

Methodology: the QuillAudits smart contract audit process.

speedometer
0
50%
60%
70%
90%
100%
96.1%
AUDIT SCORE
icon

High

Medium

Low

Informational

open0000
acknowledged0110
partially resolved0000
resolved22310
Memeswap V1

Memeswap V1

High Severity Issues

Malicious Contract Exploit Freezing MemeswapVault and Locking Funds

Resolved
arrow-right
Description

The MemeswapVault contract manages staking, enqueuing, renting, and claiming processes for the Memeswap protocol. Users can stake their Ether, join the queue, and claim rewards through various functions within the contract.
A significant problem occurs with the trigger modifier, which attempts to dequeue items and send Ether to the queued user. If the recipient is a malicious contract that reverts the transaction through its receive or fallback function, the entire operation fails. This creates a Denial of Service (DoS) condition, halting the protocol and causing funds to be stuck.

Contract

src/MemeswapVault.sol

Recommendation

To fix this issue, it is crucial to implement a secure mechanism for handling Ether transfers that can fail gracefully without reverting the entire transaction.
1.    Use Pull Payments:
Implement a pull payment mechanism where users can withdraw their Ether in a separate transaction. Maintain a record of Ether amounts to be withdrawn by each user.
2.    Graceful Error Handling:
Ensure that Ether transfers do not revert the entire transaction. Handle transfer failures gracefully and log the event for further inspection.

Potential Denial of Service in MemeswapVault: Enqueue and Dequeue Manipulation Exploit

Resolved
arrow-right
Description

A critical Denial of Service (DoS) vulnerability in the MemeswapVault contract. The vulnerability is related to the enqueue and dequeue logic, specifically how the dequeuePossible function interacts with the enqueue process, potentially leading to a state where the contract becomes unusable due to arithmetic underflow or overflow.
The MemeswapVault contract allows users to enqueue ether and stake it. The staking process involves renting liquidity to newly deployed tokens. However, the logic in the dequeuePossible function can be manipulated to create a situation where the dequeue function can never be called successfully, leading to a critical DoS scenario.

Contract

src/MemeswapVault

Recommendation

To address this issue, consider the following remediation steps:
1. Update dequeuePossible Logic:
o   Ensure that the condition in dequeuePossible correctly handles edge cases where totalSupply and rentedSupply might create an imbalance.
2. Modify dequeue Function:
o   Add additional checks to prevent arithmetic underflow or overflow in the balances[user] -= amount statement.

Medium Severity Issues

Low Severity Issues

Informational Issues

Appendix

Disclaimer

Memeswap V1

Memeswap V1

High Severity Issues
Medium Severity Issues
Low Severity Issues
Informational Issues
Appendix
Disclaimer
View Report PDF

Get an Audit done today for your Smart Contract

Join 1500+ leaders who secured themselves from losing Billion Dollars

cta-banner
cta-banner-bgcta-banner-bg-mobile

Related audits

WE SECURE EVERYTHING YOU BUILD.

From day-zero risk mapping to exchange-ready audits, QuillAudits helps projects grow with confidence. Smart contracts, dApps, infrastructure, compliance: secured end to end.

QuillAudits Logo


ISO 27001Circle Alliance Program
Uniswap FoundationAethiropt-collectivePolygon SPNBNB Chain Kickstart

All Rights Reserved. © 2026. QuillAudits - LLC