-
Notifications
You must be signed in to change notification settings - Fork 0
replace hh dynamic threshold calc with stakedao version #156
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
Conversation
Xeonus
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need to change calculation for minimum bribe amount, see comment in relevant section
| raise ValueError("No valid CPV data found in StakeDAO analytics") | ||
| return statistics.mean(cpv_values) | ||
|
|
||
| def calculate_dynamic_min_incentive( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This calculation is not correct IMO
calculate_dynamic_min_incentive does not account for Aura's veBAL share.
Current logic:
min_incentive = max_votes * 0.001 * (1 + buffer_pct) * avg_cpv
This returns the minimum general bribe portion needed. That is wrong. We need to estimate how much of those incentives go to AURA based on AURAs veBAL share
What's needed:
min_aura_portion = max_votes * 0.001 * (1 + buffer_pct) * avg_cpv
min_total_bribe = min_aura_portion / aura_vebal_share
This returns the minimum total bribe so that after the split, Aura's portion still meets the threshold.
Example: if we place $500 combined and if Auras veBAL share is 65%, then the bribes visible to the Aura Votemarket is $500*0.65=$325, so we need to check that the minimum total bribe for both markets leads to be above the minimum threshold for the Aura portion of the combined market.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good point. ya, threshold needs to be based on the aura portion. fixed in 79a8fed
|
also added fix for unrelated failing test: 4feaf10 |
Xeonus
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- correct split calculation
- tests all pass now
- correct removal of unneccesary components
#155 - threshold comes out to $260