Just because EBay is selling it doesn't mean it's unlocked.
As far as i know, there is not a way to unlock. I remember when it first came out, they unlocked the 3G using the piggyback to the SIM card, fooling the phone to thinking it was running in the correct carrier.
I don't know what f/w you are running, but there is currently no software hacks to unlock the iPhone 3G...
I would suggest google to continue your endeavor, i actually just searched myself and did not come up with much.
My friend ordered two different simcards that were supposed to unlock the iPhone 3G, neither worked... And people say they are dangerous. There were cases when the phone was unlocked actually for some time, but then it relocked again and didn't want to be unlocked with the same smartsim, or turbosim or whatever it was.
That was a deal breaker for me, when was going to buy one here in Dubai. And they are also the way to expensive yet.
There isn't a software unlock, only a hardware one.
The hardware unlock is very unstable and honestly not worth it. If you are going to use it on t-mobile, you might as well get the 2g. Unless you really want the gps or black/white, then it's safer to do the 2g as it has an unlock and can be done within 10 minutes.
iPhones sold in Singapore are all unlocked. There are 3 mobile carriers but only 1(Singtel) has the rights to iphones. IDA, which sort of regulates telephone services in Singapore, requires that all phones (blackberries even) to be unlocked.
So i have reason to believe that the iphones were unlocked by Apple.