$USDC address deployed in Deployer.sol
is not the addresse of the native USDC polygon mainnet.
The main vulnerability in the current deployment script stems from the fact that it uses a mock USDC token instead of the native USDC token on the Polygon mainnet.
Mock Token Usage: The HelperConfig class points to a mock USDC token. While this is useful for testing, it is not suitable for production. The mock token does not hold any real value and cannot interact with other smart contracts or services that expect the real USDC token.
The impact of using a mock USDC token instead of the native USDC token on the Polygon mainnet includes:
Loss of Funds: If users or other protocols mistakenly interact with your contract under the assumption that it uses real USDC, they could lose funds. For example, users might deposit real USDC expecting it to be used within your protocol, only to find that it is converted to or treated as a valueless mock token.
Operational Disruptions: The need to eventually switch from a mock token to the native USDC token will require significant operational changes. This could involve pausing the protocol, migrating user balances, and ensuring all components correctly interact with the real USDC. This process can be complex, error-prone, and disruptive to users.
Manual review
Modify the deploy script to ensure that your contracts interact with the native USDC on the Polygon mainnet. Here's a quick breakdown:
Defined posUsdc Address:
You must correctly set the native Usdc address to 0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359, which is the address for the native USDC on Polygon mainnet.
Update usdc Initialization:
The usdc variable must be initialized with the native USDC address within the deploy function.
Integration with MoneyShelf:
The MoneyShelf contract must be initialized with the usdc variable, ensuring it uses the native USDC.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.