anti-gambling-trader-tw
免費開源的投資反詐、交易統計與自動化交易程式工具:預設 PaperBroker,提供 14 種券商/交易所選項;交易紀錄分析在本機執行。
尚未偵測到更新。GitHub 發布版本後會顯示在這裡。
個人 GitHub 帳號下公開儲存庫的擁有者可以登入並驗證所有權,自行管理介紹,無需管理員核准。
登入並產生驗證檔案,在 30 分鐘內將其提交至此儲存庫的預設分支。其他分支或分叉儲存庫中的檔案無效。然後在下方檢查檔案,即可無需管理員核准直接管理專案。請保留檔案以維持管理權限。
如需登入,將前往登入頁面。登入後請回到此處,再次點擊所選的驗證按鈕。
在專案資料夾中執行 /nomorevibe verify,即可驗證所有權並自行管理介紹。
一分鐘完成驗證CBAM carbon passports that count every tonne once: AI reads a mill's evidence, the EU method in code, an EIP-712-signed statement, and a registry contract that stops double counting and carbon laundering across the supply chain.
翻譯準備中
取自儲存庫 README
正在載入完整 README。
檢視完整 README ↗Since 1 January 2026 EU importers pay for the carbon embedded in steel, aluminium, cement and fertiliser (the Carbon Border Adjustment Mechanism, CBAM). Without verified data from the foreign mill they pay on default values that the EU marks up on purpose. Ingot turns a mill's invoices into a verified CBAM emissions statement and then lets each verified tonne travel, through precursors, shipments and customs, to exactly one declaration. AI reads the evidence; a deterministic engine applies the EU method; an accredited verifier signs; a smart contract keeps the count.
IEEE ClimateChain Global Hackathon 2026 · Track: Carbon Markets & Emissions Transparency (with Sustainable Supply Chains alongside).
Live demo: ingot-six-blush.vercel.app · Video (3 min): youtube.com/watch?v=1auhQuJh6Gg · Try it in five minutes: open Try the flow, press Read all 7 documents, and follow the steps; the buttons marked Try to cheat send real transactions that the contract refuses.
On Ethereum Sepolia: the same contract runs at 0x81700eedd80142d65859616101e521729fd95473, source verified (exact match on Sourcify). The demo was replayed there, including a double sale the contract refused (ExceedsVerifiedQuantity), and Check a passport checks a passport against it live.
| The EU method, in code | The verifier signs; cheats are refused | The importer checks and declares |
|---|---|---|
The demo mill, its supplier and buyers, and their documents are fictional.
For the demo's mill, verified data means 0.354 t CO2e/t instead of 2.671, and the EU importer surrenders 0.132 certificates per tonne instead of 1.335: about €99 less per tonne at the Q3 2026 certificate price of €82.32. That gap is what makes verification worth paying for, and what makes every tonne of CO2 the mill avoids worth money to its buyers.
| Step | Who | What happens |
|---|---|---|
| 1 · Evidence | Mill | Gemini reads Turkish gas invoices, the electricity statement, the production report and the pig iron delivery note. Every number comes back with the verbatim text it was read from. A re-sent invoice (same number, KOPYA stamp) is caught and left out. |
| 2 · Calculate | Engine | The definitive-period method (Reg. (EU) 2025/2547): a carbon mass balance for the furnace, combustion for the reheating furnace, crude steel as the internal precursor, and the pig iron's embedded emissions read from the smelter's verified statement on the ledger, not typed in. Then the CBAM obligation with the column A benchmarks, the 2026 CBAM factor and the published certificate price, against the marked-up default. |
| 3 · Verify & record | Verifier | Plausibility checks against the EU BAT reference documents, a Merkle root of the salted report fields, an EIP-712 signature, and the statement recorded on chain. The pig iron allocation it used is consumed. |
| 4 · Ship | Mill | Each shipment takes tonnes from the statement and carries a passport: a W3C-shaped credential with the verifier's signature, the ledger anchor and the shared fields with their proofs. |
| 5 · Declare | Importer | The passport is checked against the ledger (signature, statement, allocation, precursors, disclosures) and surrendered in one CBAM declaration. |
contracts/CbamPassportRegistry.sol enforces what no single company's software can: one global count of verified tonnes across every buyer, trader and tier.
PeriodOverlaps).ExceedsVerifiedQuantity); one customs reference carries one allocation (ShipmentAlreadyAllocated).AllocationNotOpen).PrecursorEmissionsMismatch), and its total may not fall below them (BelowPrecursorEmissions). Even a bribed verifier cannot make a re-rolled coil cleaner than the pig iron inside it.Mistakes can be corrected: withdrawing a statement reopens its period (and any withdrawn ones before it), returns the precursors it consumed, and frees its customs references for the corrected statement.
Only commitments go on chain: the full report is a Merkle tree of salted fields, so a single field can be proven (verifyDisclosure) without revealing the rest. See docs/architecture.md.
The EU's own CBAM Registry already lets operators upload data once and share a summary with declarants. Ingot complements it rather than competing: a registry of reports does not, on its own, stop the same verified tonnes being split between two importers who use different systems, or a downstream mill passing on cleaner figures than the precursors it bought. Those are conservation rules across organisations, which is what a shared ledger is for. The verifier stays in charge of the truth of the evidence; the contract makes sure that truth is counted once.
CBAM cuts emissions only if a producer's real intensity reaches the price its buyers pay. On default values a Turkish mill that switches to cleaner charge carbon or a better reheating furnace saves its customers nothing. With a verified, portable statement every 0.1 t CO2e/t it cuts is worth about €8 per tonne to the EU buyer in 2026, rising to the full carbon price as free allocation ends in 2034. The assessment, its assumptions and low/mid/high projections are in docs/impact.md.
Google Gemini (gemini-3.8-flash) reads documents into schema-checked lines. On the seven sample documents it read 29 of 29 lines exactly (stream, month, unit and quantity), every document number, and the copy stamp on the re-sent invoice, in 5 to 12 seconds per file (npm run eval:extraction, run against the live site on 24 October 2026). Each line carries the text it was read from (lib/ai). The model does no arithmetic and makes no judgement: the engine calculates, the checks flag outliers against cited ranges, and the verifier signs only what they have checked. Uploaded files go to the model and are not stored; the route caps size and type and rate-limits by address. Without an API key the demo uses the documents' reference readings and says so.
Verifiers sign twice: EIP-712 (ECDSA) for the contract, and ML-DSA-65 (FIPS 204), a post-quantum signature, over the same statement id, whose public key hash the registry stores, so a passport stays checkable once ECDSA can be forged. Signatures are bound to one chain and contract, and expire; verifiers are accredited, suspendable and time-limited; every state change is a custom error away from refusal. The threat model (forged evidence, collusion, replay, front-running, key loss, privacy on a public chain) and what remains outside the contract's reach are in docs/security.md.
npm install
npm run dev # http://localhost:3000, the EVM runs in the page
npm test # 32 unit tests: engine, disclosure proofs, post-quantum co-signatures, sandbox EVM, the whole demo flow
npm run contracts:test # 30 contract tests (Hardhat 3, node:test, viem)
npm run contracts:build # compile and export the ABI and bytecode to lib/chain
node e2e/walkthrough.ts # click through the demo in Chrome (BASE_URL, CHROME_PATH)
Optional: put GEMINI_API_KEY in .env to have Gemini read the documents (see .env.example). To deploy and verify the contract on a public testnet yourself, see docs/deploy.md.
| Path | What |
|---|---|
contracts/ | CbamPassportRegistry.sol and its tests |
lib/cbam/ | Factors with sources, the calculation, the CBAM obligation, plausibility checks |
lib/chain/ | The in-page EVM sandbox, the Sepolia deployment and its reader, EIP-712 types, demo actors, the exported ABI |
lib/crypto/ | Salted Merkle commitments and selective disclosure |
lib/ai/ | The extraction schema and the Gemini call |
lib/demo/, components/ | The guided demo, ledger and passport pages |
lib/samples/, public/samples/ | The fictional mill's evidence and the generator for its PDFs |
docs/ | Architecture, security, impact, adoption, problem statement, testing |
Solidity 0.8.34 and OpenZeppelin 5.6, Hardhat 3 with viem, the ethereumjs EVM in the browser, Ethereum Sepolia with Sourcify and Blockscout, Next.js 16, React 19, Tailwind 4, zod, the Google Gen AI SDK with Gemini, Vitest and Playwright. The project was built with the help of Claude Code.
MIT licence.