[High] _mint 函数中的错误加法操作

_mint 函数中,对于非质押账户的条件块中存在错误的加法操作。nonStakingSupply += nonStakingSupply; 应更改为 nonStakingSupply += _amount;,因为它意图将非质押供应量增加以发行的数量,而不是以其自身的先前值。

    // contracts/tokens/BaseToken.sol
    function _mint(address _account, uint256 _amount) internal {
        require(_account != address(0), "BaseToken: mint to the zero address");

        _updateRewards(_account);

        totalSupply += _amount;
        balances[_account] += _amount;

        if (nonStakingAccounts[_account]) {
            nonStakingSupply += nonStakingSupply;//@audit 
        }

        emit Transfer(address(0), _account, _amount);
    }

Recommended

将加法操作更正为 nonStakingSupply += _amount;

[High] withdraw function index error

The exploitable logical vulnerability in the provided Smart Contract code lies within the handling mechanisms in the withdraw function, specifically how the refinanced status of each token ID is checked and modified. The issue arises from the premature removal of tokenRefinanceInfos entries before checking all token IDs in the withdraw request. This approach allows a user to potentially manipulate and bypass the refinanced status check for subsequent token IDs in a batch withdrawal, leading to unauthorized actions like double withdrawal.

poc:

  1. Initial Setup:
  2. Preparation for Withdrawal:
  3. Manipulating Token Status:
  4. Exploiting Faulty Logic:
  5. Outcome of Exploitation:

Recommendations: