Squads-Protocol / squads-mpl

Squads Multisig Program Library
GNU Affero General Public License v3.0
95 stars 34 forks source link

Feature Proposal: Treasury Account #44

Open ebrightfield opened 1 year ago

ebrightfield commented 1 year ago

Problem: Currently, it is difficult to use multisig signers as funders of lamports, and it requires downstream implementations to use modify lamports directly instead of using a Transfer system instruction. This potentially prevents the use of a Squad as an authority, creator, and/or funder of various account types in the ecosystem. Sometimes there are workarounds, e.g. if there is a separate "funder" field where a system-program owned account can be specified, but this is not always the case and furthermore requires the use of nonce accounts due to time constraints assocaited with recent blockhashes.

Solution: Each Squad could have a System-program owned PDA derived from the Squad's public key. The Squads MPL program could then sign using that PDA on proposals that involve the use of that address as a signer, thus allowing for direct use of the system program instructions to create accounts and transfer lamports. This greatly expands the possible use cases.