function initiateMigration(address newContract)
external
whenPaused
onlyOwner
{
if (newContract == address(0)) revert ZeroAddress();
// Notify the reward router that the current/old contract is going to perform
// full account transfer to the specified new contract
gmxRewardRouterV2.signalTransfer(newContract);
migratedTo = newContract;
emit InitiateMigration(newContract);
}
As you can see gmxRewardRouterV2.signalTransfer(newContract); is called to start migration.
This issue is invalid and not possible to carry out as a non-GMX insider (if the GMX team and multisig were malicious, there would be many other ways in which they can steal value, so this specific vector would be the least of our concerns) for the following reasons:
The vester token transfer methods are overridden which removes the possibility of an attacker acquiring vGMX or vGLP and transferring it to the PirexGmx contract via those methods.
// empty implementation, tokens are non-transferrable
function transfer(address /* recipient */, uint256 /* amount */) public override returns (bool) {
revert("Vester: non-transferrable");
}
…
// empty implementation, tokens are non-transferrable function transferFrom(address /* sender /, address / recipient /, uint256 / amount */) public virtual override returns (bool) { revert(“Vester: non-transferrable”); }
2. The `depositForAccount` method can only be called by an account set by the GMX team as a "handler" so an attacker can't volunteer esGMX be vested on behalf of another account. Even if `depositForAccount` were to be callable by anyone, esGMX has to first be unstaked before it can be deposited for vesting, which is never the case for our contracts.
The original report as published on Code4rena, by rvierdiiev. 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.
Generating the AI write-up for this report.
This usually takes about 40 seconds. You can read the original meanwhile; this page updates itself.
Writing the technical write-up
Writing the version for beginners
Checking every passage against the original
What is known
A medium-severity doS bug in Redacted Cartel contest. Code4rena made it public on 27 January 2023. Found in the 2022-11-redactedcartel audit contest (finding M-01), also found by 2 other wardens.
About DoS
A request that exhausts resources or crashes a component. Many programs forbid testing it; reports usually show it from code, not by attacking.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
Generating the AI write-up for this report.
This usually takes about 40 seconds. You can read the original meanwhile; this page updates itself.
Writing the technical write-up
Writing the version for beginners
Checking every passage against the original
What is DoS?
A request that exhausts resources or crashes a component. Many programs forbid testing it; reports usually show it from code, not by attacking.