Links

Diamond Mode

What is Diamond Mode?

Diamond Mode is a specialized swap feature on YetAnotherDeFi that guarantees the utmost security and fairness. The name “Diamond Mode” is derived from two defining characteristics:
  • MEV-Protection: The Diamond Mode ensures that your transactions remain safeguarded against Miner Extractable Value (MEV) attacks. In the crypto world, assets are treasures, and this mode offers diamond-like protection to these treasures.
  • Exclusive Token Selection: Diamond Mode only supports the most esteemed and trusted tokens for swaps, maintaining the exclusivity and value akin to diamonds.

Benefits of Diamond Mode

  • MEV Protection: Ensures that every transaction is executed fairly without external manipulations.
  • Trusted Liquidity: Diamond Mode might provide more favorable quotes than many mainstream decentralized exchanges.
  • No Slippage: The price you see is the price you get; there's no fluctuation once quoted.
  • Reduced Gas Fees: Experience significant savings on transaction costs.

How Does Diamond Mode Achieve This?

At its core, Diamond Mode is powered by the RFQ (Request For Quote) mechanism. But what exactly is RFQ? It's a private negotiation between the user and a Market Maker.
Here's a step-by-step breakdown:
  1. 1.
    Quote Request: You input the price for the token you wish to sell, prompting YetAnotherDeFi to request a quote from a Market Maker.
  2. 2.
    Quote Confirmation: If the offered price aligns with your expectations and you confirm the swap, YAD secures a 60-second trade order from the Market Maker.
  3. 3.
    Signature Authentication: The trader then signs this trade offer off-chain using the eip-712 signature. This procedure ensures high-level security by hashing and signing structured data, which includes fields like calldata, timestamp, and more. A unique hash is produced from these parameters, which is subsequently signed by the Market Maker's private key. This process ensures that any malicious interference will alter the hash and the signature, causing the transaction to fail.
  4. 4.
    Transaction Completion: Once YetAnotherDeFi obtains the signed calldata from the Market Maker, you'll authenticate the transaction in your wallet, followed by YAD initiating it on the blockchain. Voila! The swap is successfully completed.
This RFQ mechanism, essentially a secured private deal, ensures the swap rate remains constant, resulting in zero slippage. Moreover, the inherent security features of this mechanism make it virtually impossible for MEV bots to disrupt your transaction, ensuring unparalleled protection.