In this track: Smart contract security foundations
advanced · 4 MIN READ
Frontend security versus contract security
A correct contract and a trustworthy interface are separate requirements.
LET’S PICTURE IT
A secure vault can still be reached through a misleading sign at the entrance.
SEE IT FOR YOURSELF
From a public address to a verified signatureStep 1 / 4
An address is public receiving information. It is not the private key that authorizes actions.
An address is public receiving information. It is not the private key that authorizes actions.The local signing system uses secret authorization material. It produces a signature; the private key is not sent along with it.A verifier checks the signed request under the account’s rules. A valid signature does not by itself prove that the action is safe.Balances belong to network state. A wallet is an interface and signing system, not a box containing coins.
Animated local teaching model. No wallet, RPC or live blockchain data. Some labels and hashes are abbreviated for readability.
Inspect what the interface prepares
A compromised frontend can supply an unintended target, spender, amount or signing domain. Contract correctness does not automatically make every prepared request safe.
Keep on-chain checks authoritative
Access control and invariants must hold for direct calls that bypass the interface. Hiding a dangerous option in the UI is not a contract restriction.
Validate user-visible context
Show network, account, action and permission scope clearly. Avoid claiming that a familiar token symbol or logo authenticates a contract address.
Review delivery and dependencies
Site deployment, scripts, DNS and account access affect interface trust. Threat-model the complete path from the user’s browser to the intended contract action.
Reason about the scenario
browser request → prepared target and calldata
wallet authorization → signed action
contract execution → enforced rules
Review every boundary.
Pseudocode or a simplified scenario for local reasoning. This is not a production contract or a completed security review.
QUICK CHECK · NO PRESSURE
Can users bypass frontend restrictions and call an exposed function directly?
The contract interface can be called independently.