Smart Contracts and Stablecoins: How Collateral Models Work

11.3 Smart Contracts and Programmable Money

In Plain Words

A smart contract is a computer program on a blockchain that carries out agreed rules automatically, with users paying a fee, called gas, to run it. It removes the middleman only partly. Oracles bring in outside data, such as prices, and administrator keys can often change the code. So trust doesn’t vanish; it moves to whoever controls the oracles and the keys.

Why it matters: Before you trust a smart contract, ask who can change it or feed it data.

In Brief

Summary: A smart contract is code on a blockchain that executes agreed rules automatically, paid for in gas. It removes the intermediary only partly: oracles supply outside data and administrator keys can often change the code, so trust moves to whoever controls them.

  • Fee = gas × (base fee + tip): a 21,000-gas transfer at 12 gwei costs 0.000252 ETH.
  • Since August 2021 the base fee is burned and rises up to 12.5% per block in congestion.
  • The DAO hack (over 3.6 million ETH) was reversed by a hard fork in July 2016.
  • Ronin’s 5-of-9 signature bridge lost about $620 million in 2022 because one company could reach five keys.

About 3 minutes to read. Figures and rules in this chapter last reviewed October 4, 2026.

Three cards: the fee is gas times base fee plus tip, so a 21,000 gas transfer at 12 gwei costs 0.000252 ETH; since August 2021 the base fee is burned and rises up to 12.5 percent per block in congestion; oracles and administrator keys mean the intermediary is only partly removed
Figure 11.3.1 · What a smart contract costs to run

A smart contract is self-executing code stored directly on a blockchain (most prominently, Ethereum, launched in 2015) that automatically carries out an agreed set of rules once specified conditions are met — no intermediary required to enforce or interpret the agreement. This single capability is the technical foundation underneath both stablecoins (11.4) and the DeFi ecosystem (11.6): once money itself can be represented on a blockchain, contracts governing that money can be written directly into code and executed automatically and verifiably, rather than relying on a bank or broker to carry out the agreed terms.

Under the Hood: What a Contract Costs, and Who Can Still Change It

Every operation a contract performs consumes gas, paid in ether: fee = gas units × (base fee + priority fee). A plain ether transfer uses 21,000 gas. With ethereum.org’s example prices of a 10-gwei base fee and a 2-gwei tip (1 gwei = one-billionth of an ether), the fee is 21,000 × (10 + 2) = 252,000 gwei = 0.000252 ETH, about $0.69 at $2,726 per ether (October 5, 2026). A contract call using 150,000 gas, an illustrative figure for a token swap, costs 150,000 ÷ 21,000 ≈ 7.1 times as much. Since the London upgrade of August 5, 2021 (EIP-1559), the base fee is burned and can rise 12.5% per block while blocks are full, so fees spike in congestion.

“No intermediary” has three limits. First, a contract sees only its own chain, so prices and real-world events reach it through an oracle, a data feed whose controller in effect controls the payout. Second, many contracts are upgradeable: holders of administrator keys can change the code, so trust moves from code to key holders. Third, code that runs as written can still be wrong: in 2016 a flawed contract called The DAO was drained of more than 3.6 million ETH, and on July 20, 2016, the Ethereum community rewrote the ledger with a hard fork to undo it. “Code is law” held only until enough users agreed to overrule it.

Prices from CoinGecko, October 5, 2026; gas mechanics checked October 2026. Sources: ethereum.org, Gas and fees; ethereum.org, Timeline of all Ethereum forks.
Decision Rule

Before relying on a smart contract, answer three questions. Who can upgrade, pause or move funds, how many independent parties must sign, and is there a time delay before changes take effect? Where do its prices come from, and could one trade or one operator move that feed? How much value has it secured, for how long, and has its code been audited? If a small group of keys can move funds without delay, treat the contract as a custodian run by those key holders and size your exposure as you would an unregulated custodian’s.

The Costliest Mistake

Counting keys instead of key holders. The Ronin bridge needed 5 of 9 validator signatures to release funds, but four keys sat with one company, Sky Mavis, and a fifth was accessible to it. On March 23, 2022, attackers used five compromised keys to take 173,600 ETH and 25.5 million USDC, about $620 million; the FBI attributed the theft to North Korea’s Lazarus Group on April 14, 2022. Ronin then raised the threshold from five to eight signatures. Ask how many independent organizations must collude, not how many signatures the contract checks.

Frequently Asked Questions

What is gas on Ethereum?

Gas is the unit that measures the computation a transaction uses; you pay for it in ether at a price per unit set by the base fee plus your tip. A simple transfer uses 21,000 gas, while complex contract calls use many times more, so their fees are proportionally higher.

What is a blockchain oracle?

An oracle is a service that feeds outside data, such as an asset price or a sports result, into a smart contract. Because the contract trusts the feed completely, the oracle is often the weakest link: a manipulated price can trigger wrongful liquidations or payouts.

Can a smart contract be changed after it is deployed?

Yes, if it was built to be upgradeable. Many are, through administrator keys or governance votes, which is useful for fixing bugs but means users trust whoever holds those powers. A contract with no upgrade path cannot be fixed, which is why bugs in it are permanent.

✓ Section Recap

Smart contracts execute code for a gas fee, but they rely on oracles for outside data and often on administrator keys that can change them. The DAO fork and the $620 million Ronin theft show that the practical question is who controls the keys and feeds, counted as independent organizations rather than signatures.

✎ Check Yourself

Six questions on this chapter. Decide on your answer first, then click “Reveal Answer.”

1. A contract call uses 50,000 gas with a 20-gwei base fee and a 2-gwei tip. What is the fee?

  1. 0.0011 ETH
  2. 0.00011 ETH
  3. 0.011 ETH
  4. 0.0010 ETH
Reveal Answer

Answer: A. Fee = 50,000 × (20 + 2) = 1,100,000 gwei = 0.0011 ETH; 0.0010 ETH omits the tip.

2. The Ronin bridge needed 5 of 9 validator signatures. Why was that weaker than it looked?

  1. The contract checked only one signature
  2. Its price oracle fed false data to the bridge contract
  3. One company controlled or could reach five keys
  4. Validators had only 12 seconds to sign
Reveal Answer

Answer: C. Sky Mavis held four keys and still had allowlist access to the Axie DAO’s key, so compromising one company yielded the five signatures needed.

3. What does an oracle do for a smart contract?

  1. Pays its gas fees from a reserve
  2. Feeds it outside data such as prices
  3. Audits its code before it is deployed
  4. Finalizes its transactions faster
Reveal Answer

Answer: B. A contract sees only its own chain; whoever controls the data feed in effect controls the contract’s payouts.

4. What did the July 2016 hard fork after The DAO hack show?

  1. Contracts can never hold more than 3.6 million ether at once
  2. Proof of Stake prevents contract bugs
  3. Ether transfers can never be reversed
  4. Code ran as written, yet users chose to reverse it
Reveal Answer

Answer: D. The flawed contract executed as coded, but the Ethereum community rewrote the ledger, so ‘code is law’ held only until social consensus overrode it.

5. Worked problem: A transaction uses 50,000 gas with a base fee of 20 gwei and a 2 gwei tip. What is the fee in ETH?

Reveal Answer

Answer: Fee = 50,000 × (20 + 2) = 1,100,000 gwei = 0.0011 ETH.

6. Worked problem: If ETH is $3,000, what is that in dollars?

Reveal Answer

Answer: 0.0011 × $3,000 = $3.30.

11.4 Stablecoins and Their Collateral Models

In Plain Words

A stablecoin is a digital token designed to hold a fixed value, usually $1, and it is only as stable as its reserves or its mechanism. Under the GENIUS Act, a payment stablecoin must be backed one-to-one by cash and short-term Treasuries, may not pay holders interest, and gives holders the first claim on the reserves if the issuer fails.

Why it matters: The safety of a stablecoin lies in what stands behind it, not in the promise on the label.

In Brief

Summary: A stablecoin is a token designed to hold a fixed value, usually $1, and it is only as stable as its reserves or mechanism. Under the GENIUS Act a payment stablecoin must be backed 1:1 by cash and short Treasuries, may not pay holders interest, and gives holders first claim on reserves.

  • GENIUS Act: signed July 18, 2025; effective by January 18, 2027, or 120 days after final rules, which were still proposals in October 2026.
  • MiCA has applied to EU stablecoins since June 30, 2024, and bans interest from issuers and platforms.
  • Issuer economics: net = C × y × (1 − d) − F; in the worked example losses start below a 2.08% short rate.
  • Stablecoins held about $312 billion in October 2026 and are top-tier T-bill buyers.
  • USDC fell to $0.88 in March 2023 with only 8.25% of reserves at risk.

About 5 minutes to read. Figures and rules in this chapter last reviewed October 4, 2026.

Timeline: MiCA has applied to EU stablecoins since June 30, 2024, and bans interest; the US GENIUS Act was signed on July 18, 2025, and requires 1 to 1 backing by cash and short Treasuries; it takes effect by January 18, 2027, or 120 days after final rules
Figure 11.4.1 · Stablecoin rules on the calendar

Bitcoin’s price volatility makes it impractical as everyday money for pricing goods or settling contracts. A stablecoin solves this by being designed to hold a stable value, almost always pegged 1:1 to a fiat currency like the US dollar — but the mechanism used to maintain that peg varies enormously in reliability.

ModelHow the Peg Is MaintainedKey Risk
Fiat-CollateralizedEach coin is backed 1:1 by actual cash or cash-equivalent reserves (like short-term government bonds) held by the issuerRelies entirely on the honesty and independent auditability of the issuer’s reserve claims — precisely the Wirecard-style risk from Part 6
Crypto-CollateralizedBacked by other cryptocurrencies, typically over-collateralized (e.g., $150 of crypto locked up to back $100 of stablecoin) to absorb price swings in the collateral itselfThe underlying collateral can still fall in value faster than the buffer can absorb during extreme volatility
AlgorithmicNo real collateral at all — the peg is maintained purely through automated supply and demand adjustments coded into the protocol itselfCan lose its peg entirely and collapse to zero if confidence breaks, as TerraUSD did in May 2022
⚡ Why It Matters

TerraUSD’s collapse in May 2022, which the SEC says wiped out about $40 billion of market value, showed that a “stablecoin” is only as stable as the mechanism or collateral behind it. The label guarantees nothing: an algorithmic stablecoin with no real collateral is a confidence-dependent bet, not asset-backed money. Even full reserves can wobble when the bank holding them fails: on March 11, 2023, with $3.3 billion of its roughly $40 billion of reserves stuck at the failed Silicon Valley Bank, USDC traded as low as $0.88 before recovering.

US law now draws the line the table implies. The GENIUS Act (signed July 18, 2025) defines a payment stablecoin as a token its issuer must redeem for a fixed sum of money, and only permitted issuers may issue one in the United States. Reserves must cover it 1:1 in cash, insured deposits, Treasuries maturing within 93 days, overnight Treasury repo or government money funds, and may not be rehypothecated. Reserve composition is published monthly and examined by an accounting firm; holders rank first against reserves in insolvency; issuers may not pay holders “any form of interest or yield”; algorithmic tokens fall outside the definition. The Act takes effect on the earlier of January 18, 2027, or 120 days after final rules. The OCC (February 2026), Treasury (August 2026) and Federal Reserve (September 2026) have proposed rules, none final in early October 2026. The EU’s MiCA regulation, applied to stablecoins since June 30, 2024, requires at least 30% of reserves in bank deposits and bars interest from issuers and crypto platforms alike.

Sources: Public Law 119-27; Fed proposal; MiCA Art. 54; SEC 2024-73.
Where Experts Disagree: Are Stablecoins Good for the Monetary System?

The Bank for International Settlements (June 2025) says stablecoins fail the tests of singleness (each trades at its own price), elasticity (full backing cannot expand on demand) and integrity (bearer tokens ease illicit finance). Treasury’s borrowing advisers (April 2025) put the transactional deposits that could migrate at about $6.6 trillion. Fed staff (December 2025) replied that stablecoins “can either reduce, recycle, or restructure bank deposits rather than simply draining them,” depending on how much of the reserves sit in banks. Fed Governor Miran (November 2025) expects $1–3 trillion by 2030 and lower Treasury yields. The evidence is thin; reserve mix is the variable to watch.

BIS; TBAC; FEDS Notes; Miran.

Because reserves must be short Treasuries, stablecoins are now a top-tier T-bill buyer. Dollar stablecoins totaled about $312 billion on October 4, 2026; Tether reported $141 billion of Treasury exposure on March 31, 2026, and ranks itself 17th among holders of US Treasuries when set against countries.

Sources: DefiLlama; Tether Q1 2026.
🧮 Worked Example — Compare the Scenarios: Who Earns the Reserve Yield

Inputs: average circulation C = $60 billion (illustrative; Circle averaged $64.9 billion in 2025), reserves in T-bills and repo, a share d = 60% of reserve income paid to distribution partners (Circle paid out 60.6% in 2025) and fixed cost F = $0.5 billion (illustrative). Net income = C × y × (1 − d) − F, where y is the reserve yield.

Reserve yield yReserve incomeTo partnersNet after cost
4.1% (Circle, 2025)$2.46bn$1.476bn+$0.484bn
2.5%$1.50bn$0.90bn+$0.10bn
1.0%$0.60bn$0.36bn−$0.26bn

Flip point: y* = F ÷ [C × (1 − d)] = 0.5 ÷ (60 × 0.4) = 2.08%. At a 1% short rate the issuer needs 0.5 ÷ (0.01 × 0.4) = $125 billion of circulation to break even. The business is a spread on float, leveraged to the short rate, and holders fund it: $10,000 held for a year at 4.1% forgoes $410, which is why exchanges offer “rewards” and why the OCC’s proposal would presume that yield paid through an issuer’s affiliates breaches the ban.

Circle: full-year 2025 results.
Decision Rule

Treat a stablecoin as cash only if the issuer is permitted (GENIUS) or authorized (MiCA) with examined monthly reserve reports, the reserves are short Treasuries, repo and deposits spread across banks, and you or your platform can redeem at par within days. Hold only near-term payment needs in it; idle balances belong in a fund that pays you the yield. Algorithmic and crypto-collateralized tokens fail the test by design.

The Costliest Mistake

Selling a reserved stablecoin into a panic. When USDC hit $0.88, only 3.3 ÷ 40 = 8.25% of its reserves were at risk and they were made whole within days, yet selling $1,000,000 at the low cost $1,000,000 × (1 − 0.88) = $120,000. Know your redemption right and the reserves’ bank concentration before a run.

Frequently Asked Questions

Do stablecoins pay interest?

Not from the issuer. The GENIUS Act bars permitted issuers from paying any interest or yield, and MiCA also bars crypto platforms in the EU. Some US exchanges pay “rewards,” which the OCC’s 2026 proposal would challenge when paid through an issuer’s affiliates.

Is a stablecoin insured like a bank deposit?

No. A permitted issuer must hold 1:1 safe reserves, publish them monthly and give holders first claim on them in insolvency, which protects against issuer failure. It does not protect against the failure of an exchange holding your tokens, a bank failure where reserves sit, or redemption delays.

When does the GENIUS Act take effect?

On January 18, 2027, or earlier if regulators finalize rules sooner (120 days after final rules), and US platforms must stop offering unpermitted stablecoins from July 2028. The OCC, Treasury and Federal Reserve had proposed rules by September 2026; none was final in early October 2026.

✓ Section Recap

A stablecoin is only as stable as its reserves or mechanism, which TerraUSD’s 2022 collapse and USDC’s brief fall to $0.88 in 2023 both demonstrated. The GENIUS Act requires 1:1 cash and short-Treasury reserves, monthly examined disclosure, holder priority and no yield, so issuers earn a rate-sensitive spread that turns negative below about 2.08% in the worked example.

✎ Check Yourself

Six questions on this chapter. Decide on your answer first, then click “Reveal Answer.”

1. An issuer has $40 billion in circulation, pays 50% of reserve income to partners and has $0.4 billion of fixed costs. Below what reserve yield does it lose money?

  1. 2.0%
  2. 4.0%
  3. 1.0%
  4. 0.5%
Reveal Answer

Answer: A. Flip point = F ÷ [C × (1 − d)] = 0.4 ÷ (40 × 0.5) = 2.0%; 1.0% ignores the partner share.

2. Under the GENIUS Act, what may a permitted issuer pay its stablecoin holders?

  1. Interest up to the T-bill rate
  2. Yield only on balances above $10,000
  3. Interest only if state-licensed
  4. No interest or yield of any form
Reveal Answer

Answer: D. The Act bars permitted issuers from paying holders ‘any form of interest or yield’; the issuer keeps the reserve income.

3. Which of these may back a payment stablecoin under the GENIUS Act?

  1. Investment-grade corporate bonds of any maturity
  2. Bitcoin held in cold storage
  3. Treasury bills maturing within 93 days
  4. Ten-year Treasury notes
Reveal Answer

Answer: C. Eligible reserves are cash, insured deposits, Treasuries with 93 days or less to maturity, overnight Treasury repo and government money funds.

4. USDC traded at $0.88 when 8.25% of its reserves sat at a failed bank. A treasurer sold $2 million of USDC at that price. What was the loss against par?

  1. $120,000
  2. $240,000
  3. $165,000
  4. $24,000
Reveal Answer

Answer: B. $2,000,000 × (1 − 0.88) = $240,000, even though the reserves were made whole within days.

5. Worked problem: A stablecoin has $10bn issued and $9.7bn of reserves. What is the backing ratio and shortfall?

Reveal Answer

Answer: 97% backing; shortfall = $0.3bn.

6. Worked problem: The GENIUS Act requires 1:1 backing. How much more reserve would this issuer need?

Reveal Answer

Answer: $10bn − $9.7bn = $0.3bn, or 3.1% more reserves.

Sources