Reputation Risks with contractOwner
The contract owner has unrestricted power to change any contract functionality and withdraw all assets. This centralisation could damage the project's reputation even if the owner acts in good faith.
Submitted by hake, also found by catchup, danb, defsec, Jujic, kirk-baird, nedodn, shenwilly, sorrynotsorry, and WatchPug
DiamondCutFacet.sol WithdrawFacet.sol DexManagerFacet.sol
contractOwner has complete freedom to change any functionality and withdraw/rug all assets. Even if well intended the project could still be called out resulting in a damaged reputation like in this example.
Proof of Concept
https://twitter.com/RugDocIO/status/1411732108029181960
Recommended Mitigation Steps
Recommend implementing extra safeguards such as:
- Limiting the time period where sensitive functions can be used.
- Having a waiting period before pushed update is executed.
- Using a multisig to mitigate single point of failure in case
contractOwnerprivate key leaks.
H3xept (Li.Fi) acknowledged and commented:
The bridges/swaps ecosystem is continually changing. Our mission is to allow seamless UX and provide users with new bridging and swapping routes as fast as possible. This comes at the cost of having some degree of centralization. We choose the Diamond standard to be able to constantly add new bridges and update the existing ones as they progress as well.
We agree with the increased safety of a DAO/Multisign mechanism and will provide them in the future. Timelocks are currently not planned, as we want to be able to react fast if we have to disable bridges for security reasons (e.g. if the underlying bridge is being exploited)
Valid submission as user will approve fund to the contract.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Impact
All assets could be withdrawn or functionality changed by the owner, and the project could suffer reputational damage even without malicious intent.
What the attacker needed
Owner account controls contract; no timelock or multisig
The fix
The project should add safeguards such as time limits on sensitive functions, a waiting period before upgrades, and a multisig to remove the single point of failure.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
In this smart contract, one special account called the contract owner can do anything: change how the contract works or take all the money. Even if the owner is honest, users have to trust that one person completely, and if that account is compromised or misused, all funds are at risk.
What is Access control?
A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.