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

Solver accounting restructuring #427

Open
fhenneke opened this issue Nov 13, 2024 · 0 comments
Open

Solver accounting restructuring #427

fhenneke opened this issue Nov 13, 2024 · 0 comments

Comments

@fhenneke
Copy link
Collaborator

It might be required to change the structure of solver rewards in the short to midterm. The goal would be to make it easier to understand the components of solver accounting, make it easier to debug problems, and inform design decisions for the accounting in the long term.

A design I currently have in mind would split the solver payments into three parts

  • solver rewards for batches (and quotes); paid to solvers
  • protocol and partner fees; paid by solvers to the protocol and by the protocol to partners
  • buffer accounting; paid by the protocol to solvers

Data for each component is computed separately. Data is optionally combined when generating transfers from the data.

In pseudo code, it could look as follows

def propose_payments()
    rewards = compute_rewards()
    protocol_fees = compute_protocol_and_partner_fees()
    buffer_accounting = compute_buffer_accounting()

    payments = merge_data(rewards, protocol_fees, buffer_accounting)

    transfers = generate_transfers(payments)

    post_transfers(transfers)

Data fetchers and configs could be passed explicitly to those functions. Since different steps are more self-contained, it should be easier to test and to debug errors.

This design would make it easy to, e.g., skip calling a slippage query for buffer accounting when computing payments on Gnosis. Or to stop merging negative slippage with positive rewards.

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