Inspiration

Since 20 November 2026, "buy now, pay later" (pay in 3 or 4 installments) is legally consumer credit in France (EU directive 2023/2225). Providers like Klarna, Oney or Alma must now check whether a customer can repay. But they are blind to each other: a customer can take four BNPL plans from four providers on the same day, and nobody sees it.

The FICP (Banque de France register) only lists repayment incidents, not ongoing credits. Even open banking does not show a credit granted yesterday elsewhere, because no installment has been debited yet. And a national register of all credits was struck down by the French Constitutional Council in 2014 as a disproportionate privacy intrusion.

Our question: how can competing lenders see a customer's real BNPL debt without a central database that threatens privacy?

What it does

  • Shared registry on Kaspa. Every BNPL credit granted by any provider is recorded on Kaspa testnet-10: amount, installments, date, and the income and expenses the customer declared.
  • Encrypted per person. Each record is encrypted with a key derived from the customer's identity, and that key is never stored. A provider can only read someone's history when that person is in front of them applying for credit. Nobody can browse the registry: the public chain only shows an anonymous ID and ciphertext.
  • Transparent decision rule. FICP-registered: refused immediately. Otherwise:

$$\text{remainder} = \operatorname{median}(\text{declared incomes}) - \operatorname{mean}(\text{declared expenses})$$

$$\text{accepted} \iff \text{remainder} \geq 1.10 \times (\text{installments due next month on all BNPL} + \text{new installment})$$

  • Catches inconsistent declarations. If someone declares €2,100 today after declaring €1,500 to three other providers, it is flagged and the median neutralises the lie.
  • AI that explains, never decides. Claude turns the computed figures into a clear explanation and suggests alternatives that would be accepted (a smaller amount, or 4 installments instead of 3). Credit scoring is "high-risk" under the EU AI Act and customers have a right to an explanation, so the decision itself stays a transparent, auditable rule.

How we built it

  • Python + official Kaspa Python SDK. Each credit is a self-send transaction carrying the encrypted record as payload, sent through the public Resolver with timeouts and retries.
  • Reading the registry. The node RPC only exposes unspent outputs, so we read the address history from the public Kaspa REST indexer, merged with a local ciphertext-only cache.
  • Privacy. AES-256-GCM per record; key and anonymous ID derived with HMAC-SHA256 from the normalised identity and a consortium secret. The anonymous ID is authenticated data, so a record cannot be re-filed under someone else.
  • Rule engine. Pure, deterministic module in integer cents, prudent rounding, exact alternatives.
  • AI. Claude (Anthropic API) receives figures only, never identity data, with a deterministic French/English fallback so the demo never breaks.
  • Demo. Streamlit app with four fictional customers and a simulated FICP lookup.
  • Quality. Test-driven development, 88 automated tests, 87–100% coverage per module.

Our demo customers' past credits are real encrypted transactions on Kaspa testnet-10, read back and decrypted from the chain alone.

Challenges we ran into

  • Reading history from Kaspa. The node API cannot list an address's past transactions or payloads, so we combined SDK writes with indexer reads and a cache for indexing lag.
  • Unreliable public nodes. Some nodes returned by the Resolver hang, so every call needed timeouts and retries on a fresh node.
  • Double spends, observed live. While writing records back to back through different public nodes, two of our transactions spent the same coin and the network kept only one. We now wait for each transaction to be visible before the next one — and this is exactly the mechanism we want to use to block simultaneous credits.
  • Privacy versus usefulness. A public ledger is the opposite of what the 2014 decision asked for. Per-person keys derived from the identity let us keep a shared registry nobody can browse.
  • Defining a fair rule. Our first idea (a 35% debt-to-income cap) is a mortgage rule and far too strict for small purchases. We moved to a monthly budget check that only penalises inconsistent customers.

Accomplishments that we're proud of

  • A shared registry where competitors cooperate without any of them owning the data.
  • A privacy design that directly answers why the 2014 register was rejected.
  • A decision anyone can audit, with AI used where it really helps: explaining and suggesting alternatives.
  • A working demo on four key cases: a student, an employee, a customer stacking three BNPL plans and lying about his salary, and a FICP-registered customer.

What we learned

  • How Kaspa transactions, payloads, the Resolver, public indexers and double-spend protection work in practice.
  • The new legal framework for BNPL in Europe and why a central credit register failed in France.
  • That responsible AI in finance means keeping the decision explainable: the model explains, it does not decide.

What's next for EpiCore

  • Block simultaneous credits on-chain: one UTXO per person that every new credit must spend, so two simultaneous credits become a double spend and Kaspa accepts only one.
  • Covenant enforcement: a Kaspa covenant so the network itself rejects any credit that breaks the rule.
  • Zero-knowledge proofs: prove "my budget covers the installment" without revealing any figure, so the covenant can check the rule on encrypted data.
  • One key per provider, records trusted only from known provider addresses, and recording repayments and defaults.

Built With

  • aes-gcm
  • anthropic
  • blockchain
  • claude
  • cryptography
  • kaspa
  • kaspa-python-sdk
  • python
  • streamlit
Share this project:

Updates

Submission history