@gammaswap/v1-implementations
v1.2.2
Published
Pool and strategies implementation contracts for GammaSwap V1 protocol
Downloads
15
Readme
Description
This is the repository for the implementation smart contracts of the GammaSwap V1 protocol.
This repository contains concrete implementations of GammaPools and their strategies using the abstract contracts from v1-core
The implementation contracts are used to create blueprints of GammaPools for different protocols (e.g. UniswapV2, Balancer, etc.)
The current implementation contracts in existence are for UniswapV2 and forks of UniswapV2.
The CPMMMath contract can be used as a library to calculate quantities to trade in GammaPool to rebalance a position's collateral for UniswapV2 and its forks
Steps to Run GammaSwap Tests Locally
All tests are found in v1-liquidator repository. If you add new tests here, to run them do the following
- Run
yarn
to install GammaSwap dependencies - Run
yarn test
to run hardhat tests - Run
yarn fuzz
to run foundry tests (Need foundry binaries installed locally)
To deploy contracts to local live network use v1-deployment repository
Note
To install foundry locally go to getfoundry.sh
Solidity Versions
Code is tested with solidity version 0.8.19.
Concrete and abstract contracts support only solidity version 0.8.19.
Interfaces support solidity version 0.8.0 and up.
Publishing NPM Packages
To publish an npm package follow the following steps
- Bump the package.json version to the next level (either major, minor, or patch version)
- commit to the main branch adding 'publish package' in the comment section of the commit (e.g. when merging a pull request)
Rules for updating package.json version
- If change does not break interface, then it's a patch version update
- If change breaks interface, then it's a minor version update
- If change is for a new product release to public, it's a major version update