Circulation of a digital community currency

Circulation is the characteristic feature of successful currency systems, from community currencies to cryptocurrencies to national currencies. In this paper, we propose a network analysis approach especially suited for studying circulation given a system’s digital transaction records. Sarafu is a digital community currency that was active in Kenya over a period that saw considerable economic disruption due to the COVID-19 pandemic. We represent its circulation as a network of monetary flow among the 40,000 Sarafu users. Network flow analysis reveals that circulation was highly modular, geographically localized, and occurring among users with diverse livelihoods. Across localized sub-populations, network cycle analysis supports the intuitive notion that circulation requires cycles. Moreover, the sub-networks underlying circulation are consistently degree disassortative and we find evidence of preferential attachment. Community-based institutions often take on the role of local hubs, and network centrality measures confirm the importance of early adopters and of women’s participation. This work demonstrates that networks of monetary flow enable the study of circulation within currency systems at a striking level of detail, and our findings can be used to inform the development of community currencies in marginalized areas.


Introduction
The circulation of money is generally studied in an abstract sense, for example as the extent to which monetary policy, productivity improvements, supply disruptions, or other shocks affect aggregate indicators of economic output [1][2][3][4] .Detailed observation has long been impractical for lack of empirical data.However, modern payment infrastructure is increasingly digital 5 , and the circulation of money is leaving real-time records on the servers of financial institutions worldwide.These transaction records offer especially high granularity data in time and in space, and open up the possibility of fined-grained data-driven studies of financial ecosystems [6][7][8][9][10][11][12] .In this paper we consider the circulation of money as observed in transaction records, using networks of monetary flow to represent patterns of circulation over a period of time.Our findings show that techniques in network science -flow-based community detection, measures of cyclic structure, network mixing patterns, and walk-based centrality metrics -together capture key aspects of circulation within a real-world currency system when applied to such networks.We demonstrate that important practical and theoretical questions around the circulation of money can be studied using networks of monetary flow.
The main focus of this paper is on complementary currencies whose modern implementations produce comprehensive digital records, as these are cases where transaction records are available for an entire currency system.Complementary currencies circulate in parallel to national currencies in that tokens are not legal tender, nor necessarily exchangeable for legal tender [13][14][15] ; they are used under mutual agreements that come in many forms, from local community currencies 6,16,17 to global cryptocurrencies [18][19][20] .Sardex, for example, is a digital complementary currency used among businesses in Sardinia.Digital records of transactions in Sardex have been studied to show that cycle motifs are related to performance and stability of the currency system 21,22 .The full transaction histories of Bitcoin and other cryptocurrencies can be reconstructed from public ledgers [23][24][25] .Bitcoin transactions reveal a currency system that supports substantial trade outside centralized marketplaces, but where inequality has been increasing over time 19,26 .Sarafu, the currency considered in this work, is a "Community Inclusion Currency" (CIC) that incorporates elements of both community currencies and cryptocurrencies 27 .
Community currencies are typically created with the aim to support local economic activity by facilitating local circulation 16,17,28 .Moreover, complementary currencies are counter-cyclical in that they tend to see higher circulation during periods of economic disruption 29,30 .We study Sarafu, a digital community currency with a presence in several local areas of Kenya, from January 2020 to June 2021, a period that saw considerable economic disruption due to the COVID-19 pandemic.Previously published data 31 and a data descriptor 27 detail the transaction activity that occurred over Sarafu over this period.We detail transaction volumes in Sarafu over time and then study the circulation of Sarafu resulting from this activity as a network of monetary flow.
The Sarafu flow network encompasses 293.7 million Sarafu in transaction volume among around 40,000 users.This weighted, directed, time-aggregated network representation captures the patterns of circulation in intricate detail, allowing us to study what shapes the Sarafu currency system as a whole.We apply carefully selected network analysis techniques to the Sarafu flow network to answer three questions of particular relevance to research about community currencies: Among whom is Sarafu circulating?Anonymized information on account holders allows us to label each node with a geographic area, livelihood category, registration date, and reported gender.We investigate the composition of sub-populations within which Sarafu was circulating, as identified using a so-called community detection method developed especially for flow networks.Specifically, the map equation framework and the associated Infomap algorithm 32,33 group nodes into sub-populations whose sub-networks capture as much of the transaction volume as possible.
What network structures support the circulation of Sarafu?Degree disassortativity has been noted in a variety of economic networks 19,[34][35][36] in that high-degree nodes generally transact with low-degree nodes.It has also been noted that network cycles may be key to the 'health' of currency systems and of individual accounts 21 .Indeed, detecting cycles and brokering 'missing' financial connections is seen by private actors as a promising credit clearing and risk management service 22,37 .In a similar vein, Ussher et al. 15 argue that community currencies compare favorably to cash assistance as an economic development intervention because they help establish economic connections that keep money local.We study the network structure underlying the circulation of Sarafu within the aforementioned sub-populations using network assortativity measures and relative cycle counts.
What characterizes the most prominent Sarafu users?We would like to understand patterns in who holds Sarafu accounts that are especially prominent, or perhaps even systematically important.Prominent users are identified by means of a network centrality measure that is directly related to the circulation of Sarafu, as captured by a network of monetary flow.Specifically, weighted PageRank 38 computes a metric that corresponds to the share of funds a given account would control, at any given time, if the observed dynamics were to continue indefinitely.We calibrate this measure against empirical account balances and use it to investigate the account features most associated with prominent users.
The Sarafu user base grew substantially over the observation period and transaction volumes rose dramatically as the COVID-19 pandemic disrupted regular economic activities.However, our results indicate that circulation remained modular and geographically localized.Circulation occurred primarily within particular sub-populations consisting of co-located users with diverse livelihoods.This has concrete implications for humanitarian policy in marginalized areas, in that it implies that community currencies can help support specific areas during periods of economic stress and that such interventions are more likely to succeed in areas with a diverse mix of economic activities already present.Community currencies also support local economic development over longer periods of time 13,15,21 .For such initiatives, it is useful to know that communitybased financial institutions, and, in a few cases, faith leaders, are especially prominent among Sarafu users.These "hubs" play a key structural role especially at a local level, in that the sub-networks underlying local circulation are consistently degree-disassortative.Moreover, an elevated presence of short cycles supports the intuitive notion that circulation requires cycles.
The findings and insights presented in this paper provide a fine-grained understanding of the circulation of Sarafu over a highly dynamic period that includes the arrival of the COVID-19 pandemic to Kenya.This investigation demonstrates that networks of monetary flow can capture key features of circulation within currency systems.Moreover, flow-, walk-, and cyclebased network measures and algorithms produce interpretable analyses that allow for characterising the system.Noteworthy is that the approach presented in this paper can be applied to study any currency system where digital transaction records are available.Indeed,there may be be important regularities underlying the circulation of money in such systems, and these would be well worth exploring further.
The remainder of this paper is organized as follows.The Data section briefly describes the Sarafu system over this especially tumultuous period.The Results section presents our findings on patterns of circulation, prominent users, and the network structure underlying circulation.We synthesize these contributions and discuss the implications of our findings in the Discussion section.Finally, the Methods section details the data preparation, network analysis measures, and statistical methods used in this study and provides references to facilitate data, code, and software availability.

Data
Digital administrative records of the Sarafu CIC from January 2020 to June 2021 have been published by Grassroots Economics, a non-profit foundation based in Kenya that operates Sarafu and leads related economic development projects in marginalized and food-insecure areas of the country.The published dataset 31 has previously been described in raw form 27 and used in a case study introducing CICs as a modality for humanitarian aid 15 .During the observation period, Sarafu was available throughout Kenya.Mimicking the well-developed mobile payment infrastructure of the national currency [39][40][41][42][43][44] , each Sarafu account was tied to a Kenyan mobile number and accessible over a mobile interface.An account could be created with an activation code sent to a particular mobile number, then used and managed via a series of simple menus.The resulting digital records became a dataset that includes hundreds of thousands of Sarafu transactions and anonymized account information for the tens of thousands of users.January 2020 saw the consolidation of several precursor currencies onto a single platform: Sarafu.In prior years, several digital community currencies had been launched by Grassroots Economics in different areas 27,45 .These were designated to operate as separate systems over a decentralized infrastructure, interacting very little.Flow networks from earlier periods would have been composed of a dozen or so nearly-disconnected components, each corresponding to a different precursor currency serving a different local community.Shortly following the start of the observation period, the consolidated system expanded dramatically as the COVID-19 pandemic arrived in Kenya.Sarafu grew from 8,354 registered accounts in January 2020 to almost 55,000 in June 2021.Figure 1 shows the transaction volumes for each of the complete months over the observation period.Beginning in April 2020 and continuing through the second wave of COVID-19 in Kenya, Sarafu saw transaction volumes almost ten times higher than in February 2020.This dramatic expansion occurred primarily in particular regions, described below, and we see a return towards the baseline in these areas by the end of the observation period.The overall pattern is perhaps best explained by the counter-cyclical nature of complementary currencies, which are known to see spikes in usage levels during periods of economic disruption 13,29,30 .
The figures in this work employ a consistent color scheme for geographic area.Purple corresponds to Kinango Kwale, a rural area where GE has had a substantial presence in several local communities for many years; this area saw much growth during the COVID-19 pandemic due largely to word of mouth.Light green is Mukuru Nairobi, an urban area that was the site of a targeted introduction beginning in March 2020.For details we refer to the Data preparation section in Methods.Accounts located elsewhere in Nairobi are shown in dark green.In light blue are accounts in Kisauni Mombasa, the site of a second introduction beginning in early 2021.Accounts located elsewhere in Mombasa are shown in dark blue.Kilifi, in dark grey, is the county where GE is headquartered.Users with an unknown location (the largest category within other), are in light grey.In Figure 1, other closely tracks the remote rural county of Turkana, in orange.Teal and red correspond to locations in Nyanza county or elsewhere in rural Kenya, respectively.

Results
The Sarafu system supported over 400,000 transactions among more than 40,000 user accounts between January 2020 and June 2021.This resulted in the circulation of 293.7 million Sarafu, visualized in Figure 2 as a network of monetary flow.The nodes are registered accounts, for which we know attributes such as the geographic area, livelihood category, and reported gender of the account holder.An edge from one account to another indicates that at least one transaction occurred across that link.The edge weight corresponds to the observed monetary flow along an edge, i.e., the total sum of transaction amounts across that link.The Sarafu flow network is a weighted, directed, time-aggregated network representation of the total circulation over the observation period, excluding system-run accounts.For details on the construction of the network, we refer to the Data preparation section of Methods.The network visualization employs the same colors for geographic area as does Figure 1, revealing patterns suggestive of modular and geographically localized circulation.
In the remainder of this section, we share findings resulting from network analysis of the Sarafu flow network.The Modular circulation section considers sub-populations within which Sarafu was circulating, and their composition along lines of geographic area and livelihood category.In the Underlying network structure section, we consider the network structure that supports this circulation, including analyses of cyclic structure and network mixing patterns.The Prominent Sarafu users section compares relevant network centrality measures and describes the most prominent users of Sarafu.

Modular circulation
To more precisely understand the patterns of circulation present in the Sarafu flow network, we apply an especially suitable community detection method.The map equation 32 is defined in terms of flow networks and the associated Infomap algorithm 33 groups nodes into hierarchical modules.Specifically, Infomap assigns nodes to modules (and sub-modules) within which a "random walker" on the network would stay for relatively long periods of time.In our case, the weights on the edges of the Sarafu flow network reflect real, observed flows of Sarafu and so the Infomap algorithm will seek to discover modules that contain especially much transaction volume.This identifies sub-populations within which Sarafu tended to circulate.For details, we refer to the Circulation section in Methods.
The Infomap algorithm recovers a hierarchical, nested, modular structure to the Sarafu flow network.The hierarchical structure consists of top-level modules, sub-modules and sub-sub-modules at respectively the first, second and third level of the community hierarchy.Circulation of the Sarafu community currency was highly modular in that activity occurred almost exclusively within distinct sub-populations.At the first hierarchical level, 99.7% of the total transaction volume was contained within the five largest so-called top-level modules.Moreover, there are 37 sub-modules composed of 100 or more accounts and these contained 96.5% of the total transaction volume.Only a small share of the overall circulation took place between the sub-populations defined at the second hierarchical level, and circulation within these sub-populations itself had a nested, modular structure.Indeed, the 455 sub-sub-modules composed of 10 or more accounts capture 80% of the total transaction volume.Altogether, these findings suggest that the circulation of Sarafu was extremely modular over the observed period.

Geographic localization
We investigate the extent to which the distinct sub-populations discovered above localize in particular geographic areas.Figure 3 shows the geographic composition of the top-level modules-four of the five map directly onto one of the main areas labeled in the data: Kinango Kwale, Mukuru Nairobi, Kisauni Mombasa, or Turkana.Only one of the modules has substantial membership from several regions; its sub-modules are, however, also geographically delineated.This top-level module combines several less prominent localities, including in Kilifi, in Nyanza, and in two localities elsewhere in Nairobi.We conclude that the circulation of Sarafu was geographically localized over the observed period.The top-level modules are amalgamations of circulation within sub-modules, which appear to correspond to geographic areas more granular than those labeled in the data.Indeed, raw reported locations were often quite precise and were converted to broader area labels in the anonymization that occurred prior to the publication of the data 27 .Several of the sub-modules highlighted in Figure 3 coincide with areas where early, physical community currencies were operating in the years before Sarafu became all-digital 45 .Within Kinango Kwale, moreover, the sub-modules likely correspond to individual rural villages or clusters of villages 15 .Thus, circulation was geographically local, predominantly.We will further consider the sub-populations delineated by the Infomap sub-modules in subsequent analyses.

Diversity of economic activities
Now that we understand the modular structure and geographic localization of circulation, we consider the composition of the localized sub-populations with respect to economic activity.This is of particular interest to practitioners as it helps illustrate among whom Sarafu was circulating.There are 14 categories of economic activities into which user-reported livelihoods were grouped, the most common of which are labour in urban areas and farming in rural areas.Many other users (in both urban and rural areas) report selling food, running a shop, or providing transport.
Most notably, we see a mix of the different economic activities within the largest second-level sub-populations.Figure 4 illustrates the livelihood category given for each account in the 15 largest sub-modules identified by the Infomap algorithm.The largest sub-populations include several thousand accounts, and 13 of the 37 we consider have more than 1000 users.Notice that the livelihood mix consistently diverse.To also give a sense of how this diversity is experienced from within sub-populations, we compute and report the view from the average user.The average user participates in a sub-module with around 2000 other users, and of these others, 66% report a category of work that is different from what they themselves report.Little diversity is lost as we consider even finer scales.The average user appears in a sub-sub-module with around 250 other users, 59% of whom do not share their same livelihood category.We conclude that the circulation of Sarafu involves a diversity of economic activities, even at the scale of a single village.
We also see that the composition of the sub-populations using Sarafu is substantively different in urban and rural areas.In Figure 4, the sub-modules where farming or fuel/energy are prominent are rural and composed of users reporting a location within Kinango Kwale, almost exclusively.Those where labour is prominent correspond to sub-populations localized primarily in urban or peri-urban areas including Mukuru Nairobi, Kisauni Mombasa, and Kilifi.The geographic aspect of circulation is further refined by means of the type of geographical area.

Underlying network structure
In this section, we consider the network structure underlying the circulation of Sarafu.Each of the sub-modules considered above in the Modular circulation section is associated with a sub-population of 100 or more accounts that defines a sub-network of 100 or more nodes.An (unweighted) edge from one account to another indicates that at least one transaction occurred across that edge.Node degree corresponds to an accounts' number of unique transaction partners, incoming and outgoing, in their same sub-population.In the Cyclic structure section we count the cycles present in the sub-networks, relating the presence of cycles to the notion of circulation and the sustainable operation of complementary currency systems.Next, the Structural correlations section quantifies network mixing patterns, relating degree disassortativity to the structural importance of local "hubs" in the sub-networks.

Cyclic structure
Network cycles may be key to understanding the conditions under which an area is, or overtime becomes, able to sustain local circulation 15,21,22 .We explore the presence of cycles in the Sarafu sub-networks as compared to the expectation from a null model.We use two standard null models: Erdős-Rényi (ER) networks and random degree-preserving (RD) networks.ER networks have the same number of nodes and edges as the empirical network, but are wired randomly.Our RD networks preserve the indegree and outdegree sequences in expectation.For details we refer to the Network cycles section of Methods.
Relative to the ER null model, nearly all of the sub-networks have many more cycles than expected at cycle lengths 2, 3, 4, and 5 (Figure 5, left).Extremely large magnitudes of the z-score may indicate that ER networks are not a suitable comparison.Indeed, short cycles are negligible in large Erdős-Rényi networks 46 .Figure 5 (right) shows the z-score of the cycle counts computed for each of the Sarafu sub-networks, relative to the RD null model.The values are positive and large for cycles of length 2 and 3 for most sub-networks, indicating cycle counts many standard deviations above expectation.Some sub-networks, especially in Mukuru Nairobi, also have unexpectedly many cycles of length 4 and 5.These findings are in line with prior findings for the Sardex currency in Sardinia, where a gradual increase in short cycles (relative to an RD null model) was observed over two years 21 .Notably, this is the case even though Kenya and Sardinia differ in their level of economic development, Sardex is aimed at businesses whereas Sarafu is aimed at individuals, and pandemic times are certainly different from regular times.Moreover, the currency management practices followed by the two providers are quite distinct 21,27 .Short cycles are a prominent network connectivity pattern in the circulation of Sarafu, and perhaps of (community) currencies more generally.

Structural correlations
Degree disassortativity is an expected feature of specifically currency networks 19,36 and of economic networks, more broadly 34,35 .In networks with this property, high-degree nodes generally interact with low-degree nodes, not other high-degree nodes.In avoiding one another, high-degree nodes tend to become "local hubs" that are prominent especially with respect to nearby nodes (i.e., their network neighborhood) that are predominantly of low-degree.Recall also that Sarafu sub-modules 6/20 Five observations are omitted from the ER plot, as the logarithmic scale cannot represent small negative z-scores.These are confined to two sub-modules, where one or no cycles occur at higher cycle lengths.
are diverse with respect to the livelihood reported by accounts (Diversity of economic activities section).Here we consider these and other structural correlations that help us better understand the circulation of Sarafu.Since the overall influence of account attributes on the Sarafu flow network is limited by the constraints of geography, and may be heterogeneous across sub-populations, we consider degree and attribute assortativities across the Sarafu sub-networks.For details we refer to the Network mixing patterns section of Methods.
Table 1 reports the average, the median, and the range for each property as computed on the undirected version of each sub-network.We find substantial disassortativity in degree across nearly all sub-networks.As expected, we also find that attribute assortativity is consistently low along the dimension of livelihood category.The consistency of these observations across sub-populations suggests that there may be important regularities in the structural correlations of networks that support the local circulation of community currencies such as Sarafu.Correlations with respect to gender and registration date in the structure of the sub-networks can also be substantial, although these effects are not consistent across sub-populations.Again from Table 1, attribute assortativity on gender is present in about half of the 37 sub-populations and is substantial in several.This may be related to the activity of community-based savings and investment groups, where women's participation is high 47,48 .Within Sarafu, such groups provide opportunities to transact assortatively on gender.Gender assortativity in payment networks may also reflect, for instance, gendered economic roles in ways that deserve further study.Strong correlations in registration date also appear in several sub-networks, indicating a cohort effect.For example, during targeted introductions as described in the Data preparation section, groups of users who share latent economic ties would together adopt Sarafu over a relatively short period of time.Correlations by cohort are likely to appear in any digital payment system where use is voluntary and adoption can be coordinated.

Prominent Sarafu users
Local hubs play a key structural role in the circulation of Sarafu, and it is important to understand who takes on such prominent positions.We ask what features are especially consistent among accounts with high network centrality, now across the entire Sarafu flow network.In the section Identifying prominent users we consider an account's number of unique transaction partners, transaction volumes, and especially relevant network centrality measures.Next, the Characterizing prominent users section asks what features of Sarafu accounts are strongly and consistently associated with high network centrality.

Identifying prominent users
As a first step towards understanding prominent Sarafu users, we consider distributions of relevant account statistics.Figure 6 (left) shows the empirical distributions of node degree, binned on a logarithmic scale.Node degree corresponds to an account's number of unique transaction partners.We note that values are highly heterogeneous across accounts; the distribution is right-skewed and there is a "heavy" or "thick" tail indicating that a small share of accounts has orders of magnitude more unique transaction partners than do most accounts.Indeed, the in-and out-high-degree tails both fit a Pareto distribution with power-law exponent of 2.9.For details we refer to the High-degree tail estimation section of Methods.The Sarafu flow network has hubs, in that a small share of nodes are especially prominent.Moreover, the power-law tail indicates the likely presence of so-called "preferential attachment" as the Sarafu network grew [49][50][51] .Under such dynamics, accounts with many unique transaction partners are proportionately more likely to attract or create additional connections.Because degree is disassortative (see the Structural correlations section), we also know that high-degree nodes are dispersed across the network and likely to be what we call "local hubs" prominent among predominantly low-degree neighbors.
We also see that a relatively small number of account holders spend orders of magnitude more Sarafu than do the bulk of the users.Figure 6 (right) shows binned empirical distributions of weighted degree, which corresponds to total transaction volumes into and out of accounts.These values are spread over a wide range and also exhibit a heavy tail.Reflecting the underlying accounting consistency present in networks of monetary flow, weighted in-and out-degree are exceptionally highly correlated.Accounts must receive large amounts of Sarafu in order to spend large amounts of Sarafu.
More generally, degree and weighted degree are not interchangeable, capturing different notions of prominence in the system.Figure 7 shows the Pearson correlation between node degree, weighted degree, and two especially relevant centrality metrics.The unweighted PageRank algorithm produces a non-zero value for each node that is correlated with both the in-and out-degree; this makes it a practical measure for downstream tasks involving the unweighted network.Unweighted PageRank is closely related to the indegree 52,53 .More interesting is the weighted PageRank, which captures something distinct from the in-or out-degree, the weighted in-or out-degree, and unweighted PageRank.Noteworthy is that values of weighted PageRank are interpretable as the share of system funds that an account would eventually control, if the observed dynamics were to continue.Further details, including an empirical calibration to account balances, are presented in the Network centrality section in Methods.

Characterizing prominent users
To characterize prominent users of the Sarafu system, we ask what features are especially consistent among accounts with high network centrality.Figure 8 illustrates the regression coefficients on account properties when PageRank and weighted, inflow-adjusted PageRank are used as outcome variables.Ordinary least squares (OLS) provides an estimated statistical contribution for each account feature, while Elastic Net (EN) incorporates regularization to highlight only those features most consistently associated with centrality.For details, we refer to the Linear regression section in Methods.
PageRank and weighted inflow-adjusted PageRank capture distinct aspects of node importance, but are positively and negatively associated with many of the same account features.Most strongly and consistently associated with high network centrality are accounts held by savings groups.Indeed, community-based savings and investment groups are a key feature of local economies in Kenya and of the Sarafu system (as noted in the Data preparation section in Methods).The size of this category is quite small, however, containing only 264 accounts.The number of faith leaders is even smaller, and some appear to play an especially prominent role in the local circulation supported by this community currency.
The other regression coefficients in Figure 8 reveal additional nuances among some of the largest categories of users.Accounts that were created prior to the consolidation of Sarafu, which occurred as the data collection period began, are consistently associated with high network centrality; early adopters show a higher tendency to be prominent users.This is consistent with the presence of preferential attachment in this system, as noted in the previous section.We also find that account holders reporting their gender as female are associated with higher centrality in the Sarafu flow network-this prominence of women is remarkable.In fact, it conforms to qualitative accounts from field studies in Kinango, Kwale that report strong participation of women, and women's leadership, within community-based savings and investment groups that use Sarafu 47 .This has also been noted about savings groups in Kenya, more generally 48 .With respect to geography, recall that Mukuru Nairobi and Kisauni Mombasa refer to the site of targeted introductions in spring 2020 and early 2021, respectively.Timing appears to have made a substantial difference: the second intervention did not spur large transaction volumes, while those reporting a location within Mukuru Nairobi have higher network centrality (on average) than users in Kinango Kwale (the reference category).Perhaps most interestingly, farming is associated with lower centrality than other reported economic activities.Non-farming activities (e.g.selling food, running a shop, or providing labour) appear to be "central" to local economies even in areas of rural Kenya, such as Kinango Kwale, that rely heavily on subsistence agriculture.

Discussion
Our study of the Sarafu system complements and corroborates a growing body of work informing policy on alternative interventions in marginalized areas 15,[54][55][56][57] .In particular, our findings shed new light on the conditions under which community currencies might form part of successful humanitarian or development interventions.The circulation of Sarafu remained modular and local even as the system saw dramatic growth in its user base and accommodated large spikes in transaction volumes.In areas where local economic activities are already diverse, the rapid deployment (or scaling up) of community currency operations may be able to support the aims of a broader humanitarian response.Over longer periods of time, and in more peripheral areas, community currencies support economic development to the extent that they encourage diverse productive activities and strengthen short, local supply chains that keep money within a community 15 .Here it is useful to note that community-based financial institutions, and, in some cases, faith leaders, played a key role in the Sarafu system.Future initiatives would likely benefit from finding ways to better assist in the discovery or creation of short cycles in local economies.Practically speaking, it may be possible to identify "missing links" in local economic or financial networks such that policymakers and organizers might intervene to close cycles by brokering among local businesses 22,37 .
More broadly, this work has demonstrated that a network approach can unveil meaningful patterns and extract relevant insights about the circulation of money from digital transaction records.Our contextually relevant findings demonstrate the explanatory power of representing circulation as a network of monetary flow.When applied to such networks, walkand flow-based network analysis methods (e.g., PageRank and Infomap) produce outputs that are readily interpretable in terms of circulation and account balances.Notably, these methods rely on scalable algorithms meaning that our approach    ----------Livelihood category-------Gender   Figure 8. Regression coefficients for linear models fitting account features to centrality measures, using Ordinary least squares (OLS) and Elastic Net (EN).For the three categorical predictors, the reference categories are accounts that report a location in Kinango Kwale, report selling food, and do not report a gender.can be applied to study sizeable currency systems where transaction data is recorded in digital form.This includes other community currencies 6,16,17,21 as well as major global cryptocurrencies 19,20,26,36 .Recent methodological advances 10,58 promise to extend applicability also to payment systems that are not themselves full currency systems, such as mobile money systems 10,59,60 , large value payment systems [61][62][63][64][65][66][67] , major banks 12,[68][69][70] , and, in an exciting development, centralized national payment infrastructures [71][72][73] or central bank digital currencies 74 .
This study considers the aggregated circulation of Sarafu over the full observation period, and applies especially suitable network analysis techniques using openly available tools.While this already presents interesting findings, networks of monetary flow are static representations and potentially interesting temporal or sequential information is lost 10,36,[75][76][77] .Several changes to the system occurred within this period and could be studied in future work 27 .Transaction processes are compelling examples of real-world walk processes 10 , and we hope that the interpretability of walk-based network analysis methods as applied to our static representation of Sarafu can help motivate the development of equally interpretable methods for dynamic representations.It may be possible, for instance, to produce measures of the fidelity between the temporal network that fully describes a transaction process and its static representation, as has been done for interaction networks in the context of spreading processes 78 .Indeed, reproducing observed trajectories (from, for example, a real-world walk process) using a static network representation is already the logic underlying multi-order models of complex systems 10,79,80 .Future methodological advances would also be welcome in the analysis of network cycles and of log-normal distributions with Pareto tails.
Studies on additional systems and further methodological development could bring us towards a future where entire economies might be studied as (interconnected, dynamic) networks of monetary flow.Notably, degree disassortativity has been found across many economic networks 19,[34][35][36] and short cycles are over-represented also in at least one other complementary currency system 21 despite considerable contextual differences.This is some indication that there may be important networkstructural regularities underlying the circulation of money, which deserve to be further explored across currency systems large and small.

Methods
The Data preparation section provides a detailed description of the portion of the raw Sarafu data used in constructing our timeseries and our network of monetary flow, plus three peculiarities of the Sarafu currency system that are of relevance to the implementation or interpretation of our analyses.Network analysis methods are used to quantitatively analyze the Sarafu flow network.The Circulation section articulates how the map equation framework captures and quantifies the circulation of money given a network of monetary flow.The Network centrality section describes walk-based measures of network centrality for characterizing prominent users.The Network cycles and Network mixing patterns sections introduce relative cycle counts and assortativity as tools to analyse the structure of the underlying, unweighted network.

Data preparation
The Sarafu CIC data 31 includes a transaction dataset and an account dataset collected from January 25th, 2020 to June 15th 2021.The raw form of this data has previously been described in detail 27 .The transaction records are labeled with a transaction type, and we consider the STANDARD transactions.Figure 1 shows the total volume of such transactions for each complete month.Note that the value of one Sarafu was understood by users to be about that of a Kenyan Shilling, though actual exchange was facilitated only in very limited instances.The Sarafu flow network is constructed from the STANDARD transactions that occurred within the Sarafu system over the observation period.Basic network statistics are shown in Table 2.As noted in the main text, the nodes are registered accounts, for which the account dataset includes relevant account features (detailed below).An edge from one account to another indicates that at least one STANDARD transaction occurred across that link.The edge weight corresponds to the total sum of all STANDARD transaction amounts across that link.Then, system-run accounts are filtered out from the Sarafu flow network.Regular accounts who neither sent nor received even a single STANDARD transaction from another regular account are isolates, which we also exclude from the network.Note that the giant connected component (GCC) encompasses nearly all the nodes, meaning that the majority of users are indirectly connected through their transactions.

Nodes
Edges Account features.The account dataset includes the registration date and reported gender of the account holder as well as categorical labels derived from reported information on home location and livelihood.Mattsson, Criscione, & Ruddick 27 provide a descriptive overview of each account feature.Notably, each geographic area is a combination of user-reported localities that could be quite precise.Ussher et al. 15 present an overview of the user-reported work activities that make up the livelihood categories.System-run accounts are those labeled with system in place of the node attribute indicating the user's livelihood, or assigned a formal role as an ADMIN or VENDOR account.
Savings & investment groups.Community-based savings and investment groups are common in Kenya 81,82 and a feature of many communities that use Sarafu, specifically 15,45 .Several hundreds of so-called "chamas" are present in the data, many with the label savings in place of the node attribute indicating the user's livelihood.For a time, Sarafu operator Grassroots Economics also had a program whereby field staff would verify the operation of community-based groups and provide additional support to verified "chamas" 27 .Verified groups were conduits for development initiatives and humanitarian aid on several occasions, some of which involved payments made to system-run accounts, in Sarafu, in exchange for donated food, items, or Kenyan Shillings.
Targeted introductions.There were two so-called targeted introductions during the observation period, conducted by the Kenyan Red Cross in collaboration with Grassroots Economics 27 .These consisted of outreach efforts and training programs in specific areas.The Mukuru kwa Njenga slum in Nairobi was the site of the first; educational and outreach programs began in April 2020.Soon thereafter, this intervention was scaled up in response to the COVID-19 pandemic and related economic disruptions.Again, community currencies tend to gain in popularity during times of economic and financial crisis 13,29,30 .A second Red Cross intervention began in in Kisauni, Mombasa in early 2021.This resulted in a wave of account creations 27 and rising activity by accounts with location Kisauni Mombasa 15 .However, as we can see in Figure 1, overall transaction volumes did not rise as dramatically during this targeted introduction as they did during the first.
Currency creation.The digital payment system, as a whole, saw inflows when new units of Sarafu were created.For instance, newly-created accounts would receive an initial disbursement of 400 Sarafu, later reduced to 50 Sarafu.New users could

11/20
receive an additional sum if and when they verified their account information with staff at Grassroots Economics.Existing users could also receive newly created funds, such as in reward for transaction activity and as bonus for referring others.These and other non-STANDARD inflows are summarized as an aggregated value in the account dataset.We refer to prior work for a full account of currency management and system administration over the data collection period 27 .

Circulation
To study circulation we turn to the map equation framework 32 and the associated Infomap algorithm 33 .This is an approach based on computations involving a walk process over a given network, which is relevant in that financial transactions describe a real-world walk process 10 .The edge weights of the Sarafu flow network already reflect flows and so simulating a walk process is not necessary.Infomap takes a weighted, directed network as input and outputs a hierarchical mapping of nodes grouped into discovered modules.This grouping is done via computational optimization.Specifically, the map equation defines a notion of entropy whose value is higher the more of the flow over the given network occurs between rather than within modules.The Infomap algorithm exploits meso-scale network structure to minimize that value, grouping together nodes with much flow among themselves (and little outside).These are discovered sub-populations among whom a "random walker" would tend to stay for relatively long.We refer to top-level modules, sub-modules and sub-sub-modules at respectively the first, second and third level of the discovered hierarchy.The composition of these sub-populations can then be understood by means of an approach where we quantify their heterogeneity along dimensions of geography, livelihood, and gender, i.e., the node attributes.Implementation details for running Infomap and analyzing the resulting module mapping are included in Supplementary File 2.

Network cycles
To describe the network connectivity patterns underlying the circulation of Sarafu, we consider cycles.A cycle is a simple path starting and ending at the same node.In the context of complementary currencies, cycles ensure the flow of liquidity throughout the system.For cycles to occur, users must be willing to both spend and earn in complementary currency.Following this observation, we analyze cyclic structures in the Sarafu network using the z-score of the empirical cycle count as compared to a null model.We consider two common null models: Erdős-Rényi (ER) networks and random degree-preserving (RD) networks.ER networks have the same number of nodes and edges as the empirical network, but are wired randomly.Our RD networks preserve the indegree and outdegree sequences of the empirical network in expectation, but are otherwise random.Specifically, we sample from a binary, directed Exponential Random Graph Model 83 .The z-score is defined in relation to the mean and standard deviation of the number of cycles of length k detected in 100 realizations of the relevant null model.The cycle z-score is computed separately for each Infomap sub-module composed of 100 or more accounts (see: Circulation).Directed cycles are detected and counted using an existing approach 84 .This is done for each empirical sub-network, and for the ER and RD graphs generated from the empirical sub-network.An implementation is provided in Supplementary Files 4 and 5.

Network mixing patterns
To characterize the mixing patterns underlying the network structure of the Sarafu community currency, we consider degree and attribute assortativity 85,86 .Values are computed separately for each sub-network delineated by the Infomap sub-modules composed of 100 or more accounts (see: Circulation).The categorical attribute assorativity is calculated along dimensions of livelihood category and reported gender, using the undirected version of the networks.These measures compare the number of links between accounts with the same livelihood or gender to that which would be expected at random, and can range from -1 to 1.A value of 0 corresponds to random expectation; a value of 1 corresponds to a network where transactions only occurred between accounts with the same attribute value.When there is no variation within a sub-population, the sub-network is given an assortativity value of 1.Similarly, we calculate the numerical attribute assorativity to quantify mixing patterns with respect to registration date, in-degree, and out-degree.Implementation details are reported in Supplementary File 2.

Network centrality
To characterize prominent users of Sarafu, we employ network centrality measures on the Sarafu flow network.Purely structural node-based metrics such as degree and weighted degree correspond to straightforward statistics about accounts.We also use walk-based methods for node centrality as these are especially interpretable with respect to monetary flow; the well-known PageRank algorithm is flexible and computationally tractable.These centrality measures are computed for our network, and then interpreted in the context of node attributes of the account-holders using linear regression.This lets us characterize prominent users without highlighting individual account holders, which is neither our goal nor desirable for privacy reasons (see the Data availability section).Below, we briefly discuss each employed measure.
Indegree and outdegree in the Sarafu flow network correspond to an account's number of unique incoming and outgoing transaction partners, respectively, over the observation period.It is possible for nodes to have zero indegree or outdegree, but accounts with neither incoming nor outgoing transaction partners would be isolates and these are filtered out.Weighted indegree and weighted outdegree in the Sarafu flow network correspond to total transaction volumes into and out of accounts over the observation period.Note that these are mechanistically related in that money must be obtained before it can be spent according to the accounting consistency enforced within payment systems.
PageRank is an algorithm that produces a walk-based metric for node centrality given a directed network 6,38 .The obtained centrality values approximate the probability of finding a random walker at a given node at any given moment.More specifically, PageRank computes the stationary probability of a random walk process with restarts on a given network.A single parameter α is used to control the propensity for the simulated walkers to restart.An α value of 0.85 is the long-established default, meaning that 15% of times a random walker will restart rather than follow an out-link from the node where it currently resides.By default, restarts are uniformly random across the nodes.However, it is also possible to specify the probability of restarting at any particular node using a so-called personalization vector.
Weighted PageRank is an analogous centrality metric for weighted, directed networks.Over a weighted network, the random walkers choose among available out-links in proportion to their edge weights.Weighted edges are flows of money, in our case, and so the stationary probability of a random walker would then corresponds to the share of the total balance held by each account at equilibrium.This makes the the Weighted PageRank algorithm especially applicable in the context of a currency system context, since it means that the values are interpretable as the share of system funds that an account would eventually control if observed dynamics continued.Within this intuition, Weighted Inflow-adjusted PageRank employs a personalization vector to better capture idiosyncratic patterns of currency creation; real-world currency systems may be poorly represented by the default assumption of uniformly random restarts.Recall from the Data preparation section that Sarafu users could receive disbursements and rewards in addition to inflows from regular transactions.We use the aggregated values of non-STANDARD inflows, available in the account dataset, to set the PageRank personalization vector.The simulated random walk process is then constrained to reproduce the observed pattern of currency creation, on average.

Empirical calibration
Running the Weighted PageRank algorithm requires specifying the aforementioned parameter α.We would like to understand whether this parameter affects the suitability of these values as a centrality measure for networks of monetary flow.Since Weighted PageRank extrapolates the observed patterns of circulation towards a future where an equilibrium is reached, the output values can be understood as a prediction for hypothetical future account balances (as a fraction of the total balance).While we cannot expect such strong modeling assumptions to produce especially accurate estimates, it is nonetheless instructive to compare to empirical account balances.We can determine whether this centrality metric is sensitive to α and whether modeling non-random currency creation, via the PageRank personalization vector, matters for this particular real-world system.
We consider the correlation between our centrality metrics computed on the Sarafu flow network with Sarafu balances observed at the time of data collection on June 15th, 2021.Figure 9 plots the correlation between these final balances and the values given by the Weighted PageRank algorithm, with and without adjusting the simulated walk process to account for currency creation.The resulting correlations are at most R = 0.57 and R = 0.56, respectively.Taking the perspective that Weighted PageRank estimates hypothetical future account balances, it is encouraging to note that these values correlate more closely with final balances than do the in-or out-degree (R = 0.28, R = 0.21), and the weighted in-or out-degree (R = 0.52, R = 0.47).Moreover, both versions of Weighted PageRank produce values that are consistently correlated with final balances over a wide range of parameter values that includes the long-established default (α = 0.85); our centrality metrics are not overly sensitive to the propensity for restarts.We conclude that Weighted PageRank, especially Weighted Inflow-adjusted PageRank, is a highly suitable centrality metric for downstream analyses of networks of monetary flow. 13/20

High-degree tail estimation
To estimate the high-degree tail exponent of the degree distributions, we apply a recent approach based in extreme value theory 87 .This approach posits that heavy-tailed degree distributions might be usefully described as so-called "regularly varying" distributions, following a power-law at high degrees even if they take on an arbitrary functional form at lower degrees.Specifically, regularly varying distributions have a probability density function (PDF) of the form P(k) = ℓ(k)k γ , where ℓ(k) is a slowly varying function.The PDF tail exponent γ, the complementary cumulative distribution function (CCDF) tail exponent α = γ − 1, and the so-called tail index ξ = 1 α can be estimated using established techniques.Regularly varying distributions have a tail index greater than zero, that is, 1 γ−1 = 1 α = ξ > 0. The high-degree tail exponent can be clearly estimated for our indegree and outdegree sequences, using the automated and openly available fitting procedure 88 provided alongside Voitalov et.al. (2019) 87 .Figure 10 reproduces the output of the fitting procedure, wherein the empirical CCDF is plotted against tail fits by the three available estimators.The Moments estimator appears well-behaved for both indegree (left) and outdegree (center); the full diagnostic plots are included in Supplementary File 6. Notably, the other estimators also show local minima with respect to the fitting criteria at or near the tail-cutoff selected by the Moments estimator.We conclude that the best estimate of γ is around 2.9 for the in-and out-high-degree tails.Lowering the tail cutoff to include the bulk of the outdegree distribution produces a lower estimate for γ, at around 2.2.
The high-degree tail exponents for the weighted degree distributions, however, cannot be estimated in this straightforward way. Figure 10 (right) shows the empirical CCDF of the weighted indegree and the fitted high-degree tail of the CCDF as estimated by the three available estimators.Recall that weighted in-and out-degree are closely correlated due to the underlying accounting consistency of the system (see the Identifying prominent users section).In both cases, the fitted exponent varies smoothly with the fraction of nodes included in the high-degree tail.This may be due to the inherent difficulty of empirically distinguishing Pareto from log-normal distributions 89,90 .Indeed, the weighted in-degree of the Sarafu flow network corresponds to some notion of "income" within this system and, at the national scale, such distributions are often described as log-normal with a Pareto tail [91][92][93][94] .Additional approaches, such as finite size scaling analysis 95 , would be needed to determine the functional form and estimate the high-degree tail exponents for the weighted degree distributions.

Linear regression
To assess what recorded features of the account holders associate with higher prominence, as measured by network centrality, we use linear regression.Ordinary least squares (OLS) is used to fit a linear model to an outcome, in our case a network centrality measure, providing an estimated contribution for each input feature 96 .Regularization is a fitting technique that introduces a penalty term to the optimization limiting the number of regressors and/or their magnitudes 97 .So-called Elastic Net (EN) regularization, as we use it, penalizes the number of regressors and their magnitude equally.The penalty weight is selected using five-fold cross validation, just before the point where additional features begin entering the model without qualitatively improving the statistical fit.Further implementation details are noted in Supplementary File 3, alongside the code that replicates the analysis.

Data availability
The dataset analyzed in this study 31 is available via the UK Data Service (UKDS) under their End User License, which stipulates suitable data-privacy protections.The dataset is available for download from the UKDS ReShare repository (https:// reshare.ukdataservice.ac.uk/855142/) to users registered with the UKDS (https://beta.ukdataservice.ac.uk/myaccount/credentials).Further usage notes and an extensive description of the dataset are available in a complementary publication 27 .

Figure 1 .
Figure 1.Monthly transaction volumes in total, and in each geographic area (shown at two different scales).

Figure 2 .
Figure 2. Visualization of the Sarafu flow network.Nodes are colored by the geographic area of the location reported for the account (see Figure 1 for legend), and node size is proportional to the value of unweighted PageRank as computed for that node.

Figure 3 .
Figure 3. Geographic composition of the five largest top-level modules and relevant numbered sub-modules.

Figure 4 .
Figure 4. Composition of discovered sub-modules (bars) in terms of user livelihoods (colors, as shown in legend).

Figure 5 .
Figure 5.Relative cycle counts for each sub-network, at different cycle lengths.Points correspond to sub-modules, and are colored based on the dominant geographic area of users placed in the top-level module to which it belongs.Five observations are omitted from the ER plot, as the logarithmic scale cannot represent small negative z-scores.These are confined to two sub-modules, where one or no cycles occur at higher cycle lengths.

Figure 6 .
Figure 6.Distribution of degree (left) and weighted degree (right) for the Sarafu flow network.Probability densities are scaled such that nodes with a value of zero shrink the distribution total, as zero cannot be plotted on a logarithmic scale.

Figure 7 .
Figure 7. Pearson correlation between values for degree, weighted degree, and centrality metrics.

Figure 9 .
Figure 9. Pearson correlation of Weighted and Weighted Inflow-adjusted PageRank with final account balances.

Figure 10 .
Figure 10.Complementary cumulative distribution functions (CCDF) and fitted tail exponents for the indegree, outdegree, and weighted indegree of the Sarafu flow network.Weighted outdegree is not shown.

Table 1 .
Network statistics and feature assortativity across sub-modules with 100 or more nodes.

Table 2 .
Basic statistics for the network of aggregated STANDARD transactions, the Sarafu flow network, and its giant connected component (GCC).