Boost _ Folks Finance 34188 - [Smart Contract - Insight] BridgeRouterHub can add address adapter

Submitted on Tue Aug 06 2024 07:36:54 GMT-0400 (Atlantic Standard Time) by @Obin for Boost | Folks Finance

Report ID: #34188

Report type: Smart Contract

Report severity: Insight

Target: https://testnet.snowtrace.io/address/0xa9491a1f4f058832e5742b76eE3f1F1fD7bb6837

Impacts:

  • Bridgerouter MANAGER_ROLE can "irreversibly" add address(0) Adaapter

Description

Brief/Intro

MANAGER_ROLE in bridgeRouterHub can add address(0) as Adapter. This is not supposed to be allowed by the contract.

Impact Details

When this happens, it is impossible to reverse its effect as the opposite function removeAdapter() will revert.

  • Permanently wasting an adapterId.

  • Potential adapterId synchronicities across chains be permanently disrupted.

Mitigation

References

Add any relevant links to documentation or code

Proof of concept

Proof of Concept

Changes made to BridgeRouter.sol file for simplicity in illustration using foundry

Actual POC on above File

Last updated

Was this helpful?