-
Notifications
You must be signed in to change notification settings - Fork 2
cergyk - UbiquityPool::mintDollar/redeemDollar collateral depeg will encourage using UbiquityPool to swap for better collateral #17
Comments
1 comment(s) were left on this issue during the judging contest. auditsea commented:
|
1 comment(s) were left on this issue during the judging contest. auditsea commented:
|
Should we also add 'Sponsor Disputed' label in this issue as well? @rndquu @pavlovcik @molecula451 |
It probably makes more sense to ask @AuditSea (not sure if this is the corresponding GitHub handle.) |
As far as I understand this issue describes the following scenario:
If DAI depegs then the Dollar token will also depeg mainly because DAI is used as an underlying collateral in the In case of a collateral depeg the only way to hedge Dollar depeg to some extent is to acquire fees and yield from AMO minters. This is not a 100% guarantee but I guess that if chainlink works fine (i.e. provides not too stale data) and we have 5% overcollateralization (from fees and yield) the Dollar token should not depeg too much.
I don't understand how reverting on minting and redeeming helps. Reverting in this case means acquiring bad debt since all operations are paused and abritragers are not able to bring the Dollar token back to the USD peg by burning Dollars which makes the Dollar token to depeg with greater force. |
@rndquu as a heads up we should only start with accepting |
Initially we plan to use only I think we should:
@molecula451 @gitcoindev Help |
|
The above sceneario makes much more sense on the current issue, a fix won't happen, this is most likely an invalid |
Escalate |
You've created a valid escalation! To remove the escalation from consideration: Delete your comment. You may delete or edit your escalation comment anytime before the 48-hour escalation window closes. After that, the escalation becomes final. |
In my issue #144, I described that the pool can run out of collateral if the collateral gets de-pegged. This means that users cannot redeem their uAD tokens for the underlying collateral. |
I really feel like collateral performance is out of scope for the audit. For whatever its worth, the reason why we are starting with LUSD is because it seems to have the least points of failure out of all the stablecoins I'm aware of. The tradeoff is its slight volatility and limited ability to scale. To me it comes across that you're saying that we need to include Liquity's entire protocol within our audit scope in order to confirm that a depeg isn't possible, and that our protocol will not fail. If this is in scope, why not proceed with Ethereum blockchain failures? If the network gets taken over, then fraudulent transactions can be generated to withdraw all of our collateral, rendering the protocol insolvent. etc |
Collateral depeg does harm the ubiquity protocol hence it is considered a valid issue (not sure what severity though) |
@evmboi32 Ok, depeg happens, collateral's price is now out of min/max range and redemptions are now failing (proposed in #144 solution). Then what? Wait and hope the collateral to repeg? |
@CergyK Are you aware if Ubiquity has a circuit breaker for depeg events? To me if they lack one, this will constitute as a valid medium severity finding as a depeg does directly undermine the protocols available collateral. This is in addition to the depeg scenario not being stated as an accepted risk by the protocol in the contest details (to my knowledge, most of the time, a stablecoin protocol would acknowledge the risks of a depeg scenario and even have a circuit breaker in place). |
no we don't have circuit breaker @nevillehuang |
The maximum divergence of the market price from the oracle feed should be within the fee charged. Planning to accept the escalation and invalidate the issue. |
We have our staking contract that allows us to manipulate single sided liquidity on our metapool to directly change the price right now. |
Result: |
Escalations have been resolved successfully! Escalation status:
|
@Czar102 I don't understand the argument for invalidating this report, could you explain a little more? From my point of view, I submitted report #217 because when calculating the amount of collateral a user will receive when redeeming, the real price of the dollar token is not used, but it is assumed to always be $1. Let me give an example:
Wouldn't it be better to use the real price of the dollar token when determining the amount of collateral to be received in exchange for the dollar tokens? This way, each user will receive a proportional share of the available collateral, and there will not be a situation where there are dollar tokens in circulation without collateral behind them. |
we will leavy it as invalid |
@gstoyanovbg thank you for the comment. We had an extensive internal discussion about this issue and some of the other ones, considerations about the exact behavior you are describing. There is a chance we may revert this escalation's resolution, if we determine that this has been a misjudgment. I would recommend looking at #60 as a core cause of this issue. |
Will consider this a valid Medium and change the escalation resolution status. |
cergyk
high
UbiquityPool::mintDollar/redeemDollar collateral depeg will encourage using UbiquityPool to swap for better collateral
Summary
In the case of a depeg of an underlying collateral, UbiquityPool mechanism incentivises users to fill it up with the depegging collateral and taking out the better collateral. This means uAD ultimately depegs as well.
Vulnerability Detail
Chainlink price may be slightly outdated with regards to actual Dex state, and in that case users holding a depegging asset (let's consider
DAI
depegging) will use uAD to swap for the still pegged collateral:LUSD
. By doing that they expect a better execution than on Dexes, because they swap at the price of chainlink minus the uAD fee:https://github.com/sherlock-audit/2023-12-ubiquity/blob/main/ubiquity-dollar/packages/contracts/src/dollar/libraries/LibUbiquityPool.sol#L358-L364
This in turn fills the reserves of UbiquityPool with the depegging collateral and depletes the reserves of
good
collateral.Impact
A depegging collateral will cause uAD to depeg because users are incentivised to use the pool to swap for the
better
assetCode Snippet
Tool used
Manual Review
Recommendation
Multiple solutions may be studied:
The text was updated successfully, but these errors were encountered: