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

Optionally use a Payments app instead of a Vault to initialize the app #35

Open
sembrestels opened this issue Jan 30, 2020 · 0 comments

Comments

@sembrestels
Copy link
Member

Conviction Voting app should be able to be initialized with an Escrow / Payments app (see #34) as well as a Vault app.

At this moment we are using the vault.transfer() and vault.balance() functions to transfer funds when a proposal is approved and watch the funds to calculate the threshold. These functions should also be available in the Payments app, being the vault functions available by object componentization or inheritance, still not clear:

  • In the case of componentization, we could initialize CV with a Payments app that interfaces between CV and a Finance and/or a Vault/Agent apps. We could have the Payments app on top of Finance, or use it as a substitute of Finance.
    • In order to record the transfer in the Finance app, we should initialize the Payments app with a Finance instance as it is done by the payroll app and use the function finance.newImmediatePayment() to retrieve the funds from the Vault.
    • payments.transfer() and payments.balance() should redirect to payments.finance().newImmediatePayment() and payments.finance().vault().balance() respectively.
  • In the case of Vault inheritance, we would be doing a Vault on steroids (as Agent is). We would have all-in-one app: a vault, an interface similar to Finance to log the transfers, and the escrow functionality if desired.
    • It does not depend on any other app.
    • Payments is still a Vault, so it can contain the DAO funds and CV can use vault.transfer() and vault.balance().

We will think on the Payments / Escrow app architecture a little more until we decide.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant