ERC20 Investment Fund Smart Contract

Get Started. It's Free
or sign up with your email address
ERC20 Investment Fund Smart Contract by Mind Map: ERC20 Investment Fund Smart Contract

1. Deposit

1.1. Valid amount

1.1.1. create a new deposit

1.1.2. for each "active" token...

1.1.2.1. divide deposit amount by token allocation

1.1.2.2. create a BUY order for this token

1.1.3. calculate token price and reward

1.1.4. transfer tokens

1.2. Invalid amount

1.2.1. Error

2. Withdraw

2.1. Not in Lock-in period

2.1.1. Has enough balance

2.1.1.1. Yes

2.1.1.1.1. Transfer ETH

2.1.1.2. Error

2.2. Locked-in

2.2.1. Error

3. GetBalance

4. SetTokenAllocation

5. GetDeposits

6. GetDepositAmount

7. GetDepositBlock

8. GetDepositTx

9. GetWithdraws

10. GetWithdrawAmount

11. GetWithdrawBlock

12. GetWithdrawTx

13. GetTokenPair

14. GetTokenAllocation

15. GetTokens

16. Deposit

16.1. id

16.2. amount

16.3. block

16.4. tx

17. Withdraw

17.1. id

17.2. amount

17.3. block

17.4. tx

18. Balance

19. PairList

20. LockInPeriod

21. Reallocation

21.1. id

21.2. ?

21.3. ?