replace hh dynamic threshold calc with stakedao version#156
replace hh dynamic threshold calc with stakedao version#156gosuto-inzasheru merged 4 commits intomainfrom
Conversation
Xeonus
left a comment
There was a problem hiding this comment.
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.
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.
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.
- correct split calculation
- tests all pass now
- correct removal of unneccesary components
#155 - threshold comes out to $260