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

nav-loop

v0.2.1

Published

Strategy math for recursive borrow/buy looping against NAV-backed collateral. Leads with what the loop costs you, not what it levers you to.

Readme

nav-loop

Breadth-first buy+borrow bot and strategy math for NAV-backed collateral on oddballer.fun.

Unaudited. Opens leveraged positions with real funds. Dry-run by default.

The one number that matters

Exposure gained per unit of equity burned is constant in lap count:

| β | exposure per equity burned | max leverage | full-loop entry cost | |---|---|---|---| | 0.825 | 4.04x | 3.10x | 76.7% | | 0.99 | 10.28x | 5.33x | 51.9% |

Lapping does not get more efficient the more you lap. So lap count is a size dial, not an efficiency dial — there is no optimal number of laps to solve for. β, by contrast, moves the exchange rate 2.5x.

Why breadth-first

Depth-first (N laps, one meme) and breadth-first (one lap, N memes) have identical haircuts, identical exposure and identical equity burn. The only difference is that concentration is priced:

concentrationBps × CONCENTRATION_SLOPE_BPS(1000)
  1 meme  → +10.00% APR
 10 memes → + 1.00% APR

Nine points of APR for routing alone, plus the bet is diversified and maturities stagger instead of cliffing. Depth-first is only right when conviction in one name outweighs 9% APR.

Use

npm i -g nav-loop

navloop plan --capital 0.1 --tokens 0xTOKEN_A,0xTOKEN_B
navloop run  --capital 0.1 --tokens 0xTOKEN_A,0xTOKEN_B --execute

Nothing is signed without --execute and NAVLOOP_PRIVATE_KEY.

import { planBreadthFirst, exposurePerEquityBurned } from "nav-loop";
import { runBreadthFirst, readBetas } from "nav-loop/bot";

const memes = await readBetas(["0x…"]);
const plan  = planBreadthFirst(memes, 0.1);
console.log(plan.entryCostFraction);  // read this before the leverage number

Config

file < env < explicit argument. Copy navloop.config.example.json.

| env | meaning | |---|---| | NAVLOOP_RPC_URL | chain endpoint | | NAVLOOP_NAV_LEND / NAVLOOP_HOOK / NAVLOOP_ROUTER | contracts | | NAVLOOP_MAX_LAPS | size dial (default 1 — breadth-first) | | NAVLOOP_MIN_BETA | reject cheap-exchange-rate memes (default 0.8) | | NAVLOOP_MAX_UTILISATION_BPS | stay under the kink (default 8000) | | NAVLOOP_MAX_CONCENTRATION_BPS | cap one meme's share of OI | | NAVLOOP_GAS_PRICE_WEI / NAVLOOP_GAS_PER_LAP | gas model | | NAVLOOP_REFINANCE_BUFFER_SECONDS | rebuild before the 30-day term | | NAVLOOP_PRIVATE_KEY | only read when --execute |

What can go wrong

  • The entry cost is real and immediate. At β=0.825 a single lap costs 24.8% before the price moves.
  • Loans mature at 30 days and are then closable by anyone at any LTV. Refinance inside refinanceBufferSeconds.
  • Collateral cannot fall in value (NAV is monotonic on-chain), so only interest can liquidate you — but interest is enough.
  • Protocol constants are mirrored in src/protocol.ts. If the contracts are redeployed with different parameters, every number here is confidently wrong. Verify against chain.

MIT.