{"id":19460121,"url":"https://github.com/offchainlabs/fund-distribution-contracts","last_synced_at":"2025-04-25T07:32:44.422Z","repository":{"id":189206461,"uuid":"528793821","full_name":"OffchainLabs/fund-distribution-contracts","owner":"OffchainLabs","description":"Contracts for distributing rewards data availability committee members","archived":false,"fork":false,"pushed_at":"2024-08-07T20:33:05.000Z","size":1036,"stargazers_count":11,"open_issues_count":4,"forks_count":3,"subscribers_count":23,"default_branch":"main","last_synced_at":"2024-10-08T00:29:12.492Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Solidity","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/OffchainLabs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":"audits/ChainSecurity_Offchain_Labs_Fund_Distribution_audit.pdf","citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-08-25T10:06:45.000Z","updated_at":"2024-08-09T15:52:13.000Z","dependencies_parsed_at":null,"dependency_job_id":"58ae58c4-cf84-44ef-a2b8-844f7c0f4469","html_url":"https://github.com/OffchainLabs/fund-distribution-contracts","commit_stats":null,"previous_names":["offchainlabs/dac-rewards","offchainlabs/fund-distribution-contracts"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OffchainLabs%2Ffund-distribution-contracts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OffchainLabs%2Ffund-distribution-contracts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OffchainLabs%2Ffund-distribution-contracts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OffchainLabs%2Ffund-distribution-contracts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/OffchainLabs","download_url":"https://codeload.github.com/OffchainLabs/fund-distribution-contracts/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223989467,"owners_count":17237086,"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":[],"created_at":"2024-11-10T17:35:39.757Z","updated_at":"2024-11-10T17:35:40.391Z","avatar_url":"https://github.com/OffchainLabs.png","language":"Solidity","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Fund Distribution Contracts\n\nA set of smart contracts that handle fund distribution across multiple chains.\n\n## Reward Distributor\n\nA smart contract that pushes the funds that accrued in it to a group of addresses. You can use this contract to distribute native token between the participants according to preset weights.\n\nThe participants are managed by an owner - accrued reward must be distributed to the participants before the configuration can be changed. The owner cannot deny a particular participant from receiving their share of the reward, but can deny the reward from being distributed to all participants. If a particular recipient is not able to recieve funds at their address, the payment will fallback to the owner.\n\nThis contract is expected to handle native token simply appearing in its balance (opposed to having an explicit `receive` function called).\n\nThe contract currently assume the block gas limit would be at least 16M gas and the number of malicious participants would be less than 10.\n\n## Fee Routers\n\nA set of smart contracts that pushes route funds (both native and erc20) across parent and child chains.\n\nThese are the supported routes:\n\n1. ArbChildToParentRewardRouter.sol\n\n    Route funds from an Arbitrum chain to its parent chain\n\n2. OpChildToParentRewardRouter.sol\n\n    Route funds from an OPStack chain to its parent chain\n\n3. ParentToChildRewardRouter.sol\n\n    Route funds from a parent chain to a child Arbitrum chain\n\nWhen setting up a new route, make sure the token exists on both side by the configurated bridge or else fund can be stuck.\n\n## Installation\n\n1. Install [Foundry](https://github.com/foundry-rs/foundry):\n\n```\ncurl -L https://foundry.paradigm.xyz | bash\n```\n\n2. Download dependency\n\n```\nmake install\n```\n\n### Dependencies\n\n```\nmake update\n```\n\n### Compilation\n\n```\nmake build\n```\n\n### Testing\n\n```\nmake test\n```\n\n### Code Coverage\n\n```\nmake coverage\n```\n\n### Gas Report\n\n```\nmake gas\n```\n\n### Gas Snapshot\n\n```\nmake snapshot\n```\n\n### Compare with Gas Snapshot\n\n```\nmake gas-check\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foffchainlabs%2Ffund-distribution-contracts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foffchainlabs%2Ffund-distribution-contracts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foffchainlabs%2Ffund-distribution-contracts/lists"}