The "Liveness Oracle" for Sustainable Open Source Funding.
PulseRegistry is a decentralized source of truth for project activity within the Drips ecosystem. It solves the critical problem of "Ghost Funding" by ensuring that continuous capital streams only flow to projects that are actively maintained.
In decentralized funding protocols, funds are often streamed continuously over time. While this provides stability, it creates a risk: Abandoned Projects.
- Scenario: A maintainer stops working on a project, but the funding stream remains active.
- Impact: Capital is trapped in "dead" projects, reducing the overall efficiency of the ecosystem.
- Solution: PulseRegistry acts as a circuit breaker, requiring periodic proof-of-work (Heartbeats) to keep the funding valves open.
sequenceDiagram
participant Dev as Maintainer
participant Git as GitHub/GitLab
participant Oracle as Pulse Oracle
participant PR as PulseRegistry Contract
participant TD as TidalDistributor (Cashier)
Dev->>Git: Push Code / Merge PR
Git-->>Oracle: Activity Webhook
Oracle->>PR: recordHeartbeat(project_id)
Note over PR: Update lastHeartbeat[id]
TD->>PR: isProjectActive(project_id)?
alt is Active
PR-->>TD: true
TD->>Dev: Distribute Funds
else is Stale
PR-->>TD: false
TD->>TD: Halt Distributions
end
| Component | Description |
|---|---|
| Heartbeat Mapping | A global mapping(address => uint256) that records the last Unix timestamp of activity. |
| Grace Period | A constant 30 days window. If now - lastHeartbeat > GracePeriod, the project is "Stale". |
| Oracle Layer | The off-chain component (not in this repo) that bridges Git activity to the blockchain. |
mapping(address => uint256) public lastHeartbeat;Stores the block timestamp of the last recorded activity for any given address.
uint256 public constant GRACE_PERIOD = 30 days;The immutable time window (default 2,592,000 seconds) after which a project loses its active status.
function recordHeartbeat(address _project) external;Updates the liveness status of a project.
- Requirement: In production, this should be protected by an
onlyOraclemodifier. - Effect: Sets
lastHeartbeat[_project]toblock.timestamp.
function isProjectActive(address _project) public view returns (bool);Determines if a project is eligible for funding.
- Logic: Returns
trueifblock.timestamp <= lastHeartbeat[_project] + GRACE_PERIOD. - Logic: Returns
falseif the project has never recorded a heartbeat or the period has expired.
Integrated contracts can automatically pause streams if isProjectActive returns false, redirecting funds to a DAO treasury or active projects.
DAOs can use project "liveness" as a multiplier for voting power or reward distribution tiers.
Provides a real-time, on-chain dashboard for funders to see which projects are actually being maintained.
git clone https://github.com/your-org/pulse-registry.git
cd pulse-registry
npm installnpx hardhat compilenpx hardhat test- Multi-Oracle Support: Aggregate heartbeats from multiple sources (GitHub, Radicle, Manual).
- Customizable Grace Periods: Allow projects to set their own liveness windows based on their development cycle.
- Heartbeat History: Track historical activity frequency rather than just the last timestamp.
- Access Control: Implement robust RBAC (Role-Based Access Control) for oracle management.
This project is licensed under the MIT License.
Ensuring every heartbeat of development is met with a pulse of funding.