This project is the frontend implementation for Slice, a Real-Time Dispute Resolution Protocol built on Next.js. It features a multi-tenant architecture capable of running as a standalone PWA or as an embedded MiniApp across various wallet ecosystems (Base, Beexo).
Slice is a decentralized, real-time dispute resolution protocol. It acts as a neutral truth oracle that resolves disputes quickly and trustlessly through randomly selected jurors and economic incentives.
We are building the "Uber for Justice":
- Decentralized & Trustless: No central authority controls the outcome.
- Fast & Scalable: Designed for real-time applications, offering quick rulings compared to traditional courts.
- Gamified Justice: Jurors enter the Dispute Resolution Market via an intuitive and entertaining App/MiniApp.
- Earn by Ruling: Users stake tokens to become jurors and earn money by correctly reviewing evidence and voting on disputes.
This application uses a Strategy Pattern to manage wallet connections and SDK interactions. Instead of a single monolithic connection logic, we use an abstraction layer that selects the appropriate Adapter based on the runtime environment (detected via subdomains and SDK presence).
We support two active connection strategies (with Lemon planned):
| Strategy | Description | Used By |
|---|---|---|
| Wagmi SW | Uses Smart Wallets (Coinbase/Safe) via Privy & Wagmi. | PWA, Base |
| Wagmi EOA | Uses standard Injected (EOA) connectors. | Beexo |
| (Planned) Lemon SDK | Native @lemoncash/mini-app-sdk. |
Lemon |
The application behaves differently depending on the access point (Subdomain) and injected providers.
| Platform | Subdomain | Connection Strategy | Auth Type |
|---|---|---|---|
| Standard PWA | app. |
Wagmi SW | Social / Email / Wallet |
| Base MiniApp | base. |
Wagmi SW | Coinbase Smart Wallet |
| Beexo | beexo. |
Wagmi EOA | Injected Provider (Beexo) |
| Lemon (planned) | lemon. |
Lemon SDK | Native Lemon Auth |
Experience the future of decentralized justice on Base:
- Testnet Demo: dev.slicehub.xyz β (Base Sepolia)
- Mainnet App: app.slicehub.xyz β (Base)
- Enter the Market: Users open the Slice App or MiniApp and stake USDC to join the juror pool.
- Get Drafted: When a dispute arises, jurors are randomly selected (Drafted) to review the case.
- Review & Vote: Jurors analyze the evidence provided by both parties and vote privately on the outcome.
- Earn Rewards: If their vote aligns with the majority consensus, they earn fees from the losing party.
- Justice Served: The protocol aggregates the votes and executes the ruling on-chain instantly.
Integrating Slice V1.5 into your protocol follows an Arbitrable/Arbitrator flow:
From your arbitrable contract, call slice.createDispute(CreateDisputeParams) and store your local-case to disputeId mapping.
Parties pay arbitration costs in slice.stakingToken() through payDispute(disputeId). During the dispute, parties can submit evidence through submitEvidence.
Slice calls IArbitrable.rule(disputeId, ruling) on your contract when finalized. In Slice V1.5, ruling == 1 means claimer wins and ruling == 0 means defender wins.
Reference implementation:
slice_sc/src/core/P2PTradeEscrow.solslice_sc/test/integration/P2PTradeEscrow.integration.t.sol
| Network | Slice Core | USDC Token |
|---|---|---|
| Base Sepolia | 0xD8A10bD25e0E5dAD717372fA0C66d3a59a425e4D |
0x5dEaC602762362FE5f135FA5904351916053cF70 |
| Base Mainnet | 0xD8A10bD25e0E5dAD717372fA0C66d3a59a425e4D |
0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913 |
Rename .env.example to .env.local and add your keys.
NEXT_PUBLIC_APP_ENV="development" # or 'production'
# Pinata / IPFS Config
NEXT_PUBLIC_PINATA_JWT="your_pinata_jwt"
NEXT_PUBLIC_PINATA_GATEWAY_URL="your_gateway_url"
# Privy Config (For PWA / Base)
NEXT_PUBLIC_PRIVY_APP_ID="your_privy_app_id"
NEXT_PUBLIC_PRIVY_CLIENT_ID="your_privy_client_id"
# Contracts
NEXT_PUBLIC_BASE_SLICE_CONTRACT="0x..."
NEXT_PUBLIC_BASE_USDC_CONTRACT="0x..."pnpm installpnpm run dev- PWA Mode:
http://localhost:3000 - MiniApp Mode: Use the native testing environment provided by the wallet SDK.
The src/config/ and src/adapters/ directories manage the multi-environment logic.
We abstract wallet interactions behind a common interface:
useWalletAdapterβ Selects the active strategy based on environment.WagmiAdapterβ Wraps Wagmi hooks (Smart Wallets or EOA).- (Planned)
LemonAdapterβ Will wrap@lemoncash/mini-app-sdk.
- Exports
SUPPORTED_CHAINSmapping WagmiChainobjects to contract addresses. - Defaults based on
NEXT_PUBLIC_APP_ENV.
Solidity contracts are in slice_sc/ and use Foundry.
cd slice_sc
forge build
forge testFor contract deployment and seeding scripts, see slice_sc/README.md.
- Phase 1 β Foundation (Core Protocol, Web UI)
- Phase 2 β Architecture Overhaul (Strategy Pattern, Multi-Tenant SDKs)
- Phase 3 β MiniApp Expansion (Live integration with Lemon, Beexo)
- Phase 4 β Slice V1.5 Migration (Passive Global Staking)
- Phase 5 β Specialized Courts & DAO Governance
