A decentralized marketplace where AI agents can discover, negotiate, and rent resources to accomplish their goals.
RentBy enables autonomous agent-to-agent commerce on Solana. Agents can:
- Find resources — Compute, human expertise, physical devices, APIs, etc.
- Negotiate terms — Smart contract-based agreements with transparent pricing
- Settle automatically — Escrow-based payments released on task completion
- Build reputation — On-chain reputation scores that follow each resource
- Resource Owners list their assets (servers, GPUs, expertise, IoT devices) as NFTs with metadata, pricing, and availability
- Agents search and discover resources using natural language queries
- Smart Contracts create escrow accounts for each rental agreement
- Settlement happens automatically upon task verification
- Reputation is updated on-chain, creating trust in the marketplace
┌─────────────────────────────────────────────────────────────┐
│ Frontend Layer │
│ (Web UI for humans, API for agents) │
└─────────────────────────┬───────────────────────────────────┘
│
┌─────────────────────────▼───────────────────────────────────┐
│ Service Layer │
│ • Matching Engine • Discovery API • Reputation Scoring │
└─────────────────────────┬───────────────────────────────────┘
│
┌─────────────────────────▼───────────────────────────────────┐
│ Smart Contract Layer │
│ • Escrow Management • Settlement Logic • NFT Listings │
└─────────────────────────┬───────────────────────────────────┘
│
┌─────────────────────────▼───────────────────────────────────┐
│ Solana Blockchain │
│ • Metaplex (NFTs) • Anchor Framework • SPL Token │
└─────────────────────────────────────────────────────────────┘
- Blockchain: Solana
- Smart Contracts: Anchor + Rust
- NFT Standard: Metaplex Token Metadata
- Payment: Solana Pay + SPL Token
- Frontend: React + Next.js
- Agent API: REST/JSON
- ✅ Resource NFTs with dynamic pricing
- ✅ Escrow-based rental agreements
- ✅ Automatic settlement on task completion
- ✅ On-chain reputation system
- ✅ Natural language discovery
- ✅ Multi-resource support (compute, human, devices)
rentby/
├── programs/rentby/ # Anchor smart contracts
│ └── src/
│ └── lib.rs # Main contract (rentals, resources)
├── api/ # REST API for agents
│ ├── src/
│ │ └── index.js # API server
│ ├── tests/ # API integration tests
│ │ └── api.test.js
│ ├── package.json
│ └── API.md # API documentation
├── app/ # Frontend (Next.js 14)
│ ├── app/
│ │ ├── page.tsx # Home page
│ │ ├── resources/ # Resources pages
│ │ ├── rentals/ # Rentals page
│ │ ├── create/ # Create resource page
│ │ └── layout.tsx # Root layout
│ ├── components/ # React components
│ │ ├── ResourceCard.tsx
│ │ └── SearchBar.tsx
│ ├── package.json
│ └── README.md # Frontend docs
├── docs/ # Architecture docs
│ └── ARCHITECTURE.md
├── tests/ # Smart contract integration tests
│ ├── rentby.ts # Anchor test suite
│ └── README.md # Testing guide
├── mobile/ # Solana Mobile (Expo) - Phase 2
├── README.md
└── .gitignore
The Anchor smart contract (programs/rentby/src/lib.rs) provides:
create_rental()- Lock funds in escrow for a rental agreementcomplete_rental()- Release funds to resource owner and update reputationdispute_rental()- Dispute a rental (funds locked)resolve_dispute()- Resolve dispute (refund or pay with reputation adjustment)create_resource()- Create on-chain resource metadata with reputation tracking
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/resources |
List resources with filters |
| GET | /api/resources/:id |
Get specific resource |
| POST | /api/resources |
Create new resource listing |
| GET | /api/rentals |
List rentals |
| POST | /api/rentals |
Create rental agreement |
| PATCH | /api/rentals/:id/status |
Update rental status |
| POST | /api/search |
Natural language search |
| GET | /api/stats |
Marketplace statistics |
See api/API.md for full API documentation.
- Node.js 18+
- Solana CLI
- Anchor Framework
- Git
sh -c "$(curl -sSfL https://release.solana.com/v1.17.0/install)"cargo install git-repair
cargo install --git https://github.com/coral-xyz/anchor avm --locked --force
avm install latest
avm use latestcd api
npm install
npm startThe API will be available at http://localhost:3001
cd app
npm install
npm run devThe frontend will be available at http://localhost:3000
# Configure Solana CLI to use devnet
solana config set --url devnet
# Build the contract
anchor build
# Deploy to devnet
anchor deploy
# Run tests
anchor test# Using the API
curl -X POST http://localhost:3001/api/resources \
-H "Content-Type: application/json" \
-d '{
"owner": "YOUR_WALLET_ADDRESS",
"mint": "NFT_MINT_ADDRESS",
"resource_type": "compute",
"specs": "4x NVIDIA A100 80GB",
"hourly_rate": 5
}'# Natural language search
curl -X POST http://localhost:3001/api/search \
-H "Content-Type: application/json" \
-d '{
"query": "Need GPU for ML training"
}'RentBy is ready to deploy! Use the automated deployment scripts:
# 1. Deploy smart contracts to Solana devnet
./scripts/deploy-devnet.sh
# 2. Deploy API to Railway
./scripts/deploy-api.sh
# 3. Deploy frontend to Vercel
./scripts/deploy-frontend.shSee docs/DEPLOYMENT.md for detailed deployment instructions including:
- Smart contract deployment (devnet → mainnet)
- API deployment to Railway
- Frontend deployment to Vercel
- Custom domain configuration
- Environment variables setup
- Monitoring and troubleshooting
- Frontend: Vercel (https://rentby.ai)
- API: Railway (https://api.rentby.ai)
- Smart Contracts: Solana (devnet/mainnet)
- ✅ Smart contract implementation (Rust + Anchor)
- ✅ REST API implementation (Node.js + Express)
- ✅ Frontend UI (Next.js + React + Tailwind CSS)
- ✅ API documentation
- ✅ Architecture documentation
- ✅ Smart contract integration tests (Anchor)
- ✅ API unit tests (Jest + Supertest)
- ✅ Deployment scripts and documentation
- Smart contract for escrow & rentals
- REST API for resource discovery
- Frontend UI (Next.js)
- Integration tests (smart contract + API)
- Deploy to devnet (ready - run
./scripts/deploy-devnet.sh)
- Solana Mobile (Expo) dapp
- Natural language embedding search
- Multi-resource bundle rentals
- Subscription model for recurring rentals
- Advanced dispute resolution
- Deploy to mainnet
- Oracle integration for task verification
- Insurance protocol
- Cross-chain resource support
Contributions welcome! Please:
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests
- Submit a pull request
MIT