Skip to content

fix(dec-20-audit): [H01] fix optimistic oracle fee burning logic when final fee == 0#2429

Merged
mrice32 merged 3 commits intoUMAprotocol:masterfrom
mrice32:fix_ooo
Jan 20, 2021
Merged

fix(dec-20-audit): [H01] fix optimistic oracle fee burning logic when final fee == 0#2429
mrice32 merged 3 commits intoUMAprotocol:masterfrom
mrice32:fix_ooo

Conversation

@mrice32
Copy link
Copy Markdown
Member

@mrice32 mrice32 commented Jan 19, 2021

Motivation

OpenZeppelin pointed out an issue in the H01 fix. In the (admittedly unlikely) case that the final fee is 0, the burned portion of the bond gets trapped in the optimistic oracle contract and can never be retrieved.

Summary

This fixes the issue by conditioning the payout on the sum of the burned bond and the final fee being > 0, which was the original intention of the code.

Issue(s)

N/A

… fee == 0

Signed-off-by: Matt Rice <matthewcrice32@gmail.com>
@mrice32 mrice32 requested review from a team, chrismaree and pemulis and removed request for a team January 19, 2021 19:16
Signed-off-by: Matt Rice <matthewcrice32@gmail.com>
@mrice32 mrice32 requested review from daywiss and nicholaspai and removed request for chrismaree and pemulis January 19, 2021 19:20
Copy link
Copy Markdown
Member

@nicholaspai nicholaspai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Signed-off-by: Matt Rice <matthewcrice32@gmail.com>
@coveralls
Copy link
Copy Markdown

Coverage Status

Coverage increased (+0.003%) to 93.287% when pulling dd9eeee on mrice32:fix_ooo into e6a54e6 on UMAprotocol:master.

@mrice32 mrice32 merged commit 32c27fe into UMAprotocol:master Jan 20, 2021
@mrice32 mrice32 deleted the fix_ooo branch January 20, 2021 00:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants