Brian wroteCOLONRetention is interesting, but unless the league is willing to hire an accountant, it seems like that is a shit-ton of work to administer for interesting.
Not as difficult as you may think.
I'd have to build something into the weekly sheets for the "retained salary" to live and to be counted towards the cap. And I'd create a retained salary asset that a team would own for the balance of the player's contract. I can easily change a player's salary week-to-week so making modifications in-season is very simple.
I have weekly grids for rosters, position, signed/unsigned status, salary and waiver status. All those are statuses that can change at any point during the season. That's how your sheets populate on a given week with that week's information.