Cost basis for RSUs

Hello,

I think this has been asked before but a conclusive answer still eludes me. Here's my scenario:

 

  1. Say 100 RSU from my employer vested at $50 each
  2. Right on that day and the same price, 30 socks were sold (30 * $50 = $1500) by my employer to pay for taxes. So, I'm left with only 70 vested RSU now.
  3. My employer reported $5000 in the W2 as earned income for #1
  4. 2 years later I sold the remaining stocks at $70 (70 * $70 = $4900)
  5. Now, what is my cost-basis for reporting #4 while filing taxes:
    1. Is it $5000 since that was reported in W2
    2. Is it $3500 since the per stock price was $50 and I had 70 RSU remaining

thanks in advance!