Skip to content
Business logic Audit finding Beginner

Src/utils/PermissionedProxy.sol::setPermissionedCall incomplete event emission because it doesnt include value argument for signature

The setPermissionedCall function in PermissionedProxy.sol emits an event that records only the function signature, not whether the call was being enabled or disabled. As a result, anyone monitoring the event log cannot tell from the event alone whether a signature was turned on or off.

hunter0xweb3 Follow

Originally disclosed on Immunefi

Informational View original
  • Disclosed after under an hour

56427 sc insight src utils permissionedproxy sol setpermissionedcall incomplete event emission because it doesnt include value argument for signature

Submitted on Oct 15th 2025 at 22:07:09 UTC by @hunter0xweb3 for Audit Comp | Alchemix V3

Description

Brief/Intro

src/utils/PermissionedProxy.sol::setPermissionedCall emits an event when a method signature is enabled (function called with value argument = true) or disabled (function called with value argument = false) in protocol via setPermissionedCall method. However the emitted event doesnt include value argument value leading to incomplete emitted information about permissioned call changes for a signature AlchemistAllocator.sol contract inherits from PermissionedProxy.sol

Vulnerability Details

The issue occurs because src/utils/PermissionedProxy.sol::setPermissionedCall doesnt emmit the value variable value for the function call. This leads to incomplete emitted information about if the method signature is now allowed or not:

Solidity
    function setPermissionedCall(bytes4 sig, bool value) external onlyAdmin {
        permissionedCalls[sig] = value;
@>        emit AddedPermissionedCall(sig);
    }
  • AlchemistAllocator.sol contract inherits from PermissionedProxy.sol so AlchemistAllocator emits incomplete information too:
Solidity
import {PermissionedProxy} from "./utils/PermissionedProxy.sol";
//...
contract AlchemistAllocator is PermissionedProxy,

Impact Details

  • The information emitted in the setPermissionedCall's event is incomplete because doesnt include the status of the method signature, ie doesnt show if the method signature was enabled or disabled in the protocol.
  • AlchemistAllocator.sol contract inherits from PermissionedProxy.sol
    so AlchemistAllocator emits incomplete information

References

https://github.com/alchemix-finance/v3-poc/blob/a192ab313c81ba3ab621d9ca1ee000110fbdd1e9/src/utils/PermissionedProxy.sol#L43-L46\\ https://github.com/alchemix-finance/v3-poc/blob/a192ab313c81ba3ab621d9ca1ee000110fbdd1e9/src/AlchemistAllocator.sol#L15

Proof of Concept

Proof of Concept

  1. Call with a privileged address (admin or an approved operator) AlchemistAllocator::setPermissionedCall with some signature and value = true, to enable signature in the protocol
  2. Call again with same account AlchemistAllocator::setPermissionedCall but now with value = false, to disable method signature in the protocol
  3. Observe both emitted events for AlchemistAllocator::setPermissionedCall are identical, because src/utils/PermissionedProxy.sol::setPermissionedCall doesnt contain information about value argument

Recommendation

Include value variable value in emitted event:

    function setPermissionedCall(bytes4 sig, bool value) external onlyAdmin {
        permissionedCalls[sig] = value;
@>      emit AddedPermissionedCall(sig, value);
    }

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

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

The event declaration and its emission omit the boolean value parameter, so the on/off state is not recorded in the log.

Impact

Off-chain monitoring and indexing of permissioned call changes could be misled, since the event log does not show whether a signature was enabled or disabled; the report does not claim any direct loss of funds.

What the attacker needed

Admin or approved operator role

The fix

The event should be changed to include the value argument so each emission records whether the signature was enabled or disabled.

How it was found

  1. Call setPermissionedCall with a signature and value set to true to enable it.
  2. Call setPermissionedCall again with the same signature and value set to false to disable it.
  3. Observe that both emitted events are identical because the value is not included.

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.

A smart contract can announce things it does by writing an 'event' to a public log. Here the contract announces that a function signature was changed, but it forgets to say whether it was switched on or off. Anyone reading the log later cannot tell what actually happened without extra work.

What is Business logic?

The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.

More by hunter0xweb3

View all

8 more disclosed reports, best first.

More from Alchemix V3

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Business logic flaws

The lesson behind this report.

The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.