near-daos / sputnik-dao-contract

Smart contracts for https://app.astrodao.com
https://astrodao.com/
MIT License
108 stars 77 forks source link

Add/replace staking contracts #70

Closed starpause closed 2 years ago

starpause commented 2 years ago

Via Telegram chat... Right now the staking contract is a plug-inable interface to allocate votes. Currently a DAO can only accept a staking contract (and can't replace or add one), which I would like to see happen in the future.

TrevorJTClarke commented 2 years ago

Following up on this, here's some thoughts: Current limitation here: https://github.com/near-daos/sputnik-dao-contract/blob/main/sputnikdao2/src/proposals.rs#L391

Changing the staking contract has severe implications, but could be done given the following parameters are met:

  1. All delegations are completely removed, such that staking users is empty
  2. The total delegations reflects 0 - total_amount

Could be missing other requirements, but those items are the key pieces needed to check. With those contextual items in mind, it could be possible to change staking contract if there was an implementation that covered checks, within the staking logic interfaces