The difference is very simple :) The parameter is made of data that are sent to the contract with a transaction while the storage holds the state of the contract (i.e all the data that the contract saves to be reused later).
It is true that both the storage and the parameter can be seen as inputs because they are fed to the contract at the beginning of its ...
Operations of the following types can affect account balance:
However, there are three additional things which affect account balance as well:
When you bake a block.
When you miss seed_nonce_revelation.
You have access to a "time" with sp.now so you can compute conditions, etc.
There is nothing like "send in 30 minutes". You need external input to trigger operations Tezos.
You can compute with timestamps and forbid some actions for a period.
Deducting the balance to the sender means sending the amount to the contract.
Recipient will not ...
If you have two amounts (mutez): t1 and t2; t1 - t2 underflows when t2 is bigger than t1.
There is a similar overflow on mutez (they are 64 bits values).
Shifts are also problematic (LSL and LSR in Michelson).
When such an event happens, an exception is raised and that cancels the whole transaction.
Testing is not easy. For these cases, I personally think ...
There are several steps:
Produce a Michelson value for the record. It depends on the layout of the record and is shown in all SmartPy test transactions. (this is done by hand or with your language of choice). It will be something like (Pair "aaa" ...)
Pack the value by calling the client with tezos-client hash data _data_ of type _type_ . _data_ ...
You are guaranteed (if the crypto behind Tezos is not broken) that the person who signed the transaction knew the corresponding private key (in case of an implicit account) so, for all reasonable purposes, you should be good.