I have only sold my 3G but I got $285 on Ebay with some accessories. Best recommendations to get the most for your iPhone IMO would be:
*Protect it from scratches by getting a case and screen protectors so when the time comes to sell it its in mint condition with no scratches.
*Keep everything your iPhone came with such as the box, earbuds and documents, not sure why but people really like it when the original box and documents come with the iPhone.
*Jailbreak and unlock(if you are with at&t) some people don't know how to jailbreak, don't want to go through the hassle of jailbreaking or are with another company such as T-mobile and would like an iPhone that works with their company. Just make sure your phone is restored before you sell it.
*If you have some accessories that you don't plan to use with your next iPhone, include them, an iPhone with extra goodies sells for a bit more than just the phone (if its in mint condition)
Those are the only ones I can think right off the bat. Also I would hold off on selling it until an official announcement has been made for the next iPhone.