A father of four from Hull took shifts manning a telephone drugs line after losing his business.
Lee Tomkins, of Coltman Street, ran a painting and decorating business before his life took a wrong turn.
Hull Crown Court heard how the 39-year-old became involved in dealing crack cocaine and heroin on the streets of Hull in exchange for a place to stay.
Camille Morland, prosecuting, said that police received information about a drugs line and went to a house in Coltman Street. Tomkins was found in the kitchen with two fake Rolex watches, £495 in cash and a machete.
Cocaine was found in a plastic tub on a bed in the living room.
A phone was seized which showed messages advertising drugs. They included the name of Tomkins.
He claimed that he had lost his own flat about three weeks earlier and was offered accommodation by a friend on condition that he sold drugs.
He admitted taking shifts on the drugs phone line and being concerned in supplying heroin and crack cocaine, as well as possessing the cash, watches and cannabis.
Rachel Scott, mitigating, said that Tomkins came to drug use late in life after suffering depression because of two bereavements. He had previously worked as a self-employed painter and decorator but he had to "fold the business" because of his problems and he became homeless after losing his flat.
Tomkins had four children. He had become clean of drugs since being remanded in custody. "He has got no inclination to take Class A drugs when he is released from custody," said Miss Scott.
"Over the past few years, his offending has slowed down considerably. Really, he has been doing very well in reducing his offending over the years and so this offence is really very disappointing."
Tomkins had a conviction for affray in 2014, but he kept out of trouble for six years after that. He had a conviction for assaulting a police officer as an emergency worker in 2020, when he hit a police officer and kicked a police van. He had no previous convictions for drugs offences.
Judge Richard Woolfall told Tomkins: "This is by far and away the most serious offence that you have committed. You were playing an important part in the sale of heroin and cocaine to other users.
"In exchange for that, to fund your own addiction, you were getting a supply and you were getting somewhere to live. You know first hand the misery that Class A drugs brings.
"It spreads its web very wide. It has an impact on people's health and it damages their relationships. You know that from the sharp end. You were selling directly to users. You were involved for a period of three weeks."
Tomkins was jailed for two years and seven months. The £495 cash seized will be forfeited and given to the Tribune Trust to help community projects. The watches will also be forfeited.
Want a quick and expert briefing on the biggest news stories? Listen to our latest podcasts to find out What You Need To Know.