xWin Strategy

xWinStrategy

stablecoinUSDAddr

address stablecoinUSDAddr

stablecoinUSDAddr is used for view functions with the 'inUSD' suffix.

baseToken

address baseToken

baseToken for the fund/strategy, token for deposit, and token recieved on withdraw

emitEvent

contract IxWinEmitEvent emitEvent

__xWinStrategy_init

function __xWinStrategy_init(string name, string symbol, address _baseToken, address _USDTokenAddr) internal

_Deposit

event _Deposit(uint256 datetime, address contractaddress, uint256 rate, uint256 depositAmount, uint256 shares)

_Withdraw

event _Withdraw(uint256 datetime, address contractaddress, uint256 rate, uint256 avrCost, uint256 withdrawAmount, uint256 shares)

getVaultValues

Gets the total value of the tokens within the fund, value shown in baseToken

_getVaultValues

getUnitPrice

The unitprice of a share of this fund in baseToken

_getUnitPrice

getVaultValuesInUSD

Gets the total value of the tokens within the fund, value shown in stablecoinUSDAddr

getUnitPriceInUSD

The unitprice of a share of this fund, in stablecoinUSDAddr

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

withdraw

Withdraws from the fund by burning shares, liquidating assets into baseToken and transfering to user

Parameters

Name
Type
Description

amount

uint256

Amount of shares to withdraw

Return Values

Name
Type
Description

[0]

uint256

amount Amount of baseTokens transferred to depositor

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

slippage

uint32

Slippage to use for any swaps during the process

Return Values

Name
Type
Description

[0]

uint256

shares Amount of shares minted to depositor

withdraw

Withdraws from the fund by burning shares, liquidating assets into baseToken and transfering to user

Parameters

Name
Type
Description

amount

uint256

Amount of shares to withdraw

slippage

uint32

Slippage to use for any swaps during the process

Return Values

Name
Type
Description

[0]

uint256

amount Amount of baseTokens transferred to depositor

setEmitEvent

updateUSDAddr

setPause

setUnPause

Last updated