Skip to content

fix: [C01] fixes issue where disputes are impossible in the OptimisticRewarder#3690

Merged
mrice32 merged 3 commits intoUMAprotocol:masterfrom
mrice32:ddispute
Dec 14, 2021
Merged

fix: [C01] fixes issue where disputes are impossible in the OptimisticRewarder#3690
mrice32 merged 3 commits intoUMAprotocol:masterfrom
mrice32:ddispute

Conversation

@mrice32
Copy link
Copy Markdown
Member

@mrice32 mrice32 commented Dec 13, 2021

Motivation

When disputing a reward request, the OptimisticRewardBase contract first triggers a proposal on the
SkinnyOptimisticOracle and then disputes that proposal. However, the proposal sets the expiration
time as an offset from the current (dispute) time, while the dispute specifies the expiration as an offset
from the time of the original reward request. In most cases, this discrepancy will prevent the oracle
from identifying the proposal to be disputed, which means valid disputes will not be processed and
invalid reward requests will be accepted.

Consider updating the dispute invocation to correctly specify the proposal to be disputed.

Summary

This changes the timestamp passed into the Request object provided to the dispute function to match what the SkinnyOptimisticOracle sets.

Testing

Check a box to describe how you tested these changes and list the steps for reviewers to test.

  • Ran end-to-end test, running the code as in production
  • New unit tests created
  • Existing tests adequate, no new tests required
  • All existing tests pass (updated existing tests to cover this case by modifying the dispute timestamps)
  • Untested

Issue(s)

N/A

…cRewarder

Signed-off-by: Matt Rice <matthewcrice32@gmail.com>
Signed-off-by: Matt Rice <matthewcrice32@gmail.com>
Signed-off-by: Matt Rice <matthewcrice32@gmail.com>
@mrice32 mrice32 added the audit-fix-phase6 Fixes for Phase 6 (Cross-chain oracle, optimistic rewarder, decentralized proposer) label Dec 14, 2021
Copy link
Copy Markdown
Member

@chrismaree chrismaree left a comment

Choose a reason for hiding this comment

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

this catch is excellent. indeed a critical severity issue! good fix

@mrice32 mrice32 merged commit 6f12f32 into UMAprotocol:master Dec 14, 2021
@mrice32 mrice32 deleted the ddispute branch December 14, 2021 14:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

audit-fix-phase6 Fixes for Phase 6 (Cross-chain oracle, optimistic rewarder, decentralized proposer)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants