Executor (Wing)

Description

Wing is a multi-model AI node designed to monitor the on-chain network and execute user strategies. Its primary function is to analyze live network conditions to prevent sudden losses caused by factors such as slippage, Miner Extractable Value (MEV) sniping, and other network-related issues.

sequence diagram

Function

  • Monitoring: Wing continuously monitors the on-chain network to gather real-time data and insights.

  • Execution: Executes batch transactions based on user strategies.

  • Approval and Transfer: Approves and transfers funds, ensuring the safety and optimization of investment strategies.

Role in Architecture

Wing plays a critical role in the QuantWealth architecture by:

  • Executing batch transactions.

  • Approving fund transfers.

  • Ensuring the safe execution of investment strategies through continuous network monitoring.

Flowchart

flowchart

Responsibilities

Receiving and Processing Orders

  1. Order Reception: Wing receives processed orders from the Orderbook. These orders contain batches of transactions that need to be executed.

  2. Batch Transactions: The orders include transactions to transfer funds from the user to the QWManager and requests for executing functions to create positions.

Preliminary Run Check

  1. Mainnet Fork Simulation: Wing performs a preliminary run check for the batch request against a mainnet fork. This ensures that the transactions will execute as expected in the real network.

  2. Validation: The results from the mainnet fork simulation are validated to ensure they meet the expected outcomes.

  3. Batching Transactions: Once validated, Wing batches all the transactions for execution.

Continuous Network Monitoring

  1. State Monitoring: Wing continuously watches over the network to check its state and ensure the best investment opportunities for users.

  2. MEV Protection: By considering MEV attacks and other potential threats, Wing ensures that user investments are protected.

  3. Opportunity Optimization: Wing takes into account the latest state of the network and other factors to optimize investment opportunities for users.

Mitigation of Additional Factors

  1. Front-Running Attacks:

    • Definition: Front-running is when someone executes a transaction based on knowledge of a pending transaction that will influence the price of the asset.

    • Mitigation: Wing can monitor the mempool for pending transactions and adjust strategies to avoid being front-run.

  2. Sandwich Attacks:

    • Definition: A sandwich attack involves placing two transactions around a victim's transaction to manipulate the price for profit.

    • Mitigation: Wing can detect patterns indicative of sandwich attacks and adjust the timing or structure of transactions to avoid them.

  3. Gas Price Volatility:

    • Definition: Sudden spikes in gas prices can make transactions more expensive and reduce profitability.

    • Mitigation: Wing can monitor gas prices in real-time and optimize transaction timing to avoid high fees, or batch transactions to reduce costs.

  4. Network Congestion:

    • Definition: High network traffic can delay transaction processing, leading to missed opportunities or increased slippage.

    • Mitigation: Wing can monitor network congestion levels and adjust transaction priorities or timings to ensure timely execution.

  5. Oracle Manipulation:

    • Definition: Manipulation of off-chain data sources that provide price feeds and other essential data to smart contracts.

    • Mitigation: Wing can validate data from multiple sources and cross-reference to ensure accuracy, reducing the risk of relying on manipulated or incorrect data.

  6. Smart Contract Exploits:

    • Definition: Vulnerabilities in smart contracts that can be exploited to steal funds or manipulate transactions.

    • Mitigation: Wing can conduct regular audits and simulations on mainnet forks to identify potential vulnerabilities and ensure contracts are secure.

  7. Liquidity Issues:

    • Definition: Insufficient liquidity in a market can lead to significant price impacts when executing large orders.

    • Mitigation: Wing can monitor liquidity levels across different exchanges and adjust execution strategies to minimize price impact.

  8. Flash Loan Attacks:

    • Definition: Exploits involving borrowing large amounts of funds without collateral for short periods to manipulate markets or protocols.

    • Mitigation: Wing can detect unusual borrowing patterns and adjust its strategies to mitigate the risks associated with flash loan attacks.

  9. Market Sentiment Shifts:

    • Definition: Sudden changes in market sentiment due to news, social media, or other factors can lead to rapid price movements.

    • Mitigation: Wing can analyze sentiment data from various sources and adjust investment strategies accordingly to hedge against adverse sentiment-driven market movements.

Execution and Safety

  1. Safe Execution: Wing ensures the safe execution of investment strategies by monitoring the network conditions in real-time.

  2. Fund Transfers: Approves and transfers funds as per the user strategies, ensuring all transactions are executed safely and efficiently.

Summary

Wing is an essential AI node in the QuantWealth architecture, responsible for monitoring on-chain conditions, executing user strategies, and mitigating various network-related risks. By continuously analyzing real-time data and adjusting strategies accordingly, Wing helps protect user investments from potential threats and ensures optimal execution of transactions.

Last updated

Was this helpful?