Skip to main content

2 posts tagged with "algorithms"

View All Tags

Kairos: The God of Perfect Moments in Market Ranking

· 2 min read
Max Kaido
Architect

In the bustling digital marketplace of cryptocurrency trading, where millions of decisions are made in microseconds, there exists an algorithm named after one of the most enigmatic Greek deities - Kairos, the god of the perfect moment.

The Myth

Kairos was depicted as a young man with a distinctive forelock of hair at his forehead, but completely bald at the back. The symbolism was clear: you must grasp opportunity at the precise moment it presents itself, for once it passes, even the swiftest hand cannot catch it.

He carried a pair of scales, delicately balanced on a razor's edge - a reminder that decisions must be made with precision, yet swiftly. The ancient Greeks said that Kairos moved with such speed that he could dance on this razor without being cut.

Efficient Market Ranking with QuickSelect Algorithm

· 2 min read
Max Kaido
Architect

In the latest update to Mercury Bot (v0.126.0), we've introduced a significant improvement to our market ranking system using the QuickSelect algorithm. This optimization reduces the number of comparisons needed to find the top K markets, making our analysis more efficient and responsive.

The Challenge

Our previous implementation compared every market with every other market to establish rankings. With N markets, this resulted in O(N²) comparisons. For 100 markets, we needed up to 4,950 comparisons! This was:

  • Time-consuming
  • Resource-intensive
  • Expensive in terms of API calls