npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@bananapus/jbx-distributor-v6

v1.0.0

Published

`@bananapus/jbx-distributor-v6` distributes split-funded rewards to mainnet JBX stakers. Rewards are shared by JBX holders with nonzero delegated voting power at each reward round's snapshot block, then vest linearly before they are collected.

Downloads

618

Readme

Juicebox JBX Distributor

@bananapus/jbx-distributor-v6 distributes split-funded rewards to mainnet JBX stakers. Rewards are shared by JBX holders with nonzero delegated voting power at each reward round's snapshot block, then vest linearly before they are collected.

The package is intentionally narrow:

  • projects submit rewards through Juicebox split hooks
  • same-chain mainnet splits fund JBX reward rounds directly
  • remote-chain project-token splits queue for a sucker bridge to mainnet
  • mainnet sucker claims settle bridged project tokens into the same JBX reward ledger
  • the admin sets the JBX staking token once, and cannot replace it

Documentation

Contracts

| Contract | Role | | --- | --- | | JBXDistributor | Split hook, remote bridge queue, mainnet sucker settlement, and JBX reward specialization. | | JBDistributor | Shared round, vesting, collection, expiry, and optional Revnet vesting-loan accounting. | | IJBXDistributor | Integration interface for split-hook funding, bridge preparation, settlement, and JBX setup. |

Reward Model

Each funded round records:

  • the accepted reward token and amount
  • a snapshot block fixed at first funding for that round
  • IJBActiveVotes.getPastTotalActiveVotes(snapshotBlock) as the denominator
  • the configured claim deadline, if CLAIM_DURATION != 0

Recycling only moves inventory forward. If a keeper passes the current reward round to recycleExpiredRewards, the call is a no-op, including for zero-active rounds; those rounds can be recycled once a later round is current.

Claim helpers should bound how much history they scan. Rewards can remain claimable across many rounds, but a wallet or keeper should page through historical rounds instead of promising a single unbounded helper call.

Each staker's numerator is IVotes(JBX).getPastVotes(staker, snapshotBlock). The delegate address determines whether the holder has active voting power, but rewards belong to the encoded holder address. Helpers can begin vesting or collect to that canonical holder, so stakers do not need to submit every reward-cycle transaction themselves.

Cross-Chain Model

Remote chains do not distribute directly. A remote project's split sends that project's token to JBXDistributor on the remote chain. A keeper calls bridgeToMainnet, which prepares a sucker leaf with this distributor as the mainnet beneficiary and metadata identifying the origin chain and project. On mainnet, claimRemoteRewards authenticates the leaf against the origin project ID, then records the mainnet project's destination tokens as JBX rewards.

Direct ETH or token balances at the distributor are not rewards until an explicit same-chain funding, remote claim, or recycle path assigns them to a reward round.

Install

npm install @bananapus/jbx-distributor-v6

Development

npm install
forge test --deny notes --fail-fast --summary --detailed --skip "*/script/**"
forge fmt --check