xWinFund Protocol served the function of storing the balance of each underlying token. It implemented the business logic of each function provided as a vault
xWinFund communicate with Pancakeswap Router for swapping: BNB-Token and Token-BNB
GetFundDataAll() is provided to be called off-chain to get all the statistic data needed for the vault. This includes TVL, UnitPrice and etc.
function GetFundDataAll() external view returns (IBEP20 _baseToken,address memory _targetNamesAddress,address _managerOwner,uint256 totalUnitB4,uint256 baseBalance,uint256 unitprice,uint256 fundvalue,string memory fundName,string memory symbolName,uint256 managerFee,uint256 unitpriceInUSD)
getLatestPrice is integrated with xWinMaster to get the price of each token. The token price can be either fetched from Band Protocol or purely from Pancakeswap LP.
function getLatestPrice(address _targetAdd) external view returns (uint256)
Rebalance cycle is defaulted to 876000 blocks. It will be triggered whenever there is subscription. Vault owner can update this if necessary.
If there are any new token added into xWin pool for vault constructing purpose, vault admin can upgrade the xWinMaster contract in the existing vault.
function updateXwinMaster(address _masterOwner) external onlyManager
Vault admin can update the manager fee through the method provided. Even though there is no controlled in the smart contract itself to have new fee imposed in the vault but xWin admin strictly monitor each of the vault launched in the platform treated the community fairly and equally. Manager in general has to inform xWin community when the manager is increased or decreased.
function updateManagerFee(uint256 newFeebps) external onlyManager payable