In Web3, belief and execution are disconnected: • Prediction markets price opinions but not real actions. • Task platforms reward completion but lack transparency and market dynamics. There’s no native way to monetize credibility, accountability, or proof of action on-chain.
ActionFi creates a market for human execution. Anyone can launch a public challenge, back outcomes with YES/NO staking, and let the market price belief in real-world actions. Every challenge is a verifiable on-chain statement — success is rewarded, failure redistributes trust.
- Launch Challenge — Creator deposits ≥0.05 SOL, sets time limit (1 h – 5 d, optional random stop).
- Stake Belief — Users stake on YES / NO pools via constant-product AMM.
- Host Bidding — Others may outbid the host (+0.1 SOL) to “take the stage.”
- Resolution — Chain verifies proof (video / on-chain evidence). o YES wins → supporters share NO pool. o NO wins → skeptics share YES pool.
- Rewards o Creator earns 1 % of total pool if challenge succeeds. o 5 % of pot → JP reward pool for top challengers. o Host (if NO wins) gets 2 % of JP.
- Second-Round Challenge — Winner may reopen next round with 10 % of prior profit → perpetual loop.
Layer Function Incentive YES/NO Pools Belief pricing Early conviction = higher upside JP Pool Action reward Execution proof bonus Host Bidding Ownership game Adds liquidity + social tension 1 % Creator Fee Quality incentive Drives real, verifiable actions Rolling Rounds Perpetual liquidity Continuous market cycle Platform 1 % Sustainability Maintenance & auditing
• Turns action into a financial primitive. • Enables proof-of-credibility for individuals and DAOs. • Blends DeFi, social identity, and prediction markets into one composable layer.
ActionFi — Launch Challenges. Prove Yourself. Let the Market Decide.
- 前端框架: React 18 + TypeScript
- 构建工具: Vite
- 样式: Tailwind CSS + shadcn/ui
- 区块链: Solana (Devnet)
- 钱包集成: Phantom, Solflare, OKX, Backpack 等
- 国际化: react-i18next (中文/英文)
- 状态管理: Zustand
- 路由: React Router DOM
- UI 组件: Radix UI + Lucide React
- 🎯 挑战管理: 创建、浏览、参与挑战
- 💰 投注系统: 支持/反对投注,实时赔率计算
- 👛 多钱包支持: 集成主流 Solana 钱包
- 🌍 国际化: 中英文双语支持
- 🌙 主题切换: 明暗主题自由切换
- 📱 响应式设计: 完美适配移动端
- 多钱包连接 (Phantom, Solflare, OKX, Backpack 等)
- 本地钱包创建和导入
- 私钥导入功能
- 安全提示和验证
- 钱包余额查看
- 用户中心页面
- 通知系统
- 图片查看功能
- 分享和收藏功能
- 错误边界和异常处理
- Node.js 18+
- npm 或 yarn
- Git
# 克隆项目
git clone <repository-url>
cd ChallengeMarket
# 安装依赖
npm install
# 启动开发服务器
npm run dev
# 访问应用
# http://localhost:5173# 开发环境
npm run dev
# 构建生产版本
npm run build
# 预览构建结果
npm run preview
# 类型检查
npm run check
# 代码检查
npm run lint-
自动部署
- 连接 GitHub 仓库到 Vercel
- 自动检测 Vite 项目配置
- 推送代码即可自动部署
-
手动部署
# 安装 Vercel CLI npm i -g vercel # 登录并部署 vercel login vercel --prod
# .env
VITE_SOLANA_NETWORK=devnet
VITE_SOLANA_RPC_URL=https://api.devnet.solana.comsrc/
├── components/ # 可复用组件
│ ├── ui/ # UI 基础组件 (shadcn/ui)
│ ├── ChallengeCard.tsx
│ ├── Navbar.tsx
│ └── ...
├── pages/ # 页面组件
│ ├── Home.tsx
│ ├── ChallengeDetail.tsx
│ ├── CreateChallenge.tsx
│ ├── Profile.tsx
│ └── ...
├── hooks/ # 自定义 Hooks
├── providers/ # Context Providers
├── store/ # Zustand 状态管理
├── lib/ # 工具库和配置
├── locales/ # 国际化文件
│ ├── en/
│ └── zh/
└── assets/ # 静态资源
使用 shadcn/ui 添加组件:
npx shadcn-ui@latest add button
npx shadcn-ui@latest add dialog- 在
src/locales/zh/和src/locales/en/中添加翻译 - 在组件中使用:
import { useTranslation } from 'react-i18next'; const { t } = useTranslation(); return <div>{t('key')}</div>;
使用 Zustand 进行状态管理:
import { useStore } from '../store/useStore';
const { challenges, addChallenge } = useStore();-
钱包连接失败
- 确保钱包扩展已安装
- 检查网络设置 (Devnet)
- 查看浏览器控制台错误
-
构建失败
- 检查 Node.js 版本 (需要 18+)
- 清除缓存:
rm -rf node_modules package-lock.json && npm install - 检查 TypeScript 类型错误
-
样式问题
- 确保 Tailwind CSS 配置正确
- 检查暗黑模式类名
- 验证 shadcn/ui 组件导入
- Fork 项目
- 创建功能分支 (
git checkout -b feature/AmazingFeature) - 提交更改 (
git commit -m 'Add some AmazingFeature') - 推送到分支 (
git push origin feature/AmazingFeature) - 打开 Pull Request
本项目采用 MIT 许可证 - 查看 LICENSE 文件了解详情。
- Solana - 高性能区块链平台
- shadcn/ui - 优秀的 UI 组件库
- Tailwind CSS - 实用优先的 CSS 框架
- Vite - 快速的构建工具
注意: 这是一个演示项目,所有数据都存储在本地状态中。在生产环境中使用前,请进行充分的测试和安全审计。