For my money doing this would remove one of the last hurdles for me to consider digital copies of games- I maintain the right and ability to resell is an important one. My main reservation would be would it have to them acting as arbiter all the time (either completely or percentage style) or could I sell it/swap it third party style as I can a standard physical token.
As for how to implement, knowing who owns what as far as titles go is pretty much everything about these sorts of services* with the remainder being making a nice frontend; I imagine revocation of ownership is possible already and I do not imagine it would be too hard to add in a mechanism to use that but also credit an account in the process.
*I hate to guess at their database structure, primarily as I am not so hot at big boy databases, but there is probably a list of every game they own, whether it can be sold (games have been removed from services many times but existing customers will probably still get maintained) and for each account/customer there is some method of looking it up.
"meaning GameStop can sell a game for $20, buy it back for $7-$10, and then sell that same license for $20 again, netting a profit of $30+ for a single $20 game."
I call wonky maths
Sale price
$20 - percentage of that does go to publisher/developer but for the sake of debate I will say 50% of total price is markup at $10
Gamestop now has $10 to do with what they like.
You sell the back to them at $10
Gamestop only has any interest on the original $10 or effectively $0 assuming it does not work on a credit system in which case they still have $10 in their account* until you buy something**.
Although the law and case law regarding second hand sales of software is unclear at best (remember Europe recently had a ruling to try and clarify some things as some others have referenced) but I would be surprised if they are allowed to resell as new (resale laws are reasonably clear that this is not the done thing) to say nothing of the usual mechanism of game prices dropping like a stone after a very short period. Still assuming they could then that would be $20 in their account as nothing, quite rightly in my opinion, would have to be kicked back to the publisher.
The repeats of this second hand process would be where money could be made but I would imagine margins get thinner, prices drop, GOTY versions get released and as long term second hand thrives on the idea of scarcity and making a copy/issuing a new license merely costs bandwidth.
*quite a few companies use similar banking tricks to effectively allow them to hold money for some time in their accounts to generate interest or use as a sort of collateral but we can get into banking/accounting methods another day; the usual one is you sell something to a company and they will probably pay you on the 90th day but you buy something from them and the money had better be there on day 30 or they will send the boys round. 90 days is often enough to sink a small company as well but that is just an added perk on top of the 60 days interest on a large sum is usually not inconsiderable/maybe even makes a significant chunk of profits.
**I assume as the trade it early for the highest possible price and maybe rebuy it later is a model that already exists it would easily transfer to this.