This repository has been archived by the owner on Jul 14, 2024. It is now read-only.
ArmedGoose - amoMinterBorrow
is insecure in its current state, might disrupt the protocol if used
#65
Labels
Non-Reward
This issue will not receive a payout
ArmedGoose
medium
amoMinterBorrow
is insecure in its current state, might disrupt the protocol if usedSummary
Function amoMinterBorrow implemented in LibUbiquityPool despite being a whitelist-only called function, poses significant risk to the protocol. It simply allows the whitelisted address (contract or EOA) to transfer an arbitrary amount of collateral out of
UbiquityPool
, without accounting for amounts reserved for fees, redemption and without requirement to return the funds, or collateralize the borrowed amount and without any timely return requirement. This is too lenient even for a supposedly "TRUSTED" entity, moreover, freeze of user funds may happen accidentally, if collateral to be redeemed is borrowed in the same time, so contract will not have enough balance to cover redemptions.Vulnerability Detail
The implementation of amoMinterBorrow is pretty straightforward, once an entity is added as an AMO minter borrower, it just checks if there's no pause and if minter's collateral is currently active, and allows to transfer away arbitrary amount of the collateral from the Ubiquity contract's balance.
Even if rule out the worst case scenario, when after an AMO compromise all collateral can be taken away, the sure thing is that there is no separation of accounting of fees and
redeemCollateralBalances
, so in a day-to-day operations, some users might not be able to redeem their funds until AMO returns the balance. Simply, the protocol has no way to recognize if the current borrow will put redemptions at risk or not, because it can just use the whole contract balance.Impact
Code Snippet
Tool used
Manual Review
Recommendation
Duplicate of #1
The text was updated successfully, but these errors were encountered: