finds.dev

lens-protocol/core

The Lens Protocol

View on GitHubHomepage ↗

★ 2,833SolidityMITupdated Sep 2025

// the take

Lens Protocol's core contracts: a Solidity implementation of a decentralized, non-custodial social graph (profiles, follows, publications, collects) built as an ERC-721-based system with pluggable modules. This is for Solidity engineers building social dApps or auditing/forking a production-grade on-chain social protocol, not for casual browsers.

Ships two full PeckShield audit reports (V1 and V2) directly in the repo, which is rare and worth something. The module system (follow/collect/reference modules implementing IFollowModule, ICollectModule, IReferenceModule) genuinely decouples core social mechanics from app-specific logic, so builders can add gated follows or paid collects without touching LensHub. The library-split architecture (StorageLib, ValidationLib, GovernanceLib, ActionLib) is a real response to the 24KB contract size limit, and the Foundry test suite covers not just happy paths but migration and legacy-compat scenarios (LegacyCollectTest, Migrations.t.sol).

The README is almost entirely setup instructions and a giant ASCII logo — there's no explanation of the social graph data model, the V1→V2 migration story, or why the module pattern is shaped the way it is; you have to read LensHub.sol and the Lib files cold. The forge build warning about contract size (requiring --via-ir to silence) signals the core is pushing hard against EVM limits, which tends to mean expensive deploys and subtle via-ir compilation differences to watch for. Legacy code (LegacyCollectModule, MigrationLib, ILegacyFollowModule) sits permanently alongside current logic, so anyone reading the codebase has to mentally filter out two protocol generations. The on-chain SVG generation for profile NFTs (a dozen+ files for headwear/body/face variants) is a lot of unrelated rendering logic bolted onto what's supposed to be a social graph protocol.

We read the README, the directory tree and a key source file in October 2026. Nobody pays to be listed. How we judge →

// at a glance

Stars
2,833
Forks
878
Language
Solidity
License
MIT
Last commit
18 Sep 2025

// nearby

If core isn't quite it.

All repos →