返回资讯中心
外部精选
软件工程
#开发者实时流

I verified on-chain why mined Pi and exchange Pi are the same asset

A source-verified technical analysis of fungibility in the Pi Network blockchain:

Hacker News 最新ayoubbbs2026/10/18 · 2026/10/1817 分钟阅读

以下正文同步自 Hacker News 最新,版权归原站所有,已转换为易读排版。

A source-verified technical analysis of fungibility in the Pi Network blockchain: why an app owner — even with the Pi Wallet SDK, the Platform API, and Soroban smart contracts — cannot distinguish between mined π, π withdrawn from an exchange (OKX / Bitget), and π sent from inside a Pi Browser app.

🏷️ Independent & unofficial — not affiliated with Pi Network. This is an independent technical analysis, not an official product. See DISCLAIMER.md.

🔐 Safe by design (read-only). No wallet connection, no passphrase, no keys, no signing, no dependencies. Audit it — see SECURITY.md. Details: docs/FAQ-UNOFFICIAL-REPO-SCAM.md.

🗂️ Full index of every file (by file and by question): docs/INDEX.md

🌐 Website: https://aybvip.github.io/pi-fungibility/ · 📄 Machine-readable index for AI tools: llms.txt · 📌 Cite this work: CITATION.cff

On-chain, every π is identical. The native asset has no issuer and no contract, and the ledger records balances — not “coins” tagged with an origin. Therefore:

mined π = π from OKX/Bitget = π from inside a Pi Browser app

There is no field called “origin”, “mining”, or “exchange” — not on-chain, not in the SDK, not in the Platform API, and not in the Soroban smart-contract layer. All an app sees is: amount + sender address + recipient address + memo + txid.

The official MiCA whitepaper says it plainly: Pi is the “native, fungible digital asset” and belongs to a “Functionally Fungible Group”.

Everything in this repo is grounded in Pi Network’s official documentation:

Full quotes and citations: docs/SOURCES.md.

Layer 1 — The blockchain: a native asset with no identity (no issuer, no provenance)

Pi uses the Stellar protocol (same Horizon API, same @stellar/stellar-sdk, same networkPassphrase).

On Stellar, the native asset has no asset_issuer.

Any other asset (a token) shows an asset_code + asset_issuer and needs a trustline.

→ There is no way on-chain to determine where a π “came from”.

Direct test:

// GET https://api.mainnet.minepi.com/accounts/<G_ADDRESS> { "balance": "2.0000000", "asset_type": "native" } // no issuer, no origin

Layer 2 — Pi Wallet SDK: createPayment has no “origin”

// Official Pi docs Pi.createPayment( { amount: 1, memo: 'Unlock Premium', metadata: { feature: 'premium' } }, { onReadyForServerApproval, onReadyForServerCompletion, onCancel, onError } );

Allowed fields: amount / memo / metadata only. And the Wallet docs are explicit: “Transactions must be pre-signed; the SDK does not build or sign transactions for you.” — i.e. a plain Stellar payment of the native asset, with no tag describing the coin’s origin.

The full official response of GET /v2/payments/{payment_id}:

{ identifier, user_uid, amount, memo, metadata, from_address, to_address, direction, created_at, network, status: { developer_approved, transaction_verified, developer_completed, cancelled, user_cancelled }, transaction: { txid, verified, _link } | null }

👉 Not a single field describes where the π came from. Even from_address tells you who sent it — not where the coin came from.

Pi’s new Soroban smart-contract capability (PiRC1/PiRC2, on Testnet) gives a contract only the Stellar token interface:

Every objection reduces to one of four things — counterparty identity, asset type, balance state, or off-chain data — never coin provenance.

File Description

examples/provenance-check.mjs Zero-dependency script that queries the live chain and shows what an app can / cannot know about a coin

examples/coin-id-check.mjs Proves the balance is a single number — there is no per-micro-π ID

examples/mixing-check.mjs Live proof for the exact “mined + bought, then send” scenario: commingling → scalar balance → origin-less payment

examples/verify-deposit.mjs Verifies a specific transfer is a real native Pi payment on Mainnet (Claim B); states what the ledger cannot prove (Claim C)

examples/self-test.mjs Automated checks: offline unit tests (same-op rule, failed-tx gate) + online end-to-end (correct → VERIFIED, wrong → NOT VERIFIED)

examples/model-check.mjs Executable model + property check (2000 seeds, offline): state is one scalar, history → state non-injective, recipient view independent of origin

examples/exhaustive-check.mjs Exhaustive bounded check (offline, no randomness): enumerates all 1452 histories in a finite domain; origin-invisibility holds for every one

examples/run-all.mjs One command runs every check and prints a summary (--offline to skip network)

examples/lib.mjs Shared helpers: robust API client (shows HTTP status + body on error) and strkey input validation

examples/app-payment-flow/frontend.html Official Pi.createPayment flow (U2A)

examples/app-payment-flow/server.js Backend handling PaymentDTO + printing its keys

examples/payment-dto-sample.json Sample PaymentDTO showing the missing origin field

PROOF.md The step-by-step proof

Run it:

node examples/provenance-check.mjs node examples/coin-id-check.mjs

or against a specific transaction:

node examples/provenance-check.mjs <TXID>

⚖️ Limits and real distinctions (for accuracy)

Case The real difference

Lockup / claimable balance Shows as claimable_balance (with a time predicate) ≠ native. A difference of state, not of asset.

Unmigrated mining balance Not on-chain at all (in-app balance) → before vs after.

Exchange IOU / token May not be real native π. This is the only distinction that matters in practice.

Other tokens Show asset_code + asset_issuer and require a trustline.

Bottom line: the single native asset is fully fungible. Any real distinction is about state (locked / liquid / off-chain) or asset type (native vs token/IOU) — never mining history.

Precise claim: “A native Pi payment carries no observable per-unit mining origin on the Pi Mainnet ledger.” No more, no less. Distinguishing A (fungibility, proven) from B (a specific deposit — verifiable) Precision package: assumptions & adversary capabilities in docs/THREAT-MODEL.md; the three claims in docs/SCOPE.md · docs/FAQ-EXCHANGE-DEPOSIT-VERIFY.md.

One price basis — there is no price difference by origin.

No segregation / no taint — impossible on-chain.

Security — an incoming π payment merges into the balance instantly; trust the address + memo, not a “coin type”.

Always verify on-chain — a number in an app/exchange is not necessarily native π on the ledger.

Anti-scam — anyone claiming a “special / original mined / graded” Pi is lying; and any “buy/lock Pi” scheme that doesn’t appear on-chain as a claimable_balance is a scam.

Contributing

Found a flaw? That is the most valuable contribution. See CONTRIBUTING.md and the audit status docs/AUDIT-REQUEST.md (this repo is not independently audited yet).

If you reference this work, please cite it — see CITATION.cff — or simply link the repository: https://github.com/aybvip/pi-fungibility. A machine-readable index for AI tools is in llms.txt; the website is https://aybvip.github.io/pi-fungibility/.

正文由 探How 从来源站点 RSS 同步,内容未经改写;遇到排版缺失或需要图片、视频时请以原文为准。

打开原文
去社区讨论 →