# AI Pack: burners-contracts

- Description: Burners contracts and slashing flows.
- Remote: https://github.com/symbioticfi/burners
- Remote ref: HEAD
- Commit: cbf4ebc8a4f0e0fcddcb7b659d598dcff3c1dcad
- Generated (UTC): 2026-06-02T10:22:21.999Z
- Repomix: 1.14.1
- Preset: contract
- Ignore patterns: .gitignore, .dockerignore, .prettierignore, .npmignore, .nvmrc, .editorconfig, .gitattributes, **/.github/**, **/.husky/**, **/.vscode/**, **/.idea/**, **/.DS_Store, node_modules/, dist/, build/, .turbo/, .next/, out/, cache/, broadcast/, bin/, coverage*, *.test, target/, docs/, abis/, bindings/, test/**, !test/integration/**, script/utils/**, package-lock.json, pnpm-lock.yaml, yarn.lock, bun.lockb, .pre-commit-config.yaml
- Flags: compress

---

This file is a merged representation of a subset of the codebase, containing files not matching ignore patterns, combined into a single document by Repomix.
The content has been processed where content has been compressed (code blocks are separated by ⋮---- delimiter).

# File Summary

## Purpose

This file contains a packed representation of a subset of the repository's contents that is considered the most important context.
It is designed to be easily consumable by AI systems for analysis, code review,
or other automated processes.

## File Format

The content is organized as follows:

1. This summary section
2. Repository information
3. Directory structure
4. Repository files (if enabled)
5. Multiple file entries, each consisting of:
   a. A header with the file path (## File: path/to/file)
   b. The full contents of the file in a code block

## Usage Guidelines

- This file should be treated as read-only. Any changes should be made to the
  original repository files, not this packed version.
- When processing this file, use the file path to distinguish
  between different files in the repository.
- Be aware that this file may contain sensitive information. Handle it with
  the same level of security as you would the original repository.

## Notes

- Some files may have been excluded based on .gitignore rules and Repomix's configuration
- Binary files are not included in this packed representation. Please refer to the Repository Structure section for a complete list of file paths, including binary files
- Files matching these patterns are excluded: .gitignore, .dockerignore, .prettierignore, .npmignore, .nvmrc, .editorconfig, .gitattributes, **/.github/**, **/.husky/**, **/.vscode/**, **/.idea/**, **/.DS_Store, node_modules/, dist/, build/, .turbo/, .next/, out/, cache/, broadcast/, bin/, coverage*, *.test, target/, docs/, abis/, bindings/, test/**, !test/integration/**, script/utils/**, package-lock.json, pnpm-lock.yaml, yarn.lock, bun.lockb, .pre-commit-config.yaml
- Files matching patterns in .gitignore are excluded
- Files matching default ignore patterns are excluded
- Content has been compressed - code blocks are separated by ⋮---- delimiter
- Files are sorted by Git change count (files with more changes are at the bottom)

# Directory Structure

```
script/
  deploy/
    genesis/
      BurnerRouterFactory.s.sol
      Burners.s.sol
      ETHx_Burner.s.sol
      mETH_Burner.s.sol
      rETH_Burner.s.sol
      sfrxETH_Burner.s.sol
      swETH_Burner.s.sol
      wstETH_Burner.s.sol
    BurnerRouter.s.sol
specs/
  BurnerRouter.md
  Burners.md
src/
  contracts/
    burners/
      sUSDe/
        sUSDe_Burner.sol
        sUSDe_Miniburner.sol
      ETHx_Burner.sol
      mETH_Burner.sol
      rETH_Burner.sol
      sfrxETH_Burner.sol
      swETH_Burner.sol
      wstETH_Burner.sol
    common/
      AddressRequests.sol
      SelfDestruct.sol
      UintRequests.sol
    router/
      BurnerRouter.sol
      BurnerRouterFactory.sol
  interfaces/
    burners/
      ETHx/
        IETHx_Burner.sol
        IStaderConfig.sol
        IStaderStakePoolsManager.sol
        IUserWithdrawalManager.sol
      mETH/
        ImETH_Burner.sol
        IMETH.sol
        IStaking.sol
      rETH/
        IrETH_Burner.sol
        IRocketTokenRETH.sol
      sfrxETH/
        IFraxEtherRedemptionQueue.sol
        IsfrxETH_Burner.sol
      sUSDe/
        IEthenaMinting.sol
        IsUSDe_Burner.sol
        ISUSDe.sol
        IUSDe.sol
      swETH/
        IswETH_Burner.sol
        ISwETH.sol
        ISwEXIT.sol
      wstETH/
        IWithdrawalQueue.sol
        IwstETH_Burner.sol
        IWstETH.sol
    common/
      IAddressRequests.sol
      IUintRequests.sol
    router/
      IBurnerRouter.sol
      IBurnerRouterFactory.sol
.env.example
.gitmodules
foundry.toml
LICENSE
package.json
README.md
remappings.txt
```

# Files

## File: script/deploy/genesis/BurnerRouterFactory.s.sol

```solidity
// SPDX-License-Identifier: BUSL-1.1
⋮----
import {Script, console2} from "forge-std/Script.sol";
⋮----
import {BurnerRouterFactory} from "../../../src/contracts/router/BurnerRouterFactory.sol";
import {BurnerRouter} from "../../../src/contracts/router/BurnerRouter.sol";
⋮----
contract BurnerRouterFactoryScript is Script {
function run() public {
```

## File: script/deploy/genesis/Burners.s.sol

```solidity
// SPDX-License-Identifier: BUSL-1.1
⋮----
import {Script, console2} from "forge-std/Script.sol";
⋮----
import {BurnerRouterFactory} from "../../../src/contracts/router/BurnerRouterFactory.sol";
import {BurnerRouter} from "../../../src/contracts/router/BurnerRouter.sol";
⋮----
import {wstETH_Burner} from "../../../src/contracts/burners/wstETH_Burner.sol";
import {rETH_Burner} from "../../../src/contracts/burners/rETH_Burner.sol";
import {mETH_Burner} from "../../../src/contracts/burners/mETH_Burner.sol";
import {swETH_Burner} from "../../../src/contracts/burners/swETH_Burner.sol";
import {sfrxETH_Burner} from "../../../src/contracts/burners/sfrxETH_Burner.sol";
import {ETHx_Burner} from "../../../src/contracts/burners/ETHx_Burner.sol";
⋮----
contract BurnersScript is Script {
function run() public {
⋮----
// mainnet
⋮----
// holesky
⋮----
// sepolia
⋮----
// hoodi
```

## File: script/deploy/genesis/ETHx_Burner.s.sol

```solidity
// SPDX-License-Identifier: BUSL-1.1
⋮----
import {Script, console2} from "forge-std/Script.sol";
⋮----
import {ETHx_Burner} from "../../../src/contracts/burners/ETHx_Burner.sol";
⋮----
contract ETHx_BurnerScript is Script {
function run() public {
⋮----
// mainnet
⋮----
// holesky
```

## File: script/deploy/genesis/mETH_Burner.s.sol

```solidity
// SPDX-License-Identifier: BUSL-1.1
⋮----
import {Script, console2} from "forge-std/Script.sol";
⋮----
import {mETH_Burner} from "../../../src/contracts/burners/mETH_Burner.sol";
⋮----
contract mETH_BurnerScript is Script {
function run() public {
⋮----
// mainnet
⋮----
// holesky
⋮----
// sepolia
```

## File: script/deploy/genesis/rETH_Burner.s.sol

```solidity
// SPDX-License-Identifier: BUSL-1.1
⋮----
import {Script, console2} from "forge-std/Script.sol";
⋮----
import {rETH_Burner} from "../../../src/contracts/burners/rETH_Burner.sol";
⋮----
contract rETH_BurnerScript is Script {
function run() public {
⋮----
// mainnet
⋮----
// holesky
```

## File: script/deploy/genesis/sfrxETH_Burner.s.sol

```solidity
// SPDX-License-Identifier: BUSL-1.1
⋮----
import {Script, console2} from "forge-std/Script.sol";
⋮----
import {sfrxETH_Burner} from "../../../src/contracts/burners/sfrxETH_Burner.sol";
⋮----
contract sfrxETH_BurnerScript is Script {
function run() public {
⋮----
// mainnet
```

## File: script/deploy/genesis/swETH_Burner.s.sol

```solidity
// SPDX-License-Identifier: BUSL-1.1
⋮----
import {Script, console2} from "forge-std/Script.sol";
⋮----
import {swETH_Burner} from "../../../src/contracts/burners/swETH_Burner.sol";
⋮----
contract swETH_BurnerScript is Script {
function run() public {
⋮----
// mainnet
```

## File: script/deploy/genesis/wstETH_Burner.s.sol

```solidity
// SPDX-License-Identifier: BUSL-1.1
⋮----
import {Script, console2} from "forge-std/Script.sol";
⋮----
import {wstETH_Burner} from "../../../src/contracts/burners/wstETH_Burner.sol";
⋮----
contract wstETH_BurnerScript is Script {
function run() public {
⋮----
// mainnet
⋮----
// holesky
⋮----
// sepolia
```

## File: script/deploy/BurnerRouter.s.sol

```solidity
// SPDX-License-Identifier: BUSL-1.1
⋮----
import {Script, console2} from "forge-std/Script.sol";
⋮----
import {SymbioticBurnersConstants} from "../../test/integration/SymbioticBurnersConstants.sol";
⋮----
import {IBurnerRouter} from "../../src/interfaces/router/IBurnerRouter.sol";
⋮----
contract BurnerRouterScript is Script {
function run(
```

## File: specs/BurnerRouter.md

````markdown
## Burner Router

[See the code here](../src/contracts/router/)

The Burner Router allows redirecting the slashed collateral tokens to different addresses, which may be represented by Burners, Treasury contracts, LP lockers, etc.

### Full Flow

1. Setup
    - Before the Vault's creation, deploy a new Burner Router via `BurnerRouterFactory` with the same collateral address as the Vault will use
    - Deploy the Vault inputting the received `BurnerRouter` address and `IBaseSlasher.BaseParams.isBurnerHook` set to `true`

2. Update setup
    - Change global receiver, network-specific receivers, operator-network-specific receivers with the configured delay (in case of pending set requests, they are overrided with the new ones)
    - Change `delay` itself after the delay (in case of pending set requests, they are overrided with the new ones)

3. Slashing
    - The router is called via `onSlash()` function
    - It determines the needed address for redirection and saves the redirection amount for it

4. Trigger transfer
    - Transfers a given account's whole balance from the router to this account

### Deploy

```shell
source .env
```

#### Deploy factory

Deployment script: [click](../script/deploy/genesis/BurnerRouterFactory.s.sol)

```shell
forge script script/deploy/genesis/BurnerRouterFactory.s.sol:BurnerRouterFactoryScript --broadcast --rpc-url=$ETH_RPC_URL
```

#### Deploy entity

Deployment script: [click](../script/deploy/BurnerRouter.s.sol)

```shell
forge script script/deploy/BurnerRouter.s.sol:BurnerRouterScript 0x0000000000000000000000000000000000000000 0x0000000000000000000000000000000000000000 0 0x0000000000000000000000000000000000000000 [\(0x0000000000000000000000000000000000000000,0x0000000000000000000000000000000000000000\),\(0x0000000000000000000000000000000000000000,0x0000000000000000000000000000000000000000\)] [\(0x0000000000000000000000000000000000000000,0x0000000000000000000000000000000000000000,0x0000000000000000000000000000000000000000\),\(0x0000000000000000000000000000000000000000,0x0000000000000000000000000000000000000000,0x0000000000000000000000000000000000000000\)] --sig "run(address,address,uint48,address,(address,address)[],(address,address,address)[])" --broadcast --rpc-url=$ETH_RPC_URL
```
````

## File: specs/Burners.md

````markdown
## Burners

## General Overview

Collateral is a concept introduced by Symbiotic that brings capital efficiency and scale by enabling assets used to secure Symbiotic networks to be held outside of the Symbiotic protocol itself - e.g., in DeFi positions on networks other than Ethereum itself.

Symbiotic achieves this by separating the ability to slash assets from the underlying asset itself, similar to how liquid staking tokens create tokenized representations of underlying staked positions. Technically, collateral positions in Symbiotic are ERC-20 tokens with extended functionality to handle slashing incidents if applicable. In other words, if the collateral token aims to support slashing, it should be possible to create a `Burner` responsible for proper burning of the asset.

For example, if asset is ETH LST it can be used as a collateral if it's possible to create `Burner` contract that withdraw ETH from beaconchain and burn it, if asset is native e.g. governance token it also can be used as collateral since burner might be implemented as "black-hole" contract or address.

## Default Burners

We've implemented default Burners for the assets restaked at Symbiotic, which need "unwrapping" (and allow it in a permissionless way):

### wstETH Burner

An asset transfered to the [Burner](../src/contracts/burners/wstETH_Burner.sol) - wstETH

#### Unwrap flow

1. Trigger withdrawal
    - Unwrap wstETH into stETH via wstETH contract
    - Create requests with acceptable by the Lido Withdrawal Queue amounts
    - Send withdrawal requests to the Lido Withdrawal Queue

2. Trigger burn
    - Claim withdrawal request by its ID
    - Burn ETH by `selfdestruct()`

#### Deploy entity

Deployment script: [click](../script/deploy/genesis/wstETH_Burner.s.sol)

```shell
forge script script/deploy/genesis/wstETH_Burner.s.sol:wstETH_BurnerScript --broadcast --rpc-url=$ETH_RPC_URL
```

### rETH Burner

An asset transfered to the [Burner](../src/contracts/burners/rETH_Burner.sol) - rETH

#### Unwrap flow

1. Trigger burn
    - Unwrap rETH into ETH via rETH contract
    - Burn ETH by `selfdestruct()`

#### Deploy entity

Deployment script: [click](../script/deploy/genesis/rETH_Burner.s.sol)

```shell
forge script script/deploy/genesis/rETH_Burner.s.sol:rETH_BurnerScript --broadcast --rpc-url=$ETH_RPC_URL
```

### mETH Burner

An asset transfered to the [Burner](../src/contracts/burners/mETH_Burner.sol) - mETH

#### Unwrap flow

1. Trigger withdrawal
    - Send a withdrawal request to the Mantle Staking contract

2. Trigger burn
    - Claim withdrawal request by its ID
    - Burn ETH by `selfdestruct()`

#### Deploy entity

Deployment script: [click](../script/deploy/genesis/mETH_Burner.s.sol)

```shell
forge script script/deploy/genesis/mETH_Burner.s.sol:mETH_BurnerScript --broadcast --rpc-url=$ETH_RPC_URL
```

### swETH Burner

An asset transfered to the [Burner](../src/contracts/burners/swETH_Burner.sol) - swETH

#### Unwrap flow

1. Trigger withdrawal
    - Create requests with acceptable by the Swell Exit contract amounts
    - Send withdrawal requests to the Swell Exit contract

2. Trigger burn
    - Claim withdrawal request by its ID
    - Burn ETH by `selfdestruct()`

#### Deploy entity

Deployment script: [click](../script/deploy/genesis/swETH_Burner.s.sol)

```shell
forge script script/deploy/genesis/swETH_Burner.s.sol:swETH_BurnerScript --broadcast --rpc-url=$ETH_RPC_URL
```

### sfrxETH Burner

An asset transfered to the [Burner](../src/contracts/burners/sfrxETH_Burner.sol) - sfrxETH

#### Unwrap flow

1. Trigger withdrawal
    - Send a withdrawal request to the frxETH Redemption Queue

2. Trigger burn
    - Claim withdrawal request by its ID
    - Burn ETH by `selfdestruct()`

#### Deploy entity

Deployment script: [click](../script/deploy/genesis/sfrxETH_Burner.s.sol)

```shell
forge script script/deploy/genesis/sfrxETH_Burner.s.sol:sfrxETH_BurnerScript --broadcast --rpc-url=$ETH_RPC_URL
```

### ETHx Burner

An asset transfered to the [Burner](../src/contracts/burners/ETHx_Burner.sol) - ETHx

#### Unwrap flow

1. Trigger withdrawal
    - Create requests with acceptable by the User Withdraw Manager contract amounts
    - Send withdrawal requests to the User Withdraw Manager contract

2. Trigger burn
    - Claim withdrawal request by its ID
    - Burn ETH by `selfdestruct()`

#### Deploy entity

Deployment script: [click](../script/deploy/genesis/ETHx_Burner.s.sol)

```shell
forge script script/deploy/genesis/ETHx_Burner.s.sol:ETHx_BurnerScript --broadcast --rpc-url=$ETH_RPC_URL
```
````

## File: src/contracts/burners/sUSDe/sUSDe_Burner.sol

```solidity
// SPDX-License-Identifier: MIT
⋮----
import {AddressRequests} from "../../common/AddressRequests.sol";
import {SelfDestruct} from "../../common/SelfDestruct.sol";
import {sUSDe_Miniburner} from "./sUSDe_Miniburner.sol";
⋮----
import {IEthenaMinting} from "../../../interfaces/burners/sUSDe/IEthenaMinting.sol";
import {ISUSDe} from "../../../interfaces/burners/sUSDe/ISUSDe.sol";
import {IUSDe} from "../../../interfaces/burners/sUSDe/IUSDe.sol";
import {IsUSDe_Burner} from "../../../interfaces/burners/sUSDe/IsUSDe_Burner.sol";
⋮----
import {Clones} from "@openzeppelin/contracts/proxy/Clones.sol";
import {IERC1271} from "@openzeppelin/contracts/interfaces/IERC1271.sol";
import {SafeERC20, IERC20} from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
⋮----
contract sUSDe_Burner is AddressRequests, IERC1271, IsUSDe_Burner {
⋮----
/**
     * @inheritdoc IsUSDe_Burner
     */
⋮----
/**
     * @inheritdoc IERC1271
     */
function isValidSignature(bytes32 hash_, bytes memory signature) external view returns (bytes4) {
⋮----
function triggerWithdrawal() external returns (address requestId) {
⋮----
function triggerClaim(
⋮----
function triggerInstantClaim() external {
⋮----
function triggerBurn(
⋮----
function approveUSDeMinter() external {
```

## File: src/contracts/burners/sUSDe/sUSDe_Miniburner.sol

```solidity
// SPDX-License-Identifier: MIT
⋮----
import {ISUSDe} from "../../../interfaces/burners/sUSDe/ISUSDe.sol";
⋮----
import {OwnableUpgradeable} from "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol";
⋮----
contract sUSDe_Miniburner is OwnableUpgradeable {
⋮----
function initialize(
⋮----
function triggerClaim() external onlyOwner {
```

## File: src/contracts/burners/ETHx_Burner.sol

```solidity
// SPDX-License-Identifier: MIT
⋮----
import {SelfDestruct} from "../common/SelfDestruct.sol";
import {UintRequests} from "../common/UintRequests.sol";
⋮----
import {IETHx_Burner} from "../../interfaces/burners/ETHx/IETHx_Burner.sol";
import {IStaderConfig} from "../../interfaces/burners/ETHx/IStaderConfig.sol";
import {IStaderStakePoolsManager} from "../../interfaces/burners/ETHx/IStaderStakePoolsManager.sol";
import {IUserWithdrawalManager} from "../../interfaces/burners/ETHx/IUserWithdrawalManager.sol";
⋮----
import {EnumerableSet} from "@openzeppelin/contracts/utils/structs/EnumerableSet.sol";
import {IERC20} from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import {Math} from "@openzeppelin/contracts/utils/math/Math.sol";
import {Multicall} from "@openzeppelin/contracts/utils/Multicall.sol";
⋮----
contract ETHx_Burner is UintRequests, Multicall, IETHx_Burner {
⋮----
/**
     * @inheritdoc IETHx_Burner
     */
⋮----
function triggerWithdrawal(
⋮----
function triggerBurn(
```

## File: src/contracts/burners/mETH_Burner.sol

```solidity
// SPDX-License-Identifier: MIT
⋮----
import {SelfDestruct} from "../common/SelfDestruct.sol";
import {UintRequests} from "../common/UintRequests.sol";
⋮----
import {IMETH} from "../../interfaces/burners/mETH/IMETH.sol";
import {IStaking} from "../../interfaces/burners/mETH/IStaking.sol";
import {ImETH_Burner} from "../../interfaces/burners/mETH/ImETH_Burner.sol";
⋮----
import {IERC20} from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
⋮----
contract mETH_Burner is UintRequests, ImETH_Burner {
/**
     * @inheritdoc ImETH_Burner
     */
⋮----
function triggerWithdrawal() external returns (uint256 requestId) {
⋮----
function triggerBurn(
```

## File: src/contracts/burners/rETH_Burner.sol

```solidity
// SPDX-License-Identifier: MIT
⋮----
import {SelfDestruct} from "../common/SelfDestruct.sol";
⋮----
import {IRocketTokenRETH} from "../../interfaces/burners/rETH/IRocketTokenRETH.sol";
import {IrETH_Burner} from "../../interfaces/burners/rETH/IrETH_Burner.sol";
⋮----
contract rETH_Burner is IrETH_Burner {
/**
     * @inheritdoc IrETH_Burner
     */
⋮----
function triggerBurn(
```

## File: src/contracts/burners/sfrxETH_Burner.sol

```solidity
// SPDX-License-Identifier: MIT
⋮----
import {SelfDestruct} from "../common/SelfDestruct.sol";
import {UintRequests} from "../common/UintRequests.sol";
⋮----
import {IFraxEtherRedemptionQueue} from "../../interfaces/burners/sfrxETH/IFraxEtherRedemptionQueue.sol";
import {IsfrxETH_Burner} from "../../interfaces/burners/sfrxETH/IsfrxETH_Burner.sol";
⋮----
import {IERC20} from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import {IERC721Receiver} from "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol";
⋮----
contract sfrxETH_Burner is UintRequests, IsfrxETH_Burner, IERC721Receiver {
/**
     * @inheritdoc IsfrxETH_Burner
     */
⋮----
function triggerWithdrawal() external returns (uint256 requestId) {
⋮----
function triggerBurn(
⋮----
/**
     * @inheritdoc IERC721Receiver
     */
function onERC721Received(address, address, uint256, bytes calldata) external returns (bytes4) {
```

## File: src/contracts/burners/swETH_Burner.sol

```solidity
// SPDX-License-Identifier: MIT
⋮----
import {SelfDestruct} from "../common/SelfDestruct.sol";
import {UintRequests} from "../common/UintRequests.sol";
⋮----
import {ISwEXIT} from "../../interfaces/burners/swETH/ISwEXIT.sol";
import {IswETH_Burner} from "../../interfaces/burners/swETH/IswETH_Burner.sol";
⋮----
import {IERC20} from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import {IERC721Receiver} from "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol";
import {Math} from "@openzeppelin/contracts/utils/math/Math.sol";
⋮----
contract swETH_Burner is UintRequests, IswETH_Burner, IERC721Receiver {
⋮----
/**
     * @inheritdoc IswETH_Burner
     */
⋮----
function triggerWithdrawal(
⋮----
function triggerBurn(
⋮----
/**
     * @inheritdoc IERC721Receiver
     */
function onERC721Received(address, address, uint256, bytes calldata) external returns (bytes4) {
```

## File: src/contracts/burners/wstETH_Burner.sol

```solidity
// SPDX-License-Identifier: MIT
⋮----
import {SelfDestruct} from "../common/SelfDestruct.sol";
import {UintRequests} from "../common/UintRequests.sol";
⋮----
import {IWithdrawalQueue} from "../../interfaces/burners/wstETH/IWithdrawalQueue.sol";
import {IWstETH} from "../../interfaces/burners/wstETH/IWstETH.sol";
import {IwstETH_Burner} from "../../interfaces/burners/wstETH/IwstETH_Burner.sol";
⋮----
import {IERC20} from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import {Math} from "@openzeppelin/contracts/utils/math/Math.sol";
⋮----
contract wstETH_Burner is UintRequests, IwstETH_Burner {
⋮----
/**
     * @inheritdoc IwstETH_Burner
     */
⋮----
function triggerWithdrawal(
⋮----
function triggerBurn(
⋮----
function triggerBurnBatch(uint256[] calldata requestIds_, uint256[] calldata hints) external {
```

## File: src/contracts/common/AddressRequests.sol

```solidity
// SPDX-License-Identifier: MIT
⋮----
import {IAddressRequests} from "../../interfaces/common/IAddressRequests.sol";
⋮----
import {EnumerableSet} from "@openzeppelin/contracts/utils/structs/EnumerableSet.sol";
import {Math} from "@openzeppelin/contracts/utils/math/Math.sol";
⋮----
contract AddressRequests is IAddressRequests {
⋮----
/**
     * @inheritdoc IAddressRequests
     */
function requestIdsLength() external view returns (uint256) {
⋮----
function requestIds(uint256 index, uint256 maxRequestIds) external view returns (address[] memory requestIds_) {
⋮----
function _addRequestId(
⋮----
function _removeRequestId(
```

## File: src/contracts/common/SelfDestruct.sol

```solidity
// SPDX-License-Identifier: MIT
⋮----
contract SelfDestruct {
```

## File: src/contracts/common/UintRequests.sol

```solidity
// SPDX-License-Identifier: MIT
⋮----
import {IUintRequests} from "../../interfaces/common/IUintRequests.sol";
⋮----
import {EnumerableSet} from "@openzeppelin/contracts/utils/structs/EnumerableSet.sol";
import {Math} from "@openzeppelin/contracts/utils/math/Math.sol";
⋮----
contract UintRequests is IUintRequests {
⋮----
/**
     * @inheritdoc IUintRequests
     */
function requestIdsLength() external view returns (uint256) {
⋮----
function requestIds(uint256 index, uint256 maxRequestIds) external view returns (uint256[] memory requestIds_) {
⋮----
function _addRequestId(
⋮----
function _removeRequestId(
```

## File: src/contracts/router/BurnerRouter.sol

```solidity
// SPDX-License-Identifier: MIT
⋮----
import {IBurnerRouter} from "../../interfaces/router/IBurnerRouter.sol";
⋮----
import {IBurner} from "@symbioticfi/core/src/interfaces/slasher/IBurner.sol";
import {Subnetwork} from "@symbioticfi/core/src/contracts/libraries/Subnetwork.sol";
⋮----
import {OwnableUpgradeable} from "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol";
import {SafeERC20, IERC20} from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import {Time} from "@openzeppelin/contracts/utils/types/Time.sol";
⋮----
contract BurnerRouter is OwnableUpgradeable, IBurnerRouter {
⋮----
/**
     * @inheritdoc IBurnerRouter
     */
⋮----
/**
     * @inheritdoc IBurner
     */
function onSlash(
⋮----
uint256, /* amount */
uint48 /* captureTimestamp */
⋮----
function triggerTransfer(
⋮----
function setGlobalReceiver(
⋮----
function acceptGlobalReceiver() external {
⋮----
function setNetworkReceiver(address network, address receiver) external onlyOwner {
⋮----
function acceptNetworkReceiver(
⋮----
function setOperatorNetworkReceiver(address network, address operator, address receiver) external onlyOwner {
⋮----
function acceptOperatorNetworkReceiver(address network, address operator) external {
⋮----
function setDelay(
⋮----
function acceptDelay() external {
⋮----
function initialize(
⋮----
function _getReceiver(address network, address operator) internal view returns (address receiver) {
⋮----
function _setReceiver(
⋮----
function _acceptReceiver(Address storage currentReceiver, PendingAddress storage pendingReceiver) internal {
⋮----
function _tryAcceptDelay() internal {
```

## File: src/contracts/router/BurnerRouterFactory.sol

```solidity
// SPDX-License-Identifier: MIT
⋮----
import {BurnerRouter} from "./BurnerRouter.sol";
⋮----
import {IBurnerRouterFactory} from "../../interfaces/router/IBurnerRouterFactory.sol";
⋮----
import {Registry} from "@symbioticfi/core/src/contracts/common/Registry.sol";
⋮----
import {Clones} from "@openzeppelin/contracts/proxy/Clones.sol";
⋮----
contract BurnerRouterFactory is Registry, IBurnerRouterFactory {
⋮----
/**
     * @inheritdoc IBurnerRouterFactory
     */
function create(
```

## File: src/interfaces/burners/ETHx/IETHx_Burner.sol

```solidity
// SPDX-License-Identifier: MIT
⋮----
import {IUintRequests} from "../../common/IUintRequests.sol";
⋮----
interface IETHx_Burner is IUintRequests {
⋮----
/**
     * @notice Emitted when a withdrawal is triggered.
     * @param caller caller of the function
     * @param requestId request ID that was created
     */
event TriggerWithdrawal(address indexed caller, uint256 requestId);
⋮----
/**
     * @notice Emitted when a burn is triggered.
     * @param caller caller of the function
     * @param requestId request ID of the withdrawal that was claimed and burned
     */
event TriggerBurn(address indexed caller, uint256 requestId);
⋮----
/**
     * @notice Get an address of the collateral.
     */
function COLLATERAL() external view returns (address);
⋮----
/**
     * @notice Get an address of the Stader Config contract.
     */
function STADER_CONFIG() external view returns (address);
⋮----
/**
     * @notice Get an address of the User Withdraw Manager contract.
     */
function USER_WITHDRAW_MANAGER() external view returns (address);
⋮----
/**
     * @notice Get an address of the Stake Pools Manager contract.
     */
function STAKE_POOLS_MANAGER() external view returns (address);
⋮----
/**
     * @notice Trigger a withdrawal of ETH from the collateral's underlying asset.
     * @param maxWithdrawalAmount maximum amount of ETHx it is possible to withdraw in one request
     * @return requestId request ID that was created
     */
function triggerWithdrawal(
⋮----
/**
     * @notice Trigger a claim and a burn of ETH.
     * @param requestId request ID of the withdrawal to process
     */
function triggerBurn(
```

## File: src/interfaces/burners/ETHx/IStaderConfig.sol

```solidity
// SPDX-License-Identifier: MIT
⋮----
interface IStaderConfig {
function getUserWithdrawManager() external view returns (address);
⋮----
function getStakePoolManager() external view returns (address);
⋮----
function getMinWithdrawAmount() external view returns (uint256);
⋮----
function getMaxWithdrawAmount() external view returns (uint256);
⋮----
function getMinBlockDelayToFinalizeWithdrawRequest() external view returns (uint256);
```

## File: src/interfaces/burners/ETHx/IStaderStakePoolsManager.sol

```solidity
// SPDX-License-Identifier: MIT
⋮----
interface IStaderStakePoolsManager {
// returns the amount of share corresponding to `_assets` assets
function previewDeposit(
⋮----
// return the amount of assets corresponding to `_shares` shares
function previewWithdraw(
```

## File: src/interfaces/burners/ETHx/IUserWithdrawalManager.sol

```solidity
// SPDX-License-Identifier: MIT
⋮----
interface IUserWithdrawalManager {
function nextRequestId() external view returns (uint256);
⋮----
function nextRequestIdToFinalize() external view returns (uint256);
⋮----
/**
     * @notice put a withdrawal request
     * @param _ethXAmount amount of ethX shares to withdraw
     * @param _owner owner of withdraw request to redeem
     * @return requestId
     */
function requestWithdraw(uint256 _ethXAmount, address _owner) external returns (uint256);
⋮----
/**
     * @notice finalize user requests
     * @dev check for safeMode to finalizeRequest
     */
function finalizeUserWithdrawalRequest() external;
⋮----
/**
     * @notice transfer the eth of finalized request to recipient and delete the request
     * @param _requestId request id to redeem
     */
function claim(
```

## File: src/interfaces/burners/mETH/ImETH_Burner.sol

```solidity
// SPDX-License-Identifier: MIT
⋮----
import {IUintRequests} from "../../common/IUintRequests.sol";
⋮----
interface ImETH_Burner is IUintRequests {
/**
     * @notice Emitted when a withdrawal is triggered.
     * @param caller caller of the function
     * @param requestId request ID that was created
     */
event TriggerWithdrawal(address indexed caller, uint256 requestId);
⋮----
/**
     * @notice Emitted when a burn is triggered.
     * @param caller caller of the function
     * @param requestId request ID of the withdrawal that was claimed and burned
     */
event TriggerBurn(address indexed caller, uint256 requestId);
⋮----
/**
     * @notice Get an address of the collateral.
     */
function COLLATERAL() external view returns (address);
⋮----
/**
     * @notice Get an address of the Mantle Staking contract.
     */
function STAKING() external view returns (address);
⋮----
/**
     * @notice Trigger a withdrawal of ETH from the collateral's underlying asset.
     * @return requestId request ID that was created
     */
function triggerWithdrawal() external returns (uint256 requestId);
⋮----
/**
     * @notice Trigger a claim and a burn of ETH.
     * @param requestId request ID of the withdrawal to process
     */
function triggerBurn(
```

## File: src/interfaces/burners/mETH/IMETH.sol

```solidity
// SPDX-License-Identifier: MIT
⋮----
interface IMETH {
/// @notice The staking contract which has permissions to mint tokens.
function stakingContract() external view returns (address);
⋮----
/// @notice Mint mETH to the staker.
/// @param staker The address of the staker.
/// @param amount The amount of tokens to mint.
/// @dev Expected to be called during the stake operation.
function mint(address staker, uint256 amount) external;
```

## File: src/interfaces/burners/mETH/IStaking.sol

```solidity
// SPDX-License-Identifier: MIT
⋮----
interface IStaking {
/// @notice The minimum amount of mETH users can unstake.
function minimumUnstakeBound() external view returns (uint256);
⋮----
/// @notice Converts from ETH to mETH using the current exchange rate.
/// The exchange rate is given by the total supply of mETH and total ETH controlled by the protocol.
function mETHToETH(
⋮----
/// @notice Interface for users to submit a request to unstake.
/// @dev Transfers the specified amount of mETH to the staking contract and locks it there until it is burned on
/// request claim. The staking contract must therefore be approved to move the user's mETH on their behalf.
/// @param methAmount The amount of mETH to unstake.
/// @param minETHAmount The minimum amount of ETH that the user expects to receive.
/// @return The request ID.
function unstakeRequest(uint128 methAmount, uint128 minETHAmount) external returns (uint256);
⋮----
/// @notice Interface for users to claim their finalized and filled unstaking requests.
/// @dev See also {UnstakeRequestsManager} for a more detailed explanation of finalization and request filling.
function claimUnstakeRequest(
```

## File: src/interfaces/burners/rETH/IrETH_Burner.sol

```solidity
// SPDX-License-Identifier: MIT
⋮----
interface IrETH_Burner {
/**
     * @notice Emitted when a burn is triggered.
     * @param caller caller of the function
     * @param assetAmount amount of collateral that was withdrawn
     * @param ethAmount amount of ETH that was burned
     */
event TriggerBurn(address indexed caller, uint256 assetAmount, uint256 ethAmount);
⋮----
/**
     * @notice Get an address of the collateral.
     */
function COLLATERAL() external view returns (address);
⋮----
/**
     * @notice Trigger a claim and a burn of ETH.
     * @param amount amount of collateral to burn
     */
function triggerBurn(
```

## File: src/interfaces/burners/rETH/IRocketTokenRETH.sol

```solidity
// SPDX-License-Identifier: MIT
⋮----
interface IRocketTokenRETH {
// Calculate the amount of ETH backing an amount of rETH
function getEthValue(
⋮----
// Calculate the amount of rETH backed by an amount of ETH
function getRethValue(
⋮----
// Get the total amount of collateral available
// Includes rETH contract balance & excess deposit pool balance
function getTotalCollateral() external view returns (uint256);
⋮----
// Mint rETH
// Only accepts calls from the RocketDepositPool contract
function mint(uint256 _ethAmount, address _to) external;
⋮----
// Burn rETH for ETH
function burn(
```

## File: src/interfaces/burners/sfrxETH/IFraxEtherRedemptionQueue.sol

```solidity
// SPDX-License-Identifier: MIT
⋮----
interface IFraxEtherRedemptionQueue {
/// @notice State of Frax's frxETH redemption queue
/// @return nextNftId Autoincrement for the NFT id
/// @return queueLengthSecs Current wait time (in seconds) a new redeemer would have. Should be close to Beacon.
/// @return redemptionFee Redemption fee given as a percentage with 1e6 precision
/// @return earlyExitFee Early NFT back to frxETH exit fee given as a percentage with 1e6 precision
function redemptionQueueState()
⋮----
/// @notice Enter the queue for redeeming sfrxEth to frxETH at the current rate, then frxETH to ETH 1-to-1. Must have approved or permitted first.
/// @notice Will generate a FrxETHRedemptionTicket NFT that can be redeemed for the actual ETH later.
/// @param _recipient Recipient of the NFT. Must be ERC721 compatible if a contract
/// @param _sfrxEthAmount Amount of sfrxETH to redeem (in shares / balanceOf)
/// @param _nftId The ID of the FrxEthRedemptionTicket NFT
/// @dev Must call approve/permit on frxEth contract prior to this call
function enterRedemptionQueueViaSfrxEth(
⋮----
/// @notice Redeems a FrxETHRedemptionTicket NFT for ETH. Must have reached the maturity date first.
/// @param _nftId The ID of the NFT
/// @param _recipient The recipient of the redeemed ETH
function burnRedemptionTicketNft(uint256 _nftId, address payable _recipient) external;
```

## File: src/interfaces/burners/sfrxETH/IsfrxETH_Burner.sol

```solidity
// SPDX-License-Identifier: MIT
⋮----
import {IUintRequests} from "../../common/IUintRequests.sol";
⋮----
interface IsfrxETH_Burner is IUintRequests {
/**
     * @notice Emitted when a withdrawal is triggered.
     * @param caller caller of the function
     * @param requestId request ID that was created
     */
event TriggerWithdrawal(address indexed caller, uint256 requestId);
⋮----
/**
     * @notice Emitted when a burn is triggered.
     * @param caller caller of the function
     * @param requestId request ID of the withdrawal that was claimed and burned
     */
event TriggerBurn(address indexed caller, uint256 requestId);
⋮----
/**
     * @notice Get an address of the collateral.
     */
function COLLATERAL() external view returns (address);
⋮----
/**
     * @notice Get an address of the Frax Ether Redemption Queue.
     */
function FRAX_ETHER_REDEMPTION_QUEUE() external view returns (address);
⋮----
/**
     * @notice Trigger a withdrawal of ETH from the collateral's underlying asset.
     * @return requestId request ID that was created
     */
function triggerWithdrawal() external returns (uint256 requestId);
⋮----
/**
     * @notice Trigger a claim and a burn of ETH.
     * @param requestId request ID of the withdrawal to process
     */
function triggerBurn(
```

## File: src/interfaces/burners/sUSDe/IEthenaMinting.sol

```solidity
// SPDX-License-Identifier: MIT
⋮----
interface IEthenaMinting {
⋮----
/// @notice tracks asset type (STABLE or ASSET)
⋮----
/// @notice tracks if the asset is active
⋮----
/// @notice max mint per block this given asset
⋮----
/// @notice max redeem per block this given asset
⋮----
/// @notice USDe minted per block / per asset per block
⋮----
/// @notice USDe redeemed per block / per asset per block
⋮----
/// @notice max USDe that can be minted across all assets within a single block.
⋮----
/// @notice max USDe that can be redeemed across all assets within a single block.
⋮----
/// @notice hash an Order struct
function hashOrder(
⋮----
/// @notice total USDe that can be minted/redeemed across all assets per single block.
function totalPerBlockPerAsset(uint256 blockNumber, address asset) external view returns (BlockTotals memory);
⋮----
function totalPerBlock(
⋮----
/// @notice global single block totals
function globalConfig() external view returns (GlobalConfig memory);
⋮----
function tokenConfig(
⋮----
/// @notice Adds a benefactor address to the benefactor whitelist
function addWhitelistedBenefactor(
⋮----
/**
     * @notice Redeem stablecoins for assets
     * @param order struct containing order details and confirmation from server
     * @param signature signature of the taker
     */
function redeem(Order calldata order, Signature calldata signature) external;
```

## File: src/interfaces/burners/sUSDe/IsUSDe_Burner.sol

```solidity
// SPDX-License-Identifier: MIT
⋮----
import {IAddressRequests} from "../../common/IAddressRequests.sol";
⋮----
interface IsUSDe_Burner is IAddressRequests {
⋮----
/**
     * @notice Emitted when a withdrawal is triggered.
     * @param caller caller of the function
     * @param amount amount of the collateral to be withdrawn
     * @param requestId request ID that was created
     */
event TriggerWithdrawal(address indexed caller, uint256 amount, address requestId);
⋮----
/**
     * @notice Emitted when a claim is triggered.
     * @param caller caller of the function
     * @param requestId request ID of the withdrawal that was claimed
     */
event TriggerClaim(address indexed caller, address requestId);
⋮----
/**
     * @notice Emitted when an instant claim is triggered.
     * @param caller caller of the function
     * @param amount amount of the collateral that was unwrapped
     */
event TriggerInstantClaim(address indexed caller, uint256 amount);
⋮----
/**
     * @notice Emitted when a burn is triggered.
     * @param caller caller of the function
     * @param asset address of the asset burned (except sUSDe and USDe)
     * @param amount amount of the asset burned
     */
event TriggerBurn(address indexed caller, address indexed asset, uint256 amount);
⋮----
/**
     * @notice Get an address of the collateral.
     */
function COLLATERAL() external view returns (address);
⋮----
/**
     * @notice Get an address of the USDe contract.
     */
function USDE() external view returns (address);
⋮----
/**
     * @notice Trigger a withdrawal of USDe from the collateral's underlying asset.
     * @return requestId request ID that was created
     */
function triggerWithdrawal() external returns (address requestId);
⋮----
/**
     * @notice Trigger a claim of USDe (if `cooldownDuration` didn't equal zero while triggering withdrawal).
     * @param requestId request ID of the withdrawal to process
     */
function triggerClaim(
⋮----
/**
     * @notice Trigger an instant claim of USDe (if `cooldownDuration` equals zero).
     */
function triggerInstantClaim() external;
⋮----
/**
     * @notice Trigger a burn of any asset lying on this contract except sUSDe and USDe (after USDe redemption).
     * @param asset address of the asset to burn
     */
function triggerBurn(
⋮----
/**
     * @notice Approve the USDe to a minter (if a new minter appears).
     */
function approveUSDeMinter() external;
```

## File: src/interfaces/burners/sUSDe/ISUSDe.sol

```solidity
// SPDX-License-Identifier: MIT
⋮----
interface ISUSDe {
/**
     * @dev See {IERC4626-asset}.
     */
function asset() external view returns (address);
⋮----
function cooldownDuration() external view returns (uint24);
⋮----
/// @notice redeem shares into assets and starts a cooldown to claim the converted underlying asset
/// @param shares shares to redeem
function cooldownShares(
⋮----
/**
     * @dev See {IERC4626-previewRedeem}.
     */
function previewRedeem(
⋮----
/// @notice Set cooldown duration. If cooldown duration is set to zero, the StakedUSDeV2 behavior changes to follow ERC4626 standard and disables cooldownShares and cooldownAssets methods. If cooldown duration is greater than zero, the ERC4626 withdrawal and redeem functions are disabled, breaking the ERC4626 standard, and enabling the cooldownShares and the cooldownAssets functions.
/// @param duration Duration of the cooldown
function setCooldownDuration(
⋮----
/**
     * @dev See {IERC4626-deposit}.
     */
function deposit(uint256 assets, address receiver) external returns (uint256);
⋮----
/**
     * @dev See {IERC4626-redeem}.
     */
function redeem(uint256 shares, address receiver, address _owner) external returns (uint256);
⋮----
/// @notice Claim the staking amount after the cooldown has finished. The address can only retire the full amount of assets.
/// @dev unstake can be called after cooldown have been set to 0, to let accounts to be able to claim remaining assets locked at Silo
/// @param receiver Address to send the assets by the staker
function unstake(
```

## File: src/interfaces/burners/sUSDe/IUSDe.sol

```solidity
// SPDX-License-Identifier: MIT
⋮----
interface IUSDe {
function minter() external view returns (address);
⋮----
function mint(address account, uint256 amount) external;
⋮----
/**
     * @dev Destroys a `value` amount of tokens from the caller.
     *
     * See {ERC20-_burn}.
     */
function burn(
```

## File: src/interfaces/burners/swETH/IswETH_Burner.sol

```solidity
// SPDX-License-Identifier: MIT
⋮----
import {IUintRequests} from "../../common/IUintRequests.sol";
⋮----
interface IswETH_Burner is IUintRequests {
⋮----
/**
     * @notice Emitted when a withdrawal is triggered.
     * @param caller caller of the function
     * @param firstRequestId first request ID that was created
     * @param lastRequestId last request ID that was created
     */
event TriggerWithdrawal(address indexed caller, uint256 firstRequestId, uint256 lastRequestId);
⋮----
/**
     * @notice Emitted when a burn is triggered.
     * @param caller caller of the function
     * @param requestId request ID of the withdrawal that was claimed and burned
     */
event TriggerBurn(address indexed caller, uint256 requestId);
⋮----
/**
     * @notice Get an address of the collateral.
     */
function COLLATERAL() external view returns (address);
⋮----
/**
     * @notice Get an address of the Swell Exit contract.
     */
function SWEXIT() external view returns (address);
⋮----
/**
     * @notice Trigger a withdrawal of ETH from the collateral's underlying asset.
     * @param maxRequests maximum number of withdrawal requests to create
     * @return firstRequestId first request ID that was created
     * @return lastRequestId last request ID that was created
     */
function triggerWithdrawal(
⋮----
/**
     * @notice Trigger a claim and a burn of ETH.
     * @param requestId request ID of the withdrawal to process
     */
function triggerBurn(
```

## File: src/interfaces/burners/swETH/ISwETH.sol

```solidity
// SPDX-License-Identifier: MIT
⋮----
interface ISwETH {
function deposit() external payable;
```

## File: src/interfaces/burners/swETH/ISwEXIT.sol

```solidity
// SPDX-License-Identifier: MIT
⋮----
interface ISwEXIT {
function getLastTokenIdCreated() external view returns (uint256);
⋮----
function withdrawRequestMaximum() external view returns (uint256);
⋮----
function withdrawRequestMinimum() external view returns (uint256);
⋮----
function processWithdrawals(
⋮----
function createWithdrawRequest(
⋮----
function finalizeWithdrawal(
```

## File: src/interfaces/burners/wstETH/IWithdrawalQueue.sol

```solidity
// SPDX-License-Identifier: MIT
⋮----
interface IWithdrawalQueue {
/// @notice Lido stETH token address
function STETH() external view returns (address);
⋮----
/// @notice minimal amount of stETH that is possible to withdraw
function MIN_STETH_WITHDRAWAL_AMOUNT() external view returns (uint256);
⋮----
/// @notice maximum amount of stETH that is possible to withdraw by a single request
/// Prevents accumulating too much funds per single request fulfillment in the future.
/// @dev To withdraw larger amounts, it's recommended to split it to several requests
function MAX_STETH_WITHDRAWAL_AMOUNT() external view returns (uint256);
⋮----
/// @notice id of the last request
///  NB! requests are indexed from 1, so it returns 0 if there is no requests in the queue
function getLastRequestId() external view returns (uint256);
⋮----
/// @notice Request the batch of stETH for withdrawal. Approvals for the passed amounts should be done before.
/// @param _amounts an array of stETH amount values.
///  The standalone withdrawal request will be created for each item in the passed list.
/// @param _owner address that will be able to manage the created requests.
///  If `address(0)` is passed, `msg.sender` will be used as owner.
/// @return requestIds an array of the created withdrawal request ids
function requestWithdrawals(
⋮----
/// @notice Claim a batch of withdrawal requests if they are finalized sending locked ether to the owner
/// @param _requestIds array of request ids to claim
/// @param _hints checkpoint hint for each id. Can be obtained with `findCheckpointHints()`
/// @dev
///  Reverts if requestIds and hints arrays length differs
///  Reverts if any requestId or hint in arguments are not valid
///  Reverts if any request is not finalized or already claimed
///  Reverts if msg sender is not an owner of the requests
function claimWithdrawals(uint256[] calldata _requestIds, uint256[] calldata _hints) external;
⋮----
/// @notice Claim one`_requestId` request once finalized sending locked ether to the owner
/// @param _requestId request id to claim
/// @dev use unbounded loop to find a hint, which can lead to OOG
⋮----
///  Reverts if requestId or hint are not valid
///  Reverts if request is not finalized or already claimed
///  Reverts if msg sender is not an owner of request
function claimWithdrawal(
⋮----
/// @notice Finalize requests from last finalized one up to `_lastRequestIdToBeFinalized`
/// @dev ether to finalize all the requests should be calculated using `prefinalize()` and sent along
function finalize(uint256 _lastRequestIdToBeFinalized, uint256 _maxShareRate) external payable;
⋮----
/// @notice length of the checkpoint array. Last possible value for the hint.
///  NB! checkpoints are indexed from 1, so it returns 0 if there is no checkpoints
function getLastCheckpointIndex() external view returns (uint256);
⋮----
/// @notice Finds the list of hints for the given `_requestIds` searching among the checkpoints with indices
///  in the range  `[_firstIndex, _lastIndex]`.
///  NB! Array of request ids should be sorted
///  NB! `_firstIndex` should be greater than 0, because checkpoint list is 1-based array
///  Usage: findCheckpointHints(_requestIds, 1, getLastCheckpointIndex())
/// @param _requestIds ids of the requests sorted in the ascending order to get hints for
/// @param _firstIndex left boundary of the search range. Should be greater than 0
/// @param _lastIndex right boundary of the search range. Should be less than or equal to getLastCheckpointIndex()
/// @return hintIds array of hints used to find required checkpoint for the request
function findCheckpointHints(
```

## File: src/interfaces/burners/wstETH/IwstETH_Burner.sol

```solidity
// SPDX-License-Identifier: MIT
⋮----
import {IUintRequests} from "../../common/IUintRequests.sol";
⋮----
interface IwstETH_Burner is IUintRequests {
⋮----
/**
     * @notice Emitted when a withdrawal is triggered.
     * @param caller caller of the function
     * @param requestIds request IDs that were created
     */
event TriggerWithdrawal(address indexed caller, uint256[] requestIds);
⋮----
/**
     * @notice Emitted when a burn is triggered.
     * @param caller caller of the function
     * @param requestId request ID of the withdrawal that was claimed and burned
     */
event TriggerBurn(address indexed caller, uint256 requestId);
⋮----
/**
     * @notice Emitted when a batch burn is triggered.
     * @param caller caller of the function
     * @param requestIds request IDs of the withdrawals that were claimed and burned
     */
event TriggerBurnBatch(address indexed caller, uint256[] requestIds);
⋮----
/**
     * @notice Get an address of the collateral.
     */
function COLLATERAL() external view returns (address);
⋮----
/**
     * @notice Get an address of the stETH token.
     */
function STETH() external view returns (address);
⋮----
/**
     * @notice Get an address of the Lido Withdrawal Queue.
     */
function LIDO_WITHDRAWAL_QUEUE() external view returns (address);
⋮----
/**
     * @notice Get a minimum amount of stETH that can be withdrawn at a request.
     */
function MIN_STETH_WITHDRAWAL_AMOUNT() external view returns (uint256);
⋮----
/**
     * @notice Get a maximum amount of stETH that can be withdrawn at a request.
     */
function MAX_STETH_WITHDRAWAL_AMOUNT() external view returns (uint256);
⋮----
/**
     * @notice Trigger a withdrawal of ETH from the collateral's underlying asset.
     * @param maxRequests maximum number of withdrawal requests to create
     * @return requestIds request IDs that were created
     */
function triggerWithdrawal(
⋮----
/**
     * @notice Trigger a claim and a burn of ETH.
     * @param requestId request ID of the withdrawal to process
     */
function triggerBurn(
⋮----
/**
     * @notice Trigger a batch claim and burn of ETH.
     * @param requestIds request IDs of the withdrawals to process
     * @param hints hints for the requests
     */
function triggerBurnBatch(uint256[] calldata requestIds, uint256[] calldata hints) external;
```

## File: src/interfaces/burners/wstETH/IWstETH.sol

```solidity
// SPDX-License-Identifier: MIT
⋮----
interface IWstETH {
/**
     * @notice Get amount of stETH for a given amount of wstETH
     * @param _wstETHAmount amount of wstETH
     * @return Amount of stETH for a given wstETH amount
     */
function getStETHByWstETH(
⋮----
/**
     * @notice Exchanges wstETH to stETH
     * @param _wstETHAmount amount of wstETH to uwrap in exchange for stETH
     * @dev Requirements:
     *  - `_wstETHAmount` must be non-zero
     *  - msg.sender must have at least `_wstETHAmount` wstETH.
     * @return Amount of stETH user receives after unwrap
     */
function unwrap(
```

## File: src/interfaces/common/IAddressRequests.sol

```solidity
// SPDX-License-Identifier: MIT
⋮----
interface IAddressRequests {
⋮----
/**
     * @notice Get the number of unprocessed request IDs.
     */
function requestIdsLength() external view returns (uint256);
⋮----
/**
     * @notice Get a list of unprocessed request IDs.
     * @param index index of the first request ID
     * @param maxRequestIds maximum number of request IDs to return
     * @return requestIds request IDs
     */
function requestIds(uint256 index, uint256 maxRequestIds) external view returns (address[] memory requestIds);
```

## File: src/interfaces/common/IUintRequests.sol

```solidity
// SPDX-License-Identifier: MIT
⋮----
interface IUintRequests {
⋮----
/**
     * @notice Get the number of unprocessed request IDs.
     */
function requestIdsLength() external view returns (uint256);
⋮----
/**
     * @notice Get a list of unprocessed request IDs.
     * @param index index of the first request ID
     * @param maxRequestIds maximum number of request IDs to return
     * @return requestIds request IDs
     */
function requestIds(uint256 index, uint256 maxRequestIds) external view returns (uint256[] memory requestIds);
```

## File: src/interfaces/router/IBurnerRouter.sol

```solidity
// SPDX-License-Identifier: MIT
⋮----
import {IBurner} from "@symbioticfi/core/src/interfaces/slasher/IBurner.sol";
⋮----
interface IBurnerRouter is IBurner {
⋮----
/**
     * @notice Structure for a value of `address` type.
     * @param value value of `address` type
     */
⋮----
/**
     * @notice Structure for a pending value of `address` type.
     * @param value pending value of `address` type
     * @param timestamp timestamp since which the pending value can be used
     */
⋮----
/**
     * @notice Structure for a value of `uint48` type.
     * @param value value of `uint48` type
     */
⋮----
/**
     * @notice Structure for a pending value of `uint48` type.
     * @param value pending value of `uint48` type
     * @param timestamp timestamp since which the pending value can be used
     */
⋮----
/**
     * @notice Structure used to set a `receiver` for a slashing `network`.
     * @param network address of the slashing network
     * @param receiver address of the recipient of the slashed funds
     */
⋮----
/**
     * @notice Structure used to set a `receiver` for a slashed `operator` by a slashing `network`.
     * @param network address of the slashing network
     * @param operator address of the slashed operator
     * @param receiver address of the recipient of the slashed funds
     */
⋮----
/**
     * @notice Initial parameters needed for a router deployment.
     * @param owner manager of the router's receivers
     * @param collateral router's underlying collateral (MUST be the same as the vault's underlying collateral)
     * @param delay delay for setting a new receiver or changing the delay itself (in seconds)
     * @param globalReceiver address of the global receiver of the slashed funds (if no receiver is set for a network or operator)
     * @param networkReceivers array of network receivers to set on deployment (network => receiver)
     * @param operatorNetworkReceivers array of operator network receivers to set on deployment (network-operator => receiver)
     */
⋮----
/**
     * @notice Emitted when a transfer from the router to the receiver is triggered.
     * @param receiver address of the receiver
     * @param amount amount of the transfer
     */
event TriggerTransfer(address indexed receiver, uint256 amount);
⋮----
/**
     * @notice Emitted when a global receiver is set (becomes pending for a `delay`).
     * @param receiver address of the receiver
     */
event SetGlobalReceiver(address receiver);
⋮----
/**
     * @notice Emitted when a pending global receiver is accepted.
     */
event AcceptGlobalReceiver();
⋮----
/**
     * @notice Emitted when a network receiver is set (becomes pending for a `delay`).
     * @param network address of the network
     * @param receiver address of the receiver
     */
event SetNetworkReceiver(address indexed network, address receiver);
⋮----
/**
     * @notice Emitted when a pending network receiver is accepted.
     * @param network address of the network
     */
event AcceptNetworkReceiver(address indexed network);
⋮----
/**
     * @notice Emitted when an operator network receiver is set (becomes pending for a `delay`).
     * @param network address of the network
     * @param operator address of the operator
     * @param receiver address of the receiver
     */
event SetOperatorNetworkReceiver(address indexed network, address indexed operator, address receiver);
⋮----
/**
     * @notice Emitted when a pending operator network receiver is accepted.
     * @param network address of the network
     * @param operator address of the operator
     */
event AcceptOperatorNetworkReceiver(address indexed network, address indexed operator);
⋮----
/**
     * @notice Emitted when a delay is set (becomes pending for a `delay`).
     * @param delay new delay
     */
event SetDelay(uint48 delay);
⋮----
/**
     * @notice Emitted when a pending delay is accepted.
     */
event AcceptDelay();
⋮----
/**
     * @notice Get a router collateral.
     * @return address of the underlying collateral
     */
function collateral() external view returns (address);
⋮----
/**
     * @notice Get a router last checked balance.
     * @return last balance of the router
     */
function lastBalance() external view returns (uint256);
⋮----
/**
     * @notice Get a router delay.
     * @return delay for setting a new receiver or changing the delay itself (in seconds)
     */
function delay() external view returns (uint48);
⋮----
/**
     * @notice Get a router pending delay.
     * @return value pending delay
     * @return timestamp timestamp since which the pending delay can be used
     */
function pendingDelay() external view returns (uint48, uint48);
⋮----
/**
     * @notice Get a router global receiver.
     * @return address of the global receiver of the slashed funds
     */
function globalReceiver() external view returns (address);
⋮----
/**
     * @notice Get a router pending global receiver.
     * @return value pending global receiver
     * @return timestamp timestamp since which the pending global receiver can be used
     */
function pendingGlobalReceiver() external view returns (address, uint48);
⋮----
/**
     * @notice Get a router receiver for a slashing network.
     * @param network address of the slashing network
     * @return address of the receiver
     */
function networkReceiver(
⋮----
/**
     * @notice Get a router pending receiver for a slashing network.
     * @param network address of the slashing network
     * @return value pending receiver
     * @return timestamp timestamp since which the pending receiver can be used
     */
function pendingNetworkReceiver(
⋮----
/**
     * @notice Get a router receiver for a slashed operator by a slashing network.
     * @param network address of the slashing network
     * @param operator address of the slashed operator
     * @return address of the receiver
     */
function operatorNetworkReceiver(address network, address operator) external view returns (address);
⋮----
/**
     * @notice Get a router pending receiver for a slashed operator by a slashing network.
     * @param network address of the slashing network
     * @param operator address of the slashed operator
     * @return value pending receiver
     * @return timestamp timestamp since which the pending receiver can be used
     */
function pendingOperatorNetworkReceiver(
⋮----
/**
     * @notice Get a receiver balance of unclaimed collateral.
     * @param receiver address of the receiver
     * @return amount of the unclaimed collateral tokens
     */
function balanceOf(
⋮----
/**
     * @notice Trigger a transfer of the unclaimed collateral to the receiver.
     * @param receiver address of the receiver
     * @return amount of the transfer
     */
function triggerTransfer(
⋮----
/**
     * @notice Set a new global receiver of the slashed funds.
     * @param receiver address of the new receiver
     */
function setGlobalReceiver(
⋮----
/**
     * @notice Accept a pending global receiver.
     */
function acceptGlobalReceiver() external;
⋮----
/**
     * @notice Set a new receiver for a slashing network.
     * @param network address of the slashing network
     * @param receiver address of the new receiver
     */
function setNetworkReceiver(address network, address receiver) external;
⋮----
/**
     * @notice Accept a pending receiver for a slashing network.
     * @param network address of the slashing network
     */
function acceptNetworkReceiver(
⋮----
/**
     * @notice Set a new receiver for a slashed operator by a slashing network.
     * @param network address of the slashing network
     * @param operator address of the slashed operator
     * @param receiver address of the new receiver
     */
function setOperatorNetworkReceiver(address network, address operator, address receiver) external;
⋮----
/**
     * @notice Accept a pending receiver for a slashed operator by a slashing network.
     * @param network address of the slashing network
     * @param operator address of the slashed operator
     */
function acceptOperatorNetworkReceiver(address network, address operator) external;
⋮----
/**
     * @notice Set a new delay for setting a new receiver or changing the delay itself.
     * @param newDelay new delay (in seconds)
     */
function setDelay(
⋮----
/**
     * @notice Accept a pending delay.
     */
function acceptDelay() external;
```

## File: src/interfaces/router/IBurnerRouterFactory.sol

```solidity
// SPDX-License-Identifier: MIT
⋮----
import {IBurnerRouter} from "./IBurnerRouter.sol";
⋮----
import {IRegistry} from "@symbioticfi/core/src/interfaces/common/IRegistry.sol";
⋮----
interface IBurnerRouterFactory is IRegistry {
/**
     * @notice Create a burner router contract.
     * @param params initial parameters needed for a burner router contract deployment
     * @return address of the created burner router contract
     */
function create(
```

## File: .env.example

```
ETH_RPC_URL=
ETH_RPC_URL_HOLESKY=
ETHERSCAN_API_KEY=
```

## File: .gitmodules

```
[submodule "lib/forge-std"]
	path = lib/forge-std
	url = https://github.com/foundry-rs/forge-std
[submodule "lib/openzeppelin-contracts"]
	path = lib/openzeppelin-contracts
	url = https://github.com/OpenZeppelin/openzeppelin-contracts
[submodule "lib/openzeppelin-contracts-upgradeable"]
	path = lib/openzeppelin-contracts-upgradeable
	url = https://github.com/OpenZeppelin/openzeppelin-contracts-upgradeable
[submodule "lib/core"]
	path = lib/core
	url = https://github.com/symbioticfi/core
```

## File: foundry.toml

```toml
[profile.default]
evm_version = "cancun"
solc = "0.8.25"
optimizer = true
optimizer_runs = 200
via_ir = true
src = "src"
out = "out"
libs = ["lib"]
fs_permissions = [{ access = "read-write", path = "./"}]
gas_reports = ["*"]
gas_limit = "18446744073709551615"

[rpc_endpoints]
mainnet = "${ETH_RPC_URL}"
holesky = "${ETH_RPC_URL_HOLESKY}"

[fmt]
bracket_spacing = false
int_types = "long"
line_length = 120
multiline_func_header = "params_first"
number_underscore = "thousands"
quote_style = "double"
tab_width = 4

[fuzz]
runs = 4096
max_test_rejects = 262144

# See more config options https://github.com/foundry-rs/foundry/blob/master/crates/config/README.md#all-options
```

## File: LICENSE

```
MIT License

Copyright (c) 2024 Symbiotic

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
```

## File: package.json

```json
{
    "name": "@symbioticfi/burners",
    "version": "1.0.0",
    "description": "Symbiotic Burners repository contains an implementation of Burner Router allowing the construction of flexible on-slash burning mechanics and several pure Burners for different assets.",
    "homepage": "https://symbiotic.fi/",
    "bugs": "https://github.com/symbioticfi/burners/issues",
    "license": "MIT",
    "author": "Symbiotic Team",
    "files": ["src/**/*", "test/mocks/**/*", "out/**/*.json"],
    "repository": {
        "type": "git",
        "url": "https://github.com/symbioticfi/burners.git"
    },
    "keywords": ["solidity", "ethereum", "smart", "contracts", "security"],
    "dependencies": {
        "@openzeppelin/contracts": "5.0.2",
        "@openzeppelin/contracts-upgradeable": "5.0.2",
        "@symbioticfi/core": "1.0.0-devnet.9"
    }
}
```

## File: README.md

````markdown
**[Symbiotic Protocol](https://symbiotic.fi) is an extremely flexible and permissionless shared security system.**

This repository contains Symbiotic Default Burners contracts.

[![Ask DeepWiki](https://deepwiki.com/badge.svg)](https://deepwiki.com/symbioticfi/burners)

## Technical Documentation

Technical documentation can be found [here](./specs).

## Security

Security audits can be found [here](./audits).

Not included files:

- [`src/contracts/burners/sUSDe`](src/contracts/burners/sUSDe)

## Usage

### Env

Create `.env` file using a template:

```
ETH_RPC_URL=
ETH_RPC_URL_HOLESKY=
ETHERSCAN_API_KEY=
```

\* ETH_RPC_URL is optional.<br/>\* ETH_RPC_URL_HOLESKY is optional.<br/>\* ETHERSCAN_API_KEY is optional.

### Build

```shell
forge build
```

### Test

```shell
forge test
```

### Format

```shell
forge fmt
```

### Gas Snapshots

```shell
forge snapshot
```
````

## File: remappings.txt

```
forge-std/=lib/forge-std/src/
@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/
@openzeppelin/contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/contracts/
@symbioticfi/core/=lib/core/
```
