Skip to content

A base vault that accepts deposits and withdrawals of an underlying asset, mints shares 1:1 with assets, and has no yield.

License

Notifications You must be signed in to change notification settings

GenerationSoftware/pt-v5-staking-vault

Repository files navigation

PoolTogether Staking Vault

Overview

The staking vault is an ERC4626 vault that takes deposits of an underlying asset and mints shares at a 1:1 ratio. The vault has no yield source and will always redeem shares at a 1:1 ratio with assets.

Deployments

Network Contract Deployment Address
Base PrizeStakingVaultFactory 0x48492f83D9e1d848d33a461D49a2071A6FdcC037
Arbitrum PrizeStakingVaultFactory 0x9468ead4C425DeedeD5c65723fDC6fce6D3F3F20
Optimism PrizeStakingVaultFactory 0x7c4626ecC134AE1Dbd46c82Bd94Ae2469302acF3
Scroll PrizeStakingVaultFactory 0xe85507D9F27b97f649Cd738DBc25D7Ea287E5c27
Gnosis PrizeStakingVaultFactory 0x162cC33B426471c9df0D34A0e3e0d39216e91E65

Development

Installation

You may have to install the following tools to use this repository:

  • Foundry to compile and test contracts
  • direnv to handle environment variables
  • lcov to generate the code coverage report

Install dependencies:

npm i

Compile

Run the following command to compile the contracts:

npm run compile

Coverage

Forge is used for coverage, run it with:

npm run coverage

You can then consult the report by opening coverage/index.html:

open coverage/index.html

Code quality

Husky is used to run tests when committing.

Prettier is used to format TypeScript and Solidity code. Use it by running:

npm run format

Solhint is used to lint Solidity files. Run it with:

npm run hint

CI

A default Github Actions workflow is setup to execute on push and pull request.

It will build the contracts and run the test coverage.

You can modify it here: .github/workflows/coverage.yml

About

A base vault that accepts deposits and withdrawals of an underlying asset, mints shares 1:1 with assets, and has no yield.

Resources

License

Stars

Watchers

Forks

Packages

No packages published