Skip to content
Business logic Disclosed report Advanced

Earn free DAI interest (inflation) through instant CDP+DSR in one tx

The DAI Savings Rate and the Stability Fee accrue only when `drip` is called on the `pot` and `jug` contracts, and these calls are not synchronised. An attacker could open a CDP, deposit the borrowed DAI into the savings contract, trigger a rate update, and withdraw the DAI plus interest within a single transaction, repeatedly earning interest on DAI that was never held, which inflates the DAI supply.

lucash-dev Follow

Originally disclosed on HackerOne

  • Fixed in 8 days
  • Paid in 8 days
  • Disclosed after 11 days

Summary:

The MCD contracts contain different mechanisms for accumulating rates in different contracts, namely pot and jug corresponding to the cost of a loan and interest earned on savings. Because these rates are not synchronised, and depend on the call to the drip method to be calculated, it's possible to game the system to obtain returns on DAI "savings" that exist only within a transaction. This means all holders of ETH/gems can costlessly and risklessly earn interest from the pot contract without ever holding DAI for any amount of time. This leads to inflation of the DAI supply and transfer of value to attackers.

Detailed Description of the Attack Mechanism

One of the novel features introduced in the MC contracts is the concept of DSR (DAI Savings Rate) which incentivises investors to hold DAI, by allowing them to earn interest on DAI deposits in the pot contract. Normally that doesn't result in overall inflation of the DAI supply, as the only ways of obtaining the DAI to deposit on the "savings account" is by either acquiring a CDP (Collateralised Debt Position) or buying DAI from someone else. As repaying a CDP will require an amount of DAI increasing with time, the overall economic effect is a net increase in DAI value.

In practice, however, both the Stability Fee rates and the DSR rate accrue at discrete moments in time (rather than continuously), whenever a user calls the method drip on the jug or pot contracts. As these methods are not synchronised between the jug and pot contracts it is possible, by carefully sequencing method calls to perform a transaction with the following steps:

  1. Transform the ETH/token into gem balance, using the join contract.
  2. Create a CDP urn (vat.frob), obtaining the maximum amount of DAI from the gem balance.
  3. Deposit the resulting DAI balance into pot (join method).
  4. Update accumulated DSR rate (pot.drip).
  5. Withdraw DAI from pot (exit method), obtaining the DAI deposited in 3 plus

interest. 6. Repay CDP (again, vat.frob), getting back the gem balance. 7. Transform back the gem balance into ETH/token.

At first glance the attack might not seem very practical, since there's no way to guarantee that no other transaction with call pot.drip in the same block, and that the time between calls to drip might be just a few seconds, earning a minimal amount of interest. In practice, a balance of several million USD worth of tokens would be enough to obtain interest payments larget than the gas cost of each call -- this could be easily crowdsourced in a trustless contract that splits the profits according to size of ETH/token deposits by participants, or easily obtained by some individual investors (e.g. exchanges). Even if the attack doesn't earn an interest in every instance (due to pot.drip having already been called in the same block), a random portion of successful occurrences would be enough to make executing it repeatedly profitable. Moreover, the crowdsourcing contract could obtain miner collaboration by paying them a portion of profits or extremely high fees.

If a crowdsourced attacker is correctly built and publicised, nothing prevents every single ETH/token holder from depositing their holdings in it, and profitably participating (with minimal cost and no risk) in a continuous attack on the MCD contracts, earning interest on a total balance worth billions USD -- and considerably inflating the DAI supply.

The attack will become clearer by inspecting a concrete example.

Reproducing the Attack - Example Crowdsourcer Contract

Please find attached the file antivat.t.sol which includes an example crowdsourcer contract (AntiVat) capable of accepting ETH deposits from users, and executing the CDP+DSR attack (grabFreeDai method). The contract also distributes profits proportionally between contributors.

The contract could be easily extended to support other gems and to provide an incentive to the miner.

Please note that this attacker contract is provided merely as an example for helping in reproducing the bug.

Possible Fix

As a suggested fix, calling pot.drip from within the call to vat.frob would render the attack impossible (interest would always be zero).

Please note that I make no claim that the above is the best way of fixing the issue. The suggested fix is provided only as proof that this is a fixable bug in the contracts.

Impact Analysis

Please refer to the "Impact Analysis" field below for a detailed analysis.

Impact

This section will proceed to demonstrate that this is a critical bug that meets (and exceeds) the requirements stated in the policy.

In the description above I've already made the points that: 1 - The issue reported is fixable. 2 - The attack has minimal cost when performed by a crowdsourced contract (or high-balance attacker).

I'll proceed to show that: 3 - It's possible to steal 10% (or more) of the value of the collateral in the system.

The attack described consists of repeatedly obtaining DAI interest over large balances in ETH/token that could be used for collateral, but without increasing the overall collateral locked in the system. As the DAI interest is paid for with newly created DAI, this corresponds to a continuous inflation of the DAI supply, transferring value continuously from legitimate holders of DAI.

Ultimately, given enough time, virtually all the DAI market cap could be in the hands of the attackers. The only limiting factor is time, and the rate at which value can be stolen is a function of the value of ETH and collateral tokens available to the attackers (which could well be the economic majority in the ETH ecosystem), the DSR rate, and the "Line" limit.

Assuming, as an example, that the DSR rate is 2% a year, that the available ETH supply is 20x that of the collateral in the MCD contracts, and that the "Line" limit is higher than that -- after one year (assuming successful attack in most blocks) the attackers would have inflated the DAI supply in 40%, transfering much more than 10% of collateral value to themselves.

It's impossible to know beforehand what values the DSR rate and the "Line" limit will have, but all they can do without breaking the contract functionality is to slow down the theft. (a DSR rate of 0% would effectively kill the DAI savings functionality, and low "Line" values that prevent DAI from being created in the attack would also affect the possibility of new legitimate users joining the system)

Final Note

I understand this is an involved attack, exploiting an issue in the interaction between several contracts, and with complex economic consequences. Please don't hesitate in contacting me for further explanations or to provide any information that can help you reproduce and evaluate the issue.

The original report as published on HackerOne, by lucash-dev. Images and videos are our own copies; raw HTML is shown as text. View it on HackerOne.

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 6 min read.

Context

MakerDAO's MCD (Multi-Collateral Dai) contracts split the economics of lending and saving across separate contracts. The jug contract accumulates the Stability Fee, the cost of a loan, and the pot contract accumulates the DSR (DAI Savings Rate), the interest paid on DAI deposited into savings. Neither rate accrues continuously: both are updated only when someone calls drip on the respective contract, so the accumulated rate jumps forward at discrete moments.

The DSR is meant to reward people for holding DAI. In the intended model it does not inflate the DAI supply, because the only ways to obtain DAI to deposit are to open a CDP (Collateralised Debt Position) or to buy DAI from someone else. Repaying a CDP requires an amount of DAI that grows with time, so the overall economic effect is a net increase in DAI value.

Setup

It needs the ability to submit transactions to the MCD contracts, a balance of ETH or collateral tokens, and the join contract to convert that balance into gem balance inside the system. The researcher also provided an example crowdsourcer contract, antivat.t.sol, which accepts ETH deposits from users, runs the CDP+DSR attack through a method called grabFreeDai, and distributes profits proportionally between contributors. The report describes that contract as an example for reproducing the bug and notes it could easily be extended to support other gems and to give the miner an incentive.

Finding it

The Stability Fee and the DSR are accumulated in different contracts, jug and pot, and are not synchronised with each other. Both depend on a call to drip to be calculated. Because of that gap, a user can obtain returns on DAI "savings" that exist only within a single transaction. In other words, any holder of ETH or gems can earn interest from the pot contract costlessly and risklessly without ever holding DAI for any amount of time. The consequence is inflation of the DAI supply and a transfer of value to attackers.

Exploitation

The attack is a single transaction that sequences calls across the contracts so that DAI is deposited into pot, the DSR is dripped, and the DAI plus interest is withdrawn, all before the CDP is repaid. The steps, as given in the report:

  1. Transform the ETH/token into gem balance, using the join contract.
  2. Create a CDP urn (vat.frob), obtaining the maximum amount of DAI from the gem balance.
  3. Deposit the resulting DAI balance into pot (join method).
  4. Update accumulated DSR rate (pot.drip).
  5. Withdraw DAI from pot (exit method), obtaining the DAI deposited in step 3 plus interest.
  6. Repay the CDP (again, vat.frob), getting back the gem balance.
  7. Transform back the gem balance into ETH/token.

The DAI withdrawn in step 5 is the DAI deposited in step 3 plus interest credited by pot.drip in step 4. The CDP is repaid in step 6 and the whole cycle happens inside one transaction.

At first glance the attack might not seem practical: there is no way to guarantee that no other transaction calls pot.drip in the same block, and the time between calls to drip might be only a few seconds, earning a minimal amount of interest. The researcher addresses this directly. A balance of several million USD worth of tokens would be enough to obtain interest payments larger than the gas cost of each call. That balance could be crowdsourced in a trustless contract that splits profits according to the size of each participant's ETH/token deposit, or obtained by individual investors such as exchanges. Even if the attack does not earn interest in every instance, because pot.drip was already called in the same block, a random portion of successful occurrences is enough to make repeated execution profitable. The crowdsourcing contract could also obtain miner collaboration by paying miners a portion of the profits or extremely high fees.

If such a crowdsourced attacker is correctly built and publicised, nothing prevents every ETH/token holder from depositing their holdings in it and profitably participating, at minimal cost and no risk, in a continuous attack on the MCD contracts. That would earn interest on a total balance worth billions of USD and considerably inflate the DAI supply.

Root cause

The mistake is architectural rather than a single faulty line. The jug and pot contracts each accumulate their rate independently, and the accumulated value only moves when drip is called on that contract. Nothing ties the DSR accrual to the moment a CDP is opened or repaid. A caller can therefore deposit into pot, trigger drip to credit interest for the elapsed period, and withdraw the deposit plus that interest, all within one transaction, while the corresponding CDP debt is settled in the same transaction.

Impact

The report argues that the issue is critical and exceeds the requirements of the program policy. It makes three points: the issue is fixable; the attack has minimal cost when performed by a crowdsourced contract or a high-balance attacker; and it is possible to steal 10% or more of the value of the collateral in the system.

The attack repeatedly obtains DAI interest over large balances of ETH or tokens that could be used as collateral, without increasing the overall collateral locked in the system. Because the DAI interest is paid with newly created DAI, this is a continuous inflation of the DAI supply that transfers value continuously from legitimate DAI holders. Given enough time, virtually all of the DAI market cap could end up in the attackers' hands. The only limiting factor is time, and the rate at which value can be stolen is a function of the value of ETH and collateral tokens available to the attackers (which could well be the economic majority in the ETH ecosystem), the DSR rate, and the "Line" limit.

As an example, the researcher assumes a DSR rate of 2% a year, an available ETH supply 20 times that of the collateral in the MCD contracts, and a "Line" limit higher than that. After one year, assuming a successful attack in most blocks, the attackers would have inflated the DAI supply by 40%, transferring much more than 10% of collateral value to themselves. It is impossible to know beforehand what values the DSR rate and the "Line" limit will have, but anything the contracts can do without breaking their functionality only slows the theft down. A DSR rate of 0% would effectively kill the DAI savings functionality, and low "Line" values that prevent DAI from being created in the attack would also affect the possibility of new legitimate users joining the system.

Fix

The suggested fix is to call pot.drip from within the call to vat.frob. That would render the attack impossible, because the interest credited at the moment of the CDP operation would always be zero. The researcher explicitly makes no claim that this is the best way to fix the issue, and presents it only as proof that the bug is fixable in the contracts.

Variants to test

  • Other rate accumulators with a manual drip-style update. Look for any protocol where interest or rewards accrue only when an update function is called, and where a deposit, update and withdrawal can be sequenced in one transaction. A positive result is a withdrawal larger than the deposit within a single transaction, with no time spent holding the asset between blocks.
  • Unsynchronised rate sources. Check systems where a borrow rate and a savings rate live in separate contracts and are updated independently. A positive result is a transaction that opens a position, triggers the savings update, and closes the position at a profit.
  • Crowdsourced execution. Model whether a contract pooling many users' deposits can make the per-call profit exceed gas costs, and whether repeated attempts across blocks remain profitable when some attempts find the rate already updated. A positive result is a positive expected value per attempt at realistic balances.
  • Miner collaboration. Consider whether paying miners a share of profits or unusually high fees changes the economics of landing the transaction in a favourable block position. A positive result is a measurable increase in the success rate of the attack.
  • Parameter sensitivity. Vary the savings rate and the supply cap ("Line") to see how they change the theft rate. A positive result is that the attack remains profitable at plausible parameter values, with only the speed of value transfer reduced.

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 14 min read.

What happened, in plain words

MakerDAO is a system built on the Ethereum blockchain that lets people lock up valuable things (like ETH, the blockchain's own currency, or other tokens) as collateral and borrow a digital currency called DAI against them. DAI is designed to stay worth about one US dollar. The system also lets people deposit DAI into a kind of savings account and earn interest on it. That interest is called the DSR, the DAI Savings Rate.

The researcher, lucash-dev, found a flaw in how that interest is calculated. The interest is not added up smoothly, second by second. Instead, it only moves forward when someone calls a specific function, drip, on the savings contract. The cost of borrowing (the Stability Fee) works the same way, but it lives in a different contract, jug, and the two are not kept in step with each other.

Because of that gap, someone can deposit DAI into savings, trigger the interest update, and withdraw the DAI plus interest, all inside a single transaction, and then repay the loan they used to get the DAI in the same transaction. They never actually hold DAI for any length of time, yet they collect interest. That interest is paid with newly created DAI, so the total amount of DAI in the world grows, and everyone who legitimately holds DAI loses a little value.

To follow the rest of this article you only need a browser and some patience. No coding is required. Every technical word is explained where it first appears, and there is a glossary at the end.

The pieces of the system

Before the attack makes sense, here are the parts of MakerDAO the report talks about, each explained from scratch.

  • Blockchain and transactions. A blockchain is a shared ledger that many computers keep copies of. A transaction is one instruction sent to that ledger, for example "move this money" or "run this function". Transactions are grouped into blocks, and a block is added roughly every few seconds. Everything inside one block happens together, and nothing else can slip in between the steps of a single transaction. Think of a transaction as a sealed envelope of instructions that is opened and carried out all at once.
  • Smart contracts. These are programs that live on the blockchain. Once deployed they run exactly as written, and anyone can send them transactions. MakerDAO is a collection of such contracts that talk to each other.
  • ETH and tokens. ETH is the blockchain's native currency. Tokens are other digital assets issued on the same blockchain. Gems is the report's word for the internal bookkeeping balance of a collateral asset once it is inside the MakerDAO system.
  • DAI. A stablecoin, a digital currency designed to hold a steady value of about one US dollar.
  • CDP (Collateralised Debt Position). A loan. You lock collateral (ETH or tokens) into the system and borrow DAI against it. If you do not repay, the collateral can be taken. In the contracts, the record of your loan is called a urn, and the function that creates or changes it is vat.frob.
  • Stability Fee. The interest charged on a CDP loan. It makes the amount of DAI you must repay grow over time. It accumulates in the jug contract.
  • DSR (DAI Savings Rate). The interest paid to people who deposit DAI into the savings account. It accumulates in the pot contract.
  • drip. A function you call to bring the accumulated interest up to date. Interest does not tick forward on its own; it jumps forward only when drip is called. Think of a clock that only moves when you press a button, not one that moves by itself.
  • join and exit. In the report, join is the function that puts your asset into a contract (converting ETH or tokens into gem balance, or putting DAI into the savings pot), and exit is the function that takes it back out.
  • Gas. A small fee paid to the network for running a transaction. Every call costs gas, so an attack only makes money if the interest earned is bigger than the gas spent.
  • Business logic error. A whole category of bug where the code does exactly what it was written to do, but the rules it enforces are wrong or can be played against each other. Nothing crashes and no password is stolen; the system simply allows something it never intended. A useful comparison: a car park that charges for the first hour and refunds it if you leave within the hour. The machine works perfectly, but someone can drive in, drive out, and collect the refund without ever parking.

The intended design

The DSR exists to reward people for holding DAI. In the intended model it does not inflate the DAI supply, because there are only two ways to get DAI to deposit: open a CDP and borrow it, or buy it from someone else. If you borrowed it, repaying the CDP requires an amount of DAI that grows over time because of the Stability Fee. So the overall economic effect is meant to be a net increase in the value of DAI, not a dilution of it.

The flaw is that the two rates, the Stability Fee in jug and the DSR in pot, are accumulated in separate contracts and are not synchronised. Both depend on a call to drip to be calculated. Because of that gap, a user can obtain returns on DAI "savings" that exist only within a single transaction. In plain terms, any holder of ETH or gems can earn interest from the pot contract costlessly and risklessly without ever holding DAI for any amount of time. The consequence is inflation of the DAI supply and a transfer of value to attackers.

What the attacker needs

It needs:

  1. The ability to submit transactions to the MCD contracts, which anyone with a wallet can do.
  2. A balance of ETH or collateral tokens.
  3. The join contract to convert that balance into gem balance inside the system.

The researcher also provided an example crowdsourcer contract, antivat.t.sol, which accepts ETH deposits from users, runs the CDP+DSR attack through a method called grabFreeDai, and distributes profits proportionally between contributors. The report describes that contract as an example for reproducing the bug and notes it could easily be extended to support other gems and to give the miner an incentive. A crowdsourcer here simply means a shared pot: many people put their ETH in, one contract runs the attack on everyone's behalf, and the profit is split according to how much each person put in.

The attack, step by step

The attack is a single transaction that sequences calls across the contracts so that DAI is deposited into pot, the DSR is dripped, and the DAI plus interest is withdrawn, all before the CDP is repaid. The steps, as given in the report:

  1. Transform the ETH/token into gem balance, using the join contract.
  2. Create a CDP urn (vat.frob), obtaining the maximum amount of DAI from the gem balance.
  3. Deposit the resulting DAI balance into pot (join method).
  4. Update accumulated DSR rate (pot.drip).
  5. Withdraw DAI from pot (exit method), obtaining the DAI deposited in step 3 plus interest.
  6. Repay the CDP (again, vat.frob), getting back the gem balance.
  7. Transform back the gem balance into ETH/token.

Here is what each step is for, and why it is done in this order.

  1. Convert your asset into gem balance. The MakerDAO contracts do not work directly with your ETH or tokens; they work with an internal balance called a gem. The join contract is the doorway that converts one into the other. You do this first because everything that follows happens inside the system.
  2. Open a CDP and borrow the maximum DAI. The vat.frob function creates the loan record (the urn) and issues DAI against your gem balance. You borrow as much as the rules allow, because the more DAI you can put into savings, the more interest you can collect in the next steps. This is the money you will use, not money you already owned.
  3. Deposit the borrowed DAI into the savings pot. The join method of the pot contract puts your DAI into the savings account. This is the deposit that the interest will be calculated on.
  4. Call pot.drip to update the interest. This is the heart of the trick. Because interest only moves when drip is called, calling it now credits interest for the time that has passed since the last call, even though your DAI has only been in the pot for a moment. The clock jumps forward and your deposit is treated as if it had been there all along.
  5. Withdraw the DAI plus interest. The exit method takes your DAI back out. Because of step 4, you get back slightly more than you put in. That extra is the interest.
  6. Repay the CDP. You call vat.frob again to settle the loan and get your gem balance back. You repay the original amount plus whatever Stability Fee has accrued. Because the whole cycle happens inside one transaction, the attacker never carries DAI exposure between blocks.
  7. Convert the gem balance back into ETH or tokens. The final step returns you to where you started, except you now hold a little more value than before.

The DAI withdrawn in step 5 exceeds the DAI deposited in step 3 by the interest that pot.drip credited in step 4. Because the CDP is repaid in step 6 with the original amount plus whatever fee has accrued, and the whole cycle happens inside one transaction, the attacker never carries DAI exposure between blocks. In everyday terms: you borrow money, put it in a savings account, press the button that updates the interest, take the money out, pay the loan back, and walk away with the interest, all in one transaction.

Why it is not as impractical as it first looks

At first glance the attack might not seem practical. There is no way to guarantee that no other transaction calls pot.drip in the same block, and the time between calls to drip might be only a few seconds, earning a minimal amount of interest. If someone else already pressed the button in this block, your own press adds nothing, and you earn nothing on that attempt.

The researcher addresses this directly. A balance of several million USD worth of tokens would be enough to obtain interest payments larger than the gas cost of each call. That balance could be crowdsourced in a trustless contract that splits profits according to the size of each participant's ETH/token deposit, or obtained by individual investors such as exchanges. Trustless here means the contract's rules are public and enforced by code, so participants do not have to trust each other or a middleman.

Even if the attack does not earn interest in every instance, because pot.drip was already called in the same block, a random portion of successful occurrences is enough to make repeated execution profitable. Think of a vending machine that sometimes gives you a free snack: if the snack is worth more than the coin, you keep trying.

The crowdsourcing contract could also obtain miner collaboration by paying miners a portion of the profits or extremely high fees. Miners are the participants who decide which transactions go into the next block and in what order. The crowdsourcing contract could obtain miner collaboration by paying miners a portion of the profits or extremely high fees.

If such a crowdsourced attacker is correctly built and publicised, nothing prevents every ETH/token holder from depositing their holdings in it and profitably participating, at minimal cost and no risk, in a continuous attack on the MCD contracts. That would earn interest on a total balance worth billions of USD and considerably inflate the DAI supply.

The root cause

The mistake is architectural rather than a single faulty line. The jug and pot contracts each accumulate their rate independently, and the accumulated value only moves when drip is called on that contract. Nothing ties the DSR accrual to the moment a CDP is opened or repaid. A caller can therefore deposit into pot, trigger drip to credit interest for the elapsed period, and withdraw the deposit plus that interest, all within one transaction, while the corresponding CDP debt is settled in the same transaction.

Impact

The report argues that the issue is critical and exceeds the requirements of the program policy. It makes three points: the issue is fixable; the attack has minimal cost when performed by a crowdsourced contract or a high-balance attacker; and it is possible to steal 10% or more of the value of the collateral in the system.

The attack repeatedly obtains DAI interest over large balances of ETH or tokens that could be used as collateral, without increasing the overall collateral locked in the system. Because the DAI interest is paid with newly created DAI, this is a continuous inflation of the DAI supply that transfers value continuously from legitimate DAI holders. Given enough time, virtually all of the DAI market cap could end up in the attackers' hands. The only limiting factor is time, and the rate at which value can be stolen is a function of the value of ETH and collateral tokens available to the attackers (which could well be the economic majority in the ETH ecosystem), the DSR rate, and the "Line" limit.

As an example, the researcher assumes a DSR rate of 2% a year, an available ETH supply 20 times that of the collateral in the MCD contracts, and a "Line" limit higher than that. After one year, assuming a successful attack in most blocks, the attackers would have inflated the DAI supply by 40%, transferring much more than 10% of collateral value to themselves. It is impossible to know beforehand what values the DSR rate and the "Line" limit will have, but anything the contracts can do without breaking their functionality only slows the theft down. A DSR rate of 0% would effectively kill the DAI savings functionality, and low "Line" values that prevent DAI from being created in the attack would also affect the possibility of new legitimate users joining the system. In other words, the defenders can turn the tap down, but not close it without breaking the product.

The suggested fix

The suggested fix is to call pot.drip from within the call to vat.frob. That would render the attack impossible, because the interest credited at the moment of the CDP operation would always be zero. The reasoning is simple: if the interest clock is always pressed at the exact moment a loan is opened or repaid, there is never any elapsed time for the attacker to collect. The researcher explicitly makes no claim that this is the best way to fix the issue, and presents it only as proof that the bug is fixable in the contracts.

Variants to test

If you are learning to look for this kind of bug, the report suggests where else to look. Each variant is a pattern to check, not a claim that it exists elsewhere.

  • Other rate accumulators with a manual drip-style update. Look for any protocol where interest or rewards accrue only when an update function is called, and where a deposit, update and withdrawal can be sequenced in one transaction. A positive result is a withdrawal larger than the deposit within a single transaction, with no time spent holding the asset between blocks.
  • Unsynchronised rate sources. Check systems where a borrow rate and a savings rate live in separate contracts and are updated independently. A positive result is a transaction that opens a position, triggers the savings update, and closes the position at a profit.
  • Crowdsourced execution. Model whether a contract pooling many users' deposits can make the per-call profit exceed gas costs, and whether repeated attempts across blocks remain profitable when some attempts find the rate already updated. A positive result is a positive expected value per attempt at realistic balances.
  • Miner collaboration. Consider whether paying miners a share of profits or unusually high fees changes the economics of landing the transaction in a favourable block position. A positive result is a measurable increase in the success rate of the attack.
  • Parameter sensitivity. Vary the savings rate and the supply cap ("Line") to see how they change the theft rate. A positive result is that the attack remains profitable at plausible parameter values, with only the speed of value transfer reduced.

Glossary

  • Blockchain: a shared ledger kept by many computers, where entries are grouped into blocks and cannot easily be changed afterwards.
  • Transaction: one instruction sent to the blockchain, carried out all at once.
  • Block: a bundle of transactions added to the blockchain together, roughly every few seconds.
  • Smart contract: a program that lives on the blockchain and runs exactly as written when someone sends it a transaction.
  • ETH: the native currency of the Ethereum blockchain.
  • Token: a digital asset issued on a blockchain, separate from the native currency.
  • Gem: the report's term for the internal bookkeeping balance of a collateral asset inside the MakerDAO system.
  • DAI: a stablecoin designed to hold a value of about one US dollar.
  • CDP (Collateralised Debt Position): a loan in which you lock collateral and borrow DAI against it.
  • Urn: the record of a CDP inside the contracts.
  • vat.frob: the function that creates or changes a CDP.
  • Stability Fee: the interest charged on a CDP loan, accumulated in the jug contract.
  • DSR (DAI Savings Rate): the interest paid on DAI deposited into savings, accumulated in the pot contract.
  • drip: the function that brings accumulated interest up to date; interest only moves when it is called.
  • join: the function that puts an asset into a contract (converting ETH or tokens into gem balance, or DAI into the savings pot).
  • exit: the function that takes an asset back out of a contract.
  • Gas: the fee paid to the network for running a transaction.
  • Business logic error: a bug where the code works as written but the rules it enforces can be played against each other to produce an unintended result.
  • Crowdsourcer: a shared contract that pools many users' deposits, runs an action on their behalf, and splits the profit.
  • Trustless: a setup whose rules are public and enforced by code, so participants do not need to trust each other or a middleman.
  • Miner: a participant who decides which transactions go into the next block and in what order.
  • Line: the cap on how much DAI the system will allow to be created in total.
  • Inflation: an increase in the total supply of a currency, which reduces the value of each unit already held.
  • Market cap: the total value of all units of a currency in circulation.
  • Expected value: the average profit or loss per attempt if you repeat an action many times.

More by lucash-dev

View all

4 more disclosed reports, best first.

More from BlockDev Sp. Z o.o

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Business logic flaws

The lesson behind this report.

The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.