PufferFinance / puffer-contracts

Home Page:https://www.puffer.fi/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Puffer Contracts

Website Docs Discord X Foundry

Overview

Stakers can deposit ETH and mint the pufETH nLRT 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 and restaking rewards.

In contrast with conventional liquid staking tokens (LSTs), 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.

pufETH

pufETH is implemented as a reward-bearing ERC20 token, following ERC4626 standard and inspired by Compound's cToken design for optimal DeFi compatibility. It represents a novel approach in the liquid staking domain, introducing several features that enhance stakers' rewards and interaction with DeFi protocols.

Read more about pufETH and native Liquid Restaking Tokens (nLRTs) in the Puffer Docs 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.

  • rewards increase as restaking operators run AVSs and whenever validator tickets are minted.

  • penalties accrue if validators are slashed on PoS for more than their 2 ETH collateral, which is disincentivized behavior and mitigated through anti-slashing technology. Penalties can also accrue if the restaking operator is slashed running AVSs, which is why Puffer is restricting restaking operator participation during its nascent stages.

Contract addresses

  • PufferVault (pufETH token): 0xD9A442856C234a39a81a089C06451EBAa4306a72

For more detailed information on the contract deployments (Mainnet, Holesky, etc) and the ABIs, please check the Deployments and ACL repository.

Audits

How to run unit tests

  1. Clone this repository
  2. yarn install
  3. cd mainnet-contracts/ && yarn test:unit or cd l2-contracts/ yarn test:unit

About

https://www.puffer.fi/


Languages

Language:Solidity 99.7%Language:JavaScript 0.2%Language:Shell 0.1%