I am new to Smart Contracts. When I saw some example of Smart Contracts, I realize that they are just some piece of code, not exactly contracts.
function sendCoin(address receiver, uint amount) is a method defined in smart contract which takes receiver address and amount to send Coins to receiver.
But the contract is not about how to send coins, but how much to send. For Example, if the material is delivered on time, make full payment else charge penalty of 10% for every week's delay.
As per my understanding, the invocation - where these if-then rules are written (Representing contract) - is outside smart contract.
Is my understanding correct? Is the term 'Smart Contract' misleading?
Are real contracts are still coded outside the block-chain in application triggering these functions? If yes, then why smart contracts can't be manipulated, the applications can still compromise the contract - For Example. by not paying as per contract terms.