In the Compatibilities section of the ReadMe there is a note that the protocol wants to deploy to Polygon
.
However when the MoneyShelf
contract gets deployed inside the Deployer
script we need to forward the correct USDC
token address for the chain we want to deploy to. The USDC
address is received from the helperConfig.getActiveNetworkConfig().usdc
function. When we look closer inside the HelperConfig::getConfigByChainId
function we can see that each chain has it's own config function which should be used to receive the correct USDC
address for this chain.
Looking closer at the implementation of the HelperConfig::getPolygonMainnetConfig
function we can see that the USDC address that gets returned is incorrect: address(1)
. We can print this out in our terminal following these steps:
chisel
address(1)
This returns us an address that looks like this 0x0000000000000000000000000000000000000001
. If we do a quick research on the internet we can quickly find out that the correct USDC address on polygon actually is 0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359
.
You can also make a few adjustments in the Deployer
script to verify this:
After making this adjustment run the following command to see the invalid USDC
address printed out to the terminal:
This results in deploying the MoneyShelf contract with an invalid USDC address, causing transaction failures and disrupting contract functionality.
Manual review
chisel
forge test
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.