Skip to content
Access control Audit finding Intermediate

It’s still not possible to set pool’s protocol fees

The admin cannot set a pool's protocol fee because the required function is not implemented in the SeawaterAMM contract. This means protocol fees remain unconfigurable, contrary to intended functionality.

DadeKuma Follow

Originally disclosed on Code4rena

Submitted by DadeKuma

The admin can’t set a pool’s protocol fee because the function has not been implemented.

Proof of Concept

The previous issue, M-12, wasn’t fixed properly.

The root cause is that the admin has no way to call set_fee_protocol_C_B_D_3_E_C_35 through Seawater, as the function wasn’t implemented.

As a result, the original issue persists because protocol fees cannot be set.

Recommended Mitigation Steps

Consider adding the following function to SeaWaterAMM.sol:

    function setFeeProtocolCBD3EC35(address /* pool */, uint8 /* feeProtocol0 */, uint8 /* feeProtocol1 */) external {
        directDelegate(_getExecutorAdmin());
    }

Assessed type

Access Control

af-afk (Superposition) commented:

0xsomeone - It’s possible to call this function since the signature resolves it to the admin facet in the fallback.

0xsomeone (judge) commented:

Per discussions in #8 this is a valid, albeit, Medium risk issue.

af-afk (Superposition) commented:

We felt this was technically inaccurate given that the function signature corresponded to the right fallback, triggering the correct dispatch, but we opted to fix this in principal with the similar issues. We weren’t responsive at the time to affect the ruling.


The original report as published on Code4rena, by DadeKuma. 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.

How it worked

Root cause

Likely the function to set the protocol fee was not implemented in the SeaWaterAMM contract, so the admin has no way to call it.

Impact

The protocol fees cannot be set, so the protocol may not be able to collect fees as intended; the judge rated this as a valid Medium risk issue.

What the attacker needed

Admin role

The fix

The function should be added to SeaWaterAMM.sol to allow the admin to set the protocol fee, though the team noted they fixed it in principle.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

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

In this smart contract system, an admin is supposed to be able to set a fee that the protocol collects from each pool. However, the specific function that would let them do that is missing, so the fee can never be changed. This is a problem because the protocol cannot collect its intended fees.

What is Access control?

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.

More by DadeKuma

View all

19 more disclosed reports, best first.

More from Superposition

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Broken access control

The lesson behind this report.

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.