What exactly made you change your mind so quickly?
"They hired me for a senior position for their upcoming project. "
Higher the level of post, more is the maturity level required and snap decisions to be avoided.
You have put yourself into a difficult situation by a vacillating mind.
The company is on strong ground to question you and seek to take action.They may not waste their time fighting a legal battle, but your actions of joining and then stopping work from 2nd day and joining somewhere else is an avoidable act.
Please consult a local lawyer who is well versed in labour law and seek his advice.
One must understand that HR has to work hard to recruit and time is money.
Besides the project can be delayed due to sudden exit.
Company will have to answer their clients also.One cannot think only in terms of personal convenience.
You seeking advice for your own wrong doings.
The problem is not with the companies but your uncompromising job hopping attitude which is creating hell for you.
Please take some time and introspect and correct yourself before coming to this forum for advice.
On strength of you posting & information provided, there is no option other than serving 30 day notice. You are well aware of the cost of compensation towards your abandonment of job is 1000 dollar.
The terms and conditions of the appoinment letter, its interpretation in line of your resiganation can only led a way.
You consult a good lawyer to determine future action.