Practical Guidance & Resources for the XRPL AI Hack
Everything you need for the day itself: how the UKCBT XRPL AI Hack runs, how to scope a project you can finish in six hours, a reference detection pipeline, how to evaluate a model without labels, a five-minute pitch structure, responsible analysis, and every resource from this course in one place.
Prerequisites
Complete these before starting this module:
What you'll learn
- Know the hackathon format, timings, team rules and submission deadline.
- Scope a narrow, finishable detection project and plan the six hacking hours.
- Follow a reference pipeline from ingestion to explainable detection.
- Evaluate a detector without labels using case studies, incident replay, synthetic injection and stability checks.
- Structure a five-minute pitch and present findings responsibly.
Overview
You have the XRPL fundamentals, you can read transactions as data, you can download them, and you know what laundering looks like. This last module turns all of that into a plan for the day: how the hackathon runs, how to scope a project you can actually finish in six hours, a reference architecture for a detection pipeline, how to evaluate a model without labels, how to pitch it, and every resource from this course in one place.
Before the day
Everything you can do in advance is time you get back for modelling:
- Finish this course, including the exercises, so the scripts already run on your laptop.
- Set up your environment: Python 3.10 or later with
xrpl-py==5.2.0,pandas,networkxandscikit-learn, or a Google Colab notebook with them installed. - Agree team roles if you already have a team: data, features and rules, model, and story and slides.
- Have a fallback dataset: venue Wi-Fi and public servers will both be busy. Download a modest ledger range at home and keep it on disk.
A reference pipeline
You don't have to follow this, but it works:
- Ingest: ledger sweep or account crawl with xrpl-py, retries and back-off, written to CSV or Parquet.
- Clean: keep
tesSUCCESS, readdelivered_amount, convert drops to XRP, key tokens bycurrency.issuer, set dust aside. - Enrich: account age and funding parent,
account_infoflags, explorer labels for known services. - Features: per-account behaviour (degree, totals, pass-through ratio, time to forward, amount uniformity) and graph features (cycles, PageRank, community).
- Detect: transparent rules first, then a model (Isolation Forest, clustering, or a graph neural network if you're confident).
- Explain: for each flagged account, show why: which features, which transactions, a small subgraph.
Evaluating without labels
There's no answer key. You can still show your model is meaningful:
- Case studies: walk through two or three flagged accounts with real transaction hashes and explain what you see.
- Known-incident replay: check whether your approach would have flagged the flows in a publicly reported incident.
- Synthetic injection: inject artificial patterns (a fake peel chain, a fan-out) into real data and measure whether you recover them. State clearly that they're synthetic.
- Stability: does the ranking stay similar across different time windows?
- False positives: show what you deliberately don't flag (exchanges, market makers, dust bots) and why.
Responsible analysis
On-chain data is public, but the people behind addresses are real:
- Say "flagged for review", never "criminal", in slides, code and demos.
- Don't try to de-anonymise individuals, and don't contact or accuse account holders.
- Treat explorer labels as evidence, not truth, and say where each label came from.
- Read-only analysis needs no keys. If you ever touch a wallet, use Testnet and never share a seed.
Resources
XRPL fundamentals and data
- XRPL documentation: https://xrpl.org/docs
- Public servers: https://xrpl.org/docs/tutorials/public-servers
- xrpl-py: https://xrpl-py.readthedocs.io/
- xrpl.js: https://js.xrpl.org/
- XRPScan explorer and API: https://xrpscan.com and https://docs.xrpscan.com
- XRPL Explorer: https://livenet.xrpl.org
- Bithomp API: https://docs.bithomp.com
- XRPL Commons docs: https://docs.xrpl-commons.org
AML and detection
- FATF Virtual Assets Red Flag Indicators: https://www.fatf-gafi.org/en/publications/Methodsandtrends/Virtual-assets-red-flag-indicators.html
- UNODC money laundering overview: https://www.unodc.org/unodc/en/money-laundering/overview.html
- Elliptic Data Set paper: https://arxiv.org/abs/1908.02591
- Elliptic2 paper and code: https://arxiv.org/abs/2404.19109 and https://github.com/MITIBMxGraph/Elliptic2
Tools
- pandas, NetworkX, scikit-learn, PyTorch Geometric for graph neural networks, Gephi or pyvis for graph visualisation.
Event
- Event page and registration: https://luma.com/71nckopa
Check
You're done when your team has a one-sentence project question, a working pipeline on a small cached dataset, agreed roles, and a draft outline of your five-minute pitch. Submit your team plan.
Resources
Assignments
0 of 2 complete