the .customphysics method completely replaces the logic normally performed according to the entity's movetype field.
be warned that this includes calling the think function.
movetypes being ignored means that the only friction, acceleration, and movement performed is that which you do yourself. So yes, you'll need to update both the velocity and origin.
tracebox will of course trace a box from a start position by some distance and tell you both where you hit and the angle(plane normal) of the surface that you hit. This provides you with a way to move your entity forwards, and to bounce or slide or whatever instead of re-impacting the surface the next frame too.
note that my code calls tracebox a few times between clipping the velocity. this ensures that the entity slides along cracks where multiple planes might be blocking the entity (especially if gravity is pushing you against them too).
using customphysics is NOT the same as custom prediction. custom prediction is quite specific in its needs, specifically, custom prediction needs to apply each input frame which is still pending to the player's entity, with the expectation that the next packet received from the server will snap it back again to where it used to be requiring you to reapply everything.
the only reason my csqc used an empty customphysics function was to ensure that the player's movetype_walk/etc value was ignored, so that the only thing affecting the player was the prediction code (unlike ssqc with its SV_RunClientCommand function, player entities are not special in csqc).
the prediction code needs to be shared between client and server, so that both are guarenteed to obtain the same results. The server's copy is run from SV_RunClientCommand, while the client's copy is re-run for each pending input frame. This means that the code CANNOT use time or even frametime, but MUST use input_* as the only inputs beyond those fields which you're networking (like velocity and origin). Even the use of tracebox can result in prediction misses (as it depends on the position+size+etc of other entities), but you should normally be able to get away with it when other entities are not moving around too much (unless you were somehow predicting those too, which gets really really messy), the problem comes when prediction misses are present in every single packet, those are the ones that will result in significant problems (read: juddering, whereas snapping is easier to hide).