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
  • Adding Quoters and Routers
  • Removing a Router
  • Governance & Whitelisting
Edit on GitHub
  1. Upgrading a Node

Adding Quoters & Routers

Adding Quoters and Routers

Quoters provide price discovery for Node components, while Routers handle deposits, withdrawals, and rebalances. Both contract types must be whitelisted at the protocol level before they can be used by individual Nodes.

Quoters

Protocol-level management:

function addQuoter(address quoter) external onlyOwner {
    if (quoter == address(0)) revert ErrorsLib.ZeroAddress();
    quoters[quoter] = true;
    emit EventsLib.QuoterAdded(quoter);
}

function removeQuoter(address quoter) external onlyOwner {
    if (!quoters[quoter]) revert ErrorsLib.NotWhitelisted();
    delete quoters[quoter];
    emit EventsLib.QuoterRemoved(quoter);
}

Node-level management:

function setQuoter(address newQuoter) external onlyOwner {
    if (newQuoter == address(0)) revert ErrorsLib.ZeroAddress();
    if (!protocol.isQuoterWhitelisted(newQuoter)) revert ErrorsLib.NotWhitelisted();
    quoter = newQuoter;
    emit EventsLib.QuoterSet(newQuoter);
}

Constraints:

  • Only protocol owner can whitelist/remove quoters

  • Nodes can only use whitelisted quoters

  • Nodes can only have one active quoter at a time

Routers

Protocol-level management:

function addRouter(address router) external onlyOwner {
    if (router == address(0)) revert ErrorsLib.ZeroAddress();
    routers[router] = true;
    emit EventsLib.RouterAdded(router);
}

function removeRouter(address router) external onlyOwner {
    if (!routers[router]) revert ErrorsLib.NotWhitelisted();
    delete routers[router];
    emit EventsLib.RouterRemoved(router);
}

Node-level management:

function addRouter(address router) external onlyOwner {
    if (router == address(0)) revert ErrorsLib.ZeroAddress();
    if (!protocol.isRouterWhitelisted(router)) revert ErrorsLib.NotWhitelisted();
    if (routers[router]) revert ErrorsLib.AlreadySet();
    routers[router] = true;
    emit EventsLib.RouterAdded(router);
}

function removeRouter(address router) external onlyOwner {
    if (!routers[router]) revert ErrorsLib.NotWhitelisted();
    delete routers[router];
    emit EventsLib.RouterRemoved(router);
}

Constraints:

  • Only protocol owner can whitelist/remove routers

  • Nodes can only use routers whitelisted at a protocol level

  • Nodes can have multiple active routers

  • Cannot add same router twice to a Node

  • Cannot remove a router that's not added to the Node

Removing a Router

When removing a Router contract that had previously been used to manage integrations with a specific component ALWAYS update the componentAllocation to the new router address. Otherwise functionality such as the liquidationQueue and calculating component assets will not work correctly, and will prevent rebalancing and user withdrawals.

Governance & Whitelisting

NashPoint implements a multi-tiered permissioning system to protect Nodes from misconfiguration or malicious components. Each router and component must be approved at protocol, router, and node levels before use.

PreviousUpgrading a NodeNextCustom Router Development

Last updated 19 days ago

Adding Routers and Components - Step by Step Guide