xWin DCA-ARB

xWinDCA

targetToken

contract IERC20Upgradeable targetToken

_baseTokenStaking

contract IxWinSingleAssetInterface _baseTokenStaking

swapEngine

contract IxWinSwap swapEngine

xWinPriceMaster

contract IxWinPriceMaster xWinPriceMaster

executors

mapping(address => bool) executors

lastInvestedBlock

uint256 lastInvestedBlock

maxPerSwap

uint256 maxPerSwap

swapDuration

uint256 swapDuration

reinvestDuration

uint256 reinvestDuration

initialize

function initialize(address _baseToken, contract IERC20Upgradeable _targetToken, address _swapEngine, address _priceMaster, address baseTokenStaking_, address _USDTokenAddr, uint256 _managerFee, uint256 _performanceFee, uint256 _collectionPeriod, address _managerAddr) external

onlyExecutor

modifier onlyExecutor()

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)

getAmountToSwap

function getAmountToSwap() public view returns (uint256)

View function to get the amount of base tokens to swap into target token

canSystemDeposit

function canSystemDeposit() public view returns (bool)

systemDeposit

function systemDeposit() external returns (uint256)

Swaps from base token to target token

Only possible when contract not paused.

getStableCoinTotalBalance

function getStableCoinTotalBalance() public view returns (uint256)

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)

getBaseValues

function getBaseValues() 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

updateProperties

function updateProperties(uint256 _maxPerSwap, uint256 _swapDuration, uint256 _reinvestDuration) public

setExecutor

function setExecutor(address _wallet, bool _allow) external

setSwapEngine

function setSwapEngine(address _newSwapEngine) 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

getNextInvestBlock

function getNextInvestBlock() public view returns (uint256)

Last updated