"Thus" is a funny little word. It's an adverb. It likes to modify verbs, and it really likes to modify entire clauses.
When it modifies a verb, it can appear either before or after that verb, possibly with a subtle shift in semantics. "I thus lost your friendship" means something like "I lost your friendship for that reason". "I lost your friendship thus" means something like "I lost your friendship in that manner".
When it modifies a clause, it usually appears before the clause and it is usually set off by a parenthetical comma: "Thus, I lost your friendship." This comma can be regarded as optional, and "Thus I lost your friendship" is fine, at least in informal text.
If a clause-modifying "thus" appears inside the sentence, parenthetical commas are no longer optional and they come in pairs: "I lost, thus, your friendship."
Coordinate clauses aren't quite as funny. They're often simple and straightforward. Two independent clauses are joined by a coordinating conjunction, and that coordinating conjunction can be preceded by a comma. In many cases, the coordinating comma is considered optional. Either "I lied to you, and I lost your friendship" or "I lied to you and I lost your friendship" are acceptable.
Although both types of comma are independently optional, they are not equally optional. The coordinating comma does a bigger job.
Let's look at a number of possibilities:
- no comma
I lied to you before and thus I lost your friendship.
This version isn't wrong, but it isn't necessarily clear, either. This is a fairly complicated sentence to be left without any punctuation to guide the reader.
- only the adverb's commas
I lied to you before and, thus, I lost your friendship.
The "thus" appears within the sentence, so it accepts commas on both sides. This version isn't necessarily wrong, but it feels awkward. The stronger coordinating comma is omitted, even though the joined clauses (with the addition of "thus") no longer feel short and balanced enough for the omission.
- only the coordinating comma
I lied to you before, and thus I lost your friendship.
This works for me. We've omitted the commas that don't do as much work and kept the comma that does more. The independent clauses are clearly marked as independent. That "thus" modifies its entire clause is made clear enough by that word's position.
- all commas
I lied to you before, and, thus, I lost your friendship.
This works the best for me. Every comma has a well-defined job to do, and those jobs are accomplished effectively.
I've listed these possibilities in the reverse of my order of preference. I suggest using all of the optional commas. If you're going to eliminate commas, I suggest removing the weakest ones first. If you are eliminating paired commas, make sure that you eliminate pairs. Don't leave half of a comma pair stranded.
The differences between the four examples above are differences of style. As for all questions of style, different people will have different preferences. It isn't outright wrong to have a different preference.
There certainly are a number of possibilities that are outright wrong:
✗ I lied to you before and thus, I lost your friendship.
✗ I lied to you before, and thus, I lost your friendship.
✗ I lied to you before and, thus I lost your friendship.
The first two are the result of not keeping paired commas paired. The stranded parenthetical comma makes no sense. The last might be a comma stranded from its mate, or it might be a misplaced coordinating comma. In either case, whatever job it was meant to do, it's not doing it.
If there is a tricky part to understanding these commas, it's probably this: leading and trailing parenthetical commas can be "swallowed up" by other punctuation. I could, for example, say something like:
For example, I could say . . . .
In theory, the "for example" of this example (or "thus" in the original sentence) has a comma on both sides -- just like it does in the sentence that introduces the example. End-of-sentence / start-of-sentence punctuation "swallows up" the leading comma. We don't put two commas in a row. We don't place a comma next to a full stop. We don't put a comma next to a parenthesis.
You're just expected to know that "Thus, I lost it" is really "{sentence starts} {swallowed comma} thus {visible comma} I lost it {sentence ends}".
Once you understand that, the rest should be comparatively easy.