dao-contracts icon indicating copy to clipboard operation
dao-contracts copied to clipboard

Gauge Contracts

Open JakeHartnell opened this issue 1 year ago • 3 comments

Inspired by the Curve gauge system and forked from the Wynd DAO repo with history and Apache 2.0 license maintained.

These contracts have been modified to be more generic and support any type of DAO.

However, consider this a straw-man implementation. There are many improvements to be made!

  • [ ] More tests (consider refactoring with cw-orch)
  • [ ] Make improvements to GaugeAdapter API
  • [ ] Improve GaugeAdapter example (needs significant work, we may want more than one example)
  • [ ] Currently oes not handle small voting power numbers elegantly (a problem with NFT DAOs, where people might stake 1 NFT)
  • [ ] Better READMEs and documentation

Bonus:

  • [ ] Implement decay, so that people eventually have to re-express their preferences on the gauge
  • [ ] Think about how to hook in incentives from the dao-rewards-distributor contract so that DAOs can optional incentivize people to participate in gauges

If you are looking to contribute to this and want to understand how they work, the gauge-orchestrator README is a good place to start.

Twitter post and discussion.

Gauges in actual decentralize applications:

  • Curve: the OG
  • Wynd: what these are based on

Use cases:

  • Budget Allocation
  • Setting parameters
  • Incentives Allocation
  • Managing liquid staking protocols (choosing which validators to to delegate to)
  • etc.

JakeHartnell avatar Jul 04 '24 23:07 JakeHartnell

  • [ ] More tests (consider refactoring with cw-orch)
  • [ ] Make improvements to GaugeAdapter API
  • [ ] Improve GaugeAdapter example (needs significant work, we may want more than one example)

spearheading these three points this week! an additional gauge adapter template can be one that turns itself off after a specific # of times the gauges epoch occurs.

hard-nett avatar Jul 09 '24 22:07 hard-nett

  • [ ] More tests (consider refactoring with cw-orch)
  • [ ] Make improvements to GaugeAdapter API
  • [ ] Improve GaugeAdapter example (needs significant work, we may want more than one example)

spearheading these three points this week! an additional gauge adapter template can be one that turns itself off after a specific # of times the gauges epoch occurs.

AMAZING :heart:

JakeHartnell avatar Jul 16 '24 21:07 JakeHartnell

Codecov Report

Attention: Patch coverage is 98.34811% with 95 lines in your changes missing coverage. Please review.

Project coverage is 96.78%. Comparing base (a417f9d) to head (f56a129).

Files Patch % Lines
contracts/gauges/gauge/src/contract.rs 95.56% 36 Missing :warning:
contracts/gauges/gauge/src/helpers.rs 0.00% 13 Missing :warning:
contracts/gauges/gauge/src/state.rs 98.06% 10 Missing :warning:
contracts/gauges/gauge-adapter/src/bin/schema.rs 0.00% 8 Missing :warning:
contracts/gauges/gauge-adapter/src/contract.rs 97.85% 7 Missing :warning:
contracts/gauges/gauge/src/bin/schema.rs 0.00% 7 Missing :warning:
...tracts/gauges/gauge-adapter/src/multitest/suite.rs 94.38% 5 Missing :warning:
contracts/gauges/gauge/src/multitest/suite.rs 99.70% 2 Missing :warning:
contracts/gauges/gauge-adapter/src/error.rs 0.00% 1 Missing :warning:
contracts/gauges/gauge-adapter/src/msg.rs 92.30% 1 Missing :warning:
... and 5 more
Additional details and impacted files
@@               Coverage Diff               @@
##           development     #844      +/-   ##
===============================================
+ Coverage        96.64%   96.78%   +0.13%     
===============================================
  Files              241      262      +21     
  Lines            65544    71295    +5751     
===============================================
+ Hits             63347    69003    +5656     
- Misses            2197     2292      +95     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar Aug 14 '24 21:08 codecov[bot]