A modular Ethereum-based protocol that lets communities catalog, acquire, lend, and fund books (and other media) with on-chain transparency while the actual materials stay in the real world.
OLP is designed as a public library you can fork. It provides verifiable records for catalog metadata, branch inventories, membership, borrowing attestations, and funding flows—without forcing every file or physical item on-chain.
- Empower local stewards, schools, and DAOs to run shared catalogs with transparent rules.
- Offer borrowers portable membership cards and time-bound loan attestations.
- Unlock community-driven acquisition, grants, and retroactive rewards for curators.
- Respect patron privacy and copyright while embracing open-licensed knowledge.
- On-chain truth + money: catalog IDs, license hashes, branch inventory balances, membership cards, deposit/late-fee rules, acquisition proposals, grants, loan attestations.
- Off-chain assets: digital files (IPFS/S3), physical copies tagged with NFC/QR, local circulation logs, steward playbooks.
- Work: a title/resource (book, zine, dataset, toolkit).
- Copy: a specific digital license or physical item tied to a Work.
- Member Card: a non-transferable NFT (SBT) granting borrowing rights.
- Loan Token: a time-limited NFT minted when borrowing; burns on completion; may escrow deposits.
- Branch: a library node (school, community space, DAO, pop-up library).
contracts/LibraryCatalog.sol– ERC-1155 catalog tracking works, copies, and loan lifecycle.contracts/LibraryMembership.sol– Soulbound ERC-721 membership cards managed by stewards.roadmap.md– Curated task list and milestone tracker (not yet published).
| Contract | Description | Status |
|---|---|---|
LibraryCatalog |
Registers works, manages branch-held copies, enforces deposits and loan durations. | Prototype |
LibraryMembership |
Issues non-transferable membership NFTs to authorized borrowers. | Prototype |
- Borrow (digital or physical): Member requests a copy →
Loan Tokenminted viaLibraryCatalog→ deposit escrowed → due date recorded. - Return: Borrower returns copy → NFT burned internally via transfer back to branch → deposit refunded if on time; late returns flagged.
- Stewardship: Branch owner configures loan duration, deposit amount, and membership contract; only stewards can add books or mint copies.
Install dependencies and run tests locally.
pnpm install
pnpm testTooling assumptions: Hardhat (or Foundry) for compilation/tests, OpenZeppelin contracts installed via npm/pnpm. Adjust commands if you use a different stack.
- Configure
.envwith RPC URLs and deployer keys before deploying. - Ensure the branch address holds catalog copies before testing loan logic.
- Use mock borrowers and simulated time jumps to cover overdue paths.
- Modular: Swap out catalog, membership, governance modules without rewriting core flows.
- Compliant: Default to open-licensed digital content; support fast takedowns for disputes.
- Community-first: Grants, quadratic boosts, and retro tips reward contributors.
- Privacy-aware: On-chain data avoids personal identifiers; hashes or ZK attestations are used for borrower logs.
- Upgrade-ready: Future releases will add reputation scoring, branch federation, and acquisition marketplaces.
- Stewards: configure policies, approve new branches, curate metadata, respond to disputes.
- Members: borrow items, propose acquisitions, participate in votes.
- Curators: enrich metadata, verify licenses, and earn retro rewards.
- Donors/Grantors: fund branches or thematic “shelves,” optionally via quadratic matches.
- Digital circulation: Loan token unlocks DRM/capability-gated file; auto-expires after
Ndays with optional deposit slashing. - Physical circulation: NFC/QR tag ties the item to its on-chain
Copy ID; scanning mints and settles loans at checkout and return. - Depositless mode: Integrate reputation scores to limit borrowing instead of using deposits.
- Fork the repository and create a feature branch (
feature/add-loan-ext). - Write tests for your changes (integration + edge cases).
- Submit a PR describing the problem, solution, and testing evidence.
- Coordinate audits for high-impact contract changes.
We welcome protocol design feedback, governance playbooks, and tooling contributions. Reach out via issues or community channels to coordinate work.
OLP is released under the GNU GPL 3.0 License. See LICENSE for details.