For the complete documentation index, see llms.txt. This page is also available as Markdown.

57628 sc critical improper transfer can lead to funds been frozen

Submitted on Oct 27th 2025 at 17:37:10 UTC by @bugdaddy96 for Audit Comp | Belong

  • Report ID: #57628

  • Report Type: Smart Contract

  • Report severity: Critical

  • Target: https://github.com/immunefi-team/audit-comp-belong/blob/main/contracts/v2/periphery/Staking.sol

  • Impacts:

    • Permanent freezing of funds

Description

Brief/Intro

Transferring sLONG shares to another address creates a permanent desync between ERC20 balances and internal stake tracking, preventing recipients from withdrawing funds without paying a 10% penalty.

Vulnerability Details

The staking contract records stakes in an internal mapping but does not override _update() on transfers to sync internal stake tracking with ERC20 balance changes:

mapping(address staker => Stake[] times) public stakes;
function _deposit(address by, address to, uint256 assets, uint256 shares) internal override {
    super._deposit(by, to, assets, shares);
    stakes[to].push(Stake({shares: shares, timestamp: block.timestamp}));
}

Because transfers of the ERC20 shares do not update the stakes mapping, transferred shares remain attributed to the original staker's stakes array. This creates a desync between the ERC20 balanceOf and the internal stake timestamps.

Impact Details

  • Users who receive transferred shares cannot withdraw them without paying the emergency-withdraw penalty (10%) until the min stake period requirement is satisfied according to the original owner's stake timestamp.

  • Breaks expected ERC4626 behavior for transferred shares.

  • Affects composability and DeFi integrations that assume transfers preserve withdrawability and stake timestamps.

Proof of Concept

Was this helpful?