{"id":24902824,"url":"https://github.com/sablier-labs/lockup","last_synced_at":"2025-05-15T11:08:18.172Z","repository":{"id":177631037,"uuid":"477275552","full_name":"sablier-labs/lockup","owner":"sablier-labs","description":"⏳ Smart contracts of the Sablier Lockup protocol","archived":false,"fork":false,"pushed_at":"2025-05-09T15:09:25.000Z","size":10034,"stargazers_count":329,"open_issues_count":8,"forks_count":58,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-05-09T16:26:58.523Z","etag":null,"topics":["blockchain","cryptoasset-streaming","ethereum","foundry","money-streaming","real-time-finance","sablier","sablier-protocol","sablier-v2","smart-contracts","solidity","token-streaming"],"latest_commit_sha":null,"homepage":"https://sablier.com","language":"Solidity","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sablier-labs.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE-GPL.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2022-04-03T08:03:26.000Z","updated_at":"2025-05-09T15:09:27.000Z","dependencies_parsed_at":"2023-09-23T04:54:59.215Z","dependency_job_id":"9e599e29-5dee-4eea-861e-f5edfbd708ea","html_url":"https://github.com/sablier-labs/lockup","commit_stats":null,"previous_names":["sablier-labs/v2-core","sablier-labs/lockup"],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sablier-labs%2Flockup","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sablier-labs%2Flockup/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sablier-labs%2Flockup/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sablier-labs%2Flockup/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sablier-labs","download_url":"https://codeload.github.com/sablier-labs/lockup/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254328384,"owners_count":22052632,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["blockchain","cryptoasset-streaming","ethereum","foundry","money-streaming","real-time-finance","sablier","sablier-protocol","sablier-v2","smart-contracts","solidity","token-streaming"],"created_at":"2025-02-01T22:02:22.640Z","updated_at":"2025-05-15T11:08:18.151Z","avatar_url":"https://github.com/sablier-labs.png","language":"Solidity","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Sablier Lockup [![Github Actions][gha-badge]][gha] [![Coverage][codecov-badge]][codecov] [![Foundry][foundry-badge]][foundry] [![Discord][discord-badge]][discord] [![Twitter][twitter-badge]][twitter]\n\n[gha]: https://github.com/sablier-labs/lockup/actions\n[gha-badge]: https://github.com/sablier-labs/lockup/actions/workflows/ci.yml/badge.svg\n[codecov]: https://codecov.io/gh/sablier-labs/lockup\n[codecov-badge]: https://codecov.io/gh/sablier-labs/lockup/branch/main/graph/badge.svg\n[discord]: https://discord.gg/bSwRCwWRsT\n[discord-badge]: https://img.shields.io/discord/659709894315868191\n[foundry]: https://getfoundry.sh\n[foundry-badge]: https://img.shields.io/badge/Built%20with-Foundry-FFDB1C.svg\n[twitter-badge]: https://img.shields.io/twitter/follow/Sablier\n[twitter]: https://x.com/Sablier\n\nIn-depth documentation is available at [docs.sablier.com](https://docs.sablier.com).\n\n## Background\n\nSablier Lockup is a token distribution protocol that enables onchain vesting and airdrops. Our flagship model is the\nlinear stream, which distributes tokens on a continuous, by-the-second basis.\n\nThe way it works is that the sender of a payment stream first deposits a specific amount of ERC-20 tokens in a contract.\nThen, the contract progressively allocates the funds to the recipient, who can access them as they become available over\ntime. The payment rate is influenced by various factors, including the start and end times, as well as the total amount\nof tokens deposited.\n\n## Install\n\n### Node.js\n\nThis is the recommended approach.\n\nInstall Lockup using your favorite package manager, e.g., with Bun:\n\n```shell\nbun add @sablier/lockup\n```\n\nThen, if you are using Foundry, you need to add these to your `remappings.txt` file:\n\n```text\n@sablier/lockup/=node_modules/@sablier/lockup/\n@openzeppelin/contracts/=node_modules/@openzeppelin/contracts/\n@prb/math/=node_modules/@prb/math/\n```\n\n### Git Submodules\n\nThis installation method is not recommended, but it is available for those who prefer it.\n\nFirst, install the submodule using Forge:\n\n```shell\nforge install --no-commit sablier-labs/lockup\n```\n\nSecond, install the project's dependencies:\n\n```shell\nforge install --no-commit OpenZeppelin/openzeppelin-contracts@v5.0.2 PaulRBerg/prb-math@v4.1.0\n```\n\nFinally, add these to your `remappings.txt` file:\n\n```text\n@sablier/lockup/=lib/lockup/\n@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/\n@prb/math/=lib/prb-math/\n```\n\n### Branching Tree Technique\n\nYou may notice that some test files are accompanied by `.tree` files. This is because we are using Branching Tree\nTechnique and [Bulloak](https://bulloak.dev/).\n\n## Usage\n\nThis is just a glimpse of Sablier Lockup. For more guides and examples, see the\n[documentation](https://docs.sablier.com).\n\n```solidity\nimport { ISablierLockup } from \"@sablier/lockup/src/interfaces/ISablierLockup.sol\";\n\ncontract MyContract {\n  ISablierLockup lockup;\n\n  function buildSomethingWithSablier() external {\n    // ...\n  }\n}\n```\n\n## Architecture\n\nLockup uses a singleton-style architecture, where all streams are managed in the `SablierLockup` contract. That is,\nSablier does not deploy a new contract for each distribution model or stream. It bundles all streams into a single\ncontract, which is more gas-efficient and easier to maintain.\n\nFor more information, see the [Technical Overview](https://docs.sablier.com/reference/overview) in our docs, as well as\nthese [diagrams](https://docs.sablier.com/reference/lockup/diagrams).\n\n## Deployments\n\nThe list of all deployment addresses can be found [here](https://docs.sablier.com/guides/lockup/deployments). For\nguidance on the deployment scripts, see the [Deployments wiki](https://github.com/sablier-labs/lockup/wiki/Deployments).\n\n## Security\n\nThe codebase has undergone rigorous audits by leading security experts from Cantina, as well as independent auditors.\nFor a comprehensive list of all audits conducted, please click [here](https://github.com/sablier-labs/audits).\n\nFor any security-related concerns, please refer to the [SECURITY](./SECURITY.md) policy. This repository is subject to a\nbug bounty program per the terms outlined in the aforementioned policy.\n\n## Contributing\n\nFeel free to dive in! [Open](https://github.com/sablier-labs/lockup/issues/new) an issue,\n[start](https://github.com/sablier-labs/lockup/discussions/new) a discussion or submit a PR. For any informal concerns\nor feedback, please join our [Discord server](https://discord.gg/bSwRCwWRsT).\n\nFor guidance on how to create PRs, see the [CONTRIBUTING](./CONTRIBUTING.md) guide.\n\n## License\n\nThe primary license for Sablier Lockup is the Business Source License 1.1 (`BUSL-1.1`), see\n[`LICENSE.md`](./LICENSE.md). However, there are exceptions:\n\n- All files in `src/interfaces/` and `src/types` are licensed under `GPL-3.0-or-later`, see\n  [`LICENSE-GPL.md`](./LICENSE-GPL.md).\n- Several files in `src`, `script`, and `tests` are licensed under `GPL-3.0-or-later`, see\n  [`LICENSE-GPL.md`](./LICENSE-GPL.md).\n- Many files in `tests/` remain unlicensed (as indicated in their SPDX headers).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsablier-labs%2Flockup","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsablier-labs%2Flockup","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsablier-labs%2Flockup/lists"}