Skip to content
Business logic Audit finding Intermediate

Incorrect Balance Check in Validator Redelegation Process May Block Legitimate Rebalancing Operations

The redelegation function in the StakingManager contract checked the contract's HyperEVM balance, but the funds being redelegated actually sit on HyperCore. This could make legitimate rebalancing operations revert even when the HyperCore balance was sufficient, disrupting validator rebalancing.

yaioxy Follow with 0xG0P1, 0xpiken and 19 others

Originally disclosed on Code4rena

Submitted by yaioxy, also found by 0xG0P1, 0xpiken, adamIdarrha, Atharv, DemoreX, dobrevaleri, falconhoof, FalseGenius, givn, holydevoti0n, Infect3d, komronkh, KupiaSec, LSHFGJ, marchev, Ragnarok, rouhsamad, VAD37, vangrim, zhaojohnson, and zzebra83

https://github.com/code-423n4/2025-04-kinetiq/blob/7f29c917c09341672e73be2f7917edf920ea2adb/src/StakingManager.sol#L365

Finding description and impact

The processValidatorRedelegation function in the StakingManager contract contains an incorrect balance check that could prevent legitimate rebalancing operations from being executed. The function checks the HyperEVM balance of the StakingManager contract, but the funds being redelegated exist on HyperCore, not on the HyperEVM.

According to the documentation, HYPE staking on Hyperliquid happens within HyperCore. The rebalancing process is designed to delegate/undelegate funds between validators and staking balance on HyperCore without those funds ever leaving the HyperCore environment. However, the current implementation incorrectly checks the StakingManager balance that is on HyperEVM.

When the ValidatorManager’s closeRebalanceRequests function is called, it calculates the total amount to be redelegated and then calls processValidatorRedelegation on the StakingManager:

function closeRebalanceRequests(
    address stakingManager,
    address[] calldata validators
) external whenNotPaused nonReentrant onlyRole(MANAGER_ROLE) {
    // ...
    uint256 totalAmount = 0;
    for (uint256 i = 0; i < validators.length; ) {
        // ...
        totalAmount += request.amount;
        // ...
    }
    // Trigger redelegation through StakingManager if there's an amount to delegate
    if (totalAmount > 0) {
        IStakingManager(stakingManager).processValidatorRedelegation(totalAmount);
    }
}

In the StakingManager’s processValidatorRedelegation function, there’s an incorrect balance check:

function processValidatorRedelegation(uint256 amount) external nonReentrant whenNotPaused {
    require(msg.sender == address(validatorManager), "Only ValidatorManager");
    require(amount > 0, "Invalid amount");
@>    require(address(this).balance >= amount, "Insufficient balance");

    _distributeStake(amount, OperationType.RebalanceDeposit);
}

This incorrect balance check could cause legitimate rebalancing operations to fail if the StakingManager doesn’t have sufficient HYPE balance, even though the HyperCore balance is adequate for the redelegation. This would prevent the protocol from properly rebalancing funds between validators, which could lead to operational disruptions and reduced protocol performance.

Recommended Mitigation Steps

Remove the incorrect balance check from the processValidatorRedelegation function:

function processValidatorRedelegation(uint256 amount) external nonReentrant whenNotPaused {
    require(msg.sender == address(validatorManager), "Only ValidatorManager");
    require(amount > 0, "Invalid amount");
-   require(address(this).balance >= amount, "Insufficient balance");

    _distributeStake(amount, OperationType.RebalanceDeposit);
}

Kinetiq confirmed


The original report as published on Code4rena, by yaioxy. Images and videos are our own copies; raw HTML is shown as text. View it on Code4rena.

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 function validated the contract's HyperEVM balance instead of the HyperCore balance that actually backs the redelegation.

Impact

Legitimate rebalancing operations could revert when the HyperEVM balance was lower than the amount, even though the HyperCore balance was adequate, potentially causing operational disruption.

What the attacker needed

Protocol uses HyperCore for staking; rebalancing request exceeds HyperEVM balance

The fix

The incorrect balance check should be removed from the redelegation function.

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.

A smart contract holds funds in two separate places: one balance on the HyperEVM chain and another on HyperCore. The code checked the wrong place before moving funds between validators, so a valid move could be refused even though the money was there. The fix is to remove that misplaced check.

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 from Kinetiq

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.