Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ADD-05 MitigationConfirmed #12

Open
c4-bot-7 opened this issue Sep 14, 2024 · 1 comment
Open

ADD-05 MitigationConfirmed #12

c4-bot-7 opened this issue Sep 14, 2024 · 1 comment
Labels
mitigation-confirmed MR-ADD-05 satisfactory satisfies C4 submission criteria; eligible for awards

Comments

@c4-bot-7
Copy link
Contributor

Lines of code

Vulnerability details

See:

Pull Request

This PR is among the additional scope to be reviewed.

Reserve attempts to introduce a new functionality that allows governance to forcibly settle an auction, in the case of, say a censorship.

This imo has been sufficiently done.

After going through all 6 modified files we have a new supported method and the governance can achieve this by querying the newly implemented forceSettleTrade()

+    // === Governance ===

+     /// Forcibly settle a trade, losing all value
+     /// Should only be called in case of censorship
+     /// @param trade The trade address itself
+     /// @custom:governance
+     function forceSettleTrade(ITrade trade) public virtual governance {
+         // should not call any ERC20 functions, in case bricked
+
+         IERC20Metadata sell = trade.sell();
+         delete trades[sell];
+         tradesOpen--;
+         emit TradeSettled(trade, sell, trade.buy(), 0, 0);
+     }
c4-bot-1 added a commit that referenced this issue Sep 14, 2024
@c4-judge c4-judge added the satisfactory satisfies C4 submission criteria; eligible for awards label Sep 18, 2024
@c4-judge
Copy link

thereksfour marked the issue as satisfactory

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
mitigation-confirmed MR-ADD-05 satisfactory satisfies C4 submission criteria; eligible for awards
Projects
None yet
Development

No branches or pull requests

2 participants