Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BPT donations can be gamed #190

Closed
code423n4 opened this issue Feb 2, 2022 · 1 comment
Closed

BPT donations can be gamed #190

code423n4 opened this issue Feb 2, 2022 · 1 comment
Labels
1 (Low Risk) Assets are not at risk. State handling, function incorrect as to spec, issues with comments bug Something isn't working duplicate This issue or pull request already exists sponsor confirmed Sponsor agrees this is a problem and intends to fix it (OK to use w/ "disagree with severity")

Comments

@code423n4
Copy link
Contributor

Handle

cmichel

Vulnerability details

The treasury manager sometimes sends BPT to the sNOTE contract and sNOTE are a claim on the total BPT balance.

From the docs:

Notional treasury management will periodically trade Notional protocol profits into ETH in order to purchase NOTE and increase the overall BPT share that sNOTE holders have a claim on.

These profits can be stolen by frontrunning this BPT.transfer with a deposit, catching the value, initiating a startCoolDown and then redeeming after REDEEM_WINDOW_SECONDS.
This captures a share of the BPT donations.

Recommended Mitigation Steps

There are several fixes for this. All the smart contract fixes require quite some effort.
The easiest mitigation is to do the BPT donations only through a private transaction (flashbots / ethermine) so they cannot be frontrun.

@code423n4 code423n4 added 2 (Med Risk) Assets not at direct risk, but function/availability of the protocol could be impacted or leak value bug Something isn't working labels Feb 2, 2022
code423n4 added a commit that referenced this issue Feb 2, 2022
@jeffywu jeffywu added duplicate This issue or pull request already exists sponsor acknowledged Technically the issue is correct, but we're not going to resolve it for XYZ reasons sponsor confirmed Sponsor agrees this is a problem and intends to fix it (OK to use w/ "disagree with severity") and removed sponsor acknowledged Technically the issue is correct, but we're not going to resolve it for XYZ reasons labels Feb 6, 2022
@CloudEllie CloudEllie removed the duplicate This issue or pull request already exists label Feb 8, 2022
@pauliax
Copy link
Collaborator

pauliax commented Feb 16, 2022

#231

@pauliax pauliax closed this as completed Feb 16, 2022
@pauliax pauliax added 1 (Low Risk) Assets are not at risk. State handling, function incorrect as to spec, issues with comments duplicate This issue or pull request already exists and removed 2 (Med Risk) Assets not at direct risk, but function/availability of the protocol could be impacted or leak value labels Feb 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1 (Low Risk) Assets are not at risk. State handling, function incorrect as to spec, issues with comments bug Something isn't working duplicate This issue or pull request already exists sponsor confirmed Sponsor agrees this is a problem and intends to fix it (OK to use w/ "disagree with severity")
Projects
None yet
Development

No branches or pull requests

4 participants