If user sets a low gasPrice the operator would have to choose between being locked out of the pod or executing the job anyway
A user can set an extremely low gas price when requesting a cross-chain job, so the selected operator is compensated far less than the actual gas cost. Because the operator is locked out of the pod until the job is executed, they must either pay the difference or remain unable to take other jobs or withdraw their bond.
Submitted by 0xA5DF, also found by cryptphi, Jeiwan, and Picodes
HolographOperator.sol#L202-L340 HolographOperator.sol#L593-L596 LayerZeroModule.sol#L277-L294
During the beaming process the user compensates the operator for the gas he has to pay by sending some source-chain-native-tokens via hToken.
The amount he has to pay is determined according to the gasPrice set by the user, which is supposed to be the maximum gas price to be used on dest chain (therefore predicting the max gas fee the operator would pay and paying him the same value in src chain native tokens).
However, in case the user sets a low price (as low as 1 wei) the operator can’t skip the job because he’s locked out of the pod till he executes the job.
The operator would have to choose between loosing money by paying a higher gas fee than he’s compensated for or being locked out of the pod - not able to execute additional jobs or get back his bonded amount.
Impact
Operator would be losing money by having to pay gas fee that’s higher than the compensation (gas fee can be a few dozens of USD for heavy txs). This could also be used by attackers to make operators pay for the attackers’ expensive gas tasks:
- They can deploy their own contract as the ‘source contract’
- Use the
bridgeInevent and thedatathat’s being sent to it to instruct the source contract what operations need to be executed - They can use it for execute operations where the
tx.origindoesn’t matter (e.g. USDc gasless send)
Proof of Concept
- An operator can’t execute any further jobs or leave the pod till the job is executed. From the docs:
When an operator is selected for a job, they are temporarily removed from the pod, until they complete the job. If an operator successfully finalizes a job, they earn a reward and are placed back into their selected pod.
- Operator can’t skip a job. Can’t prove a negative but that’s pretty clear from reading the code.
- There’s indeed a third option - that some other operator/user would execute the job instead of the selected operator, but a) the operator would get slashed for that. b) If the compensation is lower than the gas fee then other users have no incentive to execute it as well.
Recommended Mitigation Steps
Allow operator to opt out of executing the job if the gasPrice is higher than the current gas price.
alexanderattar (Holograph) commented:
Is a known issue, and we will be fixing it.
alexanderattar (Holograph) resolved:
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
Operators could lose money on jobs where the user-set gas price is lower than the real gas cost, and attackers could deliberately make operators pay for expensive gas tasks.
What the attacker needed
User can submit a job with a chosen gas price; operator is selected for that job; operator is removed from the pod until job completion
The fix
The operator should be allowed to opt out of executing a job if the user-set gas price is higher than the current gas price; the project said it is a known issue and would be fixed.
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.
In this system, a user pays an operator in advance for the gas the operator will spend on another chain. The user chooses the gas price, and if they choose a very low one, the operator gets too little money. The operator cannot simply skip the job because they are removed from the pool of available operators until they finish it, so they lose money or stay stuck.
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.