Yield distribution will revert if global module doesn t implement iyieldrestrictions
The yield distribution function calls a global module through a try/catch, but a contract that lacks the expected function causes the call to revert before the catch block runs. As a result, distributeYield reverts and no holders receive yield while the misconfigured module remains set.
Plume Network
Originally disclosed on Immunefi
51712 sc insight yield distribution will revert if global module doesn t implement iyieldrestrictions
- Submitted on: Aug 5th 2025 at 08:05:57 UTC by @WinSec for Attackathon | Plume Network
- Report ID: #51712
- Report Type: Smart Contract
- Report severity: Insight
- Target: https://github.com/immunefi-team/attackathon-plume-network/blob/main/arc/src/ArcToken.sol
- Impacts: Theft of unclaimed yield
Description
Brief/Intro
If the global module set in the router does not implement IYieldRestrictions (or the call fails), the developer attempted to handle that case with a try/catch. However, due to how Solidity handles function selector mismatches, the call can revert before reaching the catch block. As a result, distributeYield can revert entirely, preventing yield distribution for all holders.
Vulnerability Details
distributeYield distributes yield to ArcToken holders while skipping restricted accounts. It relies on _isYieldAllowed at multiple points in distributeYield. Example loop:
for (uint256 i = 0; i < holderCount; i++) {
address holder = $.holders.at(i);
if (_isYieldAllowed(holder)) {
effectiveTotalSupply += balanceOf(holder);
}
}
The _isYieldAllowed implementation checks both a specificYieldModule and a globalYieldModule. Focusing on the global module:
address globalYieldModule = IRestrictionsRouter(routerAddr).getGlobalModuleAddress(RestrictionTypes.GLOBAL_SANCTIONS_TYPE);
if (globalYieldModule != address(0)) {
try IYieldRestrictions(globalYieldModule).isYieldAllowed(account) returns (bool globalAllowed) {
allowed = allowed && globalAllowed;
} catch {
// If global module doesn't implement IYieldRestrictions or call fails, treat as restricted?
// Or handle based on specific global module design.
// Current: Assume allowed if call fails/not implemented (less restrictive).
}
}
Comments indicate the developer intended to treat the account as allowed if the call fails or is not implemented. However, if the contract set as globalYieldModule does not implement isYieldAllowed, the external call can revert due to a function selector mismatch, and Solidity's try/catch will not catch that — causing the entire distributeYield transaction to revert.
This is analogous to the issue described here: https://github.com/sherlock-audit/2024-04-teller-finance-judging/issues/178
Impact Details
Yield will not be distributed to any holders while the misconfigured global module remains set, causing potential loss/theft of unclaimed yield or denial of yield distribution.
Proof of Concept
{% stepper %} {% step %}
Step 1: Admin sets a wrong contract as global yield module
Call:
router.updateGlobalModuleImplementation(GLOBAL_SANCTIONS_TYPE, wrongContract)
Where wrongContract does not implement isYieldAllowed().
{% endstep %}
{% step %}
Step 2: Call distributeYield()
distributeYield() is invoked to distribute yield to token holders. Execution iterates through holders:
for (uint256 i = 0; i < holderCount; i++) {
address holder = $.holders.at(i);
if (_isYieldAllowed(holder)) {
effectiveTotalSupply += balanceOf(holder);
}
}
{% endstep %}
{% step %}
Step 3: First call to _isYieldAllowed reaches the global module check
Attempted call:
address globalYieldModule = IRestrictionsRouter(routerAddr).getGlobalModuleAddress(RestrictionTypes.GLOBAL_SANCTIONS_TYPE);
if (globalYieldModule != address(0)) {
try IYieldRestrictions(globalYieldModule).isYieldAllowed(account) returns (bool globalAllowed) {
allowed = allowed && globalAllowed;
} catch {
// Intended fallback if call fails/not implemented
}
}
Because wrongContract lacks the isYieldAllowed selector, the call cannot be dispatched.
{% endstep %}
{% step %}
Step 4: Call fails with function-not-found error that bypasses try/catch
Solidity's try/catch does not handle function selector mismatches in this context — the external call reverts before the catch block runs. {% endstep %}
{% step %}
Step 5: Entire distributeYield transaction reverts
The revert stops the whole distributeYield execution and no yield is distributed to any holders. Distribution attempts will continue to fail until the global module is fixed or removed.
{% endstep %}
{% endstepper %}
References
Context
Plume Network's ArcToken is a token contract that distributes yield to its holders. The distribution logic lives in distributeYield, which walks the holder set and, for each holder, decides whether that holder is allowed to receive yield. Holders that are restricted are skipped, and the balances of the remaining holders are summed into an effective total supply that the distribution is based on.
The allow/deny decision is made by _isYieldAllowed, which consults two sources: a specificYieldModule and a globalYieldModule. The global module address is fetched from a router contract:
address globalYieldModule = IRestrictionsRouter(routerAddr).getGlobalModuleAddress(RestrictionTypes.GLOBAL_SANCTIONS_TYPE);
The module is expected to implement the IYieldRestrictions interface, whose isYieldAllowed(address) function answers whether a given account may receive yield. The report is an insight into what happens when the contract configured as the global module does not implement that interface.
Setup
The relevant actors and components are:
- An admin who can call
router.updateGlobalModuleImplementation(GLOBAL_SANCTIONS_TYPE, ...)to set the global module for theGLOBAL_SANCTIONS_TYPErestriction type. - The router, exposed through
IRestrictionsRouter, which stores and returns the global module address. - The
ArcTokencontract atarc/src/ArcToken.sol, which holds the holder set and thedistributeYield/_isYieldAllowedlogic. - The global module contract itself, which is supposed to implement
IYieldRestrictions.
The precondition for the bug is a misconfiguration: the address returned by the router for GLOBAL_SANCTIONS_TYPE is a contract that does not implement isYieldAllowed. No special tooling is needed to reason about the issue; it follows from how Solidity dispatches external calls and how try/catch behaves around them.
Finding it
The researcher looked at how _isYieldAllowed handles a failing or non-conforming global module. The code wraps the external call in try/catch and the comments show the intent clearly:
address globalYieldModule = IRestrictionsRouter(routerAddr).getGlobalModuleAddress(RestrictionTypes.GLOBAL_SANCTIONS_TYPE);
if (globalYieldModule != address(0)) {
try IYieldRestrictions(globalYieldModule).isYieldAllowed(account) returns (bool globalAllowed) {
allowed = allowed && globalAllowed;
} catch {
// If global module doesn't implement IYieldRestrictions or call fails, treat as restricted?
// Or handle based on specific global module design.
// Current: Assume allowed if call fails/not implemented (less restrictive).
}
}
The comments state the intended fallback: if the call fails or the function is not implemented, the account is assumed allowed. That intent is what makes the code look wrong. A try/catch around an external call does not protect against every kind of failure, and a function selector mismatch is one of the cases it does not cover. The researcher recognised this as the same class of issue as a previously reported finding in another audit (the Teller Finance judging issue linked in the report).
Exploitation
Step 1: Admin sets a wrong contract as global yield module
The admin calls:
router.updateGlobalModuleImplementation(GLOBAL_SANCTIONS_TYPE, wrongContract)
Here wrongContract is a contract that does not implement isYieldAllowed(). From this point on, the router returns that address as the global module for GLOBAL_SANCTIONS_TYPE.
Step 2: Call distributeYield()
distributeYield() is invoked to distribute yield to token holders. Execution iterates through the holders:
for (uint256 i = 0; i < holderCount; i++) {
address holder = $.holders.at(i);
if (_isYieldAllowed(holder)) {
effectiveTotalSupply += balanceOf(holder);
}
}
Every iteration calls _isYieldAllowed, so the global module check is reached on the first holder processed.
Step 3: First call to _isYieldAllowed reaches the global module check
The attempted call is:
address globalYieldModule = IRestrictionsRouter(routerAddr).getGlobalModuleAddress(RestrictionTypes.GLOBAL_SANCTIONS_TYPE);
if (globalYieldModule != address(0)) {
try IYieldRestrictions(globalYieldModule).isYieldAllowed(account) returns (bool globalAllowed) {
allowed = allowed && globalAllowed;
} catch {
// Intended fallback if call fails/not implemented
}
}
Because wrongContract lacks the isYieldAllowed selector, the call cannot be dispatched.
Step 4: Call fails with function-not-found error that bypasses try/catch
Solidity's try/catch does not handle function selector mismatches in this context. The external call reverts before the catch block runs, so the intended fallback (assume allowed) never executes.
Step 5: Entire distributeYield transaction reverts
The revert stops the whole distributeYield execution and no yield is distributed to any holders. Distribution attempts continue to fail until the global module is fixed or removed.
Root cause
The mistake is a mismatch between the developer's intent and the semantics of Solidity's try/catch. The catch block was written to absorb a failed or unimplemented call, but a call to a contract that does not expose the expected function selector fails at dispatch time, before the call can return a value or a catchable error to the caller. The try/catch therefore does not intercept it, and the revert propagates up through _isYieldAllowed into distributeYield.
Because _isYieldAllowed is called inside the holder loop, a single failing check is enough to abort the whole distribution. The try/catch does not cover a selector mismatch on the target contract, so the revert propagates into distributeYield.
Impact
While the misconfigured global module remains set, yield is not distributed to any holders. The report frames this as potential loss or theft of unclaimed yield, or as a denial of yield distribution. The condition is administrative: it requires the router to point GLOBAL_SANCTIONS_TYPE at a contract that does not implement isYieldAllowed. Distribution resumes once the global module is fixed or removed.
Fix
The report does not describe a fix that was applied. The behaviour it asks for is the one the comments already describe: a failed or unimplemented global module call should not abort distribution. A robust approach is to avoid relying on try/catch for interface conformance, for example by checking that the configured module actually supports the expected interface before calling it, or by performing the call in a way that treats a dispatch failure as the documented fallback rather than as a fatal error.
Variants to test
- Other restriction modules: check whether
specificYieldModuleis called with the sametry/catchpattern. If it is, a misconfigured specific module produces the same abort. A positive result is a distribution path that reverts when the specific module lacks the expected selector. - Other interface calls behind
try/catch: search the codebase fortry I...(...)patterns where the target address comes from configuration. A positive result is any such call where the configured contract can be a non-conforming implementation and the surrounding logic assumes the catch block will run. - Proxy and upgrade paths: if the module address can point at a proxy whose implementation changes, test what happens when the implementation is swapped for one without
isYieldAllowed. A positive result is a distribution or accounting function that reverts after the upgrade. - Zero-address and EOA modules: the code guards against
address(0), but an EOA or a contract with a fallback function may behave differently from a contract with no matching selector. A positive result is a call that succeeds unexpectedly and returns data the caller misinterprets.
Hunting notes
This kind of bug hides wherever configuration-supplied addresses are called through an interface and the result is wrapped in try/catch with a fallback comment. During review, look for router lookups such as getGlobalModuleAddress, registry patterns, and any place where an admin can set an implementation address. The signal is a comment that says "if the call fails, assume X": that comment is a claim about try/catch behaviour, and it is worth checking whether the failure mode it describes is actually catchable.
The report walks the path from the admin setter through the holder loop to the final revert, where distribution aborts for all holders. That end-to-end trace, plus the reference to a previously judged issue of the same class, is what makes the case concrete for the program.
What happened, in plain words
Plume Network has a token contract called ArcToken. A token contract is a piece of software that lives on a blockchain and keeps track of who owns how much of a digital asset. This particular token also hands out "yield": a share of earnings that is paid out to the people who hold the token, a bit like a savings account paying interest to everyone who keeps money in it.
The part of the contract that pays out yield is a function called distributeYield. A function is a named block of code that does one job; you can think of it as a button you press. When distributeYield runs, it goes through the list of token holders one by one. For each holder it asks a question: is this person allowed to receive yield? Some holders may be restricted, so the contract skips them. For everyone else it adds their balance to a running total, and that total is used to work out how much yield each person gets.
The question "is this holder allowed?" is answered by another function, _isYieldAllowed. That function checks two things: a module specific to the situation, and a global module. A module here is just another contract that holds a rule. The address of the global module is looked up from a third contract called a router. A router is a directory: you ask it for an address and it tells you where something lives.
The global module is supposed to be a contract that implements a particular interface. An interface is a published list of functions a contract promises to have, like a menu in a restaurant. The interface here is called IYieldRestrictions, and its menu includes a function isYieldAllowed(address) that answers yes or no for a given account.
The bug report is about what happens when the contract stored as the global module does not have that function on its menu. The developer clearly thought about this case: the call is wrapped in a try/catch. In programming, try/catch means "try this risky thing, and if it fails, run this other code instead of crashing". The comments in the code say the intention was: if the call fails or the function is not implemented, assume the account is allowed.
But that intention does not hold. When a contract is asked for a function it does not have, the failure happens so early that Solidity (the programming language this contract is written in) does not treat it as a catchable error. The whole transaction reverts. A revert is a blockchain term for "undo everything and report failure". So instead of skipping the broken check, the entire yield distribution stops, and nobody gets paid until an administrator fixes the global module.
This is a configuration problem rather than an attack that anyone off the street can trigger: it needs an admin to point the router at the wrong contract. The report classifies it as an insight, meaning a design observation rather than a demonstrated theft.
The pieces involved
Before walking through the steps, it helps to know who and what is in the picture.
- An admin. A privileged user who can change settings. Here the admin can call
router.updateGlobalModuleImplementation(GLOBAL_SANCTIONS_TYPE, ...)to set which contract acts as the global module for a restriction type calledGLOBAL_SANCTIONS_TYPE. - The router. A contract, accessed through the
IRestrictionsRouterinterface, that stores the global module address and hands it back when asked. - The
ArcTokencontract, atarc/src/ArcToken.sol. It keeps the list of holders and contains thedistributeYieldand_isYieldAllowedlogic. - The global module contract. The contract that is supposed to implement
IYieldRestrictionsand answer the allow/deny question.
The precondition for the bug is a misconfiguration: the address the router returns for GLOBAL_SANCTIONS_TYPE belongs to a contract that does not implement isYieldAllowed. No special tools are needed to see the problem; it follows from how Solidity sends calls between contracts and how try/catch behaves around them.
How the researcher found it
The researcher read _isYieldAllowed and looked at how it deals with a global module that fails or does not conform. The external call is wrapped in try/catch, and the comments spell out the intent:
address globalYieldModule = IRestrictionsRouter(routerAddr).getGlobalModuleAddress(RestrictionTypes.GLOBAL_SANCTIONS_TYPE);
if (globalYieldModule != address(0)) {
try IYieldRestrictions(globalYieldModule).isYieldAllowed(account) returns (bool globalAllowed) {
allowed = allowed && globalAllowed;
} catch {
// If global module doesn't implement IYieldRestrictions or call fails, treat as restricted?
// Or handle based on specific global module design.
// Current: Assume allowed if call fails/not implemented (less restrictive).
}
}
Line by line:
address globalYieldModule = IRestrictionsRouter(routerAddr).getGlobalModuleAddress(...)asks the router for the address of the global module for the sanctions restriction type, and stores it in a variable.if (globalYieldModule != address(0))checks that the address is not the empty address.address(0)is the blockchain equivalent of a blank field; calling it would go nowhere, so the code skips the call in that case.try IYieldRestrictions(globalYieldModule).isYieldAllowed(account) returns (bool globalAllowed)attempts to callisYieldAllowedon that module, treating it as if it follows theIYieldRestrictionsmenu, and expects a true/false answer.allowed = allowed && globalAllowed;combines the earlier decision with the global module's answer.&&means "and": the holder is allowed only if both checks say yes.catch { ... }is the fallback that runs if the call fails. The comments inside say the current behaviour is to assume the account is allowed, which is the less restrictive choice.
The comments are what make the code look wrong. They claim that a failed or unimplemented call will land in the catch block. But a try/catch around an external call does not protect against every kind of failure, and a function selector mismatch is one of the cases it does not cover. A function selector is the short identifier a contract uses to say which function it wants; if the target has no function with that identifier, the call cannot even be routed. The researcher recognised this as the same class of issue as a previously reported finding in another audit, the Teller Finance judging issue linked in the report.
Walking through the failure
Step 1: Admin sets a wrong contract as global yield module
The admin calls:
router.updateGlobalModuleImplementation(GLOBAL_SANCTIONS_TYPE, wrongContract)
Here wrongContract is a contract that does not implement isYieldAllowed(). From this point on, the router returns that address as the global module for GLOBAL_SANCTIONS_TYPE. The step exists to create the precondition: a configuration that looks plausible but points at a contract with the wrong menu.
Step 2: Call distributeYield()
distributeYield() is invoked to pay yield to token holders. Execution walks through the holders:
for (uint256 i = 0; i < holderCount; i++) {
address holder = $.holders.at(i);
if (_isYieldAllowed(holder)) {
effectiveTotalSupply += balanceOf(holder);
}
}
Line by line:
for (uint256 i = 0; i < holderCount; i++)is a loop that runs once per holder, counting from zero up to the number of holders.address holder = $.holders.at(i);picks the holder at positionifrom the stored list.if (_isYieldAllowed(holder))asks whether that holder may receive yield.effectiveTotalSupply += balanceOf(holder);if the answer is yes, adds that holder's balance to the running total.
Every pass through the loop calls _isYieldAllowed, so the global module check is reached on the very first holder processed.
Step 3: First call to _isYieldAllowed reaches the global module check
The attempted call is:
address globalYieldModule = IRestrictionsRouter(routerAddr).getGlobalModuleAddress(RestrictionTypes.GLOBAL_SANCTIONS_TYPE);
if (globalYieldModule != address(0)) {
try IYieldRestrictions(globalYieldModule).isYieldAllowed(account) returns (bool globalAllowed) {
allowed = allowed && globalAllowed;
} catch {
// Intended fallback if call fails/not implemented
}
}
This is the same code as before, now reached during a real distribution. The router returns wrongContract, the address is not zero, so the code tries to call isYieldAllowed on it. Because wrongContract lacks the isYieldAllowed selector, the call cannot be dispatched: the target has no entry for that function.
Step 4: Call fails with function-not-found error that bypasses try/catch
Solidity's try/catch does not handle function selector mismatches in this context. The external call reverts before the catch block runs, so the intended fallback (assume allowed) never executes. The step matters because it is the heart of the bug: the developer's safety net has a hole exactly where they expected it to work.
Step 5: Entire distributeYield transaction reverts
The revert stops the whole distributeYield execution and no yield is distributed to any holders. Distribution attempts continue to fail until the global module is fixed or removed. Because the failing check sits inside the holder loop, one bad check is enough to abort the payment for everyone, not just for one account.
Root cause
The mistake is a mismatch between what the developer intended and what Solidity's try/catch actually does. The catch block was written to absorb a failed or unimplemented call, but a call to a contract that does not expose the expected function selector fails at dispatch time, before the call can return a value or a catchable error to the caller. The try/catch therefore does not intercept it, and the revert travels up through _isYieldAllowed into distributeYield.
The try/catch does not cover a selector mismatch on the target contract, so the revert travels up into distributeYield. They do not cover a selector mismatch on the target contract.
Impact
While the misconfigured global module remains set, yield is not distributed to any holders. The report frames this as potential loss or theft of unclaimed yield, or as a denial of yield distribution. The condition is administrative: it requires the router to point GLOBAL_SANCTIONS_TYPE at a contract that does not implement isYieldAllowed. Distribution resumes once the global module is fixed or removed.
Fix
The report does not describe a fix that was applied. The behaviour it asks for is the one the comments already describe: a failed or unimplemented global module call should not abort distribution. A robust approach is to avoid relying on try/catch for interface conformance, for example by checking that the configured module actually supports the expected interface before calling it, or by performing the call in a way that treats a dispatch failure as the documented fallback rather than as a fatal error.
Variants to test
- Other restriction modules: check whether
specificYieldModuleis called with the sametry/catchpattern. If it is, a misconfigured specific module produces the same abort. A positive result is a distribution path that reverts when the specific module lacks the expected selector. - Other interface calls behind
try/catch: search the codebase fortry I...(...)patterns where the target address comes from configuration. A positive result is any such call where the configured contract can be a non-conforming implementation and the surrounding logic assumes the catch block will run. - Proxy and upgrade paths: if the module address can point at a proxy whose implementation changes, test what happens when the implementation is swapped for one without
isYieldAllowed. A positive result is a distribution or accounting function that reverts after the upgrade. - Zero-address and EOA modules: the code guards against
address(0), but an EOA or a contract with a fallback function may behave differently from a contract with no matching selector. A positive result is a call that succeeds unexpectedly and returns data the caller misinterprets.
Hunting notes
This kind of bug hides wherever configuration-supplied addresses are called through an interface and the result is wrapped in try/catch with a fallback comment. During review, look for router lookups such as getGlobalModuleAddress, registry patterns, and any place where an admin can set an implementation address. The signal is a comment that says "if the call fails, assume X": that comment is a claim about try/catch behaviour, and it is worth checking whether the failure mode it describes is actually catchable.
The report walks the path from the admin setter through the holder loop to the final revert, where distribution aborts for all holders. That end-to-end trace, plus the reference to a previously judged issue of the same class, is what makes the case concrete for the program.
Glossary
- Blockchain: a shared, tamper-resistant record of transactions kept by many computers at once.
- Smart contract: a program that lives on a blockchain and runs automatically when called.
- Token contract: a smart contract that records who owns how much of a digital asset.
- Yield: earnings paid out to people who hold a token, similar to interest on savings.
- Function: a named block of code that performs one job and can be called by other code.
- Transaction: a single action sent to a blockchain, such as calling a function; it either completes fully or is undone.
- Revert: the blockchain's way of undoing a transaction and reporting that it failed.
- Module: a separate contract that holds a rule or piece of logic used by another contract.
- Router: a contract that acts as a directory, storing and returning addresses of other contracts.
- Interface: a published list of functions a contract promises to provide, like a menu.
- Function selector: the short identifier used to say which function of a contract is being called.
- Selector mismatch: when the function being asked for does not exist on the target contract, so the call cannot be routed.
try/catch: a programming construct that attempts a risky operation and runs alternative code if it fails.- Solidity: the programming language used to write smart contracts on Ethereum-style blockchains.
- External call: a call from one contract to another contract.
- Dispatch: the moment a call is routed to the right function on the target contract.
address(0): the empty address, used as a placeholder meaning "no contract here".- EOA: an externally owned account, a normal wallet controlled by a person rather than a contract.
- Fallback function: a special function a contract can have to handle calls that do not match any of its named functions.
- Proxy: a contract that forwards calls to another contract whose code can be swapped later.
- Admin: a privileged user allowed to change settings in a system.
- Misconfiguration: a setting that is wrong, even though nothing malicious was done.
- Denial of service: preventing a system from doing its normal job, here blocking yield distribution.
- Insight: a report category for a design observation rather than a demonstrated exploit.