A decentralized marketplace for tokenized Real-World Assets (RWA) with NFT fractionalization capabilities.
🚀 This hackathon demo runs fully on OneChain - the next-generation blockchain for real-world asset tokenization.
- Features
- Tech Stack
- Requirements
- Getting Started
- Project Structure
- Scripts
- Environment
- Workflow
- Mermaid Flowchart (Dev + User Flow)
- Demo
- Troubleshooting
- Contributing
- License
- Custom Typography: Outfit for headings, Inter for body text, Space Grotesk for code
- Smooth Animations: Framer Motion powered transitions and micro-interactions
- Modern Design: Gradient backgrounds, glass morphism effects, and professional layouts
- Responsive Design: Optimized for desktop, tablet, and mobile devices
- Advanced Buy Interface: Modal-based purchase system with quantity selection
- Real-time Pricing: Dynamic price calculations and total cost display
- Transaction Management: Comprehensive error handling and success notifications
- Multi-token Support: Native tokens and ERC20 token payments
- Universal Wallet Support: MetaMask, WalletConnect, Coinbase Wallet, and more
- Seamless Connection: One-click wallet connection with automatic chain switching
- Mobile Optimized: Perfect wallet integration for mobile devices
- Security First: Secure transaction handling with user confirmations
- Smart Search: Real-time search with filtering by asset type and category
- Professional Cards: Enhanced asset cards with pricing, APY, and investment details
- Category Filtering: Filter by Real Estate, Carbon Credits, and more
- Investment Analytics: Expected returns and investment minimums displayed
- Portfolio Analytics: Track your investments with visual charts and statistics
- Asset Categorization: Organized view of your holdings by asset type
- Performance Metrics: ROI tracking and investment history
- Multi-chain Portfolio: Unified view across all supported networks
This project includes three core smart contracts for RWA tokenization and fractionalization:
- ERC721 contract for minting property-backed NFTs
- Owner-controlled minting with metadata URI support
- Represents unique real-world assets as non-fungible tokens
- Core contract for fractionalizing PropertyNFTs into ERC20 tokens
- Allows NFT owners to split ownership into tradeable fractions
- Enables redemption when all fractions are collected by one owner
- ERC20 token representing fractional ownership of an NFT
- Minted by the Fractionalizer contract
- Burnable tokens for NFT redemption process
- Optimized for Real-World Assets: Purpose-built blockchain for tokenizing physical assets
- Low Transaction Costs: Minimal fees for fractionalization and trading operations
- Fast Settlement: Quick confirmation times for asset transactions
- Regulatory Compliance: Built-in compliance features for asset tokenization
- Interoperability: Seamless integration with traditional financial systems
- 🏠 Property Tokenization: Direct integration with real estate verification systems
- 🌱 Carbon Credit Trading: Native support for environmental asset tokenization
- ⚡ Instant Fractionalization: Split assets into tradeable fractions in seconds
- 🔄 Seamless Redemption: Collect fractions to redeem complete asset ownership
- 📊 Real-time Analytics: Live tracking of asset performance and trading volume
- 🛡️ Compliance Badges: Automated verification and compliance checking
- Blockchain: OneChain Network (Primary), Multi-chain support
- Frontend: Next.js 14, React 18, TypeScript, Chakra UI
- Web3 SDK: thirdweb v5 with OneChain integration
- Smart Contracts: Solidity 0.8.24, OpenZeppelin v5.4.0, Hardhat v3
- RWA Contracts: PropertyNFT, Fractionalizer, Fraction ERC20
- State Management: @tanstack/react-query
- Styling: Framer Motion, Chakra UI with custom themes
- OneChain Testnet (Chain ID: 1001) - Default active network
- OneChain Mainnet (Chain ID: 1000) - Production network
- Avalanche Fuji Testnet (Chain ID: 43113)
- Polygon Amoy Testnet (Chain ID: 80002)
- Sepolia Testnet (Chain ID: 11155111)
PropertyNFT: 0x0000000000000000000000000000000000000000 # Update after deployment
Fractionalizer: 0x0000000000000000000000000000000000000000 # Update after deployment
Marketplace: 0x0000000000000000000000000000000000000000 # Update after deployment
PropertyNFT: 0x0000000000000000000000000000000000000000 # Update after deployment
Fractionalizer: 0x0000000000000000000000000000000000000000 # Update after deployment
Marketplace: 0x0000000000000000000000000000000000000000 # Update after deployment
Note: Replace the placeholder addresses (0x000...) with actual deployed contract addresses after running the deployment scripts.
flowchart TD
Start[Start: Real-World Asset] --> Create[1. Create Property NFT]
Create --> CreateDetails[Property Details:<br/>- Name & Description<br/>- Location & Type<br/>- Total Value<br/>- Total Shares<br/>- Price per Share OCT<br/>- Rental Yield]
CreateDetails --> Mint[2. Mint Property NFT]
Mint --> MintTx[Transaction on OneChain<br/>PropertyNFT Object Created]
MintTx --> Fractional[3. Automatic Fractionalization]
Fractional --> FracDetails[Fractional Shares:<br/>- Total Shares: 10,000<br/>- Available: 10,000<br/>- Price: 0.001 OCT/share<br/>- Stored On-Chain]
FracDetails --> List[4. Auto-Listed in Marketplace]
List --> ListDetails[Marketplace Listing:<br/>- Visible to all users<br/>- Real-time availability<br/>- Instant investment ready]
ListDetails --> Invest[5. Users Can Invest]
Invest --> InvestOptions{Investment Options}
InvestOptions --> BuyShares[Buy Fractional Shares]
BuyShares --> ShareDetails[Purchase Details:<br/>- Min: 1 share<br/>- Max: Available shares<br/>- Payment in OCT<br/>- Gas: ~0.05 OCT]
ShareDetails --> InvestNFT[Investment NFT Created]
InvestNFT --> InvestRecord[Investment Record:<br/>- Property ID<br/>- Shares Owned<br/>- Investment Amount<br/>- Timestamp]
InvestRecord --> Portfolio[6. Track in Portfolio]
Portfolio --> PortfolioView[My Investments Page:<br/>- Total Invested<br/>- Total Shares<br/>- Properties Owned<br/>- Real-time Updates]
PortfolioView --> Transfer[7. Transfer Shares Optional]
Transfer --> TransferTx[Transfer Investment NFT<br/>to Another User]
TransferTx --> End[End: Complete Ownership Cycle]
style Create fill:#9f7aea,stroke:#805ad5,color:#fff
style Fractional fill:#38b2ac,stroke:#319795,color:#fff
style List fill:#ed8936,stroke:#dd6b20,color:#fff
style Invest fill:#48bb78,stroke:#38a169,color:#fff
style Portfolio fill:#4299e1,stroke:#3182ce,color:#fff
flowchart LR
subgraph Creation[Property Creation]
A[User Input] --> B[CreatePropertyForm]
B --> C[propertyContract.createProperty]
C --> D[Move: create_property]
D --> E[PropertyNFT Object]
end
subgraph Fractionalization[Built-in Fractionalization]
E --> F[totalShares: 10000]
F --> G[availableShares: 10000]
G --> H[pricePerShare: OCT]
H --> I[Stored in PropertyNFT]
end
subgraph Listing[Marketplace Integration]
I --> J[getAllProperties]
J --> K[Collection Page]
K --> L[Display Cards]
L --> M[Investment Modal]
end
subgraph Investment[Investment Process]
M --> N[User Selects Shares]
N --> O[propertyContract.invest]
O --> P[Move: invest function]
P --> Q[Investment NFT Created]
Q --> R[Shares Deducted]
end
subgraph Portfolio[Portfolio Tracking]
R --> S[getUserInvestments]
S --> T[My Investments Page]
T --> U[Real-time Balance]
U --> V[Transfer Option]
end
style Creation fill:#e6f7ff
style Fractionalization fill:#f0f5ff
style Listing fill:#fff7e6
style Investment fill:#f6ffed
style Portfolio fill:#fff0f6
- Input: Property details (name, location, value, shares, price)
- Output: Unique PropertyNFT object on OneChain
- Gas: ~0.01 OCT
- Time: ~3-5 seconds
- Built-in: No separate fractionalization step needed
- Shares: Defined at creation (e.g., 10,000 shares)
- Price: Set in OCT (e.g., 0.001 OCT per share)
- Flexible: Users can buy 1 to all available shares
- Auto-listed: Property appears immediately in marketplace
- Real-time: Updates as shares are purchased
- Searchable: Filterable by type, location, price
- Transparent: All details visible to investors
- Simple: Select shares → Confirm → Sign transaction
- Fast: Investment completes in seconds
- Secure: Blockchain-verified ownership
- Tracked: Investment NFT created for each purchase
- Dashboard: View all investments in one place
- Real-time: Live updates of share counts
- Transferable: Send Investment NFTs to others
- Analytics: Track total invested, shares owned
// 1. Create Property NFT
public entry fun create_property(
name: String,
description: String,
image_url: String,
location: String,
property_type: String,
total_value: u64,
total_shares: u64,
price_per_share: u64,
rental_yield: String,
ctx: &mut TxContext
)
// 2. Invest in Property (Buy Shares)
public entry fun invest(
property: &mut PropertyNFT,
payment: Coin<OCT>,
shares_to_buy: u64,
ctx: &mut TxContext
)
// 3. Transfer Investment
public entry fun transfer_investment(
investment: Investment,
recipient: address,
_ctx: &mut TxContext
)sui client call \
--package 0x7b8e0864967427679b4e129f79dc332a885c6087ec9e187b53451a9006ee15f2 \
--module property_nft \
--function create_property \
--args "Sunset Villa" "Luxury beachfront property" \
"https://example.com/villa.jpg" "Miami Beach" \
"Residential" 1000000 10000 1 "8.5%" \
--gas-budget 10000000sui client call \
--package 0x7b8e0864967427679b4e129f79dc332a885c6087ec9e187b53451a9006ee15f2 \
--module property_nft \
--function invest \
--args [PROPERTY_ID] [COIN_ID] 100 \
--gas-budget 50000000✅ Simplified: No separate fractionalization step
✅ Efficient: One-time property creation
✅ Flexible: Any number of shares (1 to total)
✅ Transparent: All data on-chain
✅ Instant: Immediate marketplace visibility
✅ Secure: Blockchain-verified ownership
✅ Transferable: Investment NFTs can be traded
flowchart TD
subgraph Dev[Developer Workflow]
A[Clone Repo] --> B[Install Deps]
B --> C[Create .env.local\nNEXT_PUBLIC_TW_CLIENT_ID]
C --> D{Deploy to OneChain?}
D -- Yes --> E[Configure OneChain RPC]
E --> F[Deploy RWA Contracts]
F --> G[Deploy Marketplace]
D -- No --> H[Use Testnet]
G --> I[Update Contract Addresses]
H --> I
I --> J[Run: npm run dev]
end
subgraph User[End-User Flow on OneChain]
K[Open App / Landing] --> L[Connect Wallet to OneChain]
L --> M{Connected to OneChain?}
M -- Yes --> N[Browse RWA Marketplace]
M -- No --> O[Switch to OneChain Network]
O --> N
N --> P[View Property/Asset Details]
P --> Q{Investment Action}
Q -- Buy Fractions --> R[Purchase ERC20 Tokens]
Q -- Buy Full Asset --> S[Purchase Complete NFT]
Q -- List Asset --> T[Create Marketplace Listing]
Q -- Fractionalize --> U[Split into ERC20 Tokens]
R --> V[Track Fractional Ownership]
S --> W[Full Asset Management]
U --> X[Enable Secondary Trading]
V --> Y{Collect All Fractions?}
Y -- Yes --> Z[Redeem Full Asset]
Y -- No --> AA[Continue Trading]
end
J --> K
- Node.js 18+ and npm installed
- OneChain CLI installed (for Move contract deployment)
- OneChain testnet wallet with OCT tokens
git clone https://github.com/Aaditya1273/RWA-Exchange.git
cd RWA-Exchange
npm installcp .env.example .env.local
# Edit .env.local with your configurationRequired environment variables:
# OneChain Configuration
NEXT_PUBLIC_ONECHAIN_RPC_URL=https://rpc-testnet.onelabs.cc:443
NEXT_PUBLIC_ONECHAIN_NETWORK=testnet
NEXT_PUBLIC_RWA_PACKAGE_ID=YOUR_PACKAGE_ID# Build Move package
one move build
# Deploy to OneChain testnet
one client publish --gas-budget 100000000
# Save the Package ID from outputone client call \
--package \
--module property_nft \
--function create_property YOUR_PACKAGE_ID\
--args "Sunset Villa Estate" "Luxury beachfront property" \
"https://example.com/villa.jpg" "Miami Beach, FL" \
"Residential" 1000000 10000 100 "8.5%" \
--gas-budget 10000000one client call \
--package YOUR_PACKAGE_ID \
--module property_nft \
--function invest \
--args [PROPERTY_OBJECT_ID] [COIN_OBJECT_ID] 100 \
--gas-budget 10000000npm run devOpen http://localhost:3000 to view the marketplace.
- Package Explorer: https://onescan.cc/testnet/object/YOUR_PACKAGE_ID
- Check Objects:
one client objects - View Transaction:
one client tx-block [TX_HASH] - OneScan Explorer: https://onescan.cc/testnet/home
⚠️ Not Audited: Smart contracts have not been professionally audited⚠️ Demo Purpose: This is a hackathon/demo project, not production-ready⚠️ No Real Funds: Do not use with real money on mainnet
- Balance Fetching: Using type assertion workaround instead of proper SuiClient implementation
- Wallet Import: Private key import functionality not fully implemented
- Transaction Confirmation: May take 5-10 seconds for finality
- RPC Timeouts: OneChain RPC may occasionally timeout, retry if needed
- Dividend Distribution: Manual process, not automated
- KYC Integration: Placeholder only, not enforced in current version
- Secondary Market: Fraction trading not yet implemented
- Multi-signature: Property management requires single owner only
- Mobile Wallet: Limited mobile wallet support
- Balance refresh requires manual trigger
- Some wallet connections may require page refresh
- Explorer links may not work if testnet is down
- PropertyCap must be held to manage property
- No refund mechanism if property sale fails
- Dividend calculation is simplified (no time-weighting)
- Treasury management is basic (no yield generation)
- OneChain testnet may have occasional downtime
- Gas estimation may be inaccurate
- Event indexing may lag behind transactions
- Private Keys: Currently stored in localStorage (NOT production-ready)
- No Audit: Smart contracts have not been audited by security professionals
- Test Tokens Only: Only use testnet ONE tokens, never mainnet funds
- No Insurance: No protection against bugs or exploits
- Experimental: This is experimental software, use at your own risk
✅ Good For:
- Learning about RWA tokenization
- Testing fractional ownership concepts
- Demonstrating blockchain use cases
- Hackathon submissions
- Educational purposes
❌ Not Suitable For:
- Production deployments
- Real financial transactions
- Storing valuable assets
- Regulatory compliance
- Enterprise use without modifications
Planned Enhancements:
- Professional security audit
- Automated dividend distribution
- Real KYC/AML integration
- Secondary marketplace for fractions
- Multi-signature property management
- Mobile app support
- Advanced analytics dashboard
- Integration with real estate APIs
- Regulatory compliance features
- Insurance mechanisms
If you encounter issues:
- Check the Troubleshooting section below
- Review ONECHAIN_INTEGRATION.md
- Visit OneChain documentation: https://docs.onechain.network
- Open an issue on GitHub
## Project Structure
- `sources/` — Move smart contracts (`property_nft.move`).
- `scripts/` — Deployment scripts for OneChain.
- `src/` — Next.js app and components.
- `src/app/` — Next.js routes (e.g., `collection/`, `create-property/`, `my-investments/`).
- `src/components/` — UI components (e.g., `PropertyCreationForm.tsx`, `InvestmentModal.tsx`).
- `src/services/` — Blockchain services (e.g., `propertyContract.ts`, `onechain.ts`).
- `src/consts/` — Configuration constants.
## Scripts
From `package.json`:
```bash
npm run dev # start Next.js dev server
npm run build # build production bundle
npm run start # start production server
npm run lint # run Next.js lint
OneChain CLI (Move contract deployment):
one move build # compile Move contracts
one move test # test Move contracts
one client publish --gas-budget 100000000 # deploy to OneChain
one client call --package <PKG_ID> --module property_nft --function create_property # interact with contractsCreate .env.local at repo root:
# OneChain Configuration
NEXT_PUBLIC_ONECHAIN_RPC_URL=https://rpc-testnet.onelabs.cc:443
NEXT_PUBLIC_ONECHAIN_NETWORK=testnet
NEXT_PUBLIC_RWA_PACKAGE_ID=YOUR_PACKAGE_ID-
Install dependencies:
npm install -
Configure environment: create
.env.localwith OneChain configuration. -
(Optional) Develop/compile/deploy Move contracts with OneChain CLI:
one move build one client publish --gas-budget 100000000
-
Update package ID in
.env.localwith your deployed contract address. -
Run the app:
npm run devand open http://localhost:3000 -
Connect wallet (OneChain Wallet via navbar) and interact with the marketplace.
- OneChain Wallet: Install OneChain Wallet extension from the official website
- Wallet Standard: The app uses Wallet Standard interface for OneChain integration
- Connection Fails: Try refreshing the page and reconnecting
- No Wallet Detected: Ensure OneChain Wallet extension is installed and unlocked
- Wrong Network: Make sure you're connected to OneChain Testnet
- RPC Connection: If OneChain RPC is slow, check your network configuration at
https://rpc-testnet.onelabs.cc:443 - Contract Interactions: Ensure you have sufficient OCT tokens for gas fees (not ONE)
- Transaction Fails: Check transaction on OneScan:
https://onescan.cc/testnet/home - Property Not Loading: Verify the property exists on OneChain testnet
- Investment Fails: Ensure you have enough OCT for both the investment amount and gas fees
- Module not found errors: Run
npm installto ensure all dependencies are installed - Environment variable errors: Ensure
.env.localexists with valid OneChain configuration - Next.js fails to start: Clear
.next/folder and retry:rm -rf .next && npm run dev(Windows: delete.nextfolder manually) - TypeScript errors: Run
npm run buildto check for type errors before deploying
- Slow loading: The app fetches real blockchain data which may take time
- Network timeouts: OneChain testnet may have occasional delays
- Low gas fees: OneChain offers significantly lower fees compared to Ethereum mainnet (~0.01-0.05 OCT per transaction)
- Development: Always use OneChain testnet for development and testing
- Check the OneChain documentation
- Visit OneScan Explorer to verify transactions
- Review contract addresses in
.env.localif using custom deployments - Open an issue on GitHub for project-specific problems
- Screenshots or GIFs
- Landing Page:
src/app/landing/page.tsx - Token Page and Listing Flow:
src/components/token-page/*
- Landing Page:
Add your media under public/ and embed here:

Contributions are welcome! Please:
- Fork the repo and create a feature branch.
- Follow existing code style and run
npm run lint. - Open a PR with a clear description and screenshots if UI changes.
MIT © Contributors