I think you can read the code? Link is here: https://github.com/steemit/steem/blob/v0.14.2/libraries/chain/database.cpp#L3472-L3481
basically,
sbd_seconds = your_sbd_balance * how_much_seconds_you_have_held_it
, andinterest_you_earn = interest_rate_per_second * sbd_seconds
last_update
is there for better performance, to avoid computing the sbd_seconds
increment on every new block.
I agree that the need of moving SBD to get interest is not so good. I have an idea to automate the interest collecting work: https://steemit.com/cn/@abit/steem-dollar-compound-interest-collecting-bot