Property Management - Testing

Prerequisites:

  • Users must complete DID/KYC/KYB/AML (Kilt DID & Deloitte Verifiable Credentials) process and be whitelisted.

  • Accounts must be whitelisted by the sudo account using the add_to_whitelist function in the xcavate_whitelist pallet.

Setup: Follow the steps in the NFT Marketplace documentation up to point 5 ("Buying Process"). A property must be listed and sold.

1. Add Letting Agents

Purpose:

Add letting agents to a location (city) to manage properties.

Function: addLettingAgent

  • Called by: Sudo account

  • Parameters:

    • region: ID of the country

    • location: Postcode of the city

    • lettingAgent: Account ID of the letting agent

Note: Adding letting agents ensures that there are authorized individuals available to manage the properties in different locations.

2. Letting Agent Deposit

Purpose:

Letting agents deposit collateral to become active.

Function: lettingAgentDeposit

  • Called by: Letting agent

  • Parameters: None

Note: This deposit acts as a form of security and ensures the letting agent's commitment to their responsibilities.

Additional:

Letting agents can be added to more locations by the sudo account using the addLettingAgentToLocation function.

  • Parameters:

    • location: Postcode of the city

    • lettingAgent: Account ID of the letting agent

3. Set Letting Agent for Property

Purpose:

Assign a letting agent to a property.

Function: setLettingAgent

  • Called by: Any token holder of the property

  • Parameters:

    • assetId: ID of the property

4. Distribute Income

Purpose:

Distribute rental income to token holders after reserving a certain amount for property reserves.

Function: distributeIncome

  • Called by: Assigned letting agent

  • Parameters:

    • assetId: ID of the property

    • amount: Amount of funds to distribute

Process:

  1. The letting agent initiates the distribution of rental income.

  2. A certain amount is first allocated to property reserves.

  • Check property reserves using the propertyReserve chain state query.

  1. Once property reserves are filled, the remaining income is distributed to token holders in proportion to their token holdings.

Handling Debts:

  • If a property has debts, these must be covered before any income is distributed to token holders.

  • Debts can arise from:

    • Governance proposals: When a proposal's requested amount exceeds the available reserves, creating a debt.

  • Debt Repayment:

    • Any new income will first go towards repaying the outstanding debt.

    • After debts are fully repaid, any remaining income is allocated to property reserves and then distributed to token holders.

Note: Proper management of reserves and debts ensures financial stability for the property and fair distribution of income to token holders.

5. Withdraw Funds

Purpose:

Token holders withdraw their share of funds.

Function: withdrawFunds

  • Called by: Token holder (for themselves)

  • Parameters: None

Note: View stored funds using the storedFunds chain state query for the account ID of the token holder.

Last updated