Skip to content
Business logic Audit finding Intermediate

Deposit function in **TellerWithMultiAssetSupportPredicateProxy** is completely broken due to wrong share lock

The deposit function in the proxy contract locks shares to the proxy itself instead of the original user, so the subsequent transfer to the user always reverts. This makes the deposit function unusable.

avoloder Follow

Originally disclosed on Immunefi

  • Disclosed after under an hour

52290 sc medium deposit function in tellerwithmultiassetsupportpredicateproxy is completely broken due to wrong share lock

Submitted on Aug 9th 2025 at 14:22:52 UTC by @avoloder for Attackathon | Plume Network

Description

Brief/Intro

The deposit function will not work correctly, as the shares will be locked for the proxy contract rather than the original user, making it impossible to transfer those funds back to the user, thus reverting the whole transaction every time.

Vulnerability Details

The deposit function in the TellerWithMultiAssetSupportPredicateProxy transfers funds from the user to itself, then calls the deposit function in the TellerWithMultiAssetSupport contract, which transfers the funds to the vault and mints shares. As per official documentation:

"After deposits all of the depositors shares are locked to their account for the shareLockPeriod, which makes flashloan arbitrages impossible".

This step occurs as part of the deposit function in the same contract, specifically in the _afterPublicDeposit() function where the shareUnlockTime mapping is set:

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

However, the problem is that the user parameter passed to the _afterPublicDeposit() function is msg.sender which is in this case TellerWithMultiAssetSupportPredicateProxy and not the original sender, because the call is not made using delegateCall. This locks the shares minted to the TellerWithMultiAssetSupportProxy which cannot be transferred to the original user in the original deposit function because of the beforeTransferHook where it is checked:

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

Therefore, the call vault.safeTransfer(recipient, shares); in deposit function of TellerWithMultiAssetSupportPredicateProxy will always revert, as the shares are locked. This renders the deposit function unusable.

Recommendation

Forward the original msg.sender to the TellerWithMultiAssetSupport to be able to correctly lock the funds. You could still keep the logic of minting the shares to the proxy contract, but you can lock the funds as intended.

Impact Details

Medium — the smart contract's function is not usable (not able to operate) due to wrongly locked (insufficient) funds.

References

Proof of Concept

This call chain shows how funds are locked for the proxy contract instead of the original user.

{% stepper %} {% step %}

Step 1

User X calls deposit function in the proxy contract {% endstep %}

{% step %}

Step 2

Proxy contract transfers the funds from the user to itself {% endstep %}

{% step %}

Step 3

Proxy contract calls deposit function in the Teller contract {% endstep %}

{% step %}

Step 4

Inside the deposit function, msg.sender is proxy contract {% endstep %}

{% step %}

Step 5

Funds are transferred to the vault, shares are minted to the msg.sender -> to the proxy contract {% endstep %}

{% step %}

Step 6

_afterPublicDeposit() is called passing msg.sender as user parameter which is still proxy contract {% endstep %}

{% step %}

Step 7

Shares are locked and cannot be transferred for the passed user (proxy) {% endstep %}

{% step %}

Step 8

Execution continues in the proxy contract where vault shares are supposed to be transferred to User X (proxy contract wants to transfer shares minted to it) {% endstep %}

{% step %}

Step 9

Teller's beforeTransfer() hook gets triggered where the shareUnlockTime mapping for the from user is checked against the block.timestamp. {% endstep %}

{% step %}

Step 10

from user here is the proxy contract, as proxy tries to transfer its shares to User X {% endstep %}

{% step %}

Step 11

The function reverts, since the shareUnlockTime is greater than the block.timestamp for the proxy contract {% endstep %} {% endstepper %}

The original report as published on Immunefi, by avoloder. 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 proxy calls the underlying teller's deposit function without forwarding the original user, so msg.sender inside the teller is the proxy, and the share lock is applied to the proxy instead of the user.

Impact

The deposit function is completely unusable, preventing users from depositing funds.

What the attacker needed

None

The fix

The proxy should forward the original msg.sender to the Teller contract so that shares are locked to the correct user.

How it was found

  1. User calls deposit on the proxy contract.
  2. Proxy transfers funds from the user to itself.
  3. Proxy calls deposit on the Teller contract.
  4. Inside Teller, msg.sender is the proxy, so shares are minted to the proxy.
  5. _afterPublicDeposit() locks the shares for the proxy (msg.sender).
  6. Proxy tries to transfer shares to the user, but the beforeTransfer hook reverts because the proxy's shares are locked.

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 a vault, you get 'shares' that represent your portion. The vault has a rule that locks your shares for a short time to prevent flash loan attacks. Here, the proxy contract that handles the deposit accidentally locks the shares to itself, not to you. When it then tries to give you the shares, the lock stops it, so the whole deposit 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 avoloder

View all

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