Closed sherlock-admin2 closed 10 months ago
1 comment(s) were left on this issue during the judging contest.
auditsea commented:
The goal of fee taken for mint/redeem is to hedge the risk of price deviation
1 comment(s) were left on this issue during the judging contest.
auditsea commented:
The goal of fee taken for mint/redeem is to hedge the risk of price deviation
0xnirlin
high
Loss of fee in
ubiquity.sol
Summary
In
ubiquity.sol
fee is collected but there is no way to withdraw that fee from the contract and is completely stuck in the contract.Vulnerability Detail
Fee is collected at two points:
This means, there while redemption the fee is collected in the form of collateral tokens which remain in
Ubiquity.sol()
and are not collected as there is no such withdraw function.Also, there is no way to track how much fee has been collected as it is never stored on chain.
Impact
Fee is stuck.
Code Snippet
https://github.com/sherlock-audit/2023-12-ubiquity/blob/d9c39e8dfd5601e7e8db2e4b3390e7d8dff42a8e/ubiquity-dollar/packages/contracts/src/dollar/libraries/LibUbiquityPool.sol#L399-L517
Tool used
cATS
Recommendation
Track the fee collected and add a withdraw function.
Duplicate of #36