Coder Social home page Coder Social logo

mohsen-t / lido-dao Goto Github PK

View Code? Open in Web Editor NEW

This project forked from lidofinance/lido-dao

0.0 0.0 0.0 83.56 MB

Lido DAO smart contracts

Home Page: https://lido.fi

License: GNU General Public License v3.0

Shell 1.12% JavaScript 70.26% HTML 0.04% Dockerfile 0.05% Solidity 28.54%

lido-dao's Introduction

Lido on Ethereum Logo

GitHub license NodeJS Solidity Hardhat Aragon OS GitHub tests GitHub code analysis GitHub Bytecode

The Lido on 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, and 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.

NB: It's advised to read Documentation before getting started with this repo.

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, performing upgrades, etc.) through the voting power of governance token (LDO) holders.

The Lido DAO charges service fees that support infrastructure maintenance, research, development, protocol upgrades, and potential loss coverage.

The Lido DAO was built using the Aragon DAO framework.

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
  • find
  • sed
  • jq
  • curl
  • cut
  • node.js v18
  • (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

To deploy the smart contracts and run the protocol instance either locally or on a new testnet, please proceed to the following scratch deploy 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/.

lido-dao's People

Contributors

thedzhon avatar skozin avatar krogla avatar arwer13 avatar folkyatina avatar psirex avatar loga4 avatar ujenjt avatar mymphe avatar bulbozaur avatar jeday avatar manneredboor avatar kadmil avatar dechjo avatar ongrid avatar diraiks avatar dgusakov avatar madlabman avatar rkolpakov avatar grstepanov avatar dependabot[bot] avatar avsetsin avatar claudijd avatar kolyasapphire avatar onionglass avatar klyaus avatar eenae avatar vshvsh avatar sanbir avatar eridianalpha avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.