When you take part in an ICO you are sending some coins (usually ETH) to the ICO owner's address and later receive some predetermined amount of tokens in return. Since there is no way for Koinly to know that the two transactions (send and receive) are connected, you will have to tell Koinly how much you paid for the received tokens - otherwise Koinly will assume you paid the market price.
Make sure you have added both the 'send' transaction (to take part in the ICO) and the 'receive' transaction (for received tokens). For ex. in the image below we pay 1 ETH to take part in the ICO of LifeCoin and receive 500 LIFE tokens on 1st Aug. We later sell the LIFE tokens for a price of $100.
The problem here is that Koinly assumes you bought the LIFE tokens at the market price on 1st Aug which was $0.04 and therefore you end up making a profit when you sell the LIFE tokens - even though you actually made a loss here since you paid $200 worth of ETH to take part in the ICO.
To fix this, first copy the market value of the ETH transaction ($200).
Then, edit the LIFE transaction and click on the 'change' button:
Enter the value that you copied in the previous step and press Save.
That's it, now your LIFE tokens will have the correct cost associated with them. Here's the result:
Should I use the market price at the time I participated in the ICO or at the time I received the tokens?
Since you might end up receiving tokens a long time after you participated, the market price you use can have a big effect on your taxes when you sell them. Due to lack of clear guidelines, it is difficult to say with certainty which is the correct price to use. However, most people tend to use the market value at the time of participation.