@rev-net/core-v6 deploys and operates Revnets: Juicebox project shapes with staged economics, optional tiered NFTs, cross-chain support, buyback integration, hidden-token mechanics, and token-collateralized loans.
Docs: https://docs.juicebox.money
Architecture: ARCHITECTURE.md
User journeys: USER_JOURNEYS.md
Skills: SKILLS.md
Risks: RISKS.md
Administration: ADMINISTRATION.md
Audit instructions: AUDIT_INSTRUCTIONS.md
A Revnet is meant to minimize human administration after launch. Its economics are encoded up front as a sequence of stages, and the runtime hook plus loan system enforce those rules over time.
This package provides:
- a deployer that launches Revnets and stores their long-lived configuration
- a runtime hook that mediates pay, cash-out, mint-permission, and delayed-cash-out behavior
- a loan system that burns token collateral on borrow and remints on repayment
- a hidden-token system that temporarily removes tokens from visible supply
It also composes with the 721 hook stack, buyback hook, router terminal, Croptop, and suckers where needed.
Use this repo when the product is a treasury-backed network with encoded stage transitions and a tightly constrained post-launch admin surface. Do not use it when the goal is ordinary governance or a simple project deploy.
| Contract | Role |
|---|---|
REVDeployer |
Launches and configures Revnets, stages, split operators, and optional auxiliary features. |
REVOwner |
Runtime data-hook and cash-out-hook surface used by active Revnets. |
REVLoans |
Loan surface that lets users borrow against Revnet tokens with burned collateral and NFT loan positions. |
REVHiddenTokens |
Lets token holders temporarily hide tokens, excluding them from visible supply until reveal. |
Read the package in two halves:
- deployment-time shape:
REVDeployerdecides what the network will be allowed to do - runtime enforcement:
REVOwner,REVLoans, andREVHiddenTokensdecide how that shape behaves over time
Most mistakes come from assuming a deploy-time parameter can be changed later or that a runtime hook is only advisory.
src/REVDeployer.solsrc/REVOwner.solsrc/REVLoans.solsrc/REVHiddenTokens.sol- the integrated hook or bridge repo used by the deployment
- the deployer holding the project NFT is part of the ownership model, not an implementation detail
- split operators are constrained, not equivalent to general protocol governance
- the loan system depends on live revnet economics and should be reviewed together with the runtime hook
- optional integrations like buybacks, 721 hooks, and suckers materially change the resulting network
- deployment-time configuration and operator envelope live in
REVDeployer - runtime pay and cash-out behavior live in
REVOwner - loan positions and loan-specific state live in
REVLoans - hidden-token state lives in
REVHiddenTokens
test/REVLifecycle.t.soltest/REVLoans.invariants.t.soltest/TestLongTailEconomics.t.soltest/fork/TestLoanBorrowFork.t.soltest/audit/CodexPhantomSurplusTerminal.t.sol
npm install @rev-net/core-v6npm install
forge build
forge testUseful scripts:
npm run deploy:mainnetsnpm run deploy:testnetsnpm run deploy:mainnets:1_1npm run deploy:testnets:1_1
Revnet deployment assumes the core protocol, 721 hook, buyback hook, router terminal, suckers, and Croptop packages are available. Revnets are intentionally unowned in the direct human sense after deployment, but the deployer contract itself remains part of the ownership model.
src/
REVDeployer.sol
REVOwner.sol
REVLoans.sol
REVHiddenTokens.sol
interfaces/
structs/
test/
lifecycle, deployment, loan, fork, invariant, audit, and regression coverage
script/
Deploy.s.sol
helpers/
- Revnets are intentionally hard to change after launch, so bad stage design is expensive
REVLoansrelies on live treasury conditions and is sensitive to surplus and pricing assumptions- the deployer and runtime hook should be treated as one design, not two separate systems
- burned-collateral lending is operationally different from escrowed-collateral lending
- Describe Revnets as treasury-backed Juicebox project shapes with encoded stage transitions, not as simple presets.
- Read
REVDeployer,REVOwner,REVLoans, andREVHiddenTokenstogether before answering economic or admin-surface questions. - If a deployment enables buybacks, 721 hooks, or suckers, inspect those sibling repos before making definitive claims.