What's the purpose of the undoAsset function for a custom transaction?

The undoAsset() function tells the blockchain how to revert changes in the case of a fork. It does the exact opposite of the applyAsset() function. So, we have to pass the business rules to undo the changes done by the applyAsset() function. Otherwise, the chain will end up in a corrupted state as it cannot return to its original state.