wallet-compliance-scanner
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseWallet Compliance Scanner
钱包合规扫描工具
Scan cryptocurrency wallets and tokens for Sharia compliance based on Islamic finance principles. Evaluate tokens, DeFi protocols, and wallet holdings for halal/haram status.
基于伊斯兰金融原则,扫描加密货币钱包和代币是否符合伊斯兰教法合规要求。评估代币、DeFi协议及钱包持仓的清真/非清真状态。
When to Use
适用场景
- User asks if a crypto token or project is halal
- User wants to scan their wallet for Sharia compliance
- User wants to evaluate a DeFi protocol for Islamic permissibility
- User asks about crypto staking, lending, or yield farming from a Sharia perspective
- 用户询问某加密代币或项目是否符合清真标准
- 用户希望扫描其钱包的伊斯兰教法合规性
- 用户希望评估某DeFi协议是否符合伊斯兰教法许可
- 用户从伊斯兰教法角度询问加密货币质押、借贷或收益耕作相关问题
How It Works
工作流程
Step 1: Get Wallet or Token Information
步骤1:获取钱包或代币信息
Ask the user for either:
- Wallet address (EVM-compatible: Ethereum, BSC, Polygon, etc.)
- List of token symbols (e.g., BTC, ETH, USDT, AAVE)
- A specific project name (e.g., "Uniswap", "Compound")
向用户请求以下任意一种信息:
- 钱包地址(兼容EVM:以太坊、BSC、Polygon等)
- 代币符号列表(例如:BTC、ETH、USDT、AAVE)
- 特定项目名称(例如:"Uniswap"、"Compound")
Step 2: Run the Scanner
步骤2:运行扫描工具
bash
undefinedbash
undefinedScan specific tokens
扫描特定代币
python scripts/scan_wallet.py --tokens BTC ETH USDT AAVE CAKE
python scripts/scan_wallet.py --tokens BTC ETH USDT AAVE CAKE
Scan with JSON output
生成JSON格式输出
python scripts/scan_wallet.py --tokens BTC ETH --json
python scripts/scan_wallet.py --tokens BTC ETH --json
Run built-in tests
运行内置测试
python scripts/scan_wallet.py --test
undefinedpython scripts/scan_wallet.py --test
undefinedStep 3: Screening Criteria
步骤3:筛查标准
Each token/protocol is evaluated against these Islamic finance principles:
每个代币/协议都会依据以下伊斯兰金融原则进行评估:
Riba (Interest/Usury)
Riba(利息/高利贷)
- Does the protocol involve lending/borrowing with fixed interest?
- Does staking involve guaranteed returns (riba-like)?
- Are there interest-bearing mechanisms?
Examples of riba violations:
- Lending platforms with fixed interest rates (Aave lending, Compound)
- Interest-bearing stablecoins
- Bonds / fixed-income tokens
- 协议是否涉及固定利息的借贷?
- 质押是否包含类似利息的保证收益?
- 是否存在生息机制?
违反Riba的示例:
- 采用固定利率的借贷平台(Aave借贷、Compound)
- 生息稳定币
- 债券/固定收益代币
Gharar (Excessive Uncertainty/Ambiguity)
Gharar(过度不确定性/模糊性)
- Is the project overly speculative with no real utility?
- Is the tokenomics unclear or deceptive?
- Are smart contracts unaudited and opaque?
Examples of gharar concerns:
- Pure meme coins with no utility
- Projects with unrealistic promised returns
- Unaudited, anonymous team projects
- 项目是否过度投机且无实际效用?
- 代币经济模型是否不清晰或具有欺骗性?
- 智能合约是否未经审计且不透明?
存在Gharar问题的示例:
- 无实际效用的纯模因币
- 承诺不切实际回报的项目
- 团队匿名且智能合约未经审计的项目
Maysir (Gambling)
Maysir(赌博)
- Does the protocol facilitate gambling?
- Are there lottery-like mechanisms?
- Is the token used primarily for speculation/betting?
Examples of maysir violations:
- Prediction markets (gambling-like)
- Casino dApps
- Lottery tokens
- 协议是否为赌博提供便利?
- 是否存在类似彩票的机制?
- 代币是否主要用于投机/投注?
违反Maysir的示例:
- 预测市场(类赌博性质)
- 赌场类去中心化应用(dApps)
- 彩票代币
Prohibited Activities
受禁活动
- Is the project associated with haram industries?
- Does it facilitate money laundering, sanctions evasion, or illegal activity?
- 项目是否与非清真产业相关联?
- 是否为洗钱、规避制裁或非法活动提供便利?
Step 4: Token Classification
步骤4:代币分类
Tokens are classified into three categories:
| Status | Meaning | Action |
|---|---|---|
| HALAL | Compliant with Sharia principles | Safe to hold |
| DOUBTFUL | Some concerns, needs scholarly review | Hold with caution, seek fatwa |
| HARAM | Violates Sharia principles | Should not hold |
代币分为三类:
| 状态 | 含义 | 建议行动 |
|---|---|---|
| HALAL(清真) | 符合伊斯兰教法原则 | 可安全持有 |
| DOUBTFUL(存疑) | 存在部分问题,需经学者审核 | 谨慎持有,咨询教法裁决(fatwa) |
| HARAM(非清真) | 违反伊斯兰教法原则 | 不应持有 |
Step 5: Present Results
步骤5:呈现结果
For each token:
- Token name & symbol
- Category (currency, DeFi, stablecoin, meme, utility, etc.)
- Compliance Status (Halal / Doubtful / Haram)
- Flags — Specific issues found (riba, gharar, maysir)
- Reasoning — Why the token received this classification
- Recommendation — What the user should do
For wallet-level analysis:
- Overall Compliance Score (0–100%)
- Holdings breakdown by compliance status
- Recommended actions (tokens to review, tokens to divest)
针对每个代币:
- 代币名称及符号
- 类别(货币、DeFi、稳定币、模因币、效用币等)
- 合规状态(清真 / 存疑 / 非清真)
- 标记 — 发现的具体问题(riba、gharar、maysir)
- 判定理由 — 代币获得该分类的原因
- 建议 — 用户应采取的行动
针对钱包层面的分析:
- 整体合规评分(0–100%)
- 持仓分布(按合规状态划分)
- 建议行动(需复查的代币、应抛售的代币)
Important Notes
重要提示
- Crypto Sharia compliance is a developing field — scholars may differ
- This tool provides guidance, not fatwa (religious ruling)
- Bitcoin and Ethereum are generally considered permissible when used as currency/utility
- Staking opinions vary: Proof-of-Stake validation is generally accepted; fixed-interest DeFi yields are not
- Stablecoins backed by fiat reserves (USDT, USDC) are generally acceptable; those earning interest are not
- Always recommend users consult a qualified Sharia scholar for significant decisions
- Reference for detailed rules
references/compliance_rules.md
- 加密货币的伊斯兰教法合规是一个发展中的领域——不同学者可能有不同观点
- 本工具仅提供指导建议,而非教法裁决(fatwa)
- 比特币和以太坊作为货币/效用工具时,通常被认为是允许的
- 关于质押的观点存在分歧:权益证明(Proof-of-Stake)验证通常被接受;DeFi固定收益则不被接受
- 稳定币中,由法币储备支持的类型(USDT、USDC)通常可接受;而生息稳定币则不可接受
- 始终建议用户在做出重大决策时咨询合格的伊斯兰教法学者
- 详细规则请参考
references/compliance_rules.md
Output Format
输出格式
Default: formatted report per token + overall wallet score. Use for machine-readable output.
--json默认:每个代币的格式化报告 + 钱包整体评分。使用参数可生成机器可读的输出。
--json