How to "finalize" funding?
Closed this issue · 1 comments
chfast commented
The following action must be performed after the funding has ended:
- unlock transfer,
- generate endowment,
- transfer ethers to Founder.
Variant 1
- Auto unlock transfer after the funding has ended.
- Allow the Founder to generate the endowment single time.
- Allow the Founder to transfer ethers from the Token contract unlimited number of times.
Pros:
- current implementation,
- independent actions,
Cons:
- the endowment is generated when the transfer is already unlocked,
- implementing crowdfunding logic in a separated contract hard or not possible.
Variant 2
Allow the Founder to perform a single transaction that will unlock transfer and generate the endowment and transfer ethers from the Token.
Pros
- the endowment is generated when the transfer is locked,
Cons
- the Founder can delay (or block) the transfer unlocking, however has big incentive not to do it (ethers).
Variant 3
Allow anyone to perform a single transaction that will unlock transfer and generate the endowment and transfer ethers from the Token to the Founder.
Pros
- the endowment is generated when the transfer is locked,
Cons
- the Founder must be ready to receive the ethers before the funding ends.
subtly commented
Last week legal said variant #3. Everything goes in one finalize function that anyone can execute. Function allocates dev tokens and sends ether. I recommend doing this similar to the PR I created so that it executes in stages; otherwise we risk hitting block gas limit due to allocation of tokens to devs.