Authorized reimbursements in the L1BitcoinDepositor
contract
#804
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
If someone front-runs the Relayer Bot to call the
initializeDeposit
function, the Relayer Bot's transaction will be reverted, wasting a substantial amount of gas since the validation of duplicate deposits is performed very late in the process, in the tBTCBridge
smart contract. This is cost-effective to the front-runner, as the refund mechanism attempts to make callers slightly net-positive.To mitigate the above, anyone is allowed to relay deposits but reimbursement only occurs for a closed set of relayers.