Nadal is at 10465 points in the race
Federer was at 8505 ponts in the race when Basel started. He's at 8595 points currently.
(
http://live-tennis.eu/en/atp-race)
If Federer wins Basel, he'll be at 9005 points, 1460 points behind Nadal.
2500 points are at play in Paris and the YEC..
Quite a few scenarios play out from here, let me just list a couple of them , which could have federer taking over #1.
1. Federer and Nadal both reach Paris finals. Federer beats Nadal.
Then Federer wins YEC undefeated with :
a) Nadal going out in RR (unlikely)
b) Nadal winning 2 of his 3 matches in RR, but does not qualify for the semi (unlikely, but still a bit more likely than a) above)
c) Nadal winning 2 of his 3 matches in RR, qualifying for the semi, but loses to federer in the semi. (this is a a very possible scenario, just from the PoV of the YEC)
2. Nadal loses earlier at Paris. Federer still has to reach the final or win Paris and then it goes down at the YEC.
Basically, if Nadal doesn't do well at both Paris and YEC, Federer can afford one loss b/w Basel, Paris and YEC RR.
If Nadal does decently enough, Federer has to win Paris and YEC.
Pretty tough for Federer, but not impossible.
A similar situation to Muray-Djoko last year.