# Gas cost for keep the contract

In Ethereum yellowpaper the gas cost to create a contract is equal 32000. But what is the cost to validate and keep the contract operating until it is executed?

Edit:

Imagine the following situation: I want to transfer an amount of ether from wallet X to wallet Y. I will use a smart contract to do the validation of the transfer. By my understanding the cost would be:

32 000 gas to create a new contract; After the contract was validated, 21000 gas would be added to the cost of the contract because the transaction would be validated.

My questions are: is this analogy correct?

Anything I do in the Ethereum blockchain can be considered a transaction? (If I just want to store a value in the blockchain (i.e. 256 bit value has a cost of 20 000 gas) I would have to pay the gas for store the value and also the gas cost of a transaction?

• "I would have to pay the gas for store the value and also the gas cost of a transaction?" The cost of the transaction would include the cost of storing the bytes. (There's no cost for anything other than a transaction, but a transaction's cost can vary depending on what it does.) – user19510 Nov 1 '18 at 21:33
• Understood, so basically the total cost should be 20000(storage)+21000(transaction) = 41 000 gas. Correct? – Mutante Nov 1 '18 at 21:41
• Yes. (A bit more due to other instructions being executed, the cost of the data being sent, etc.) – user19510 Nov 1 '18 at 21:42