Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
cdb39a9
Added hoodi addresses where applicable
eladiosch Jan 15, 2026
db59be8
Updated hoodi addresses and minor fixes
eladiosch Jan 16, 2026
8417f78
Updated addresses for hoodi
eladiosch Jan 16, 2026
73d9f79
Added hoodi addresses to DeployerHelper
eladiosch Jan 16, 2026
a72ba47
Added missing address
eladiosch Jan 16, 2026
14f6459
Updated addresses and names (WIP)
eladiosch Jan 19, 2026
04f6cfb
forge fmt
eladiosch Jan 20, 2026
f44121f
Updated names and addresses
eladiosch Jan 21, 2026
2ec2cd9
Fixed wrong function name and added eigen addresses
eladiosch Jan 21, 2026
46c3781
forge fmt
eladiosch Jan 21, 2026
38acf33
Remove stale interfaces submodule and add automata-dcap-attestation
eladiosch Jan 28, 2026
466fada
Installed dependencies and implemented changes in GuardianModule
eladiosch Jan 28, 2026
d236d0f
Removed references to enclave and rave
eladiosch Jan 29, 2026
f422a1d
fmt
eladiosch Jan 29, 2026
528f93f
Adapt scripts and tests (WIP)
eladiosch Jan 30, 2026
e158a72
Adapted tests (WIP)
eladiosch Jan 30, 2026
e406700
Adapted unit tests and improved verifier mock
eladiosch Feb 2, 2026
3e36486
fmt
eladiosch Feb 2, 2026
dd987a8
Added tests and added missing checks to GuardianModule
eladiosch Feb 2, 2026
3523a0d
Applied changes to GuardianModule (WIP)
eladiosch Feb 9, 2026
50297ba
Adapted code, scripts, and partially tests (WIP)
eladiosch Feb 13, 2026
ebd098e
Adapted tests to new signatures, worked of mock (WIP)
eladiosch Feb 13, 2026
f869e7d
fmt
eladiosch Feb 13, 2026
02a42fb
Fixed tests
eladiosch Feb 16, 2026
b6496f1
Added extra tests
eladiosch Feb 16, 2026
2bcb07d
forge fmt
eladiosch Feb 16, 2026
96df12b
Addressed PR comments
eladiosch Feb 17, 2026
f8d9c75
Adapted addresses prior to hoodi deployment. Changed 0xddd => 0xeee
eladiosch Feb 18, 2026
241a5d7
Updated hoodi deployment addresses
eladiosch Feb 18, 2026
7d8679d
forge fmt
eladiosch Feb 19, 2026
300d388
Fixed _deployRevenueDepositor
eladiosch Feb 19, 2026
422c290
Minor updated to deployment scripts
eladiosch Feb 23, 2026
c61024a
Adapting changes to new tdx [WIP]
eladiosch Mar 2, 2026
271ed69
Fixed failing tests
eladiosch Mar 2, 2026
6217855
Implemented tests in GuardianModule
eladiosch Mar 3, 2026
30ec6af
Updated addresses and selected submodule branch
eladiosch Mar 5, 2026
656d14c
Updated github workflows
eladiosch Mar 5, 2026
2a8d828
Updated fork block and skipped lib from codespell
eladiosch Mar 5, 2026
1a50dbb
Uppdated hoodi fork block number
eladiosch Mar 5, 2026
3040b43
Fixed tests (WIP)
eladiosch Mar 5, 2026
fa4f8dc
Removed rave from ValidatorKeyData and only using 2 ETH bond now
eladiosch Mar 10, 2026
118b57e
forge fmt
eladiosch Mar 10, 2026
3622dda
Fixed remaining tests and scripts
eladiosch Mar 13, 2026
1ca5c18
Increased coverage
eladiosch Mar 16, 2026
d631048
forge fmt
eladiosch Mar 16, 2026
7982525
Merge branch 'master' into feat/tdx
eladiosch Mar 20, 2026
4e122a9
Updated _consoleLogOrUpgradeUUPS for hoodi
eladiosch Mar 26, 2026
ebd0857
Modified l2 remappings
eladiosch Mar 27, 2026
e897966
Added recursive submodules to l2-contracts
eladiosch Mar 27, 2026
6b721b6
Updated remappings
eladiosch Mar 27, 2026
de90dc4
Added ValidatorTicketsDeposited event to the registerValidatorKey flow
eladiosch Apr 2, 2026
1942049
Adapted some scripts to Hoodi
eladiosch Apr 3, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .github/workflows/l2-contracts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ jobs:
uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: recursive

- name: Codespell
uses: codespell-project/actions-codespell@v2.0
Expand All @@ -34,6 +35,8 @@ jobs:
uses: styfle/cancel-workflow-action@0.12.1

- uses: actions/checkout@v4
with:
submodules: recursive
- uses: actions/setup-node@v4
with:
cache: 'yarn'
Expand Down Expand Up @@ -79,6 +82,8 @@ jobs:
uses: styfle/cancel-workflow-action@0.12.1

- uses: actions/checkout@v4
with:
submodules: recursive
- uses: actions/setup-node@v4
with:
cache: 'yarn'
Expand Down
50 changes: 28 additions & 22 deletions .github/workflows/mainnet-contracts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,33 +11,36 @@ on:

jobs:
codespell:
name: Check for spelling errors
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Codespell
uses: codespell-project/actions-codespell@v2.0
with:
path: mainnet-contracts
check_hidden: true
check_filenames: true
skip: "pnpm-lock.yaml"
name: Check for spelling errors
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: recursive

- name: Codespell
uses: codespell-project/actions-codespell@v2.0
with:
path: mainnet-contracts
check_hidden: true
check_filenames: true
skip: "pnpm-lock.yaml,*/lib/*"

tests:
runs-on: ubuntu-latest
steps:
- name: Cancel previous runs
uses: styfle/cancel-workflow-action@0.12.1

- uses: actions/checkout@v4
with:
submodules: recursive
- uses: actions/setup-node@v4
with:
cache: 'yarn'
cache: "yarn"
cache-dependency-path: yarn.lock
node-version: 20

Expand Down Expand Up @@ -69,7 +72,7 @@ jobs:
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: "forge fmt"
file_pattern: '*.sol'
file_pattern: "*.sol"

- name: List selectors
working-directory: mainnet-contracts
Expand All @@ -81,11 +84,13 @@ jobs:
steps:
- name: Cancel previous runs
uses: styfle/cancel-workflow-action@0.12.1

- uses: actions/checkout@v4
with:
submodules: recursive
- uses: actions/setup-node@v4
with:
cache: 'yarn'
cache: "yarn"
cache-dependency-path: yarn.lock
node-version: 20

Expand All @@ -102,10 +107,11 @@ jobs:

- name: "Generate the coverage report"
working-directory: mainnet-contracts
run: 'forge coverage --no-match-coverage "(script|test|mock|node_modules|interface|integrations|echidna|L1RewardManagerUnsafe)" --no-match-contract "CarrotVestingTest" --report lcov -vvv --ir-minimum'
run: 'forge coverage --no-match-coverage "(script|test|mock|node_modules|interface|integrations|echidna|L1RewardManagerUnsafe)" --no-match-contract "CarrotVestingTest" --report lcov -vvv --ir-minimum'
env:
ETH_RPC_URL: ${{ secrets.ETH_RPC_URL }}
HOLESKY_RPC_URL: ${{ secrets.HOLESKY_RPC_URL }}
HOODI_RPC_URL: ${{ secrets.HOODI_RPC_URL }}

- name: "Upload coverage report to Codecov"
uses: "codecov/codecov-action@v4"
Expand Down
4 changes: 4 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,7 @@
[submodule "partners/layerzero/lib/forge-std"]
path = partners/layerzero/lib/forge-std
url = https://github.com/foundry-rs/forge-std
[submodule "mainnet-contracts/lib/automata-tee-workload-measurement"]
path = mainnet-contracts/lib/automata-tee-workload-measurement
url = https://github.com/automata-network/automata-tee-workload-measurement
branch = develop
1 change: 1 addition & 0 deletions l2-contracts/foundry.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ bracket_spacing = true
[rpc_endpoints]
mainnet="${ETH_RPC_URL}"
holesky="${HOLESKY_RPC_URL}"
hoodi="${HOODI_RPC_URL}"

[invariant]
fail_on_revert=false
Expand Down
3 changes: 2 additions & 1 deletion l2-contracts/remappings.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,5 @@ l2-contracts/=node_modules/l2-contracts/
@layerzerolabs/lz-evm-messagelib-v2/=node_modules/@layerzerolabs/lz-evm-messagelib-v2/
@layerzerolabs/lz-evm-v1-0.7/=node_modules/@layerzerolabs/lz-evm-v1-0.7/
solidity-bytes-utils/=node_modules/solidity-bytes-utils/
partners-layerzero/=../partners/layerzero/
partners-layerzero/=../partners/layerzero/
@automata-network/automata-tee-workload-measurement=../mainnet-contracts/lib/automata-tee-workload-measurement/src/
23 changes: 13 additions & 10 deletions mainnet-contracts/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# <h1 align="center"> Puffer Vault </h1>

[![Website][Website-badge]][Website] [![Docs][docs-badge]][docs]
[![Discord][discord-badge]][discord] [![X][X-badge]][X] [![Foundry][foundry-badge]][foundry]
[![Discord][discord-badge]][discord] [![X][X-badge]][X] [![Foundry][foundry-badge]][foundry]

[Website-badge]: https://img.shields.io/badge/WEBSITE-8A2BE2
[Website]: https://www.puffer.fi
Expand All @@ -15,8 +16,8 @@
[foundry]: https://getfoundry.sh
[foundry-badge]: https://img.shields.io/badge/Built%20with-Foundry-FFDB1C.svg

## Overview

## Overview
Stakers can deposit ETH and mint the [pufETH nLRT](https://docs.puffer.fi/protocol/nlrt#pufeth) via the PufferVault contract, which serves as a redeemable receipt for their restaked ETH. If sufficient exit liquidity is available, stakers can reclaim their ETH from the PufferVault. Over time, the redeemable amount is expected to increase from [validator tickets](https://docs.puffer.fi/protocol/validator-tickets) and restaking rewards.

In [contrast with conventional liquid staking tokens (LSTs)](https://docs.puffer.fi/protocol/nlrt#what-is-an-lst), pufETH can provide strictly more rewards for its holders. Not only does pufETH encompass PoS rewards and restaking rewards, but its value can accelerate quickly due to validator ticket sales. Furthermore, the PoS rewards for stakers are decoupled from the protocol validators' performance.
Expand All @@ -27,17 +28,18 @@ pufETH is implemented as a reward-bearing ERC20 token, following [ERC4626](https

Read more about pufETH and native Liquid Restaking Tokens (nLRTs) in the [Puffer Docs](https://docs.puffer.fi/protocol/nlrt#pufeth) website.


## How pufETH Works

Stakers deposit ETH to the PufferVault contract to mint the pufETH nLRT. At the protocol's inception, pufETH's conversion rate is one-to-one, but is expected to increase over time. Assuming the protocol performs well, i.e., accrues more rewards than penalties, the amount of ETH reedamable for pufETH will increase.

### Calculating the Conversion Rate

The conversion rate can be calculated simply as:

```
conversion rate = (deposits + rewards - penalties) / pufETH supply
```

Where:

- deposits and pufETH supply increase proportionally as stakers deposit ETH to mint pufETH, leaving the conversion rate unaffected.
Expand All @@ -46,18 +48,17 @@ Where:

- penalties accrue if validators are slashed on PoS for more than their 1 ETH collateral, which is [disincentivized behavior](https://docs.puffer.fi/protocol/validator-tickets#why--noop-incentives) and mitigated through [anti-slashing technology](https://docs.puffer.fi/technology/secure-signer). Penalties can also accrue if the restaking operator is slashed running AVSs, which is why Puffer is [restricting restaking operator participation](https://docs.puffer.fi/protocol/puffer-modules#restricting-reops) during its nascent stages.



## Contract addresses

- PufferVault (pufETH token): `0xD9A442856C234a39a81a089C06451EBAa4306a72`
- PufferDepositor: `0x4aA799C5dfc01ee7d790e3bf1a7C2257CE1DcefF`
- AccessManager: `0x8c1686069474410E6243425f4a10177a94EBEE11`
- Timelock: `0x3C28B7c7Ba1A1f55c9Ce66b263B33B204f2126eA`

For more detailed information on the contract deployments (Mainnet, Holesky, etc) and the ABIs, please check the [Deployments and ACL](https://github.com/PufferFinance/Deployments-and-ACL/blob/main/docs/deployments/) repository.

For more detailed information on the contract deployments (Mainnet, Holesky, Hoodi, etc) and the ABIs, please check the [Deployments and ACL](https://github.com/PufferFinance/Deployments-and-ACL/blob/main/docs/deployments/) repository.

## Audits

- BlockSec: [v1](./audits/BlockSec-pufETH-v1.pdf), [v2](https://github.com/PufferFinance/PufferPool/blob/polish-docs/docs/audits/Blocksec_audit_April2024.pdf)
- SlowMist: [v1](./audits/SlowMist-pufETH-v1.pdf), v2
- Quantstamp: [v1](./audits/Quantstamp-pufETH-v1.pdf)
Expand All @@ -66,21 +67,23 @@ For more detailed information on the contract deployments (Mainnet, Holesky, etc
- Nethermind: [v2](https://github.com/NethermindEth/PublicAuditReports/blob/main/NM0202-FINAL_PUFFER.pdf)
- Creed: [v2](https://github.com/PufferFinance/PufferPool/blob/polish-docs/docs/audits/Creed_Puffer_Finance_Audit_April2024.pdf)


# Tests

<strong>Make sure you have access to a valid archive node RPC for ETH Mainnet (e.g. Infura)</strong>

Installing dependencies and running tests can be executed running:

```
ETH_RPC_URL=https://mainnet.infura.io/v3/YOUR_KEY forge test -vvvv
```

# Echidna

To install Echidna, see the instructions [here](https://github.com/crytic/echidna). To use Echidna, run the following command from the project's root:

```bash
forge install crytic/properties --no-commit
echidna . --contract EchidnaPufferVaultV2 --config src/echidna/config.yaml
```
For more information see the properties [README](https://github.com/crytic/properties/tree/main).

For more information see the properties [README](https://github.com/crytic/properties/tree/main).
20 changes: 20 additions & 0 deletions mainnet-contracts/foundry.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"../partners/chainlink/lib/forge-std": {
"rev": "3b20d60d14b343ee4f908cb8079495c07f5e8981"
},
"lib/automata-dcap-attestation": {
"tag": {
"name": "v1.1.0",
"rev": "9c96312657f2a905003f6ebf565d5742422f24a2"
}
},
"lib/automata-tee-workload-measurement": {
"rev": "c3bcd68f4b887f86374cc47b31041bf2d667e7d3"
},
"lib/automata-tpm-attestation": {
"rev": "1a3ab2bc4886ac5313365f94e3d60dcf01fd9c41"
},
"partners/chainlink/lib/forge-std": {
"rev": "3b20d60d14b343ee4f908cb8079495c07f5e8981"
}
}
1 change: 1 addition & 0 deletions mainnet-contracts/foundry.toml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ bracket_spacing = true
[rpc_endpoints]
mainnet="${ETH_RPC_URL}"
holesky="${HOLESKY_RPC_URL}"
hoodi="${HOODI_RPC_URL}"
sepolia="${SEPOLIA_RPC_URL}"
opsepolia ="${OP_SEPOLIA_RPC_URL}"

Expand Down
1 change: 0 additions & 1 deletion mainnet-contracts/lib/interfaces
Submodule interfaces deleted from 2e0287
113 changes: 56 additions & 57 deletions mainnet-contracts/package.json
Original file line number Diff line number Diff line change
@@ -1,59 +1,58 @@
{
"name": "mainnet-contracts",
"description": "",
"version": "1.0.0",
"author": {
"name": "Puffer Finance",
"url": "https://puffer.fi"
},
"dependencies": {
"@layerzerolabs/lz-evm-messagelib-v2": "^3.0.75",
"@layerzerolabs/lz-evm-protocol-v2": "^3.0.75",
"@layerzerolabs/lz-evm-v1-0.7": "^3.0.75",
"@layerzerolabs/oapp-evm": "^0.3.2",
"@layerzerolabs/oft-evm": "^3.1.3",
"@openzeppelin/contracts": "5.0.1",
"@openzeppelin/contracts-upgradeable": "5.0.1",
"l2-contracts": "*",
"murky": "https://github.com/dmfxyz/murky.git",
"rave": "https://github.com/PufferFinance/rave.git#57ce268",
"solidity-bytes-utils": "^0.8.4",
"solidity-stringutils": "https://github.com/Arachnid/solidity-stringutils"
},
"devDependencies": {
"@crytic/properties": "https://github.com/crytic/properties#f1ff61b",
"@layerzerolabs/test-devtools-evm-foundry": "^6.0.3",
"@prb/test": "0.6.4",
"erc4626-tests": "https://github.com/a16z/erc4626-tests#232ff9b",
"forge-std": "github:foundry-rs/forge-std#v1.9.6",
"partners-layerzero": "*",
"solarray": "github:evmcheb/solarray#a547630",
"solhint": "^5.0.3"
},
"homepage": "https://puffer.fi",
"keywords": [
"blockchain",
"foundry",
"smart-contracts",
"solidity",
"web3",
"ethereum",
"puffer",
"puffer-finance",
"solidity",
"LRT",
"eigenlayer",
"restaking",
"liquid-staking"
],
"scripts": {
"fmt": "forge fmt",
"build": "forge build",
"gas": "forge test --gas-report --mp \"./test/unit/**/*.sol\"",
"lint": "yarn run lint:sol",
"test:unit": "forge test --mp \"./test/unit/**/*.sol\" -vvv",
"slither": "slither .",
"coverage": "forge coverage --force --no-match-coverage \"(script|test|mock|interface|node_modules|echidna)\" --no-match-contract \"PufferModuleManagerHoleskyTestnetFFI\"",
"coverage-lcov": "forge coverage --force --no-match-coverage \"(script|test|mock|interface|node_modules|echidna)\" --no-match-contract \"PufferModuleManagerHoleskyTestnetFFI\" --report lcov"
}
"name": "mainnet-contracts",
"description": "",
"version": "1.0.0",
"author": {
"name": "Puffer Finance",
"url": "https://puffer.fi"
},
"dependencies": {
"@layerzerolabs/lz-evm-messagelib-v2": "^3.0.75",
"@layerzerolabs/lz-evm-protocol-v2": "^3.0.75",
"@layerzerolabs/lz-evm-v1-0.7": "^3.0.75",
"@layerzerolabs/oapp-evm": "^0.3.2",
"@layerzerolabs/oft-evm": "^3.1.3",
"@openzeppelin/contracts": "5.0.1",
"@openzeppelin/contracts-upgradeable": "5.0.1",
"l2-contracts": "*",
"murky": "https://github.com/dmfxyz/murky.git",
"solidity-bytes-utils": "^0.8.4",
"solidity-stringutils": "https://github.com/Arachnid/solidity-stringutils"
},
"devDependencies": {
"@crytic/properties": "https://github.com/crytic/properties#f1ff61b",
"@layerzerolabs/test-devtools-evm-foundry": "^6.0.3",
"@prb/test": "0.6.4",
"erc4626-tests": "https://github.com/a16z/erc4626-tests#232ff9b",
"forge-std": "github:foundry-rs/forge-std#v1.9.6",
"partners-layerzero": "*",
"solarray": "github:evmcheb/solarray#a547630",
"solhint": "^5.0.3"
},
"homepage": "https://puffer.fi",
"keywords": [
"blockchain",
"foundry",
"smart-contracts",
"solidity",
"web3",
"ethereum",
"puffer",
"puffer-finance",
"solidity",
"LRT",
"eigenlayer",
"restaking",
"liquid-staking"
],
"scripts": {
"fmt": "forge fmt",
"build": "forge build",
"gas": "forge test --gas-report --mp \"./test/unit/**/*.sol\"",
"lint": "yarn run lint:sol",
"test:unit": "forge test --mp \"./test/unit/**/*.sol\" -vvv",
"slither": "slither .",
"coverage": "forge coverage --ir-minimum --force --no-match-coverage \"(script|test|mock|interface|node_modules|echidna)\" --no-match-contract \"CarrotVestingTest\"",
"coverage-lcov": "forge coverage --ir-minimum --force --no-match-coverage \"(script|test|mock|interface|node_modules|echidna)\" --no-match-contract \"CarrotVestingTest\" --report lcov"
}
}
Loading
Loading