{"_id":"@bananapus/univ3-lp-split-hook-v6","_rev":"3-8b25cde6a92a5ea859746d1ccae09251","name":"@bananapus/univ3-lp-split-hook-v6","dist-tags":{"latest":"0.0.3"},"versions":{"0.0.1":{"name":"@bananapus/univ3-lp-split-hook-v6","version":"0.0.1","license":"MIT","_id":"@bananapus/univ3-lp-split-hook-v6@0.0.1","maintainers":[{"name":"simplemachine","email":"justinpulley92@gmail.com"},{"name":"me.jango","email":"me.jango@protonmail.com"},{"name":"filipviz","email":"f@filip.world"}],"homepage":"https://github.com/Bananapus/nana-univ3-lp-split-hook-v6#readme","bugs":{"url":"https://github.com/Bananapus/nana-univ3-lp-split-hook-v6/issues"},"dist":{"shasum":"764794dc065901aae2b97391a731c216f3e6dbc6","tarball":"https://registry.npmjs.org/@bananapus/univ3-lp-split-hook-v6/-/univ3-lp-split-hook-v6-0.0.1.tgz","fileCount":2190,"integrity":"sha512-EixE96mDCoLFemtrMRJgMX6cKr1eQU7CES+vWLiRL8SXx52Xwdw1l6FpPiyVAmCs9xfY4aTuuPYmsR/FfqJW9Q==","signatures":[{"sig":"MEQCIFRM+M4JVHiPgpSlAXPeYfxj3Fc8kdLt8Bdwo0NcpHTTAiA/RYpfIi3zGBnspZYk3wApeq/0TwSlf43VxZqWHPaaCQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":54533452},"engines":{"node":">=20.0.0"},"gitHead":"66c6394b6a677f02fce2c057e9084f9072998c57","_npmUser":{"name":"me.jango","email":"me.jango@protonmail.com"},"repository":{"url":"git+https://github.com/Bananapus/nana-univ3-lp-split-hook-v6.git","type":"git"},"_npmVersion":"11.11.0","description":"Use flattened versions (`npx hardhat flatten`) of UniswapV3 Periphery contracts because they unfortunately depend on OpenZeppelin Contracts 3.X, and we want to avoid version skew with the rest of this repo depending on OpenZeppelin Contracts 4.X","directories":{},"_nodeVersion":"25.8.0","dependencies":{"@bananapus/core-v6":"^0.0.1"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/univ3-lp-split-hook-v6_0.0.1_1772727088173_0.8884507668449548","host":"s3://npm-registry-packages-npm-production"}},"0.0.2":{"name":"@bananapus/univ3-lp-split-hook-v6","version":"0.0.2","license":"MIT","_id":"@bananapus/univ3-lp-split-hook-v6@0.0.2","maintainers":[{"name":"simplemachine","email":"justinpulley92@gmail.com"},{"name":"me.jango","email":"me.jango@protonmail.com"},{"name":"filipviz","email":"f@filip.world"}],"homepage":"https://github.com/Bananapus/nana-univ3-lp-split-hook-v6#readme","bugs":{"url":"https://github.com/Bananapus/nana-univ3-lp-split-hook-v6/issues"},"dist":{"shasum":"0ccaa05738df075fa2c5e2238f9f1753d1be38f3","tarball":"https://registry.npmjs.org/@bananapus/univ3-lp-split-hook-v6/-/univ3-lp-split-hook-v6-0.0.2.tgz","fileCount":2288,"integrity":"sha512-kOmxD/7v/gUgC58WXEiujKJhWDDGv2PTL1dTcYAhubpZXGJ0H1za9+sOjQOCIi46Png84i3KlxH1rZx0wGOakg==","signatures":[{"sig":"MEQCIH1nS+PVoKxHWCP1Q3T+K70v98h+bKHI4cwdJDzwOWu8AiBxxB53vchOUtUkCPW8Ht36ixaIPPrJaejnOLjAC3+phg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":56425333},"engines":{"node":">=20.0.0"},"gitHead":"632f7e8a009fb8048b7bb2c0e28710b8afd46662","scripts":{"test":"forge test","coverage":"forge coverage --report lcov --report summary","test:fork":"FOUNDRY_PROFILE=CI forge test"},"_npmUser":{"name":"me.jango","email":"me.jango@protonmail.com"},"repository":{"url":"git+https://github.com/Bananapus/nana-univ3-lp-split-hook-v6.git","type":"git"},"_npmVersion":"11.11.0","description":"Juicebox split hook that accumulates reserved project tokens, then deploys a Uniswap V3 liquidity position bounded by the project's issuance rate (ceiling) and cash-out rate (floor), with ongoing fee collection and liquidity rebalancing.","directories":{},"_nodeVersion":"25.8.0","dependencies":{"@prb/math":"^4.1.0","@bananapus/core-v6":"^0.0.1","@openzeppelin/contracts":"^5.2.0","@bananapus/permission-ids-v6":"^0.0.1"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/univ3-lp-split-hook-v6_0.0.2_1772895726508_0.3222937506325352","host":"s3://npm-registry-packages-npm-production"}},"0.0.3":{"name":"@bananapus/univ3-lp-split-hook-v6","version":"0.0.3","license":"MIT","repository":{"type":"git","url":"git+https://github.com/Bananapus/nana-univ3-lp-split-hook-v6.git"},"engines":{"node":">=20.0.0"},"scripts":{"test":"forge test","test:fork":"FOUNDRY_PROFILE=CI forge test","coverage":"forge coverage --report lcov --report summary"},"dependencies":{"@bananapus/721-hook-v6":"^0.0.7","@bananapus/buyback-hook-v6":"^0.0.5","@bananapus/core-v6":"^0.0.5","@bananapus/ownable-v6":"^0.0.4","@bananapus/permission-ids-v6":"^0.0.1","@bananapus/suckers-v6":"^0.0.4","@croptop/core-v6":"^0.0.5","@openzeppelin/contracts":"^5.2.0","@prb/math":"^4.1.0","@rev-net/core-v6":"^0.0.3","@uniswap/v4-core":"^1.0.2","@uniswap/v4-periphery":"^1.0.3"},"gitHead":"73995859b7a2a6181986938221ef4949ef77985b","_id":"@bananapus/univ3-lp-split-hook-v6@0.0.3","description":"Juicebox split hook that accumulates reserved project tokens, then deploys a Uniswap V3 liquidity position bounded by the project's issuance rate (ceiling) and cash-out rate (floor), with ongoing fee collection and liquidity rebalancing.","bugs":{"url":"https://github.com/Bananapus/nana-univ3-lp-split-hook-v6/issues"},"homepage":"https://github.com/Bananapus/nana-univ3-lp-split-hook-v6#readme","_nodeVersion":"25.8.0","_npmVersion":"11.11.0","dist":{"integrity":"sha512-iBhTcvrnAlsAlyaEetIfz538Bheo5nLnIROcboweykTt5gmyFP0zU0ZlK6/2O5MauIf5nvBiMhUGx3EGXpBArg==","shasum":"7de35debc0a5eb6cabb1f286f23c300fb3dde1ea","tarball":"https://registry.npmjs.org/@bananapus/univ3-lp-split-hook-v6/-/univ3-lp-split-hook-v6-0.0.3.tgz","fileCount":2286,"unpackedSize":56386985,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIFqatURToHvTlWj145mhhzhV8YWkG5yzSiUzZxbYsXAgAiAoPu4tRabB1Rq/fo28bddQCyWi2HwiOTjwwWBXsLu80Q=="}]},"_npmUser":{"name":"me.jango","email":"me.jango@protonmail.com"},"directories":{},"maintainers":[{"name":"simplemachine","email":"justinpulley92@gmail.com"},{"name":"me.jango","email":"me.jango@protonmail.com"},{"name":"filipviz","email":"f@filip.world"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/univ3-lp-split-hook-v6_0.0.3_1772909263248_0.8228901237841764"},"_hasShrinkwrap":false}},"time":{"created":"2026-03-05T16:11:28.022Z","modified":"2026-03-07T18:47:44.047Z","0.0.1":"2026-03-05T16:11:28.894Z","0.0.2":"2026-03-07T15:02:07.207Z","0.0.3":"2026-03-07T18:47:43.909Z"},"bugs":{"url":"https://github.com/Bananapus/nana-univ3-lp-split-hook-v6/issues"},"license":"MIT","homepage":"https://github.com/Bananapus/nana-univ3-lp-split-hook-v6#readme","repository":{"type":"git","url":"git+https://github.com/Bananapus/nana-univ3-lp-split-hook-v6.git"},"description":"Juicebox split hook that accumulates reserved project tokens, then deploys a Uniswap V3 liquidity position bounded by the project's issuance rate (ceiling) and cash-out rate (floor), with ongoing fee collection and liquidity rebalancing.","maintainers":[{"name":"simplemachine","email":"justinpulley92@gmail.com"},{"name":"me.jango","email":"me.jango@protonmail.com"},{"name":"filipviz","email":"f@filip.world"}],"readme":"# nana-lp-split-hook-v5\n\nJuicebox split hook that accumulates reserved project tokens, then deploys a Uniswap V3 liquidity position bounded by the project's issuance rate (ceiling) and cash-out rate (floor), with ongoing fee collection and liquidity rebalancing.\n\n## Architecture\n\n| Contract | Description |\n|----------|-------------|\n| `UniV3DeploymentSplitHook` | `IJBSplitHook` implementation with a two-stage lifecycle. **Before deployment:** accumulates project tokens received via reserved-token splits. **After deployment:** burns newly received project tokens, manages the V3 LP position (fee collection, rebalancing), and routes LP fees back to the project with a configurable fee split to a fee project. Inherits `JBPermissioned`, `ERC2771Context`, `Ownable`. |\n| `IUniV3DeploymentSplitHook` | Interface declaring `isPoolDeployed`, `deployPool`, `collectAndRouteLPFees`, `claimFeeTokensFor`, plus events. |\n| `IREVDeployer` | Minimal interface for `isSplitOperatorOf(projectId, operator)` used to authorize fee-token claims. |\n\n## Lifecycle\n\n```\n1. Configure as a reserved-token split hook for a Juicebox project\n   |\n2. Controller calls processSplitWith() on each reserved-token distribution\n   --> Tokens accumulate in accumulatedProjectTokens[projectId]\n   |\n3. Project owner calls deployPool(projectId, terminalToken, ...)\n   --> Creates V3 pool at geometric mean of [cashOutRate, issuanceRate]\n   --> Computes optimal cash-out fraction for LP geometry\n   --> Cashes out a portion of project tokens for terminal tokens\n   --> Mints V3 LP position bounded by [cashOutRate tick, issuanceRate tick]\n   --> Burns leftover project tokens, adds leftover terminal tokens to project\n   --> Sets projectDeployed[projectId] = true\n   |\n4. Future processSplitWith() calls burn received project tokens\n   |\n5. Anyone calls collectAndRouteLPFees(projectId, terminalToken)\n   --> Collects fees from V3 position\n   --> Routes terminal token fees: FEE_PERCENT to fee project, rest to original project\n   --> Burns collected project token fees\n   |\n6. Anyone calls rebalanceLiquidity(projectId, terminalToken, ...)\n   --> Removes old position, burns NFT\n   --> Recalculates tick bounds from current rates\n   --> Mints new position with updated bounds\n   |\n7. Revnet operator calls claimFeeTokensFor(projectId, beneficiary)\n   --> Transfers accumulated fee-project tokens to beneficiary\n```\n\n## Install\n\n```bash\nnpm install\nforge install\n```\n\n## Develop\n\n| Command | Description |\n|---------|-------------|\n| `forge build` | Compile (requires `via_ir = true` due to stack depth) |\n| `forge test` | Run tests |\n| `forge test -vvv` | Run tests with full trace |\n\n## Key Constants\n\n| Constant | Value | Purpose |\n|----------|-------|---------|\n| `BPS` | 10000 | Basis points denominator |\n| `UNISWAP_V3_POOL_FEE` | 10000 (1%) | V3 pool fee tier |\n| `TICK_SPACING` | 200 | Tick spacing for 1% fee tier |\n\n## Constructor\n\n```solidity\nconstructor(\n    address initialOwner,                              // Contract owner\n    address directory,                                 // JBDirectory\n    IJBPermissions permissions,                        // JBPermissions\n    address tokens,                                    // JBTokens\n    address uniswapV3Factory,                          // V3 Factory\n    address uniswapV3NonfungiblePositionManager,       // V3 NonfungiblePositionManager\n    uint256 feeProjectId,                              // Project ID to receive LP fee split\n    uint256 feePercent,                                // Fee split in basis points (e.g. 3800 = 38%)\n    address revDeployer,                               // REVDeployer for operator validation\n    address trustedForwarder                           // ERC-2771 trusted forwarder\n)\n```\n\n## License\n\nMIT\n","readmeFilename":"README.md"}