FundRequest / contracts

Contracts for FundRequest (platform, token, crowdsale)

Home Page:https://fundrequest.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

As a fundrequest seed or presale participant I already receive my FND tokens

gerbert-vandenberghe opened this issue · comments

Context

Seed and presale participants will receive their tokens prior to the token sale so it is possible to already generate and use the tokens for ecosystem incentivization.

The ETH of the seed participants is already received, the ETH or FIAT of the presale participants will also be received before the public token sale.

Flow of events

  1. A FR member calls the method assignTokens on the token sale contract with the parameters: beneficiary address, amount of FND tokens, percentage (0% - 25% or 50%) to be vested.
  2. The token sale contract mints the tokens.
  3. The token sale contract calculates the amount of FND tokens that can be assigned to the beneficiary address and the amount of tokens that have to be vested.
  4. The token sale contract assigns the calculated amount of FND tokens to the beneficiary address.
  5. The token sale contract assigns the calculated amount of FND tokens to the vesting wallet with a vesting period and cliff of 6 months.

Additional info

Calculations

Calculation of FND tokens to be vested:

FND tokens to be vested = amount of FND tokens * percentage to be vested.

Calculation of FND tokens to be assigned to beneficiary address

FND to assign to beneficiary address = amount of FND tokens - FND tokens to be vested

Vesting

The tokens that have to be vested are assigned to the vesting wallet and can be withdrawn after a period of 6 months by the beneficiary address.

Testcases

  • Testcase: A a FR member I call the assignTokens function with a beneficiary address, 100 FND and 25% vesting.
    • Result: 75 FND are assigned to the beneficiary address, 25 FND to the vesting wallet with a vesting period and cliff of 6 months.
  • Testcase: A a FR member I call the assignTokens function with a beneficiary address, 100 FND and 50% vesting.
    • Result: 50 FND are assigned to the beneficiary address, 50 FND to the vesting wallet with a vesting period and cliff of 6 months.
  • Testcase: A a FR member I call the assignTokens function with a beneficiary address, 100 FND and 0% vesting.
    • Result: 100 FND are assigned to the beneficiary address, 0 FND to the vesting wallet.
  • Testcase: A a FR member I call the assignTokens function with a beneficiary address, 100 FND and 10% vesting.
    • The transaction fails.
  • Testcase: A a FR member I call the assignTokens function with not all parameters
    • The transaction fails.
  • Testcase: Another person as a FR member calls the assignTokens function with a beneficiary address, 100 FND and 0% vesting.
    • The transaction fails.