ποΈ A decentralized platform for tokenizing real-world assets (RWAs) and enabling lending-based co-ownership. Built on Hedera with Scaffold-ETH 2, this marketplace lets you mint NFTs for physical assets, lend HBAR to earn fractional ownership, and manage your digital portfolio with full transparency and compliance. See project outcome @ETHGlobal
βοΈ Built using NextJS, RainbowKit, Hardhat, Wagmi, Viem, Typescript, and deployed on Hedera Testnet.
- πͺ NFT Minting: Convert real-world assets (cars, real estate, luxury items, art) into ERC-721 NFTs
- π Rich Metadata: Store detailed asset information including category, description, legal ID, brand, and estimated value
- πΌοΈ Visual Assets: Support for asset images and visual representation
- π° HBAR Lending: Lend HBAR against tokenized assets to earn interest
- π― Fractional Ownership: Receive LendingTokens (ERC-20) representing your share of financed assets
- π Asset Locking: Secure lending mechanism with asset locking during active loans
- π Interest Management: Configurable interest rates and loan durations
- πͺ Asset Listings: List NFTs for sale with configurable pricing
- πΌ Offer System: Create and manage lending offers with custom terms
- π€ Crowdfunded Purchases: Pool lender contributions to collectively purchase assets
- β‘ Instant Trading: Direct asset transfers and payment processing
-
π Dashboard: Track owned assets, active loans, and lending positions
-
π Asset Overview: Comprehensive view of your tokenized assets
-
πΈ Lending Portfolio: Monitor your lending investments and returns
-
π Loan Management: Repay loans and manage debt obligations
-
β Contract Hot Reload: Your frontend auto-adapts to your smart contract as you edit it.
-
πͺ Custom hooks: Collection of React hooks wrapper around wagmi to simplify interactions with smart contracts with typescript autocompletion.
-
π§± Components: Collection of common web3 components to quickly build your frontend.
-
π₯ Burner Wallet & Local Faucet: Quickly test your application with a burner wallet and local faucet.
-
π Integration with Wallet Providers: Connect to different wallet providers and interact with the Ethereum network.
The platform consists of four main smart contracts deployed on Hedera Testnet:
- Purpose: ERC-721 contract for tokenizing real-world assets
- Features:
- Mint NFTs representing physical assets
- Store comprehensive metadata (name, category, description, legal ID, brand, estimated value)
- Owner-controlled minting with proper access controls
- Purpose: ERC-20 token representing fractional ownership in financed assets
- Features:
- Mint tokens to lenders when they finance assets
- Burn tokens when loans are repaid
- Only authorized minters can create/destroy tokens
- Purpose: Core lending logic linking assets to lending tokens
- Features:
- Enable HBAR lending against specific NFT assets
- Asset locking during active loans
- Loan repayment and lender withdrawal mechanisms
- Track lending balances and repayment amounts
- Purpose: Trading and offer management platform
- Features:
- List assets for sale with custom pricing
- Create lending offers with interest rates and durations
- Crowdfunded asset purchases through pooled lender contributions
- Automatic asset transfer upon full funding
- Mint new NFTs for real-world assets
- Input detailed metadata including category, description, and estimated value
- Upload asset images for visual representation
- Browse all tokenized assets with filtering capabilities
- Create purchase offers and lending proposals
- View asset details including owner, price, and metadata
- Direct buy functionality for listed assets
- View all available lending opportunities
- Contribute to existing offers to collectively finance assets
- Track total investment and active offers
- Monitor lending portfolio performance
- Overview of owned NFT assets
- Track financed assets and lending positions
- Manage loan repayments and debt obligations
- List assets for sale on the marketplace
- Browse assets available for lending
- Create lending offers with custom terms
- Monitor financed assets and expected returns
- Track lending history and performance
Before you begin, you need to install the following tools:
- Node (>= v20.18.3)
- Yarn (v1 or v2+)
- Git
To get started with the Tokenized Marketplace, follow these steps:
- Clone this repository and install dependencies:
git clone <repository-url>
cd tokenized_marketplace
yarn install- Run a local Hardhat network in the first terminal:
yarn chainThis command starts a local Ethereum network using Hardhat. The network runs on your local machine and can be used for testing and development. You can customize the network configuration in packages/hardhat/hardhat.config.ts.
- On a second terminal, deploy the smart contracts:
yarn deployThis command deploys the four main smart contracts (AssetNFT, LendingToken, AssetLendingLink, and Marketplace) to the local network. The contracts are located in packages/hardhat/contracts and the deploy script is in packages/hardhat/deploy.
- On a third terminal, start your NextJS app:
yarn startVisit your app on: http://localhost:3000. You can interact with your smart contracts using the Debug Contracts page. You can tweak the app config in packages/nextjs/scaffold.config.ts.
Run smart contract tests with yarn hardhat:test
- Smart Contracts: Edit your smart contracts in
packages/hardhat/contracts - Frontend: Edit your frontend pages in
packages/nextjs/app/mint- Asset tokenization interface/marketplace- Asset trading and offers/lenders- Lender dashboard for portfolio management/portfolio- Personal asset and loan management/lend- Direct lending interface
- Deployment Scripts: Edit deployment scripts in
packages/hardhat/deploy - Tests: Smart contract tests in
packages/hardhat/test
For guidance on routing and configuring pages/layouts, check out the Next.js documentation.
Visit our docs to learn how to start building with Scaffold-ETH 2.
To know more about its features, check out our website.
We welcome contributions to Scaffold-ETH 2!
Please see CONTRIBUTING.MD for more information and guidelines for contributing to Scaffold-ETH 2.
