Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/curvefi/curve-burners


https://github.com/curvefi/curve-burners

Last synced: about 2 months ago
JSON representation

Awesome Lists containing this project

README

        

# Curve DAO fees burning process
DAO fees are accumulated as coins in pools, controllers and other entities.
Every week comes a process of burning these coins scattered around different networks and contracts into crvUSD,
that is distributed to veCRV holders.

## Architecture
Contracts are designed so earned fees can be moved to [`FeeCollector`](contracts/FeeCollector.vy)
via `withdraw_admin_fees()` or similar calls.
This is grouped into phase `Collect`.
Keepers get % from each earned coin according to Dutch auction.

Next comes `Exchange` phase when all collected coins are converted into crvUSD.
This may be done using different burners like [`CowSwapBurner`](contracts/burners/CowSwapBurner.vy)
which delegates price discovery and settlement to CowSwap auction.

Final phase is `Forward` which is applied to resulting crvUSD.
Mainly it bridges to Ethereum or FeeDistributor,
but also handles hooks for xDAO using [`Hooker`](contracts/hooks/Hooker.vy) paying some fee to keeper.

## Tests
Install:
```bash
python3 -m virtualenv venv/ && source venv/bin/activate
pip install -r requirements.in
```

Run:
```bash
pytest tests
```

## CowSwap
In order to swap accumulated coins into crvUSD, one should post orders to CowSwap backend.
This can be done by running [WatchTower](https://github.com/cowprotocol/watch-tower).
Instruction for setup can be found [here](fee_keeper/WatchTower.md).