A vast drugs distribution operation involving deals on the dark web was run from a Northern Ireland man's bedroom to fund his gambling habit, the High Court heard.
Richard Sinclair allegedly used an "ingenious" system to dupe couriers into delivering MDMA and other substances in deals worth more than £200,000l.
Some drugs linked to a European-wide investigation were to be sent through the post hidden inside jigsaw puzzles, prosecutors revealed.
Sinclair (32) was arrested after police seized ecstasy pills, herbal cannabis and diazepam tablets worth an estimated £100,000 during separate raids at his Cranagh Road, Coleraine address and the home of a co-accused in east Belfast.
Kyle Hall (25), of Chamberlain Street in the city, was also detained in the searches carried out on August 26. Both men are jointly charged with conspiracy to supply and possessing Class A drugs with intent to supply.
Sinclair is further accused of transferring criminal property, while Hall faces additional charges of having Class B and C drugs with intent to supply and possessing criminal property.
The pair, described in court as wholesale drug suppliers, were refused bail amid fears of potential re-offending.
Opposing their release, a prosecution lawyer said police discovered Sinclair in his bedroom destroying evidence on an encrypted memory stick.
Hundreds of drugs transactions were displayed on a nearby computer when officers entered.
Examination of the computer showed Sinclair intended to sell up to 1,000 MDMA tablets a week to a select list of a dozen customers, the court heard.
Police also seized five sealed packages from his home. Two addressed to Hall contained DVD boxes with £1,500 in each, according to the prosecution. The other three parcels had 60g of suspected MDMA powder. Another £6,000 in cash and LSD tablets were also recovered.
A parcel addressed to Sinclair which was left at a courier depot in Belfast contained two jigsaw puzzles with a total of 3,000 MDMA and other pills with a street value of £40,000.
CCTV footage allegedly showed Hall leaving the parcel.
Police searched his home and seized 1,000 ecstasy tablets, 120 boxes each containing 28 diazepam pills, 2kg of herbal cannabis, 500g of crystal MDMA and £7,500 in cash, the court heard.
Setting out admissions made by Sinclair during police interviews, the barrister said: "He outlined a process by which he buys and sells drugs via the dark net and dispatches them to his customers in the post."
Some supplies were purchased using bitcoin currency while others involved money transfers.
She claimed the vast majority of Sinclair's customers are in England, with around a dozen based in Northern Ireland.
The court also heard that more than £200,000 has gone to his bookmaker's betting account.
Despite Sinclair's admissions, defence counsel Michael Boyd argued that he did not fit the profile of a high-flying drug supplier.
"He commenced this operation in an almost experimental way to provide himself with some extra money for his gambling habit," Mr Boyd said.
"It simply mushroomed and got out of control,," he added.