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 Docker Community Edition for your OS:
https://docs.docker.com/install/
- Install Docker Compose for your OS:
https://docs.docker.com/compose/install/
After following the setup procedure below, this keeper works out of the box under the following configuration:
-
Participates in up to 100 active ETH-A / ETH-B Flip auctions; it does not start new ones
-
Begins scan at a prescribed auction id - we recommend starting at:
mainnet
- 4500kovan
- 1800
-
Looks for Vaults (i.e.
urns
) at a supplied block height - we recommend starting at the block thatVat
was deployed:mainnet
- 8928152kovan 1.0.2
- 14764534
-
Uses a pricing model that tracks the price of ETH / BAT via a public API and applies a
DISCOUNT
before participating -
All logs from the keeper are saved and appended to a single file (
auction-keeper-flip-ETH-A.log
orauction-keeper-flip-BAT-A.log
) -
Place unlocked keystore and password file for account address under
secrets
directory. The names of the keystore and password files will need to be updated in theFLIP_ETH_A_ACCOUNT_KEY
in the env. -
Configure following variables in
env/environment.sh
file:SERVER_ETH_RPC_HOST
: URL to ETH Parity nodeSERVER_ETH_RPC_PORT
: ETH RPC portETHGASSTATION_API_KEY
: eth gas station API KEY, can be applied for at https://data.concourseopen.com/GASPRICE_MULTIPLIER
: dynamic gas multiplier (e.g. if 2.0 then will use 2 * base)FIRST_BLOCK_TO_CHECK
: Recommendation under introduction sectionFLIP_ACCOUNT_ADDRESS
: address to use for biddingFLIP_ETH_A_ACCOUNT_KEY
andFLIP_BAT_A_ACCOUNT_KEY
: account key format ofkey_file=/opt/keeper/secrets/keystore.json,pass_file=/opt/keeper/secrets/password.txt
Note: path to file should always be/opt/keeper/secrets/
followed by the name of file you create under secrets directory Ex: if you putkeystore-flip-a.json
andpassword-flip-a.txt
undersecrets
directory then var should be configured asFLIP_ETH_A_ACCOUNT_KEY='key_file=/opt/keeper/secrets/keystore-flip-a.json,pass_file=/opt/keeper/secrets/password-flip-a.txt'
orFLIP_BAT_A_ACCOUNT_KEY='key_file=/opt/keeper/secrets/keystore-flip-a.json,pass_file=/opt/keeper/secrets/password-flip-a.txt'
FLIP_DAI_IN_VAT
: Amount of Dai in Vat (Internal Dai Balance); important that this is higher than your largest estimated bid amountFLIP_MINIMUM_AUCTION_ID_TO_CHECK
: Recommendation under introduction sectionFLIP_ETH_DISCOUNT
andFLIP_BAT_DISCOUNT
: Discount from ETH's or BAT's FMV, which will be used as the bid price
- Place unlocked keystore and password file for account address under
secrets
directory. The names of the keystore and password files will need to be updated in theFLOP_ACCOUNT_KEY
in the env. - Configure following variables in
env/environment.sh
file:SERVER_ETH_RPC_HOST
: URL to ETH Parity nodeSERVER_ETH_RPC_PORT
: ETH RPC portETHGASSTATION_API_KEY
: eth gas station API KEY, can be applied for at https://data.concourseopen.com/GASPRICE_MULTIPLIER
: dynamic gas multiplier (e.g. if 2.0 then will use 2 * base)FIRST_BLOCK_TO_CHECK
: Recommendation under introduction sectionFLOP_ACCOUNT_ADDRESS
: address to use for biddingFLOP_ACCOUNT_KEY
: account key format ofkey_file=/opt/keeper/secrets/keystore.json,pass_file=/opt/keeper/secrets/password.txt
Note: path to file should always be/opt/keeper/secrets/
followed by the name of file you create under secrets directory Ex: if you putkeystore-flop.json
andpassword-flop.txt
undersecrets
directory then var should be configured asFLOP_ACCOUNT_KEY='key_file=/opt/keeper/secrets/keystore-flop.json,pass_file=/opt/keeper/secrets/password-flop.txt'
FLOP_DAI_IN_VAT
: Amount of Dai in Vat (Internal Dai Balance); important that this is higher than your largest estimated bid amountFLOP_MKR_DISCOUNT
: Discount from MKR's FMV, which will be used as the bid price
flip-eth-a keeper
./start-keeper.sh flip-eth-a | tee -a -i auction-keeper-flip-ETH-A.log
flip-bat-a keeper
./start-keeper.sh flip-bat-a | tee -a -i auction-keeper-flip-BAT-A.log
flop keeper
./start-keeper.sh flop | tee -a -i auction-keeper-flop.log
This will gracefully stop keeper and will exit DAI / collateral from Vat contract to keeper operating address
flip-eth-a keeper
./stop-keeper.sh flip-eth-a
flip-bat-a keeper
./stop-keeper.sh flip-bat-a
flop keeper
./stop-keeper.sh flop
- configure following variables in
env/environment.sh
file:
# Dynamic Gas Price Model
# 0 = get the gas price from the node (default)
# 1 = get the gas price from ethgasstation.info
# must set ETHGASSTATION_API_KEY
# 2 = get the gas price from etherchain.org
GAS_MODE=0
# increase this if you want to use higher price than the one reported
# (e.g. if 2.0 then will use 2 * fastest)
GASPRICE_MULTIPLIER=1.4
# ETHGASSTATION_API_KEY is optional. If you fill it in the model will use
# ethgasstation.info for dynamic gas, otherwise we will simply check the node.
ETHGASSTATION_API_KEY=MY_ETH_GASSTATION_KEY
Other auction keepers can be added in docker-compose.yml
e.g. for an USDC flipper
- add startup scripts
flip-usdc.sh
andmodel-usdc.sh
files underflip/usdc
directory - configure any new env vars used by startup scripts in
env/environment.sh
script (e.g.ACCOUNT_FLIP_USDC_KEY
) - add keeper in
docker-compose.yml
flip-usdc:
build: .
image: makerdao/auction-keeper
container_name: flip-usdc
working_dir: /opt/keeper/flip-usdc/
volumes:
- $PWD/secrets:/opt/keeper/secrets
- $PWD/env/:/opt/keeper/env/
- $PWD/flip/usdc/:/opt/keeper/usdc/
logging:
driver: "json-file"
options:
max-size: "100m"
max-file: "10"
command: ./flip-usdc.sh model-usdc.sh
- start it as
./start-keeper.sh flip-usdc | tee -a -i auction-keeper-flip-USDC.log
See COPYING file.
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.