Brian Sasa, aged 20, is one of four men accused of murdering Keelan Wilson near his home in Strathfield Walk, Wolverhampton, where he was stabbed more than 40 times.
Prosecutors say the attack, which happened as Keelan got into a taxi with an associate, came amid escalating tensions between the city's V2 and V3 postcode gangs, with all four defendants allegedly part of the latter group.
Forensic teams found the DNA of Sasa and fellow defendant Zenay Pennant-Phillips on the taxi following the attack on May 29, 2018, Wolverhampton Crown Court was told.
But Mr Gurdeep Garcha QC, who is defending Sasa in the case, argued Sasa's DNA could have come from an earlier date, as the defendant was a regular user of the taxi firm Go Carz.
He told jurors Sasa, of Long Ley, Heath Town, would regularly use the taxi service to travel to a Telford address, where he would act as a "sitter" in a drugs operation, which involved him protecting the stash and being armed.
Mr Garcha cited previous evidence in the trial which heard that Sasa's DNA could have been transferred to the taxi in numerous ways, either through "primary or secondary" transfers.
Coverage of the case:
Jurors were told that Sasa attended a party before Keelan was killed where his attackers were said to have met up.
Mr Garcha argued that Sasa could have shaken the hand of an associate, or fist-bumped them, before Keelan's assailants travelled to kill him, and transferred Sasa's DNA to the taxi.
"The reason his DNA is on the car is not because he was involved in the attack on Keelan," Mr Garcha told jurors.
"The DNA is there, we suggest, innocently.
"It is an irrefutable fact that the killers came from that address.
"We heard evidence in how these young people greeted themselves and each other. We have heard about shaking hands, clapping hands and the like.
"Somebody who had shaken hands or fist-bumped with Brian Sasa could have carried his DNA with them.
"The group [who attacked Keelan] surrounded the taxi. When that group grabbed open the doors, to pull their target [Keelan] out of the taxi, [they] could have left Brian Sasa's DNA on the door handle."
'Built on sand'
He added: "We know Brian Sasa was a regular user of Go Carz. He was using taxis to turn up [at the Telford address] for 18 months. He must have left his DNA and finger prints on lots of taxis."
The court heard Sasa has two previous convictions for possession of Class A drugs with intent to supply, offences which he pleaded guilty to. But Mr Garcha said this should not sway jurors' minds in convicting Sasa of Keelan's murder, as he has no previous violent convictions on his record.
He said: "Members of the jury, the case of the prosecution against Brian Sasa is built on sand. There are no solid foundations.
"We suggest you can't rely on it to find a conviction of murder."
Sasa is standing trial on murder alongside his cousin Nehemie Tampwo, 19, of Fern Grove, Bletchley; Tyrique King, 19, of Chelwood Gardens, Bilston; and Zenay Pennant-Phillips, whose address cannot be published. They all deny murder.
The trial continues.