Tyojong

[Solodit] Users with Level 5 Account May Bypass the Applied 12% Commissions 본문

web3/Solodit Report

[Solodit] Users with Level 5 Account May Bypass the Applied 12% Commissions

Tyojong 2025. 9. 19. 19:59

개요


심각도 : High

언어 : Solidity

프로토콜 : Terplayer BVT Staking & Distribution

이 리포트는 Terplayer BVT Staking & Distribution 프로토콜에서 Level 5 계정을 가진 사용자가 시스템의 12% 커미션을 우회할 수 있는 취약점에 대해 설명한다.

 

Level 5 계정은 일반적으로 recipientComission 주소로 12%의 커미션을 내야한다.

악의적인 사용자는 새 계정을 만든 뒤, 부모 계정을 자신의 Level 5 계정으로 지정한다.

새 계정에서 자산을 입금하면 이 과정에서 12% 커미션이 본인 Level 5 계정으로 지급된다.

결국 실질적으로 본인은 2% 커미션만 내고, 12%에 해당하는 자산을 추가로 획득하여 프로토콜을 손해 보게 만든다.

 

때문에 정상적인 12% 커미션 수익이 공격자에게 흘러가며, 프로토콜 손실이 발생한다.

 

영향 받는 코드


src/BvtRewardVault.sol 파일의 96번째 줄을 확인해보면

function deposit(uint256 amount) external nonReentrant {
  // code
  for (uint256 i = 0; i < commissionParents.length; i++) {
      UserInfo memory parentInfo = commissionParents[i];
      if (parentInfo.user == address(0)) {
          continue;
      }
      uint256 commission = bondDealerContract.getCommission(
          uint256(parentInfo.level)
      );
​
      uint256 commissionAmount = (amount *
          (commission - totalHigherLevelCommissionAmountRate)) / 10000;
      if (commissionAmount > 0) {
          if (!isUserInDelegatedStakeList[msg.sender][parentInfo.user]) {
              isUserInDelegatedStakeList[msg.sender][
                  parentInfo.user
              ] = true;
              delegatedStakeUsers[msg.sender].push(parentInfo.user);
          }
          _delegateStake(msg.sender, parentInfo.user, commissionAmount);
          userAmount -= commissionAmount;
          totalHigherLevelCommissionAmountRate = commission;
      }
  }
​
  if (recipientComission != address(0)) {
      uint256 totalCommissionAmountRate = bondDealerContract
          .getTotalCommission();
      if (
          totalCommissionAmountRate > totalHigherLevelCommissionAmountRate
      ) {
          uint256 recipientCommissionAmount = (amount *
              (totalCommissionAmountRate -
                  totalHigherLevelCommissionAmountRate)) /
              MAX_COMMISSION_RATE;
          if (
              !isUserInDelegatedStakeList[msg.sender][recipientComission]
          ) {
              isUserInDelegatedStakeList[msg.sender][
                  recipientComission
              ] = true;
              delegatedStakeUsers[msg.sender].push(recipientComission);
          }
          _delegateStake(
              msg.sender,
              recipientComission,
              recipientCommissionAmount
          );
          userAmount -= recipientCommissionAmount;
      }
  }
  // code
}

 

레퍼런스


 

Smart Contract Vulnerability Dataset - Cyfrin Solodit

h-01-users-with-level-5-account-may-bypass-the-applied-12-commissions-shieldify-none-terplayer-bvt-stakingdistribution-markdown

solodit.cyfrin.io

 

 

audits-portfolio-md/Terplayer-BVT-Staking&Distribution-Security-Review.md at main · shieldify-security/audits-portfolio-md

Contribute to shieldify-security/audits-portfolio-md development by creating an account on GitHub.

github.com