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

control the minimum amount that can be redistributed or recycled in fee disbursal #329

Open
8 tasks
rudolfix opened this issue Feb 20, 2020 · 0 comments
Open
8 tasks
Assignees

Comments

@rudolfix
Copy link

Background
We allow holders to redistribute their payouts in FeeDisbursal contract and we allow anyone to recycle old payouts back to the community.
This is very desirable feature and was not the problem until gas price for READ operation rose and we expect it to go insanely high as proposed here https://ethereum-magicians.org/t/protocol-changes-to-bound-witness-size/3885
Increasing cost combined with many redistributions will increase transaction costs of claiming the payouts and may exceed the block limit easily (we can claim in tranches but why people should pay for this)
Therefore we want to replace the controller with one that will put a minimum limit on redistributed amounts

What to do

  • allow ROLE_DISBURSAL_MANAGER to set minimum limits for redistributions per any payment token on FeeDisbursalController
  • provide method to read current limit
  • enforce those limits in onDisburse method. mind that redistributions are defined by disbursals that are done by the FeeDisbursal contract itself (see recycyle and reject methods~).
  • add migration step where controller will be replaced and limits for ETHER TOKEN is set to 0.1 ETH and on EURO TOKEN to 10 EUR
  • new controller is fully compatible with old one if limits are not set!

Testing

  • full unit tests for enforcing the limits on both recycle and redistribute.
  • if no limits are set at all, the behavior is identical to old controller

Deployment

  • ABI change for FeeDisbursalController must be distributed in forked_live and live artifacts when deploying to those networks.
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

No branches or pull requests

1 participant