Skip to content

Tenderize/tenderswap

Repository files navigation

TenderSwap - Unified Liquidity for Staked Assets 🌊 Open in Gitpod Github Actions Foundry License: MIT

Overview

For an overview of the mechanics and implemented mathematics in TenderSwap, check following sources:

Usage

This is a list of the most frequently needed commands.

Build

Build the contracts:

forge build

Clean

Delete the build artifacts and cache directories:

forge clean

Compile

Compile the contracts:

forge build

Coverage

Get a test coverage report:

forge coverage

Deploy

Deployments and upgrades can through the SwapFactory contract for indexing purposes on the Tenderize Subgraph.

TenderSwap can also be deployed standlone following the same pattern as the SwapFactory contract.

Factory::deploy requires an implementation address. Each pool will have its own implementation contract where constants or immutables can be specified for each pool. While this adds operational overhead and complexity for potential upgrades, it significantly improves the gas cost of functions that use these parameters.

Format

Format the contracts:

forge fmt

or

yarn lint:sol

Format other files:

yarn prettier:write

Gas Usage

Get a gas report:

forge test --gas-report

Lint

Lint the contracts:

pnpm lint

Test

Run the tests:

forge test

Notes

  1. Foundry uses git submodules to manage dependencies. For detailed instructions on working with dependencies, please refer to the guide in the book
  2. You don't have to create a .env file, but filling in the environment variables may be useful when debugging and testing against a fork.

Related Efforts

License

This project is licensed under MIT.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published