Skip to main content
A single Lagos office building is too expensive for most individual investors — but a hundred people can each own a slice of it, and split the rent it earns every quarter. This tutorial builds that product: a RealEstateToken representing fractional ownership of one property, an occupancy/valuation admin flow, and a rental income distribution that’s declared on-chain for a permanent audit trail even though the actual cash payout happens off-chain.

What you’ll build

  • An admin script that deploys one RealEstateToken per property with location, valuation, and rental yield metadata
  • Backend routes to onboard investors (mint shares) and update occupancy status as tenants change
  • A quarterly rental distribution job: compute each holder’s share off-chain, pay them, then call declareRentalDistribution() to publish an immutable on-chain record of the total distributed
  • A React dashboard showing a property’s live occupancy, valuation, and the investor’s share count

Prerequisites

  • Node.js 18+
  • A Stellar testnet account and secret key (S...), funded via the Stellar Friendbot
  • npm install @ankarachain/sdk express

1

Scaffold the project

src/config.ts
2

Deploy a token per property

The same deployRealEstate() call works unchanged on EVM by passing an EVMAnkaraChainConfig to TokenFactory instead — see Deploy a Token for that variant.
src/routes.ts
3

Onboard investors and track occupancy

src/routes.ts (continued)
4

Distribute rental income

declareRentalDistribution() does not move any funds — it only records an immutable on-chain declaration of the total distributed, for audit and investor-trust purposes. The actual payout to each holder is your platform’s own off-chain step, computed from the cap table you built while minting.
src/jobs/distributeRent.ts
Because declareRentalDistribution() only records a declaration, always run the actual off-chain payout before calling it — otherwise the on-chain record won’t match what investors actually received. See AssetRegistry: Real Estate Methods.
5

Show the property to investors

src/components/PropertyCard.tsx

Going further

  • Raising fresh investor capital in local fiat: reuse the on-ramp flow from the Farmland Investment Platform tutorial instead of minting shares directly.
  • Revaluation: as the property is reappraised, call registry.updateValuation(newValuationUSD) (shared with the Farmland template) — see AssetRegistry.

Next steps

AssetRegistry

Full reference for updateOccupancyStatus, declareRentalDistribution, and updateValuation.

Asset Templates

The full RealEstateMetadata schema.

React Hooks

useAsset and useTokenBalance in full.

Mint Tokens

KYC-gated transfers with WhitelistVerifier, in depth.