DittoETH

Ditto
DeFiFoundryOracle
55,000 USDC
View results
Submission Details
Severity: low
Valid

can be delete a bridge that holds some collateral

summary :

  • In the ownerFacet contract's deleteBridge function, the DAO has the ability to delete a bridge that holds collateral (e.g., reth or steth bridges) without checking if the bridge contains any value. This presents a potential risk, as bridges with collateral should not be deleted inadvertently.

Vulnerability Details:

  • The vulnerability lies in the ownerFacet contract's deleteBridge function. This function allows the DAO to delete bridge contracts without verifying whether the bridge contains any collateral (e.g., assets like reth or steth). The existing function lacks a check to ensure that bridges being deleted hold valuable assets before allowing their deletion.

function deleteBridge(address bridge) external onlyDAO {
uint256 vault = s.bridge[bridge].vault;
if (vault == 0) revert Errors.InvalidBridge();
// ...
delete s.bridge[bridge];
emit Events.DeleteBridge(bridge);
}

impact :

  1. The inaccurate deletion of bridge contracts can significantly impact the calculation of the yield rate within the system. Erroneously deleted bridges may lead to incorrect yield rate calculations, affecting the overall financial stability and investment decisions of users.

  2. Users withdrawing assets from the system will receive diminished value due to the loss incurred from bridges without collateral. The financial loss caused by these deletions will be spread across all users, leading to reduced withdrawal values for everyone participating in the system.

  3. The system is at risk of losing its real collateral, potentially leading to undercollateralization. Bridges without proper collateral may weaken the system's ability to cover outstanding liabilities

Recommendations

enhance the deleteBridge() function by incorporating a collateral check.

function deleteBridge(address bridge) external onlyDAO {
uint256 vault = s.bridge[bridge].vault;
if (vault == 0) revert Errors.InvalidBridge();
// Ensure the bridge not holds collateral before deletion.
if (IBridge(bridge).getZethValue() > 0) revert ;
// ...
delete s.bridge[bridge];
emit Events.DeleteBridge(bridge);
}
Updates

Lead Judging Commences

0xnevi Lead Judge
almost 2 years ago
0xnevi Lead Judge almost 2 years ago
Submission Judgement Published
Validated
Assigned finding tags:

finding-118

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.