npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@pollum-io/pegasys-stake

v0.0.3

Published

Pegasys Stake

Downloads

13

Readme

Staked Token (Aave Safety Module) v1.5

Repository contains a new revision of StakedTokenV3 and StakedAaveV3, equivalent to what is know high-level as Safety Module v1.5.

It is important to highlight that stkAAVE and stkABPT are slightly different, that's the reason why the code intended to use for each one is:

Due to complex inheritance chains, a aggregated interface for each Contract is provided as:

Slashing

Thew new StakedTokenV3 includes en enhanced mechanism to facilitate slashing of the underlying by tracking the exchangeRate between $stkToken \leftrightarrow Token$.

The slashing itself must be performed by a slashingAdmin which initially will be the governance short executor. The slashing will result in transferring part of the underlying to a specified address and starting the slashing process by setting a inPostSlashingPeriod flag.

While being in post slashing period, no other slashing can be performed. While accounts can exit the pool no-one can enter the pool in that period.

The community can then use (parts of) the funds for recovery. Once the recovery is finished potentially remaining funds should be returned to the pool and mutualized by the remaining stakers.

Once the slashing is officially settled, accounts can reenter the pool and a new slashing can occur.

Cooldown & Redeeming

The new StakedTokenV3 adjusts the cooldown to no longer cooldown for an arbitrary balance, but instead to cooldown for the minimum balanceOf(account) between cooldown start t0 and withdrawal window end t1.

In practice this means, the cooldown will write the redeem budget to storage once cooldown is triggered and discount from it when there is a redeem action, or a transfer out performed.

While in the current system one can trigger a cooldown for e.g. 100 -> receive 100 and then redeem(200)(after a prolonged cooldown), with the newly introduced mechanic you will only ever be able to redeem(100). If at any point during the cooldown period the balanceOf(account) decreases below the redeem budget registered on cooldown the budget will be decreased to the new balanceOf(account).

GHO

The StakedAaveV3 extends on top of StakedTokenV3 , by adding hooks for managing the GHO discounts via a "transfer hook".

An export of storage layout changes can be found here

Security

External

Procedures followed

  • A more formal list of properties of the system can be found HERE
  • An export of storage layout changes and code diff from the previous implementation can be found HERE
  • The test suite of the implementation can be found HERE

Development

Install

cp .env.example .env
forge install

Test

forge test

Diff

Generate a code & storage layout diff.

make diff-all