Powerful Yellow Bear
High
changeOwner
function will prevent new owner from modifying critical parameters in DebitaV3Aggregator
, auctionFactoryDebita
, buyOrderFactory
The use of the same parameter name owner
in the changeOwner
function as the state variable owner
will cause a potential ownership change failure for the new owner as the current owner will fail to update the state variable, leaving the old owner with control. This flaw allows the current owner to retain control, preventing the new owner from modifying critical parameters such as fees, loan offers, and collateral settings.
In DebitaV3Aggregator.sol:682
, the choice to use the same parameter name owner
as the state variable owner
is a mistake as it causes a conflict in the changeOwner
function. The state variable is not updated when the function is called, preventing the actual ownership transfer and allowing the original owner to retain control over critical parameters.
No response
No response
- The owner calls
changeOwner()
function, but it doesn't actually update theowner
state variable due to a naming conflict with the localowner
variable. - This allows the incorrect owner(
Old Owner
) to call functions likestatusCreateNewOffers()
,setValidNFTCollateral()
,setNewFee()
,setNewMaxFee()
,setNewFeeConnector()
, andsetNewMinFee()
. - The incorrect owner can alter critical parameters, affecting the contract’s functionality, even though the ownership transfer failed.
The failure to properly transfer ownership will allow the incorrect owner to modify critical parameters, such as fees and collateral settings, potentially causing financial loss, disruption of contract operations, or unintended behavior. This could undermine trust in the system and compromise the security and integrity of the contract.
No response
+ function changeOwner(address newOwner) public {
// @audit owner is local variable - can't change owner
require(msg.sender == owner, "Only owner");
require(deployedTime + 6 hours > block.timestamp, "6 hours passed");
+ owner = newOwner;
}