I too did all the sums and as the others have said it depends on what you expect.
I did a swap and the engine blew. But think that was bad luck.
The only thing I would say is that you don't know how the replacement has been treated and the twinnie has a bit of a weakness if the proper servicing/oil checks and replacement have not been kept up .
The problem is if the valves are damaged in your engine you need to do a bottom end build as well as the bearings tend to go not long after as the impact from the top end has a dire effect on them.
I personally would check the bottom end to see what is what before you make a decision.
You may well be lucky with a second hand unit try talking to rgwm on here about a replacement.
The other thing is if you've got the engine out it is a good idea to change the clutch and the concentric slave cylinder in the bell housing too that will cost another £170+
If the engine does go and even if it is under warranty you will still need to remove it and send it back at your expense and then wait for a replacement and refit it plus all the fluids etc..
If you afford to rebuild it may be the better option and if you shop around head set and bolts £70 bottom end bearings shells and mains £150 water pump £30 belts cam and balancer plus tensioners £130 oil filter, oil, antifreeze, air filter and plugs £130 . Plus any work on the head and valves but you should have a ten year plus engine that you know is tip top.
If your lucky you can probably find a good s/hand head and remove and reseat the valves yourself and keep the cost down.