In EOS, when create a table record, someone will pay the ram, and when modify the record, maybe someone else will pay the ram, and when delete the record, who will get the ram back? the creator or the modifier? or somebody else?
When a record is created, the user specified in the
emplace call will be charged for the RAM usage. A subsequent
modify call on that record will specify a user (possibly different) that will be charged. That user will incur the storage cost of the entire row, and the original user (if different) will have their RAM returned to them for use elsewhere. When the record is finally removed with an
erase call, whoever is currently on the hook for the RAM for that row will have their RAM returned to them.
To summarize, only one user is ever charge for the ram to store a row in a table. That user can change over time as the row is modified. When the user changes, the original user's RAM is returned to them, and the new user is charged for the storage. And when the row is deleted, the user who was paying for the row at the time will have their RAM returned to them.