The _registerCollateralToken function deploys a new wToken contract each time a collateral token is registered. This approach is inefficient because
- Each deployment costs extra gas, increasing transaction costs.
- Contracts are immutable meaning any upgrade or modification requires deploying new instances
- Storage grows unnecessarily, increasing the blockchain state size.
Gas costs Increase significantly for each registered token
Cannot reuse logic, making upgrades and maintenance harder.
Unnecessary contract deployments make the system less efficient
Manual Review
Use a WToken Factory
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.