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

Emergency Controls

Rescue Tokens

The rescueTokens function allows Node owners to recover tokens accidentally sent to the Node that are not part of its components.

function rescueTokens(address token, address recipient, uint256 amount) external onlyOwner {
    if (token == asset) revert ErrorsLib.InvalidToken();
    if (_isComponent(token)) revert ErrorsLib.InvalidToken();
    IERC20(token).safeTransfer(recipient, amount);
    emit EventsLib.RescueTokens(token, recipient, amount);
}

Constraints

  • Only Node owner can call

  • Cannot rescue Node's underlying asset

  • Cannot rescue any token that is a component

  • Token must implement ERC20

Use Cases

  • Recover tokens sent to Node by mistake

  • Remove airdrops or other unwanted tokens

  • Clean up Node contract of non-component assets

Security

The function prevents extraction of:

function _isComponent(address component) internal view returns (bool) {
    return componentAllocations[component].isComponent;
}
  • Node's underlying asset

  • Any current component tokens

  • Any tokens used in Node strategies

PreviousOperator PermissionsNextUpgrading a Node

Last updated 2 months ago