xWin Allocation
xWinAllocations
xWinSwap
contract IxWinSwap xWinSwappriceMaster
contract IxWinPriceMaster priceMasterexecutors
mapping(address => bool) executorsTargetWeight
mapping(address => uint256) TargetWeighttargetAddr
address[] targetAddrinitialize
function initialize(string _name, string _symbol, address _baseToken, address _swapEngine, address _USDTokenAddr, address _xWinPriceMaster, uint256 _managerFee, uint256 _performanceFee, uint256 _collectionPeriod, address _managerAddr) externalonlyExecutor
modifier onlyExecutor()updatexWinPriceMaster
update xwin master contract
_deposit
deposit
Deposits baseToken into the fund, and receives shares based on the fund's unitPrice
Parameters
Name
Type
Description
amount
uint256
Amount of baseToken to deposit
Return Values
Name
Type
Description
[0]
uint256
shares Amount of shares minted to depositor
deposit
_calcMintQty
_withdraw
withdraw
withdraw
_getLatestPrice
_getLatestPriceInUSD
getLatestPrice
createTargetNames
Sets target token addresses and weights for the fund
Rebalance
Performs rebalance with new weight and reset next rebalance period
_moveNonIndex
_getDeleteNames
Rebalance
Performs rebalance with new weight and reset next rebalance period
_rebalance
_sellOverWeightNames
_buyUnderWeightNames
_getActiveOverWeight
getTokenValues
_getTokenValues
getBalance
_getTransferAmt
setExecutor
getUnitPrice
The unitprice of a share of this fund in baseToken
_getUnitPrice
getUnitPriceInUSD
The unitprice of a share of this fund, in stablecoinUSDAddr
getVaultValues
Gets the total value of the tokens within the fund, value shown in baseToken
_getVaultValues
getTargetWeightQty
_getTokenValuesInUSD
getVaultValuesInUSD
Gets the total value of the tokens within the fund, value shown in stablecoinUSDAddr
_getVaultValuesInUSD
getStableValues
getTargetNamesAddress
Last updated