This repository has been archived by the owner on Jul 14, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
0xAlix2 - AmoMinter can borrow collateral more than what's free/available #1
Labels
Escalation Resolved
This issue's escalations have been approved/rejected
Non-Reward
This issue will not receive a payout
Price: 100 USD
Priority: 1 (Normal)
Sponsor Confirmed
The sponsor acknowledged this issue is valid
Time: <4 Hours
Will Fix
The sponsor confirmed this issue will be fixed
Comments
github-actions
bot
added
the
Excluded
Excluded by the judge without consulting the protocol or the senior
label
Jan 14, 2024
1 comment(s) were left on this issue during the judging contest. 0xLogos commented:
|
github-actions
bot
added
Medium
A valid Medium severity issue
Has Duplicates
A valid issue with 1+ other issues describing the same vulnerability
and removed
Excluded
Excluded by the judge without consulting the protocol or the senior
labels
Jan 16, 2024
This was referenced Jan 16, 2024
Closed
Closed
Closed
sherlock-admin
added
the
Escalation Resolved
This issue's escalations have been approved/rejected
label
Feb 14, 2024
The protocol team fixed this issue in PR/commit ubiquity/ubiquity-dollar#882. |
/start |
Tips:
|
+ Evaluating results. Please wait... |
# No linked pull requests to close |
cross-side ref PR by rndqnuu #1 (comment) |
! No price label has been set. Skipping permit generation. |
+ Evaluating results. Please wait... |
|
View | Contribution | Count | Reward |
---|---|---|---|
Issue | Comment | 2 | 3 |
Conversation Incentives
Comment | Formatting | Relevance | Reward |
---|---|---|---|
PR Fix Confirmation: https://github.com/ubiquity/ubiquity-dollar... | 1.1 | 0.39 | 1.1 |
cross-side ref PR by rndqnuu https://github.com/sherlock-audit/2... | 1.9 | 0.85 | 1.9 |
[ 2.5 WXDAI ]
@gitcoindev
Contributions Overview
View | Contribution | Count | Reward |
---|---|---|---|
Issue | Comment | 1 | 2.5 |
Conversation Incentives
Comment | Formatting | Relevance | Reward |
---|---|---|---|
@rndquu I agree with your comment. Since we do not use AMO minte... | 2.5 | 0.51 | 2.5 |
[ 104.4 WXDAI ]
@rndquu
Contributions Overview
View | Contribution | Count | Reward |
---|---|---|---|
Issue | Task | 1.00 | 100 |
Issue | Comment | 1 | 0 |
Issue | Comment | 1 | 4.4 |
Conversation Incentives
Comment | Formatting | Relevance | Reward |
---|---|---|---|
@gitcoindev @molecula451AMO minters are trusted so it's bas... | - | 0.5 | - |
@gitcoindev @molecula451AMO minters are trusted so it's bas... | 4.4 | 0.5 | 4.4 |
sherlock-admin
removed
the
Has Duplicates
A valid issue with 1+ other issues describing the same vulnerability
label
Feb 20, 2024
The Lead Senior Watson signed off on the fix. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
Escalation Resolved
This issue's escalations have been approved/rejected
Non-Reward
This issue will not receive a payout
Price: 100 USD
Priority: 1 (Normal)
Sponsor Confirmed
The sponsor acknowledged this issue is valid
Time: <4 Hours
Will Fix
The sponsor confirmed this issue will be fixed
0xAlix2
medium
AmoMinter can borrow collateral more than what's free/available
Summary
AmoMinters can borrow collateral from the protocol to earn yield in external protocols like Compound, and Curve, ... This can be done using the
amoMinterBorrow
function, which sends the "amount" of collateral to the targeted AmoMinter. However, this function doesn't check the validity of the borrowed amount, i.e. it doesn't check if the protocol has enough "free" amount before going ahead and sending the collateral.Vulnerability Detail
AmoMinter can borrow a collateral amount even if it is included in an unclaimed collateral storage. So if a user calls
redeemDollar
on certain collateral, and an AmoMinter borrows the full amount of collateral, that user won't be able to callcollectRedemption
, forcing him to lose his dollar tokens for nothing in return. As the transferred "borrowed" amount won't consider the unclaimed collateralunclaimedPoolCollateral[collateralIndex]
.Impact
Loss of funds (dollar tokens).
Code Snippet
https://github.com/sherlock-audit/2023-12-ubiquity/blob/main/ubiquity-dollar/packages/contracts/src/dollar/libraries/LibUbiquityPool.sol#L574-L598
Tool used
Manual Review + vscode
Recommendation
Add the following
require
statement in theamoMinterBorrow
function in theLibUbiquityPool
library.The text was updated successfully, but these errors were encountered: