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

Extend cw-vesting to allow for staking in DAOs #782

Closed
wants to merge 5 commits into from

Conversation

JakeHartnell
Copy link
Member

Closes #779

This topic keeps coming up in spaces and I wanted to explore how difficult it would be. This PR is a strawman solution (couldn't help myself 😂). DO NOT MERGE.

Some observations:

  • Need to restrict which staking contracts a vesting contract can stake with as that could be a way to sneak out unvested funds if the staking contract is not trusted.
  • Not supporting the ability to propose drastically simplifies things as we don't have to worry about deposits getting refunded.
  • Not supporting cw20 greatly simplifies things, but we may want to add support for that for use with the $DAO token?
  • Doesn't really impact core logic too much and so should be relatively safe and cheep to audit.
  • Frontend would certainly require work with this approach... but hard to imagine an approach where that wouldn't be the case.

IMO, much simpler if we don't support vested accounts making
proposals... otherwise we have to worry about having to slash deposits.

Maybe best to keep things simple?
@NoahSaso
Copy link
Member

Features derived from list above and discussion in Monday call:

  • Mutable allowlist of contracts the staking contract can interact with (should be instantiated with the voting module / staking contract)
  • Ability to passthrough wasm messages to the allowlisted contracts, so that the owner can send returned deposits back to themself for example
  • Flag to enable or disable staking (maybe just via the allowlist being empty or not)
  • Multiplier for voting power derived from remaining vesting
  • Require proposal deposits to be already vested (i.e. liquid and transferrable)

@JakeHartnell
Copy link
Member Author

Related issues we may also want to consider when working on this:

@JakeHartnell
Copy link
Member Author

Limits on voting power for vested tokens could be achieved with #746.

@NoahSaso
Copy link
Member

NoahSaso commented Jan 8, 2024

Closing as this is not the design we are going to pursue to add voting support for vesting tokens.

@NoahSaso NoahSaso closed this Jan 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

cw-vesting should allow for staking in DAOs
2 participants