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
  1. Managing a Node

Max Deposit Limits

Maximum Deposit Limits

Maximum deposit limits protect Nodes from excessive capital inflows that could impact strategy execution. Each Node enforces a configurable maximum deposit size that applies to all depositors, and automatically prevents deposits when pricing data is stale. This ensures fair and accurate pricing for depositors and incentivizes rebalancers to rebalance the Node in order to accept deposits.

Default Setting

In Node.sol, set during initialization:

function initialize(address escrow_) external onlyOwner {
    // ... other initialization
    maxDepositSize = 10_000_000 * 10 ** decimals();  // 10M units
    // ...
}

Configuration

Node owner can update:

function setMaxDepositSize(uint256 newMaxDepositSize) external onlyOwner {
    if (newMaxDepositSize > 1e36) revert ErrorsLib.ExceedsMaxDepositLimit();
    maxDepositSize = newMaxDepositSize;
    emit EventsLib.MaxDepositSizeSet(newMaxDepositSize);
}

Implementation

Deposit limits are enforced through ERC4626 max functions:

function maxDeposit(address /* controller */ ) public view returns (uint256 maxAssets) {
    return isCacheValid() ? maxDepositSize : 0;
}

function maxMint(address /* controller */ ) public view returns (uint256 maxShares) {
    return isCacheValid() ? convertToShares(maxDepositSize) : 0;
}

Key behaviors:

  • Returns 0 if cache is invalid (prevents deposits with stale pricing)

  • Cache validity checked via:

    function isCacheValid() public view returns (bool) {
        return (block.timestamp < lastRebalance + rebalanceWindow + rebalanceCooldown);
    }
  • Deposit and mint functions revert if amount exceeds max

  • Applied uniformly to all depositors

  • No minimum deposit size enforced

PreviousLiquidation Queue ConfigurationNextOperator Permissions

Last updated 2 months ago