xWin Strategy With Fee
xWinStrategyWithFee
waivedPerformanceFees
mapping(address => bool) waivedPerformanceFeesPriviliged addresses with fees waived for this fund (e.g. manager/platform)
performanceFee
uint256 performanceFeeperformance fee in 4 decimals, e.g 100% = 10000
managerFee
uint256 managerFeemanager fee in 4 decimals, e.g 100% = 10000
pendingMFee
uint256 pendingMFeePending shares to award to manager
collectionPeriod
uint256 collectionPeriodBlocks between performance fee collection
collectionBlock
uint256 collectionBlockNext available collection block number
prevCollectionBlock
uint256 prevCollectionBlockLast performance fee collection block number
watermarkUnitprice
uint256 watermarkUnitpriceHigh water mark for performance fee collection
strategyManager
address strategyManagerManager of this strategy
lastManagerFeeCollection
uint256 lastManagerFeeCollectionLast management fee collection block number
blocksPerDay
uint256 blocksPerDaypendingNewPerformanceFee
uint256 pendingNewPerformanceFeeNew performance fee rate, which will be applied on next performance fee collection
lockingAddress
address lockingAddressAddress 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) internalupdateLockedStakingAddress
function updateLockedStakingAddress(address _lockedStaking) externalcanCollectPerformanceFee
function canCollectPerformanceFee() public view virtual returns (bool)View function to check if performance fee can be collected
_calcFundFee
function _calcFundFee() internal virtualCalculates management fee, updating pendingMFee
collectFundFee
function collectFundFee() external virtualMints management fee shares to manager
collectPerformanceFee
function collectPerformanceFee() external virtualcollects performance fee
performanceWithdraw
function performanceWithdraw(uint256 _withdrawUnits, uint256 _amtOut) internal returns (uint256)Function to handle performance fee on withdraw
Parameters
_withdrawUnits
uint256
Amount of shares being withdrawn
_amtOut
uint256
Amount of tokens after swapping back to base currency
Return Values
[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) externalsetManagerFee
function setManagerFee(uint256 _newManagerFee) externalsetPerformanceCollectionPeriod
function setPerformanceCollectionPeriod(uint256 _newPeriod) externalsetBlockPerDay
function setBlockPerDay(uint256 _newBlocksPerDay) externalgetFundTotalSupply
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) externalremoveWaiveFee
function removeWaiveFee(address _contract) external_isContract
function _isContract(address addr) internal view returns (bool)Last updated