Malicious users could set allocations to a blacklist Protocol and break the rebalancing logic
Source: https://github.com/sherlock-audit/2023-01-derby-judging/issues/192
Found by
Ch_301, Met, bin2chen, immeas, saidam017
Summary
game.sol pushes deltaAllocations to vaults by pushAllocationsToVaults() and it deletes all the value of the deltas
vaults[_vaultNumber].deltaAllocationProtocol[_chainId][i] = 0;
Vulnerability Detail
Malicious users could set allocations to a blacklist Protocol.
If only one of the Baskets has a non-zero value to a Protocol on blacklist
receiveProtocolAllocations() will revert
receiveProtocolAllocations().receiveProtocolAllocationsInt().setDeltaAllocationsInt()
function setDeltaAllocationsInt(uint256 _protocolNum, int256 _allocation) internal {
require(!controller.getProtocolBlacklist(vaultNumber, _protocolNum), "Protocol on blacklist");
deltaAllocations[_protocolNum] += _allocation;
deltaAllocatedTokens += _allocation;
}
and You won't be able to execute rebalance()
Impact
The guardian isn't able to restart the protocol manually.
game.sol loses the value of the deltas.
The whole system is down.
Code Snippet
Tool used
Manual Review
Recommendation
You should check if the Protocol on the blacklist when Game players rebalanceBasket()
Discussion
sjoerdsommen
duplicate with #168
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
What is known
A medium-severity business logic bug in Derby. Sherlock made it public on 10 April 2023. Found in the 13 audit contest (finding M-23), also found by 4 other wardens.
About Business logic
The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
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.