requireNextActiveMultisig will always return the first enabled multisig which increases the probability of stuck minipools
The function that assigns a multisig address to each new minipool always returns the first enabled multisig rather than distributing minipools across the available ones. If that single address is later disabled, every minipool created with it could become stuck, raising the chance that funds are stuck too.
imare Follow with HollaDieWaldfee, btk and 17 others
Originally disclosed on Code4rena
Submitted by imare, also found by HollaDieWaldfee, btk, jadezti, gz627, nogo, imare, Jeiwan, sk8erboy, enckrish, AkshaySrivastav, betweenETHlines, simon135, 0xbepresent, 0Kage, kaliberpoziomka8552, 0Kage, Saintcode_, Faith, and dic0de
For every created minipool a multisig address is set to continue validator interactions.
Every minipool multisig address get assigned by calling requireNextActiveMultisig.
This function always return the first enabled multisig address.
In case the specific address is disabled all created minipools will be stuck with this address which increase the probability of also funds being stuck.
Impact
Probability of funds being stuck increases if requireNextActiveMultisig always return the same address.
Proof of Concept
Recommended Mitigation Steps
Use a strategy like round robin to assign next active multisig to minipool.
Something like this :
private uint nextMultisigAddressIdx;
function requireNextActiveMultisig() external view returns (address) {
uint256 total = getUint(keccak256("multisig.count"));
address addr;
bool enabled;
uint256 i = nextMultisigAddressIdx; // cache last used
if (nextMultisigAddressIdx==total) {
i = 0;
}
for (; i < total; i++) {
(addr, enabled) = getMultisig(i);
if (enabled) {
nextMultisigAddressIdx = i+1;
return addr;
}
}
revert NoEnabledMultisigFound();
}
emersoncloud (GoGoPool) disagreed with severity and commented:
Without a mechanism for funds to become stuck, I don’t think this warrants a medium severity.
I do agree with the principle that if we have multiple multisigs, some system to distribute minipools between them seems reasonable.
Alex the Entreprenerd (judge) commented:
While the finding will not be awarded as Admin Privilege, I believe that ultimately the Warden has shown an incorrect implementation of the function
requireNextActiveMultisigwhich would ideally either offer:
- Round Robin
- Provable Random Selection
For those reasons I think the finding is still notable, in that the function doesn’t work as intended, and believe it should be judged Medium Severity.
I will be consulting with an additional Judge to ensure that the logic above is acceptable given the custom scope for this contest.
emersoncloud (GoGoPool) commented:
Acknowledged.
We’re not going to fix this in the first iteration of our protocol, we’re expecting to only have one active multisig. We will definitely implement some system to distribute minipools between multisigs when we have more.
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
Impact
If the chosen multisig is disabled, all minipools created with it could be stuck, which the reporter says increases the probability of funds being stuck; the protocol team disputed that funds could actually become stuck.
What the attacker needed
More than one multisig configured; the chosen multisig later disabled
The fix
The reporter recommended rotating between enabled multisigs, for example with a round-robin pointer; the team acknowledged the point but said they would not fix it in the first iteration because they expect only one active multisig.
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 minipool is a small staking contract that relies on a separate 'multisig' wallet (a wallet needing several people to approve a transaction) to carry out later steps. The code that picks which multisig to use always picks the same one instead of rotating between them. If that one wallet is switched off, all the minipools tied to it may be unable to proceed.
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.