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

Finalization enhancement/pallet #197

Open
ilhanu opened this issue Nov 8, 2022 · 3 comments
Open

Finalization enhancement/pallet #197

ilhanu opened this issue Nov 8, 2022 · 3 comments
Assignees
Labels
enhancement New feature or request

Comments

@ilhanu
Copy link
Member

ilhanu commented Nov 8, 2022

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]

Loading

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:

  • The sale cannot continue without approval of the notary
  • Link to the NftItemId that is in question
  • Hash of link to land registry (off-chain) for public verification. As new entry 0x....
  • The Status Finalizing is applied when the reserved list of investors and the asset is being finalized.
  • When the status is finalizing we don't want the bidding-pallet to reserve a new investors list. The asset should essentially be locked.

structure

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

@ilhanu ilhanu added the enhancement New feature or request label Nov 8, 2022
@ilhanu ilhanu added this to the M4 milestone Nov 8, 2022
@letodunc
Copy link
Contributor

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
Copy link
Contributor

letodunc commented Nov 14, 2022

Implemenation

In order to implement the asset processs finalization.

  • Update the pallet-bidding. In process_onboarded_assets(), the house status will be set to FINALISING at the end of the process if the investors list is successfully created.
  • Update the pallet-onboarded.
    • Add the method get_finalising_assets() to retrieve assets with FINALISING status
    • Add a new asset status CANCELLED to manage the status of a asset in a transaction cancelled by the seller
  • Create the pallet-finalizer
    • Add the method get_assets() to retrieve assets for the Notary to process and can only be called by the Notary role. Assets will have FINALISNG status
    • Add the method validate_transaction_asset. This method set the asset status to FINALISED and can only be called by the Notary role.
    • Add the method reject_transaction_asset. This method set the asset status to REJECTED and unreserve the investors participation (by calling HousingFund::cancel_house_bidding() ) and can only be called by the Notary role.
    • Add the method cancel_transaction_asset(). This method set the asset status to CANCELLED, unreserved the investors fund and can only be called by the SELLER role owner of the asset. The call is only possible on an asset with the FINALISED status after the Notary has approved the transaction.
    • Update the tests to cover the implementation

@ilhanu
Copy link
Member Author

ilhanu commented Nov 14, 2022

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

@ilhanu ilhanu removed this from the M4 milestone Jan 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants