xWin IRT (BSC)
xWinIRT
TradeQueue
struct TradeQueue {
bool nextTrade;
uint8 tradeType;
bool ReadyToTrade;
uint256 nextTradeBlock;
uint256 AmountToBuy;
uint256 AmountPerDay;
}targetToken
contract IERC20Upgradeable targetTokenswapEngine
contract IxWinSwap swapEnginexWinPriceMaster
contract IxWinPriceMaster xWinPriceMasterstopLossPrice
uint256 stopLossPricestopLossPerc
uint256 stopLossPercexecutors
mapping(address => bool) executorstradeQueue
struct xWinIRT.TradeQueue tradeQueuemaxPerSwap
uint256 maxPerSwaptradeCycle
uint256 tradeCycleinitialize
function initialize(address _baseToken, contract IERC20Upgradeable _targetToken, address _swapEngine, address _USDTokenAddr, address _xWinPriceMaster, uint256 _managerFee, uint256 _performanceFee, uint256 _collectionPeriod, address _managerAddr) externalonlyExecutor
modifier onlyExecutor()updatexWinPriceMaster
function updatexWinPriceMaster(address _xWinPriceMaster) externalupdate xwin master contract
checkUpkeep
function checkUpkeep(bytes) external view returns (bool upkeepNeeded, bytes performData)performUpkeep
function performUpkeep(bytes) externalgetTriggerStopLoss
function getTriggerStopLoss() public view returns (bool)_setStopLossBuy
function _setStopLossBuy(uint256 _rate) internaldeposit
function deposit(uint256 _amount) external returns (uint256)deposit
function deposit(uint256 _amount, uint32 _slippage) public returns (uint256)_deposit
function _deposit(uint256 _amount, uint32 _slippage) internal returns (uint256)systemReTrade
function systemReTrade() externalsystemTrade
function systemTrade(uint8 _tradeType) publicTriggered offchain when there is a signal buy or close-buy
_systemTrade
function _systemTrade(uint8 _tradeType) internalgetVaultValues
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)getVaultValuesInUSD
function getVaultValuesInUSD() public view returns (uint256 vaultValue)Gets the total value of the tokens within the fund, value shown in stablecoinUSDAddr
getStableValues
function getStableValues() public view returns (uint256 vaultValue)getTargetValues
function getTargetValues() public view returns (uint256 vaultValue)withdraw
function withdraw(uint256 _shares) external returns (uint256)withdraw
function withdraw(uint256 _shares, uint32 _slippage) public returns (uint256)_withdraw
function _withdraw(uint256 _shares, uint32 _slippage) internal returns (uint256)emergencyUnWindPosition
function emergencyUnWindPosition() externalsetProperties
function setProperties(uint256 _tradeCycle, uint256 _maxPerSwap) publicsetExecutor
function setExecutor(address _wallet, bool _allow) externalsetSwapEngine
function setSwapEngine(address _newSwapEngine) externalsetStopLossPerc
function setStopLossPerc(uint256 _newStopLossPerc) externalgetUnitPrice
function getUnitPrice() public view returns (uint256)Calculates the price per share
_getUnitPrice
function _getUnitPrice() internal view returns (uint256)getUnitPriceInUSD
function getUnitPriceInUSD() public view returns (uint256)The unitprice of a share of this fund, in stablecoinUSDAddr
GetAmountPerDay
function GetAmountPerDay() external view returns (uint256)GetAmountToBuy
function GetAmountToBuy() external view returns (uint256)BuyOrSell
function BuyOrSell() public view returns (uint256)ReadyToTrade
function ReadyToTrade() public view returns (bool)UserShares
function UserShares() external view returns (uint256)isReTrade
function isReTrade() public view returns (bool)Last updated