FIBO Financial Ontology Integration : Semantic Graph Architecture
How fxyz Network integrates the Financial Industry Business Ontology (FIBO) into Neo4j. Technical details on Party-Role-Context (PRC) patterns, entity classification, and ISO 3166/4217 reference data.
How the ƒxyz Network integrates the Financial Industry Business Ontology (FIBO) into its Neo4j knowledge graph for entity classification, role management, and reference data.
Overview
FIBO is a formal ontology maintained by the EDM Council that defines concepts across the financial industry -- entities, instruments, roles, jurisdictions, and more. The ƒxyz Network imports FIBO classes, properties, and individuals into Neo4j, then uses them as a classification backbone for organizations, legal entities, and party-role-context assignments.
The integration spans five layers:
- Ontology import -- 3,025 FIBO classes, 1,244 properties, and 11,586 individuals stored as Neo4j nodes
- Party-Role-Context (PRC) pattern -- FIBO-aligned identity management
- Entity type taxonomy -- Organization types mapped to FIBO class URIs
- Reference data -- ISO 3166 countries and ISO 4217 currencies from FIBO individuals
- Legal entity bridge -- Connecting existing LegalEntity nodes to FIBO classification
FIBO Domains Imported
The import script loads 11 FIBO domains plus two Commons Ontology Library (CMNS) modules:
| Domain | Prefix | Coverage |
|---|---|---|
| Business Entities | fibo-be | Corporations, LLCs, partnerships, government bodies |
| Functional Business Components | fibo-fbc | Investors, financial service entities |
| Foundations | fibo-fnd | Parties, roles, agents, agreements, organizations |
| Derivatives | fibo-der | Derivative instruments |
| Indices & Indicators | fibo-ind | Market indices, economic indicators |
| Securities | fibo-sec | Securities and related concepts |
| Loans | fibo-loan | Loan structures |
| Market Data | fibo-md | Market data concepts |
| Corporate Actions & Events | fibo-cae | Corporate events |
| Business Processes | fibo-bp | Business process concepts |
| Financial Products & Programs | fibo-fpp | Financial product structures |
| CMNS Parties & Situations | cmns-pts | Party roles, acts-as relationships |
| CMNS Context | cmns-cxtdsg | Context designators |
Neo4j Graph Model
Node Types
FIBO data is stored across four primary node types:
(:FiboClass {uri, localName, label, definition, domain, module})
(:FiboProperty {uri, localName, label, definition, propertyType, domain})
(:FiboIndividual {uri, localName, label, definition, domain})
(:Country {id, name, alpha2, alpha3, numericCode, region, fiboClassUri})
(:Currency {id, name, code, numericCode, minorUnit, symbol, fiboClassUri})Relationships
(:FiboClass)-[:subClassOf]->(:FiboClass) // Class hierarchy
(:FiboProperty)-[:DOMAIN]->(:FiboClass) // Property domain
(:FiboProperty)-[:RANGE]->(:FiboClass) // Property range
(:LegalEntity)-[:INSTANCE_OF]->(:FiboClass) // Entity classification
(:LegalEntity)-[:INCORPORATED_IN]->(:Country) // Jurisdiction link
(:Role)-[:CLASSIFIED_BY]->(:FiboClass) // Role-to-FIBO mapping
(:Country)-[:USES_CURRENCY]->(:Currency) // Country-currency linkNode Counts (After Import)
| Node Type | Count |
|---|---|
| FiboClass | 3,025 |
| FiboProperty | 1,244 |
| FiboIndividual | 11,586 |
| Country | 249 |
| Currency | 158 |
Party-Role-Context (PRC) Pattern
The PRC pattern is the core identity model. Every action in the system is performed by a Party acting in a Role within a Context.
The Triplet
PartyRoleContext {
Party -> Who is acting (Person, LegalPerson, SoftwareAgent)
Role -> What capacity they act in (Individual, Investor, Operator, ...)
Context -> Where they are acting (Organization, Fund, Project, Network)
}Agent-Party Hierarchy
Following FIBO's agent model, parties are structured as:
Agent (abstract)
+-- Party (can enter contracts)
+-- Person (individual human, identified by DID)
+-- LegalPerson (corporation, LLC, DAO, etc.)
+-- SoftwareAgent (automated systems)Each Person node links upward: Person -[:IS_A]-> Party -[:IS_A]-> Agent
8 Reconciled Role Categories
| Category | FIBO URI | Description |
|---|---|---|
| Individual | fibo-fnd-pty-rl:AgentInRole | Personal identity roles |
| Member | cmns-pts:PartyRole | Network membership and participation |
| Investor | fibo-fbc-fct-fse:Investor | Investment and capital roles |
| CompanyOwner | fibo-be-oac-exec:ExecutiveOfficer | Business owner/director |
| Operator | fibo-fnd-org-org:OrganizationMember | Operational/execution roles |
| Consultant | fibo-fnd-pty-rl:ThirdParty | Advisory/consulting roles |
| Representative | fibo-fnd-agr-agr:ContractParty | Legal representative |
| Delegate | cmns-pts:ActsAs | Delegated authority |
5 Context Types
| Type | Description |
|---|---|
| Organization | A legal entity or business unit |
| Fund | An investment fund or vehicle |
| Project | A specific initiative or project |
| Network | The ƒxyz Network itself |
| External | External systems or counterparties |
Materialized View
PRC assignments are stored as materialized PartyRoleContext nodes in Neo4j with relationships:
(assignment:PartyRoleContext)-[:HAS_PARTY]->(party:Party)
(assignment:PartyRoleContext)-[:HAS_ROLE]->(role:Role)
(assignment:PartyRoleContext)-[:HAS_CONTEXT]->(context:Context)This denormalized structure enables efficient queries without multi-hop traversals.
Entity Type Taxonomy
Organization types form a hierarchy mapped to FIBO class URIs:
Organization (FIBO: fibo-fnd-org-org:Organization)
+-- LegalEntity (FIBO: fibo-be-le-lp:LegalEntity)
+-- Corporation (fibo-be-le-lp:Corporation)
+-- LLC (fibo-be-le-lp:LimitedLiabilityCompany)
+-- Partnership (fibo-be-le-lp:Partnership)
+-- LLP (fibo-be-le-lp:LimitedLiabilityPartnership)
+-- LP (fibo-be-le-lp:LimitedPartnership)
+-- Foundation (fibo-be-le-lp:NotForProfitOrganization)
+-- Nonprofit (fibo-be-le-lp:NotForProfitOrganization)
+-- Government (fibo-be-ge-ge:GovernmentBody)
+-- Trust* (fxyz:Trust)
+-- DAO* (fxyz:DecentralizedAutonomousOrganization)
+-- SoleProprietorship* (fxyz:SoleProprietorship)Types marked with * use the ƒxyz extension namespace (https://fxyz.network/ontology/BE/) because no direct FIBO equivalent exists. These are modeled as subclasses of FIBO's LegalEntity concept.
Entity Type to FIBO Class Mapping
The ENTITY_TYPE_TO_FIBO_CLASS mapping in legal-entity-fibo-bridge.ts connects each entity type to its FIBO class URI. When a LegalEntity is created, the bridge service:
- Looks up the FIBO class URI for the entity type
- Creates an
INSTANCE_OFrelationship to the corresponding FiboClass node - Builds a taxonomy path by traversing
subClassOfrelationships upward - Links to a Country node via
INCORPORATED_INfor jurisdiction
Country and Currency Reference Data
Pipeline
ISO 3166/4217 standards
|
v
FIBO ontology individuals (FiboIndividual nodes)
|
v
Import script extracts + creates Country/Currency nodes
|
v
Neo4j Country/Currency nodes with USES_CURRENCY relationships
|
v
GraphQL queries: fiboCountries, fiboCurrencies, countryCurrencies
|
v
Frontend components (org creation wizard, jurisdiction selectors)GraphQL Queries
# All countries (ISO 3166-1)
query { fiboCountries { id name alpha2 alpha3 numericCode region } }
# All currencies (ISO 4217)
query { fiboCurrencies { id name code numericCode minorUnit symbol } }
# Currencies used by a specific country
query { countryCurrencies(alpha2: "US") { id name code symbol } }Client-Side Queries
The @repo/graphql package exports typed query definitions:
import {
GET_FIBO_COUNTRIES,
GET_FIBO_CURRENCIES,
GET_COUNTRY_CURRENCIES
} from "@repo/graphql";Legal Entity Bridge
The LegalEntityFiboBridge service connects the existing LegalEntity system to FIBO classification. It does not replace the LegalEntityService -- it enriches entities with FIBO metadata.
Bridge Operations
| Method | What It Does |
|---|---|
classifyEntity(entityId, entityType) | Creates INSTANCE_OF relationship to FiboClass, builds taxonomy path |
linkJurisdiction(entityId, countryCode) | Creates INCORPORATED_IN relationship to Country node |
getEntityFiboContext(entityId) | Returns entity + FIBO classification + jurisdiction in one query |
getCountries() | Lists all countries from FIBO-seeded Country nodes |
getCountriesByRegion(region) | Countries filtered by geographic region |
Example: Classifying an LLC in Singapore
const bridge = new LegalEntityFiboBridge();
// 1. Classify the entity
const classification = await bridge.classifyEntity(
entityId,
'LLC'
);
// Returns: {
// fiboClassUri: "https://spec.edmcouncil.org/fibo/ontology/BE/LegalEntities/LegalPersons/LimitedLiabilityCompany",
// fiboClassName: "LimitedLiabilityCompany",
// taxonomyPath: ["Agent", "LegalEntity", "LegalPerson", "LimitedLiabilityCompany"]
// }
// 2. Link jurisdiction
const jurisdiction = await bridge.linkJurisdiction(entityId, 'SG');
// Returns: { countryName: "Singapore", countryCode: "SG", alpha3: "SGP", region: "Asia" }Organization Creation Wizard
The org creation wizard uses FIBO classification in a 4-step flow:
Step 1: Identity
Select the party (person or existing legal entity) that will own the new organization.
Step 2: Entity Type
Choose from FIBO-classified entity types: Corporation, LLC, Partnership, LLP, LP, Foundation, Trust, DAO, Government, Nonprofit, Sole Proprietorship.
Each type displays its FIBO taxonomy path and description.
Step 3: Jurisdiction
Select the country of incorporation from FIBO-seeded Country nodes (249 countries from ISO 3166-1). The list is fetched via the fiboCountries GraphQL query.
Step 4: Review
Confirm all selections. On submission:
LegalEntityService.createLegalEntity()creates the entity nodeLegalEntityFiboBridge.classifyEntity()links it to the FIBO classLegalEntityFiboBridge.linkJurisdiction()links it to the Country node- A circle is created as the anchor circle for the new organization
FIBO Initialization
The FiboInitService handles setup for new and existing users:
On User Login
ensureUserFiboSetup(memberDid):
- Creates a
Personnode (idempotent via MERGE on DID) - Links
Person -[:IS_A]-> Party -[:IS_A]-> Agent - Links to existing
Membernode viaHAS_PARTYandHAS_PERSON - Creates default PRC assignments:
- Individual role in Personal context
- Member role in ƒxyz Network context
Default Seed Data
ensureDefaultData() creates 8 default roles and 3 default contexts:
Roles: Individual, Member, Investor, Company Owner, Operator, Consultant, Representative, Delegate
Contexts: Personal, ƒxyz Network, Collective Capital Circle
Each role has a fiboUri property linking it to the corresponding FIBO class. The linkRolesToFiboClasses() method creates CLASSIFIED_BY relationships where FiboClass nodes exist.
Frontend Context
The FiboProvider context (packages/contexts/src/fibo-context.tsx) provides FIBO data to React components:
const {
userContext, // FiboUserContext (person, identities, compliance)
activeIdentity, // Current PartyRoleContext
availableParties, // All parties for the user
availableContexts, // All contexts the user can act in
availableRoles, // All roles available
roleCategories, // Role category metadata
switchIdentity, // Switch active PRC assignment
activateContext, // Create new PRC assignment
} = useFiboContext();Key Files
| File | Purpose |
|---|---|
packages/neo4j/src/services/fibo-party.ts | FiboPartyService -- Person/LegalPerson/Party CRUD and PRC queries |
packages/neo4j/src/services/fibo-role.ts | FiboRoleService -- Role/Context CRUD and PRC assignments |
packages/neo4j/src/services/fibo-init.ts | FiboInitService -- User setup, default data seeding |
packages/neo4j/src/services/legal-entity-fibo-bridge.ts | LegalEntityFiboBridge -- Entity classification and jurisdiction |
apps/api/app/api/graphql/resolvers/fibo/queries.ts | FIBO GraphQL query resolvers |
apps/api/app/api/graphql/resolvers/fibo/mutations.ts | FIBO GraphQL mutation resolvers |
apps/api/app/api/graphql/resolvers/fibo/reference-data-queries.ts | Country/Currency GraphQL resolvers |
packages/graphql/src/queries/referenceDataQueries.ts | Client-side GraphQL query definitions |
packages/contexts/src/fibo-context.tsx | React context provider for FIBO data |
Integration Roadmap
FIBO is designed to be used everywhere across the ƒxyz Network. The following tracks the current integration state and planned expansion.
Current Integration (Active)
| Feature | FIBO Usage | Status |
|---|---|---|
| Identity (PRC) | Party-Role-Context via useFibo() | Active - 24 consuming files |
| Legal Entities | Entity type → FIBO class mapping, jurisdiction | Active via LegalEntityFiboBridge |
| Org Creation Wizard | FIBO country/entity type selectors | Active - queries fiboCountries |
| Role Management | 8 role categories mapped to FIBO URIs | Active via FiboRoleService |
Planned Integration (Next)
| Feature | FIBO Connection | Priority |
|---|---|---|
| Currencies section | Currency nodes exist with USES_CURRENCY → Country. Wire into /currencies/fiat alongside BIS data. Add graph view of currency-country relationships. | High |
| Legal Entity FIBO context | getEntityFiboContext() exists in bridge but is not wired into any GraphQL resolver. Exposes taxonomy path + jurisdiction. | High |
| Knowledge Graph explorer | FiboClass/FiboProperty nodes (3,025 classes) exist but have no GraphQL exposure. Build ontology browser with SUBCLASS_OF traversal. | High |
| Circle FIBO classification | Circles mapped to OrganizationalSubUnit via INSTANCE_OF but not surfaced in UI. | Medium |
| Member ontological context | Person nodes link to FiboClass but profile UI shows no FIBO context. | Medium |
| Financial instruments | FIBO has FinancialInstrument, DerivativeInstrument classes. Not yet connected to market data. | Medium |
| Blockchain token → FIBO | Link on-chain token mints (Florin, Joule) to FIBO Currency/FinancialInstrument individuals. | Future |
Domain Expertise (FIBO Capability)
Priority: High | FIBO Class: fibo-fnd-aap:Capability
Members have per-domain expertise levels across the network's contribution layers (the current working configuration in code carries 7 layers; layer cardinality is not a fixed structural claim and may grow as the network evolves):
(:Person)-[:HAS_CAPABILITY {level}]->(:DomainExpertise {domain})- Levels: Novice, Intermediate, Expert, Elite, Master
- Separate from Network Standing (OBSERVER→FOUNDER) which measures aggregate contribution
Per-Org Rites (FIBO Authorization)
Priority: High | FIBO Class: fibo-be-oac:Authorization
Rites are context-scoped permissions granted by organizations:
(:Context)-[:GRANTS_RITE {requiredStanding, requiredExpertise}]->(:Rite)(:Member)-[:EARNED_RITE {earnedAt, contextId}]->(:Rite)- Each organization (ƒxyz Network, MariEnDAO, any Supercircle) defines its own rite tree
Graph Interactive as Default
Every data view should have an interactive graph tab alongside list/table views. Current state:
| Page | Graph View | Status |
|---|---|---|
/graph | Full network explorer | Active |
/circles/[id] | Circle structure graph | Active (tab) |
/allocate | Allocation flow graph | Active |
/profile | Ego-graph (2-hop) | Active (MiniGraphWidget) |
/legal-entities/[id] | Entity relationships | Active (MiniGraphWidget) |
/graph?mode=advanced | Advanced graph and cartography workbench | Active |
/currencies/* | Currency-country network | Planned |
/legal-entities (list) | Ownership graph | Planned |
/governance | Decision flow graph | Planned |
/circles (list) | Org tree graph | Planned |
/markets/trade | FX corridor graph | Planned |
PartyRoleContext / PersonaRuntime Consolidation
Both PartyRoleContext and PersonaRuntime coexist in the schema. A data migration will consolidate them into a single identity representation. (Note: the migration 009 reference is ancient : current migration count is 470+; consolidation status should be verified against the current migration set.)
Related Documentation
- Holacracy Architecture -- Circle-based organization structure
- Neo4j Driver v6 Patterns -- Modern query patterns and migration guide
- Knowledge Graph Ontologies -- Broader ontology usage in ƒxyz
- Entity Structure -- Legal entity compliance requirements
- Neo4j Data Layer -- Database architecture