LogoLogo
Tokemak.xyzTokemak AppGithubXDiscord
  • Autopilot
    • Introduction
    • A New Way to Provide Liquidity
    • Protocol Mechanics
      • Components & Logic
      • Asset Flow Example
    • Autopools & LATs
    • Staking TOKE
    • Custom Autopools
    • Glossary
  • USING THE APP
    • App Guide
      • Autopools
        • Deposit and Withdraw
        • Stake and Unstake
        • Claim Incentives
        • View Positions
      • Staking TOKE
        • Stake and Allocate
        • Unstake and Withdraw
        • View Positions
        • Claim Rewards
      • Toke/ETH LP
      • Guarded Launch Rewards
    • With Wallet Services
      • Fireblocks
    • Troubleshooting
  • Developer Docs
    • Contracts Overview
      • Autopool ETH Contracts Overview
        • Autopilot System High Level Overview
        • Autopilot Contracts and Systems
          • Autopilot Contract Security
          • Stats
          • Autopilot Strategy
          • Pricing
          • Swap Router
          • Curve Resolver
          • Message Proxy
          • accTOKE
          • Autopilot Router
          • Liquidation
          • Destination Vaults
          • Autopools
        • Autopilot Contracts Glossary
      • Contract Addresses
    • Security and Audits
      • Hexens: autoUSD March 25th 2025
      • Hexens: Autopilot Follow Up/Updates Audit July 2024
      • Hexens: Tokemak Autopilot May 2024
      • Certora: LMPStrategy Security Assessment & Formal Verification Report - Jan/March 2024
      • Hats.Finance, Crowd Competition Smart Contract Audit, February - March 2024
      • Halborn - Autopilot (Autopools) Contracts - Preliminary Smart Contract Audit - Sept 2023
      • Halborn - Autopilot Pricing Contracts - Formal Verification Report - Sept 2023
      • Sherlock - Autopilot Contracts - Crowd Competition - Sept 2023
      • Halborn - accTOKE Contract - Nov 2022
    • Integrating
      • 4626 Compliance
      • Large Withdrawals
      • Checking for Stale Data
  • Additional Links
    • Community Resources
Powered by GitBook
On this page
  • Claiming
  • Liquidation
  • Fees

Was this helpful?

Export as PDF
  1. Developer Docs
  2. Contracts Overview
  3. Autopool ETH Contracts Overview
  4. Autopilot Contracts and Systems

Liquidation

PreviousAutopilot RouterNextDestination Vaults

Was this helpful?

Liquidation in Autopilot refers to the process of auto-compounding rewards from our various asset deployments. For efficiency reasons, LiquidationRow attempts to batch as much of the claiming and swapping process as possible. This is broken up into two processes:

Claiming

Each DestinationVault is required to implement a collectRewards() function which will claim and transfer any reward tokens back to the liquidator. The exact details of how a claim happen are not of a concern to the liquidator, it is only worried about being told how much of some token it has received. Call flow:

Liquidation

Both the process of claiming and liquidation can be gas intensive given how many DestinationVaults and reward tokens we may need to process in the system. Both of these processes are designed to be able to work on a subset of either the DestinationVaults or the tokens to combat this. The goal is batch as match of the work as possible for efficiency, though. So, during liquidation the balance of tokens across many DestinationVaults are compiled, swapped as a single operation, and the proceeds distributed back to the DestinationVaults according to the share they contributed. Call flow:

Fees

This process is one that is permissioned and run by Tokemak. To support the gas and fees required to perform this a fee can optionally be enabled against any liquidated funds.