GalloDaSballo - tx.origin
breaks ability to have someone else broadcast TXs and may cause loss of bonds
#96
Labels
Duplicate
A valid issue that is a duplicate of an issue with `Has Duplicates` label
Medium
A valid Medium severity issue
Reward
A payout will be made for this issue
Sponsor Confirmed
The sponsor acknowledged this issue is valid
Will Fix
The sponsor confirmed this issue will be fixed
GalloDaSballo
medium
tx.origin
breaks ability to have someone else broadcast TXs and may cause loss of bondsSummary
The use of
tx.origin
adds an additional risk to the bonding system that can be avoided by passing thepayer
ininitialize
Vulnerability Detail
Impact
The
FaultDisputeGame.initialize
sets the startingclaimData
as follows:https://github.com/sherlock-audit/2024-02-optimism-2024/blob/main/optimism/packages/contracts-bedrock/src/dispute/FaultDisputeGame.sol#L555-L565
Setting the claimant to
tx.origin
this can be used to:The rest of the system doesn't prevent SCs or SC Wallets from interacting with it, but this setting does break composability
Code Snippet
tx.origin
, user a will pay the bond and not be guaranteed to receive it backhttps://github.com/sherlock-audit/2024-02-optimism-2024/blob/main/optimism/packages/contracts-bedrock/src/dispute/FaultDisputeGame.sol#L559-L560
Tool used
Manual Review
Recommendation
A simple refactoring that forwards the original
payer
or specifying abondReceiver
would be sufficient in this caseDuplicate of #194
The text was updated successfully, but these errors were encountered: