📑
DeFi Saver Knowledge Base
  • Welcome to DeFi Saver Knowledge Base
  • General
    • What is DeFi Saver?
      • Boost & Repay
      • Smart Contracts
      • DeFi Saver and security
      • Liquidity Sources of DeFi Saver
      • DeFi Saver Fees
    • Smart Wallets
      • Can I access DFS created positions using other apps?
      • Why did we switch to Safe?
    • Wallet Compatibility
    • Troubleshooting common issues
      • Error: "An issue was detected with this transaction that would cause it to fail" - what to do
      • How can I withdraw tokens from my Smart Wallet?
      • My MetaMask account is failing to load - what should I do?
      • My transaction is pending / not going through - what should I do?
      • I cannot make any transactions using DeFi Saver after using Furucombo?
      • Avoiding MEV with your transactions
  • Features
    • ETH Saver
      • How does ETH Saver work?
      • Profit tracking & how does it work
      • Positions in ETH Saver
      • Are there fees?
        • Are there any costs that are not immediately noticeable?
    • Automation
      • Automation strategies
      • Requirements for using Automation
      • Automation Fees
      • How does Automation work?
      • When are Automation transactions made?
      • Are there risks when using Automation?
    • Recipe Creator
      • What are Flash Loans?
      • Is Recipe Creator safe to use?
      • Pre-made recipes / Recipe Book
      • How can I reuse output of previous functions?
    • Loan Shifter
      • Collateral Swaps
      • Debt Swaps
    • Notify
      • Notification Monitors
      • How do I set up Notify?
    • Simulation Mode
    • Smart Savings
      • Overview of Yearn
      • Overview of Convex
      • Overview of mStable
      • Why is a smart wallet needed for using Smart Savings?
      • How to start lending funds and earning interest using Smart Savings?
      • Managing existing portfolios using Smart Savings
      • The difference between APR and APY
      • Are there any security risks?
    • Bridge
    • Exchange
      • What are Limit Orders?
      • What is DCA?
  • Protocols
    • Aave
      • Aave Dashboard
      • Aave versions comparison
      • How does Aave Automation work?
      • Can I manage my existing Aave lending/borrowing portfolio using the Aave dashboard?
      • What are Flash Loans?
      • How can I long or short assets using Aave?
      • Staking Aave tokens
      • How can I tell how much interest I will earn or have already earned using Aave?
      • How can I swap my collateral or debt in Aave?
      • Migrating your Aave position(s)
      • Pendle Principal Tokens (PTs) on Aave
    • CurveUSD
      • What is LLAMMA in CurveUSD?
      • How do you create a loan in CurveUSD protocol?
      • Does CurveUSD charge any fees?
      • Is there a standard (hard) liquidation in CurveUSD?
      • What are bands in CurveUSD?
      • Why do I need a Smart wallet for CurveUSD?
    • Compound
      • Compound Dashboard
      • Can I manage my existing Compound lending/borrowing portfolio using the Compound dashboard in DeFi S
      • How to earn and withdraw COMP tokens
      • How can I tell how much interest I will earn or have already earned using Compound?
    • Fluid
      • Intro to Fluid
      • Liquidity Layer
      • Lend Protocol
      • Vault Protocol
      • DEX Protocol
      • DeFi Saver-supported Features
    • Liquity
      • Liquity Dashboard walkthrough
      • What is a Trove?
      • Liquity Redemptions
      • How to stay protected from redemption risk in Liquity
      • How do Liquidations work in Liquity?
      • What are the key benefits of Liquity?
      • Does Liquity charge any fees?
      • What is a Stability Pool?
      • What is the "Debt-in-Front" value in Liquity?
      • How can I earn LQTY tokens?
      • Why do I need a Smart wallet for Liquity?
    • Liquity V2
      • Intro to BOLD
      • Borrowing Rates and Redemptions
      • Collateral Ratios
      • Troves as NFTs
      • Revenue Distribution and Forkanomics
      • LQTY Staking
      • DeFi Saver-supported Features
    • Chicken Bonds
    • MakerDAO
      • Managing the Dashboard
      • Automation options for MakerDAO
      • What is a CDP and why should I be interested in opening one?
      • How do Boost & Repay work?
      • How does CDP Automation work?
      • Can I transfer my MakerDAO Vault to a different address?
      • Can I manage MakerDAO Vaults created using other apps at DeFi Saver?
    • Morpho Blue
    • Reflexer
      • Reflexer Dashboard walkthrough
      • How can I start borrowing or leveraging using Reflexer?
      • What makes Reflexer unique?
    • Spark
      • Spark Dashboard walkthrough
      • What is sDAI?
      • Liquidations in Spark
  • Legal
    • Terms and Conditions
Powered by GitBook
On this page
  1. General
  2. Troubleshooting common issues

Avoiding MEV with your transactions

Tips to prevent MEV related losses while using DeFi Saver.

PreviousI cannot make any transactions using DeFi Saver after using Furucombo?NextETH Saver

Last updated 4 months ago

MEV (short for Maximum Extractable Value) is the maximum profit that blockchain miners and validators can make by including, excluding or changing the order of transactions in a block.

When it comes to activity in DeFi Saver and the broader decentralised finance space, any transactions that include token swaps can be vulnerable to MEV attacks.

This is because token swaps don't have a pre-programed, definite outcome. For example, compared to borrowing 50 USDC from a lending protocol that will always result in you receiving exactly 50 USDC, any swaps you execute will only include certain limiting factors, such as the slippage limit that controls the lowest amount you could receive from the swap.

Numerous MEV bots will look for transactions in the mempool which would allow them to profit from manipulating the pools that are meant to be used in the swap included in the transaction, thus resulting in your swaps only receiving the minimum amount set by your slippage limit, instead of the estimated and expected amounts.

What types of transactions at DeFi Saver are vulnerable to MEV attacks?

This would be all transactions that include a swap within, such as: Boosts, Repays, leveraged create, leveraged close (aka self-liquidation), as well as collateral and debt swaps.

How to avoid MEV attacks and prevent losses?

Using TxSaver

For all Safe smart wallet users, we introduced TxSaver that lets you simply sign the wanted transaction and let TxSaver handle actual transaction submission for you while using MEV preventing RPCs.

You can check out our original introduction to TxSaver .

Note: If you currently have a position on a DSProxy, you can consider migrating it to a Safe to gain access to TxSaver.

Setting a private RPC in your wallet

For DSProxy users, the best option would be to configure a MEV-preventing RPC in your wallet that you can temporarily switch to when submitting transactions.

The most popular options and one's we usually recommend are:

Using these, your transactions will be privately submitted directly to block builders, allowing your transactions to be executed before any bots can realise if there's any value they can potentially extract.

Note that these RPC may not be ideal for everyday use and transactions could potentially be harder to track. If you face such issues, consider using these RPCs only when needed (i.e. only at the moment of submitting your transaction), while switching to regular RPCs for regular apps use and transactions that don't include swaps.

Note on Automation and MEV

Our DFS Automation bots already use MEV preventing RPCs whenever possible and as long

here
MEVBlocker
Flashbots Protect