Skip to main content

FEYFactoryConfigurator

Git Source

Inherits: GACManaged

Author: Struct Finance

Configurator contract that is used to update the configuration of the {FEYFactory} contracts.

This contract will be inherited by {FEYFactory} contracts.

State Variables

structPriceOracle

Address of the Struct price oracle

IStructPriceOracle public structPriceOracle;

distributionManager

Address of the Distribution manager

IDistributionManager public distributionManager;

feyProductImplementation

Address of the FEYProduct implementation

address public feyProductImplementation;

managementFee

management fee

uint256 public managementFee = 0;

performanceFee

performance fee

uint256 public performanceFee = 0;

trancheCapacityUSD

Default tranche capacity for the tranches in USD

uint256 public trancheCapacityUSD = 1_000_000 * 10 ** 18;

leverageThresholdMinCap

Limit for the leverage threshold min

uint256 public leverageThresholdMinCap = 1500000;

leverageThresholdMaxCap

Limit for the leverage threshold max

uint256 public leverageThresholdMaxCap = 500000;

trancheDurationMin

Min/Max Tranche duration

uint256 public trancheDurationMin = 7 * 24 * 60 * 60;

trancheDurationMax

uint256 public trancheDurationMax = 200 * 24 * 60 * 60;

minimumInitialDepositUSD

The minimum initial deposit value in USD that the product creator should make.

This is applicable only for non-whitelisted creators

uint256 public minimumInitialDepositUSD = 100 * 10 ** 18;

TRUE

Declare TRUE/FALSE. Saves a bit of gas

uint256 internal constant TRUE = 1;

FALSE

uint256 internal constant FALSE = 2;

maxFixedRate

uint256 public maxFixedRate = 750000;

isTokenActive

Active tokens

mapping(address => uint256) public isTokenActive;

Functions

setStructPriceOracle

Sets the StructPriceOracle.

function setStructPriceOracle(IStructPriceOracle _structPriceOracle) external onlyRole(GOVERNANCE);

Parameters

NameTypeDescription
_structPriceOracleIStructPriceOracleThe StructPriceOracle Interface

setMinimumTrancheDuration

Sets the minimum tranche duration.

function setMinimumTrancheDuration(uint256 _trancheDurationMin) external onlyRole(GOVERNANCE);

Parameters

NameTypeDescription
_trancheDurationMinuint256Minimum tranche duration in seconds

setMaximumTrancheDuration

Sets the maximum tranche duration.

function setMaximumTrancheDuration(uint256 _trancheDurationMax) external onlyRole(GOVERNANCE);

Parameters

NameTypeDescription
_trancheDurationMaxuint256Maximum tranche duration in seconds

setManagementFee

Sets the management fee.

function setManagementFee(uint256 _managementFee) external onlyRole(GOVERNANCE);

Parameters

NameTypeDescription
_managementFeeuint256The management fee in basis points (bps)

setPerformanceFee

Sets the performance fee

function setPerformanceFee(uint256 _performanceFee) external onlyRole(GOVERNANCE);

Parameters

NameTypeDescription
_performanceFeeuint256The performance fee in bps

setLeverageThresholdMinCap

Sets the minimum leverage threshold.

function setLeverageThresholdMinCap(uint256 _levThresholdMin) external onlyRole(GOVERNANCE);

Parameters

NameTypeDescription
_levThresholdMinuint256Minimum laverage treshold in bps

setLeverageThresholdMaxCap

Sets the maximum leverage threshold.

function setLeverageThresholdMaxCap(uint256 _levThresholdMax) external onlyRole(GOVERNANCE);

Parameters

NameTypeDescription
_levThresholdMaxuint256Maximum leverage threshold bps

setTokenStatus

Used to update a token status (active/inactive)

function setTokenStatus(address _token, uint256 _status) external virtual onlyRole(GOVERNANCE);

Parameters

NameTypeDescription
_tokenaddressThe token address
_statusuint256The status of the token

setTrancheCapacity

Sets the new default tranche capacity.

function setTrancheCapacity(uint256 _trancheCapUSD) external onlyRole(GOVERNANCE);

Parameters

NameTypeDescription
_trancheCapUSDuint256New capacity in USD

setMaxFixedRate

Sets the new max fixed rate allowed.

function setMaxFixedRate(uint256 _newMaxFixedRate) external onlyRole(GOVERNANCE);

Parameters

NameTypeDescription
_newMaxFixedRateuint256New max fixed rate bps

setFEYProductImplementation

Sets the new FEYProduct implementation address

All the upcoming products will use the updated implementation

function setFEYProductImplementation(address _feyProductImpl) external onlyRole(GOVERNANCE);

Parameters

NameTypeDescription
_feyProductImpladdressAddress of the new FEYProduct contract

setMinimumDepositValueUSD

Sets the new minimum initial deposit value.

function setMinimumDepositValueUSD(uint256 _newValue) external onlyRole(GOVERNANCE);

Parameters

NameTypeDescription
_newValueuint256New initial minimum deposit value in USD

Events

FEYProductImplementationUpdated

Emitted when the FEYProduct implementaion is updated

event FEYProductImplementationUpdated(address indexed oldImplementation, address indexed newImplementation);

StructPriceOracleUpdated

The following events are emitted when respective setter methods are invoked

event StructPriceOracleUpdated(address indexed structPriceOracle);

TrancheDurationMinUpdated

event TrancheDurationMinUpdated(uint256 minTrancheDuration);

TrancheDurationMaxUpdated

event TrancheDurationMaxUpdated(uint256 maxTrancheDuration);

LeverageThresholdMinUpdated

event LeverageThresholdMinUpdated(uint256 levThresholdMin);

LeverageThresholdMaxUpdated

event LeverageThresholdMaxUpdated(uint256 levThresholdMax);

TrancheCapacityUpdated

event TrancheCapacityUpdated(uint256 defaultTrancheCapUSD);

PerformanceFeeUpdated

event PerformanceFeeUpdated(uint256 performanceFee);

ManagementFeeUpdated

event ManagementFeeUpdated(uint256 managementFee);

MinimumInitialDepositValueUpdated

event MinimumInitialDepositValueUpdated(uint256 newValue);

MaxFixedRateUpdated

event MaxFixedRateUpdated(uint256 _fixedRateMax);

TokenStatusUpdated

event TokenStatusUpdated(address indexed token, uint256 status);