bug: Autopilot may create auctions without WETH price #2149
Labels
bug
Something isn't working
E:3.1 Driver Colocation
See https://github.com/cowprotocol/pm/issues/14 for details
Problem
The driver expects token prices for all buy and sell tokens in the auction. Yet, it wraps ETH into WETH if necessary:
services/crates/driver/src/domain/competition/auction.rs
Lines 50 to 56 in 50b46e0
Yet, when creating the auction we don't ensure we have token prices for both the wrapped native version as well as the 0xe....e placeholder. We only insert the token address specified on the order.
services/crates/autopilot/src/solvable_orders.rs
Lines 472 to 477 in 50b46e0
Impact
If an auction contains only a native token order (and no order trading the wrapped native token equivalent), all drivers will reject the auction.
To reproduce
If you can reproduce the behaviour, steps to reproduce:
Expected behaviour
Auctions like this should work normal
Additional context
Logs: https://production-6de61f.kb.eu-central-1.aws.cloud.es.io/app/r/s/bS0Vj
The text was updated successfully, but these errors were encountered: