-
Notifications
You must be signed in to change notification settings - Fork 3
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
Whales can block token outflows from FundingManager
#147
Comments
Why in any world would somebody willingly deposit funds in the RebasingFundingManager to just "deny" (Which isnt even the case if other funds lie around) the workflow |
Hey @FHieser, appreciate the judging work!
but I do understand the limitations of this attack as it requires the |
Hey @0xfuje thanks for the explanation. |
Of course, you are welcome! Sorry if the initial submission wasn't clear enough |
Github username: @0xfuje
Twitter username: 0xfuje
Submission hash (on-chain): 0x41ef6d3310294b21dd45f69db24297ec9da819f4d32eabdaeb9f0e549a330f8a
Severity: medium
Description:
Impact
FundingManager
: temporary denial of service until safeguards are turned onFM_Rebasing_v1
: blocking of alltransferOrchestratorToken
calls will lead to the collateral funds be permanently unaccessible to payment modules and orchestrator adminDescription
When a whale controls a sufficiently large supply of the
issuance
tokens ofFundingManager
, it's possibly for him to block outflowingcollateral
token transfers by the orchestrator admin or payment based modules by front-runningtransferOrchestratorToken
calls with asellOrder()
orwithdraw()
call, then back-running with a deposit.Note that the regular bonding curve funding manager can install preventative measures after the first of such attack so before
transferOrchestratorToken()
calls:However the rebasing funding manager doesn't have these features so an attacker can always block
transferOrchestratorToken()
calls when he has a larger supply than the outflowing orchestrator tokens.Proof of Concept
FM_Rebasing_v1.t.sol
forge test --match-test testBlockTransfer -vvvv
Recommendation
Consider to add either or both
pause
andfee
functionality toFM_Rebasing_v1
. A high fee before outflows would make it unprofitable to execute the attack. Pause would ensure that as a last resort the orchestrator admin can pause the contract and be able to transfer funds out.The text was updated successfully, but these errors were encountered: