LogoLogo
  • What Is Elephant Money?
  • Overview
    • Using The Wiki
  • Ecosystem Tokens
    • ELEPHANT
      • Fees - Detailed
      • Economics
      • Elephant Buyback System
    • TRUNK token (Elephant Money Stable)
      • Deflationary Mechanics
    • SVNN token (Savanna Haus)
      • Details
  • Services
    • Elephant Money Futures Vaults
      • Futures Key Features
      • System Wide - Dynamic Rate Scaling
      • Base Rate & The BNB Reserve
      • Personal Rate
      • Futures Deposit & Claim Mechanics
      • Futures Maxes, Limits & Payouts
      • Individual Account - Adaptive Rate Limiters
    • Unlimited NFT's
      • Key Features
      • Minting Batches
      • Mint, Rewards & Claim Mechanics
      • Rewards
      • NFT Marketplace
    • TRUMPET
      • TRUMPET - How It Works
      • Trumpet Features
      • TRUMPET Token - Additional Details
      • Token Mechanics - Mint & Redeem
        • TRUNK Buyback Strategy
  • Price Stability Formula
    • Liquidity Management (Stability)
    • ELEPHANT Token Supply Management System (Growth)
    • Token Holder Distribution
    • Circulating Supply
  • Tokenomics
    • Launch & Initial Token Distribution
    • The Graveyard (GY)
      • The Graveyard Rebalanced Event
    • Buy with Bertha (BWB)
  • Elephant Money Treasury System
    • Elephant Treasury (BERTHA)
      • BERTHA - How It Is Funded
      • BERTHA - Responsibilities
    • BNB Reserve
      • BNB Reserve - How It Is Funded
      • BNB Reserve - Responsibilities
    • BTC Turbine
      • How It Is Funded
      • Responsibilities
    • TRUNK Turbine
      • How It Is Funded
      • Responsibilities
  • Liquidity
    • ELEPHANT/BUSD LP
    • ELEPHANT/WBNB LP
    • TRUNK/WBNB LP
    • TRUNK/BUSD LP
  • How To Guides
    • How To Deposit Into Futures
    • How To Buy / Sell / Transfer ELEPHANT
      • Buy / Sell via PCS (10% Transcation Fee)
      • Buy With Bertha (8.5% Transcation Fee)
    • How To Mint & Stake Unlimited NFT's
    • How To Mint & Redeem TRUMPET
  • Navigating The Website
    • ELEPHANT
      • Balance (Overview Tab)
      • Stake % (Overview Tab)
      • Price - SA (Elephant Stats)
      • Graveyard (Elephant Stats)
      • Liquidity (Elephant Stats)
    • Unlimited NFTs
      • Main Dash
      • Overview Section
      • Staking Section
      • Marketplace
    • Elephant Money Futures
      • Available
      • Total Value
      • Claimed
      • TVL (Overview Tab)
      • Participants (Overview Tab)
      • Total Deposited (Overview Tab)
      • Total Claimed (Overview Tab)
      • Available Sweep (Overview Tab)
      • Daily Liabilities (Yield Tab)
      • BNB Reserve (Yield Tab)
      • Daily Yield (Yield Tab)
    • TRUMPET
      • TRUMPET holdings
      • TRUNK Balance (TRUMPET)
      • Get Trumpet (Button)
      • Price (TRUMPET)
      • Supply (TRUMPET)
      • Backed Supply (TRUMPET)
      • Participants (TRUMPET)
    • The HERD Partner Network
      • Partner Network Dashboard
      • Partner Tab (HERD)
      • Stats Tab (HERD)
      • Checker Tab (HERD)
  • Security
    • Protecting Against Flash Loan Attacks
    • TWAP Oracle
    • Audits
  • Referral Program
    • The HERD Partner Network
      • Buy With Bertha Partner Rewards
  • Glossary
    • RFI Rewards
    • Bertha
    • AMM
    • (3,3)
    • Rainy Day Fund
  • OFFICIAL LiNKS
    • Website
    • Socials
    • Contract Network
    • Analytics Dashboards
    • Shop
    • Community Links
      • Tools
      • Calculators
      • Content
        • Youtube Channels
        • Medium Writers
Powered by GitBook
On this page
Export as PDF
  1. Security

Protecting Against Flash Loan Attacks

Understanding the basics

PreviousChecker Tab (HERD)NextTWAP Oracle

Last updated 1 year ago

Flash loans have long been a source of contention for DeFi projects. are uncollateralized loans that are borrowed and paid back within the same block. Flash loan exploits rely on the constant product features of DEX liquidity pools, along with naive smart contract engineering on the part of the victims.

There are a number of tried-and-true methods to disrupt or prevent flash loan attacks, including making sure smart contracts are not -prone, adding time-locks or delays to token conversions, and, most importantly, not using DEX LPs as price oracles. Attacks using flash loans typically focus on influencing the DEX LPs that on-chain spot price oracles use to determine prices.

Additionally, the use of a single price oracle, more specifically a DEX LP, makes protocols especially vulnerable to flash loan attacks. The exploiter obtains a sizable loan and uses it to influence the value of the assets in the LP before capitalizing on the price impact and quickly liquidating their position. Issues with flash loans are

Elephant.Money has implemented three strategies to defend against the threat of flash loan attacks.

  • Implemented a TWAP Oracle

  • Implemented a 3-block delay in the minting process

  • implemented a queued redemption system with limits on how much can be redeemed daily

Flash loans
automated market maker (AMM)
reentrancy
nothing new.