Fair-Squares / fair-squares

Fair housing for all
http://www.fair-squares.nl
Apache License 2.0
16 stars 8 forks source link

Finalization enhancement/pallet #197

Open ilhanu opened 1 year ago

ilhanu commented 1 year ago

In M3 we implemented in the bidding pallet the event InvestorListCreationSuccessful when an asset is onboarded and a successful investors list is able to be created. If nothing is done with the current state in the next epoch it switches to process_finalised_assets.

The enhancement

Instead of the runtime changing the state, we need someone with authoritity to finalize the deal for the title transfers. The authority is set by the law and it checks the shareholders and the asset to approve.

The new flow:

graph
A[InvestorsListCreationSuccessful]-- next epoch -->B[Notary]
B-- Approves --> C[The sale is final `fn process_finalised_assets` purchased state]
B-- Rejects --> D[Rejected status]
C --> E[Shares are distributed]

Note The seller should also approve the sale in this intermediate step, we assume that they are willing to sale for the price. In a production env this will be the case.

Further Requirements:

structure

Let's create a new pallet for this functionality, as this will be expanded a lot in the future.

letodunc commented 1 year ago

Concerning the Note, the seller by submitting the proposal in the previous steps has already approved the sale. He/She had time to make his/her decision. What is the need to have an another approval after the voting process? I propose it's assumed that the seller approval is already done, for the MVP at least.

letodunc commented 1 year ago

Implemenation

In order to implement the asset processs finalization.

ilhanu commented 1 year ago

concerning the Note, the seller by submitting the proposal in the previous steps has already approved the sale. He/She had time to make his/her decision. What is the need to have an another approval after the voting process? I propose it's assumed that the seller approval is already done, for the MVP at least.

The seller should have the opportunity to back-out of the deal. For now this won't have any consquences, but there should be some penalty fees, for invoking everyone's time and energy to bring it to a sale and then back-out