In this track: How people use Ethereum
intermediate · 3 MIN READ

Lending and collateral

Borrowing systems define rules for debt, security and repayment.

LET’S PICTURE IT

A lender can accept a pledged item under conditions that determine how much may be borrowed and when the pledge can be sold.

SEE IT FOR YOURSELF
A valid counter call, step by stepStep 1 / 4
A valid counter call, step by stepFunction requestincrement()No argumentsBefore executionstored count0A local teaching example with a defined starting stateIncoming callCheck function dispatchCheck coded conditionsRules passConditions passContinue executionA failed check can revert insteadCalculation0 + 1Result: 1Storage writecount = 1Persists if call succeedsCalculating a local value and storing it are separate stepsPersistent statecount1Later readGetter reports 1No new incrementState, logs and browser display have different roles

This example begins with count zero and a request to call increment(). No real contract is deployed.

Animated local teaching model. No wallet, RPC or live blockchain data. Some labels and hashes are abbreviated for readability.

Collateral supports a claim

An onchain lending system may require assets to back a debt position. The permitted borrowing amount depends on contract rules, prices and collateral-specific parameters.

Valuation uses inputs

A system can rely on oracles to compare collateral and debt values. The source, freshness and manipulation resistance of those inputs are part of its risk model.

Debt can change over time

Interest mechanisms and fees can increase the amount owed under the implementation. A position that was valid initially may later approach a liquidation condition.

Rights and failure conditions differ

Withdrawal, repayment and liquidation paths depend on the contracts and current state. Learning the mechanics does not establish that a particular lending product is safe or suitable.

QUICK CHECK · NO PRESSURE

Can a position become unsafe if collateral prices fall while debt remains?

Your progress stays in this browser.
Keep exploring the original referenceethereum.org ↗

Original explanations by EtherTools. Examples are educational and source-linked; this site is independent of the Ethereum Foundation. Our approach.