Reach out for an audit or to learn more about Macro
or Message on Telegram

Fleek A-2

Security Audit

Dec 2, 2025

Version 1.0.0

Presented by 0xMacro

Table of Contents

Introduction

This document includes the results of the security audit for Fleek's smart contract code as found in the section titled ‘Source Code’. The security audit was performed by the Macro security team from November 3rd - 9th, 2025.

The purpose of this audit is to review the source code of certain Fleek Solidity contracts, and provide feedback on the design, architecture, and quality of the source code with an emphasis on validating the correctness and security of the software in its entirety.

Disclaimer: While Macro’s review is comprehensive and has surfaced some changes that should be made to the source code, this audit should not solely be relied upon for security, as no single audit is guaranteed to catch all possible bugs.

Overall Assessment

The following is an aggregation of issues found by the Macro Audit team:

Severity Count Acknowledged Won't Do Addressed
Critical 1 - - 1
High 1 - - 1
Medium 1 - - 1
Low 1 - - 1
Informational 1 - - -

Fleek was quick to respond to these issues.

Specification

Our understanding of the specification was based on the following sources:

Source Code

The following source code was reviewed during the audit:

Specifically, we audited the following contracts within this repository:

Source Code SHA256
src/creator-tokens/core/BondingCurveFactory.sol

4b9481d81cd6d879c89fdd48085144648302db66c71951ca8bbe7c836a1ac251

src/creator-tokens/core/CreatorCoinFactory.sol

ba2a2860f4e75fdcd05ed0e906e7c4af91d8a78417df46d71fa3db6a4c9a5b12

src/creator-tokens/core/CreatorTokenFactory.sol

2940ce8c4503781f9d697180e4eb10f1449909b11a35a8420449a1644900b0e4

src/creator-tokens/curve/BondingCurve.sol

34313005b5e263703d83fe08f4a19d90e27d9c7ebed9e881334c6d8c6eb433c8

src/creator-tokens/hooks/UniversalAntiFlipFeeHook.sol

2d8e74268b70f8ba5f76b089b45dd47b20cbadc3d9f1ca6f68bd81abdd72e8fd

src/creator-tokens/libraries/AntiFlipFeeLib.sol

a4e822f9ca919a937bb506bebfbbd4f19ee66c16cc938cc014822639d4464300

src/creator-tokens/libraries/BaseUniswapDeployments.sol

bb8fd4f624ee252d5bf8ed16522e42a8960e736735ea451a2b30d415c8f370b8

src/creator-tokens/libraries/Config.sol

ddfb95146a4153db5e3ac60553dcb9605c9e6957e15a8ee78eec7d486a2952ff

src/creator-tokens/libraries/LinearCurveMath.sol

be15351082e81533aa09346accf20fa923c2530f88575c1c9519be77fa6e56e6

src/creator-tokens/tokens/CreatorCoin.sol

d09b450b3f09107084239d3aa2cd8ed14c657ba408e46608cdf7f2fa16fdfd97

src/creator-tokens/tokens/CreatorVesting.sol

72fb0f5995cc21668cc6531eb5f6d16bea3561f002071caa4702989d062afbcd

Note: This document contains an audit solely of the Solidity contracts listed above. Specifically, the audit pertains only to the contracts themselves, and does not pertain to any other programs or scripts, including deployment scripts.

Issue Descriptions and Recommendations

Click on an issue to jump to it, or scroll down to see them all.

Security Level Reference

We quantify issues in three parts:

  1. The high/medium/low/spec-breaking impact of the issue:
    • How bad things can get (for a vulnerability)
    • The significance of an improvement (for a code quality issue)
    • The amount of gas saved (for a gas optimization)
  2. The high/medium/low likelihood of the issue:
    • How likely is the issue to occur (for a vulnerability)
  3. The overall critical/high/medium/low severity of the issue.

This third part – the severity level – is a summary of how much consideration the client should give to fixing the issue. We assign severity according to the table of guidelines below:

Severity Description
(C-x)
Critical

We recommend the client must fix the issue, no matter what, because not fixing would mean significant funds/assets WILL be lost.

(H-x)
High

We recommend the client must address the issue, no matter what, because not fixing would be very bad, or some funds/assets will be lost, or the code’s behavior is against the provided spec.

(M-x)
Medium

We recommend the client to seriously consider fixing the issue, as the implications of not fixing the issue are severe enough to impact the project significantly, albiet not in an existential manner.

(L-x)
Low

The risk is small, unlikely, or may not relevant to the project in a meaningful way.

Whether or not the project wants to develop a fix is up to the goals and needs of the project.

(Q-x)
Code Quality

The issue identified does not pose any obvious risk, but fixing could improve overall code quality, on-chain composability, developer ergonomics, or even certain aspects of protocol design.

(I-x)
Informational

Warnings and things to keep in mind when operating the protocol. No immediate action required.

(G-x)
Gas Optimizations

The presented optimization suggestion would save an amount of gas significant enough, in our opinion, to be worth the development cost of implementing it.

Issue Details

C-1

Funds can be locked in the bonding curve

Topic
Loss of funds
Status
Impact
Critical
Likelihood
Medium

The BondingCurve sells creator tokens for Fleek tokens whose price adjusts along a linear bonding curve. After a set amount of tokens have been sold, _graduate() is called, which initializes a UniswapV4 pool with Fleek received, and a set amount of creator tokens:

PoolKey memory poolKey = PoolKey({
    currency0: Currency.wrap(token0),
    currency1: Currency.wrap(token1),
    fee: POOL_FEE,
    tickSpacing: TICK_SPACING,
    hooks: IHooks(metadata.universalHook)
});

POOL_MANAGER.initialize(poolKey, startingPrice);

uint256 tokenId =
    _mintAndBurnLiquidityPosition(poolKey, token0, token1, amount0, amount1, startingPrice);

Reference: BondingCurve.sol#L531-542

However, the input parameters to initialize the pool are known before _graduate() may be called, and could be initialized beforehand. If that were to occur, when graduate() eventually does get called, it would revert when calling initialize(), would revert, locking the fleek and creator tokens in the contract.

Remediations to Consider

Setup a beforeInitialize() callback to the UniversalAntiFlipFeeHook that reverts if the bondingCurve has not graduated, to prevent it from being initialized until it is ready.

H-1

Users can circumvent fees

Topic
Protocol Design
Status
Impact
High
Likelihood
Medium

There are additional fees set for selling either in the BondingCurve or in the uniswap pool via the UniversalAntiFlipFeeHook, which is determined in the AntiFlipFeeLib’s getTotalFee():

if (!isBuy) {
    uint256 lastBuyTime = userLastBuy[user];

    if (lastBuyTime > 0) {
        uint256 windowDuration =
            calculateWindow(user, creatorToken, lastBuyTime, entropyTimestamp);
        uint256 elapsed = block.timestamp - lastBuyTime;

        if (elapsed < windowDuration) {
            totalFee += SNIPE_PENALTY_BPS;
        }
    }
}

Reference: AntiFlipFeeLib.sol#L90-78

The lastButTime is marked for a user on purchase, however, there is nothing preventing a user from transferring their tokens to another address that does not a set lastBuyTime, circumventing these extra fees intended to disincentivize sniping and selling without waiting, and results in less fees collected.

Remediations to Consider

Allow for tokens to be locked on purchase via the bondingCurve or hook for the duration of the window, with the exception of transferring to the bondingCurve or pool to allow for selling.

M-1

Sophisticated users can guarantee a minimal anti sniper window

Topic
Protocol Design
Status
Impact
Medium
Likelihood
Low

Additional fees are applied if selling within a variable window from the time of purchase. This variance of window is intended to be random and a fun way to help prevent disincentivize users from flipping the tokens, especially on launch of the token or creation of the pool. There is a clear advantage to having a smaller window for users that may want to flip the token without incurring fees. This window is determined by the time of last purchase, the users address, time the token was created, and the creator token address:

function calculateWindow(
    address user,
    address creatorToken,
    uint256 buyTimestamp,
    uint256 entropyTimestamp
) internal pure returns (uint256) {
    uint256 seed = uint256(
        keccak256(abi.encodePacked(user, creatorToken, buyTimestamp, entropyTimestamp))
    );

    return MIN_WINDOW + (seed % WINDOW_RANGE);
}

Reference: AntiFlipFeeLib.sol#47-58

Since the user is a input in determining the window, this can leveraged by a contract that could try a bunch seeds for addresses until i finds one that would generate a minimum window for their desired purchase.

Remediations to Consider

Use msg.origin for the user, to prevent attempting with multiple addresses in a singular transaction, additionally use block.prevrandao for added uncertainty as opposed to buy timestamp. Additionally instead of storing last purchase time, store the window calculated, and update it only if the new window is greater than the currently stored.

L-1

Potential loss of precision when checking zero value

Topic
Precision
Status
Impact
Low
Likelihood
Low

In LinearCurveMath, when calculating the amount of tokens purchased via calculateBuyAmount(), there is a check at the end to ensure a non-zero amount of tokens are purchased before returning the result:

if (UD60x18.unwrap(outputFP) == 0) revert OutputTooSmall();

return _fromUD60x18(outputFP, buyTokenDecimals);

Reference: LinearCurveMath.sol#L24-26

However, the check assumes the buy token is in 18 decimals, while the return value converts it using the proper decimals. In the case where the buy token has a small amount of decimals ie 6, this function could result in a small value for outputFP say 0.0000000000000005, which would evaluate to 500 via unwrap() and pass the check, but would result in zero tokens when converting to the proper decimals.

This is not necessarily a issue for the protocol currently as both the creator token and the sell token (Fleek) have 18 decimals. However, this may change, or this contract may be used in other protocols where this could come up.

Remediations to Consider

Check if the properly converted value is zero.

I-1

Rounding results in small gain of creator tokens if no fees are set

Topic
informational
Impact
Informational

When buying creator tokens and immediately selling them back, it can result in gaining a small amount of creator tokens for free, provided there are no fees set. Currently the protocol expects to always use 4% fees which offsets the small amount of tokens gained, leading to this not being a worry. It is important, however, that this is considered if this protocol or other protocols use the code and do not charge fees.

Disclaimer

Macro makes no warranties, either express, implied, statutory, or otherwise, with respect to the services or deliverables provided in this report, and Macro specifically disclaims all implied warranties of merchantability, fitness for a particular purpose, noninfringement and those arising from a course of dealing, usage or trade with respect thereto, and all such warranties are hereby excluded to the fullest extent permitted by law.

Macro will not be liable for any lost profits, business, contracts, revenue, goodwill, production, anticipated savings, loss of data, or costs of procurement of substitute goods or services or for any claim or demand by any other party. In no event will Macro be liable for consequential, incidental, special, indirect, or exemplary damages arising out of this agreement or any work statement, however caused and (to the fullest extent permitted by law) under any theory of liability (including negligence), even if Macro has been advised of the possibility of such damages.

The scope of this report and review is limited to a review of only the code presented by the Fleek team and only the source code Macro notes as being within the scope of Macro’s review within this report. This report does not include an audit of the deployment scripts used to deploy the Solidity contracts in the repository corresponding to this audit. Specifically, for the avoidance of doubt, this report does not constitute investment advice, is not intended to be relied upon as investment advice, is not an endorsement of this project or team, and it is not a guarantee as to the absolute security of the project. In this report you may through hypertext or other computer links, gain access to websites operated by persons other than Macro. Such hyperlinks are provided for your reference and convenience only, and are the exclusive responsibility of such websites’ owners. You agree that Macro is not responsible for the content or operation of such websites, and that Macro shall have no liability to your or any other person or entity for the use of third party websites. Macro assumes no responsibility for the use of third party software and shall have no liability whatsoever to any person or entity for the accuracy or completeness of any outcome generated by such software.