In this paper we present ODIN, a front-running protection system that uses a
novel algorithm to measure Round-Trip-Time (RTT) to untrusted servers. ODIN is
the decentralized equivalent of THOR, a RTT-aware front-running protection
system for trading on centralized exchanges. Unlike centralized exchanges, P2P
exchanges have potentially malicious peers which makes reliable direct RTT
measurement impossible. In order to prevent tampering by an arbitrarily
malicious peer, ODIN performs an indirect RTT measurement that never interacts
directly with the target machine. The RTT to the target is estimated by
measuring the RTT to a randomized IP address that is known to be close to the
target's IP address in the global routing network. We find that ODIN's RTT
estimation algorithm provides an accurate, practical, and generic solution for
collecting network latency data in a hostile network environment