xWin Strategy With Fee

xWinStrategyWithFee

waivedPerformanceFees

mapping(address => bool) waivedPerformanceFees

Priviliged addresses with fees waived for this fund (e.g. manager/platform)

performanceFee

uint256 performanceFee

performance fee in 4 decimals, e.g 100% = 10000

managerFee

uint256 managerFee

manager fee in 4 decimals, e.g 100% = 10000

pendingMFee

uint256 pendingMFee

Pending shares to award to manager

collectionPeriod

uint256 collectionPeriod

Blocks between performance fee collection

collectionBlock

uint256 collectionBlock

Next available collection block number

prevCollectionBlock

uint256 prevCollectionBlock

Last performance fee collection block number

watermarkUnitprice

uint256 watermarkUnitprice

High water mark for performance fee collection

strategyManager

address strategyManager

Manager of this strategy

lastManagerFeeCollection

uint256 lastManagerFeeCollection

Last management fee collection block number

blocksPerDay

uint256 blocksPerDay

pendingNewPerformanceFee

uint256 pendingNewPerformanceFee

New performance fee rate, which will be applied on next performance fee collection

lockingAddress

address lockingAddress

Address of locked staking contract, for performance fee discounts

__xWinStrategyWithFee_init

function __xWinStrategyWithFee_init(string _name, string _symbol, address _baseToken, address _USDTokenAddr, uint256 _managerFee, uint256 _performanceFee, uint256 _collectionPeriod, address _managerAddr) internal

updateLockedStakingAddress

function updateLockedStakingAddress(address _lockedStaking) external

canCollectPerformanceFee

function canCollectPerformanceFee() public view virtual returns (bool)

View function to check if performance fee can be collected

_calcFundFee

function _calcFundFee() internal virtual

Calculates management fee, updating pendingMFee

collectFundFee

function collectFundFee() external virtual

Mints management fee shares to manager

collectPerformanceFee

function collectPerformanceFee() external virtual

collects performance fee

performanceWithdraw

function performanceWithdraw(uint256 _withdrawUnits, uint256 _amtOut) internal returns (uint256)

Function to handle performance fee on withdraw

Parameters

Name
Type
Description

_withdrawUnits

uint256

Amount of shares being withdrawn

_amtOut

uint256

Amount of tokens after swapping back to base currency

Return Values

Name
Type
Description

[0]

uint256

amount Amount left after performance fee deduction

_getMintQty

function _getMintQty(uint256 _depositAmt) internal view virtual returns (uint256 mintQty)

Calc qty to issue during deposit

_getNewFundUnits

function _getNewFundUnits(uint256 totalFundB4, uint256 totalValueAfter) internal view virtual returns (uint256)

setPerformanceFee

function setPerformanceFee(uint256 _newPerformanceFee) external

setManagerFee

function setManagerFee(uint256 _newManagerFee) external

setPerformanceCollectionPeriod

function setPerformanceCollectionPeriod(uint256 _newPeriod) external

setBlockPerDay

function setBlockPerDay(uint256 _newBlocksPerDay) external

getFundTotalSupply

function getFundTotalSupply() public view virtual returns (uint256)

GetStrategyData

function GetStrategyData() external view returns (address baseCcy, uint256 totalUnitB4, uint256 unitprice, uint256 fundvalue, uint256 unitpriceUSD, uint256 fundvalueUSD, string name, string symbol, uint256 managementFee, uint256 performFee, address mAddr, uint256 highWaterMarkPrice)

View function to get all the fund's main data and parameters

setManagerWallet

function setManagerWallet(address _newManagerWallet) external

_convertTo18

function _convertTo18(uint256 value, address token) internal view returns (uint256)

_convertFrom18

function _convertFrom18(uint256 value, address token) internal view returns (uint256)

addWaiveFee

function addWaiveFee(address _contract) external

removeWaiveFee

function removeWaiveFee(address _contract) external

_isContract

function _isContract(address addr) internal view returns (bool)

Last updated