Beginner FriendlyDeFiFoundry
100 EXP
View results
Submission Details
Severity: medium
Valid

Lack of Withdrawal Method for Emergency Migration in MoneyShelf Contract

Summary

The MoneyShelf contract is designed with a withdraw function (withdrawUSDC) that allows individual gang members to withdraw their USDC. However, it lacks a withdrawal method to facilitate the emergency migration of all funds to the MoneyVault contract. This deficiency prevents the smooth and secure transition of funds in case of emergencies, undermining the migration process intended to protect assets from potential threats.

Vulnerability Details

In accordance with the documentation, the MoneyShelf contract should enable the emergency migration of all its funds to the MoneyVault contract to safeguard against legal or criminal threats. However, the current implementation only includes the withdrawUSDC function, which allows individual gang members to withdraw their USDC. This function is inadequate for transferring the entire contract's USDC balance during an emergency migration, thereby posing a significant risk to the funds.

Vulnerability Details:

Location: MoneyShelf contract

Issue: Absence of a comprehensive withdrawal method for emergency migration to MoneyVault.

Type: Functional deficiency in contract design, leading to asset protection failure.

Impact

This vulnerability can lead to the following issues:

Funds at Risk: Without a proper withdrawal method, USDC funds cannot be migrated to the MoneyVault contract, leaving them exposed to risks.

Incomplete Emergency Response: The lack of a comprehensive migration mechanism prevents the contract from fulfilling its intended emergency protection measures.

User Trust and Security: Users may lose trust in the system's ability to safeguard their funds during emergencies.

Tools Used

Manual Review

Recommendations

Implement a Comprehensive Withdrawal Method:

Add a function to the MoneyShelf contract that allows the migration of all USDC funds to the MoneyVault contract during emergencies.

Updates

Lead Judging Commences

n0kto Lead Judge over 1 year ago
Submission Judgement Published
Validated
Assigned finding tags:

Emergency migration leave the USDC

Support

FAQs

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