• Stars
    star
    285
  • Rank 145,115 (Top 3 %)
  • Language
    JavaScript
  • License
    GNU General Publi...
  • Created over 4 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Lido DAO smart contracts

Lido Ethereum Liquid Staking Protocol

Tests License: GPL v3

The Lido Ethereum Liquid Staking Protocol allows their users to earn staking rewards on the Beacon chain without locking Ether or maintaining staking infrastructure.

Users can deposit Ether to the Lido smart contract and receive stETH tokens in return. The smart contract then stakes tokens with the DAO-picked node operators. Users' deposited funds are pooled by the DAO, node operators never have direct access to the users' assets.

Unlike staked ether, the stETH token is free from the limitations associated with a lack of liquidity and can be transferred at any time. The stETH token balance corresponds to the amount of Ether that the holder could request to withdraw.

Before getting started with this repo, please read:

Lido DAO

The Lido DAO is a Decentralized Autonomous Organization that manages the liquid staking protocol by deciding on key parameters (e.g., setting fees, assigning node operators and oracles, etc.) through the voting power of governance token (DPG) holders.

Also, the DAO will accumulate service fees and spend them on insurance, research, development, and protocol upgrades. Initial DAO members will take part in the threshold signature for Ethereum 2.0 by making BLS threshold signatures.

The Lido DAO is an Aragon organization. Since Aragon provides a full end-to-end framework to build DAOs, we use its standard tools. The protocol smart contracts extend AragonApp base contract and can be managed by the DAO.

Protocol levers

A full list of protocol levers that are controllable by the Aragon DAO can be found here.

Contracts

For the contracts description see https://docs.lido.fi/ contracts section.

Deployments

For the protocol contracts addresses see https://docs.lido.fi/deployed-contracts/

Development

Requirements

  • shell - bash or zsh
  • docker
  • find
  • sed
  • jq
  • curl
  • cut
  • docker
  • node.js v16
  • (optional) Lerna
  • (optional) Foundry

Installing Aragon & other deps

Installation is local and doesn't require root privileges.

If you have yarn installed globally:

yarn

otherwise:

npx yarn

Build & test

Run unit tests:

yarn test

Run unit tests and report gas used by each Solidity function:

yarn test:gas

Generate unit test coverage report:

yarn test:coverage

Test coverage is reported to coverage.json and coverage/index.html files located inside each app's folder.

Keep in mind that the code uses asserts to check invariants that should always be kept unless the code is buggy (in contrast to require statements which check pre-conditions), so full branch coverage will never be reported until solidity-coverage#219 is implemented.

Run fuzzing tests with foundry:

curl -L https://foundry.paradigm.xyz | bash
foundryup
forge test

Deploying

We have several ways to deploy lido smart-contracts and run DAO locally, you can find documents here:

lido-aragon documentation

For local development, please see local documentation

To develop/test on fork, please see fork documentation

License

2023 Lido [email protected]

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 3 of the License, or any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see https://www.gnu.org/licenses/.

More Repositories

1

diffyscan

Diff your Github against Etherscan.
Python
128
star
2

ethereum-validators-monitoring

Ethereum validators monitoring bot aimed to keep track of the validators performance
TypeScript
69
star
3

dc4bc

distributed custody for the beacon chain
HTML
62
star
4

audits

55
star
5

lido-oracle

Pythonic Lido Oracle daemon
Python
45
star
6

alerting-forta

Forta Detection bots for Lido
TypeScript
35
star
7

community-staking-module

Community Staking Module is the first ever permissionless staking module in Lido
Solidity
33
star
8

lido-l2

TypeScript
29
star
9

lido-frontend-template

A project template for developing Lido UI applications
TypeScript
27
star
10

lido-js-sdk

TypeScript
27
star
11

uni-v3-liquidity-provider

Solidity
22
star
12

lido-ethereum-sdk

Lido Ethereum SDK
TypeScript
19
star
13

lido-terra-contracts

Smart contracts powering Lido Liquid Staking on Terra
Rust
18
star
14

ethereum-staking-widget

Ethereum Liquid Staking widget based on the Lido Frontend Template
TypeScript
18
star
15

lido-keys-api

Api for fetching node operators keys from modules
TypeScript
18
star
16

mev-boost-monitoring

Service collects data from flashbots/mevboost
Go
16
star
17

lido-improvement-proposals

Lido Improvement Proposals 💋
Jupyter Notebook
16
star
18

dual-governance

Lido Dual Governance contracts
Solidity
14
star
19

ui

React UI Components for Lido projects.
TypeScript
13
star
20

core

Lido core protocol contracts
TypeScript
12
star
21

anchor-collateral-steth

Ethereum contracts for integrating stETH as collateral into the Anchor protocol
Python
11
star
22

reef-knot

TypeScript
11
star
23

lido-python-sdk

This is the new version of lido-python library.
C++
11
star
24

solido-sdk

Lido on Solana
TypeScript
10
star
25

validator-ejector

TypeScript
10
star
26

ldo-purchase-executor

A contract for purchasing LDO for ETH from the DAO treasury
Python
9
star
27

state-mate

Simple tool that validates smart contracts' state
TypeScript
8
star
28

terra-multisig-helper

Python
8
star
29

staking-rewards-manager

Staking rewards manager
Python
8
star
30

depositor-bot

Python
8
star
31

ethereum-head-watcher

Bot to monitor particular validators slashes
Python
8
star
32

easy-track

Easy Track Motions for Lido DAO governance
Python
8
star
33

web3py-multi-http-provider

Web3py HTTPProvider that makes it easy to switch between different Ethereum nodes. To make sure the application will be ok if some of the nodes are down.
Python
8
star
34

gate-seals

A one-time panic button for pausable contracts
Python
8
star
35

polygon-contracts

TypeScript
7
star
36

lido-council-daemon

TypeScript
7
star
37

polygon-validators-monitoring

Polygon validators monitoring bot aimed to keep track of the validators performance
TypeScript
7
star
38

lido-yearn-widget

Widget for Lido/Yearn integration
JavaScript
6
star
39

lido-vesting-escrow

Token vesting escrow with cliff, unvested revocation and full full revocation
Python
6
star
40

validator-exits-automation-snippets

JavaScript
6
star
41

lido-cli

TypeScript
5
star
42

solana-validators-monitoring

Solana validators monitoring
TypeScript
5
star
43

dc4bc-conference-call

4
star
44

widget-public

Lido Staking Widget / IPFS version
JavaScript
4
star
45

lido-python

Python
4
star
46

lido-nestjs-modules

TypeScript
4
star
47

forta-discord

JavaScript
4
star
48

aave-liquidation-model

Jupyter Notebook
4
star
49

offline-slashing-risk

Offline $ Slashing Risk scenarios modeling
Python
4
star
50

lido-node-operator-key-checker-cli

Lido CLI tool for node operator key validation
Python
4
star
51

csm-prover-tool

Tool for proving info from CL through EL for CSM validators
TypeScript
4
star
52

airdrop-data

Data files for manual airdrop claim
3
star
53

lido-assistant

Python
3
star
54

rewards-managers

Solidity
3
star
55

storage-layout-action

Shell
3
star
56

terra-monitors

Go
3
star
57

balancer-rewards-manager

Python
3
star
58

node-operators-setup

Jinja
3
star
59

protocol-mock

Lido protocol mock
Solidity
3
star
60

ledgerhq-frame-connector

TypeScript
3
star
61

stonks

Lido treasury asset swapper
TypeScript
3
star
62

easy-track-ui

A UI app for interacting with Lido's Easy Track governance feature.
TypeScript
2
star
63

csm-rewards

CSM rewards
Python
2
star
64

mev-boost-relay-allowed-list

Python
2
star
65

evm-script-decoder

TypeScript
2
star
66

aave-asteth-deployment

Solidity
2
star
67

modelling-entry-queue-post-merge

Jupyter Notebook
2
star
68

periphery

TypeScript
2
star
69

trp-ui

TypeScript
2
star
70

dispatch-workflow

Custom GitHub action to trigger action execution in the external repo
Python
2
star
71

staking-rewards-sushi

Python
2
star
72

solana-docs

Docs for Solana
JavaScript
2
star
73

jumpgates

Jumpgates are a class of contracts that streamline cross-chain token transfers under the Lido DAO.
Python
1
star
74

python-base-template

This is pure python 3 template for new projects on github
Python
1
star
75

cosmos-sdk

Go
1
star
76

lido-terra-integration-tests

TypeScript
1
star
77

nor-reward-distribution-bot

Python
1
star
78

withdrawals-api

Withdrawals API service
TypeScript
1
star
79

csm-ea-checker

TypeScript
1
star
80

lido-otc-seller

Python
1
star
81

insurance-purchaser

Python
1
star
82

lido-reward-allocation-bot

TypeScript
1
star
83

insurance-fund

Solidity
1
star
84

innernet-playbooks

Innernet management playbooks
Jinja
1
star
85

maker-integration

Integrating stETH as a Maker collateral
Solidity
1
star
86

dc4bc_conference_call_4lido

1
star
87

lido-content

Content for lido-landing, widgets and other apps
JavaScript
1
star
88

avalanche-contracts

Solidity
1
star
89

lido-cms

TypeScript
1
star
90

lido-cosmos-hub-docs

JavaScript
1
star
91

terra-docs

JavaScript
1
star
92

terra-repositories

Go
1
star
93

github-pages-action

Deploy static files to branch and serve it via GitHub-pages
1
star
94

governance-data-bot

Collect governance info and put it to notion tables
TypeScript
1
star
95

linters

1
star
96

lido-cosmos-hub-contracts

Cosmos Hub Liquid Staking Contracts
Rust
1
star
97

maker-risks-bot

Prometheus exporter of positions health on Maker protocol
Python
1
star
98

dao-voting-ui

TypeScript
1
star
99

.github

1
star
100

aave-collaterals-bot

Prometheus exporter which parses borrowers data from AAVE protocol and calculate risks distribution based on collateral to loan ratio.
Python
1
star