Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/volumefi/curve-volumegauge
Volume Gauges for DeFi
https://github.com/volumefi/curve-volumegauge
Last synced: about 2 months ago
JSON representation
Volume Gauges for DeFi
- Host: GitHub
- URL: https://github.com/volumefi/curve-volumegauge
- Owner: VolumeFi
- License: apache-2.0
- Created: 2020-11-22T19:16:30.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2021-02-05T14:50:41.000Z (almost 4 years ago)
- Last Synced: 2024-04-16T01:42:23.243Z (9 months ago)
- Language: Python
- Size: 255 KB
- Stars: 5
- Watchers: 6
- Forks: 4
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# DeFi volumegauge
Volume Gauges for DeFi aim to solve the problem: How to incentivize marketing partners to drive more liquidity providers to their pools using the pool rewards without a centralized affiliate marketing budget?
VolumeGauges track affiliate performance and rewards them from the pool rewards.
VolumeGauges for Curve contracts allow the Curve ecosystem to make proposals that distribute rewards to the affiliate that drive exchange volume through the pool. The affiliate may in turn reward LPs with innovative incentive programs that go beyond trading fee rebates.
VolumeGauges use [Volume-weighted Exponential Moving Average](https://www.financialwisdomforum.org/gummy-stuff/EMA.htm)
## Testing and Development on testnet
### Dependencies
* [nodejs](https://nodejs.org/en/download/) - >=v8, tested with version v14.15.4
* [python3](https://www.python.org/downloads/release/python-368/) from version 3.6 to 3.8, python3-dev
* [brownie](https://github.com/iamdefinitelyahuman/brownie) - tested with version [1.12.0](https://github.com/eth-brownie/brownie/releases/tag/v1.12.0)The contracts are compiled using [Vyper](https://github.com/vyperlang/vyper), however, installation of the required Vyper versions is handled by Brownie.
### Setup
To get started, first create and initialize a Python [virtual environment](https://docs.python.org/3/library/venv.html). Next, clone the repo and install the developer dependencies:
```bash
git clone https://github.com/Promise-Protocol/volumegauge.git
cd volumegauge
pip install -r requirements.txt
```### Ganache-cli
Install Node.js(>=v8) and ganache-cli globally.
```bash
npm install -g ganache-cli
``````bash
ganache-cli --fork https://mainnet.infura.io/v3/$YOUR_INFURA_KEY -p 7545
```And wait until local RPC is ready.(a few seconds)
### Brownie network setting (only once in the beginning)
```bash
brownie networks add Development forkedmain host=http://127.0.0.1 accounts=10 evm_version=istanbul fork=mainnet port=7545 mnemonic=brownie cmd=ganache-cli timeout=300
```### Running the Tests
```bash
brownie test -s
```