makerdao / dockerized-auction-keeper

GNU Affero General Public License v3.0
21 stars 17 forks source link

dockerized-auction-keeper

dockerized-auction-keeper contains a preconfigured auction-keeper that follows a simple FMV discount pricing model. With docker as the only prerequisite, this instance is well-suited for first-time auction keeper operators.

Note: Docker image will be created based on current master branch when you first run the keeper. If you want to rebuild image with latest master make sure keepers are stopped then run ./cleanup.sh script

Install Prerequisite

Setup flip keepers

After following the setup procedure below, this keeper works out of the box under the following configuration:

Setup flap keeper

Setup flop keeper

Run

flip-eth-a keeper ./start-keeper.sh flip-eth-a | tee -a -i auction-keeper-flip-ETH-A.log

flip-eth-b keeper ./start-keeper.sh flip-eth-b | tee -a -i auction-keeper-flip-ETH-B.log

flip-bat-a keeper ./start-keeper.sh flip-bat-a | tee -a -i auction-keeper-flip-BAT-A.log

flip-usdc-a keeper ./start-keeper.sh flip-usdc-a | tee -a -i auction-keeper-flip-USDC-A.log

flip-usdc-b keeper ./start-keeper.sh flip-usdc-b | tee -a -i auction-keeper-flip-USDC-B.log

flip-wbtc-a keeper ./start-keeper.sh flip-wbtc-a | tee -a -i auction-keeper-flip-WBTC-A.log

flip-tusd-a keeper ./start-keeper.sh flip-tusd-a | tee -a -i auction-keeper-flip-TUSD-A.log

flip-knc-a keeper ./start-keeper.sh flip-knc-a | tee -a -i auction-keeper-flip-KNC-A.log

flip-zrx-a keeper ./start-keeper.sh flip-zrx-a | tee -a -i auction-keeper-flip-ZRX-A.log

flip-mana-a keeper ./start-keeper.sh flip-mana-a | tee -a -i auction-keeper-flip-MANA-A.log

flip-usdt-a keeper ./start-keeper.sh flip-usdt-a | tee -a -i auction-keeper-flip-USDT-A.log

flip-paxusd-a keeper ./start-keeper.sh flip-paxusd-a | tee -a -i auction-keeper-flip-PAXUSD-A.log

flip-comp-a keeper ./start-keeper.sh flip-comp-a | tee -a -i auction-keeper-flip-COMP-A.log

flip-link-a keeper ./start-keeper.sh flip-link-a | tee -a -i auction-keeper-flip-LINK-A.log

flip-lrc-a keeper ./start-keeper.sh flip-lrc-a | tee -a -i auction-keeper-flip-LRC-A.log

flip-bal-a keeper ./start-keeper.sh flip-bal-a | tee -a -i auction-keeper-flip-BAL-A.log

flip-yfi-a keeper ./start-keeper.sh flip-yfi-a | tee -a -i auction-keeper-flip-YFI-A.log

flip-gusd-a keeper ./start-keeper.sh flip-gusd-a | tee -a -i auction-keeper-flip-GUSD-A.log

flip-renbtc-a keeper ./start-keeper.sh flip-renbtc-a | tee -a -i auction-keeper-flip-RENBTC-A.log

flip-uni-a keeper ./start-keeper.sh flip-uni-a | tee -a -i auction-keeper-flip-UNI-A.log

flip-aave-a keeper ./start-keeper.sh flip-aave-a | tee -a -i auction-keeper-flip-AAVE-A.log

flip-univ2daieth-a keeper ./start-keeper.sh flip-univ2daieth-a | tee -a -i auction-keeper-flip-UNIV2DAIETH-A.log
NOTE: a local univ2daieth price feed that is used in keeper bids is also started by this command

flap keeper ./start-keeper.sh flap | tee -a -i auction-keeper-flap.log

flop keeper ./start-keeper.sh flop | tee -a -i auction-keeper-flop.log

Shutdown

This will gracefully stop keeper and will exit DAI / collateral from Vat contract to keeper operating address. The shutdown command should be issued from the same directory as the run command but in another console instance.

flip-eth-a keeper ./stop-keeper.sh flip-eth-a

flip-eth-b keeper ./stop-keeper.sh flip-eth-b

flip-bat-a keeper ./stop-keeper.sh flip-bat-a

flip-usdc-a keeper ./stop-keeper.sh flip-usdc-a

flip-usdc-a keeper ./stop-keeper.sh flip-usdc-b

flip-wbtc-a keeper ./stop-keeper.sh flip-wbtc-a

flip-tusd-a keeper ./stop-keeper.sh flip-tusd-a

flip-knc-a keeper ./stop-keeper.sh flip-knc-a

flip-zrx-a keeper ./stop-keeper.sh flip-zrx-a

flip-mana-a keeper ./stop-keeper.sh flip-mana-a

flip-usdt-a keeper ./stop-keeper.sh flip-usdt-a

flip-paxusd-a keeper ./stop-keeper.sh flip-paxusd-a

flip-comp-a keeper ./stop-keeper.sh flip-comp-a

flip-link-a keeper ./stop-keeper.sh flip-link-a

flip-lrc-a keeper ./stop-keeper.sh flip-lrc-a

flip-bal-a keeper ./stop-keeper.sh flip-bal-a

flip-yfi-a keeper ./stop-keeper.sh flip-yfi-a

flip-gusd-a keeper ./stop-keeper.sh flip-gusd-a

flip-renbtc-a keeper ./stop-keeper.sh flip-renbtc-a

flip-uni-a keeper ./stop-keeper.sh flip-uni-a

flip-aave-a keeper ./stop-keeper.sh flip-aave-a

flip-univ2daieth-a keeper ./stop-keeper.sh flip-univ2daieth-a

flap keeper ./stop-keeper.sh flap

flop keeper ./stop-keeper.sh flop

Using a dynamic gas price model for bids

ETHGASSTATION_API_KEY is optional. If you fill it in the auction-keeper

will use ethgasstation.info for dynamic gas. Uncomment the line below

and supply your API key if you wish to use dynamic gas.

#

ETHGASSTATION_API_KEY=MY_ETH_GASSTATION_KEY

ETHERSCAN_API_KEY is optional. If you fill it in the auction-keeper # will use etherscan API for dynamic gas. Uncomment the line below # and supply your API key if you wish to use dynamic gas. # # ETHERSCAN_API_KEY=MY_ETHERSCAN_API_KEY

**Note**: this configuration determines keeper gas price strategy as explained in https://github.com/makerdao/auction-keeper#gas-price-strategy

### Optional additions

Other auction keepers can be added in `docker-compose.yml`.

### Note on using Windows Subsystem for Linux
As Docker Desktop is not able to access the filesystem of WSL, you need to copy `dockerized-aution-keeper` somewhere in the `/c/` path and run it from there. e.g. `/c/Users/username/dev/dockerized-auction-keeper` instead of `/home/username/dev/dockerized-auction-keeper`.

Running `./start-keeper.sh flip-eth-a` from a WSL path will generate this error:

ERROR: for flip-eth-a Cannot start service flip-eth-a: OCI runtime create failed: container_linux.go:346: starting container process caused "exec: \"./flip-eth-a.sh\": stat ./flip-eth-a.sh: no such file or directory": unknown



## License
See [COPYING](https://github.com/makerdao/dockerized-auction-keeper/blob/master/COPYING) file.

## Disclaimer
YOU (MEANING ANY INDIVIDUAL OR ENTITY ACCESSING, USING OR BOTH THE SOFTWARE INCLUDED IN THIS GITHUB REPOSITORY) EXPRESSLY UNDERSTAND AND AGREE THAT YOUR USE OF THE SOFTWARE IS AT YOUR SOLE RISK. THE SOFTWARE IN THIS GITHUB REPOSITORY IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. YOU RELEASE AUTHORS OR COPYRIGHT HOLDERS FROM ALL LIABILITY FOR YOU HAVING ACQUIRED OR NOT ACQUIRED CONTENT IN THIS GITHUB REPOSITORY. THE AUTHORS OR COPYRIGHT HOLDERS MAKE NO REPRESENTATIONS CONCERNING ANY CONTENT CONTAINED IN OR ACCESSED THROUGH THE SERVICE, AND THE AUTHORS OR COPYRIGHT HOLDERS WILL NOT BE RESPONSIBLE OR LIABLE FOR THE ACCURACY, COPYRIGHT COMPLIANCE, LEGALITY OR DECENCY OF MATERIAL CONTAINED IN OR ACCESSED THROUGH THIS GITHUB REPOSITORY.