We've lowered the amount of desyncs that happen tremendously since opening the server, it happens far less often than it used to.
I believe, fully, that lag (ping time and hops to the server) plays a key factor in this.
We do detect when desyncs occur, and usually display a message either to the right or the top of the screen (scrolling banner while at the bank). There's still a couple that we hard disconnect for, usually when when the item id of an item you're feeding your mag doesn't match up with what the server thinks (so we don't mess up your mag) and also when you're trying to drop an item when the item ids don't match.
We can't fix a desync when detected, though, because we no longer know what the item is that is attached to that item id.
To go into more detail, whenever a game is created or someone joins a game, every item in the character's inventory and bank is assigned a unique item id (this is NOT the hex value of a item, like 031000 for a Photon Drop, it's just some incremental value that goes up as more items are generated in the game). The clients all know what this information is because the leader transmits it to them in the game state packets (which we don't know how to decrypt, but these packets contain the full state of the game like, inventory, enemies that have been defeated, stuff about items on the ground and so on).
Unique item ids are also generated for box drops, enemy drops, etc.
The server usually knows what stuff should be as it increments values as the game progresses.
Another thing is, there are certain item actions in PSOBB that always act the same speed, though, even when lagging. For example, mag feeding, shopping, using items and depositing items into the bank, which modify item ids on the client's side. But the client tries to send these packets out as soon as they happen.
Basically it comes down to a matter of item ids on the client and server not incrementing in almost lock step with each other when there's lag. This issue can be compounded if someone is lagging pretty badly while other people are just fine, incrementing item ids, using items and so on.
We cannot fix a desync, though, because we may no longer know what the item is at the item id. We may think it's one thing or maybe we don't think that item id exists yet. We can't assume, because the client doesn't really tell you everything.
But, man, if the client did, it'd be easier to catch people who modify their equipment in memory or other things in order to make the game easier. If only we had a packet we could send to the client to force it to tell us their entire character structure in memory or all of their inventory or something, but there isn't such a thing... afaik. Closest thing is when a client quits the game, it sends it's entire character to the server, and also when someone joins a game, the leader will send out HIS/HER inventory in an easy to read packet, for some reason it transmits the other party members inventory and things in some other type of game state packet I have no idea how to read.