Code for the paper: "Decoding blockchain data for research in marketing: New insights through an analysis of share of wallet" (Hanneke, Skiera, Kraft, & Hinz, International Journal of Research in Marketing).
Public blockchains record every transaction openly, giving researchers a transparency traditional data sources don't offer. This project shows how to use that transparency to measure customer metrics that are normally unobservable: size of wallet (a customer's current spending with a firm), share of wallet, potential wallet, and total wallet.
Data: the entire Ethereum NFT trading market for 2022 — 22.7 million sales transactions from 1.3 million customers across 8 competing NFT platforms, totaling over US$500 million in fees.
Method: transactions are decoded from blockchain data (via Flipside Crypto), aggregated to the customer-platform level, and used to estimate each customer's share and size of wallet per platform, then related via regression to test whether current spending predicts growth potential.
Share of wallet is bimodal: most customers are either almost entirely loyal to one platform (share near 1.0) or barely engaged with it (share near 0), with few in between. This pattern holds even among customers who trade at more than one firm. The paper's key finding: a customer's current spending (size of wallet) has little correlation with their share of wallet or potential wallet size, so it is not a valid indicator of future growth potential.
df_sample_1percent.csv— 1% sample of the original transaction data, for reproducing the analysis without the full datasetFlipSide-20241121a-TK.py— retrieves transaction data from Flipside Cryptosummary_statistics-20241119a-TK.py— wrangles the data (or runs directly on the sample file) and reproduces the summary tables and the headline figureRegressions-all-2024-07-20a-TK.R— runs the regressions relating size of wallet to share/potential/total walletrequirements.txt/requirements.R— Python and R package dependencies
The full transaction dataset is not included; df_sample_1percent.csv (a 1% sample) is provided so the pipeline can be run end-to-end without access to the complete blockchain extract.
