syvita/daoos

Create Vault contract

LNow opened this issue · 7 comments

LNow commented

Create initial version of Vault contract that will let us:

  • deposit STX
  • transfer STX to different address
  • check total balance

Nice to have:

  • deposit any fungible token compliant with SIP-10-FT
  • transfer any fungible token to different address
  • check total balance of every single type of FT available in Vault

What permission should we use for transfer?

LNow commented

My main idea was to keep permissions as simple as possible. Same as it has been done with Linux file permissions:
Read - lets you read file
Write - lets you write to a file
Execute - lets you execute file

By following this principle if we need a permission that will let users call transfer function - we name the permission transfer.

Zk2u commented

It should be an internal method that's only callable after a majority vote (for transferring funds).

Do you want to include the voting logic into the vault?

LNow commented

No.
By keeping them separate we'll be able to implement multiple voting possibilities (with plugins);

  • voting by pledging STX
  • voting by pledging internal DAO tokens
  • voting by saying YES/NO (signing simple transaction)
  • secret voting where first you vote YES/NO and your vote is secret until the revealing phase.
  • voting base on reputation (you put at stake some internal reputation points)
  • etc.

And vault has nothing to do with voting and the other way around.

Create initial version of Vault contract that will let us:

  • deposit STX
  • transfer STX to different address
  • check total balance

Nice to have:

  • deposit any fungible token compliant with SIP-10-FT
  • transfer any fungible token to different address
  • check total balance of every single type of FT available in Vault

I think we can assume RBAC and Vault contracts as components of DAO container in c4model, right?. Also any other plugins will be released later

LNow commented

After recent discussion I think we won't have RBAC at all. And I don't know if Vault should be build as separate contract or not. Thus I'm waiting for detailed design.