Portal-Eth

所属分类:其他
开发工具:Solidity
文件大小:0KB
下载次数:0
上传日期:2024-03-07 15:53:07
上 传 者sh-1993
说明:  Geode Portal是第一个同类的去中心化路由器,它为任何服务提供商构建了一个不可信的以太坊赌注生态系统。
(Geode Portal is a first of its kind Decentralized Router that builds a trustless Ethereum staking Ecosystem for any service provider.)

文件列表:
audits/
contracts/
deploy/
deployments/holesky/
docs/
releases/
scripts/
test/
utils/
.env.example
.eslintignore
.eslintrc.js
.npmignore
.prettierignore
.prettierrc
.solcover.js
.solhint.json
.solhintignore
LICENSE
hardhat.config.js
package-lock.json
package.json

![](https://github.com/Geodefi/Portal-Eth/blob/master/docs/images/CoverImage.jpg) # The Staking Library, on Ethereum The Staking Library is a first of its kind on-chain library that allows the creation of Staking Pool "instances", providing customizable functionality for all staking related needs on the Execution Layer. The usage of `library` should not be confused with the reserved solidity key `library`. Instead, it refers to the `library` defined within the scope of programming languages: A collection of prewritten code that can be used to optimize tasks. This collection of code is usually targeted for specific common problems. This is similar to the Portal's ability of providing multiple functionalities with customizability, and maintaining a set of smart contracts that can be deployed, upgraded and utilized by various types of users, permissionlessly. In-depth understanding of EVM suggests that Ethereum is just a distributed computer. By that logic, smart contracts are no different than standard packages a python developer utilizes on their script. However, the approach to smart contract development focusing on protocols is so far user-centric. In past, developers discovered tools to distribute packages and maintain them, like git, making common functionalities easily accesible. Can we also distribute packages directly within Ethereum without disrupting the trustlessness, the novel idea of smart contracts? To achieve this, Portal utilizes a version management pattern, LUP (Limited Upgradability Pattern), which is built on top of UUPS: - User can deploy an UUPS proxy using a Remote Contract. - Newly deployed contract delegates its functionality to the latest implementation contract. - Newly deployed contract is used and controlled by the user. - Remote Contract points to a referance of the latest version of the implementation contract. - Parent can release a new version. - Upgrading an instance is not mandatory. - Owner can upgrade the code of the contract by pulling the address of the new implementation contract from the Remote Contract. - However, Owner cannot change the code randomly. In conclusion, Portal aims to make all functionality related to staking available on demand, easily accessible. Thus, Geode aims to remove the need for centralized or decentralized intermediaries that are surfaced as an undesired outcome of the lack of functionality on the Execution Layer. > For more information on the functionality of this repository please see [our documentation](https://github.com/Geodefi/Portal-Eth/blob/master/https://docs.geode.fi). ## Contracts A better, cleaner and safer development environment with Modular Architecture. The Staking Library utilizes a Modular Architecture. Meaning all functionality is isolated within modules, to be used, inherited and combined by the packages. Modules also do not contain much functionality as they delegate to libraries. Making sure that shared logic among between package are compatible. Because, modules are abstract contracts that cannot be deployed and delegated, but libraries are. ![](https://github.com/Geodefi/Portal-Eth/blob/master/./docs/images/contracts.png) **There are currently only 3 packages**: Portal, Liquidity Pool and Withdrawal Contract. However, there can be more modules and packages implemented later. Additionally there are other contracts such as gETH, an ERC1155 contract, and its middlewares allowing every ID to have its own functionality. > For more information on the architecture of the smart contracts please see [this document](https://github.com/Geodefi/Portal-Eth/blob/master/./contracts/Readme.md). ## Development 1. Clone this repository: ```sh git clone https://github.com/Geodefi/Portal-Eth cd Portal-Eth ``` 2. Checkout to dev repository ```sh git checkout dev ``` 3. Create `.env` file, similar to [this](https://github.com/Geodefi/Portal-Eth/blob/master/.env.example) > If mainnet is not forked, some tests related to ETH2 deposit contract may fail. 4. Build the repository ```sh npm install ``` 5. Compile the contracts ```sh npx hardhat compile ``` > For faster compilation use a local compiler: > > 1. Right click on a smart contract > 2. Choose `Solidity: download compiler and set workspace local path` ### Testing All unit tests are implemented within the [test folder](https://github.com/Geodefi/Portal-Eth/blob/master/./test/). To run all tests: ```sh npx hardhat test ``` To run just one test: ```sh npx hardhat test path/to/test/file.test.js ``` To generate a coverage report: ```sh npx hardhat compile --force npx hardhat coverage ``` ### Deployments Deployments can be found [here](https://github.com/Geodefi/Portal-Eth/blob/master/./releases/5/). ## Contributing See our [contributing guide](https://github.com/Geodefi/Portal-Eth/blob/master/./docs/GUIDELINES/CONTRIBUTING.md). ## Auditing See our [ChangeLOG](https://github.com/Geodefi/Portal-Eth/blob/master/./audits/CHANGELOG.md). It is advised to audit these smart contracts with the order of: 1. [gETH](https://github.com/Geodefi/Portal-Eth/blob/master/./contracts/gETH.sol) 2. [Middlewares](https://github.com/Geodefi/Portal-Eth/blob/master/./contracts/middlewares/) 3. Modules 1. DataStore Module 1. [DataStoreModuleLib](https://github.com/Geodefi/Portal-Eth/blob/master/./contracts/modules/DataStoreModule/libs/DataStoreModuleLib.sol) 2. [DataStoreModule](https://github.com/Geodefi/Portal-Eth/blob/master/./contracts/modules/DataStoreModule/DataStoreModule.sol) 2. Geode Module 1. [GeodeModuleLib](https://github.com/Geodefi/Portal-Eth/blob/master/./contracts/modules/GeodeModule/libs/GeodeModuleLib.sol) 2. [GeodeModule](https://github.com/Geodefi/Portal-Eth/blob/master/./contracts/modules/GeodeModule/GeodeModule.sol) 3. Stake Module 1. [DepositContractLib](https://github.com/Geodefi/Portal-Eth/blob/master/./contracts/modules/StakeModule/libs/DepositContractLib.sol) 2. [StakeModuleLib](https://github.com/Geodefi/Portal-Eth/blob/master/./contracts/modules/StakeModule/libs/StakeModuleLib.sol) 3. [OracleExtensionLib](https://github.com/Geodefi/Portal-Eth/blob/master/./contracts/modules/StakeModule/libs/OracleExtensionLib.sol) 4. [StakeModule](https://github.com/Geodefi/Portal-Eth/blob/master/./contracts/modules/StakeModule/StakeModule.sol) 4. Liquidity Module 1. [LiquidityModuleLib](https://github.com/Geodefi/Portal-Eth/blob/master/./contracts/modules/LiquidityModule/libs/LiquidityModuleLib.sol) 2. [AmplificationLib](https://github.com/Geodefi/Portal-Eth/blob/master/./contracts/modules/LiquidityModule/libs/AmplificationLib.sol) 3. [LiquidityModule](https://github.com/Geodefi/Portal-Eth/blob/master/./contracts/modules/GeodeModule/GeodeModule.sol) 4. Packages 1. [Liquidity Pool Package](https://github.com/Geodefi/Portal-Eth/blob/master/./contracts/packages/LiquidityPool.sol) 2. [Withdrawal Contract Package](https://github.com/Geodefi/Portal-Eth/blob/master/./contracts/packages/WithdrawalContract.sol) 5. [Portal](https://github.com/Geodefi/Portal-Eth/blob/master/./contracts/Portal.sol) ## Licensing This section will be updated with a proper license.

近期下载者

相关文件


收藏者