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
  • Deployment Process
  • Initialization
  • Swing Pricing
  • Example Creation (from BaseTest)
  • Post-Creation Configuration
  • Security Considerations
Edit on GitHub

Creating A Node

Deployment Process

1. Node Creation

Nodes are created through the NodeFactory using deployFullNode:

function deployFullNode(
    string memory name,
    string memory symbol,
    address asset,
    address owner,
    address[] memory components,
    ComponentAllocation[] memory componentAllocations,
    uint64 targetReserveRatio,
    address rebalancer,
    address quoter,
    bytes32 salt
) external returns (INode node, address escrow)

Constructor Parameters

Parameter
Description
Constraints

name

Name of the Node token

Cannot be empty

symbol

Symbol of the Node token

Cannot be empty

asset

Address of the underlying asset

Cannot be zero address

owner

Address of the Node owner

Cannot be zero address

components

Array of initial component addresses

Must match componentAllocations length

componentAllocations

Array of component parameters

See ComponentAllocation struct below

targetReserveRatio

Target cash reserve ratio

Must be < 1e18 (100%)

rebalancer

Initial rebalancer address

Must be whitelisted in Registry

quoter

Quoter contract address

Must be whitelisted in Registry

salt

Unique deployment salt

Any bytes32 value

ComponentAllocation Struct

struct ComponentAllocation {
    uint64 targetWeight;    // Target allocation (in WAD, e.g., 0.5e18 = 50%)
    uint64 maxDelta;       // Maximum allowed deviation from target
    address router;        // Router contract for this component
    bool isComponent;      // Always true for new components
}

Initialization

During deployment, the Node will be initialized in the constructor:

function initialize(address escrow_) external

This sets the following values:

  • escrow: Address of the Escrow contract (immutable after set)

  • lastRebalance: block.timestamp - rebalanceWindow (enables immediate rebalancing)

  • lastPayment: block.timestamp (starts fee period)

  • maxDepositSize: 10_000_000 * 10 ** decimals() (can be changed by owner)

  • Enables all routers specified in initial component allocations

Default Values

The Node is created with these default values that can be modified by the owner:

lastRebalance = uint64(block.timestamp - rebalanceWindow);
lastPayment = uint64(block.timestamp);
rebalanceCooldown = 23 hours;
rebalanceWindow = 1 hours;
maxDepositSize = 10_000_000 * 10 ** decimals();

Swing Pricing

By default, swing pricing is disabled at deployment with:

swingPricingEnabled = false;
maxSwingFactor = 0;

Node owner can enable it later using:

function enableSwingPricing(bool status_, uint64 maxSwingFactor_)

where maxSwingFactor_ must be less than the protocol-wide maximum set in the Registry.

Example Creation (from BaseTest)

// Deploy Node through factory
(node, escrow) = factory.deployFullNode(
    "Test Node",
    "TNODE",
    address(asset),
    owner,
    _toArray(address(vault)),  // Initial component
    _defaultComponentAllocations(1),  // Initial allocations
    0.1 ether,  // 10% reserve ratio
    address(rebalancer),
    address(quoter),
    SALT
);

// Optional: Update max deposit size
node.setMaxDepositSize(1e36);

Post-Creation Configuration

The Node owner can modify these parameters after creation:

  • Management fees and fee recipient

  • Maximum deposit size

  • Rebalance cooldown and window periods

  • Swing pricing parameters

  • Component allocations and parameters

  • Liquidation queue

  • Additional routers and rebalancers

Security Considerations

  1. All components must be whitelisted in their respective routers

  2. Component allocation weights must sum to 100% (1e18) with reserve ratio

  3. Routers must be whitelisted in the Registry

  4. Rebalancers must be whitelisted in the Registry

  5. Quoter must be whitelisted in the Registry

PreviousRouter ToleranceNextAsynchronous Redemptions

Last updated 2 months ago