Skip to content
Business logic Audit finding Intermediate

Deposit-and-Bridge Workflow Bricked by Immediate Share Lock: Users Cannot Bridge Immediately After Deposit

The deposit-and-bridge functions set a share lock on freshly minted shares before attempting the bridge transfer, so the transfer check always reverts. An attacker cannot exploit this to steal funds, but users cannot complete the combined deposit-and-bridge operation in one transaction.

farman1094 Follow

Originally disclosed on Immunefi

  • Disclosed after under an hour

53021 sc medium deposit and bridge workflow bricked by immediate share lock users cannot bridge immediately after deposit

Submitted on Aug 14th 2025 at 17:09:44 UTC by @farman1094 for Attackathon | Plume Network

Description

Brief/Intro

There is a critical logic flaw in all the depositAndBridge* functions of the TellerWithMultiAssetSupportPredicateProxy and DexAggregatorWrapperWithPredicateProxy contracts. When a user calls the deposit function, their newly minted shares are immediately locked by the share-lock mechanism, preventing their subsequent transfer. Later, when the bridge logic checks the lock time (via beforeTransfer), the check triggers and causes a revert — making it impossible to complete the deposit-and-bridge operation in a single transaction.

Vulnerability Details

The vulnerable code path is in DexAggregatorWrapperWithPredicateProxy.depositAndBridgeOneInch, which calls:

Solidity
teller.depositAndBridge{ value: msg.value - nativeValueToWrap }(
    supportedAsset, supportedAssetAmount, minimumMint, bridgeData
);

Internally, this runs _erc20Deposit to mint shares for the user, followed immediately by _afterPublicDeposit, which executes:

Solidity
shareUnlockTime[user] = block.timestamp + currentShareLockPeriod;

This lock is set before the bridge transfer is attempted. The bridge logic then calls beforeTransfer(from), which checks:

Solidity
if (shareUnlockTime[from] > block.timestamp) revert TellerWithMultiAssetSupport__SharesAreLocked();

Since the shares were just locked, the transfer will always revert, making it impossible to complete the deposit-and-bridge operation in a single transaction. This logic error effectively disables the combined deposit-and-bridge feature.

Impact Details

Users will be unable to use Deposit-and-Bridge flows that expect to mint shares and immediately bridge them in the same transaction, breaking a core workflow of the protocol. The contract does not lose funds, but the feature is unusable as designed.

Proof of Concept

{% stepper %} {% step %}

Step: User intends to deposit and bridge in one transaction

  • Alice calls TellerWithMultiAssetSupportPredicateProxy::depositAndBridge (or the dex wrapper variant) expecting:
    • Deposit accepted
    • Shares minted to Alice
    • Newly minted shares bridged immediately, completing a cross-chain transfer in a single transaction {% endstep %}

{% step %}

Deposit Phase

  • The wrapper calls teller.depositAndBridge.
  • Inside depositAndBridge:
    • _erc20Deposit mints shares to Alice.
    • _afterPublicDeposit is immediately called:
Solidity
shareUnlockTime[Alice] = block.timestamp + currentShareLockPeriod;
  • This sets a lock on Alice's shares, preventing their transfer until the lock period expires. {% endstep %}

{% step %}

Bridge Phase

  • The next step calls TellerWithMultiAssetSupport::bridge.
  • Inside bridge flow, beforeTransfer(Alice) is called:
Solidity
if (shareUnlockTime[Alice] > block.timestamp) revert TellerWithMultiAssetSupport__SharesAreLocked();
  • Because the lock was just set, this condition is true and the call reverts.
  • The entire transaction fails, so deposit-and-bridge cannot complete in one transaction. {% endstep %} {% endstepper %}

Conclusion

Immediate locking of freshly minted shares before the bridge transfer causes beforeTransfer to always revert, breaking the intended deposit-and-bridge workflow. The issue prevents the combined operation from being completed atomically; users cannot bridge immediately after deposit.

The original report as published on Immunefi, by farman1094. 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 deposit flow sets a share unlock time in the future before the bridge transfer is attempted, and the transfer check rejects any transfer while that unlock time is still ahead.

Impact

Users cannot use the deposit-and-bridge workflow in a single transaction, breaking a core feature, though no funds are lost.

What the attacker needed

None

The fix

The deposit-and-bridge path should avoid applying the share lock to shares that are bridged in the same transaction, for example by skipping the lock update or clearing it before the bridge transfer.

How it was found

  1. Alice calls depositAndBridge expecting to deposit, receive shares, and bridge them in one transaction.
  2. The deposit mints shares to Alice and immediately sets a share unlock time in the future.
  3. The bridge step calls beforeTransfer, which sees the future unlock time and reverts.
  4. The whole transaction fails, so deposit-and-bridge cannot complete.

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.

When you deposit money into this contract, you receive 'shares' that represent your stake. The contract has a rule that new shares are locked for a while so they cannot be moved immediately. The deposit-and-bridge feature tries to move those shares to another chain right after creating them, but the lock rule blocks the move, so the whole operation fails.

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 farman1094

View all

11 more disclosed reports, best first.

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.