Skip to main content

IGMXFEYProduct

Git Source

Author: Struct Finance

Internal Imports

Functions

initialize

function initialize(
DataTypes.InitConfigParam memory _initConfig,
IStructPriceOracle _structPriceOracle,
ISPToken _spToken,
IGAC _globalAccessControl,
IDistributionManager _distributionManager,
address _yieldSource,
address payable _nativeToken
) external;

deposit

function deposit(DataTypes.Tranche _tranche, uint256 _amount) external payable;

depositFor

function depositFor(DataTypes.Tranche _tranche, uint256 _amount, address _onBehalfOf) external payable;

invest

function invest() external;

removeFundsFromLP

function removeFundsFromLP() external;

claimExcessAndWithdraw

function claimExcessAndWithdraw(DataTypes.Tranche _tranche) external;

claimExcess

function claimExcess(DataTypes.Tranche _tranche) external;

withdraw

function withdraw(DataTypes.Tranche _tranche) external;

getProductConfig

function getProductConfig() external view returns (DataTypes.ProductConfig memory);

getTrancheConfig

function getTrancheConfig(DataTypes.Tranche _tranche) external view returns (DataTypes.TrancheConfig memory);

getTrancheInfo

function getTrancheInfo(DataTypes.Tranche _tranche) external view returns (DataTypes.TrancheInfo memory);

getUserInvestmentAndExcess

function getUserInvestmentAndExcess(DataTypes.Tranche _tranche, address _invested)
external
view
returns (uint256, uint256);

getUserTotalDeposited

function getUserTotalDeposited(DataTypes.Tranche _tranche, address _investor) external view returns (uint256);

getCurrentState

function getCurrentState() external view returns (DataTypes.State);

getInvestorDetails

function getInvestorDetails(DataTypes.Tranche _tranche, address _user)
external
view
returns (DataTypes.Investor memory);

Events

Deposited

Emitted the total amount deposited and the user address whenever deposited to a tranche

event Deposited(
DataTypes.Tranche _tranche, uint256 _trancheDepositedAmount, address indexed _user, uint256 _trancheDepositedTotal
);

RemovedFundsFromLP

Emitted the total amount of senior and junior tokens at maturity along with the fee

event RemovedFundsFromLP(uint256 _srTokensReceived, uint256 _jrTokensReceived, address indexed _user);

Invested

Emitted when the product invests the funds to the liquidity pool

event Invested(
uint256 _trancheTokensInvestedSenior,
uint256 _trancheTokensInvestedJunior,
uint256 _trancheTokensInvestableSenior,
uint256 _trancheTokensInvestableJunior
);

PerformanceFeeSent

Emitted when the performance fee is sent to the feeReceiver

event PerformanceFeeSent(DataTypes.Tranche _tranche, uint256 _tokensSent);

ManagementFeeSent

Emitted when the management fee is sent to the feeReceiver

event ManagementFeeSent(DataTypes.Tranche _tranche, uint256 _tokensSent);

StatusUpdated

Emitted when there is a status update

event StatusUpdated(DataTypes.State status);

TrancheCreated

Emitted when the tranche is created

event TrancheCreated(DataTypes.Tranche trancheType, address indexed tokenAddress, uint256 trancheCapacityMax);

ExcessClaimed

Emitted when the user claims the excess tokens

event ExcessClaimed(
DataTypes.Tranche _tranche, uint256 _spTokenId, uint256 _userInvested, uint256 _excessAmount, address indexed _user
);

Withdrawn

Emitted when the user withdraws from the pool

event Withdrawn(DataTypes.Tranche _tranche, uint256 _amount, address indexed _user);