Assessment reports>Aqua Pool>Discussion>A `withdrawMode == 3` skips minting protocol fee

A withdrawMode == 3 skips minting protocol fee

Note that when withdrawMode is 3, the burn function skips minting the protocol fee:

// Mints protocol fees. In emergency case, skip it with withdraw mode.
if (params.withdrawMode != 3) {
    params.totalSupply = (
        _mintProtocolFee(params.totalSupply - params.liquidity, _newInvariant, priceScale)
    );
}

SyncSwap Labs noted that this behavior is intentional.

Zellic © 2024Back to top ↑