Skip to content
Business logic Audit finding Intermediate

Setminimumcollateralization function also needs a another check

The admin setter for the minimum collateralization ratio does not check the new value against the existing collateralization lower bound. If the admin lowers the minimum below that bound, the liquidation logic can liquidate accounts that are still healthy under the new minimum.

griffin Follow

Originally disclosed on Immunefi

  • Disclosed after under an hour

56927 sc medium setminimumcollateralization function also needs a another check

Submitted on Oct 21st 2025 at 20:11:59 UTC by @griffin for Audit Comp | Alchemix V3

Description

Vulnerability Details

    function setMinimumCollateralization(uint256 value) external onlyAdmin {
        _checkArgument(value >= FIXED_POINT_SCALAR);
        minimumCollateralization = value;

        emit MinimumCollateralizationUpdated(value);
    }

there is no check to ensure that the new value is greater than or equal to the current collateralizationlowerbound. this can result in a state where collateralizationlowerbound > minimumcollateralization, violating the intended invariant that the lower bound for liquidation should always be less than or equal to the minimum required collateralization for healthy accounts.

Impact Details

if the admin sets minimumcollateralization to a value below collateralizationlowerbound, the liquidation logic in _liquidate can trigger on accounts that are above the new minimumcollateralization but below the old collateralizationlowerbound. this leads to unintended liquidations, where healthy accounts (per the updated minimum) are liquidated

References

https://github.com/alchemix-finance/v3-poc/blob/immunefi\\_audit/src/AlchemistV3.sol?utm\\_source=immunefi#L292

Proof of Concept

Proof of Concept

one , admin call setMinimumCollateralization with 50* 1e18(because FIXED_POINT_SCALAR is 1e18)

second, admin call setMinimumCollateralization with 40 * 1e18

but admin shouldnt be able to do the second step

test code :

pragma solidity 0.8.28;

import "src/test/AlchemistV3_6_decimals.t.sol";

contract testM is AlchemistV3Test {
    function setUp() public override {
        super.setUpMYT(6);
    }

    function test_M() public {
        vm.startPrank(admin);
        alchemist.setMinimumCollateralization(50e18); 
        alchemist.setMinimumCollateralization(40e18); 
        assertTrue(alchemist.collateralizationLowerBound() > alchemist.minimumCollateralization(), "inconsistency not created");
    }


The original report as published on Immunefi, by griffin. 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

Likely the setMinimumCollateralization setter only checks the value against the fixed-point scalar and not against collateralizationLowerBound, so the ordering invariant between the two thresholds is not enforced.

Impact

Accounts that are above the new minimum but below the old lower bound could be liquidated unintentionally, though this requires the admin to make the misconfiguration.

What the attacker needed

Admin privileges; admin sets a value below the lower bound

How it was found

  1. As admin, set the minimum collateralization to 50e18.
  2. As admin, set the minimum collateralization to 40e18, which the contract accepts.
  3. Observe that the collateralization lower bound is now greater than the minimum collateralization.

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 lending protocol tracks two thresholds: the minimum collateral a healthy account must keep, and a lower bound used when deciding to liquidate. This report says the admin function that changes the minimum never checks it against the lower bound, so the two can end up in the wrong order and accounts that should be safe can be liquidated.

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 Alchemix V3

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.