{"id":49363358,"url":"https://github.com/BlockstreamResearch/simplicity-lending","last_synced_at":"2026-05-14T04:01:04.560Z","repository":{"id":345362642,"uuid":"1121467222","full_name":"BlockstreamResearch/simplicity-lending","owner":"BlockstreamResearch","description":"A minimal p2p lending protocol written in simplicity","archived":false,"fork":false,"pushed_at":"2026-05-13T10:05:48.000Z","size":692,"stargazers_count":8,"open_issues_count":12,"forks_count":1,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-13T11:11:50.905Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://demolending.distributedlab.com/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/BlockstreamResearch.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-12-23T03:35:56.000Z","updated_at":"2026-05-06T11:29:37.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/BlockstreamResearch/simplicity-lending","commit_stats":null,"previous_names":["blockstreamresearch/simplicity-lending"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/BlockstreamResearch/simplicity-lending","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BlockstreamResearch%2Fsimplicity-lending","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BlockstreamResearch%2Fsimplicity-lending/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BlockstreamResearch%2Fsimplicity-lending/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BlockstreamResearch%2Fsimplicity-lending/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BlockstreamResearch","download_url":"https://codeload.github.com/BlockstreamResearch/simplicity-lending/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BlockstreamResearch%2Fsimplicity-lending/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33009919,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-13T13:14:54.681Z","status":"online","status_checked_at":"2026-05-14T02:00:06.663Z","response_time":57,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-04-27T18:00:42.949Z","updated_at":"2026-05-14T04:01:04.545Z","avatar_url":"https://github.com/BlockstreamResearch.png","language":"TypeScript","funding_links":[],"categories":["Projects"],"sub_categories":["Helpers"],"readme":"# Simplicity lending protocol\n\nA pure SimplicityHL implementation of a peer-to-peer lending protocol.\n\n## High-level mechanics\n\nBorrowers create \"borrowing offers\" with specified _collateral amount_, _lending duration_, and _principal asset amount_ (interest) they are willing to pay for the credit settlement. They also specify the _amount of principal_ they are willing to receive for the pledged collateral.\n\nThe Borrower can cancel the initial offer before it is accepted.\n\nIf a Lender is satisfied with such conditions, they provide principal to the borrower, creating a lending contract.\n\nAt any point in time before the lending contract expiry, the Borrower can repay the principal amount with interest and take their collateral back.\n\nIn case the Borrower fails to pay interest before the lending contract expiry, the Lender can liquidate the position and claim collateral for themselves.\n\n## Repository structure\n\n- **crates/** — Rust workspace with three components:\n  - **CLI** — command-line tools for the lending protocol (building and signing transactions).\n  - **Contracts** — Simplicity contracts and covenant logic for the lending protocol.\n  - **Indexer** — backend service that indexes offers and exposes an API for the web app.\n- **web/** — demo frontend (React/TypeScript) for borrowers and lenders.\n\n## How to use\n\n### Through Docker\n\nFrom repo root:\n\n```bash\ndocker compose up --build\n```\n\n\n### Locally (without Docker)\n\nTo run the **demo frontend** (web app for borrowers and lenders), you need the **Indexer** API running. The web app talks to it to list and manage offers.\n\n**Quick start (from repo root):**\n\n1. **Indexer** — set up PostgreSQL, configure `crates/indexer` (see [crates/indexer/README.md](crates/indexer/README.md)), then:\n   ```bash\n   cd crates/indexer \u0026\u0026 cargo run -p lending-indexer\n   ```\n   By default this starts the API (port 8000). For full indexing you also need the indexer worker (`RUN_MODE=indexer`).\n\n2. **Web** — install deps and start the dev server (see [web/README.md](web/README.md)):\n   ```bash\n   cd web \u0026\u0026 npm install \u0026\u0026 npm run dev\n   ```\n   Open the URL shown (e.g. http://localhost:5173). Set `VITE_API_URL` in `web/.env` if the API is not at `http://localhost:8000`.\n\n**CLI** and **Contracts** are used for building/signing lending transactions and covenant logic; see the respective crates under `crates/` for development and usage.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FBlockstreamResearch%2Fsimplicity-lending","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FBlockstreamResearch%2Fsimplicity-lending","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FBlockstreamResearch%2Fsimplicity-lending/lists"}