xWinAllocations
xWinSwap
contract IxWinSwap xWinSwap
priceMaster
contract IxWinPriceMaster priceMaster
executors
mapping(address => bool) executors
TargetWeight
mapping(address => uint256) TargetWeight
targetAddr
initialize
function initialize(string _name, string _symbol, address _baseToken, address _swapEngine, address _USDTokenAddr, address _xWinPriceMaster, uint256 _managerFee, uint256 _performanceFee, uint256 _collectionPeriod, address _managerAddr) external
onlyExecutor
modifier onlyExecutor()
updatexWinPriceMaster
function updatexWinPriceMaster(address _xWinPriceMaster) external
update xwin master contract
_deposit
function _deposit(uint256 _amount, uint32 _slippage) internal returns (uint256)
deposit
function deposit(uint256 amount) external returns (uint256)
Deposits baseToken into the fund, and receives shares based on the fund's unitPrice
Parameters
Amount of baseToken to deposit
Return Values
shares Amount of shares minted to depositor
deposit
function deposit(uint256 _amount, uint32 _slippage) public returns (uint256)
_calcMintQty
function _calcMintQty(uint256 _unitPrice) internal view returns (uint256 mintQty)
_withdraw
function _withdraw(uint256 _shares, uint32 _slippage) internal returns (uint256)
withdraw
function withdraw(uint256 _shares) external returns (uint256)
withdraw
function withdraw(uint256 _shares, uint32 _slippage) public returns (uint256)
_getLatestPrice
function _getLatestPrice(address _targetAdd) internal view returns (uint256)
_getLatestPriceInUSD
function _getLatestPriceInUSD(address _targetAdd) internal view returns (uint256)
getLatestPrice
function getLatestPrice(address _targetAdd) external view returns (uint256)
createTargetNames
function createTargetNames(address[] _toAddr, uint256[] _targets) public
Sets target token addresses and weights for the fund
Rebalance
function Rebalance(address[] _toAddr, uint256[] _targets, uint32 _slippage) public
Performs rebalance with new weight and reset next rebalance period
_moveNonIndex
function _moveNonIndex(address _token, uint32 _slippage) internal returns (uint256 balanceToken, uint256 swapOutput)
_getDeleteNames
function _getDeleteNames(address[] _toAddr) internal view returns (struct xWinLib.DeletedNames[] delNames)
Rebalance
function Rebalance(address[] _toAddr, uint256[] _targets) external
Performs rebalance with new weight and reset next rebalance period
_rebalance
function _rebalance(uint32 _slippage) internal
_sellOverWeightNames
function _sellOverWeightNames(uint32 _slippage) internal returns (struct xWinLib.UnderWeightData[] underwgts, uint256 totalunderwgt)
_buyUnderWeightNames
function _buyUnderWeightNames(struct xWinLib.UnderWeightData[] underweights, uint256 totalunderwgt, uint32 _slippage) internal
_getActiveOverWeight
function _getActiveOverWeight(address destAddr, uint256 totalvalue) internal view returns (uint256 destRebQty, uint256 destActiveWeight, bool overweight)
getTokenValues
function getTokenValues(address tokenaddress) external view returns (uint256)
_getTokenValues
function _getTokenValues(address token) internal view returns (uint256)
getBalance
function getBalance(address fromAdd) public view returns (uint256)
_getTransferAmt
function _getTransferAmt(address underying, uint256 redeemratio) internal view returns (struct xWinLib.transferData transData)
setExecutor
function setExecutor(address _wallet, bool _allow) external
getUnitPrice
function getUnitPrice() public view returns (uint256)
The unitprice of a share of this fund in baseToken
_getUnitPrice
function _getUnitPrice() internal view returns (uint256)
getUnitPriceInUSD
function getUnitPriceInUSD() public view returns (uint256)
The unitprice of a share of this fund, in stablecoinUSDAddr
getVaultValues
function getVaultValues() public view returns (uint256 vaultValue)
Gets the total value of the tokens within the fund, value shown in baseToken
_getVaultValues
function _getVaultValues() internal view returns (uint256 vaultValue)
getTargetWeightQty
function getTargetWeightQty(address targetAdd, uint256 srcQty) internal view returns (uint256)
_getTokenValuesInUSD
function _getTokenValuesInUSD(address token) internal view returns (uint256)
getVaultValuesInUSD
function getVaultValuesInUSD() external view returns (uint256)
Gets the total value of the tokens within the fund, value shown in stablecoinUSDAddr
_getVaultValuesInUSD
function _getVaultValuesInUSD() internal view returns (uint256)
getStableValues
function getStableValues() public view returns (uint256 vaultValue)
getTargetNamesAddress
function getTargetNamesAddress() external view returns (address[] _targetNamesAddress)
Last updated