Skip to content
Smart contracts Audit finding Intermediate

Missing cap on LicenseFee

gzeon Follow

Originally disclosed on Code4rena

Submitted by gzeon, also found by 0x0x0x and TomFrenchBlockchain

There is no cap on LicenseFee. While change of LicenseFee is under 1 day timelock, introducing a maxLicenseFee can improve credibility by removing the “rug” vector. There is a minLicenseFee in the contracts, while imo make little sense to have minLicenseFee but not maxLicenseFee.

An incorrectly set LicenseFee can potentially lead to over/underflow in Basket.sol#L140-141 which is used in most of the function.

Proof of Concept

Basket.sol#L177 Factory.sol#L77 Basket.sol#L49

Recommended Mitigation Steps

Define a maxLicenseFee

frank-beard (Kuiper) acknowledged, but disagreed with High severity and commented:

Generally it is intended for the publishers to act correctly and the timelock is intended to prevent incorrect values from making it all the way through, however there is validity in reducing how the fee can be modified, such as reducing how much any one fee change can change the fee. I would consider this a low risk issue.

0xleastwood (judge) decreased severity to Medium and commented:

It seems like changes to licenseFee could potentially brick the contract as handleFees() underflows, preventing users from minting/burning tokens. I’d deem this as medium severity due to compromised protocol availability.


The original report as published on Code4rena, by gzeon. Images and videos are our own copies; raw HTML is shown as text. View it on Code4rena.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

What is known

A medium-severity smart contracts bug in Kuiper contest. Code4rena made it public on 2 May 2022. Found in the 2021-12-defiprotocol audit contest (finding M-01).

About Smart contracts

Flaws in on-chain code that let an attacker drain funds, freeze them or break the protocol's accounting.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

What is Smart contracts?

Flaws in on-chain code that let an attacker drain funds, freeze them or break the protocol's accounting.

More by gzeon

View all

46 more disclosed reports, best first.

More from Kuiper contest

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Smart contract vulnerabilities

The lesson behind this report.

Flaws in on-chain code that let an attacker drain funds, freeze them or break the protocol's accounting.