You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jul 14, 2024. It is now read-only.
DuplicateA valid issue that is a duplicate of an issue with `Has Duplicates` labelMediumA valid Medium severity issueRewardA payout will be made for this issue
Fragile collateralization model will likely cause bad debt
Summary
Users are allowed to fully mint on their collateral value, potentially causing bad debt as soon as the collateral price drops.
Vulnerability Detail
The Ubiquity Pool allows users to mint Dollar tokens (uAD) by depositing collateral. The amount of uAD tokens a user is allowed to mint is given by the getDollarInCollateral() function:
This function takes the requested uAD amount (dollarAmount) and divides it by the current collateral price (poolStorage.collateralPrices[collateralIndex]), returned by Chainlink. This basically means that users are allowed to fully mint on their collateral value, the effective LTV on all collaterals is 100%.
This creates an extremely fragile ecosystem: whenever the price of an asset drops this will instantly mean bad debt for the protocol. Even if the collateral tokens are going to be non-volatile assets such as stablecoins DAI or LUSD, there is no guarantee that these are going to be always pegged to 1 USD. For example, there are times in which DAI dropped significantly from the $1 peg.
Impact
The collateralization model will fail as soon as any supported collateral drops in value, creating bad debt in the pool.
Introduce LTV configurations on collaterals to allow minting up to a certain value of the deposited collateral. Allow and incentivize liquidations to avoid bad debt in the protocol.
1 comment(s) were left on this issue during the judging contest.
auditsea commented:
The issue describes about the protocol insolvancy in case of collateral depeg. It's not avoidable, that's why the protocol has borrowing function to get yield, take fees on mint and redeem, these features will hedge the risk from protocol insolvancy
github-actionsbot
added
Medium
A valid Medium severity issue
Duplicate
A valid issue that is a duplicate of an issue with `Has Duplicates` label
and removed
Excluded
Excluded by the judge without consulting the protocol or the senior
labels
Jan 16, 2024
1 comment(s) were left on this issue during the judging contest.
auditsea commented:
The issue describes about the protocol insolvancy in case of collateral depeg. It's not avoidable, that's why the protocol has borrowing function to get yield, take fees on mint and redeem, these features will hedge the risk from protocol insolvancy
sherlock-admin2
changed the title
Soft Coconut Mongoose - Fragile collateralization model will likely cause bad debt
fugazzi - Fragile collateralization model will likely cause bad debt
Jan 24, 2024
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
DuplicateA valid issue that is a duplicate of an issue with `Has Duplicates` labelMediumA valid Medium severity issueRewardA payout will be made for this issue
fugazzi
high
Fragile collateralization model will likely cause bad debt
Summary
Users are allowed to fully mint on their collateral value, potentially causing bad debt as soon as the collateral price drops.
Vulnerability Detail
The Ubiquity Pool allows users to mint Dollar tokens (uAD) by depositing collateral. The amount of uAD tokens a user is allowed to mint is given by the
getDollarInCollateral()
function:This function takes the requested uAD amount (
dollarAmount
) and divides it by the current collateral price (poolStorage.collateralPrices[collateralIndex]
), returned by Chainlink. This basically means that users are allowed to fully mint on their collateral value, the effective LTV on all collaterals is 100%.This creates an extremely fragile ecosystem: whenever the price of an asset drops this will instantly mean bad debt for the protocol. Even if the collateral tokens are going to be non-volatile assets such as stablecoins DAI or LUSD, there is no guarantee that these are going to be always pegged to 1 USD. For example, there are times in which DAI dropped significantly from the $1 peg.
Impact
The collateralization model will fail as soon as any supported collateral drops in value, creating bad debt in the pool.
Code Snippet
https://github.com/sherlock-audit/2023-12-ubiquity/blob/main/ubiquity-dollar/packages/contracts/src/dollar/libraries/LibUbiquityPool.sol#L284-L294
Tool used
Manual Review
Recommendation
Introduce LTV configurations on collaterals to allow minting up to a certain value of the deposited collateral. Allow and incentivize liquidations to avoid bad debt in the protocol.
Duplicate of #17
The text was updated successfully, but these errors were encountered: