S Price: $0.692899 (-7.35%)

Contract

0x5Ce899AEd04c656776148fc3b1Adbe59e5f13D5c

Overview

S Balance

Sonic LogoSonic LogoSonic Logo0 S

S Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Set Liquidation ...111140792025-03-02 4:56:4629 hrs ago1740891406IN
0x5Ce899AE...9e5f13D5c
0 S0.002691755
Set Fees Withdra...111140512025-03-02 4:56:3029 hrs ago1740891390IN
0x5Ce899AE...9e5f13D5c
0 S0.0026837855
Set Fees Distrib...111140152025-03-02 4:56:1029 hrs ago1740891370IN
0x5Ce899AE...9e5f13D5c
0 S0.002698355
Set DUSX Provide...111139922025-03-02 4:55:5429 hrs ago1740891354IN
0x5Ce899AE...9e5f13D5c
0 S0.0027116155
Set Minter111139682025-03-02 4:55:3829 hrs ago1740891338IN
0x5Ce899AE...9e5f13D5c
0 S0.0027162355
Set Lender Owner111139422025-03-02 4:55:2129 hrs ago1740891321IN
0x5Ce899AE...9e5f13D5c
0 S0.0027067755
Set Repay Helper111139162025-03-02 4:55:0529 hrs ago1740891305IN
0x5Ce899AE...9e5f13D5c
0 S0.0026687155
Set Dynamic Inte...111076622025-03-02 3:59:3430 hrs ago1740887974IN
0x5Ce899AE...9e5f13D5c
0 S0.0026958855
Set Market Lens111042342025-03-02 3:31:5931 hrs ago1740886319IN
0x5Ce899AE...9e5f13D5c
0 S0.0026953355
Set Helper111042012025-03-02 3:31:4331 hrs ago1740886303IN
0x5Ce899AE...9e5f13D5c
0 S0.0026941255
Set Supply Calcu...111041642025-03-02 3:31:2731 hrs ago1740886287IN
0x5Ce899AE...9e5f13D5c
0 S0.0026607955
Set PSM Circle111041552025-03-02 3:31:2231 hrs ago1740886282IN
0x5Ce899AE...9e5f13D5c
0 S0.0026868655
Set PSM Tether111037952025-03-02 3:28:2631 hrs ago1740886106IN
0x5Ce899AE...9e5f13D5c
0 S0.0026880755
Set Oracle Floor...111022922025-03-02 3:15:2431 hrs ago1740885324IN
0x5Ce899AE...9e5f13D5c
0 S0.0026856555
Set Oracle Chain...111021252025-03-02 3:13:5431 hrs ago1740885234IN
0x5Ce899AE...9e5f13D5c
0 S0.0026723455
Set Floor111019962025-03-02 3:12:5731 hrs ago1740885177IN
0x5Ce899AE...9e5f13D5c
0 S0.0026637655
Set Staked DUSX111015082025-03-02 3:09:0831 hrs ago1740884948IN
0x5Ce899AE...9e5f13D5c
0 S0.002667555
Set DUSX111001542025-03-02 2:59:0831 hrs ago1740884348IN
0x5Ce899AE...9e5f13D5c
0 S0.0026632155
Set Stable Owner110989952025-03-02 2:49:1831 hrs ago1740883758IN
0x5Ce899AE...9e5f13D5c
0 S0.0027031455
Set Vote Escrowe...110987032025-03-02 2:46:5532 hrs ago1740883615IN
0x5Ce899AE...9e5f13D5c
0 S0.0026662955
Set STTX110984132025-03-02 2:44:3332 hrs ago1740883473IN
0x5Ce899AE...9e5f13D5c
0 S0.002710455
Set Vault110980552025-03-02 2:41:4132 hrs ago1740883301IN
0x5Ce899AE...9e5f13D5c
0 S0.0026801555

Parent Transaction Hash Block From To
View All Internal Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
BaseContracts

Compiler Version
v0.8.24+commit.e11b9ed9

Optimization Enabled:
No with 200 runs

Other Settings:
paris EvmVersion
File 1 of 25 : BaseContracts.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.8.24 <0.9.0;

import {Ownable} from "../abstract/Ownable.sol";
import {IDUSXProvider} from "../interface/IDUSXProvider.sol";
import {IDynamicInterestRate} from "../interface/IDynamicInterestRate.sol";
import {IERC20Token} from "../interface/IERC20Token.sol";
import {IERC20TokenRebase} from "../interface/IERC20TokenRebase.sol";
import {IFeesDistributor} from "../interface/IFees.sol";
import {IFeesWithdrawer} from "../interface/IFees.sol";
import {IFloor} from "../interface/IFloor.sol";
import {ILenderOwner} from "../interface/ILenderOwner.sol";
import {ILiquidationHelper} from "../interface/ILiquidationHelper.sol";
import {IMarketLens} from "../interface/IMarketLens.sol";
import {IMinter} from "../interface/IMinter.sol";
import {IMiscHelper} from "../interface/IMiscHelper.sol";
import {IOracle} from "../interface/IOracle.sol";
import {IPSM} from "../interface/IPSM.sol";
import {IRepayHelper} from "../interface/IRepayHelper.sol";
import {IStableOwner} from "../interface/IStableOwner.sol";
import {IStakedDUSX} from "../interface/IStakedDUSX.sol";
import {ISupplyHangingCalculator} from "../interface/ISupplyHangingCalculator.sol";
import {IVault} from "../interface/IVault.sol";
import {IVoteEscrowedSTTX} from "../interface/IVoteEscrowedSTTX.sol";

contract BaseContracts is Ownable {
    // Group core tokens
    struct CoreTokens {
        IERC20Token dusx;
        IERC20TokenRebase sttx;
        IStakedDUSX stDUSX;
        IVoteEscrowedSTTX veSTTX;
    }
    // Group PSM related contracts
    struct PSMContracts {
        IPSM psmCircle;
        IPSM psmTether;
        IStableOwner stableOwner;
    }
    // Group oracle contracts
    struct OracleContracts {
        IOracle oracleChainlink;
        IOracle oracleFloorPrice;
    }
    // Group helper contracts
    struct HelperContracts {
        IMiscHelper helper;
        ILiquidationHelper liquidationHelper;
        IRepayHelper repayHelper;
        IMarketLens marketLens;
    }
    CoreTokens private _coreTokens;
    PSMContracts private _psmContracts;
    OracleContracts private _oracleContracts;
    HelperContracts private _helperContracts;
    IDUSXProvider private _dusxProvider;
    IFeesDistributor private _feesDistributor;
    IFeesWithdrawer private _feesWithdrawer;
    IFloor private _floor;
    ILenderOwner private _lenderOwner;
    IMinter private _minter;
    ISupplyHangingCalculator private _supplyCalculator;
    IVault private _vault;
    IDynamicInterestRate private _dynamicInterestRate;
    error ZeroAddress();
    error ContractAlreadySet();

    function setDUSX(IERC20Token dusx_) external onlyOwner {
        _checkZeroAddress(address(dusx_));
        _checkContractNotSet(address(_coreTokens.dusx));
        _coreTokens.dusx = dusx_;
    }

    function setDUSXProvider(IDUSXProvider provider_) external onlyOwner {
        _checkZeroAddress(address(provider_));
        _checkContractNotSet(address(_dusxProvider));
        _dusxProvider = provider_;
    }

    function setDynamicInterestRate(
        IDynamicInterestRate dynamicInterestRate_
    ) external onlyOwner {
        _checkZeroAddress(address(dynamicInterestRate_));
        _checkContractNotSet(address(_dynamicInterestRate));
        _dynamicInterestRate = dynamicInterestRate_;
    }

    function setFeesDistributor(
        IFeesDistributor distributor_
    ) external onlyOwner {
        _checkZeroAddress(address(distributor_));
        _checkContractNotSet(address(_feesDistributor));
        _feesDistributor = distributor_;
    }

    function setFeesWithdrawer(IFeesWithdrawer withdrawer_) external onlyOwner {
        _checkZeroAddress(address(withdrawer_));
        _checkContractNotSet(address(_feesWithdrawer));
        _feesWithdrawer = withdrawer_;
    }

    function setFloor(IFloor floor_) external onlyOwner {
        _checkZeroAddress(address(floor_));
        _checkContractNotSet(address(_floor));
        _floor = floor_;
    }

    function setHelper(IMiscHelper helper_) external onlyOwner {
        _checkZeroAddress(address(helper_));
        _checkContractNotSet(address(_helperContracts.helper));
        _helperContracts.helper = helper_;
    }

    function setLenderOwner(ILenderOwner owner_) external onlyOwner {
        _checkZeroAddress(address(owner_));
        _checkContractNotSet(address(_lenderOwner));
        _lenderOwner = owner_;
    }

    function setLiquidationHelper(
        ILiquidationHelper helper_
    ) external onlyOwner {
        _checkZeroAddress(address(helper_));
        _checkContractNotSet(address(_helperContracts.liquidationHelper));
        _helperContracts.liquidationHelper = helper_;
    }

    function setMarketLens(IMarketLens lens_) external onlyOwner {
        _checkZeroAddress(address(lens_));
        _checkContractNotSet(address(_helperContracts.marketLens));
        _helperContracts.marketLens = lens_;
    }

    function setMinter(IMinter minter_) external onlyOwner {
        _checkZeroAddress(address(minter_));
        _checkContractNotSet(address(_minter));
        _minter = minter_;
    }

    function setOracleChainlink(IOracle oracle_) external onlyOwner {
        _checkZeroAddress(address(oracle_));
        _checkContractNotSet(address(_oracleContracts.oracleChainlink));
        _oracleContracts.oracleChainlink = oracle_;
    }

    function setOracleFloorPrice(IOracle oracle_) external onlyOwner {
        _checkZeroAddress(address(oracle_));
        _checkContractNotSet(address(_oracleContracts.oracleFloorPrice));
        _oracleContracts.oracleFloorPrice = oracle_;
    }

    function setPSMCircle(IPSM psm_) external onlyOwner {
        _checkZeroAddress(address(psm_));
        _checkContractNotSet(address(_psmContracts.psmCircle));
        _psmContracts.psmCircle = psm_;
    }

    function setPSMTether(IPSM psm_) external onlyOwner {
        _checkZeroAddress(address(psm_));
        _checkContractNotSet(address(_psmContracts.psmTether));
        _psmContracts.psmTether = psm_;
    }

    function setRepayHelper(IRepayHelper helper_) external onlyOwner {
        _checkZeroAddress(address(helper_));
        _checkContractNotSet(address(_helperContracts.repayHelper));
        _helperContracts.repayHelper = helper_;
    }

    function setStakedDUSX(IStakedDUSX stDUSX_) external onlyOwner {
        _checkZeroAddress(address(stDUSX_));
        _checkContractNotSet(address(_coreTokens.stDUSX));
        _coreTokens.stDUSX = stDUSX_;
    }

    function setStableOwner(IStableOwner owner_) external onlyOwner {
        _checkZeroAddress(address(owner_));
        _checkContractNotSet(address(_psmContracts.stableOwner));
        _psmContracts.stableOwner = owner_;
    }

    function setSTTX(IERC20TokenRebase sttx_) external onlyOwner {
        _checkZeroAddress(address(sttx_));
        _checkContractNotSet(address(_coreTokens.sttx));
        _coreTokens.sttx = sttx_;
    }

    function setSupplyCalculator(
        ISupplyHangingCalculator calculator_
    ) external onlyOwner {
        _checkZeroAddress(address(calculator_));
        _checkContractNotSet(address(_supplyCalculator));
        _supplyCalculator = calculator_;
    }

    function setVault(IVault vault_) external onlyOwner {
        _checkZeroAddress(address(vault_));
        _checkContractNotSet(address(_vault));
        _vault = vault_;
    }

    function setVoteEscrowedSTTX(IVoteEscrowedSTTX veSTTX_) external onlyOwner {
        _checkZeroAddress(address(veSTTX_));
        _checkContractNotSet(address(_coreTokens.veSTTX));
        _coreTokens.veSTTX = veSTTX_;
    }

    // Convenience getters for struct members
    function dusx() external view returns (IERC20Token) {
        return _coreTokens.dusx;
    }

    function sttx() external view returns (IERC20TokenRebase) {
        return _coreTokens.sttx;
    }

    function stDUSX() external view returns (IStakedDUSX) {
        return _coreTokens.stDUSX;
    }

    function veSTTX() external view returns (IVoteEscrowedSTTX) {
        return _coreTokens.veSTTX;
    }

    function psmCircle() external view returns (IPSM) {
        return _psmContracts.psmCircle;
    }

    function psmTether() external view returns (IPSM) {
        return _psmContracts.psmTether;
    }

    function stableOwner() external view returns (IStableOwner) {
        return _psmContracts.stableOwner;
    }

    function oracleChainlink() external view returns (IOracle) {
        return _oracleContracts.oracleChainlink;
    }

    function oracleFloorPrice() external view returns (IOracle) {
        return _oracleContracts.oracleFloorPrice;
    }

    function helper() external view returns (IMiscHelper) {
        return _helperContracts.helper;
    }

    function liquidationHelper() external view returns (ILiquidationHelper) {
        return _helperContracts.liquidationHelper;
    }

    function repayHelper() external view returns (IRepayHelper) {
        return _helperContracts.repayHelper;
    }

    function marketLens() external view returns (IMarketLens) {
        return _helperContracts.marketLens;
    }

    function dusxProvider() external view returns (IDUSXProvider) {
        return _dusxProvider;
    }

    function feesDistributor() external view returns (IFeesDistributor) {
        return _feesDistributor;
    }

    function feesWithdrawer() external view returns (IFeesWithdrawer) {
        return _feesWithdrawer;
    }

    function floor() external view returns (IFloor) {
        return _floor;
    }

    function lenderOwner() external view returns (ILenderOwner) {
        return _lenderOwner;
    }

    function minter() external view returns (IMinter) {
        return _minter;
    }

    function supplyCalculator()
        external
        view
        returns (ISupplyHangingCalculator)
    {
        return _supplyCalculator;
    }

    function vault() external view returns (IVault) {
        return _vault;
    }

    function dynamicInterestRate()
        external
        view
        returns (IDynamicInterestRate)
    {
        return _dynamicInterestRate;
    }

    function _checkZeroAddress(address addr) private pure {
        if (addr == address(0)) revert ZeroAddress();
    }

    function _checkContractNotSet(address addr) private pure {
        if (addr != address(0)) revert ContractAlreadySet();
    }
}

File 2 of 25 : Context.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.8.24 <0.9.0;

/**
 * @title Context
 * @dev Provides information about the current execution context, including the
 * sender of the transaction and its data. While these are generally available
 * via msg.sender and msg.data, they should not be accessed in such a direct
 * manner, as when dealing with meta-transactions the account sending and
 * paying for execution may not be the actual sender (as far as an application
 * is concerned).
 * @notice This contract is used through inheritance. It will make available the
 * modifier `_msgSender()`, which can be used to reference the account that
 * called a function within an implementing contract.
 */
abstract contract Context {
    /*//////////////////////////////////////////////////////////////
                            INTERNAL FUNCTIONS
    //////////////////////////////////////////////////////////////*/
    /**
     * @notice Gets the sender of the current call
     * @dev Provides a way to retrieve the message sender that supports meta-transactions
     * @return Sender address (msg.sender in the base implementation)
     */
    function _msgSender() internal view virtual returns (address) {
        return msg.sender;
    }

    /**
     * @notice Gets the complete calldata of the current call
     * @dev Provides a way to retrieve the message data that supports meta-transactions
     * @return Complete calldata bytes
     */
    function _msgData() internal view virtual returns (bytes calldata) {
        return msg.data;
    }

    /**
     * @notice Gets the length of any context-specific suffix in the message data
     * @dev Used in meta-transaction implementations to account for additional data
     * @return Length of the context suffix (0 in the base implementation)
     */
    function _contextSuffixLength() internal view virtual returns (uint256) {
        return 0;
    }
}

File 3 of 25 : Ownable.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.8.24 <0.9.0;

import {Context} from "./Context.sol";

/**
 * @title Ownable
 * @dev Contract module which provides a basic access control mechanism, where
 * there is an account (an owner) that can be granted exclusive access to
 * specific functions.
 * @notice By default, the owner account will be the one that deploys the contract.
 * This can later be changed with {transferOwnership} and {renounceOwnership}.
 */
abstract contract Ownable is Context {
    /*//////////////////////////////////////////////////////////////
                            STATE VARIABLES
    //////////////////////////////////////////////////////////////*/
    /// @notice Address of the current owner
    address private _owner;
    /*//////////////////////////////////////////////////////////////
                                EVENTS
    //////////////////////////////////////////////////////////////*/
    /// @notice Emitted when ownership is transferred
    event OwnershipTransferred(
        address indexed previousOwner,
        address indexed newOwner
    );
    /*//////////////////////////////////////////////////////////////
                            CUSTOM ERRORS
    //////////////////////////////////////////////////////////////*/
    /// @notice Thrown when non-owner tries to call owner-only function
    error UnauthorizedAccount(address account);
    /// @notice Thrown when trying to transfer ownership to invalid address
    error InvalidOwner(address owner);
    /*//////////////////////////////////////////////////////////////
                                MODIFIERS
    //////////////////////////////////////////////////////////////*/
    /**
     * @dev Throws if called by any account other than the owner
     */
    modifier onlyOwner() {
        _checkOwner();
        _;
    }

    /*//////////////////////////////////////////////////////////////
                            CONSTRUCTOR
    //////////////////////////////////////////////////////////////*/
    /**
     * @dev Initializes the contract setting the deployer as the initial owner
     */
    constructor() {
        _transferOwnership(_msgSender());
    }

    /*//////////////////////////////////////////////////////////////
                            PUBLIC FUNCTIONS
    //////////////////////////////////////////////////////////////*/
    /**
     * @notice Leaves the contract without owner
     * @dev Renouncing ownership will leave the contract without an owner,
     * thereby removing any functionality that is only available to the owner
     */
    function renounceOwnership() public virtual onlyOwner {
        _transferOwnership(address(0));
    }

    /**
     * @notice Transfers ownership of the contract to a new account
     * @dev The new owner cannot be the zero address
     * @param newOwner The address that will become the new owner
     */
    function transferOwnership(address newOwner) public virtual onlyOwner {
        if (newOwner == address(0)) {
            revert InvalidOwner(address(0));
        }
        _transferOwnership(newOwner);
    }

    /*//////////////////////////////////////////////////////////////
                            VIEW FUNCTIONS
    //////////////////////////////////////////////////////////////*/
    /**
     * @notice Returns the address of the current owner
     * @return Current owner address
     */
    function owner() public view virtual returns (address) {
        return _owner;
    }

    /*//////////////////////////////////////////////////////////////
                            INTERNAL FUNCTIONS
    //////////////////////////////////////////////////////////////*/
    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`)
     * Internal function without access restriction
     */
    function _transferOwnership(address newOwner) internal virtual {
        address oldOwner = _owner;
        _owner = newOwner;
        emit OwnershipTransferred(oldOwner, newOwner);
    }

    /**
     * @dev Throws if the sender is not the owner
     */
    function _checkOwner() internal view virtual {
        if (owner() != _msgSender()) {
            revert UnauthorizedAccount(_msgSender());
        }
    }
}

File 4 of 25 : IDUSXProvider.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.8.24 <0.9.0;

/**
 * @title IDUSXProvider
 * @dev Interface for DUSX token provision and distribution operations
 * @notice Defines functionality for:
 * 1. Token provision management
 * 2. Supply control
 * 3. Distribution tracking
 */
interface IDUSXProvider {
    /*//////////////////////////////////////////////////////////////
                        PROVISION OPERATIONS
    //////////////////////////////////////////////////////////////*/
    /**
     * @notice Provides DUSX tokens to the requesting address
     * @param amount The quantity of DUSX tokens to provide in base units
     * @dev Handles:
     * · Token minting/transfer
     * · Supply tracking
     * · State updates
     *
     * Requirements:
     * · Caller is authorized
     * · Amount > 0
     * · Within supply limits
     *
     * Effects:
     * · Increases recipient balance
     * · Updates total supply
     * · Emits provision event
     */
    function provide(uint256 amount) external;
}

File 5 of 25 : IDynamicInterestRate.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.8.24 <0.9.0;

/**
 * @title IDynamicInterestRate
 * @dev Interface for dynamic interest rate calculations in the lending protocol
 * @notice Defines methods for retrieving time-based interest rates that:
 * 1. Adjust based on market conditions
 * 2. Support per-second and base rate calculations
 * 3. Maintain precision through proper scaling
 *
 * This interface is crucial for:
 * · Accurate interest accrual
 * · Dynamic market response
 * · Protocol yield calculations
 */
interface IDynamicInterestRate {
    /*//////////////////////////////////////////////////////////////
                        INTEREST RATE QUERIES
    //////////////////////////////////////////////////////////////*/
    /**
     * @notice Retrieves the current interest rate per second
     * @return uint256 Interest rate per second, scaled by 1e18
     * @dev Used for precise interest calculations over time periods
     */
    function getInterestPerSecond() external view returns (uint256);

    /**
     * @notice Retrieves the current base interest rate
     * @return uint256 Base interest rate, scaled by 1e18
     * @dev Represents the foundational rate before adjustments
     */
    function getInterestRate() external view returns (uint256);
}

File 6 of 25 : IERC20Custom.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.8.24 <0.9.0;

/**
 * @title IERC20Custom
 * @dev Interface for the ERC20 fungible token standard (EIP-20)
 * @notice Defines functionality for:
 * 1. Token transfers
 * 2. Allowance management
 * 3. Balance tracking
 * 4. Token metadata
 */
interface IERC20Custom {
    /*//////////////////////////////////////////////////////////////
                                EVENTS
    //////////////////////////////////////////////////////////////*/
    /**
     * @dev Emitted on token transfer between addresses
     * @param from Source address (0x0 for mints)
     * @param to Destination address (0x0 for burns)
     * @param value Amount of tokens transferred
     * @notice Tracks:
     * · Regular transfers
     * · Minting operations
     * · Burning operations
     */
    event Transfer(address indexed from, address indexed to, uint256 value);
    /**
     * @dev Emitted when spending allowance is granted
     * @param owner Address granting permission
     * @param spender Address receiving permission
     * @param value Amount of tokens approved
     * @notice Records:
     * · New approvals
     * · Updated allowances
     * · Revoked permissions
     */
    event Approval(
        address indexed owner,
        address indexed spender,
        uint256 value
    );

    /*//////////////////////////////////////////////////////////////
                        TRANSFER OPERATIONS
    //////////////////////////////////////////////////////////////*/
    /**
     * @notice Transfers tokens to specified recipient
     * @param to Recipient address
     * @param value Amount to transfer in base units
     * @return bool True if transfer succeeds
     * @dev Requirements:
     * · Caller has sufficient balance
     * · Recipient is valid
     * · Amount > 0
     *
     * Effects:
     * · Decreases caller balance
     * · Increases recipient balance
     * · Emits Transfer event
     */
    function transfer(address to, uint256 value) external returns (bool);

    /**
     * @notice Executes transfer on behalf of token owner
     * @param from Source address
     * @param to Destination address
     * @param value Amount to transfer in base units
     * @return bool True if transfer succeeds
     * @dev Requirements:
     * · Caller has sufficient allowance
     * · Source has sufficient balance
     * · Valid addresses
     *
     * Effects:
     * · Decreases allowance
     * · Updates balances
     * · Emits Transfer event
     */
    function transferFrom(
        address from,
        address to,
        uint256 value
    ) external returns (bool);

    /*//////////////////////////////////////////////////////////////
                        APPROVAL OPERATIONS
    //////////////////////////////////////////////////////////////*/
    /**
     * @notice Authorizes address to spend tokens
     * @param spender Address to authorize
     * @param value Amount to authorize in base units
     * @return bool True if approval succeeds
     * @dev Controls:
     * · Spending permissions
     * · Delegation limits
     * · Authorization levels
     *
     * Security:
     * · Overwrites previous allowance
     * · Requires explicit value
     * · Emits Approval event
     */
    function approve(address spender, uint256 value) external returns (bool);

    /*//////////////////////////////////////////////////////////////
                            TOKEN METADATA
    //////////////////////////////////////////////////////////////*/
    /**
     * @notice Retrieves human-readable token name
     * @return string Full token name
     */
    function name() external view returns (string memory);

    /**
     * @notice Retrieves token trading symbol
     * @return string Short token identifier
     */
    function symbol() external view returns (string memory);

    /**
     * @notice Retrieves token decimal precision
     * @return uint8 Number of decimal places
     * @dev Standard:
     * · 18 for most tokens
     * · Used for display formatting
     */
    function decimals() external view returns (uint8);

    /*//////////////////////////////////////////////////////////////
                            BALANCE QUERIES
    //////////////////////////////////////////////////////////////*/
    /**
     * @notice Retrieves total token supply
     * @return uint256 Current total supply
     * @dev Reflects:
     * · All minted tokens
     * · Minus burned tokens
     * · In base units
     */
    function totalSupply() external view returns (uint256);

    /**
     * @notice Retrieves account token balance
     * @param account Address to query
     * @return uint256 Current balance in base units
     * @dev Returns:
     * · Available balance
     * · Includes pending rewards
     * · Excludes locked tokens
     */
    function balanceOf(address account) external view returns (uint256);

    /**
     * @notice Retrieves remaining spending allowance
     * @param owner Token owner address
     * @param spender Authorized spender address
     * @return uint256 Current allowance in base units
     * @dev Shows:
     * · Approved amount
     * · Remaining limit
     * · Delegation status
     */
    function allowance(
        address owner,
        address spender
    ) external view returns (uint256);
}

File 7 of 25 : IERC20Token.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.8.24 <0.9.0;

import {IERC20Custom} from "./IERC20Custom.sol";

/**
 * @title IERC20Token
 * @dev Extended interface for ERC20 tokens with supply control capabilities
 * @notice Defines functionality for:
 * 1. Token minting
 * 2. Token burning
 * 3. Supply management
 */
interface IERC20Token is IERC20Custom {
    /*//////////////////////////////////////////////////////////////
                        SUPPLY MANAGEMENT
    //////////////////////////////////////////////////////////////*/
    /**
     * @notice Mints new tokens to specified account
     * @param account Address to receive minted tokens
     * @param amount Quantity of tokens to mint in base units
     * @dev Controls:
     * · Supply expansion
     * · Balance updates
     * · Event emission
     *
     * Requirements:
     * · Caller is authorized
     * · Within maxSupply
     * · Valid recipient
     */
    function mint(address account, uint256 amount) external;

    /**
     * @notice Burns tokens from specified account
     * @param account Address to burn tokens from
     * @param amount Quantity of tokens to burn in base units
     * @dev Manages:
     * · Supply reduction
     * · Balance updates
     * · Event emission
     *
     * Requirements:
     * · Caller is authorized
     * · Sufficient balance
     * · Amount > 0
     */
    function burn(address account, uint256 amount) external;

    /*//////////////////////////////////////////////////////////////
                            VIEW FUNCTIONS
    //////////////////////////////////////////////////////////////*/
    /**
     * @notice Retrieves maximum token supply limit
     * @return uint256 Maximum supply cap in base units
     * @dev Enforces:
     * · Supply ceiling
     * · Mint restrictions
     * · Protocol limits
     *
     * Note: This is an immutable value that
     * cannot be exceeded by minting operations
     */
    function maxSupply() external view returns (uint256);
}

File 8 of 25 : IERC20TokenRebase.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.8.24 <0.9.0;

import {IERC20Custom} from "./IERC20Custom.sol";

/**
 * @title IERC20TokenRebase
 * @dev Extended interface for ERC20 tokens with elastic supply and safe management
 * @notice Defines functionality for:
 * 1. Supply elasticity (rebasing)
 * 2. Safe-based token management
 * 3. Supply control mechanisms
 * 4. Configuration management
 */
interface IERC20TokenRebase is IERC20Custom {
    /*//////////////////////////////////////////////////////////////
                        SUPPLY MANAGEMENT
    //////////////////////////////////////////////////////////////*/
    /**
     * @notice Mints new tokens to specified account
     * @param account Address to receive minted tokens
     * @param amount Quantity of tokens to mint in base units
     * @dev Requires:
     * · Caller is authorized minter
     * · Within maxSupply limits
     * · Valid recipient
     */
    function mint(address account, uint256 amount) external;

    /**
     * @notice Burns tokens from specified account
     * @param account Address to burn tokens from
     * @param amount Quantity of tokens to burn in base units
     * @dev Requires:
     * · Caller is authorized
     * · Account has sufficient balance
     * · Amount > 0
     */
    function burn(address account, uint256 amount) external;

    /*//////////////////////////////////////////////////////////////
                        REBASE OPERATIONS
    //////////////////////////////////////////////////////////////*/
    /**
     * @notice Executes supply rebase based on current parameters
     * @dev Triggers:
     * · Supply adjustment
     * · Balance recalculation
     * · Event emission
     *
     * Considers:
     * · Rebase interval
     * · Basis points
     * · Supply limits
     */
    function rebase() external;

    /**
     * @notice Configures rebase parameters
     * @param rebaseInterval Time period between rebases (in seconds)
     * @param rebaseBasisPoints Scale factor for rebase (in basis points)
     * @dev Controls:
     * · Rebase frequency
     * · Rebase magnitude
     * · Supply elasticity
     */
    function setRebaseConfig(
        uint256 rebaseInterval,
        uint256 rebaseBasisPoints
    ) external;

    /*//////////////////////////////////////////////////////////////
                        SAFE MANAGEMENT
    //////////////////////////////////////////////////////////////*/
    /**
     * @notice Initializes new token management safe
     * @param safe Address of safe to create
     * @dev Establishes:
     * · Safe permissions
     * · Access controls
     * · Management capabilities
     */
    function createSafe(address safe) external;

    /**
     * @notice Removes existing token management safe
     * @param safe Address of safe to remove
     * @dev Handles:
     * · Permission revocation
     * · State cleanup
     * · Access termination
     */
    function destroySafe(address safe) external;

    /*//////////////////////////////////////////////////////////////
                            VIEW FUNCTIONS
    //////////////////////////////////////////////////////////////*/
    /**
     * @notice Retrieves floor contract address
     * @return address Active floor contract
     * @dev Used for:
     * · Price stability
     * · Supply control
     */
    function floor() external view returns (address);

    /**
     * @notice Retrieves authorized minter address
     * @return address Active minter contract
     * @dev Controls:
     * · Mint permissions
     * · Supply expansion
     */
    function minter() external view returns (address);

    /**
     * @notice Returns absolute maximum token supply
     * @return uint256 Maximum supply cap in base units
     * @dev Enforces:
     * · Hard supply limit
     * · Mint restrictions
     */
    function maxSupply() external view returns (uint256);

    /**
     * @notice Calculates maximum supply after rebase
     * @return uint256 Post-rebase maximum supply in base units
     * @dev Considers:
     * · Current max supply
     * · Rebase parameters
     * · Supply caps
     */
    function maxSupplyRebased() external view returns (uint256);

    /**
     * @notice Calculates total supply after rebase
     * @return uint256 Post-rebase total supply in base units
     * @dev Reflects:
     * · Current supply
     * · Rebase effects
     * · Supply limits
     */
    function totalSupplyRebased() external view returns (uint256);
}

File 9 of 25 : IFees.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.8.24 <0.9.0;

/**
 * @title IFeesWithdrawer
 * @dev Interface for protocol fee withdrawal operations
 * @notice Defines functionality for:
 * 1. Secure fee withdrawal
 * 2. Access control for withdrawals
 * 3. Protocol revenue management
 *
 * This interface ensures:
 * · Controlled access to protocol fees
 * · Safe transfer of accumulated revenue
 * · Proper accounting of withdrawn amounts
 */
interface IFeesWithdrawer {
    /*//////////////////////////////////////////////////////////////
                        WITHDRAWAL OPERATIONS
    //////////////////////////////////////////////////////////////*/
    /**
     * @notice Withdraws accumulated protocol fees to designated recipients
     * @dev Only callable by authorized withdrawers
     * Handles:
     * · Fee accounting updates
     * · Transfer of tokens
     * · Event emission for tracking
     */
    function withdraw() external;
}

/**
 * @title IFeesDistributor
 * @dev Interface for protocol fee distribution and allocation
 * @notice Defines functionality for:
 * 1. Fee distribution across protocol components
 * 2. Dynamic allocation management
 * 3. Floor token revenue sharing
 *
 * This interface manages:
 * · Revenue distribution logic
 * · Allocation percentages
 * · Protocol incentive mechanisms
 */
interface IFeesDistributor {
    /*//////////////////////////////////////////////////////////////
                        DISTRIBUTION OPERATIONS
    //////////////////////////////////////////////////////////////*/
    /**
     * @notice Distributes accumulated protocol fees according to set allocations
     * @dev Handles the distribution of fees to:
     * · Floor token stakers
     * · Protocol treasury
     * · Other designated recipients
     */
    function distribute() external;

    /*//////////////////////////////////////////////////////////////
                            VIEW FUNCTIONS
    //////////////////////////////////////////////////////////////*/
    /**
     * @notice Returns current percentage allocated to Floor token stakers
     * @return uint256 Floor allocation percentage, scaled by 1e18
     */
    function floorAllocation() external view returns (uint256);
}

File 10 of 25 : IFloor.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.8.24 <0.9.0;

/**
 * @title IFloor
 * @dev Interface for protocol floor price management and capital operations
 * @notice Defines functionality for:
 * 1. Token deposit management
 * 2. Refund processing
 * 3. Capital tracking
 */
interface IFloor {
    /*//////////////////////////////////////////////////////////////
                        DEPOSIT OPERATIONS
    //////////////////////////////////////////////////////////////*/
    /**
     * @notice Processes token deposits into the floor contract
     * @param msgSender Address initiating the deposit
     * @param amount Quantity of tokens to deposit
     * @dev Handles:
     * · Token transfer validation
     * · Capital tracking updates
     * · Event emission
     */
    function deposit(address msgSender, uint256 amount) external;

    /*//////////////////////////////////////////////////////////////
                        REFUND OPERATIONS
    //////////////////////////////////////////////////////////////*/
    /**
     * @notice Processes token refunds from the floor contract
     * @param msgSender Address receiving the refund
     * @param amount Quantity of tokens to refund
     * @dev Ensures:
     * · Sufficient contract balance
     * · Authorized withdrawal
     * · Capital accounting
     */
    function refund(address msgSender, uint256 amount) external;

    /*//////////////////////////////////////////////////////////////
                            VIEW FUNCTIONS
    //////////////////////////////////////////////////////////////*/
    /**
     * @notice Returns current total capital held in the floor contract
     * @return uint256 Current capital amount in base units
     * @dev Used for:
     * · Floor price calculations
     * · Protocol health metrics
     * · Capital adequacy checks
     */
    function capital() external view returns (uint256);
}

File 11 of 25 : ILender.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.8.24 <0.9.0;

import {Rebase} from "../library/AuxRebase.sol";
import {IERC20Custom} from "./IERC20Custom.sol";
import {IOracle} from "./IOracle.sol";
import {IVault} from "./IVault.sol";

/**
 * @title ILender
 * @dev Interface for lending operations and management
 * @notice Defines the core lending protocol functionality including:
 * 1. Collateral management and borrowing operations
 * 2. Interest rate and fee management
 * 3. Liquidation handling
 * 4. Vault integration
 *
 * The interface is designed to support:
 * · Over-collateralized lending
 * · Dynamic interest rates
 * · Liquidation mechanisms
 * · Fee collection and distribution
 */
interface ILender {
    /*//////////////////////////////////////////////////////////////
                        ADMIN CONFIGURATION
    //////////////////////////////////////////////////////////////*/
    /**
     * @notice Updates the interest rate for borrowing
     * @param newInterestRate New interest rate (scaled by 1e18)
     */
    function changeInterestRate(uint256 newInterestRate) external;

    /**
     * @notice Sets global and per-address borrowing limits
     * @param newBorrowLimit Total borrowing limit for the protocol
     * @param perAddressPart Maximum borrow amount per address
     */
    function changeBorrowLimit(
        uint256 newBorrowLimit,
        uint256 perAddressPart
    ) external;

    /*//////////////////////////////////////////////////////////////
                        CORE LENDING OPERATIONS
    //////////////////////////////////////////////////////////////*/
    /**
     * @notice Updates protocol state with accrued interest
     */
    function accrue() external;

    /**
     * @notice Updates the exchange rate from the oracle
     */
    function updateExchangeRate() external;

    /**
     * @notice Withdraws accumulated protocol fees
     * @param amountToProvide Amount of fees to withdraw
     */
    function withdrawFees(uint256 amountToProvide) external;

    /*//////////////////////////////////////////////////////////////
                        LIQUIDATION HANDLING
    //////////////////////////////////////////////////////////////*/
    /**
     * @notice Liquidates undercollateralized positions
     * @param liquidator Address performing the liquidation
     * @param users Array of user addresses to liquidate
     * @param maxBorrowParts Maximum borrow parts to liquidate per user
     * @param to Address to receive liquidated collateral
     */
    function liquidate(
        address liquidator,
        address[] memory users,
        uint256[] memory maxBorrowParts,
        address to
    ) external;

    /*//////////////////////////////////////////////////////////////
                        VAULT OPERATIONS
    //////////////////////////////////////////////////////////////*/
    /**
     * @notice Deposits collateral into the vault
     * @param amount Amount of collateral to deposit
     */
    function vaultDepositAddCollateral(uint256 amount) external;

    /**
     * @notice Withdraws borrowed assets from the vault
     * @param msgSender Address initiating the withdrawal
     * @param amount Amount to withdraw
     * @return part Borrow part assigned
     * @return share Share of the vault
     */
    function borrowVaultWithdraw(
        address msgSender,
        uint256 amount
    ) external returns (uint256 part, uint256 share);

    /*//////////////////////////////////////////////////////////////
                        COLLATERAL MANAGEMENT
    //////////////////////////////////////////////////////////////*/
    /**
     * @notice Adds collateral to a lending position
     * @param to Address to credit the collateral
     * @param skim True to skim tokens from the contract
     * @param share Amount of shares to add as collateral
     */
    function addCollateral(address to, bool skim, uint256 share) external;

    /**
     * @notice Removes collateral from a lending position
     * @param to Address to receive the removed collateral
     * @param share Amount of shares to remove
     */
    function removeCollateral(address to, uint256 share) external;

    /*//////////////////////////////////////////////////////////////
                        BORROWING OPERATIONS
    //////////////////////////////////////////////////////////////*/
    /**
     * @notice Borrows assets against deposited collateral
     * @param msgSender Address initiating the borrow
     * @param amount Amount to borrow
     * @return part Borrow part assigned
     * @return share Share of the borrowed amount
     */
    function borrow(
        address msgSender,
        uint256 amount
    ) external returns (uint256 part, uint256 share);

    /**
     * @notice Repays borrowed assets
     * @param payer Address paying the debt
     * @param to Address whose debt to repay
     * @param skim True to skim tokens from the contract
     * @param part Amount of borrow part to repay
     * @return amount Actual amount repaid
     */
    function repay(
        address payer,
        address to,
        bool skim,
        uint256 part
    ) external returns (uint256 amount);

    /*//////////////////////////////////////////////////////////////
                            VIEW FUNCTIONS
    //////////////////////////////////////////////////////////////*/
    /**
     * @notice Gets the oracle contract address
     * @return IOracle Oracle interface
     */
    function oracle() external view returns (IOracle);

    /**
     * @notice Gets interest accrual information
     * @return Last accrual timestamp, accumulated interest, interest per second
     */
    function accrueInfo() external view returns (uint256, uint256, uint256);

    /**
     * @notice Gets the required collateral ratio
     * @return uint256 Collateral ratio (scaled by 1e5)
     */
    function collateralRatio() external view returns (uint256);

    /**
     * @notice Gets the liquidation bonus multiplier
     * @return uint256 Liquidation multiplier (scaled by 1e5)
     */
    function liquidationMultiplier() external view returns (uint256);

    /**
     * @notice Gets total collateral shares in the protocol
     * @return uint256 Total collateral share amount
     */
    function totalCollateralShare() external view returns (uint256);

    /**
     * @notice Gets the vault contract address
     * @return IVault Vault interface
     */
    function vault() external view returns (IVault);

    /**
     * @notice Gets the fee recipient address
     * @return address Fee recipient
     */
    function feeTo() external view returns (address);

    /**
     * @notice Gets the collateral token address
     * @return IERC20Custom Collateral token interface
     */
    function collateral() external view returns (IERC20Custom);

    /**
     * @notice Gets total borrow state
     * @return Rebase Total borrow information
     */
    function totalBorrow() external view returns (Rebase memory);

    /**
     * @notice Gets user's borrow part
     * @param account User address
     * @return uint256 User's borrow part
     */
    function userBorrowPart(address account) external view returns (uint256);

    /**
     * @notice Gets user's collateral share
     * @param account User address
     * @return uint256 User's collateral share
     */
    function userCollateralShare(
        address account
    ) external view returns (uint256);

    /**
     * @notice Gets protocol borrowing limits
     * @return total Total protocol borrow limit
     * @return borrowPartPerAddress Per-address borrow limit
     */
    function borrowLimit()
        external
        view
        returns (uint256 total, uint256 borrowPartPerAddress);

    /**
     * @notice Gets the DUSX token address
     * @return IERC20Custom DUSX token interface
     */
    function dusx() external view returns (IERC20Custom);

    /**
     * @notice Gets all accounts with active positions
     * @return address[] Array of account addresses
     */
    function accounts() external view returns (address[] memory);

    /**
     * @notice Gets the collateral precision factor
     * @return uint256 Collateral precision
     */
    function collateralPrecision() external view returns (uint256);
}

File 12 of 25 : ILenderOwner.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.8.24 <0.9.0;

import {ILender} from "./ILender.sol";

/**
 * @title ILenderOwner
 * @dev Interface for protocol-level lender management and configuration
 * @notice Defines functionality for:
 * 1. Interest rate management
 * 2. Borrow limit control
 * 3. Risk parameter adjustment
 */
interface ILenderOwner {
    /*//////////////////////////////////////////////////////////////
                        INTEREST MANAGEMENT
    //////////////////////////////////////////////////////////////*/
    /**
     * @notice Updates lender's interest rate configuration
     * @param lender The lender contract to modify
     * @param newInterestRate New interest rate value in basis points
     * @dev Controls:
     * · Interest accrual
     * · Yield generation
     * · Protocol revenue
     *
     * Requirements:
     * · Caller is authorized
     * · Rate within bounds
     * · Valid lender contract
     */
    function changeInterestRate(
        ILender lender,
        uint256 newInterestRate
    ) external;

    /*//////////////////////////////////////////////////////////////
                        LIMIT MANAGEMENT
    //////////////////////////////////////////////////////////////*/
    /**
     * @notice Updates lender's borrowing constraints
     * @param lender The lender contract to modify
     * @param newBorrowLimit New total protocol borrow limit
     * @param perAddressPart Maximum borrow limit per address
     * @dev Manages:
     * · Protocol exposure
     * · Individual limits
     * · Risk thresholds
     *
     * Requirements:
     * · Caller is authorized
     * · Valid limits
     * · perAddressPart <= newBorrowLimit
     *
     * Security:
     * · Prevents overleveraging
     * · Controls risk exposure
     * · Ensures protocol stability
     */
    function changeBorrowLimit(
        ILender lender,
        uint256 newBorrowLimit,
        uint256 perAddressPart
    ) external;

    /*//////////////////////////////////////////////////////////////
                        DEPRECATION MANAGEMENT
    //////////////////////////////////////////////////////////////*/
    /**
     * @notice Checks if a lender contract is deprecated
     * @param lender The lender address to check
     * @return bool True if the lender is deprecated, false otherwise
     * @dev Used to:
     * · Prevent operations on deprecated markets
     * · Control market lifecycle
     * · Manage protocol upgrades
     *
     * Security:
     * · Read-only function
     * · No state modifications
     * · Access control not required
     */
    function deprecated(address lender) external view returns (bool);

    /**
     * @notice Checks if a lender contract is in manual mode
     * @param lender The lender address to check
     * @return bool True if the lender is in manual mode, false otherwise
     * @dev Used to:
     * · Determine if borrow limits are managed manually
     * · Control automatic interest rate adjustments
     *
     * Security:
     * · Read-only function
     * · No state modifications
     * · Access control not required
     */
    function manual(address lender) external view returns (bool);
}

File 13 of 25 : ILiquidationHelper.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.8.24 <0.9.0;

import {IERC20Custom} from "./IERC20Custom.sol";
import {ILender} from "../interface/ILender.sol";
import {IMiscHelper} from "../interface/IMiscHelper.sol";

/**
 * @title ILiquidationHelper
 * @dev Interface for liquidation assistance operations
 * @notice Defines comprehensive liquidation functionality including:
 * 1. Direct liquidation execution
 * 2. Liquidation amount calculations
 * 3. Position health checks
 * 4. Preview and simulation functions
 *
 * The helper provides:
 * · Maximum and partial liquidation support
 * · Customizable recipient addresses
 * · Pre-execution liquidation simulations
 * · Automated DUSX amount calculations
 */
interface ILiquidationHelper {
    /*//////////////////////////////////////////////////////////////
                            CONFIGURATION
    //////////////////////////////////////////////////////////////*/
    /*//////////////////////////////////////////////////////////////
                        LIQUIDATION EXECUTION
    //////////////////////////////////////////////////////////////*/
    /**
     * @notice Liquidates maximum possible amount for an account
     * @param lender Address of the lending contract
     * @param account Address to be liquidated
     * @return collateralAmount Amount of collateral received
     * @return adjustedBorrowPart Adjusted borrow amount after liquidation
     * @return requiredDUSXAmount DUSX tokens needed to execute liquidation
     * @dev Automatically calculates maximum liquidatable amount
     */
    function liquidateMax(
        ILender lender,
        address account
    )
        external
        returns (
            uint256 collateralAmount,
            uint256 adjustedBorrowPart,
            uint256 requiredDUSXAmount
        );

    /**
     * @notice Liquidates specific amount for an account
     * @param lender Address of the lending contract
     * @param account Address to be liquidated
     * @param borrowPart Amount of borrow position to liquidate
     * @return collateralAmount Amount of collateral received
     * @return adjustedBorrowPart Adjusted borrow amount after liquidation
     * @return requiredDUSXAmount DUSX tokens needed to execute liquidation
     * @dev Validates borrowPart against maximum liquidatable amount
     */
    function liquidate(
        ILender lender,
        address account,
        uint256 borrowPart
    )
        external
        returns (
            uint256 collateralAmount,
            uint256 adjustedBorrowPart,
            uint256 requiredDUSXAmount
        );

    /*//////////////////////////////////////////////////////////////
                    LIQUIDATION WITH CUSTOM RECIPIENT
    //////////////////////////////////////////////////////////////*/
    /**
     * @notice Liquidates maximum amount and sends to specified recipient
     * @param lender Address of the lending contract
     * @param account Address to be liquidated
     * @param recipient Address to receive liquidated assets
     * @dev Combines max liquidation with custom recipient
     */
    function liquidateMaxTo(
        ILender lender,
        address account,
        address recipient
    ) external;

    /**
     * @notice Liquidates specific amount and sends to specified recipient
     * @param lender Address of the lending contract
     * @param account Address to be liquidated
     * @param recipient Address to receive liquidated assets
     * @param borrowPart Amount of borrow position to liquidate
     * @dev Combines partial liquidation with custom recipient
     */
    function liquidateTo(
        ILender lender,
        address account,
        address recipient,
        uint256 borrowPart
    ) external;

    /*//////////////////////////////////////////////////////////////
                        LIQUIDATION PREVIEWS
    //////////////////////////////////////////////////////////////*/
    /**
     * @notice Previews maximum possible liquidation amounts
     * @param lender Address of the lending contract
     * @param account Address to check
     * @return liquidatable Whether the account can be liquidated
     * @return requiredDUSXAmount DUSX tokens needed for liquidation
     * @return adjustedBorrowPart Final borrow amount after liquidation
     * @return returnedCollateralAmount Collateral amount to be received
     * @dev Simulates liquidation without executing
     */
    function previewMaxLiquidation(
        ILender lender,
        address account
    )
        external
        view
        returns (
            bool liquidatable,
            uint256 requiredDUSXAmount,
            uint256 adjustedBorrowPart,
            uint256 returnedCollateralAmount
        );

    /**
     * @notice Previews specific liquidation amounts
     * @param lender Address of the lending contract
     * @param account Address to check
     * @param borrowPart Amount of borrow position to liquidate
     * @return liquidatable Whether the account can be liquidated
     * @return requiredDUSXAmount DUSX tokens needed for liquidation
     * @return adjustedBorrowPart Final borrow amount after liquidation
     * @return returnedCollateralAmount Collateral amount to be received
     * @dev Simulates partial liquidation without executing
     */
    function previewLiquidation(
        ILender lender,
        address account,
        uint256 borrowPart
    )
        external
        view
        returns (
            bool liquidatable,
            uint256 requiredDUSXAmount,
            uint256 adjustedBorrowPart,
            uint256 returnedCollateralAmount
        );

    /*//////////////////////////////////////////////////////////////
                            VIEW FUNCTIONS
    //////////////////////////////////////////////////////////////*/
    /**
     * @notice Checks if an account is eligible for liquidation
     * @param lender Address of the lending contract
     * @param account Address to check
     * @return bool True if account can be liquidated
     * @dev Considers collateral ratio and position health
     */
    function isLiquidatable(
        ILender lender,
        address account
    ) external view returns (bool);

    /**
     * @notice Returns the DUSX token contract used for liquidations
     * @return IERC20Custom DUSX token interface
     * @dev DUSX is required to execute liquidations
     */
    function dusx() external view returns (IERC20Custom);

    /**
     * @notice Returns the helper utility contract
     * @return IMiscHelper Helper interface for additional functions
     * @dev Helper provides supporting calculations and checks
     */
    function helper() external view returns (IMiscHelper);
}

File 14 of 25 : IMarketLens.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.8.24 <0.9.0;

import {ILender} from "./ILender.sol";

/**
 * @title IMarketLens
 * @dev Interface for viewing and analyzing lending market data
 * @notice Provides functionality for:
 * 1. Market size analysis
 * 2. Borrowing metrics
 * 3. Risk assessment data
 */
interface IMarketLens {
    /*//////////////////////////////////////////////////////////////
                            MARKET METRICS
    //////////////////////////////////////////////////////////////*/
    /**
     * @notice Calculates total borrowed amount from a specific lending market
     * @param lender Address of the lending market to analyze
     * @return uint256 Total borrowed amount in base units
     * @dev Aggregates:
     * · Active loan positions
     * · Accrued interest
     * · Pending liquidations
     *
     * Used for:
     * · Market size analysis
     * · Risk assessment
     * · Protocol health monitoring
     */
    function getTotalBorrowed(ILender lender) external view returns (uint256);
}

File 15 of 25 : IMinter.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.8.24 <0.9.0;

import {IERC20Custom} from "./IERC20Custom.sol";

/**
 * @title IMinter
 * @dev Interface for the Minter contract
 */
interface IMinter {
    /**
     * @notice Enables whitelist minting phase
     */
    function enableWhitelistMint() external;

    /**
     * @notice Enables public minting phase
     */
    function enablePublicMint() external;

    /**
     * @notice Adds a wallet to the whitelist
     * @param wallet Wallet address to whitelist
     */
    function addToWhitelist(address wallet) external;

    /**
     * @notice Mints tokens during whitelist phase
     * @param stablecoin Stablecoin used for minting
     * @param stableAmount Amount of stablecoin to mint against
     */
    function whitelistMint(
        IERC20Custom stablecoin,
        uint256 stableAmount
    ) external;

    /**
     * @notice Mints tokens during public phase
     * @param stablecoin Stablecoin used for minting
     * @param stableAmount Amount of stablecoin to mint against
     */
    function publicMint(IERC20Custom stablecoin, uint256 stableAmount) external;

    /**
     * @notice Mints remaining token supply
     * @param stablecoin Stablecoin used for minting
     */
    function mintRemainingSupply(IERC20Custom stablecoin) external;

    /**
     * @notice Sends accumulated DUSX to floor contract
     */
    function sendToFloorDUSX() external;

    /**
     * @notice Verifies if a wallet is whitelisted
     * @param wallet Address to verify
     * @return bool Whitelist status
     */
    function verifyWallet(address wallet) external view returns (bool);

    /**
     * @notice Calculates mint amount for given stablecoin input
     * @param stablecoin Stablecoin used for calculation
     * @param stableAmount Amount of stablecoin
     * @return uint256 Calculated mint amount
     */
    function calcMintAmount(
        IERC20Custom stablecoin,
        uint256 stableAmount
    ) external view returns (uint256);

    /**
     * @notice Gets the current token reserve
     * @return uint256 Current token reserve
     */
    function tokenReserve() external view returns (uint256);

    /**
     * @notice Gets the current mint ratio
     * @return uint256 Current mint ratio
     */
    function getCurrentRatio() external view returns (uint256);

    /**
     * @notice Gets the current mint rate
     * @return uint256 Current mint rate
     */
    function getCurrentRate() external view returns (uint256);
}

File 16 of 25 : IMiscHelper.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.8.24 <0.9.0;

import {IDynamicInterestRate} from "./IDynamicInterestRate.sol";
import {IFeesDistributor} from "./IFees.sol";
import {IFeesWithdrawer} from "./IFees.sol";
import {IFloor} from "./IFloor.sol";
import {ILender} from "./ILender.sol";
import {ILenderOwner} from "./ILenderOwner.sol";
import {ILiquidationHelper} from "./ILiquidationHelper.sol";
import {IMarketLens} from "./IMarketLens.sol";
import {IPSM} from "./IPSM.sol";
import {IRepayHelper} from "./IRepayHelper.sol";
import {IStakedDUSX} from "./IStakedDUSX.sol";
import {ISupplyHangingCalculator} from "./ISupplyHangingCalculator.sol";

/**
 * @title IMiscHelper
 * @dev Interface for miscellaneous helper functions across the protocol
 * @notice Provides comprehensive helper methods for:
 * 1. Protocol configuration and parameter management
 * 2. Floor token operations
 * 3. Staked DUSX token management
 * 4. PSM (Peg Stability Module) operations
 * 5. Lending operations including borrowing and repayment
 * 6. System-wide view functions
 *
 * This interface acts as a central utility hub for coordinating
 * various protocol components and simplifying complex operations
 */
interface IMiscHelper {
    /*//////////////////////////////////////////////////////////////
                        CONFIGURATION FUNCTIONS
    //////////////////////////////////////////////////////////////*/
    /**
     * @notice Sets the supply hanging calculator contract
     * @param supplyHangingCalculator_ New calculator contract address
     * @dev Used for calculating supply adjustments
     */
    function setSupplyHangingCalculator(
        ISupplyHangingCalculator supplyHangingCalculator_
    ) external;

    /**
     * @notice Sets core protocol parameters and contract addresses
     * @param repayHelper_ Repayment helper contract
     * @param liquidationHelper_ Liquidation helper contract
     * @param dynamicInterestRate_ Interest rate calculator
     * @param feesDistributor_ Fee distribution contract
     * @param feesWithdrawer_ Fee withdrawal contract
     * @param lenderOwner_ Lender owner contract
     * @param marketLens_ Market data viewer contract
     * @dev Updates all main protocol component addresses
     */
    function setParameters(
        IRepayHelper repayHelper_,
        ILiquidationHelper liquidationHelper_,
        IDynamicInterestRate dynamicInterestRate_,
        IFeesDistributor feesDistributor_,
        IFeesWithdrawer feesWithdrawer_,
        ILenderOwner lenderOwner_,
        IMarketLens marketLens_
    ) external;

    /**
     * @notice Sets the list of active lender contracts
     * @param lenders_ Array of lender addresses
     * @dev Updates the protocol's lending markets
     */
    function setLenders(ILender[] memory lenders_) external;

    /**
     * @notice Sets the list of PSM contracts
     * @param pegStabilityModules_ Array of PSM addresses
     * @dev Updates available stablecoin PSM modules
     */
    function setPegStabilityModules(
        IPSM[] memory pegStabilityModules_
    ) external;

    /*//////////////////////////////////////////////////////////////
                        FLOOR TOKEN OPERATIONS
    //////////////////////////////////////////////////////////////*/
    /**
     * @notice Deposits Floor tokens into the protocol
     * @param amount Amount of Floor tokens to deposit
     */
    function depositFloor(uint256 amount) external;

    /**
     * @notice Refunds Floor tokens from the protocol
     * @param amount Amount of Floor tokens to refund
     */
    function refundFloor(uint256 amount) external;

    /*//////////////////////////////////////////////////////////////
                        STAKED DUSX OPERATIONS
    //////////////////////////////////////////////////////////////*/
    /**
     * @notice Deposits DUSX tokens for staking
     * @param amount Amount of DUSX to stake
     */
    function depositStakedDUSX(uint256 amount) external;

    /**
     * @notice Withdraws staked DUSX tokens
     * @param amount Amount of staked DUSX to withdraw
     */
    function withdrawStakedDUSX(uint256 amount) external;

    /*//////////////////////////////////////////////////////////////
                            PSM OPERATIONS
    //////////////////////////////////////////////////////////////*/
    /**
     * @notice Swaps DUSX for stablecoin through PSM
     * @param psm PSM contract to use for swap
     * @param receiver Address to receive stablecoins
     * @param amountDUSX Amount of DUSX to swap
     */
    function psmSwapDUSXForStable(
        IPSM psm,
        address receiver,
        uint256 amountDUSX
    ) external;

    /**
     * @notice Swaps stablecoin for DUSX through PSM
     * @param psm PSM contract to use for swap
     * @param receiver Address to receive DUSX
     * @param amountStable Amount of stablecoin to swap
     */
    function psmSwapStableForDUSX(
        IPSM psm,
        address receiver,
        uint256 amountStable
    ) external;

    /*//////////////////////////////////////////////////////////////
                        LENDING OPERATIONS
    //////////////////////////////////////////////////////////////*/
    /**
     * @notice Withdraws borrowed tokens from vault
     * @param lender Lender contract to withdraw from
     * @param amount Amount to withdraw
     */
    function lenderBorrowVaultWithdraw(ILender lender, uint256 amount) external;

    /**
     * @notice Executes a borrow operation
     * @param lender Lender contract to borrow from
     * @param amount Amount to borrow
     */
    function lenderBorrow(ILender lender, uint256 amount) external;

    /**
     * @notice Repays borrowed tokens
     * @param lender Lender contract to repay to
     * @param payer Address paying the debt
     * @param to Address receiving any excess
     * @param skim Whether to skim tokens from contract
     * @param part Amount of borrow part to repay
     */
    function lenderRepay(
        ILender lender,
        address payer,
        address to,
        bool skim,
        uint256 part
    ) external;

    /**
     * @notice Executes liquidation for multiple users
     * @param lender Lender contract to liquidate from
     * @param liquidator Address performing liquidation
     * @param users Array of addresses to liquidate
     * @param maxBorrowParts Maximum borrow parts to liquidate per user
     * @param to Address to receive liquidated assets
     */
    function lenderLiquidate(
        ILender lender,
        address liquidator,
        address[] memory users,
        uint256[] memory maxBorrowParts,
        address to
    ) external;

    /*//////////////////////////////////////////////////////////////
                            VIEW FUNCTIONS
    //////////////////////////////////////////////////////////////*/
    /**
     * @notice Returns current APR for staked DUSX
     * @return uint256 Annual percentage rate
     */
    function aprStakedDUSX() external view returns (uint256);

    /**
     * @notice Returns repayment helper contract
     */
    function repayHelper() external view returns (IRepayHelper);

    /**
     * @notice Returns liquidation helper contract
     */
    function liquidationHelper() external view returns (ILiquidationHelper);

    /**
     * @notice Returns dynamic interest rate calculator
     */
    function dynamicInterestRate() external view returns (IDynamicInterestRate);

    /**
     * @notice Returns floor token contract
     */
    function floor() external view returns (IFloor);

    /**
     * @notice Returns fees distributor contract
     */
    function feesDistributor() external view returns (IFeesDistributor);

    /**
     * @notice Returns fees withdrawer contract
     */
    function feesWithdrawer() external view returns (IFeesWithdrawer);

    /**
     * @notice Returns lender contract at specified index
     * @param index Position in lenders array
     */
    function lenders(uint256 index) external view returns (ILender);

    /**
     * @notice Returns total number of lender contracts
     */
    function lendersLength() external view returns (uint256);

    /**
     * @notice Returns lender owner contract
     */
    function lenderOwner() external view returns (ILenderOwner);

    /**
     * @notice Returns market lens contract
     */
    function marketLens() external view returns (IMarketLens);

    /**
     * @notice Returns PSM contract at specified index
     * @param index Position in PSM array
     */
    function pegStabilityModules(uint256 index) external view returns (IPSM);

    /**
     * @notice Returns total number of PSM contracts
     */
    function pegStabilityModulesLength() external view returns (uint256);

    /**
     * @notice Returns staked DUSX token contract
     */
    function stDUSX() external view returns (IStakedDUSX);

    /**
     * @notice Returns supply hanging calculator contract
     */
    function supplyHangingCalculator()
        external
        view
        returns (ISupplyHangingCalculator);
}

File 17 of 25 : IOracle.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.8.24 <0.9.0;

/**
 * @title IOracle
 * @dev Interface for basic price feed operations
 * @notice Defines functionality for:
 * 1. Asset price retrieval
 * 2. Price precision handling
 */
interface IOracle {
    /*//////////////////////////////////////////////////////////////
                            PRICE QUERIES
    //////////////////////////////////////////////////////////////*/
    /**
     * @notice Retrieves current asset price
     * @param asset Address of the asset to price
     * @return uint256 Current price in base units with precision
     * @dev Provides:
     * · Latest price data
     * · Standardized precision
     * · Asset valuation
     *
     * Note: Check implementation for specific precision details
     */
    function getPrice(address asset) external view returns (uint256);
}

/**
 * @title ITwapOracle
 * @dev Interface for time-weighted average price calculations
 * @notice Defines functionality for:
 * 1. TWAP updates
 * 2. Time-weighted calculations
 * 3. Price smoothing
 */
interface ITwapOracle {
    /*//////////////////////////////////////////////////////////////
                            TWAP OPERATIONS
    //////////////////////////////////////////////////////////////*/
    /**
     * @notice Updates time-weighted average price
     * @param asset Address of the asset to update
     * @return uint256 New TWAP value in base units
     * @dev Calculates:
     * · Time-weighted price
     * · Cumulative values
     * · Price averages
     *
     * Features:
     * · Manipulation resistance
     * · Smoothing effect
     * · Historical tracking
     */
    function updateTwap(address asset) external returns (uint256);
}

File 18 of 25 : IPSM.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.8.24 <0.9.0;

import {IERC20Custom} from "./IERC20Custom.sol";

/**
 * @title IPSM
 * @dev Interface for Peg Stability Module (PSM) operations
 * @notice Defines functionality for:
 * 1. Stablecoin/DUSX swaps
 * 2. Peg maintenance
 * 3. Supply tracking
 */
interface IPSM {
    /*//////////////////////////////////////////////////////////////
                            SWAP OPERATIONS
    //////////////////////////////////////////////////////////////*/
    /**
     * @notice Executes stablecoin to DUSX swap
     * @param msgSender Address initiating the swap
     * @param receiver Address receiving the DUSX
     * @param stableTokenAmount Amount of stablecoins to swap
     * @dev Handles:
     * · Stablecoin deposit
     * · DUSX minting
     * · Supply tracking
     */
    function swapStableForDUSX(
        address msgSender,
        address receiver,
        uint256 stableTokenAmount
    ) external;

    /**
     * @notice Executes DUSX to stablecoin swap
     * @param msgSender Address initiating the swap
     * @param receiver Address receiving the stablecoins
     * @param stableTokenAmount Amount of stablecoins to receive
     * @dev Handles:
     * · DUSX burning
     * · Stablecoin release
     * · Supply adjustment
     */
    function swapDUSXForStable(
        address msgSender,
        address receiver,
        uint256 stableTokenAmount
    ) external;

    /*//////////////////////////////////////////////////////////////
                            VIEW FUNCTIONS
    //////////////////////////////////////////////////////////////*/
    /**
     * @notice Retrieves the stablecoin token contract
     * @return IERC20Custom Stablecoin token interface
     * @dev Used for:
     * · Token transfers
     * · Balance checks
     * · Allowance verification
     */
    function stableToken() external view returns (IERC20Custom);

    /**
     * @notice Returns total DUSX tokens minted through PSM
     * @return uint256 Total minted amount in base units
     * @dev Tracks:
     * · Total supply impact
     * · PSM utilization
     * · Protocol growth metrics
     */
    function dusxMinted() external view returns (uint256);

    /**
     * @notice Returns the maximum amount of DUSX that can be minted through PSM
     * @return uint256 Maximum mintable amount in base units
     * @dev Used for:
     * · Supply control
     * · Risk management
     * · Protocol safety
     */
    function dusxMintCap() external view returns (uint256);
}

File 19 of 25 : IRepayHelper.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.8.24 <0.9.0;

import {IERC20Custom} from "./IERC20Custom.sol";
import {ILender} from "./ILender.sol";
import {IMiscHelper} from "./IMiscHelper.sol";

/**
 * @title IRepayHelper
 * @dev Interface for streamlined loan repayment operations and management
 * @notice Defines functionality for:
 * 1. Loan repayment processing
 * 2. Multi-loan management
 * 3. Helper contract integration
 * 4. Token interactions
 */
interface IRepayHelper {
    /*//////////////////////////////////////////////////////////////
                        CONFIGURATION
    //////////////////////////////////////////////////////////////*/
    /*//////////////////////////////////////////////////////////////
                        REPAYMENT OPERATIONS
    //////////////////////////////////////////////////////////////*/
    /**
     * @notice Processes partial loan repayment
     * @param lender Address of the lending contract
     * @param to Address whose loan is being repaid
     * @param amount Amount to repay in base units
     * @return part Share of the loan repaid
     * @dev Handles:
     * · Token transfers
     * · Loan accounting
     * · Share calculations
     *
     * Requirements:
     * · Amount > 0
     * · Sufficient balance
     * · Valid addresses
     */
    function repayAmount(
        ILender lender,
        address to,
        uint256 amount
    ) external returns (uint256 part);

    /**
     * @notice Processes complete loan repayment
     * @param lender Address of the lending contract
     * @param to Address whose loan is being repaid
     * @return amount Total amount repaid in base units
     * @dev Manages:
     * · Full debt calculation
     * · Complete repayment
     * · Account settlement
     *
     * Effects:
     * · Clears entire debt
     * · Updates balances
     * · Emits events
     */
    function repayTotal(
        ILender lender,
        address to
    ) external returns (uint256 amount);

    /**
     * @notice Processes multiple complete loan repayments
     * @param lender Address of the lending contract
     * @param tos Array of addresses whose loans are being repaid
     * @return amount Total amount repaid across all loans
     * @dev Executes:
     * · Batch processing
     * · Multiple settlements
     * · Aggregate accounting
     *
     * Optimizations:
     * · Gas efficient
     * · Bulk processing
     * · Single transaction
     */
    function repayTotalMultiple(
        ILender lender,
        address[] calldata tos
    ) external returns (uint256 amount);

    /*//////////////////////////////////////////////////////////////
                            VIEW FUNCTIONS
    //////////////////////////////////////////////////////////////*/
    /**
     * @notice Retrieves DUSX token contract
     * @return IERC20Custom Interface of the DUSX token
     * @dev Used for:
     * · Token operations
     * · Balance checks
     * · Allowance verification
     */
    function dusx() external view returns (IERC20Custom);

    /**
     * @notice Retrieves helper contract
     * @return IMiscHelper Interface of the helper contract
     * @dev Provides:
     * · Helper functionality
     * · Integration access
     * · Utility methods
     */
    function helper() external view returns (IMiscHelper);
}

File 20 of 25 : IStableOwner.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.8.24 <0.9.0;

import {IERC20Token} from "./IERC20Token.sol";

/**
 * @title IStableOwner Interface
 * @dev Interface for StableOwner contract that manages stable token supply
 * @notice Defines the external interface for stable token supply management
 */
interface IStableOwner {
    /*//////////////////////////////////////////////////////////////
                            EVENTS
    //////////////////////////////////////////////////////////////*/
    /// @notice Emitted when stable token contract is updated
    /// @param stable New stable token contract address
    event StableSet(IERC20Token indexed stable);
    /// @notice Emitted when new tokens are minted
    /// @param account Recipient of minted tokens
    /// @param amount Amount of tokens minted
    event TokensMinted(address indexed account, uint256 amount);
    /// @notice Emitted when tokens are burned
    /// @param account Account tokens were burned from
    /// @param amount Amount of tokens burned
    event TokensBurned(address indexed account, uint256 amount);

    /*//////////////////////////////////////////////////////////////
                            FUNCTIONS
    //////////////////////////////////////////////////////////////*/
    /// @notice Updates the stable token contract address
    /// @param stable_ New stable token contract address
    function setStable(IERC20Token stable_) external;

    /// @notice Creates new stable tokens
    /// @param account Address to receive minted tokens
    /// @param amount Number of tokens to mint
    function mint(address account, uint256 amount) external;

    /// @notice Destroys existing stable tokens
    /// @param account Address to burn tokens from
    /// @param amount Number of tokens to burn
    function burn(address account, uint256 amount) external;

    /// @notice The managed stable token contract
    /// @return The IERC20Token interface of the stable token
    function stable() external view returns (IERC20Token);
}

File 21 of 25 : IStakedDUSX.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.8.24 <0.9.0;

/**
 * @title IStakedDUSX
 * @dev Interface for staked DUSX token operations and reward distribution
 * @notice Defines functionality for:
 * 1. DUSX token staking
 * 2. Reward distribution
 * 3. Position management
 */
interface IStakedDUSX {
    /*//////////////////////////////////////////////////////////////
                        REWARD DISTRIBUTION
    //////////////////////////////////////////////////////////////*/
    /**
     * @notice Distributes protocol fees as staking rewards
     * @param amount Amount of fees to distribute in base units
     * @dev Handles:
     * · Pro-rata distribution
     * · Reward accounting
     * · Distribution events
     *
     * Rewards are:
     * · Automatically calculated
     * · Immediately available
     * · Proportional to stake
     */
    function distributeFees(uint256 amount) external;

    /**
     * @notice Claims pending fee rewards for the caller
     * @return claimedAmount Amount of fees claimed
     * @dev Allows users to manually claim their accumulated fees
     */
    function claimFees() external returns (uint256 claimedAmount);

    /*//////////////////////////////////////////////////////////////
                        STAKING OPERATIONS
    //////////////////////////////////////////////////////////////*/
    /**
     * @notice Processes DUSX token deposits for staking
     * @param from Address providing the tokens
     * @param to Address receiving the staked position
     * @param amount Quantity of tokens to stake in base units
     * @dev Manages:
     * · Token transfers
     * · Position creation
     * · Reward calculations
     *
     * Supports:
     * · Direct deposits
     * · Delegated deposits
     * · Position tracking
     */
    function deposit(address from, address to, uint256 amount) external;

    /**
     * @notice Initiates a withdrawal from staked DUSX
     * @param amount Amount of tokens to withdraw
     */
    function beginWithdrawal(uint256 amount) external;

    /**
     * @notice Processes withdrawal of staked DUSX tokens
     * @param account Address withdrawing tokens
     * @dev Handles:
     * · Position updates
     * · Reward claims
     * · Token transfers
     *
     * Ensures:
     * · Sufficient balance
     * · Reward distribution
     * · Clean exit
     */
    function withdraw(address account) external;

    /**
     * @notice Views pending unclaimed fees for an account
     * @param account Address to check for pending fees
     * @return pendingAmount Amount of pending fees available to claim
     * @dev Calculates based on the fee accumulator and account's last claimed value
     */
    function pendingFees(
        address account
    ) external view returns (uint256 pendingAmount);
}

File 22 of 25 : ISupplyHangingCalculator.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.8.24 <0.9.0;

/**
 * @title ISupplyHangingCalculator
 * @dev Interface for calculating and managing token supply adjustments
 * @notice Defines functionality for:
 * 1. Supply hanging calculations
 * 2. Safety margin management
 * 3. Risk-adjusted metrics
 */
interface ISupplyHangingCalculator {
    /*//////////////////////////////////////////////////////////////
                        SAFETY PARAMETERS
    //////////////////////////////////////////////////////////////*/
    /**
     * @notice Retrieves current safety margin for supply calculations
     * @return uint256 Safety margin percentage scaled by 1e18
     * @dev Used for:
     * · Risk adjustment
     * · Supply buffer
     * · Protocol protection
     */
    function safetyMargin() external view returns (uint256);

    /*//////////////////////////////////////////////////////////////
                    SUPPLY HANGING CALCULATIONS
    //////////////////////////////////////////////////////////////*/
    /**
     * @notice Calculates current supply hanging with safety margins
     * @return uint256 Risk-adjusted supply hanging in base units
     * @dev Includes:
     * · Safety margin application
     * · Risk adjustments
     * · Protocol constraints
     *
     * Used for:
     * · Safe supply management
     * · Conservative adjustments
     * · Risk-aware operations
     */
    function getSupplyHanging() external view returns (uint256);

    /**
     * @notice Calculates raw supply hanging without safety margins
     * @return uint256 Unadjusted supply hanging in base units
     * @dev Provides:
     * · Raw calculations
     * · No safety buffers
     * · Maximum theoretical values
     *
     * Used for:
     * · Analysis purposes
     * · Maximum bounds
     * · Stress testing
     */
    function getSupplyHangingUnsafe() external view returns (uint256);
}

File 23 of 25 : IVault.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.8.24 <0.9.0;

import {Rebase} from "../library/AuxRebase.sol";
import {IERC20Custom} from "./IERC20Custom.sol";

/**
 * @title IVault
 * @dev Interface for advanced vault operations with elastic share system
 * @notice Defines functionality for:
 * 1. Token custody and management
 * 2. Share-based accounting
 * 3. Elastic supply mechanics
 * 4. Amount/share conversions
 */
interface IVault {
    /*//////////////////////////////////////////////////////////////
                        DEPOSIT OPERATIONS
    //////////////////////////////////////////////////////////////*/
    /**
     * @notice Processes token deposits into vault
     * @param token Token contract to deposit
     * @param from Source of tokens
     * @param to Recipient of shares
     * @param amount Token amount (in base units, 0 for share-based)
     * @param share Share amount (0 for amount-based)
     * @return amountIn Actual tokens deposited
     * @return shareIn Actual shares minted
     * @dev Handles:
     * · Token transfers
     * · Share minting
     * · Balance updates
     *
     * Requirements:
     * · Valid token contract
     * · Authorized caller
     * · Sufficient balance
     * · Either amount or share > 0
     *
     * Note: Only one of amount/share should be non-zero
     */
    function deposit(
        IERC20Custom token,
        address from,
        address to,
        uint256 amount,
        uint256 share
    ) external returns (uint256 amountIn, uint256 shareIn);

    /*//////////////////////////////////////////////////////////////
                        WITHDRAWAL OPERATIONS
    //////////////////////////////////////////////////////////////*/
    /**
     * @notice Processes token withdrawals from vault
     * @param token Token contract to withdraw
     * @param from Source of shares
     * @param to Recipient of tokens
     * @param amount Token amount (in base units, 0 for share-based)
     * @param share Share amount (0 for amount-based)
     * @return amountOut Actual tokens withdrawn
     * @return shareOut Actual shares burned
     * @dev Manages:
     * · Share burning
     * · Token transfers
     * · Balance updates
     *
     * Requirements:
     * · Valid token contract
     * · Sufficient shares
     * · Either amount or share > 0
     * · Authorized withdrawal
     *
     * Security:
     * · Validates balances
     * · Checks permissions
     * · Updates state atomically
     */
    function withdraw(
        IERC20Custom token,
        address from,
        address to,
        uint256 amount,
        uint256 share
    ) external returns (uint256 amountOut, uint256 shareOut);

    /*//////////////////////////////////////////////////////////////
                        SHARE TRANSFERS
    //////////////////////////////////////////////////////////////*/
    /**
     * @notice Transfers vault shares between accounts
     * @param token Associated token contract
     * @param from Source of shares
     * @param to Recipient of shares
     * @param share Amount of shares to transfer
     * @dev Executes:
     * · Direct share movement
     * · Balance updates
     * · Event emission
     *
     * Requirements:
     * · Sufficient share balance
     * · Valid addresses
     * · Share amount > 0
     *
     * Note: Bypasses amount calculations for efficiency
     */
    function transfer(
        IERC20Custom token,
        address from,
        address to,
        uint256 share
    ) external;

    /*//////////////////////////////////////////////////////////////
                        BALANCE QUERIES
    //////////////////////////////////////////////////////////////*/
    /**
     * @notice Retrieves account's vault share balance
     * @param token Token contract to query
     * @param account Address to check
     * @return uint256 Share balance
     * @dev Provides:
     * · Raw share balance
     * · Without conversion
     * · Current state
     *
     * Use toAmount() to convert to token amount
     */
    function balanceOf(
        IERC20Custom token,
        address account
    ) external view returns (uint256);

    /*//////////////////////////////////////////////////////////////
                        CONVERSION OPERATIONS
    //////////////////////////////////////////////////////////////*/
    /**
     * @notice Converts token amount to vault shares
     * @param token Token contract for conversion
     * @param amount Amount of tokens to convert
     * @param roundUp Whether to round up result
     * @return share Equivalent share amount
     * @dev Calculates:
     * · Share equivalent
     * · Based on totals
     * · Handles precision
     *
     * Rounding:
     * true = ceiling (≥)
     * false = floor (≤)
     */
    function toShare(
        IERC20Custom token,
        uint256 amount,
        bool roundUp
    ) external view returns (uint256 share);

    /**
     * @notice Converts vault shares to token amount
     * @param token Token contract for conversion
     * @param share Amount of shares to convert
     * @param roundUp Whether to round up result
     * @return amount Equivalent token amount
     * @dev Calculates:
     * · Token equivalent
     * · Based on totals
     * · Handles precision
     *
     * Rounding:
     * true = ceiling (≥)
     * false = floor (≤)
     */
    function toAmount(
        IERC20Custom token,
        uint256 share,
        bool roundUp
    ) external view returns (uint256 amount);

    /**
     * @notice Gets the list of active controllers
     * @return Array of controller addresses
     */
    function getControllers() external view returns (address[] memory);

    /*//////////////////////////////////////////////////////////////
                            VAULT TOTALS
    //////////////////////////////////////////////////////////////*/
    /**
     * @notice Retrieves vault's total supply tracking
     * @param token Token contract to query
     * @return vaultTotals Rebase struct containing:
     * · elastic: Total token amount
     * · base: Total shares
     * @dev Provides:
     * · Current vault state
     * · Supply tracking
     * · Conversion basis
     *
     * Used for:
     * · Share calculations
     * · Amount conversions
     * · State validation
     */
    function totals(
        IERC20Custom token
    ) external view returns (Rebase memory vaultTotals);
}

File 24 of 25 : IVoteEscrowedSTTX.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.8.24 <0.9.0;

/**
 * @title IVoteEscrowedSTTX
 * @dev Interface for vote-escrowed STTX (veSTTX) token operations
 * @notice Defines functionality for:
 * 1. Token withdrawal management
 * 2. Escrow position handling
 * 3. Voting power release
 */
interface IVoteEscrowedSTTX {
    /*//////////////////////////////////////////////////////////////
                        WITHDRAWAL OPERATIONS
    //////////////////////////////////////////////////////////////*/
    /**
     * @notice Processes withdrawal of escrowed STTX tokens
     * @dev Handles:
     * · Lock period verification
     * · Position liquidation
     * · Token transfers
     *
     * Requirements:
     * · Lock period expired
     * · Active position exists
     * · Caller is position owner
     *
     * Effects:
     * · Releases locked tokens
     * · Removes voting power
     * · Clears escrow position
     */
    function withdraw() external;
}

File 25 of 25 : AuxRebase.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.8.24 <0.9.0;

/**
 * @title Rebase Library
 * @dev Library for handling elastic supply token calculations and adjustments
 * @notice This library provides mathematical operations for elastic/base token conversions
 * and supply adjustments. It handles two key concepts:
 *
 * 1. Elastic Supply: The actual total supply that can expand or contract
 * 2. Base Supply: The underlying base amount that remains constant
 */
/*//////////////////////////////////////////////////////////////
                               TYPES
//////////////////////////////////////////////////////////////*/
/**
 * @dev Core data structure for elastic supply tracking
 * @param elastic Current elastic (rebased) supply
 * @param base Current base (non-rebased) supply
 */
struct Rebase {
    uint256 elastic;
    uint256 base;
}

/**
 * @title AuxRebase
 * @dev Auxiliary functions for elastic supply calculations
 * @notice Provides safe mathematical operations for elastic/base conversions
 * with optional rounding control
 */
library AuxRebase {
    /*//////////////////////////////////////////////////////////////
                         ELASTIC SUPPLY OPERATIONS
    //////////////////////////////////////////////////////////////*/
    /**
     * @notice Increases the elastic supply
     * @param total Current total supply state
     * @param elastic Amount to add to elastic supply
     * @return newElastic Updated elastic supply after addition
     */
    function addElastic(
        Rebase storage total,
        uint256 elastic
    ) internal returns (uint256 newElastic) {
        newElastic = total.elastic += elastic;
    }

    /**
     * @notice Decreases the elastic supply
     * @param total Current total supply state
     * @param elastic Amount to subtract from elastic supply
     * @return newElastic Updated elastic supply after subtraction
     */
    function subElastic(
        Rebase storage total,
        uint256 elastic
    ) internal returns (uint256 newElastic) {
        newElastic = total.elastic -= elastic;
    }

    /*//////////////////////////////////////////////////////////////
                         CONVERSION OPERATIONS
    //////////////////////////////////////////////////////////////*/
    /**
     * @notice Converts an elastic amount to its base amount
     * @param total Current total supply state
     * @param elastic Amount of elastic tokens to convert
     * @param roundUp If true, rounds up the result
     * @return base Equivalent amount in base units
     * @dev
     * · If elastic supply is 0, returns elastic amount as base
     * · Handles potential precision loss during conversion
     * · Rounding can cause slight variations in converted amounts
     * · Recommended for scenarios requiring precise supply tracking
     *
     * Rounding Behavior:
     * · roundUp = false: Always rounds down (truncates)
     * · roundUp = true: Rounds up if there's a fractional remainder
     *
     * Edge Cases:
     * · total.elastic == 0: Returns input elastic as base
     * · Potential for minimal precision differences
     */
    function toBase(
        Rebase memory total,
        uint256 elastic,
        bool roundUp
    ) internal pure returns (uint256 base) {
        if (total.elastic == 0) {
            base = elastic;
        } else {
            base = (elastic * total.base) / total.elastic;
            if (roundUp && (base * total.elastic) / total.base < elastic) {
                base++;
            }
        }
    }

    /**
     * @notice Converts a base amount to its elastic amount
     * @param total Current total supply state
     * @param base Amount of base tokens to convert
     * @param roundUp If true, rounds up the result
     * @return elastic Equivalent amount in elastic units
     * @dev
     * · If base supply is 0, returns base amount as elastic
     * · Handles potential precision loss during conversion
     * · Rounding can cause slight variations in converted amounts
     * · Recommended for scenarios requiring precise supply tracking
     *
     * Rounding Behavior:
     * · roundUp = false: Always rounds down (truncates)
     * · roundUp = true: Rounds up if there's a fractional remainder
     *
     * Edge Cases:
     * · total.base == 0: Returns input base as elastic
     * · Potential for minimal precision differences
     */
    function toElastic(
        Rebase memory total,
        uint256 base,
        bool roundUp
    ) internal pure returns (uint256 elastic) {
        if (total.base == 0) {
            elastic = base;
        } else {
            elastic = (base * total.elastic) / total.base;
            if (roundUp && (elastic * total.base) / total.elastic < base) {
                elastic++;
            }
        }
    }

    /*//////////////////////////////////////////////////////////////
                         COMBINED OPERATIONS
    //////////////////////////////////////////////////////////////*/
    /**
     * @notice Adds elastic tokens and calculates corresponding base amount
     * @param total Current total supply state
     * @param elastic Amount of elastic tokens to add
     * @param roundUp If true, rounds up base conversion
     * @return (Rebase, uint256) Updated total supply and calculated base amount
     */
    function add(
        Rebase memory total,
        uint256 elastic,
        bool roundUp
    ) internal pure returns (Rebase memory, uint256 base) {
        base = toBase(total, elastic, roundUp);
        total.elastic += elastic;
        total.base += base;
        return (total, base);
    }

    /**
     * @notice Subtracts base tokens and calculates corresponding elastic amount
     * @param total Current total supply state
     * @param base Amount of base tokens to subtract
     * @param roundUp If true, rounds up elastic conversion
     * @return (Rebase, uint256) Updated total supply and calculated elastic amount
     */
    function sub(
        Rebase memory total,
        uint256 base,
        bool roundUp
    ) internal pure returns (Rebase memory, uint256 elastic) {
        elastic = toElastic(total, base, roundUp);
        total.elastic -= elastic;
        total.base -= base;
        return (total, elastic);
    }

    /**
     * @notice Adds specific amounts to both elastic and base supplies
     * @param total Current total supply state
     * @param elastic Amount of elastic tokens to add
     * @param base Amount of base tokens to add
     * @return Rebase Updated total supply after addition
     */
    function add(
        Rebase memory total,
        uint256 elastic,
        uint256 base
    ) internal pure returns (Rebase memory) {
        total.elastic += elastic;
        total.base += base;
        return total;
    }

    /**
     * @notice Subtracts specific amounts from both elastic and base supplies
     * @param total Current total supply state
     * @param elastic Amount of elastic tokens to subtract
     * @param base Amount of base tokens to subtract
     * @return Rebase Updated total supply after subtraction
     */
    function sub(
        Rebase memory total,
        uint256 elastic,
        uint256 base
    ) internal pure returns (Rebase memory) {
        total.elastic -= elastic;
        total.base -= base;
        return total;
    }
}

Settings
{
  "viaIR": true,
  "evmVersion": "paris",
  "optimizer": {
    "enabled": false,
    "runs": 200
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "metadata": {
    "useLiteralContent": true
  },
  "libraries": {}
}

Contract Security Audit

Contract ABI

API
[{"inputs":[],"name":"ContractAlreadySet","type":"error"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"InvalidOwner","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"UnauthorizedAccount","type":"error"},{"inputs":[],"name":"ZeroAddress","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"inputs":[],"name":"dusx","outputs":[{"internalType":"contract IERC20Token","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"dusxProvider","outputs":[{"internalType":"contract IDUSXProvider","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"dynamicInterestRate","outputs":[{"internalType":"contract IDynamicInterestRate","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"feesDistributor","outputs":[{"internalType":"contract IFeesDistributor","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"feesWithdrawer","outputs":[{"internalType":"contract IFeesWithdrawer","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"floor","outputs":[{"internalType":"contract IFloor","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"helper","outputs":[{"internalType":"contract IMiscHelper","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lenderOwner","outputs":[{"internalType":"contract ILenderOwner","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"liquidationHelper","outputs":[{"internalType":"contract ILiquidationHelper","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"marketLens","outputs":[{"internalType":"contract IMarketLens","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"minter","outputs":[{"internalType":"contract IMinter","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"oracleChainlink","outputs":[{"internalType":"contract IOracle","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"oracleFloorPrice","outputs":[{"internalType":"contract IOracle","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"psmCircle","outputs":[{"internalType":"contract IPSM","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"psmTether","outputs":[{"internalType":"contract IPSM","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"repayHelper","outputs":[{"internalType":"contract IRepayHelper","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract IERC20Token","name":"dusx_","type":"address"}],"name":"setDUSX","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IDUSXProvider","name":"provider_","type":"address"}],"name":"setDUSXProvider","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IDynamicInterestRate","name":"dynamicInterestRate_","type":"address"}],"name":"setDynamicInterestRate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IFeesDistributor","name":"distributor_","type":"address"}],"name":"setFeesDistributor","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IFeesWithdrawer","name":"withdrawer_","type":"address"}],"name":"setFeesWithdrawer","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IFloor","name":"floor_","type":"address"}],"name":"setFloor","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IMiscHelper","name":"helper_","type":"address"}],"name":"setHelper","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract ILenderOwner","name":"owner_","type":"address"}],"name":"setLenderOwner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract ILiquidationHelper","name":"helper_","type":"address"}],"name":"setLiquidationHelper","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IMarketLens","name":"lens_","type":"address"}],"name":"setMarketLens","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IMinter","name":"minter_","type":"address"}],"name":"setMinter","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IOracle","name":"oracle_","type":"address"}],"name":"setOracleChainlink","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IOracle","name":"oracle_","type":"address"}],"name":"setOracleFloorPrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IPSM","name":"psm_","type":"address"}],"name":"setPSMCircle","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IPSM","name":"psm_","type":"address"}],"name":"setPSMTether","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IRepayHelper","name":"helper_","type":"address"}],"name":"setRepayHelper","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IERC20TokenRebase","name":"sttx_","type":"address"}],"name":"setSTTX","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IStableOwner","name":"owner_","type":"address"}],"name":"setStableOwner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IStakedDUSX","name":"stDUSX_","type":"address"}],"name":"setStakedDUSX","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract ISupplyHangingCalculator","name":"calculator_","type":"address"}],"name":"setSupplyCalculator","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IVault","name":"vault_","type":"address"}],"name":"setVault","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IVoteEscrowedSTTX","name":"veSTTX_","type":"address"}],"name":"setVoteEscrowedSTTX","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"stDUSX","outputs":[{"internalType":"contract IStakedDUSX","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"stableOwner","outputs":[{"internalType":"contract IStableOwner","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"sttx","outputs":[{"internalType":"contract IERC20TokenRebase","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"supplyCalculator","outputs":[{"internalType":"contract ISupplyHangingCalculator","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"vault","outputs":[{"internalType":"contract IVault","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"veSTTX","outputs":[{"internalType":"contract IVoteEscrowedSTTX","name":"","type":"address"}],"stateMutability":"view","type":"function"}]

6080604052346200002d57620000146200003e565b6200001e62000033565b612c67620001b88239612c6790f35b62000039565b60405190565b600080fd5b620000486200004a565b565b6200005e6200005862000065565b6200014a565b565b600090565b6200006f62000060565b503390565b60001c90565b60018060a01b031690565b620000946200009a9162000074565b6200007a565b90565b620000a9905462000085565b90565b60001b90565b90620000c560018060a01b0391620000ac565b9181191691161790565b60018060a01b031690565b90565b620000f6620000f0620000fc92620000cf565b620000da565b620000cf565b90565b6200010a90620000dd565b90565b6200011890620000ff565b90565b90565b90620001386200013262000140926200010d565b6200011b565b8254620000b2565b9055565b60000190565b6200015660006200009d565b620001638260006200011e565b906200019b620001947f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0936200010d565b916200010d565b91620001a662000033565b80620001b28162000144565b0390a356fe60806040526004361015610013575b611744565b61001e60003561030d565b8063063f47911461030857806307546172146103035780630e77e11d146102fe5780632585892e146102f957806329096797146102f45780633239e461146102ef57806335ad6017146102ea5780633a642f7e146102e55780633d506419146102e05780633e25b75b146102db57806340695363146102d65780634f7b02ee146102d1578063579c54c0146102cc5780635c2c7cc6146102c757806361f04d75146102c257806363b0e66a146102bd5780636817031b146102b8578063715018a6146102b357806374453d1b146102ae57806375653d31146102a95780637591a311146102a45780637f9d45701461029f57806380e2cf361461029a5780638da5cb5b146102955780638e0bae7f146102905780639383a0921461028b57806396df10c014610286578063986ccc7f14610281578063a558f3481461027c578063a6f1998b14610277578063a8fdfb1114610272578063add7f5b21461026d578063b5cab36214610268578063ba826c3614610263578063c7366e6e1461025e578063c8884bac14610259578063cbfd73d514610254578063cc5005961461024f578063d33b81cb1461024a578063d358b3a214610245578063d4aaf8b914610240578063db1de6401461023b578063e8c43f1014610236578063ec4d801914610231578063f2fde38b1461022c578063fbfa77cf146102275763fca3b5aa0361000e57611711565b61168d565b61162b565b6115b3565b611551565b6114cf565b61144b565b611416565b6113b4565b611330565b6112cc565b61126a565b6111e6565b611182565b61114d565b6110eb565b611067565b611005565b610f83565b610f01565b610e7d565b610e1b565b610d97565b610d33565b610cdd565b610caa565b610c28565b610bf5565b610b71565b610b0f565b610adc565b610a58565b6109f4565b610990565b61092c565b6108c8565b610864565b610802565b61077e565b61071a565b6106b8565b610636565b6105b4565b610532565b6104b0565b61042c565b61038f565b60e01c90565b60405190565b600080fd5b600080fd5b60018060a01b031690565b61033790610323565b90565b6103439061032e565b90565b61034f8161033a565b0361035657565b600080fd5b9050359061036882610346565b565b90602082820312610384576103819160000161035b565b90565b61031e565b60000190565b346103bd576103a76103a236600461036a565b611822565b6103af610313565b806103b981610389565b0390f35b610319565b60009103126103cd57565b61031e565b90565b6103e96103e46103ee92610323565b6103d2565b610323565b90565b6103fa906103d5565b90565b610406906103f1565b90565b610412906103fd565b9052565b919061042a90600060208501940190610409565b565b3461045c5761043c3660046103c2565b61045861044761185e565b61044f610313565b91829182610416565b0390f35b610319565b61046a9061032e565b90565b61047681610461565b0361047d57565b600080fd5b9050359061048f8261046d565b565b906020828203126104ab576104a891600001610482565b90565b61031e565b346104de576104c86104c3366004610491565b61192c565b6104d0610313565b806104da81610389565b0390f35b610319565b6104ec9061032e565b90565b6104f8816104e3565b036104ff57565b600080fd5b90503590610511826104ef565b565b9060208282031261052d5761052a91600001610504565b90565b61031e565b346105605761054a610545366004610513565b6119e9565b610552610313565b8061055c81610389565b0390f35b610319565b61056e9061032e565b90565b61057a81610565565b0361058157565b600080fd5b9050359061059382610571565b565b906020828203126105af576105ac91600001610586565b90565b61031e565b346105e2576105cc6105c7366004610595565b611aac565b6105d4610313565b806105de81610389565b0390f35b610319565b6105f09061032e565b90565b6105fc816105e7565b0361060357565b600080fd5b90503590610615826105f3565b565b906020828203126106315761062e91600001610608565b90565b61031e565b346106645761064e610649366004610617565b611b6f565b610656610313565b8061066081610389565b0390f35b610319565b6106729061032e565b90565b61067e81610669565b0361068557565b600080fd5b9050359061069782610675565b565b906020828203126106b3576106b09160000161068a565b90565b61031e565b346106e6576106d06106cb366004610699565b611c32565b6106d8610313565b806106e281610389565b0390f35b610319565b6106f4906103f1565b90565b610700906106eb565b9052565b9190610718906000602085019401906106f7565b565b3461074a5761072a3660046103c2565b610746610735611c42565b61073d610313565b91829182610704565b0390f35b610319565b610758906103f1565b90565b6107649061074f565b9052565b919061077c9060006020850194019061075b565b565b346107ae5761078e3660046103c2565b6107aa610799611c8c565b6107a1610313565b91829182610768565b0390f35b610319565b6107bc9061032e565b90565b6107c8816107b3565b036107cf57565b600080fd5b905035906107e1826107bf565b565b906020828203126107fd576107fa916000016107d4565b90565b61031e565b346108305761081a6108153660046107e3565b611d5a565b610822610313565b8061082c81610389565b0390f35b610319565b61083e906103f1565b90565b61084a90610835565b9052565b919061086290600060208501940190610841565b565b34610894576108743660046103c2565b61089061087f611d6a565b610887610313565b9182918261084e565b0390f35b610319565b6108a2906103f1565b90565b6108ae90610899565b9052565b91906108c6906000602085019401906108a5565b565b346108f8576108d83660046103c2565b6108f46108e3611d85565b6108eb610313565b918291826108b2565b0390f35b610319565b610906906103f1565b90565b610912906108fd565b9052565b919061092a90600060208501940190610909565b565b3461095c5761093c3660046103c2565b610958610947611dcf565b61094f610313565b91829182610916565b0390f35b610319565b61096a906103f1565b90565b61097690610961565b9052565b919061098e9060006020850194019061096d565b565b346109c0576109a03660046103c2565b6109bc6109ab611ded565b6109b3610313565b9182918261097a565b0390f35b610319565b6109ce906103f1565b90565b6109da906109c5565b9052565b91906109f2906000602085019401906109d1565b565b34610a2457610a043660046103c2565b610a20610a0f611e37565b610a17610313565b918291826109de565b0390f35b610319565b610a32906103f1565b90565b610a3e90610a29565b9052565b9190610a5690600060208501940190610a35565b565b34610a8857610a683660046103c2565b610a84610a73611e81565b610a7b610313565b91829182610a42565b0390f35b610319565b610a969061032e565b90565b610aa281610a8d565b03610aa957565b600080fd5b90503590610abb82610a99565b565b90602082820312610ad757610ad491600001610aae565b90565b61031e565b34610b0a57610af4610aef366004610abd565b611f4c565b610afc610313565b80610b0681610389565b0390f35b610319565b34610b3d57610b1f3660046103c2565b610b27611fa8565b610b2f610313565b80610b3981610389565b0390f35b610319565b610b4b906103f1565b90565b610b5790610b42565b9052565b9190610b6f90600060208501940190610b4e565b565b34610ba157610b813660046103c2565b610b9d610b8c611fb7565b610b94610313565b91829182610b5b565b0390f35b610319565b610baf9061032e565b90565b610bbb81610ba6565b03610bc257565b600080fd5b90503590610bd482610bb2565b565b90602082820312610bf057610bed91600001610bc7565b90565b61031e565b34610c2357610c0d610c08366004610bd6565b612082565b610c15610313565b80610c1f81610389565b0390f35b610319565b34610c5657610c40610c3b3660046107e3565b6120de565b610c48610313565b80610c5281610389565b0390f35b610319565b610c649061032e565b90565b610c7081610c5b565b03610c7757565b600080fd5b90503590610c8982610c67565b565b90602082820312610ca557610ca291600001610c7c565b90565b61031e565b34610cd857610cc2610cbd366004610c8b565b6121a1565b610cca610313565b80610cd481610389565b0390f35b610319565b34610d0b57610cf5610cf0366004610c8b565b6121fd565b610cfd610313565b80610d0781610389565b0390f35b610319565b610d199061032e565b9052565b9190610d3190600060208501940190610d10565b565b34610d6357610d433660046103c2565b610d5f610d4e612239565b610d56610313565b91829182610d1d565b0390f35b610319565b610d71906103f1565b90565b610d7d90610d68565b9052565b9190610d9590600060208501940190610d74565b565b34610dc757610da73660046103c2565b610dc3610db2612280565b610dba610313565b91829182610d81565b0390f35b610319565b610dd59061032e565b90565b610de181610dcc565b03610de857565b600080fd5b90503590610dfa82610dd8565b565b90602082820312610e1657610e1391600001610ded565b90565b61031e565b34610e4957610e33610e2e366004610dfc565b612322565b610e3b610313565b80610e4581610389565b0390f35b610319565b610e57906103f1565b90565b610e6390610e4e565b9052565b9190610e7b90600060208501940190610e5a565b565b34610ead57610e8d3660046103c2565b610ea9610e98612332565b610ea0610313565b91829182610e67565b0390f35b610319565b610ebb9061032e565b90565b610ec781610eb2565b03610ece57565b600080fd5b90503590610ee082610ebe565b565b90602082820312610efc57610ef991600001610ed3565b90565b61031e565b34610f2f57610f19610f14366004610ee2565b6123d7565b610f21610313565b80610f2b81610389565b0390f35b610319565b610f3d9061032e565b90565b610f4981610f34565b03610f5057565b600080fd5b90503590610f6282610f40565b565b90602082820312610f7e57610f7b91600001610f55565b90565b61031e565b34610fb157610f9b610f96366004610f64565b61246e565b610fa3610313565b80610fad81610389565b0390f35b610319565b610fbf9061032e565b90565b610fcb81610fb6565b03610fd257565b600080fd5b90503590610fe482610fc2565b565b9060208282031261100057610ffd91600001610fd7565b90565b61031e565b346110335761101d611018366004610fe6565b61252b565b611025610313565b8061102f81610389565b0390f35b610319565b611041906103f1565b90565b61104d90611038565b9052565b919061106590600060208501940190611044565b565b34611097576110773660046103c2565b61109361108261253b565b61108a610313565b91829182611051565b0390f35b610319565b6110a59061032e565b90565b6110b18161109c565b036110b857565b600080fd5b905035906110ca826110a8565b565b906020828203126110e6576110e3916000016110bd565b90565b61031e565b34611119576111036110fe3660046110cc565b6125d7565b61110b610313565b8061111581610389565b0390f35b610319565b611127906103f1565b90565b6111339061111e565b9052565b919061114b9060006020850194019061112a565b565b3461117d5761115d3660046103c2565b6111796111686125e7565b611170610313565b91829182611137565b0390f35b610319565b346111b2576111923660046103c2565b6111ae61119d612600565b6111a5610313565b918291826108b2565b0390f35b610319565b6111c0906103f1565b90565b6111cc906111b7565b9052565b91906111e4906000602085019401906111c3565b565b34611216576111f63660046103c2565b61121261120161264a565b611209610313565b918291826111d0565b0390f35b610319565b6112249061032e565b90565b6112308161121b565b0361123757565b600080fd5b9050359061124982611227565b565b90602082820312611265576112629160000161123c565b90565b61031e565b346112985761128261127d36600461124b565b6126ef565b61128a610313565b8061129481610389565b0390f35b610319565b6112a6906103f1565b90565b6112b29061129d565b9052565b91906112ca906000602085019401906112a9565b565b346112fc576112dc3660046103c2565b6112f86112e76126ff565b6112ef610313565b918291826112b6565b0390f35b610319565b61130a906103f1565b90565b61131690611301565b9052565b919061132e9060006020850194019061130d565b565b34611360576113403660046103c2565b61135c61134b612746565b611353610313565b9182918261131a565b0390f35b610319565b61136e9061032e565b90565b61137a81611365565b0361138157565b600080fd5b9050359061139382611371565b565b906020828203126113af576113ac91600001611386565b90565b61031e565b346113e2576113cc6113c7366004611395565b6127e2565b6113d4610313565b806113de81610389565b0390f35b610319565b6113f0906103f1565b90565b6113fc906113e7565b9052565b9190611414906000602085019401906113f3565b565b34611446576114263660046103c2565b6114426114316127f2565b611439610313565b91829182611400565b0390f35b610319565b3461147b5761145b3660046103c2565b611477611466612808565b61146e610313565b91829182611137565b0390f35b610319565b6114899061032e565b90565b61149581611480565b0361149c57565b600080fd5b905035906114ae8261148c565b565b906020828203126114ca576114c7916000016114a1565b90565b61031e565b346114fd576114e76114e23660046114b0565b6128d7565b6114ef610313565b806114f981610389565b0390f35b610319565b61150b9061032e565b90565b61151781611502565b0361151e57565b600080fd5b905035906115308261150e565b565b9060208282031261154c5761154991600001611523565b90565b61031e565b3461157f57611569611564366004611532565b612968565b611571610313565b8061157b81610389565b0390f35b610319565b61158d906103f1565b90565b61159990611584565b9052565b91906115b190600060208501940190611590565b565b346115e3576115c33660046103c2565b6115df6115ce612978565b6115d6610313565b9182918261159d565b0390f35b610319565b6115f18161032e565b036115f857565b600080fd5b9050359061160a826115e8565b565b9060208282031261162657611623916000016115fd565b90565b61031e565b346116595761164361163e36600461160c565b6129fe565b61164b610313565b8061165581610389565b0390f35b610319565b611667906103f1565b90565b6116739061165e565b9052565b919061168b9060006020850194019061166a565b565b346116bd5761169d3660046103c2565b6116b96116a8612a0e565b6116b0610313565b91829182611677565b0390f35b610319565b6116cb9061032e565b90565b6116d7816116c2565b036116de57565b600080fd5b905035906116f0826116ce565b565b9060208282031261170c57611709916000016116e3565b90565b61031e565b3461173f576117296117243660046116f2565b612aaa565b611731610313565b8061173b81610389565b0390f35b610319565b600080fd5b61175a90611755612ab5565b6117ea565b565b60001c90565b60018060a01b031690565b61177961177e9161175c565b611762565b90565b61178b905461176d565b90565b60001b90565b906117a560018060a01b039161178e565b9181191691161790565b6117b8906103d5565b90565b6117c4906117af565b90565b90565b906117df6117da6117e6926117bb565b6117c7565b8254611794565b9055565b611820906117ff6117fa826113e7565b612b0a565b61181961181461180f6014611781565b6113e7565b612b4f565b60146117ca565b565b61182b90611749565b565b600090565b60018060a01b031690565b61184961184e9161175c565b611832565b90565b61185b905461183d565b90565b61186661182d565b506118716013611851565b90565b61188590611880612ab5565b6118ee565b565b60018060a01b031690565b61189e6118a39161175c565b611887565b90565b6118b09054611892565b90565b6118bc906103d5565b90565b6118c8906118b3565b90565b90565b906118e36118de6118ea926118bf565b6118cb565b8254611794565b9055565b61192a906119036118fe82610e4e565b612b0a565b61192061191b61191660006001016118a6565b610e4e565b612b4f565b60006001016118ce565b565b61193590611874565b565b61194890611943612ab5565b6119b1565b565b60018060a01b031690565b6119616119669161175c565b61194a565b90565b6119739054611955565b90565b61197f906103d5565b90565b61198b90611976565b90565b90565b906119a66119a16119ad92611982565b61198e565b8254611794565b9055565b6119e7906119c66119c182610835565b612b0a565b6119e06119db6119d66011611969565b610835565b612b4f565b6011611991565b565b6119f290611937565b565b611a0590611a00612ab5565b611a6e565b565b60018060a01b031690565b611a1e611a239161175c565b611a07565b90565b611a309054611a12565b90565b611a3c906103d5565b90565b611a4890611a33565b90565b90565b90611a63611a5e611a6a92611a3f565b611a4b565b8254611794565b9055565b611aaa90611a83611a7e82610961565b612b0a565b611aa0611a9b611a966003600101611a26565b610961565b612b4f565b6003600101611a4e565b565b611ab5906119f4565b565b611ac890611ac3612ab5565b611b31565b565b60018060a01b031690565b611ae1611ae69161175c565b611aca565b90565b611af39054611ad5565b90565b611aff906103d5565b90565b611b0b90611af6565b90565b90565b90611b26611b21611b2d92611b02565b611b0e565b8254611794565b9055565b611b6d90611b46611b4182610b42565b612b0a565b611b63611b5e611b596002600101611ae9565b610b42565b612b4f565b6002600101611b11565b565b611b7890611ab7565b565b611b8b90611b86612ab5565b611bf4565b565b60018060a01b031690565b611ba4611ba99161175c565b611b8d565b90565b611bb69054611b98565b90565b611bc2906103d5565b90565b611bce90611bb9565b90565b90565b90611be9611be4611bf092611bc5565b611bd1565b8254611794565b9055565b611c3090611c09611c04826106eb565b612b0a565b611c26611c21611c1c6002600a01611bac565b6106eb565b612b4f565b6002600a01611bd4565b565b611c3b90611b7a565b565b600090565b611c4a611c3d565b50611c586002600a01611bac565b90565b600090565b60018060a01b031690565b611c77611c7c9161175c565b611c60565b90565b611c899054611c6b565b90565b611c94611c5b565b50611c9f600e611c7f565b90565b611cb390611cae612ab5565b611d1c565b565b60018060a01b031690565b611ccc611cd19161175c565b611cb5565b90565b611cde9054611cc0565b90565b611cea906103d5565b90565b611cf690611ce1565b90565b90565b90611d11611d0c611d1892611ced565b611cf9565b8254611794565b9055565b611d5890611d31611d2c82610899565b612b0a565b611d4e611d49611d446000600801611cd4565b610899565b612b4f565b6000600801611cfc565b565b611d6390611ca2565b565b600090565b611d72611d65565b50611d7d6011611969565b90565b600090565b611d8d611d80565b50611d9b6000600801611cd4565b90565b600090565b60018060a01b031690565b611dba611dbf9161175c565b611da3565b90565b611dcc9054611dae565b90565b611dd7611d9e565b50611de56001600a01611dc2565b90565b600090565b611df5611de8565b50611e036003600101611a26565b90565b600090565b60018060a01b031690565b611e22611e279161175c565b611e0b565b90565b611e349054611e16565b90565b611e3f611e06565b50611e4d6003600a01611e2a565b90565b600090565b60018060a01b031690565b611e6c611e719161175c565b611e55565b90565b611e7e9054611e60565b90565b611e89611e50565b50611e976000600a01611e74565b90565b611eab90611ea6612ab5565b611f14565b565b60018060a01b031690565b611ec4611ec99161175c565b611ead565b90565b611ed69054611eb8565b90565b611ee2906103d5565b90565b611eee90611ed9565b90565b90565b90611f09611f04611f1092611ee5565b611ef1565b8254611794565b9055565b611f4a90611f29611f248261165e565b612b0a565b611f43611f3e611f396015611ecc565b61165e565b612b4f565b6015611ef4565b565b611f5590611e9a565b565b611f5f612ab5565b611f67611f94565b565b90565b611f80611f7b611f8592611f69565b6103d2565b610323565b90565b611f9190611f6c565b90565b611fa6611fa16000611f88565b612bc3565b565b611fb0611f57565b565b600090565b611fbf611fb2565b50611fcd6002600101611ae9565b90565b611fe190611fdc612ab5565b61204a565b565b60018060a01b031690565b611ffa611fff9161175c565b611fe3565b90565b61200c9054611fee565b90565b612018906103d5565b90565b6120249061200f565b90565b90565b9061203f61203a6120469261201b565b612027565b8254611794565b9055565b6120809061205f61205a8261129d565b612b0a565b61207961207461206f6010612002565b61129d565b612b4f565b601061202a565b565b61208b90611fd0565b565b61209e90612099612ab5565b6120a0565b565b6120dc906120b56120b082610899565b612b0a565b6120d26120cd6120c86001600801611cd4565b610899565b612b4f565b6001600801611cfc565b565b6120e79061208d565b565b6120fa906120f5612ab5565b612163565b565b60018060a01b031690565b6121136121189161175c565b6120fc565b90565b6121259054612107565b90565b612131906103d5565b90565b61213d90612128565b90565b90565b9061215861215361215f92612134565b612140565b8254611794565b9055565b61219f906121786121738261111e565b612b0a565b61219561219061218b600060050161211b565b61111e565b612b4f565b6000600501612143565b565b6121aa906120e9565b565b6121bd906121b8612ab5565b6121bf565b565b6121fb906121d46121cf8261111e565b612b0a565b6121f16121ec6121e7600160050161211b565b61111e565b612b4f565b6001600501612143565b565b612206906121ac565b565b600090565b60018060a01b031690565b6122246122299161175c565b61220d565b90565b6122369054612218565b90565b612241612208565b5061224c600061222c565b90565b600090565b60018060a01b031690565b61226b6122709161175c565b612254565b90565b61227d905461225f565b90565b61228861224f565b50612293600f612273565b90565b6122a7906122a2612ab5565b6122e4565b565b6122b2906103d5565b90565b6122be906122a9565b90565b90565b906122d96122d46122e0926122b5565b6122c1565b8254611794565b9055565b612320906122f96122f4826108fd565b612b0a565b61231661231161230c6001600a01611dc2565b6108fd565b612b4f565b6001600a016122c4565b565b61232b90612296565b565b600090565b61233a61232d565b5061234860006001016118a6565b90565b61235c90612357612ab5565b612399565b565b612367906103d5565b90565b6123739061235e565b90565b90565b9061238e6123896123959261236a565b612376565b8254611794565b9055565b6123d5906123ae6123a982610a29565b612b0a565b6123cb6123c66123c16000600a01611e74565b610a29565b612b4f565b6000600a01612379565b565b6123e09061234b565b565b6123f3906123ee612ab5565b612430565b565b6123fe906103d5565b90565b61240a906123f5565b90565b90565b9061242561242061242c92612401565b61240d565b8254611794565b9055565b61246c90612445612440826109c5565b612b0a565b61246261245d6124586003600a01611e2a565b6109c5565b612b4f565b6003600a01612410565b565b612477906123e2565b565b61248a90612485612ab5565b6124f3565b565b60018060a01b031690565b6124a36124a89161175c565b61248c565b90565b6124b59054612497565b90565b6124c1906103d5565b90565b6124cd906124b8565b90565b90565b906124e86124e36124ef926124c4565b6124d0565b8254611794565b9055565b6125299061250861250382611038565b612b0a565b61252261251d61251860166124ab565b611038565b612b4f565b60166124d3565b565b61253490612479565b565b600090565b612543612536565b5061254e60166124ab565b90565b6125629061255d612ab5565b61259f565b565b61256d906103d5565b90565b61257990612564565b90565b90565b9061259461258f61259b92612570565b61257c565b8254611794565b9055565b6125d5906125b46125af82610d68565b612b0a565b6125ce6125c96125c4600f612273565b610d68565b612b4f565b600f61257f565b565b6125e090612551565b565b600090565b6125ef6125e2565b506125fd600060050161211b565b90565b612608611d80565b506126166001600801611cd4565b90565b600090565b60018060a01b031690565b61263561263a9161175c565b61261e565b90565b6126479054612629565b90565b612652612619565b50612660600260050161263d565b90565b6126749061266f612ab5565b6126b1565b565b61267f906103d5565b90565b61268b90612676565b90565b90565b906126a66126a16126ad92612682565b61268e565b8254611794565b9055565b6126ed906126c66126c1826111b7565b612b0a565b6126e36126de6126d9600260050161263d565b6111b7565b612b4f565b6002600501612691565b565b6126f890612663565b565b600090565b6127076126fa565b506127126010612002565b90565b600090565b60018060a01b031690565b6127316127369161175c565b61271a565b90565b6127439054612725565b90565b61274e612715565b506127596012612739565b90565b61276d90612768612ab5565b6127aa565b565b612778906103d5565b90565b6127849061276f565b90565b90565b9061279f61279a6127a69261277b565b612787565b8254611794565b9055565b6127e0906127bf6127ba82611301565b612b0a565b6127d96127d46127cf6012612739565b611301565b612b4f565b601261278a565b565b6127eb9061275c565b565b600090565b6127fa6127ed565b506128056014611781565b90565b6128106125e2565b5061281e600160050161211b565b90565b6128329061282d612ab5565b61289b565b565b60018060a01b031690565b61284b6128509161175c565b612834565b90565b61285d905461283f565b90565b612869906103d5565b90565b61287590612860565b90565b90565b9061289061288b6128979261286c565b612878565b8254611794565b9055565b6128d5906128b06128ab82611584565b612b0a565b6128cc6128c76128c260018001612853565b611584565b612b4f565b6001800161287b565b565b6128e090612821565b565b6128f3906128ee612ab5565b612930565b565b6128fe906103d5565b90565b61290a906128f5565b90565b90565b9061292561292061292c92612901565b61290d565b8254611794565b9055565b612966906129456129408261074f565b612b0a565b61295f61295a612955600e611c7f565b61074f565b612b4f565b600e612910565b565b612971906128e2565b565b600090565b612980612973565b5061298d60018001612853565b90565b6129a19061299c612ab5565b6129a3565b565b806129bf6129b96129b46000611f88565b61032e565b9161032e565b146129cf576129cd90612bc3565b565b6129fa6129dc6000611f88565b6129e4610313565b91829163b20f76e360e01b835260048301610d1d565b0390fd5b612a0790612990565b565b600090565b612a16612a09565b50612a216015611ecc565b90565b612a3590612a30612ab5565b612a72565b565b612a40906103d5565b90565b612a4c90612a37565b90565b90565b90612a67612a62612a6e92612a43565b612a4f565b8254611794565b9055565b612aa890612a87612a82826103fd565b612b0a565b612aa1612a9c612a976013611851565b6103fd565b612b4f565b6013612a52565b565b612ab390612a24565b565b612abd612239565b612ad6612ad0612acb612c24565b61032e565b9161032e565b03612add57565b612b06612ae8612c24565b612af0610313565b9182916332b2baa360e01b835260048301610d1d565b0390fd5b612b25612b1f612b1a6000611f88565b61032e565b9161032e565b14612b2c57565b612b34610313565b63d92e233d60e01b815280612b4b60048201610389565b0390fd5b612b6a612b64612b5f6000611f88565b61032e565b9161032e565b03612b7157565b612b79610313565b636532af8360e11b815280612b9060048201610389565b0390fd5b612b9d906103f1565b90565b90565b90612bb8612bb3612bbf92612b94565b612ba0565b8254611794565b9055565b612bcd600061222c565b612bd8826000612ba3565b90612c0c612c067f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e093612b94565b91612b94565b91612c15610313565b80612c1f81610389565b0390a3565b612c2c612208565b50339056fea2646970667358221220e5545b89d25d68834757cf3484d65699516c15148b8ce2eac30ca715f49cbf3c64736f6c63430008180033

Deployed Bytecode

0x60806040526004361015610013575b611744565b61001e60003561030d565b8063063f47911461030857806307546172146103035780630e77e11d146102fe5780632585892e146102f957806329096797146102f45780633239e461146102ef57806335ad6017146102ea5780633a642f7e146102e55780633d506419146102e05780633e25b75b146102db57806340695363146102d65780634f7b02ee146102d1578063579c54c0146102cc5780635c2c7cc6146102c757806361f04d75146102c257806363b0e66a146102bd5780636817031b146102b8578063715018a6146102b357806374453d1b146102ae57806375653d31146102a95780637591a311146102a45780637f9d45701461029f57806380e2cf361461029a5780638da5cb5b146102955780638e0bae7f146102905780639383a0921461028b57806396df10c014610286578063986ccc7f14610281578063a558f3481461027c578063a6f1998b14610277578063a8fdfb1114610272578063add7f5b21461026d578063b5cab36214610268578063ba826c3614610263578063c7366e6e1461025e578063c8884bac14610259578063cbfd73d514610254578063cc5005961461024f578063d33b81cb1461024a578063d358b3a214610245578063d4aaf8b914610240578063db1de6401461023b578063e8c43f1014610236578063ec4d801914610231578063f2fde38b1461022c578063fbfa77cf146102275763fca3b5aa0361000e57611711565b61168d565b61162b565b6115b3565b611551565b6114cf565b61144b565b611416565b6113b4565b611330565b6112cc565b61126a565b6111e6565b611182565b61114d565b6110eb565b611067565b611005565b610f83565b610f01565b610e7d565b610e1b565b610d97565b610d33565b610cdd565b610caa565b610c28565b610bf5565b610b71565b610b0f565b610adc565b610a58565b6109f4565b610990565b61092c565b6108c8565b610864565b610802565b61077e565b61071a565b6106b8565b610636565b6105b4565b610532565b6104b0565b61042c565b61038f565b60e01c90565b60405190565b600080fd5b600080fd5b60018060a01b031690565b61033790610323565b90565b6103439061032e565b90565b61034f8161033a565b0361035657565b600080fd5b9050359061036882610346565b565b90602082820312610384576103819160000161035b565b90565b61031e565b60000190565b346103bd576103a76103a236600461036a565b611822565b6103af610313565b806103b981610389565b0390f35b610319565b60009103126103cd57565b61031e565b90565b6103e96103e46103ee92610323565b6103d2565b610323565b90565b6103fa906103d5565b90565b610406906103f1565b90565b610412906103fd565b9052565b919061042a90600060208501940190610409565b565b3461045c5761043c3660046103c2565b61045861044761185e565b61044f610313565b91829182610416565b0390f35b610319565b61046a9061032e565b90565b61047681610461565b0361047d57565b600080fd5b9050359061048f8261046d565b565b906020828203126104ab576104a891600001610482565b90565b61031e565b346104de576104c86104c3366004610491565b61192c565b6104d0610313565b806104da81610389565b0390f35b610319565b6104ec9061032e565b90565b6104f8816104e3565b036104ff57565b600080fd5b90503590610511826104ef565b565b9060208282031261052d5761052a91600001610504565b90565b61031e565b346105605761054a610545366004610513565b6119e9565b610552610313565b8061055c81610389565b0390f35b610319565b61056e9061032e565b90565b61057a81610565565b0361058157565b600080fd5b9050359061059382610571565b565b906020828203126105af576105ac91600001610586565b90565b61031e565b346105e2576105cc6105c7366004610595565b611aac565b6105d4610313565b806105de81610389565b0390f35b610319565b6105f09061032e565b90565b6105fc816105e7565b0361060357565b600080fd5b90503590610615826105f3565b565b906020828203126106315761062e91600001610608565b90565b61031e565b346106645761064e610649366004610617565b611b6f565b610656610313565b8061066081610389565b0390f35b610319565b6106729061032e565b90565b61067e81610669565b0361068557565b600080fd5b9050359061069782610675565b565b906020828203126106b3576106b09160000161068a565b90565b61031e565b346106e6576106d06106cb366004610699565b611c32565b6106d8610313565b806106e281610389565b0390f35b610319565b6106f4906103f1565b90565b610700906106eb565b9052565b9190610718906000602085019401906106f7565b565b3461074a5761072a3660046103c2565b610746610735611c42565b61073d610313565b91829182610704565b0390f35b610319565b610758906103f1565b90565b6107649061074f565b9052565b919061077c9060006020850194019061075b565b565b346107ae5761078e3660046103c2565b6107aa610799611c8c565b6107a1610313565b91829182610768565b0390f35b610319565b6107bc9061032e565b90565b6107c8816107b3565b036107cf57565b600080fd5b905035906107e1826107bf565b565b906020828203126107fd576107fa916000016107d4565b90565b61031e565b346108305761081a6108153660046107e3565b611d5a565b610822610313565b8061082c81610389565b0390f35b610319565b61083e906103f1565b90565b61084a90610835565b9052565b919061086290600060208501940190610841565b565b34610894576108743660046103c2565b61089061087f611d6a565b610887610313565b9182918261084e565b0390f35b610319565b6108a2906103f1565b90565b6108ae90610899565b9052565b91906108c6906000602085019401906108a5565b565b346108f8576108d83660046103c2565b6108f46108e3611d85565b6108eb610313565b918291826108b2565b0390f35b610319565b610906906103f1565b90565b610912906108fd565b9052565b919061092a90600060208501940190610909565b565b3461095c5761093c3660046103c2565b610958610947611dcf565b61094f610313565b91829182610916565b0390f35b610319565b61096a906103f1565b90565b61097690610961565b9052565b919061098e9060006020850194019061096d565b565b346109c0576109a03660046103c2565b6109bc6109ab611ded565b6109b3610313565b9182918261097a565b0390f35b610319565b6109ce906103f1565b90565b6109da906109c5565b9052565b91906109f2906000602085019401906109d1565b565b34610a2457610a043660046103c2565b610a20610a0f611e37565b610a17610313565b918291826109de565b0390f35b610319565b610a32906103f1565b90565b610a3e90610a29565b9052565b9190610a5690600060208501940190610a35565b565b34610a8857610a683660046103c2565b610a84610a73611e81565b610a7b610313565b91829182610a42565b0390f35b610319565b610a969061032e565b90565b610aa281610a8d565b03610aa957565b600080fd5b90503590610abb82610a99565b565b90602082820312610ad757610ad491600001610aae565b90565b61031e565b34610b0a57610af4610aef366004610abd565b611f4c565b610afc610313565b80610b0681610389565b0390f35b610319565b34610b3d57610b1f3660046103c2565b610b27611fa8565b610b2f610313565b80610b3981610389565b0390f35b610319565b610b4b906103f1565b90565b610b5790610b42565b9052565b9190610b6f90600060208501940190610b4e565b565b34610ba157610b813660046103c2565b610b9d610b8c611fb7565b610b94610313565b91829182610b5b565b0390f35b610319565b610baf9061032e565b90565b610bbb81610ba6565b03610bc257565b600080fd5b90503590610bd482610bb2565b565b90602082820312610bf057610bed91600001610bc7565b90565b61031e565b34610c2357610c0d610c08366004610bd6565b612082565b610c15610313565b80610c1f81610389565b0390f35b610319565b34610c5657610c40610c3b3660046107e3565b6120de565b610c48610313565b80610c5281610389565b0390f35b610319565b610c649061032e565b90565b610c7081610c5b565b03610c7757565b600080fd5b90503590610c8982610c67565b565b90602082820312610ca557610ca291600001610c7c565b90565b61031e565b34610cd857610cc2610cbd366004610c8b565b6121a1565b610cca610313565b80610cd481610389565b0390f35b610319565b34610d0b57610cf5610cf0366004610c8b565b6121fd565b610cfd610313565b80610d0781610389565b0390f35b610319565b610d199061032e565b9052565b9190610d3190600060208501940190610d10565b565b34610d6357610d433660046103c2565b610d5f610d4e612239565b610d56610313565b91829182610d1d565b0390f35b610319565b610d71906103f1565b90565b610d7d90610d68565b9052565b9190610d9590600060208501940190610d74565b565b34610dc757610da73660046103c2565b610dc3610db2612280565b610dba610313565b91829182610d81565b0390f35b610319565b610dd59061032e565b90565b610de181610dcc565b03610de857565b600080fd5b90503590610dfa82610dd8565b565b90602082820312610e1657610e1391600001610ded565b90565b61031e565b34610e4957610e33610e2e366004610dfc565b612322565b610e3b610313565b80610e4581610389565b0390f35b610319565b610e57906103f1565b90565b610e6390610e4e565b9052565b9190610e7b90600060208501940190610e5a565b565b34610ead57610e8d3660046103c2565b610ea9610e98612332565b610ea0610313565b91829182610e67565b0390f35b610319565b610ebb9061032e565b90565b610ec781610eb2565b03610ece57565b600080fd5b90503590610ee082610ebe565b565b90602082820312610efc57610ef991600001610ed3565b90565b61031e565b34610f2f57610f19610f14366004610ee2565b6123d7565b610f21610313565b80610f2b81610389565b0390f35b610319565b610f3d9061032e565b90565b610f4981610f34565b03610f5057565b600080fd5b90503590610f6282610f40565b565b90602082820312610f7e57610f7b91600001610f55565b90565b61031e565b34610fb157610f9b610f96366004610f64565b61246e565b610fa3610313565b80610fad81610389565b0390f35b610319565b610fbf9061032e565b90565b610fcb81610fb6565b03610fd257565b600080fd5b90503590610fe482610fc2565b565b9060208282031261100057610ffd91600001610fd7565b90565b61031e565b346110335761101d611018366004610fe6565b61252b565b611025610313565b8061102f81610389565b0390f35b610319565b611041906103f1565b90565b61104d90611038565b9052565b919061106590600060208501940190611044565b565b34611097576110773660046103c2565b61109361108261253b565b61108a610313565b91829182611051565b0390f35b610319565b6110a59061032e565b90565b6110b18161109c565b036110b857565b600080fd5b905035906110ca826110a8565b565b906020828203126110e6576110e3916000016110bd565b90565b61031e565b34611119576111036110fe3660046110cc565b6125d7565b61110b610313565b8061111581610389565b0390f35b610319565b611127906103f1565b90565b6111339061111e565b9052565b919061114b9060006020850194019061112a565b565b3461117d5761115d3660046103c2565b6111796111686125e7565b611170610313565b91829182611137565b0390f35b610319565b346111b2576111923660046103c2565b6111ae61119d612600565b6111a5610313565b918291826108b2565b0390f35b610319565b6111c0906103f1565b90565b6111cc906111b7565b9052565b91906111e4906000602085019401906111c3565b565b34611216576111f63660046103c2565b61121261120161264a565b611209610313565b918291826111d0565b0390f35b610319565b6112249061032e565b90565b6112308161121b565b0361123757565b600080fd5b9050359061124982611227565b565b90602082820312611265576112629160000161123c565b90565b61031e565b346112985761128261127d36600461124b565b6126ef565b61128a610313565b8061129481610389565b0390f35b610319565b6112a6906103f1565b90565b6112b29061129d565b9052565b91906112ca906000602085019401906112a9565b565b346112fc576112dc3660046103c2565b6112f86112e76126ff565b6112ef610313565b918291826112b6565b0390f35b610319565b61130a906103f1565b90565b61131690611301565b9052565b919061132e9060006020850194019061130d565b565b34611360576113403660046103c2565b61135c61134b612746565b611353610313565b9182918261131a565b0390f35b610319565b61136e9061032e565b90565b61137a81611365565b0361138157565b600080fd5b9050359061139382611371565b565b906020828203126113af576113ac91600001611386565b90565b61031e565b346113e2576113cc6113c7366004611395565b6127e2565b6113d4610313565b806113de81610389565b0390f35b610319565b6113f0906103f1565b90565b6113fc906113e7565b9052565b9190611414906000602085019401906113f3565b565b34611446576114263660046103c2565b6114426114316127f2565b611439610313565b91829182611400565b0390f35b610319565b3461147b5761145b3660046103c2565b611477611466612808565b61146e610313565b91829182611137565b0390f35b610319565b6114899061032e565b90565b61149581611480565b0361149c57565b600080fd5b905035906114ae8261148c565b565b906020828203126114ca576114c7916000016114a1565b90565b61031e565b346114fd576114e76114e23660046114b0565b6128d7565b6114ef610313565b806114f981610389565b0390f35b610319565b61150b9061032e565b90565b61151781611502565b0361151e57565b600080fd5b905035906115308261150e565b565b9060208282031261154c5761154991600001611523565b90565b61031e565b3461157f57611569611564366004611532565b612968565b611571610313565b8061157b81610389565b0390f35b610319565b61158d906103f1565b90565b61159990611584565b9052565b91906115b190600060208501940190611590565b565b346115e3576115c33660046103c2565b6115df6115ce612978565b6115d6610313565b9182918261159d565b0390f35b610319565b6115f18161032e565b036115f857565b600080fd5b9050359061160a826115e8565b565b9060208282031261162657611623916000016115fd565b90565b61031e565b346116595761164361163e36600461160c565b6129fe565b61164b610313565b8061165581610389565b0390f35b610319565b611667906103f1565b90565b6116739061165e565b9052565b919061168b9060006020850194019061166a565b565b346116bd5761169d3660046103c2565b6116b96116a8612a0e565b6116b0610313565b91829182611677565b0390f35b610319565b6116cb9061032e565b90565b6116d7816116c2565b036116de57565b600080fd5b905035906116f0826116ce565b565b9060208282031261170c57611709916000016116e3565b90565b61031e565b3461173f576117296117243660046116f2565b612aaa565b611731610313565b8061173b81610389565b0390f35b610319565b600080fd5b61175a90611755612ab5565b6117ea565b565b60001c90565b60018060a01b031690565b61177961177e9161175c565b611762565b90565b61178b905461176d565b90565b60001b90565b906117a560018060a01b039161178e565b9181191691161790565b6117b8906103d5565b90565b6117c4906117af565b90565b90565b906117df6117da6117e6926117bb565b6117c7565b8254611794565b9055565b611820906117ff6117fa826113e7565b612b0a565b61181961181461180f6014611781565b6113e7565b612b4f565b60146117ca565b565b61182b90611749565b565b600090565b60018060a01b031690565b61184961184e9161175c565b611832565b90565b61185b905461183d565b90565b61186661182d565b506118716013611851565b90565b61188590611880612ab5565b6118ee565b565b60018060a01b031690565b61189e6118a39161175c565b611887565b90565b6118b09054611892565b90565b6118bc906103d5565b90565b6118c8906118b3565b90565b90565b906118e36118de6118ea926118bf565b6118cb565b8254611794565b9055565b61192a906119036118fe82610e4e565b612b0a565b61192061191b61191660006001016118a6565b610e4e565b612b4f565b60006001016118ce565b565b61193590611874565b565b61194890611943612ab5565b6119b1565b565b60018060a01b031690565b6119616119669161175c565b61194a565b90565b6119739054611955565b90565b61197f906103d5565b90565b61198b90611976565b90565b90565b906119a66119a16119ad92611982565b61198e565b8254611794565b9055565b6119e7906119c66119c182610835565b612b0a565b6119e06119db6119d66011611969565b610835565b612b4f565b6011611991565b565b6119f290611937565b565b611a0590611a00612ab5565b611a6e565b565b60018060a01b031690565b611a1e611a239161175c565b611a07565b90565b611a309054611a12565b90565b611a3c906103d5565b90565b611a4890611a33565b90565b90565b90611a63611a5e611a6a92611a3f565b611a4b565b8254611794565b9055565b611aaa90611a83611a7e82610961565b612b0a565b611aa0611a9b611a966003600101611a26565b610961565b612b4f565b6003600101611a4e565b565b611ab5906119f4565b565b611ac890611ac3612ab5565b611b31565b565b60018060a01b031690565b611ae1611ae69161175c565b611aca565b90565b611af39054611ad5565b90565b611aff906103d5565b90565b611b0b90611af6565b90565b90565b90611b26611b21611b2d92611b02565b611b0e565b8254611794565b9055565b611b6d90611b46611b4182610b42565b612b0a565b611b63611b5e611b596002600101611ae9565b610b42565b612b4f565b6002600101611b11565b565b611b7890611ab7565b565b611b8b90611b86612ab5565b611bf4565b565b60018060a01b031690565b611ba4611ba99161175c565b611b8d565b90565b611bb69054611b98565b90565b611bc2906103d5565b90565b611bce90611bb9565b90565b90565b90611be9611be4611bf092611bc5565b611bd1565b8254611794565b9055565b611c3090611c09611c04826106eb565b612b0a565b611c26611c21611c1c6002600a01611bac565b6106eb565b612b4f565b6002600a01611bd4565b565b611c3b90611b7a565b565b600090565b611c4a611c3d565b50611c586002600a01611bac565b90565b600090565b60018060a01b031690565b611c77611c7c9161175c565b611c60565b90565b611c899054611c6b565b90565b611c94611c5b565b50611c9f600e611c7f565b90565b611cb390611cae612ab5565b611d1c565b565b60018060a01b031690565b611ccc611cd19161175c565b611cb5565b90565b611cde9054611cc0565b90565b611cea906103d5565b90565b611cf690611ce1565b90565b90565b90611d11611d0c611d1892611ced565b611cf9565b8254611794565b9055565b611d5890611d31611d2c82610899565b612b0a565b611d4e611d49611d446000600801611cd4565b610899565b612b4f565b6000600801611cfc565b565b611d6390611ca2565b565b600090565b611d72611d65565b50611d7d6011611969565b90565b600090565b611d8d611d80565b50611d9b6000600801611cd4565b90565b600090565b60018060a01b031690565b611dba611dbf9161175c565b611da3565b90565b611dcc9054611dae565b90565b611dd7611d9e565b50611de56001600a01611dc2565b90565b600090565b611df5611de8565b50611e036003600101611a26565b90565b600090565b60018060a01b031690565b611e22611e279161175c565b611e0b565b90565b611e349054611e16565b90565b611e3f611e06565b50611e4d6003600a01611e2a565b90565b600090565b60018060a01b031690565b611e6c611e719161175c565b611e55565b90565b611e7e9054611e60565b90565b611e89611e50565b50611e976000600a01611e74565b90565b611eab90611ea6612ab5565b611f14565b565b60018060a01b031690565b611ec4611ec99161175c565b611ead565b90565b611ed69054611eb8565b90565b611ee2906103d5565b90565b611eee90611ed9565b90565b90565b90611f09611f04611f1092611ee5565b611ef1565b8254611794565b9055565b611f4a90611f29611f248261165e565b612b0a565b611f43611f3e611f396015611ecc565b61165e565b612b4f565b6015611ef4565b565b611f5590611e9a565b565b611f5f612ab5565b611f67611f94565b565b90565b611f80611f7b611f8592611f69565b6103d2565b610323565b90565b611f9190611f6c565b90565b611fa6611fa16000611f88565b612bc3565b565b611fb0611f57565b565b600090565b611fbf611fb2565b50611fcd6002600101611ae9565b90565b611fe190611fdc612ab5565b61204a565b565b60018060a01b031690565b611ffa611fff9161175c565b611fe3565b90565b61200c9054611fee565b90565b612018906103d5565b90565b6120249061200f565b90565b90565b9061203f61203a6120469261201b565b612027565b8254611794565b9055565b6120809061205f61205a8261129d565b612b0a565b61207961207461206f6010612002565b61129d565b612b4f565b601061202a565b565b61208b90611fd0565b565b61209e90612099612ab5565b6120a0565b565b6120dc906120b56120b082610899565b612b0a565b6120d26120cd6120c86001600801611cd4565b610899565b612b4f565b6001600801611cfc565b565b6120e79061208d565b565b6120fa906120f5612ab5565b612163565b565b60018060a01b031690565b6121136121189161175c565b6120fc565b90565b6121259054612107565b90565b612131906103d5565b90565b61213d90612128565b90565b90565b9061215861215361215f92612134565b612140565b8254611794565b9055565b61219f906121786121738261111e565b612b0a565b61219561219061218b600060050161211b565b61111e565b612b4f565b6000600501612143565b565b6121aa906120e9565b565b6121bd906121b8612ab5565b6121bf565b565b6121fb906121d46121cf8261111e565b612b0a565b6121f16121ec6121e7600160050161211b565b61111e565b612b4f565b6001600501612143565b565b612206906121ac565b565b600090565b60018060a01b031690565b6122246122299161175c565b61220d565b90565b6122369054612218565b90565b612241612208565b5061224c600061222c565b90565b600090565b60018060a01b031690565b61226b6122709161175c565b612254565b90565b61227d905461225f565b90565b61228861224f565b50612293600f612273565b90565b6122a7906122a2612ab5565b6122e4565b565b6122b2906103d5565b90565b6122be906122a9565b90565b90565b906122d96122d46122e0926122b5565b6122c1565b8254611794565b9055565b612320906122f96122f4826108fd565b612b0a565b61231661231161230c6001600a01611dc2565b6108fd565b612b4f565b6001600a016122c4565b565b61232b90612296565b565b600090565b61233a61232d565b5061234860006001016118a6565b90565b61235c90612357612ab5565b612399565b565b612367906103d5565b90565b6123739061235e565b90565b90565b9061238e6123896123959261236a565b612376565b8254611794565b9055565b6123d5906123ae6123a982610a29565b612b0a565b6123cb6123c66123c16000600a01611e74565b610a29565b612b4f565b6000600a01612379565b565b6123e09061234b565b565b6123f3906123ee612ab5565b612430565b565b6123fe906103d5565b90565b61240a906123f5565b90565b90565b9061242561242061242c92612401565b61240d565b8254611794565b9055565b61246c90612445612440826109c5565b612b0a565b61246261245d6124586003600a01611e2a565b6109c5565b612b4f565b6003600a01612410565b565b612477906123e2565b565b61248a90612485612ab5565b6124f3565b565b60018060a01b031690565b6124a36124a89161175c565b61248c565b90565b6124b59054612497565b90565b6124c1906103d5565b90565b6124cd906124b8565b90565b90565b906124e86124e36124ef926124c4565b6124d0565b8254611794565b9055565b6125299061250861250382611038565b612b0a565b61252261251d61251860166124ab565b611038565b612b4f565b60166124d3565b565b61253490612479565b565b600090565b612543612536565b5061254e60166124ab565b90565b6125629061255d612ab5565b61259f565b565b61256d906103d5565b90565b61257990612564565b90565b90565b9061259461258f61259b92612570565b61257c565b8254611794565b9055565b6125d5906125b46125af82610d68565b612b0a565b6125ce6125c96125c4600f612273565b610d68565b612b4f565b600f61257f565b565b6125e090612551565b565b600090565b6125ef6125e2565b506125fd600060050161211b565b90565b612608611d80565b506126166001600801611cd4565b90565b600090565b60018060a01b031690565b61263561263a9161175c565b61261e565b90565b6126479054612629565b90565b612652612619565b50612660600260050161263d565b90565b6126749061266f612ab5565b6126b1565b565b61267f906103d5565b90565b61268b90612676565b90565b90565b906126a66126a16126ad92612682565b61268e565b8254611794565b9055565b6126ed906126c66126c1826111b7565b612b0a565b6126e36126de6126d9600260050161263d565b6111b7565b612b4f565b6002600501612691565b565b6126f890612663565b565b600090565b6127076126fa565b506127126010612002565b90565b600090565b60018060a01b031690565b6127316127369161175c565b61271a565b90565b6127439054612725565b90565b61274e612715565b506127596012612739565b90565b61276d90612768612ab5565b6127aa565b565b612778906103d5565b90565b6127849061276f565b90565b90565b9061279f61279a6127a69261277b565b612787565b8254611794565b9055565b6127e0906127bf6127ba82611301565b612b0a565b6127d96127d46127cf6012612739565b611301565b612b4f565b601261278a565b565b6127eb9061275c565b565b600090565b6127fa6127ed565b506128056014611781565b90565b6128106125e2565b5061281e600160050161211b565b90565b6128329061282d612ab5565b61289b565b565b60018060a01b031690565b61284b6128509161175c565b612834565b90565b61285d905461283f565b90565b612869906103d5565b90565b61287590612860565b90565b90565b9061289061288b6128979261286c565b612878565b8254611794565b9055565b6128d5906128b06128ab82611584565b612b0a565b6128cc6128c76128c260018001612853565b611584565b612b4f565b6001800161287b565b565b6128e090612821565b565b6128f3906128ee612ab5565b612930565b565b6128fe906103d5565b90565b61290a906128f5565b90565b90565b9061292561292061292c92612901565b61290d565b8254611794565b9055565b612966906129456129408261074f565b612b0a565b61295f61295a612955600e611c7f565b61074f565b612b4f565b600e612910565b565b612971906128e2565b565b600090565b612980612973565b5061298d60018001612853565b90565b6129a19061299c612ab5565b6129a3565b565b806129bf6129b96129b46000611f88565b61032e565b9161032e565b146129cf576129cd90612bc3565b565b6129fa6129dc6000611f88565b6129e4610313565b91829163b20f76e360e01b835260048301610d1d565b0390fd5b612a0790612990565b565b600090565b612a16612a09565b50612a216015611ecc565b90565b612a3590612a30612ab5565b612a72565b565b612a40906103d5565b90565b612a4c90612a37565b90565b90565b90612a67612a62612a6e92612a43565b612a4f565b8254611794565b9055565b612aa890612a87612a82826103fd565b612b0a565b612aa1612a9c612a976013611851565b6103fd565b612b4f565b6013612a52565b565b612ab390612a24565b565b612abd612239565b612ad6612ad0612acb612c24565b61032e565b9161032e565b03612add57565b612b06612ae8612c24565b612af0610313565b9182916332b2baa360e01b835260048301610d1d565b0390fd5b612b25612b1f612b1a6000611f88565b61032e565b9161032e565b14612b2c57565b612b34610313565b63d92e233d60e01b815280612b4b60048201610389565b0390fd5b612b6a612b64612b5f6000611f88565b61032e565b9161032e565b03612b7157565b612b79610313565b636532af8360e11b815280612b9060048201610389565b0390fd5b612b9d906103f1565b90565b90565b90612bb8612bb3612bbf92612b94565b612ba0565b8254611794565b9055565b612bcd600061222c565b612bd8826000612ba3565b90612c0c612c067f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e093612b94565b91612b94565b91612c15610313565b80612c1f81610389565b0390a3565b612c2c612208565b50339056fea2646970667358221220e5545b89d25d68834757cf3484d65699516c15148b8ce2eac30ca715f49cbf3c64736f6c63430008180033

Block Transaction Gas Used Reward
view all blocks produced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
[ Download: CSV Export  ]

A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.