Skip to content
Business logic Audit finding Intermediate

Blocklisted address can be used to lock the option token minter's fund

The option token contract allows the creator to set a blocklisted address as the receiver of funds. When a user mints an option and later tries to exercise it, the transfer to the blocklisted receiver fails, locking the user's funds.

Vagner Follow with berndartmueller, bin2chen and 2 others

Originally disclosed on Sherlock

Source: https://github.com/sherlock-audit/2023-06-bond-judging/issues/81

Found by

Vagner, berndartmueller, bin2chen, caventa, ctf_sec

Summary

Blocklisted address can be used to lock the option token minter's fund

Vulnerability Detail

When deploy a token via the teller contract, the contract validate that receiver address is not address(0)

However, a malicious option token creator can save a seemingly favorable strike price and pick a blocklisted address and set the blocklisted address as receiver

https://github.com/d-xo/weird-erc20#tokens-with-blocklists

Some tokens (e.g. USDC, USDT) have a contract level admin controlled address blocklist. If an address is blocked, then transfers to and from that address are forbidden.

Malicious or compromised token owners can trap funds in a contract by adding the contract address to the blocklist. This could potentially be the result of regulatory action against the contract itself, against a single user of the contract (e.g. a Uniswap LP), or could also be a part of an extortion attempt against users of the blocked contract.

then user would see the favorable strike price and mint the option token using payout token for call option or use quote token for put option

However, they can never exercise their option because the transaction would revert when transferring asset to the recevier for call option and transferring asset to the receiver for put option when exercise the option.

Solidity

the usre's fund that used to mint the option are locked

Impact

Blocklisted receiver address can be used to lock the option token minter's fund

Code Snippet

https://github.com/sherlock-audit/2023-06-bond/blob/fce1809f83728561dc75078d41ead6d60e15d065/options/src/fixed-strike/FixedStrikeOptionTeller.sol#L139

https://github.com/sherlock-audit/2023-06-bond/blob/fce1809f83728561dc75078d41ead6d60e15d065/options/src/fixed-strike/FixedStrikeOptionTeller.sol#L361

(https://github.com/sherlock-audit/2023-06-bond/blob/fce1809f83728561dc75078d41ead6d60e15d065/options/src/fixed-strike/FixedStrikeOptionTeller.sol#L378

Tool used

Manual Review

Recommendation

Valid that receiver is not blacklisted when create and deploy the option token or add an expiry check, if after the expiry the receiver does not reclaim the fund, allows the option minter to burn their token in exchange for their fund

Discussion

Oighty

Agree with this issue. Checking blocklists seems challenging to handle since they could be implemented differently. The fix mentioned in #29 , #52 , and #70 of using a pull mechanism to claim proceeds could work, but isn't a great UX from the receiver's perspective. That may be the best option though.

juntzhan

Escalate

Disagree with severity, this is not a valid high:

  1. Users should be wary of tokens they interact with;
  2. Users are able to see if receiver is blocklisted before interacting with;
  3. It's not up to option token creator to get receiver blocklisted, even if receiver did bad things, for example, only 174 address are blacklisted by USDC till now.

sherlock-admin

Escalate

Disagree with severity, this is not a valid high:

  1. Users should be wary of tokens they interact with;
  2. Users are able to see if receiver is blocklisted before interacting with;
  3. It's not up to option token creator to get receiver blocklisted, even if receiver did bad things, for example, only 174 address are blacklisted by USDC till now.

You've created a valid escalation!

To remove the escalation from consideration: Delete your comment.

You may delete or edit your escalation comment anytime before the 48-hour escalation window closes. After that, the escalation becomes final.

sherlock-admin

Escalate

This should be a valid high issue

Agree that it is possible for users are able to see if receiver is blocklisted / blacklisted before interacting with.

But an address can be not blacklisted in the first interaction (Deploy or create), and then blacklisted in the second onwards interaction (Exercise or reclaim)

which leads to transfer failure and leads to fund stuck in the contract

Yes, it is not up to FixedStrikeOptionTeller to get receiver blocklisted / blacklisted. But what we need to do is how to handle if the receiver get blocklisted / blacklisted and to prevent fund stuck in the contract

You've deleted an escalation for this issue.

ctf-sec

Users are able to see if receiver is blocklisted before interacting with;

This would be difficult for user give the current audit scope. Option creating process has nothing to do with receiver address.

plus blocklisted receiver can lock user's fund infinitely long time.

jingyi2811

Agree that it is possible for users are able to see if receiver is blocklisted / blacklisted before interacting with.

But an address can be not blacklisted in the first interaction (Deploy or create), and then blacklisted in the second onwards interaction (Exercise or reclaim)

which leads to transfer failure and leads to fund stuck in the contract

Yes, it is not up to FixedStrikeOptionTeller to get receiver blocklisted / blacklisted. But what we need to do is how to handle if the receiver get blocklisted / blacklisted and to prevent fund stuck in the contract

Oot2k

I think this is on the verge of medium and high. The worst scenario is, as mentioned above, that the receiver gets backlisted between option start and expiry. I think this is is fairly unlikely, and have not tested how easy it is to get a address blacklisted, but if this is still the case the damage is really high compared to the attack cost. I still think this is a valid high. (small attack cost, large damage)

juntzhan

There is no large damage, user's funds won't be locked because the the transaction will revert, the only problem is that user won't be able to exercise option token, but there is only 50% chance that user will try to exercise.

So I think it's fair to think this is not a valid high:

  1. Low possibility that receiver gets backlisted between option start and expiry
  2. Small damage to user if option token won't be exercised.

Oighty

We don't plan to implement a fix for this. We don't believe the increased security is worth the UX degradation. For OTLM, the user is not paying for the option token, therefore, the loss is minimal (other than opportunity cost). A bad receiver can be swapped out by the OTLM owner, or users will withdraw when they figure out that the receiver is blacklisted. If tokens are sold, a check can be made on the front-end if the receiver is blacklisted or not for specific tokens. Overall, this is an edge case as stated above. cc @0xTex

ctf-sec

We don't plan to implement a fix for this. We don't believe the increased security is worth the UX degradation. For OTLM, the user is not paying for the option token, therefore, the loss is minimal (other than opportunity cost). A bad receiver can be swapped out by the OTLM owner, or users will withdraw when they figure out that the receiver is blacklisted. If tokens are sold, a check can be made on the front-end if the receiver is blacklisted or not for specific tokens. Overall, this is an edge case as stated above. cc @0xTex

That make sense!

ctf-sec

Recommend checking #70 before resolving the escalation :)

hrishibhat

Result: Medium Has duplicates Considering this a valid medium, based on the above discussion and given the impact. This does not break core functionality, not causing irreversible damage for all users. Agree with the Sponsor comment below. Additional Sponsor comment:

If options are sold or reward to uses for some risk-taking activity and then the receiver prevents execution, then there would be some loss of value for the user in the aggregate. I personally don't think this is a high issue because it is possible to verify if this is the case before interacting with the token.

sherlock-admin2

Escalations have been resolved successfully!

Escalation status:

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

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely the contract does not check whether the receiver address is blocklisted when creating the option, and it uses a push mechanism to send funds to the receiver during exercise, which fails if the receiver is blocked.

What the attacker needed

A blocklisted address as receiver; user mints option token; user attempts to exercise

The fix

The contract should validate that the receiver is not blocklisted when creating the option token, or implement a pull mechanism for claiming proceeds, or allow the option minter to burn their token in exchange for their fund after expiry if the receiver does not reclaim.

How it was found

  1. A malicious option token creator deploys a token with a favorable strike price and sets a blocklisted address as the receiver.
  2. A user sees the favorable strike price and mints the option token using the payout token for a call option or the quote token for a put option.
  3. When the user tries to exercise the option, the transaction reverts because the transfer to the blocklisted receiver fails.
  4. The user's funds used to mint the option are locked.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

Some tokens, like USDC, can block specific addresses so they cannot send or receive the token. In this bug, the person who creates an option can set a blocked address as the receiver of the funds. When someone buys the option and tries to use it, the token transfer fails, and their money gets stuck.

What is Business logic?

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

More by Vagner

View all

7 more disclosed reports, best first.

More from Bond Options

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.