// Numbas version: finer_feedback_settings {"name": "Calculating the next EIP-1559 base fee", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "feedback": {"showactualmarkwhen": "always", "showtotalmarkwhen": "always", "showanswerstatewhen": "always", "showpartfeedbackmessageswhen": "always", "allowrevealanswer": true, "showexpectedanswerswhen": "inreview", "showadvicewhen": "inreview"}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "Calculating the next EIP-1559 base fee", "tags": ["base fee", "blockchain", "EIP-1559", "Ethereum", "fee market", "protocol accounting"], "metadata": {"description": "

A deterministic, specification-grounded calculation of the EIP-1559 base-fee adjustment for a block above its gas target. Learners apply integer division in the protocol-defined order and distinguish the proportional increase from the maximum adjustment.

", "licence": "Creative Commons Attribution 4.0 International"}, "statement": "

A parent Ethereum block has a base fee of 40,000,000,000 wei, a gas target of 15,000,000, and gas used of 22,500,000. For a block above target, EIP-1559 uses delta = max(parent_base_fee × (gas_used − gas_target) // gas_target // 8, 1), and next_base_fee = parent_base_fee + delta. What is the next block's base fee in wei? Enter only the integer.

", "advice": "

Worked solution

\n

Excess gas = 22,500,000 − 15,000,000 = 7,500,000.

\n

delta = 40,000,000,000 × 7,500,000 // 15,000,000 // 8 = 2,500,000,000 wei.

\n

next_base_fee = 40,000,000,000 + 2,500,000,000 = 42,500,000,000 wei.

\n

Gas use is 50% above target, so the base fee rises by 50% ÷ 8 = 6.25%, not by the full 12.5% maximum.

\n

Primary specification: EIP-1559 — https://eips.ethereum.org/EIPS/eip-1559

\n

Independent educational resource prepared by Mushegh Manukyan, Founder & CEO of ARMCP — https://armcp.net/. CC BY 4.0. Not investment advice.

", "rulesets": {}, "extensions": [], "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true, "j": false}, "constants": [], "variables": {}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": [], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "numberentry", "useCustomName": true, "customName": "Next EIP-1559 base fee (wei)", "marks": "10", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "prompt": "

Enter the exact integer in wei.

", "minValue": "42500000000", "maxValue": "42500000000", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "42500000000", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "showAllParts": false, "contributors": [{"name": "Mushegh Manukyan", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/39968/"}], "resources": []}]}], "contributors": [{"name": "Mushegh Manukyan", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/39968/"}]}