Skip to content
Business logic Audit finding Intermediate

Missing Pause Controls, ETH Refund Flaws, and Miscalculated Shares Enable Fund Loss and Protocol Inconsistency in depositAndBridge

The contract inherits Pausable but lacks pause/unpause functions, so the owner can never halt deposits during an incident. It also resets lastSender to address(0) before a possible ETH refund, so overpaid ETH sent back to the proxy reverts and is trapped, and it emits fee-ignorant share amounts in Deposit events.

Plume Network

Originally disclosed on Immunefi

50040 sc low missing pause controls eth refund flaws and miscalculated shares enable fund loss and protocol inconsistency in depositandbridge

Impacts

  • Permanent freezing of funds

Description

Brief/Intro

The TellerWithMultiAssetSupportPredicateProxy contract contains vulnerabilities that compromise fund safety, emergency response capabilities, and protocol integrity. If exploited, these issues can lead to permanent loss of user/contract funds, broken emergency shutdowns, and inconsistent protocol accounting.

Vulnerability Details

Broken Pause Mechanism (Critical)

  1. Issue: The contract inherits Pausable but lacks pause()/unpause() functions.
  2. Technical Insight:
  • The paused() checks in deposit/depositAndBridge are functional, but without external pause/unpause calls (enforceable only by owner), the contract can never be paused.
  • Inheriting Pausable alone is insufficient; the OpenZeppelin design requires explicit pause control functions.
  1. Code Proof:
Solidity
contract TellerWithMultiAssetSupportPredicateProxy is ... Pausable { 
    // Missing: pause()/unpause() functions
    function deposit(...) {
        if (paused()) revert ...; // Always false
    }
}

ETH Trapping Vulnerability (Critical)

  1. Issue: ETH refunds fail after depositAndBridge, causing permanent fund loss.
  2. Technical Insight:
  • lastSender is reset to address(0) after teller.depositAndBridge completes.
  • If the teller (or bridge) refunds excess ETH after this reset (e.g., for overpaid fees), the receive() function attempts to forward ETH to address(0), which reverts and traps funds.
  1. Code Proof:
Solidity
function depositAndBridge(...) payable {
    lastSender = msg.sender; // Set temporarily
    teller.depositAndBridge{value: msg.value}(...); // Refunds might occur AFTER this
    lastSender = address(0); // Reset too early
}
receive() external payable {
    (bool success,) = lastSender.call{value: msg.value}(""); // Fails if lastSender=0
}

Share Calculation Mismatch (Major)

  1. Issue: depositAndBridge miscalculates shares in Deposit events, breaking fee-aware accounting.
  2. Technical Insight:
  • deposit uses actual shares minted (shares = teller.deposit(...)), which deducts fees.
  • depositAndBridge uses a raw quote (shares = depositAmount.mulDivDown(...)) that ignores fees.
  • This creates inconsistent event data, misleading off-chain systems about user balances.
  1. Code Proof:
Solidity
// deposit (correct):
shares = teller.deposit(...); // Fee-aware
emit Deposit(..., shares); // Accurate

// depositAndBridge (incorrect):
teller.depositAndBridge(...); // Shares minted internally (with fees)
uint256 shares = depositAmount.mulDivDown(...); // Fee-ignorant calculation
emit Deposit(..., shares); // Inaccurate

Impact Details

  1. Fund Loss Scenarios:
  • Stuck ETH: Users overpaying bridge fees lose refunds permanently (trapped in contract).
  • Token Lockup: No rescue mechanism for accidentally sent ERC20 tokens.
  1. Operational Risks:
  • No Emergency Pause: Attackers exploit vulnerabilities unhindered during crises.
  • Accounting Corruption: Fee discrepancies in events break integrations (e.g., tax/reporting systems).
  1. Quantifiable Losses:
  • Direct: 100% of overpaid ETH fees + any non-standard tokens sent to contract.
  • Indirect: Protocol insolvency risk due to inconsistent state and loss of user trust.

References

Proof of Concept

{% stepper %} {% step %}

Broken Pause Mechanism — Steps to Trigger

  1. An attacker discovers a vulnerability in the deposit logic that allows fund theft.
  2. Users continue depositing funds through deposit/depositAndBridge since:
    • paused() always returns false (unpaused state)
    • Owner cannot activate pause as pause() function doesn't exist
  3. Attacker exploits vulnerability and drains user funds.

Result:

  • All deposits are vulnerable during the attack window with no emergency mitigation. {% endstep %}

{% step %}

ETH Trapping Vulnerability — Steps to Trigger

  1. User calls depositAndBridge with excess ETH (example: 1 ETH for 0.9 ETH bridge fee):
Solidity
depositAndBridge{value: 1 ether}(...)
  1. During execution:
  • lastSender = msg.sender (set to user address)
  • teller.depositAndBridge consumes 0.9 ETH
  • lastSender = address(0) (reset after call)
  1. Teller contract refunds 0.1 ETH to proxy:
Solidity
payable(proxy).transfer(0.1 ether);
  1. Proxy's receive() triggers and attempts:
Solidity
(bool success,) = address(0).call{value: 0.1 ether}("");
  1. Call to address(0) reverts → 0.1 ETH permanently locked in proxy.

Result:

  • 100% of overpaid ETH is irrecoverable. {% endstep %}

{% step %}

Share Calculation Mismatch — Steps to Trigger

  1. Teller applies a 1% deposit fee in depositAndBridge.
  2. User deposits 100 USDC (price: 1 USDC = 1 share):
    • Actual shares minted: 99 (after 1% fee)
  3. Proxy calculates shares incorrectly:
Solidity
shares = 100 USDC * (10**18 / 1e6) / 1e18 = 100 shares
  1. Proxy emits event with 100 shares (vs actual 99 shares).

Result:

  • Off-chain monitors see inconsistent share balances (100 vs 99).
  • Protocol appears to steal 1 share from user in analytics. {% endstep %}

{% step %}

Unsafe Allowance Handling — Steps to Trigger

  1. User deposits 100 USDC via deposit:
Solidity
depositAsset.safeApprove(vault, 100 USDC);
  1. Later, same user deposits 50 USDC:
  • Proxy tries: safeApprove(vault, 50 USDC)
  • Reverts because existing allowance (100 USDC) ≠ 0.

Result:

  • Subsequent deposits fail for any token with a prior non-zero approval. {% endstep %}

{% step %}

Missing Rescue Functions — Steps to Trigger

  1. User accidentally transfers 1000 USDC to proxy:
Solidity
USDC.transfer(proxyAddress, 1000e6);
  1. Proxy has no rescueTokens function.
  2. Owner cannot recover funds → 1000 USDC permanently locked.

Result:

  • Any non-standard asset transfer causes permanent loss. {% endstep %} {% endstepper %}

Summary of Exploit Paths

Vulnerability Trigger Action Consequence
Broken Pause Exploit during attack No emergency shutdown
ETH Trapping Overpay bridge fee ETH permanently stuck
Share Mismatch Use depositAndBridge Incorrect event emissions
Allowance Bug Second deposit with same asset Deposit reverts
No Rescue Accidental token transfer Funds permanently locked

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

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 6 min read.

Context

The target is TellerWithMultiAssetSupportPredicateProxy.sol, a contract in the Nucleus Boring Vault repository used for the Plume Network attackathon. The contract sits in front of a teller and exposes deposit functionality, including a depositAndBridge path that forwards value to the teller's depositAndBridge. It inherits OpenZeppelin's Pausable and implements a payable receive() that forwards incoming ETH to the last recorded sender.

The report describes five separate issues in this contract: a pause mechanism that cannot be triggered, ETH refunds that get trapped, share amounts in Deposit events that do not match what was actually minted, unsafe allowance handling, and the absence of rescue functions. The stated impact category is permanent freezing of funds, and the report is rated Low.

Setup

No accounts, roles, tooling or versions are given beyond the contract itself and the libraries it references. The report links the OpenZeppelin Pausable documentation and Solmate's SafeTransferLib.

  1. Users call deposit or depositAndBridge on the proxy, which forwards to the teller.

Finding it

The report describes the following observations about the proxy contract: Three observations stood out:

  1. The contract inherits Pausable, and deposit/depositAndBridge check paused(), but no pause() or unpause() function exists on the contract. The check is therefore always false.
  2. depositAndBridge sets lastSender to msg.sender, calls the teller, then resets lastSender to address(0). Any ETH the teller refunds after that reset arrives at receive(), which forwards to lastSender, now the zero address.
  3. deposit records the shares actually returned by the teller, while depositAndBridge recomputes shares from the deposit amount with mulDivDown, ignoring fees.

Two further issues are described in the proof of concept: repeated safeApprove calls on the same asset, and the lack of any token rescue function.

Exploitation

Broken pause mechanism

  1. An attacker discovers a vulnerability in the deposit logic that allows fund theft.
  2. Users continue depositing through deposit/depositAndBridge because paused() always returns false and the owner cannot activate a pause, since no pause() function exists.
  3. The attacker exploits the vulnerability and drains user funds.

The consequence is that all deposits remain open during the attack window, with no emergency mitigation available to the owner.

ETH trapping

  1. The user calls depositAndBridge with excess ETH, for example 1 ETH against a 0.9 ETH bridge fee:
Solidity
depositAndBridge{value: 1 ether}(...)
  1. During execution, lastSender is set to the user, the teller consumes 0.9 ETH, and lastSender is reset to address(0) after the call.
  2. The teller refunds 0.1 ETH to the proxy:
Solidity
payable(proxy).transfer(0.1 ether);
  1. The proxy's receive() runs and attempts:
Solidity
(bool success,) = address(0).call{value: 0.1 ether}("");
  1. The call to address(0) reverts, and the 0.1 ETH stays locked in the proxy.

The report lists 100% of overpaid ETH fees as a direct loss.

Share calculation mismatch

  1. The teller applies a 1% deposit fee in depositAndBridge.
  2. A user deposits 100 USDC, with a price of 1 USDC per share. The actual shares minted are 99 after the fee.
  3. The proxy computes shares itself:
Solidity
shares = 100 USDC * (10**18 / 1e6) / 1e18 = 100 shares
  1. The proxy emits an event with 100 shares against the 99 actually minted.

Off-chain monitors then see inconsistent share balances, and the protocol appears in analytics to take one share from the user.

Unsafe allowance handling

  1. A user deposits 100 USDC through deposit:
Solidity
depositAsset.safeApprove(vault, 100 USDC);
  1. The same user later deposits 50 USDC. The proxy attempts safeApprove(vault, 50 USDC), which reverts because the existing allowance of 100 USDC is not zero.

The result is that subsequent deposits fail for any token that carries a prior non-zero approval.

Missing rescue functions

  1. A user accidentally transfers 1000 USDC to the proxy:
Solidity
USDC.transfer(proxyAddress, 1000e6);
  1. The proxy has no rescueTokens function.
  2. The owner cannot recover the funds, so the 1000 USDC stays locked.

Summary of exploit paths

Vulnerability Trigger action Consequence
Broken pause Exploit during attack No emergency shutdown
ETH trapping Overpay bridge fee ETH permanently stuck
Share mismatch Use depositAndBridge Incorrect event emissions
Allowance bug Second deposit with same asset Deposit reverts
No rescue Accidental token transfer Funds permanently locked

Root cause

The pause issue is a design omission: inheriting Pausable provides the paused() state and modifier, but the OpenZeppelin design requires explicit pause() and unpause() functions, normally restricted to the owner. Without them the state can never change, so the guard in deposit and depositAndBridge is dead code.

The ETH trapping issue comes from the ordering in depositAndBridge: lastSender is cleared immediately after the teller call returns, but refunds can arrive afterwards. The receive() function trusts lastSender unconditionally and forwards to it, so a zero value causes a revert and the ETH remains in the contract.

The share mismatch comes from computing shares twice with different methods. deposit uses the value returned by the teller, which is fee-aware, while depositAndBridge recomputes with depositAmount.mulDivDown(...), which ignores fees. The event therefore does not reflect the minted amount.

The allowance issue is the known safeApprove restriction: approval must be reset to zero before a new non-zero value is set. The proxy does not clear the previous allowance before approving again.

Finally, the contract has no rescue path for tokens sent to it by mistake, so any such transfer is permanent.

Impact

The report lists the following consequences:

  1. Stuck ETH: users who overpay bridge fees lose their refunds permanently, with the ETH trapped in the contract.
  2. Token lockup: there is no rescue mechanism for accidentally sent ERC20 tokens.
  3. No emergency pause: attackers can exploit vulnerabilities unhindered during a crisis.
  4. Accounting corruption: fee discrepancies in events break integrations such as tax and reporting systems.

Quantified in the report, direct losses are 100% of overpaid ETH fees plus any non-standard tokens sent to the contract. Indirect risk is described as protocol insolvency due to inconsistent state and loss of user trust. The report rates the overall severity Low and the impact category permanent freezing of funds.

Fix

The report does not describe any fix that was applied. The changes it implies are: add owner-restricted pause() and unpause() functions, keep lastSender valid until refunds can no longer arrive or handle the zero address in receive(), use the teller's returned share amount in depositAndBridge events, reset allowances to zero before re-approving, and add a rescue function for tokens sent to the contract.

Variants to test

  1. Other contracts inheriting Pausable without exposing pause functions. A positive result is a paused() check in a state-changing function with no reachable way to set the flag.
  2. Other payable proxies that record a sender for refunds and clear it before the downstream call can refund. A positive result is a refund path that reaches a receive() forwarding to a cleared or zero address.
  3. Other functions that emit events using locally recomputed amounts rather than the value returned by the downstream contract. A positive result is an event amount that differs from the minted amount whenever a fee applies.
  4. Other contracts calling safeApprove on a token that already has a non-zero allowance. A positive result is a revert on the second deposit with the same asset.
  5. Other contracts holding user funds with no rescue function. A positive result is a direct token transfer to the contract that no role can reverse.

Hunting notes

This class of bug hides in proxy and wrapper contracts that sit between users and a core protocol: they often duplicate logic from the contract they wrap, and the duplicate drifts. Signals during review are inherited mixins whose functions are never exposed, payable receive() functions that forward to a stored address, event emissions computed separately from the call that performs the action, and safeApprove calls without a preceding zero approval.

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 14 min read.

What happened, in plain words

A security researcher looked at a smart contract called TellerWithMultiAssetSupportPredicateProxy.sol, which is part of a project called Nucleus Boring Vault, used in the Plume Network attackathon. A smart contract is a small program that lives on a blockchain: it runs automatically, holds money (cryptocurrency and tokens), and nobody can change it after it is deployed unless the code itself allows it.

This particular contract is a middleman. Users send it money or tokens, and it passes them on to another contract called the teller, which does the real work of accepting deposits and, in one path, calling the bridge. A bridge is a service that moves assets from one blockchain to another.

The researcher found five separate problems in this middleman contract:

  1. A pause button that does not exist, so the owner can never stop the contract in an emergency.
  2. A refund path that sends ETH (the cryptocurrency of the Ethereum network) to the wrong address, so overpaid fees get stuck forever.
  3. A share count written into the contract's public records that does not match the number of shares actually created.
  4. An approval step that fails the second time a user deposits the same token.
  5. No way to recover tokens that someone sends to the contract by mistake.

The report is rated Low severity, and the impact category it lists is permanent freezing of funds. That means money ends up locked in the contract with no way to get it out.

The contract and the setup

The target is one file in the repository:

Text
https://github.com/immunefi-team/attackathon-plume-network-nucleus-boring-vault/blob/main/src/base/Roles/TellerWithMultiAssetSupportPredicateProxy.sol

This is a link to the source code on GitHub, a website where code is stored and shared. The file name is long, so let us break it down. "Teller" is the contract that actually handles deposits. "MultiAsset" means it deals with more than one kind of token. "PredicateProxy" means this contract stands in front of the teller and passes requests to it. A proxy is like a receptionist: visitors talk to the receptionist, who forwards them to the right office.

The contract inherits from OpenZeppelin's Pausable. OpenZeppelin is a well-known library of ready-made contract building blocks, and Pausable is the block that provides a pause switch. "Inherits" means the contract takes that block and builds on top of it, the way a recipe can start from a basic dough and add its own ingredients.

The contract also has a payable receive() function. "Payable" means the function is allowed to accept ETH. receive() is a special function that runs automatically whenever someone sends ETH to the contract without calling any other function. Think of it as a letterbox: anything dropped through it triggers the same routine.

The report describes five issues: a pause mechanism that cannot be triggered, ETH refunds that get trapped, share amounts in Deposit events that do not match what was actually created, unsafe allowance handling, and the absence of rescue functions.

No accounts, roles, tooling or software versions are given beyond the contract itself and the libraries it references. The report links the OpenZeppelin Pausable documentation and Solmate's SafeTransferLib, a library of safe token-transfer helpers.

  1. Users call deposit or depositAndBridge on the proxy, which forwards to the teller.

Finding it

The report describes the following observations about the proxy contract: Three observations stood out:

  1. The contract inherits Pausable, and deposit/depositAndBridge check paused(), but no pause() or unpause() function exists on the contract. The check is therefore always false. It is like a shop with a "closed" sign that nobody is able to turn around.
  2. depositAndBridge sets lastSender to msg.sender (the person calling), calls the teller, then resets lastSender to address(0). address(0) is the zero address, a special value that means "nobody". Any ETH the teller refunds after that reset arrives at receive(), which forwards to lastSender, now the zero address.
  3. deposit records the shares actually returned by the teller, while depositAndBridge recomputes shares from the deposit amount with mulDivDown, ignoring fees. A share is a unit of ownership in the vault, like a slice of a cake: the more slices you hold, the bigger your portion.

Two further issues are described in the proof of concept: repeated safeApprove calls on the same asset, and the lack of any token rescue function. safeApprove is a helper that grants another contract permission to spend your tokens, similar to giving someone a limited power of attorney over your bank account.

Exploitation

Broken pause mechanism

A pause mechanism is an emergency stop. If something goes wrong, the owner flips a switch and deposits stop being accepted while the problem is fixed. Here the switch does not exist.

  1. An attacker discovers a vulnerability in the deposit logic that allows fund theft.
  2. Users continue depositing through deposit/depositAndBridge because paused() always returns false and the owner cannot activate a pause, since no pause() function exists.
  3. The attacker exploits the vulnerability and drains user funds.

The consequence is that all deposits remain open during the attack window, with no emergency mitigation available to the owner. The report labels this issue Critical inside its own text, even though the overall report is rated Low.

The code proof in the report looks like this:

Solidity
contract TellerWithMultiAssetSupportPredicateProxy is ... Pausable {
    // Missing: pause()/unpause() functions
    function deposit(...) {
        if (paused()) revert ...; // Always false
    }
}

Line by line:

  • contract TellerWithMultiAssetSupportPredicateProxy is ... Pausable { declares the contract and says it inherits from Pausable. The ... stands for other inherited pieces the report does not spell out.
  • // Missing: pause()/unpause() functions is a comment noting that the two functions that would flip the switch are simply absent.
  • function deposit(...) { starts the deposit function; the ... stands for parameters the report leaves out.
  • if (paused()) revert ...; checks whether the contract is paused and, if so, cancels the transaction. revert means "undo everything and return the money".
  • // Always false is the researcher's note: since nothing can ever set the paused state, this check never fires.
  • The closing brace ends the function and the contract.

ETH trapping

ETH is the native cryptocurrency of Ethereum. When a user sends more ETH than needed, the extra is normally refunded. Here the refund goes to the wrong place.

  1. The user calls depositAndBridge with excess ETH, for example 1 ETH against a 0.9 ETH bridge fee:
Solidity
depositAndBridge{value: 1 ether}(...)

This line calls the function and attaches 1 ETH to the call. {value: 1 ether} is how Solidity, the language of these contracts, attaches money to a function call. 1 ether here means one whole ETH. The (...) stands for arguments the report does not show.

  1. During execution, lastSender is set to the user, the teller consumes 0.9 ETH, and lastSender is reset to address(0) after the call.
  2. The teller refunds 0.1 ETH to the proxy:
Solidity
payable(proxy).transfer(0.1 ether);

payable(proxy) treats the proxy's address as able to receive ETH. .transfer(0.1 ether) sends 0.1 ETH to it. Because the proxy has a receive() function, that function runs automatically on arrival.

  1. The proxy's receive() runs and attempts:
Solidity
(bool success,) = address(0).call{value: 0.1 ether}("");

address(0) is the zero address, meaning nobody. .call{value: 0.1 ether}("") tries to send 0.1 ETH to that address with no data attached. (bool success,) captures whether the call worked; the empty slot after the comma ignores a second return value. Sending money to the zero address is not allowed, so the call fails.

  1. The call to address(0) reverts, and the 0.1 ETH stays locked in the proxy.

The report lists 100% of overpaid ETH fees as a direct loss. The underlying code the report quotes for the ordering is:

Solidity
function depositAndBridge(...) payable {
    lastSender = msg.sender; // Set temporarily
    teller.depositAndBridge{value: msg.value}(...); // Refunds might occur AFTER this
    lastSender = address(0); // Reset too early
}
receive() external payable {
    (bool success,) = lastSender.call{value: msg.value}(""); // Fails if lastSender=0
}

Line by line:

  • function depositAndBridge(...) payable { declares the function, marks it able to receive ETH, and leaves the parameters out.
  • lastSender = msg.sender; remembers who called. msg.sender is the caller's address.
  • teller.depositAndBridge{value: msg.value}(...); forwards the call to the teller, passing along all the ETH that came with the call. msg.value is the amount attached.
  • lastSender = address(0); forgets the caller immediately after the teller call returns.
  • receive() external payable { is the automatic function that runs when ETH arrives.
  • (bool success,) = lastSender.call{value: msg.value}(""); tries to forward the incoming ETH to the remembered sender. msg.value here is the amount that just arrived.
  • // Fails if lastSender=0 notes that once the sender has been forgotten, this forwarding goes to the zero address and fails.

Share calculation mismatch

An event is a public note a contract writes to the blockchain so that outside software can see what happened. Off-chain systems, meaning programs that run outside the blockchain, read these notes to track balances.

  1. The teller applies a 1% deposit fee in depositAndBridge.
  2. A user deposits 100 USDC, with a price of 1 USDC per share. USDC is a stablecoin, a token designed to stay worth one US dollar. The actual shares created are 99 after the fee.
  3. The proxy computes shares itself:
Solidity
shares = 100 USDC * (10**18 / 1e6) / 1e18 = 100 shares

This line scales the amount to the token's decimals and back. 10**18 is one followed by eighteen zeros, the number of decimal places many tokens use. 1e6 is one million, the number of decimal places USDC uses. The arithmetic cancels out and leaves 100, ignoring the fee.

  1. The proxy emits an event with 100 shares against the 99 actually created.

Off-chain monitors then see inconsistent share balances, and the protocol appears in analytics to take one share from the user. The report's code proof contrasts the two paths:

Solidity
// deposit (correct):
shares = teller.deposit(...); // Fee-aware
emit Deposit(..., shares); // Accurate

// depositAndBridge (incorrect):
teller.depositAndBridge(...); // Shares minted internally (with fees)
uint256 shares = depositAmount.mulDivDown(...); // Fee-ignorant calculation
emit Deposit(..., shares); // Inaccurate

Line by line:

  • shares = teller.deposit(...); takes the number of shares the teller reports back, which already accounts for fees.
  • emit Deposit(..., shares); writes that accurate number into the public event.
  • teller.depositAndBridge(...); performs the bridge deposit, and the teller creates shares internally with fees applied.
  • uint256 shares = depositAmount.mulDivDown(...); recalculates shares from the deposit amount alone. mulDivDown multiplies then divides and rounds down. It has no knowledge of fees.
  • emit Deposit(..., shares); writes the wrong number into the event.

Unsafe allowance handling

An allowance is a permission you grant to a contract to spend a set amount of your tokens. safeApprove is the helper that grants it. Some tokens refuse to change a permission from one non-zero amount straight to another; the old permission must first be set to zero. This is a known restriction of the safeApprove pattern.

  1. A user deposits 100 USDC through deposit:
Solidity
depositAsset.safeApprove(vault, 100 USDC);

depositAsset is the token being deposited. safeApprove(vault, 100 USDC) grants the vault permission to spend 100 USDC.

  1. The same user later deposits 50 USDC. The proxy attempts safeApprove(vault, 50 USDC), which reverts because the existing allowance of 100 USDC is not zero.

The result is that subsequent deposits fail for any token that carries a prior non-zero approval.

Missing rescue functions

A rescue function is an owner-only tool that sweeps tokens accidentally sent to a contract back out again.

  1. A user accidentally transfers 1000 USDC to the proxy:
Solidity
USDC.transfer(proxyAddress, 1000e6);

USDC.transfer sends tokens. proxyAddress is the proxy's address. 1000e6 is 1000 with six decimal places, which is how USDC amounts are written.

  1. The proxy has no rescueTokens function.
  2. The owner cannot recover the funds, so the 1000 USDC stays locked.

Summary of exploit paths

Vulnerability Trigger action Consequence
Broken pause Exploit during attack No emergency shutdown
ETH trapping Overpay bridge fee ETH permanently stuck
Share mismatch Use depositAndBridge Incorrect event emissions
Allowance bug Second deposit with same asset Deposit reverts
No rescue Accidental token transfer Funds permanently locked

Root cause

The pause issue is a design omission: inheriting Pausable provides the paused() state and modifier, but the OpenZeppelin design requires explicit pause() and unpause() functions, normally restricted to the owner. Without them the state can never change, so the guard in deposit and depositAndBridge is dead code, meaning code that runs but can never do anything useful.

The ETH trapping issue comes from the ordering in depositAndBridge: lastSender is cleared immediately after the teller call returns, but refunds can arrive afterwards. The receive() function trusts lastSender unconditionally and forwards to it, so a zero value causes a revert and the ETH remains in the contract.

The share mismatch comes from computing shares twice with different methods. deposit uses the value returned by the teller, which is fee-aware, while depositAndBridge recomputes with depositAmount.mulDivDown(...), which ignores fees. The event therefore does not reflect the created amount.

The allowance issue is the known safeApprove restriction: approval must be reset to zero before a new non-zero value is set. The proxy does not clear the previous allowance before approving again.

Finally, the contract has no rescue path for tokens sent to it by mistake, so any such transfer is permanent.

Impact

The report lists the following consequences:

  1. Stuck ETH: users who overpay bridge fees lose their refunds permanently, with the ETH trapped in the contract.
  2. Token lockup: there is no rescue mechanism for accidentally sent ERC20 tokens. ERC20 is the common standard for tokens on Ethereum-compatible networks.
  3. No emergency pause: attackers can exploit vulnerabilities unhindered during a crisis.
  4. Accounting corruption: fee discrepancies in events break integrations such as tax and reporting systems.

Quantified in the report, direct losses are 100% of overpaid ETH fees plus any non-standard tokens sent to the contract. Indirect risk is described as protocol insolvency due to inconsistent state and loss of user trust. The report rates the overall severity Low and the impact category permanent freezing of funds.

Fix

The report does not describe any fix that was applied. The changes it implies are: add owner-restricted pause() and unpause() functions, keep lastSender valid until refunds can no longer arrive or handle the zero address in receive(), use the teller's returned share amount in depositAndBridge events, reset allowances to zero before re-approving, and add a rescue function for tokens sent to the contract.

Variants to test

  1. Other contracts inheriting Pausable without exposing pause functions. A positive result is a paused() check in a state-changing function with no reachable way to set the flag.
  2. Other payable proxies that record a sender for refunds and clear it before the downstream call can refund. A positive result is a refund path that reaches a receive() forwarding to a cleared or zero address.
  3. Other functions that emit events using locally recomputed amounts rather than the value returned by the downstream contract. A positive result is an event amount that differs from the created amount whenever a fee applies.
  4. Other contracts calling safeApprove on a token that already has a non-zero allowance. A positive result is a revert on the second deposit with the same asset.
  5. Other contracts holding user funds with no rescue function. A positive result is a direct token transfer to the contract that no role can reverse.

Hunting notes

This class of bug hides in proxy and wrapper contracts that sit between users and a core protocol: they often duplicate logic from the contract they wrap, and the duplicate drifts. Signals during review are inherited mixins whose functions are never exposed, payable receive() functions that forward to a stored address, event emissions computed separately from the call that performs the action, and safeApprove calls without a preceding zero approval.

Glossary

  • Smart contract: a program stored on a blockchain that runs automatically and can hold funds.
  • Blockchain: a shared, tamper-resistant record of transactions maintained by many computers.
  • ETH: the native cryptocurrency of the Ethereum network.
  • USDC: a stablecoin token designed to stay worth one US dollar.
  • ERC20: the common standard that defines how tokens behave on Ethereum-compatible networks.
  • Token: a digital asset issued on a blockchain, usually following a standard such as ERC20.
  • Proxy: a contract that stands in front of another and forwards requests to it.
  • Teller: the contract that performs the actual deposit and bridge work in this system.
  • Bridge: a service that moves assets from one blockchain to another.
  • Vault: a contract that holds pooled assets and issues shares representing ownership.
  • Share: a unit of ownership in a vault; more shares mean a larger portion.
  • Inherit: to take on the code of another contract or library and build on top of it.
  • OpenZeppelin: a widely used library of ready-made smart contract components.
  • Pausable: an OpenZeppelin component that provides a pause switch and a paused() check.
  • Pause mechanism: an emergency stop that halts certain contract actions.
  • Payable: a function or address that is allowed to receive ETH.
  • receive(): a special function that runs automatically when ETH is sent to a contract.
  • msg.sender: the address of the account that called the current function.
  • msg.value: the amount of ETH attached to the current call.
  • address(0): the zero address, a special value meaning "nobody"; sending funds to it fails.
  • revert: to cancel a transaction and undo its effects, returning any funds.
  • Allowance: a permission granted to a contract to spend a set amount of your tokens.
  • safeApprove: a helper that grants a token allowance; some tokens require the old allowance to be zero first.
  • Rescue function: an owner-only tool to recover tokens accidentally sent to a contract.
  • Event: a public note a contract writes to the blockchain for outside software to read.
  • Off-chain: running outside the blockchain, as opposed to on it.
  • mulDivDown: an arithmetic helper that multiplies, divides and rounds down.
  • Dead code: code that exists but can never have any effect.
  • Severity: the rating of how serious a finding is.
  • Permanent freezing of funds: an impact category where money becomes locked with no way to recover it.
  • Protocol insolvency: a state where a protocol cannot cover what it owes.
  • Attackathon: a time-limited security competition where researchers review a project's code.

More from Plume Network

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.