The HotPotFunds Factory facilitates creation of HotPotFunds funds.

interface IHotPotV3FundFactory {
    event FundCreated(
        address indexed manager,
        address indexed token,
        address indexed fund
    );

    function WETH9() external view returns (address);

    function uniV3Factory() external view returns (address);

    function uniV3Router() external view returns (address);

    function controller() external view returns(address);

    function getFund(address manager, address token, uint lockPeriod, uint baseLine, uint managerFee) external view returns (address fund);

    function createFund(address token, bytes calldata descriptor, uint lockPeriod, uint baseLine, uint managerFee) external returns (address fund);
}

1. Functions

1.1. WETH9

  function WETH9() external returns (address)

Returns the address of WETH9

1.2. uniV3Factory

  function uniV3Factory() external returns (address)

Returns the address of the Uniswap V3 factory

1.3. uniV3Router

  function uniV3Router() external returns (address)

Returns the address of the Uniswap V3 router

1.4. controller

  function controller() external returns (address)

Returns the fund controller address

1.5. getFund

  function getFund(
    address manager,
    address token,
    uint256 lockPeriod,
    uint256 baseLine,
    uint256 managerFee
  ) external returns (address fund)

Returns the fund address for a given manager and a token, or address 0 if it does not exist

a manager+token mapping a fund

Parameters:

Name Type Description
manager address The address of the manager who manages the fund
token address Managed token
lockPeriod uint256 Fund lock-up period
baseLine uint256 Fund manager fee baseline
managerFee uint256 Fund manager fee ratio

Return Values:

Name Type Description
fund address Fund address

1.6. createFund

  function createFund(
    address token,
    bytes descriptor,
    uint256 lockPeriod,
    uint256 baseLine,
    uint256 managerFee
  ) external returns (address fund)

Creates a fund for the given manager and token

Parameters:

Name Type Description
token address Managed token
descriptor bytes Fund name + description
lockPeriod uint256 Fund lock-up period
baseLine uint256 The fund manager fee baseline. If the ROI is higher than this baseline, the user will be charged when withdrawing
managerFee uint256 When the ROI is greater than the baseline, the fund manager’s fee ratio

Return Values:

Name Type Description
fund address Fund address

2. Events

2.1. FundCreated

  event FundCreated(
    address manager,
    address token,
    address fund
  )

Emitted when a fund is created

Parameters:

Name Type Description
manager address The manager address of fund
token address Deposit or withdrawal token supported by the fund
fund address The fund is created
Copyright © hotpot fund 2021 all right reserved,powered by GitbookUpdated At: 2021-12-28 10:33:50

results matching ""

    No results matching ""