Solvers

Link to Github repo

The Solvers network in the Grix ecosystem is a key component and brings to the protocol the advantages from the community by utilizing incentives and open source. As integral players in the Grix network, Solvers are tasked with the job of pulling, parsing, and calculating a complex market state.

Playing as a Solver in the ecosystem means deploying a capable endpoint that is built to be able to quickly take wide range of dynamic market data and utilize this information to devise superior trade route.

The data packet a solver must have are: the order flow, the SOP orders, and the Protocol Score Board (PSB). In addition, market state data packets are also available for solvers, but the most competitive solvers have their own and quicker access to the market state.

The information received from the Protocol ScoreBoard (PSB) is encompassing key metrics that encourage a solver to route to a specific protocol. These metrics represent Grix protocol preferences of the underlying DeFi options protocol that come mainly from the protocol's: reputation, risk, liquidity, and SOP priority.

To join the ecosystem and become a solver is simple by our public repo simple solver, and the solvers guide. To be a more successful solver, one need to be able to outperform the rest of the competition, and here Grix Protocol harness the innovative mind of the crypto developers ecosystem.

Solver Flow Example

Python / Typescript

def calculate_best_routes(orders_matrix, protocol_params):
    # Calculate the best routes with fallbacks for an orders matrix
    # Placeholder for the route calculation logic for multiple orders
    return find_optimal_trading_paths_with_fallbacks(orders_matrix, protocol_params)

def find_optimal_trading_paths_with_fallbacks(orders_matrix, protocol_params):
    # Placeholder for the logic to find the optimal trading paths with fallbacks for an orders matrix
    return {"Order123": ["OptimalPath1", "FallbackPath1", "FallbackPath2"],
            "Order456": ["OptimalPath2", "FallbackPath3"]}

# Main execution logic
def main():
    protocol_params = fetch_protocol_params()
    orders_matrix = fetch_order_flow()

    best_routes = calculate_best_routes(orders_matrix, protocol_params)
    return best_routes

if __name__ == "__main__":
    main()

Last updated