the genie immediately kills you before granting you your unlimited wishes, this fulfilling the contract without being made a fool of. Don't mess with beings that can alter reality at will.
The genie is under no obligation to grant your wishes immediately, and if it kills you before granting you your wish for unlimited wishes, you have no wishes left to protect yourself with.