NashPoint
NashPoint
  • Introduction
    • Introduction To Nashpoint
    • Current Features & Capabilities
    • Post Launch Roadmap
  • User Documentation
    • Node Contract Overview
    • Node Owner & Rebalancer Roles
    • Portfolio Management
    • Rebalancing & Strategy Execution
    • User Deposits & Shares
    • Asynchronous Redemptions
      • Two Step Process
    • Swing Pricing
    • Processing User Redemptions
    • Management & Execution Fees
  • Developer Documentation
    • Overview
    • Role-Based Access Control
    • Smart Contract Architecture
  • Routers
    • ERC-4626 Router
    • ERC-7540 Router
    • Router Tolerance
  • Creating A Node
  • Asynchronous Redemptions
  • Managing a Node
    • Adding & Removing Components
    • Updating Component Allocations
    • Rebalance Window & Cooldown
    • Rebalancing a Node
    • Managing Rebalancers
    • Processing User Redemptions
      • Reserve vs Component Fulfillment
    • Reserve Management
    • Fees Configuration
    • Liquidation Queue Configuration
    • Max Deposit Limits
    • Operator Permissions
    • Emergency Controls
  • Upgrading a Node
    • Adding Quoters & Routers
    • Custom Router Development
    • Multi-Tier Permissioning
  • Cached Data & Gas Efficiency
  • Swing Pricing Calculations
  • Adding Routers and Components - Step by Step Guide
  • Node Execute Function
  • Resources
    • FAQ
    • Glossary
    • Supported Networks & Protocols
    • Deployments
    • Audits
    • GitHub
    • Telegram
    • NashPoint
  • Node Strategies
    • Test Node A
Powered by GitBook
On this page
Edit on GitHub

Adding Routers and Components - Step by Step Guide

Adding new routers and components to a Node must be done in the correct order. The following constraints apply:

  1. A Node Owner cannot add a Router that is not whitelisted at the protocol level

  2. A Node Owner cannot add a component unless both:

    1. The component is whitelisted on a Router by the RegistryOwner

    2. This specific Router has already been added to the Node by the owner

1. Protocol Owner Actions

// Must happen first - whitelist router at protocol level
registry.setRegistryType(routerAddress, RegistryType.ROUTER, true);

2. Registry Owner Actions

// Whitelist component on specific router
router.setWhitelistStatus(componentAddress, true);

3. Node Owner Actions

// First add router to node
node.addRouter(routerAddress);

// Then add component that uses that router
node.addComponent(
    componentAddress,    // component address
    targetWeight,       // e.g., 0.7 ether for 70%
    maxDelta,          // acceptable deviation
    routerAddress      // must match router added above
);

If steps are performed out of order:

  • Adding component before router: Reverts with RouterNotApproved

  • Adding component before router whitelist: Reverts with NotWhitelisted

  • Adding router before protocol whitelist: Reverts with NotWhitelisted

  • Adding component before component whitelist: Reverts with NotWhitelisted

PreviousSwing Pricing CalculationsNextNode Execute Function

Last updated 2 months ago