Skip to content
stakedotlinkPublic

About

Contracts for the stake.link Liquid Staking Protocol

Resources

Stars

9 stars

Watchers

2 watching

Forks

Repository files navigation

stake.link Liquid Staking Protocol

stake.link is a Liquid Staking protocol for the Chainlink, Polygon and Espresso networks. stake.link consists of the highest-quality node operators and validators to ensure a seamless and secure way to put tokens to stake.

Chainlink

By building on top of Chainlink Staking stake.link offers a way for users to stake their LINK across Chainlink Node Operators and the community pool, receiving stLINK, the liquid staking receipt token that rebases rewards. stLINK is always backed by the amount of LINK staked 1:1.

Polygon

stake.link delegates staked POL across Polygon validators, with users receiving stPOL, the liquid staking receipt token that rebases rewards. stPOL is always backed by the amount of POL staked 1:1.

Espresso

stake.link delegates staked ESP across Espresso validators, with users receiving stESP, the liquid staking receipt token that rebases rewards. stESP is always backed by the amount of ESP staked 1:1.

Technical Documentation

For more detailed technical documentation:

https://docs.stake.link/


I. Setup Locally

Requirements

Use node v22

$ nvm install 22
$ nvm use 22

Install dependencies

$ yarn

Hardhat configuration

  1. Set env vars MAINNET_RPC_URL and POLYGON_RPC_URL for the networks you would like to connect to, and ETHERSCAN_API_KEY for contract verification
  2. To sign deployments and scripts with a Ledger, add its address to ledgerAccounts in hardhat.config.ts
  3. Set env var HARDHAT_NETWORK (or pass --network) to the network you want to deploy to and/or interact with (default is localhost)

II. Running Locally

To run a local hardhat node, run:

$ yarn start

To run a local hardhat node, deploy all contracts, and send a series of transactions that mock user behaviour, run:

$ yarn start-test-env

To do the same against a node that is already running, run:

$ yarn deploy
$ yarn setup-test-env

Deployed addresses are written to deployments/localhost.json.

III. Deploying Contracts

Production deployment and upgrade scripts live in scripts/prod, grouped by product and release. To run one against a network, run:

$ npx hardhat run scripts/prod/<product>/<release>/<script>.ts --network mainnet

Deployed addresses are recorded in deployments/<network>.json.

IV. Testing

To run all contract tests, run:

$ yarn test

To generate a coverage report in coverage/, run:

$ yarn test --coverage

About

Contracts for the stake.link Liquid Staking Protocol

Resources

Stars

9 stars

Watchers

2 watching

Forks

Releases

Packages

Used by

Contributors

Languages