xWin IRT (BSC)

xWinIRT

TradeQueue

struct TradeQueue {
  bool nextTrade;
  uint8 tradeType;
  bool ReadyToTrade;
  uint256 nextTradeBlock;
  uint256 AmountToBuy;
  uint256 AmountPerDay;
}

targetToken

contract IERC20Upgradeable targetToken

swapEngine

contract IxWinSwap swapEngine

xWinPriceMaster

contract IxWinPriceMaster xWinPriceMaster

stopLossPrice

uint256 stopLossPrice

stopLossPerc

uint256 stopLossPerc

executors

mapping(address => bool) executors

tradeQueue

struct xWinIRT.TradeQueue tradeQueue

maxPerSwap

uint256 maxPerSwap

tradeCycle

uint256 tradeCycle

initialize

function initialize(address _baseToken, contract IERC20Upgradeable _targetToken, 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

checkUpkeep

function checkUpkeep(bytes) external view returns (bool upkeepNeeded, bytes performData)

performUpkeep

function performUpkeep(bytes) external

getTriggerStopLoss

function getTriggerStopLoss() public view returns (bool)

_setStopLossBuy

function _setStopLossBuy(uint256 _rate) internal

deposit

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() external

systemTrade

function systemTrade(uint8 _tradeType) public

Triggered offchain when there is a signal buy or close-buy

_systemTrade

function _systemTrade(uint8 _tradeType) internal

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)

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() external

setProperties

function setProperties(uint256 _tradeCycle, uint256 _maxPerSwap) public

setExecutor

function setExecutor(address _wallet, bool _allow) external

setSwapEngine

function setSwapEngine(address _newSwapEngine) external

setStopLossPerc

function setStopLossPerc(uint256 _newStopLossPerc) external

getUnitPrice

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