openlawteam / tribute-contracts

A new modular DAO framework, inspired by the Moloch smart contracts
https://tributedao.com
MIT License
297 stars 110 forks source link

Adapter: SignUp #511

Open fforbeck opened 2 years ago

fforbeck commented 2 years ago

If the DAO is configured to work with an external token (ERC20 that implements the getPriorAmount function), any token holder is eligible to become a DAO member.

However, just holding the token is not enough to become a member. Mainly because the DaoRegistry.sol relies on a member list: https://github.com/openlawteam/tribute-contracts/blob/master/contracts/core/DaoRegistry.sol#L128, and to update that list we need to "onboard" the token holders.

One idea is to create a SignUp adapter. The SignUp adapter will have a public function that any token holder is allowed to call it. This function will check if the msg.sender actually holds the external token configured in the DAO (balance > 0), if so, the token holder account gets added to the DaoRegistry.sol membership list, and the holder has signed up as a DAO member.