Skip to content
DoS Audit finding Intermediate

Denial of service on depositAndBridge(...) function for shareLockPeriod is non zero

The depositAndBridge function locks the depositor's shares for shareLockPeriod and then immediately calls bridge, which checks that the lock has expired, so the transaction always reverts when shareLockPeriod is non-zero. An attacker cannot exploit this, but legitimate users are unable to use the depositAndBridge, depositAndBridgeOneInch and depositAndBridgeOkxUniversal functions.

Kaysoft Follow

Originally disclosed on Immunefi

  • Disclosed after under an hour

51777 sc medium denial of service on depositandbridge function for sharelockperiod is non zero

Submitted on Aug 5th 2025 at 18:57:15 UTC by @kaysoft for Attackathon | Plume Network

Description

Brief/Intro

According to the README file provided on the contest page:
After deposits all of the depositors shares are locked to their account for the shareLockPeriod.
Link: https://github.com/immunefi-team/attackathon-plume-network-nucleus-boring-vault/blob/main/README.md

The depositAndBridge(...) function tries to call the deposit(...) and bridge(...) function of the teller parameter atomically at which time the shareLockPeriod of the deposit(..) has not elapsed.

This will cause the depositAndBridge(...) function to revert because of the beforeTransfer(...) validation.

Solidity
File: TellerWithMultiAssetSupport.sol parent  contract of MultiChainLayerZeroTellerWithMultiAssetSupport.sol and MultiChainHyperlaneTellerWithMultiAssetSupport.sol
/**
     * @notice After deposits, shares are locked to the msg.sender's address
     *         for `shareLockPeriod`.
     * @dev During this time all transfers from msg.sender will revert, and
     *      deposits are refundable.
     */
    uint64 public shareLockPeriod;

This issue also affects the depositAndBridgeOneInch(...) and depositAndBridgeOkxUniversal(...) function of DexAggregatorWrapperWithPredicateProxy.sol.

Vulnerability Details

The depositAndBridge(...) function of the TellerWithMultiAssetSupportPredicateProxy.sol has a teller parameter which is a CrossChainTellerBase type.

The MultiChainLayerZeroTellerWithMultiAssetSupport.sol and MultiChainHyperlaneTellerWithMultiAssetSupport contracts can be supplied to the depositAndBridge(...) function of TellerWithMultiAssetSupportPredicateProxy.sol as the teller parameter since it supports the CrossChainTellerBase type.

The depositAndBridge(...) function calls the depositAndBridge(...) function on the teller parameter.

The depositAndBridge(...) function on the teller parameter calls its deposit(...) function first before calling the bridge(...) function.

When the deposit function is called, the shares are locked with the _afterPublicDeposit(...) function for shareLockPeriod before the bridge(...) function is called as shown below.

Solidity
File: CrossChainTellerBase.sol
function depositAndBridge(
        ERC20 depositAsset,
        uint256 depositAmount,
        uint256 minimumMint,
        BridgeData calldata data
    )
        external
        payable
        requiresAuth
        nonReentrant
    {
        if (!isSupported[depositAsset]) {
            revert TellerWithMultiAssetSupport__AssetNotSupported();
        }

        uint256 shareAmount = _erc20Deposit(depositAsset, depositAmount, minimumMint, msg.sender);
        _afterPublicDeposit(msg.sender, depositAsset, depositAmount, shareAmount, shareLockPeriod);//@this locks the shares for shareLockPeriod
        bridge(shareAmount, data);
    }

In the bridge(...) function, there is a beforeTransfer(...) function that validates that sharesLockPeriod has been exceeded. This check makes it impossible to execute the depositAndBridge(...) function atomically because sharesLockPeriod means depositors have to wait for the sharesLockPeriod before they can bridge.

Solidity
File: CrossChainTellerBase.sol
function bridge(
        uint256 shareAmount,
        BridgeData calldata data
    )
        public
        payable
        requiresAuth
        returns (bytes32 messageId)
    {
        if (isPaused) revert TellerWithMultiAssetSupport__Paused();

        _beforeBridge(data);

        // Since shares are directly burned, call `beforeTransfer` to enforce before transfer hooks.
        beforeTransfer(msg.sender);

        // Burn shares from sender
        vault.exit(address(0), ERC20(address(0)), 0, msg.sender, shareAmount);

        messageId = _bridge(shareAmount, data);
        _afterBridge(shareAmount, data, messageId);
    }


function beforeTransfer(address from) public view {//@audit reverts for non zero shareLockPeriod
        if (shareUnlockTime[from] > block.timestamp) revert TellerWithMultiAssetSupport__SharesAreLocked();
    }

Impact Details

Denial of service on the:

  • depositAndBridge(...) function of TellerWithMultiAssetSupportPredicateProxy.sol
  • depositAndBridgeOneInch(...) and depositAndBridgeOkxUniversal(...) function of DexAggregatorWrapperWithPredicateProxy.sol

References

Proof of Concept

{% stepper %} {% step %} Bob calls the depositAndBridge(...) function of TellerWithMultiAssetSupportPredicateProxy.sol passing the MultiChainLayerZeroTellerWithMultiAssetSupport.sol as the teller parameter. {% endstep %}

{% step %} Bob's transaction reverts because the teller.depositAndBridge(...) call in the depositAndBridge(...) transaction reverts. {% endstep %}

{% step %} This is due to the non-zero shareLockPeriod set for the deposit before bridge in the MultiChainLayerZeroTellerWithMultiAssetSupport.sol passed as the teller parameter. {% endstep %} {% endstepper %}

The original report as published on Immunefi, by kaysoft. 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 depositAndBridge function calls _afterPublicDeposit to set the share unlock time and then immediately calls bridge, whose beforeTransfer check reverts while that unlock time is still in the future.

Impact

The depositAndBridge, depositAndBridgeOneInch and depositAndBridgeOkxUniversal functions always revert when shareLockPeriod is non-zero, so users cannot deposit and bridge in one transaction.

What the attacker needed

ShareLockPeriod is non-zero; teller is a cross-chain teller contract

How it was found

  1. Bob calls depositAndBridge on TellerWithMultiAssetSupportPredicateProxy, passing a MultiChainLayerZeroTellerWithMultiAssetSupport contract as the teller parameter.
  2. The call to teller.depositAndBridge reverts, so Bob's transaction reverts.
  3. The revert happens because the teller has a non-zero shareLockPeriod, which locks the shares before bridge is called.

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, the contract records a time until which your shares cannot be moved. The depositAndBridge function tries to deposit and then move the shares in the same transaction, but the move is blocked because the waiting time has only just started. As a result the whole function fails for anyone, not just an attacker.

What is DoS?

A request that exhausts resources or crashes a component. Many programs forbid testing it; reports usually show it from code, not by attacking.

More by Kaysoft

View all

22 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.

Denial of service

The lesson behind this report.

A request that exhausts resources or crashes a component. Many programs forbid testing it; reports usually show it from code, not by attacking.