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
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.