npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@nodeset/contracts

v0.0.9-alpha

Published

Protocol for accessing NodeSet's Constellation Ethereum staking network

Downloads

34

Readme

NodeSet Constellation


Made w/ <3 by {::}

See the full documentation here

We use Hardhat for development.

Dev Setup

  • Install dependencies via npm install
  • nvm use 20 stops Hardhat's warnings about an unsupported NPM version
  • npx hardhat test runs the test suite. Mocha Test Explorer extension for VSCode is recommended for a better UX while developing.

A brief overview...

This repository contains Solidity smart contracts and assocated tests for Constellation, a second layer liquid staking protocol built on top of Rocket Pool. The protocol involves the creation and management of node operators, minipools, and token vaults, with integrated staking and reward distribution mechanisms.

Protocol Contracts

PriceFetcher.sol

  • Fetches and provides the price of ETH denominated in RPL using Uniswap V3 and a fallback mechanism to an oracle

Whitelist.sol

  • Manages a list of approved node operators and their controllers

PoAConstellationOracle.sol

  • Uses proof-of-authority to allow updates to the total yield accrued using ECDSA signatures

RocketpoolEncoder.sol

  • A library for generating keccak256 identifiers for Rocket Pool contracts

Errors.sol

  • Defines custom error messages for the protocol

Constants.sol

  • Defines constants for roles, directory errors, whitelist errors, treasury errors, and operator distributor errors

Directory.sol

  • Holds references to all protocol contracts and manages role mechanisms

WETHVault.sol

  • An ERC4626 vault for WETH tokens, managing deposits, withdrawals, and rewards distribution

RPLVault.sol

  • An ERC4626 vault for RPL tokens, managing deposits, withdrawals, and rewards distribution

SuperNodeAccount.sol

  • Manages node operators and their minipools

OperatorDistributor.sol

  • Manages distribution and staking of ETH and RPL tokens for node operators

MerkleClaimStreamer.sol

  • Allows for Rocket Pool merkle claim submission on behalf of Constellation and
  • "Streams" the rewards from these claims to the rest of the protocol upon receipt

External Contracts

These contracts are not part of the Constellation protocol but still serve important purposes of their own

Treasury.sol

  • An example contract that a Treasurer might use to manage the earned income
  • Constellation's contracts do not assume a particular treasury contract -- they only require a payable contract such as this

NodeSetOperatorRewardDistributor.sol

  • Distributes rewards to a decentralized swarm of operators. Can take in income from any source, not just Constellation
  • Constellation's contracts do not assume a particular operator reward distribution contract -- they only require a payable contract such as this

Actors

The protocol involves several actors, each with specific roles and incentives to ensure the smooth operation and security of the system.

Node Operators or alternitivaly refered to as Sub-Node Operators

  • May add themselves to the operator whitelist with the Admin's approval
  • May remove themselves from the operator whitelist (if they have no active minipools)
  • Create and manage minipools
  • Responsible for uptime and performance of their individual node
  • Collects fees from staking

Admin

  • Manage protocol configuration to ensure stability
  • Oversee reward distributions
  • Ensure security and compliance within the protocol
  • Develop and update smart contracts
  • Ensure security and efficiency of the code
  • Implement new features and upgrades
  • May set a new Admin
  • May set a new Oracle provider
  • Assumed to be a service provider for the Treasurer

Liquid Stakers (Depositors)

  • Exchange their ETH and RPL for liquid staking tokens
  • These LSTs earn staking rewards from ETH and RPL

Oracle Providers

  • Provide accurate and reliable external data to the protocol
  • Ensure timely updates of the data feeds

Treasurer

  • Receives protocol-wide fees
  • May set a new Treasurer
  • Responsible for using the protocol-wide income to grow the protocol and its ecosystem
  • The "protocol owner"