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

Implement the payout Curve #104

Open
jellegerbrandy opened this issue Mar 21, 2022 · 1 comment
Open

Implement the payout Curve #104

jellegerbrandy opened this issue Mar 21, 2022 · 1 comment

Comments

@jellegerbrandy
Copy link
Collaborator

jellegerbrandy commented Mar 21, 2022

So the idea is that bounties are paid out according to a curve determined by (a) ta given percentage and (b) a maximum payout

This curve is described here:
https://docs.google.com/document/d/157koANfmBxzsyX3MQvDioGo8xfQHfiH0uZorEGNP10Q/edit

In that document, a payout curve is proposed that depends on two arguments: a severity of the bug S which is a number 0 <= S <= 1 , and a maximum payout C. So the amount that will be paid to the hacker is a function F(S, M) given by:

S * C * (1-exp(-V/C))

One problem with this is that solidity does not implement exponential curves natively, and so implementation is complex and relatively expensive.

An alternative is to implement a much simpler curve:

S * min(V, C)

Maximum expressed in dollar values, so we need an oracle :)

@jellegerbrandy jellegerbrandy changed the title Implement the payout Curve Implement the payout Curve [discussion] Mar 23, 2022
@jellegerbrandy
Copy link
Collaborator Author

OR we can use https://github.com/paulrberg/prb-math

@jellegerbrandy jellegerbrandy changed the title Implement the payout Curve [discussion] Implement the payout Curve Apr 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant