auction-keeper
can read an auction's status directly from the blockchain or from a Graph node. Its unique feature is the ability to plug in external bidding models which tell the keeper when and how much to bid. Bid prices are received from separate bidding models.auction-keeper
. The simplest example of a bidding model is a shell script which echoes a fixed price.1
to auctionsStarted
are checked for active status. If a new auction is detected, a new bidding model is started.auction-keeper
dependencies with:bin/auction-keeper
.bin/auction-keeper -h
to see an up-to-date list of arguments and usage information.--type collateral|surplus|debt
A keeper can only participate in one type of auction--collateral-type NAME
If --type=collateral
is passed, the collateral_type
must also be provided. A keeper can only bid on a single collateral type auction at a time. NOTE: Currently, only the ETH-A
collateral type is used.--eth-from ADDRESS
Address of the keeper. Warning: Do not use the same eth-from
account on multiple keepers as it complicates SAFEEngine
inventory management and will likely cause nonce conflicts. Using an eth-from
account with an open SAFE is also discouraged.--rpc-host HOST
URI of ETH JSON-RPC node. Default "http://localhost:8545"
--rpc-timeout SECS
Defaults to 10
--rpc-host
) is required. Parity and Geth nodes are supported over HTTP. Websocket endpoints are not supported in pyflex
. A full or archive node is required; light nodes are not supported.--etherscan-gas-price
Use etherscan.io for gas prices. Optional: --etherscan-key KEY
. Rate-limited to 1request/5sec w/o a key.--fixed-gas-price GWEI
Use a fixed gas price (in GWEI)--gas-initial-multiplier MULTIPLIER
When using an API source for fetching the initial gas price, this tunes the price. It's ignored when you're using --fixed-gas-price
. In case no strategy is specified it defaults to 1.0
--gas-reactive-multiplier MULTIPLIER
Every 30 seconds, a transaction's gas price will be multiplied by this value until it is mined or --gas-maxiumum
is reached. Not used if gasPrice
is passed from your bidding model. NOTE: Parity, as of this writing, requires a minimum gas increase of 1.125
to propagate a transaction replacement; this should be treated as a minimum value unless you want replacements to happen less frequently. This multiplier defaults to 1.125
if no other value is given.--gas-maximum GWEI
Maximum value for gas pricejoin
s system coins to SAFEEngine
on startup and exit
s all system coins and collateral upon shutdown. The keeper provides options for managing SAFEEngine
balances, which may be turned off in case you'd like to manage balances manually.--keep-system-coin-in-safe-engine-on-exit
Do not exit
system coin on shutdown--keep-collateral-in-safe-engine-on-exit
Do not exit
collateral on shutdown--return-collateral-interval SECS
How often, in seconds, the keeper exit
s won collateral from SAFEEngine
. Pass 0
to disable completely. Defaults to 300
--safe-engine-system-coin-target ALL|<integer>
Amount of system coins the keeper will try to keep in SAFEEngine
by rebalancing with join
s and exit
s between its own wallet and its balance inside GEB. Defaults to ALL
and the keeper will join
all of an account's systems coins.--safe-engine-system-coin-target
when:SAFEEngine
balance is insufficient in order to place a bidSAFEEngine
to an auction contract for an active bid.--from-block BLOCK_NUMBER
Scrape the chain for ModifySAFECollateralization
events, starting at BLOCK_NUMBER
. Set this to the block where the first ever SAFE was created. After startup, only new blocks will be queried. The scrape process can last a significant amount of time as the system matures. NOTE: To manage the performance of debt auction bidding, periodically adjust --from-block
to the block number of the oldest liquidation which has not been popDebtFromQueue
d yet. Defaults to geb.starting_block_number
, the block in which the system was deployed.--graph-endpoints NODE1,NODE2
Comma delimited list of Graph endpoints used to retrieve ModifySAFECollateralization
events. If multiple endpoints are passed, they will be pinged sequentially in the order they were specified in case one or many of them fail. NOTE: This flag is only supported for collateral auctions.--graph-block-threshold NUMBER_OF_BLOCKS
When the keeper fetches SAFE data to find critical safes, use the --graph-endpoints
when the keeper's last processed block is older than NUMBER_OF_BLOCKS
. The graph will be faster than a node when fetching historical data, but recent graph blocks might be slightly delayed compared to an ethereum node. This allows the keeper to to fetch historical data from the graph, but use the node for all newer blocks. Defaults to 20
--graph-endpoints https://subgraph.reflexer.finance/subgraphs/name/reflexer-labs/rai,https://api.thegraph.com/subgraphs/name/reflexer-labs/rai-mainnet
--min-auction AUCTION_ID
Ignore auctions older than AUCTION_ID
--max-auctions NUMBER
Limit the number of bidding models created to handle active auctions.--block-check-interval <integer>, default:1
How often the keeper checks for new blocks--bid-check-interval <integer>, default 4
How often the keeper checks model processes for new bids--block-check-interval
must be greater than 10
and --bid-check-interval
must be greater than 180. However, this will make your keeper slower and it will not quickly bid in auctions.--flash-swap
Turn on Uniswap flash swaps for collateral auctions. Not supported for --type debt
or --type surplus
--shards NUMBER_OF_KEEPER
Number of keepers you plan to run. You must set this for all keepers--shard-id SHARD_ID
You must specify this for every keeper, counting from 0--shards 3
and assign --shard-id 0
, --shard-id 1
, --shard-id 2
for the first, second and third keeper.liquidateSAFE
s and this way startAuction
s.settleAuction
s (in the case of English collateral, debt and surplus auctions)--settle-for <ACCOUNT1 ACCOUNT2>|NONE|ALL
Space-delimited list of accounts for which the keeper will settle auctions. Specify NONE
to disable this option. If you'd like to donate your gas to settle auctions for all participants, ALL
is also supported. Defaults to only the keeper address.--bid-delay FLOAT
--bid-delay
after each bid, multiple transactions can be submitted asynchronously while still allowing some time for older transactions to complete, freeing up the queue.AccountingEngine
liquidateSAFE
s or start a new surplus or debt auction regardless of whether or not your system coin or protocol token balance is sufficient to bid--start-auctions-only
) and bid (--bid-only
) in auctionslib\pyflex\tests\config
.