🧬
Head First DeFi: TX & Strategies
  • Decoding the DNA of DeFi Transactions & Strategies
    • From Arbitrage, Sandwich to JIT and Oracle Manipulation
    • Be Prepared To Explore the DeFi World
    • Case Study Format
  • MEV Transaction & Strategy 101
    • A $3.2 Million Profit Arbitrage, the Most Lucrative MEV of 2022
    • Understand Back-Run Arbitrages and Their Signals and Join the MEV Game.
    • Wallchain's MEV Arbitrage Redistribution
    • MEV Blocker, the multi-transaction MEV redistribution system that refunds 90% of builder rewards
    • With NFT arbitrage, someone was snipping your Baby Doge.
    • The Hidden Tax That You Should Know About
    • MEV-Share, Flashbots' MEV Redistribution Solution
  • Don't Let Your Trading Become the Recipe of Someone's Sandwich
    • The Notorious Jaredfromsubway.eth's Sandwich Attack
    • Combined with Flash Loan, This Leveraged Sandwich Launched the Attack with Millions of Volumes
    • Sandwich Targeting Liquidity Providers
    • The Flash-Loan-Enabled Sandwich Attack against Ethereum Foundation
  • Under the Hood of the DeFi Lego
    • What's Really Going on When Processing Liquidity in a Uniswap Pool?
      • Pretend You Are One of the Shareholders of a Bank Branch.
      • Let's Match the Bank Branch to a Uniswap Pool.
      • Adding Liquidity.
      • Removing Liquidity.
      • Conclusion
    • Liquidation: A Good Entry Point to Comprehend Internal Accounting Used by Many DeFi Protocols.
    • A Cross-Chain Arbitrage: The Art of Arbitraging BANANA Cross BSC and Polygon Chains
    • Liquidity Rebalancing: Moving Around $9.4 Million for More Fee Revenues.
    • Rebalancing loan positions utilizing AAVE Flash loan
    • How Does the Grok Token Exploiter Exploit the X Token By Baking His Own Cake And Eating it?
  • Unlocking the Power of Advanced DeFi Transactions and Becoming a DeFi Sleuth
    • Just-in-Time, an MEV Type That Benefits Traders in the Same Trading Venue
    • A Bot Devised Arbitrage Strategies Centered on Autonomous Minting and Burning of Synthetic Tokens
    • The Defect in a Lending Protocol's Oracle Module Was Exploited by a Bot to Generate a $110K Profit
    • A $296K-Profit Arbitrage Done by the Lightning Reflex Bot After the Vyper-Curve Exploit
    • Coffeebabe.eth Utilized Curve's CRV/WETH Pool's Price Deviation for a $5.4 Million Profit Arbitrage.
    • An Attacker Baited MEV Arbitrage Bots and Emptied Their Wallets
    • How Enso Solves 73.5ETH in 116 Steps in One Transaction
Powered by GitBook
On this page
  • Strategy One Liner
  • Big Picture
  • Key Steps
  • Key Protocols
  • Key Addresses
  • Key Assets
  • Simplified Illustration
  • Step-by-step Decoding
  • More Details
  • Keywords

Was this helpful?

  1. Under the Hood of the DeFi Lego

Liquidation: A Good Entry Point to Comprehend Internal Accounting Used by Many DeFi Protocols.

PreviousConclusionNextA Cross-Chain Arbitrage: The Art of Arbitraging BANANA Cross BSC and Polygon Chains

Last updated 1 year ago

Was this helpful?

Strategy One Liner

The liquidator used Flash Loan funds to trigger the internal liquidation contract process on Venus. This is a great starting point to get into the current transaction.

Big Picture

Key Steps

  1. Steps 0-1: The "to" address borrowed a Flash Loan from PancakeSwap and transferred the 373.2 TUSD to the Liquidator contract to trigger the liquidation process.

  2. Steps 7-8: The "to" address burned vBUSD and redeemed 392.825247 BUSD.

  3. Steps 9-11: The "to" address repaid the Flash Loan and transferred the proceeds, 19.375761 BUSD, to its EOA address, and burned 55 CHI tokens to pay for gas reduction service.

Key Protocols

  • Venus: a decentralized finance (DeFi) platform based on the Binance Smart Chain (BSC).

  • PancakeSwap: a DEX.

Key Addresses

  • The pentagon "to" is the liquidator's contract address.

  • The pentagon "leaf" is the liquidator's fund collection address.

  • The oval "Cake-LP" is PancakeSwap's Pool address.

  • The addresses in the box "Venus" are Venus's addresses. You can view them as one address.

  • The pentagon "borrower" is the borrower's address.

Key Assets

BUSD, TUSD, CHI

Simplified Illustration

Step-by-step Decoding

  1. Steps 0-1: The "to" address borrowed a Flash Loan from PancakeSwap and transferred the 373.2 TUSD to the Liquidator contract to trigger the liquidation process.

  2. Steps 2-4: The Liquidator contract of Venus transferred the returned assets to the vTUSD vault and seized the corresponding collateral assets, 18,892.5 vBUSD, from the borrower. The corresponding 373.2 virtualDebtTUSD was burned.

  3. Steps 5-6: 18,033.8 vBUSD was transferred to the "to" address, while 858.7 vBUSD was collected as a fee.

  4. Steps 7-8: The "to" address burned vBUSD and redeemed 392.825247 BUSD.

  5. Step 9: The "to" address repaid the Flash Loan

  6. Steps 10-11: The "to" address transferred the proceeds, 19.375761 BUSD, to its EOA address and burned 55 CHI tokens to pay for gas reduction service.

More Details

After this process, the liquidator raked in tidy proceeds of 19 BUSD.

It's worth noting that virtualDebtTUSD is utilized as an expression of internal accounting within EigenTx. This practice holds great significance as it ensures a balanced approach to the creation and depletion of resources during the liquidation process.

In Step 3, the Liquidator seized the collateral token vBUSD from the borrower's address. However, the position was left unbalanced without the corresponding Step 4 burning its debt being shown. This is common practice among many protocols, as their contracts keep an internal account of users' positions and do not emit logs of the corresponding rebalancing actions. This is where EigenTx's Complete Internal Accounting feature comes in, as it bridges the gap by providing a record of these accounting actions.

Keywords

Liquidation, Flash Loans

Steps 2-6: The Liquidator contract of Venus transferred the returned assets to the vTUSD vault and seized the corresponding collateral assets, 18,892.5 vBUSD, from the borrower. The corresponding 373.2 virtualDebtTUSD was burned, and 18,033.8 vBUSD was transferred to the "to" address, while the remaining part was collected as a fee. As explained in , the virtualDebtTUSD here is the voucher created by EigenTx to keep a balanced internal accounting process. You can read more details below.

the video
video on YouTube
Transaction Flow Chart | EigenTx:0xb0d825841a339aab69d5a6cdc976b6bcffe5322eb639582935b9a9a7e366ad5aEigenPhi
Logo