ERC20 Investment Fund Smart Contract
da Emerson Estrella
1. SetTokenAllocation
2. GetTokenPair
3. GetTokenAllocation
4. GetTokens
5. Deposit
5.1. id
5.2. amount
5.3. block
5.4. tx
6. Withdraw
6.1. id
6.2. amount
6.3. block
6.4. tx
7. PairList
8. LockInPeriod
9. Reallocation
9.1. id
9.2. ?
9.3. ?
10. Deposit
10.1. Valid amount
10.1.1. create a new deposit
10.1.2. for each "active" token...
10.1.2.1. divide deposit amount by token allocation
10.1.2.2. create a BUY order for this token
10.1.3. calculate token price and reward
10.1.4. transfer tokens
10.2. Invalid amount
10.2.1. Error
11. Withdraw
11.1. Not in Lock-in period
11.1.1. Has enough balance
11.1.1.1. Yes
11.1.1.1.1. Transfer ETH
11.1.1.2. Error
11.2. Locked-in
11.2.1. Error