Skip to content
Verified contractPartialLicenseRef-BUSL

BabylonSpokeInstance

Address0x2c2167aa1f1eeb2e65c92d9bf9130185d3f188c4
Balance

0 ETH

 

Transactions

0

 

Compiler

solc 0.8.28

 

Same code

Only this contract

 

Details

Compiler
solc 0.8.28+commit.7893614a
Language
solidity
Optimization
Yes, 450 runs
EVM version
cancun
Via IR
yes
License
LicenseRef-BUSL
Match
Partialcreation code: yes, runtime code: yes
Verified on Sourcify
Created in block
26,394,302
Creation transaction
0x8689796a04…77f8d51bdf
Libraries
src/spoke/libraries/LiquidationLogic.sol:LiquidationLogic0x88df…deb8dbsrc/spoke/libraries/BabylonLiquidationLogic.sol:BabylonLiquidationLogic0x86ca…6e9b96

61 files

The source code is large: one file is shown at a time. Choose a file in the list.

src/spoke/instances/BabylonSpokeInstance.sol

// SPDX-License-Identifier: LicenseRef-BUSL
pragma solidity 0.8.28;

import {BabylonSpoke} from 'src/spoke/BabylonSpoke.sol';

/// @title BabylonSpokeInstance
/// @author Aave Labs
/// @notice Implementation contract for the BabylonSpoke.
contract BabylonSpokeInstance is BabylonSpoke {
  uint64 public constant SPOKE_REVISION = 1;

  /// @dev Constructor.
  /// @dev During upgrade, must ensure that the new oracle is supporting existing assets on the Spoke and the replaced oracle.
  /// @param oracle_ The address of the oracle.
  /// @param liquidationManager_ The only address allowed to perform liquidations on this Spoke.
  /// @param managedCollateralReserveId_ The identifier of the only reserve usable as collateral.
  constructor(
    address oracle_,
    address liquidationManager_,
    uint256 managedCollateralReserveId_
  ) BabylonSpoke(oracle_, liquidationManager_, managedCollateralReserveId_) {
    _disableInitializers();
  }

  /// @notice Initializer.
  /// @dev The authority contract must implement the `AccessManaged` interface for access control.
  /// @dev Reverts with `UnsupportedBorrowableCollateral` if the managed collateral reserve is already listed as borrowable.
  /// @param authority The address of the authority contract which manages permissions.
  function initialize(address authority) external override reinitializer(SPOKE_REVISION) {
    emit SetSpokeImmutables(ORACLE, MAX_USER_RESERVES_LIMIT);
    emit SetBabylonSpokeImmutables(LIQUIDATION_MANAGER, MANAGED_COLLATERAL_RESERVE_ID);
    _validateManagedCollateralReserve(MANAGED_COLLATERAL_RESERVE_ID);

    require(authority != address(0), InvalidAddress());
    __AccessManaged_init(authority);
    if (_liquidationConfig.targetHealthFactor == 0) {
      _liquidationConfig.targetHealthFactor = HEALTH_FACTOR_LIQUIDATION_THRESHOLD;
      emit UpdateLiquidationConfig(_liquidationConfig);
    }
  }
}
Compiler settingsShow
{
  "viaIR": true,
  "metadata": {
    "appendCBOR": true,
    "bytecodeHash": "none",
    "useLiteralContent": false
  },
  "libraries": {
    "src/spoke/libraries/LiquidationLogic.sol": {
      "LiquidationLogic": "0x88dF535473C5adf1f57789734A05E555F7Deb8DB"
    },
    "src/spoke/libraries/BabylonLiquidationLogic.sol": {
      "BabylonLiquidationLogic": "0x86ca67d45A4c7c62e52d748828d6E9ebCd6E9b96"
    }
  },
  "optimizer": {
    "runs": 450,
    "enabled": true
  },
  "evmVersion": "cancun",
  "remappings": [
    "erc4626-tests/=lib/erc4626-tests/",
    "forge-std/=lib/forge-std/src/"
  ]
}

Source code and metadata: Sourcify.

The source code belongs to the authors of the contract.