SIP-200: Fix FeePool Rewards Distribution
| Author | |
|---|---|
| Status | Implemented |
| Type | Governance |
| Network | Ethereum & Optimism |
| Implementor | Mark E. Barrasso (@barrasso) |
| Release | Peacock |
| Proposal | Loading status... |
| Created | 2022-01-13 |
Simple Summary
Fix the FeePool contract such that only correctly authorized addresses can call setRewardsToDistribute.
Abstract
This update will fix the authorization logic on the setRewardsToDistribute function by properly implementing the legacy proxy system.
Motivation
The current authorization logic for the setRewardsToDistribute method can be circumvented due to an incomplete implementation. This resolves the issue.
Specification
Overview
We can apply the optionalProxy modifier to the setRewardsToDistribute function, such that the messageSender value is appropriately updated.
Rationale
The existing implementation would allow the function to execute if messageSender (in addition to msg.sender) were set to rewardsDistribution(). messageSender may be using a stale value because the optionalProxy modifier hasn't been applied to the setRewardsToDistribute function.
Technical Specification
This SIP has no implications for the public interface of Synthetix.
Test Cases
A unit test has been added to the relevant pull request for this SIP.
Configurable Values (Via SCCP)
N/A
Copyright
Copyright and related rights waived via CC0.