SettlementBranch
lacks functionality to transfer the USDToken
ownership and this will block the Zaros team from performing a replacement because when updated the owner of the USDToken will remain old SettlementBranch
and positions with +ve
PnL will not be able to be modified because USDToken::mint
has onlyOwner
modifier:
The idea of the Zaros team is to mint additional collateral in form of their USD token when position is in profit but this will not be possible when RootUpgrade::replaceBranch
is called for replacing the Settlement
:
Owner remains the old contract and this prevents positions in profit to be modified.
As we can see this function only prevent from replacing the RootProxy
and no other branches are specified, which means actions above are possible. Although there is comment stating that this is only for testnet the scope of this audit will represent the initial version of the protocol and that means we should accept the code will be deployed as is.
Upgrading the SettlementBranch
is not possible as it will block important functionality for positions in profit and the only way they to be close is to have -ve PnL (which is loss of funds for the trader) or to be liquidated unfairly.
Manual Review
Add transferOwnership
function in SettlementBranch
.
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.