sherlock-audit / 2023-12-arcadia-judging

19 stars 15 forks source link

Topmark - Incomplete flashAction by Creditor Manager due to missing Implementation #212

Closed sherlock-admin closed 9 months ago

sherlock-admin commented 9 months ago

Topmark

medium

Incomplete flashAction by Creditor Manager due to missing Implementation

Summary

Incomplete flashAction by Creditor Manager due to missing Implementation in the flashAction (...) functiom of the AccountV1 contract

Vulnerability Detail

function flashActionByCreditor(address actionTarget, bytes calldata actionData)
        external
        nonReentrant
        notDuringAuction
        updateActionTimestamp
 >>>       returns (uint256 accountVersion)
    {
... 
accountVersion = ACCOUNT_VERSION;
}

The function above shows how flash action is a handled by the creditor through the flashActionByCreditor (...) Function, the problem is that when the manager is to handle this flash action, account version is not put into consideration even though it is a necessity and is required for adequate consistency in the AccountV1 contract

function flashAction(address actionTarget, bytes calldata actionData)
        external
        onlyAssetManager
        nonReentrant
        notDuringAuction
        updateActionTimestamp
    {
... 
}

Impact

Incomplete flashAction by Creditor Manager due to missing Implementation in the flashAction (...) functiom of the AccountV1 contract

Code Snippet

https://github.com/sherlock-audit/2023-12-arcadia/blob/main/accounts-v2/src/accounts/AccountV1.sol#L796 https://github.com/sherlock-audit/2023-12-arcadia/blob/main/accounts-v2/src/accounts/AccountV1.sol#L623

Tool used

Manual Review

Recommendation

Arcadia Protocol should make necessary adjust ment in the flashAction(...) Functiom to ensure account version is also updated where necessary when this function is called to ensure consistency in Arcadia Protocol

sherlock-admin2 commented 9 months ago

1 comment(s) were left on this issue during the judging contest.

takarez commented:

invalid

nevillehuang commented 9 months ago

Invalid, no issue presented here, the normal flashAction is not meant to be used by the creditor (and also cannot be used by it)