Notional
A logic error in Notional V2's bitmap portfolio feature caused free collateral to be double-counted when a user changed their bitmap currency after depositing another currency. An attacker could exploit this to borrow more than their actual collateral, potentially draining almost all liquidity from markets.
medium.com
Published on medium.com
Notional
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Context
Notional is a fixed-term lending and borrowing platform on Ethereum. All operations on Notional V2 are carried out using its fCash token: a transferable token that represents a claim on a positive or negative cash flow at a future date. Interest rates for lending and borrowing are set by fCash Markets, and users deposit or receive cash in return for fCash when they lend or borrow at set rates.
As the Notional V2 documentation puts it:
"fCash is denominated in an underlying token like DAI or USDC, but it is settled in a cToken like cDAI or cUSDC. For example, upon maturity, 100 fDAI is not directly redeemable for 100 DAI, rather it is redeemable for 100 DAI's worth of cDAI which is then freely convertible into DAI at the user's will."
The feature at the centre of this report is the Bitmap Portfolio. Most Notional V2 users have a portfolio similar to Notional V1: a simple array of assets, with the number of assets limited by governance-tunable parameters. Notional V2 adds a second "asset bitmap" portfolio that can be enabled on any account and is particularly handy for market makers.
Bitmap Portfolios, or Asset Bitmaps, must first be activated as an account activity. Bitmap currencies can only be changed if there are no debts or credits in the bitmap asset. Before and after activating a bitmap portfolio, users do not need to change how they interact with the platform; only fCash assets in that bitmap currency can be kept once a bitmap portfolio is activated. MAX_BITMAP_ASSETS is the maximum number of fCash assets a bitmap portfolio can store.
To evaluate an account's collateral position and validate that its debts are sufficiently overcollateralised, Notional uses the concept of free collateral: the amount of collateral denominated in ETH that an account holds beyond what it needs to meet its minimum collateral requirements. A positive free collateral figure means the account is adequately collateralised; a negative figure means it is under-collateralised and eligible for liquidation.
Setup
The bug was submitted to Notional by whitehat 0x60511e57 via Immunefi on 7 January. It was given a severity of critical, since it could have allowed a user to drain almost all liquidity from markets on all currencies.
The whitehat prepared a runnable proof of concept that demonstrated the vulnerability in a local blockchain fork. First, a brownie script showed how the double accounting can happen. Next, the whitehat provided three attacker contracts that could be used in an attack; these three contracts were later used in a brownie script and executed on a mainnet-fork, a local copy of a blockchain.
No specific tool versions, account addresses or deployment details are given beyond this.
Finding it
The vulnerability lies inside the function AccountContextHandler.enableBitmapForAccount(), which is called from the account action contract.

enableBitmapForAccount() only calls setActiveCurrency() as long as no bitmap currency is set for an account. Once a bitmap currency has been set, enableBitmapForAccount fails to clear the copy of the active bitmap currency in accountContext.activeCurrencies when the bitmap currency is changed. That omission is what allows double accounting of free collateral.
The mechanism depends on how setActiveCurrency() behaves when a deposit is made. Depositing a second currency into the account by calling depositUnderlyingToken() makes a call to setActiveCurrency with constant.ACTIVE_IN_BALANCES as the flags argument and isActive being true. That enables the currency in accountContext.activeCurrencies only if the currency is not the active bitmap currency. The condition can be forced to be true by first calling enableBitmapForAccount with some dummy currency that the attacker does not care about.
Exploitation
In the processing of account contexts with bitmap portfolios enabled, the Notional V2 contracts had a logic issue: free collateral was miscalculated and overpriced by a factor of two. The steps below reproduce the double accounting.
Step 1: enable a bitmap portfolio for a dummy currency
An attacker enables the bitmap portfolio for any currency, ETH or a dummy currency, by calling the enableBitmapCurrency function in the Account Action contract.
Step 2: deposit the currency to be double counted
The attacker calls depositUnderlyingToken(), depositing the currency they want double accounting for, for example DAI.
Step 3: rely on the activation condition
The deposit activates the currency only if it is not the active bitmap currency. That is why step 1 activated a different currency from the one deposited here.
Step 4: switch the bitmap currency to the deposited one
The attacker makes a second call to the enableBitmapCurrency function in the Account Action contract, this time setting DAI as the bitmap currency.
Step 5: the double count
Because enableBitmapForAccount does not clear the copy of the active bitmap currency in accountContext.activeCurrencies when the bitmap currency changes, the free collateral calculations run twice on the deposited asset: once for the bitmap and once for accountContext.activeCurrencies. The system believes it has to check DAI twice in free collateral, effectively doubling the DAI collateral believed to be present in the account.
Step 6: borrow against the inflated collateral
With collateralisation appearing very high, the attacker can transfer out double the amount of fCash without Notional registering that the account went into debt.
Step 7: realise the funds
The attacker could then send the fCash to another account and have that account convert the received fCash into the underlying currency using a Notional market.
As a demonstration, the whitehat showed that he was able to drain all 26.2 million of DAI from the DAI market.
Root cause
enableBitmapForAccount() calls setActiveCurrency() only while no bitmap currency is set for the account. Once a bitmap currency exists, changing it leaves the previous copy of the active bitmap currency in accountContext.activeCurrencies untouched. Free collateral is then computed over both the bitmap entry and the stale active-currencies entry for the same asset, so the same collateral is counted twice.
The deposit path makes this reachable: depositUnderlyingToken() calls setActiveCurrency with constant.ACTIVE_IN_BALANCES and isActive true, which adds the currency to accountContext.activeCurrencies only when it is not the active bitmap currency. Activating an unrelated dummy bitmap first satisfies that condition, and a second enableBitmapCurrency call then moves the bitmap onto the deposited currency without removing the earlier entry.
Impact
Because free collateral was overpriced by a factor of two, an attacker could borrow more than their real collateral supported and drain funds from the protocol. The report states the bug could have allowed a user to drain almost all liquidity from markets on all currencies, and the proof of concept drained all 26.2 million DAI from the DAI market.
Fix
The Notional team confirmed the bug in less than an hour and upgraded the affected contracts to remove the vulnerable feature. Once they determined that no funds were at risk, they proceeded with a proper fix to re-enable the feature. They disabled the enableBitmapCurrency function and created a PR with a proposed fix, which states:
"This fix will re-enable the enableBitmapCurrency method to be called by accounts. The fix here is to simply remove the functionality of changing a bitmap currency on an account once it is set. This should eliminate the potential for double counting altogether. There is no valid use case for accounts changing bitmap currencies. Furthermore, once enabled a bitmap currency also cannot be disabled."
For the discovery, 0x60511e57 was paid the maximum reward for the finding: one million dollars plus an additional 100,000 NOTE tokens.
Variants to test
- Bitmap or set changes after activation. On any protocol with an opt-in asset set, try switching the active set after populating balances. A positive result is a collateral or balance figure that counts the same asset in both the old and new structures.
- Deposit paths that write to a secondary index. Look for deposit or transfer functions that add an asset to a tracking list only under a condition (for example, "not the active bitmap currency"). A positive result is an asset appearing in two tracking structures at once.
- Repeated activation calls. Call the activation function twice with different arguments and inspect the stored account context. A positive result is a stale entry that is never cleared.
- Borrow against inflated collateral. After any suspected double count, attempt to transfer out or borrow roughly twice the deposited value. A positive result is a transaction that succeeds without the account being flagged as under-collateralised.
- Cross-account realisation. Move the resulting claim to a second account and convert it through a market, as in step 7, to confirm the inflated position can be turned into the underlying asset.
What happened, in plain words
Notional is a service on the Ethereum blockchain that lets people lend and borrow money for a fixed period of time. Think of it a bit like a savings account and a loan office rolled into one, except that no bank sits in the middle: computer programs called smart contracts hold the rules and the money. A smart contract is a program that lives on the blockchain and runs automatically when someone sends it a transaction. Nobody can quietly edit it after the fact, and anyone can read its code.
On 7 January, a security researcher who goes by the handle 0x60511e57 sent Notional a report through Immunefi, a website where companies pay people for finding flaws in their software. The flaw was serious: it could have let a single user take almost all the money out of Notional's markets, in every currency the platform supported. The report was rated critical, the highest severity level.
The cause was a counting mistake. Notional keeps track of how much collateral each account holds, so it can tell whether a borrower has enough money set aside to cover a loan. Under one particular sequence of actions, the platform counted the same collateral twice. It believed an account held twice as much as it really did, and so it happily allowed the account to borrow or withdraw far more than it should have.
To prove it, the researcher wrote a runnable demonstration, a proof of concept, that ran on a local copy of the blockchain. In that demonstration he drained all 26.2 million DAI from the DAI market. DAI is a cryptocurrency designed to stay close in value to the US dollar. The Notional team confirmed the bug in under an hour, upgraded the affected contracts to remove the vulnerable feature, checked that no funds were at risk, and then proceeded with a proper fix to re-enable the feature. The researcher was paid the maximum reward: one million dollars plus 100,000 NOTE tokens.

The platform, from zero
Before the bug makes sense, you need a picture of what Notional does and the words it uses.
Notional is a fixed-term lending and borrowing platform on Ethereum. Ethereum is a public blockchain: a shared ledger that many computers keep copies of, so no single company controls it. A fixed-term loan is one with an agreed end date, like a six-month savings bond, rather than money you can pull out at any moment.
All operations on Notional V2, the second version of the protocol, are carried out using its fCash token. A token here is a digital unit of value recorded on the blockchain. fCash is a transferable token that represents a claim on a positive or negative cash flow at a future date. In everyday terms, an fCash token is an IOU with a maturity date printed on it: it says that on a certain day you will either receive money or owe money. Because it is transferable, you can hand that IOU to someone else before the date arrives.
Interest rates for lending and borrowing are set by fCash Markets. A market in this context is simply the place where buyers and sellers of a particular fCash token meet, and the rate is the price that emerges from their trading. Users deposit or receive cash in return for fCash when they lend or borrow at set rates.
The Notional V2 documentation explains how fCash relates to the underlying money:
"fCash is denominated in an underlying token like DAI or USDC, but it is settled in a cToken like cDAI or cUSDC. For example, upon maturity, 100 fDAI is not directly redeemable for 100 DAI, rather it is redeemable for 100 DAI's worth of cDAI which is then freely convertible into DAI at the user's will."
Unpacking that: the underlying token is the actual currency, such as DAI or USDC (both are stablecoins pegged to the dollar). A cToken is a receipt token you get from a separate lending service when you deposit currency there; cDAI is the receipt for DAI. So when an fCash position matures, you do not get plain DAI back directly. You get a receipt for DAI held elsewhere, and you can swap that receipt for DAI whenever you like. The point is that value moves through more than one kind of token before it reaches your wallet.
Bitmap portfolios
The feature at the centre of this report is the Bitmap Portfolio. To understand it, start with the ordinary case. Most Notional V2 users have a portfolio similar to Notional V1: a simple array of assets. An array is just an ordered list, like a shopping list with slots numbered one, two, three. The number of assets a user can hold this way is limited by governance-tunable parameters, meaning the people who run the protocol can adjust the limit through a vote or an admin action.
Notional V2 adds a second kind of portfolio, the asset bitmap portfolio, which can be enabled on any account and is particularly handy for market makers. A market maker is a professional trader who constantly offers to buy and sell, providing liquidity (available money) so that other people's trades can go through quickly.
A bitmap is a compact way of storing a list of yes/no facts. Imagine a row of light switches, one per currency. Switch three on means "this account holds currency number three"; switch three off means it does not. Instead of writing out a long list of names, the program stores one number whose binary digits are those switches. It is smaller and faster to check, which is why market makers with many positions like it.
Bitmap Portfolios, or Asset Bitmaps, must first be activated as an account activity. That means the user has to send a transaction asking the platform to switch this mode on for their account. Bitmap currencies can only be changed if there are no debts or credits in the bitmap asset. In plain words: once you have money owed or owing in that currency, you are not supposed to swap the bitmap over to a different currency.
Before and after activating a bitmap portfolio, users do not need to change how they interact with the platform. The interface and the actions stay the same. Only fCash assets in that bitmap currency can be kept once a bitmap portfolio is activated, so the bitmap narrows what the account can hold. MAX_BITMAP_ASSETS is the maximum number of fCash assets a bitmap portfolio can store, a cap written into the contract.
Free collateral
To evaluate an account's collateral position and validate that its debts are sufficiently overcollateralised, Notional uses the concept of free collateral. Collateral is the money or assets you pledge as security for a loan, the way a house secures a mortgage. Overcollateralised means you have put up more than the loan is worth, which protects the lender if prices move.
Free collateral is the amount of collateral denominated in ETH that an account holds beyond what it needs to meet its minimum collateral requirements. ETH is Ethereum's own cryptocurrency, and Notional uses it as the common yardstick so that positions in different currencies can be compared. Think of free collateral as the spare room on a credit card: the part of your limit you have not used yet. A positive free collateral figure means the account is adequately collateralised and can borrow more. A negative figure means it is under-collateralised and eligible for liquidation, meaning the platform can seize and sell the collateral to repay what is owed.
If free collateral is counted twice, the spare room looks twice as big as it is. That is the whole bug in one sentence.
How the researcher set it up
The bug was submitted to Notional by whitehat 0x60511e57 via Immunefi on 7 January. A whitehat is a researcher who finds flaws and reports them to the owner instead of exploiting them. It was given a severity of critical, since it could have allowed a user to drain almost all liquidity from markets on all currencies. Liquidity here means the pool of funds sitting in a market, available to be borrowed or withdrawn.
The whitehat prepared a runnable proof of concept that demonstrated the vulnerability in a local blockchain fork. A fork, in this setting, is a copy of the blockchain's state taken at a certain moment and run on your own machine. It behaves exactly like the real network, with the same contracts and balances, but nothing you do on it costs real money or affects anyone. It is the security equivalent of a flight simulator.
First, a brownie script showed how the double accounting can happen. Brownie is a tool for writing and running tests against Ethereum contracts in the Python programming language. Next, the whitehat provided three attacker contracts that could be used in an attack. An attacker contract is a small program written by the researcher that plays the role of a malicious user, sending the sequence of calls automatically. These three contracts were later used in a brownie script and executed on a mainnet-fork, a local copy of a blockchain.
No specific tool versions, account addresses or deployment details are given beyond this.
Finding it
The vulnerability lies inside the function AccountContextHandler.enableBitmapForAccount(), which is called from the account action contract. A function is a named block of code that does one job; calling it means asking it to run. The account action contract is the part of Notional that users reach when they perform account-level actions such as switching features on.

enableBitmapForAccount() only calls setActiveCurrency() as long as no bitmap currency is set for an account. setActiveCurrency() is the internal helper that records which currency is currently active for the account. The phrase "as long as" is the important part: the helper runs only while the account has no bitmap currency yet.
Once a bitmap currency has been set, enableBitmapForAccount fails to clear the copy of the active bitmap currency in accountContext.activeCurrencies when the bitmap currency is changed. accountContext is the record the platform keeps for each account, and activeCurrencies is a list inside that record of currencies currently marked as active. When the bitmap currency is switched, the old entry in that list is left behind, like a name still written on a whiteboard after the meeting has moved to a different room. That omission is what allows double accounting of free collateral.
The mechanism depends on how setActiveCurrency() behaves when a deposit is made. Depositing a second currency into the account by calling depositUnderlyingToken() makes a call to setActiveCurrency with constant.ACTIVE_IN_BALANCES as the flags argument and isActive being true. A deposit is simply putting money into the platform. A flags argument is an extra value passed to a function to tell it which mode to operate in; constant.ACTIVE_IN_BALANCES is a named constant, a fixed label defined in the code, meaning "this currency is active because it appears in the account's balances". isActive being true means "mark it as active".
That enables the currency in accountContext.activeCurrencies only if the currency is not the active bitmap currency. So the deposit adds the currency to the active list only when the bitmap is pointing somewhere else. The condition can be forced to be true by first calling enableBitmapForAccount with some dummy currency that the attacker does not care about. A dummy currency is a placeholder chosen purely to satisfy a check, with no intention of using it for real.
Exploitation, step by step
In the processing of account contexts with bitmap portfolios enabled, the Notional V2 contracts had a logic issue: free collateral was miscalculated and overpriced by a factor of two. The steps below reproduce the double accounting. Each step is a transaction the attacker sends, and the reason for it is given alongside.
Step 1: enable a bitmap portfolio for a dummy currency
An attacker enables the bitmap portfolio for any currency, ETH or a dummy currency, by calling the enableBitmapCurrency function in the Account Action contract.
Why: this puts the account into bitmap mode and points the bitmap at a currency the attacker will never deposit. That matters because of the condition in the next step: a deposit only gets added to the active list when the deposited currency is not the bitmap currency. By parking the bitmap on something else, the attacker keeps the door open for the real currency.
Step 2: deposit the currency to be double counted
The attacker calls depositUnderlyingToken(), depositing the currency they want double accounting for, for example DAI.
Why: this is the money that will be counted twice. The deposit is real; the attacker genuinely puts DAI in. The flaw is not that the deposit is fake, but that the platform later records it in two places at once.
Step 3: rely on the activation condition
The deposit activates the currency only if it is not the active bitmap currency. That is why step 1 activated a different currency from the one deposited here.
Why: this is the hinge of the whole attack. Because the bitmap was set to a dummy in step 1, DAI is not the bitmap currency at the moment of deposit, so the deposit path adds DAI to accountContext.activeCurrencies. Had the bitmap already been on DAI, this line would have been skipped and there would be nothing to double count.
Step 4: switch the bitmap currency to the deposited one
The attacker makes a second call to the enableBitmapCurrency function in the Account Action contract, this time setting DAI as the bitmap currency.
Why: now DAI is recorded in two structures at once. It is in the bitmap, because the attacker just pointed the bitmap at it, and it is still in accountContext.activeCurrencies, because the switch did not remove the earlier entry. This is the moment the stale copy is created.
Step 5: the double count
Because enableBitmapForAccount does not clear the copy of the active bitmap currency in accountContext.activeCurrencies when the bitmap currency changes, the free collateral calculations run twice on the deposited asset: once for the bitmap and once for accountContext.activeCurrencies. The system believes it has to check DAI twice in free collateral, effectively doubling the DAI collateral believed to be present in the account.
Why this matters: free collateral is the number that decides how much the account may borrow. Doubling it is like a bank reading your bank statement twice and concluding you have twice the savings. Every later check that relies on that number is now wrong in the attacker's favour.
Step 6: borrow against the inflated collateral
With collateralisation appearing very high, the attacker can transfer out double the amount of fCash without Notional registering that the account went into debt.
Why: the platform's safety check compares what is owed against the (now doubled) collateral. Because the collateral figure is inflated, the check passes even though the real position is far too thin. The attacker walks away with fCash that the real deposit does not support.
Step 7: realise the funds
The attacker could then send the fCash to another account and have that account convert the received fCash into the underlying currency using a Notional market.
Why: fCash on its own is an IOU, not spendable money. To turn the theft into something usable, the attacker moves the claim to a second account, which is not carrying the suspicious history, and trades it through a Notional market for the underlying currency. That final trade is what converts the inflated position into real funds.
As a demonstration, the whitehat showed that he was able to drain all 26.2 million of DAI from the DAI market.
Why it worked
enableBitmapForAccount() calls setActiveCurrency() only while no bitmap currency is set for the account. Once a bitmap currency exists, changing it leaves the previous copy of the active bitmap currency in accountContext.activeCurrencies untouched. Free collateral is then computed over both the bitmap entry and the stale active-currencies entry for the same asset, so the same collateral is counted twice.
The deposit path makes this reachable: depositUnderlyingToken() calls setActiveCurrency with constant.ACTIVE_IN_BALANCES and isActive true, which adds the currency to accountContext.activeCurrencies only when it is not the active bitmap currency. Activating an unrelated dummy bitmap first satisfies that condition, and a second enableBitmapCurrency call then moves the bitmap onto the deposited currency without removing the earlier entry.
In everyday terms: the platform has two notebooks for recording who holds what. The rule says an entry goes into the second notebook only if it is not already in the first. The attacker first writes a different name in the first notebook, so the real currency is allowed into the second. Then the attacker copies the real currency into the first notebook as well, and nobody crosses out the second entry. From then on, every total is added up from both notebooks, and the same money appears twice.
What could have gone wrong
Because free collateral was overpriced by a factor of two, an attacker could borrow more than their real collateral supported and drain funds from the protocol. The report states the bug could have allowed a user to drain almost all liquidity from markets on all currencies, and the proof of concept drained all 26.2 million DAI from the DAI market.
Put simply: the flaw did not steal money by breaking a lock. It persuaded the platform's own accounting to overstate what the attacker owned, and then let the normal borrowing rules do the rest.
The fix
The Notional team confirmed the bug in less than an hour and upgraded the affected contracts to remove the vulnerable feature. Upgrading a contract here means replacing the running code with a version that no longer offers the risky option. Once they determined that no funds were at risk, they proceeded with a proper fix to re-enable the feature. They disabled the enableBitmapCurrency function and created a PR with a proposed fix. A PR, or pull request, is a proposed change to a code repository that others can review before it is merged.
The proposed fix states:
"This fix will re-enable the enableBitmapCurrency method to be called by accounts. The fix here is to simply remove the functionality of changing a bitmap currency on an account once it is set. This should eliminate the potential for double counting altogether. There is no valid use case for accounts changing bitmap currencies. Furthermore, once enabled a bitmap currency also cannot be disabled."
Reading that in plain words: the team did not try to patch the counting logic itself. They removed the ability to change the bitmap currency after it has been chosen. If the bitmap can never move, the stale entry can never be created, and the double count becomes impossible. They also note that nobody legitimately needed to switch bitmap currencies anyway, so removing the option costs users nothing. The same rule applies to switching it off: once on, it stays on.
For the discovery, 0x60511e57 was paid the maximum reward for the finding: one million dollars plus an additional 100,000 NOTE tokens.
Similar things to look for elsewhere
These are general lessons drawn from the bug, written so that a newcomer can follow the reasoning.
- Bitmap or set changes after activation. On any protocol with an opt-in asset set, try switching the active set after populating balances. A positive result is a collateral or balance figure that counts the same asset in both the old and new structures. In other words: fill your account first, then change the mode, and see whether the old record is cleaned up.
- Deposit paths that write to a secondary index. Look for deposit or transfer functions that add an asset to a tracking list only under a condition (for example, "not the active bitmap currency"). A positive result is an asset appearing in two tracking structures at once. The pattern to spot is a rule that says "add it here only if it is not already there", because such rules often forget the case where it is added somewhere else later.
- Repeated activation calls. Call the activation function twice with different arguments and inspect the stored account context. A positive result is a stale entry that is never cleared. This is the direct test for the bug in this report: switch a setting twice and check whether the first value lingers.
- Borrow against inflated collateral. After any suspected double count, attempt to transfer out or borrow roughly twice the deposited value. A positive result is a transaction that succeeds without the account being flagged as under-collateralised. This turns a suspicion into proof: if the platform lets you take double, it believes you have double.
- Cross-account realisation. Move the resulting claim to a second account and convert it through a market, as in step 7, to confirm the inflated position can be turned into the underlying asset. This checks whether the inflated number can actually be cashed out, which is what separates a harmless display glitch from a real loss.
Glossary
- Account action contract: the part of Notional that handles account-level actions such as enabling features.
- accountContext: the record the platform keeps for each account, including its active currencies.
- activeCurrencies: the list inside an account's record of currencies currently marked as active.
- Array: an ordered list of items, like numbered slots.
- Asset bitmap: a compact way of storing which currencies an account holds, as a row of on/off switches.
- Attacker contract: a small program written by a researcher that performs an attack automatically.
- Bitmap Portfolio: Notional's opt-in portfolio mode that stores held assets as a bitmap.
- Blockchain: a shared public ledger kept by many computers, which no single party controls.
- Brownie: a tool for writing and running tests against Ethereum contracts in Python.
- cToken: a receipt token from Compound representing currency deposited there, such as cDAI for DAI.
- Calling a function: asking a named block of code to run.
- Collateral: assets pledged as security for a loan.
- Critical: the highest severity rating for a security flaw.
- DAI: a cryptocurrency designed to stay close in value to the US dollar.
- Deposit: putting money into the platform.
- depositUnderlyingToken(): the function used to deposit a currency into an account.
- Dummy currency: a placeholder currency chosen only to satisfy a check.
- enableBitmapCurrency: the account action function that turns on bitmap mode for a chosen currency.
- enableBitmapForAccount(): the internal function that carries out bitmap activation.
- ETH: Ethereum's own cryptocurrency, used by Notional as the common yardstick for collateral.
- Ethereum: a public blockchain on which Notional runs.
- fCash: Notional's transferable token representing a claim on a positive or negative cash flow at a future date.
- fCash Markets: the markets where fCash tokens are traded and interest rates emerge.
- Fixed-term: having an agreed end date, like a bond.
- Flags argument: an extra value passed to a function to select a mode of operation.
- Fork (local blockchain fork): a copy of the blockchain's state run on your own machine for safe testing.
- Free collateral: the collateral an account holds beyond its minimum requirement, measured in ETH; positive means it can borrow more, negative means it can be liquidated.
- Function: a named block of code that does one job.
- Governance-tunable parameters: limits that the people running the protocol can adjust.
- Immunefi: a platform where companies pay researchers for reporting security flaws.
- isActive: a true/false value meaning "mark this as active".
- Liquidation: seizing and selling collateral to repay an under-collateralised loan.
- Liquidity: the pool of funds available in a market to be borrowed or withdrawn.
- Logic issue: a flaw in the reasoning of the code rather than in a lock or a password.
- Mainnet-fork: a local copy of the real blockchain network.
- Market maker: a trader who constantly offers to buy and sell, providing liquidity.
- MAX_BITMAP_ASSETS: the maximum number of fCash assets a bitmap portfolio can store.
- NOTE: Notional's own token, used in part of the reward.
- Overcollateralised: having pledged more collateral than a loan is worth.
- Proof of concept (PoC): a runnable demonstration that a flaw is real.
- PR (pull request): a proposed code change that others can review before it is merged.
- setActiveCurrency(): the internal helper that records which currency is active for an account.
- Smart contract: a program that lives on the blockchain and runs automatically when sent a transaction.
- Stablecoin: a cryptocurrency pegged to a stable value such as the US dollar.
- Token: a digital unit of value recorded on the blockchain.
- Transaction: an instruction sent to the blockchain to make something happen.
- Underlying token: the actual currency behind a position, such as DAI or USDC.
- Under-collateralised: having pledged less collateral than a loan requires.
- USDC: a stablecoin pegged to the US dollar.
- Whitehat: a researcher who finds flaws and reports them to the owner instead of exploiting them.