Yes, I would say that the "on what basis" version is also ok. However it sounds a lot more formal/academic, and looks a bit out of place in the conversation you've given us. Even though the text you've given us is very short, it still seems like a very casual/intimate conversation.
New words, one handy idiom, and a 2-minute quiz — delivered to your inbox to keep your streak alive.