API related docs

FundV2

Holds a portfolio of tokens and allows a fund manager to trade and rebalance tokens

Rebalance

function Rebalance(address[] _toAddr, uint256[] _targets) external

Rebalance the Portfolio Vault and redistribute the funds new tokens and weights

Parameters

Name
Type
Description

_toAddr

address[]

Token Addresses

_targets

uint256[]

Target Weights for tokens

Rebalance

function Rebalance(address[] _toAddr, uint256[] _targets, uint32 _slippage) public

Rebalance the Portfolio Vault and redistribute the funds new tokens and weights

Parameters

Name
Type
Description

_toAddr

address[]

Token Addresses

_targets

uint256[]

Target Weights for tokens

_slippage

uint32

DEX slippage for swaps

deposit

Buy fund shares by depositing baseToken

Swaps will be done before shares are created

Parameters

Name
Type
Description

amount

uint256

Amount of baseToken to deposit

Return Values

Name
Type
Description

shares

uint256

Amount of shares received

deposit

Buy fund shares by depositing baseToken

Swaps will be done before shares are created

Parameters

Name
Type
Description

amount

uint256

Amount of baseToken to deposit

_slippage

uint32

DEX slippage for swaps

Return Values

Name
Type
Description

shares

uint256

Amount of shares received

withdraw

Exchange Portfolio vault shares for baseToken

Performance fee will be charged if a profit is made, if no deposit the entire withdraw amount will be treated as profit

Parameters

Name
Type
Description

amount

uint256

Amount of shares to withdraw

Return Values

Name
Type
Description

tokenAmt

uint256

Amount of baseToken received

withdraw

Exchange Portfolio vault shares for baseToken

Performance fee will be charged if a profit is made, if no deposit the entire withdraw amount will be treated as profit

Parameters

Name
Type
Description

amount

uint256

Amount of shares to withdraw

_slippage

uint32

DEX slippage for swaps

Return Values

Name
Type
Description

tokenAmt

uint256

Amount of baseToken received

FundV2Factory

Deploys New Portfolio Fund Contracts

createFundPrivate

Deploys a new ERC20 Private Portfolio Fund

Parameters

Name
Type
Description

name

string

Name of the Portfolio Fund

symbol

string

Symbol of the Portfolio Fund token

_toAddresses

address[]

Initial allocation token addresses

_targetWeight

uint256[]

Initial allocation target weights

massProcessPlatformFee

Process platform fee on all funds

processPlatformFee

Process platform fee on input fund address

Parameters

Name
Type
Description

_fundAddr

address

Address of fund to collect fee

processManagerFee

Process manager fee on input fund address

Parameters

Name
Type
Description

_fundAddr

address

Address of fund to collect fee

massProcessManagerFee

Process manager fee on all funds

getLatestFundID

Gets the ID of the lastest fund created

getFundfromIndex

Get Portfolio Fund address from fund ID

Parameters

Name
Type
Description

_index

uint256

id of the fund

Return Values

Name
Type
Description

address

address

Address of input fund ID

Last updated

Was this helpful?