The TadleFactory
contract is designed to deploy upgradeable proxies using the OpenZeppelin Transparent Proxy pattern. However, it currently lacks a function to upgrade the implementation of these proxies. This limitation prevents the TadleFactory
from utilizing its admin role to perform upgrades on the deployed proxies, thereby restricting the system's flexibility and maintainability.
The TadleFactory
contract deploys upgradeable proxies using the OpenZeppelin Transparent Proxy pattern. However, the admin for these proxies is set to the TadleFactory
contract itself (address(this)
). To perform an upgrade using the upgradeToAndCall
or upgradeAndCall
functions from the TransparentUpgradeableProxy
, the caller must be the TadleFactory
contract, not an externally owned account (EOA). Due to this restriction, the core contracts cannot be upgraded.
Detailed Explanation:
In TadleFactory.sol
lines 61-67, the UpgradeableProxy
is deployed with the admin set to address(this)
, which refers to the TadleFactory
contract.
In UpgradeableProxy.sol
lines 28-35, the constructor sets the admin to the provided address, which is TadleFactory
.
To utilize the upgrade functionality (upgradeToAndCall
or upgradeAndCall
), the caller must be the TadleFactory
contract itself.
Since the current implementation does not allow an EOA to trigger these upgrade functions, the core contracts remain non-upgradable.
no one can upgrade the contracts
Manual Analysis
Implement an upgradeProxy
function within the TadleFactory
contract to enable it to call upgradeToAndCall
on the UpgradeableProxy
. This function would allow the TadleFactory
to perform upgrades as needed.
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.