it's very easy...you can upgrade 3G to 4 OS.. just buy iPhone 4 and replace your 3G iphone...

and walahhh! instantly you have now upgraded your iPhone 3G to 4 OS..

very easy solution isn't it?