-
Notifications
You must be signed in to change notification settings - Fork 2
cergyk - LibTWAPOracle::setPool Dos on setPool by donating a few wei of 3CRV directly to the metapool #14
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:
|
The recommendation states to "Accept a slight imbalance between the balances of uAD and 3CRV" but this can also lead to potential DOS. I think we can simply remove this line. |
I did a research on GitHub and indeed other pool implementations just use
also some pools check for overflow therefore since 2 lines above this line we check for reserves it is safe to remove this line. |
This overflow check is needed because of downcasting from |
|
I agree with the escalation. This issue has the same impact as front-running initializers, which is making the deployment useless (easily detectable) without a loss of funds. This impact is not accepted by Sherlock rules as a Medium severity issue, hence planning to consider this a low. Planning to accept the escalation and invalidate the issue. |
Result: |
Escalations have been resolved successfully! Escalation status:
|
@molecula451 the deadline is at 2024-02-17T13:22:13.234Z |
@rndquu the deadline is at 2024-02-17T13:22:20.571Z |
# No linked pull requests to close |
+ Evaluating results. Please wait... |
|
View | Contribution | Count | Reward |
---|---|---|---|
Issue | Comment | 1 | 1.1 |
Conversation Incentives
Comment | Formatting | Relevance | Reward |
---|---|---|---|
PR Confirmation fix: https://github.com/ubiquity/ubiquity-dollar... | 1.1 | 0.65 | 1.1 |
[ 8.4 WXDAI ]
@gitcoindev
Contributions Overview
View | Contribution | Count | Reward |
---|---|---|---|
Issue | Comment | 1 | 8.4 |
Conversation Incentives
Comment | Formatting | Relevance | Reward |
---|---|---|---|
> @gitcoindev @molecula451 > > The recommendation states to "... | 8.4a: count: 3 score: "3" words: 7 code: count: 1 score: "1" words: 13 | 0.695 | 8.4 |
[ 42.4 WXDAI ]
@rndquu
Contributions Overview
View | Contribution | Count | Reward |
---|---|---|---|
Issue | Task | 1.00 | 25 |
Issue | Comment | 2 | 0 |
Issue | Comment | 2 | 17.4 |
Conversation Incentives
Comment | Formatting | Relevance | Reward |
---|---|---|---|
@gitcoindev @molecula451The recommendation states to "Accep... | -a: count: 1 score: "0" words: 1 | 0.86 | - |
> > @gitcoindev @molecula451 > > The recommendation states to "... | -a: count: 5 score: "0" words: 9 code: count: 5 score: "0" words: 17 | 0.81 | - |
@gitcoindev @molecula451The recommendation states to "Accep... | 4.3a: count: 1 score: "1" words: 1 | 0.86 | 4.3 |
> > @gitcoindev @molecula451 > > The recommendation states to "... | 13.1a: count: 5 score: "5" words: 9 code: count: 5 score: "5" words: 17 | 0.81 | 13.1 |
The protocol team fixed this issue in PR/commit ubiquity/ubiquity-dollar#883. |
The Lead Senior Watson signed off on the fix. |
cergyk
medium
LibTWAPOracle::setPool Dos on setPool by donating a few wei of 3CRV directly to the metapool
Summary
LibTWAPOracle::setPool
relies on a perfect match between the initial balance of uAD and 3CRV in the pool, which means that a malicious user can front-run the admin call tosetPool
and donate a few wei of 3CRV to the pool in order to make the call revert.Vulnerability Detail
We can see the the admin function
LibTWAPOracle::setPool
, checks that the balances of uAD and 3CRV are perfectly equal:https://github.com/sherlock-audit/2023-12-ubiquity/blob/main/ubiquity-dollar/packages/contracts/src/dollar/libraries/LibTWAPOracle.sol#L51
This means that a malicious user can front-run the call to setPool by donating a few wei of 3CRV directly to the metapool, in which case the balances will not match. The admin will not be able to set the pool as the function will revert
Impact
The feature of migrating to a new pool will be DoSed temporarily, as long as the attacker keeps sending a few wei to the metapool contract
Code Snippet
Tool used
Manual Review
Recommendation
Accept a slight imbalance between the balances of uAD and 3CRV (by a few dollars), in order to make this kind of DoS economically impractical for the attacker
The text was updated successfully, but these errors were encountered: