67P / kredits-contracts-legacy

[DEPRECATED] Smart contracts for Kosmos Kredits
5 stars 3 forks source link

Make proposals individual contracts #14

Open bumi opened 7 years ago

bumi commented 7 years ago

For brainstorming:

Right now every proposal has a fixed set of data and the execution logic is implemented in the main kredits contract. What if we make every proposal its own contract with a simple standard interface to interact with the other contracts. This could allow more flexible proposals that can be voted on. Such proposals then could not only issue new Kredits but also send ether, deploy new contracts, etc.

raucao commented 7 years ago

Cool, so a contract can deploy another contract?

bumi commented 7 years ago

never done it but yeah, should be possible!

raucao commented 7 years ago

That's pretty awesome. That way we could adapt the proposal logic all the time and whenever we want it seems.

bumi commented 7 years ago

yeah! that would be the big benefit.

raucao commented 7 years ago

I just found an issue with this idea: we established that it would be useful to be able to vote on multiple proposals at once, both for convenience and lowering transaction costs. However, that wouldn't be possible if every single one lived in its own contract.

I don't think that's actually necessary, because the metadata about the decision (i.e. why were the kredits issued) should be present in the issuance anyway. And as long as we can easily update the main contract, we can still keep adjusting proposal logic.

Does that make sense, or did I miss something?