-
Notifications
You must be signed in to change notification settings - Fork 14
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
Fuse fixed accounting #10
base: fuse-reactive-audit
Are you sure you want to change the base?
Conversation
This reverts commit a35a047.
This reverts commit 36b83a2.
must set runs to 0 to compile
This reverts commit 21e9d21.
…al/compound-protocol into fuse-fixed-accounting
Something to check before we merge this: need to make sure that there is now way to game the protocol / exploit something during the upgrade, ie between the first and second transactions. |
you could deploy a contract that does all calls atomically |
Flashbots would also work. Yea. |
Hmm, I wouldn't risk it with flashbots as the block can be uncled and then txs are in mempool. It is very rare but I have seen frontruns on txs sent to flashbots due to this issue. |
Actually a great point |
You can use uncle protection to prevent this. You can do a |
by first and 2nd transactions you mean the 1st and 2nd upgrades? They'll be executed atomically through fuseAdmin's callPool(arbitrary logic) anyway so I don't think this'll be an issue. Also don't see how anything could be gamed but maybe I'm missing something. |
describe("CEtherDelegateTempExploitAccounting", function () { | ||
it("Should merge the attacker's supply and borrow balances", async function () { | ||
// Enable using 0 gas price | ||
await hre.network.provider.send("hardhat_setNextBlockBaseFeePerGas", ["0x0"]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be done in a before hook, not in the test itself
require(accrueInterest() == uint(Error.NO_ERROR), "!accrue"); | ||
|
||
// Get secondary accounts from data | ||
(address[] memory secondaryAccounts) = abi.decode(data, (address[])); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please ignore my previous comment.
Just a heads up: yarn lint
currently throws on this line - not sure why exactly.
No description provided.