GaugeWeightRouter¶
ELI5: Reads governance votes and tells Keep how to split money across strategies — and nothing else.
What you can do¶
| Function | Who |
|---|---|
push_weights / epoch hook |
Permissionless keeper |
set_allocations on vault |
Router (ALLOCATOR_ROLE only) |
Flywheel fit¶
Connects veForge votes → Keep capital deployment without touching CDPs.
flowchart LR
GC[GaugeController] --> GWR[GaugeWeightRouter]
GWR -->|ALLOCATOR_ROLE| MSV[MultiStrategyVault.set_allocations]
Votes retilt weights within each strategy's max_debt — cannot exceed caps.
Contract walkthrough¶
GaugeWeightRouter.vy (veForge repo):
- Reads gauge weights at epoch boundary
- Maps gauge IDs → strategy allocation bps
- Calls vault
set_allocations— only function granted to router
COMP-2 fix: least-privilege ALLOCATOR_ROLE — not full STRATEGY_MANAGER_ROLE.
Sepolia¶
| Contract | Address |
|---|---|
| GaugeWeightRouter | 0xa4AA7A6f6a8d615AE1a6Fca881820B913db7a16C |
What can go wrong¶
Risks
- Wrong gauge mapping → suboptimal yield, not CDP drain.
- Compromised allocator role scope still limited to
set_allocations. - Epoch timing — weights activate Thu 00:00 UTC.
See GaugeController.
Source: khomdev-veforge/src/GaugeWeightRouter.vy