Platform: Code4rena
Start Date: 06/06/2023
Pot Size: $60,500 USDC
Total HM: 5
Participants: 50
Period: 8 days
Judge: gzeon
Id: 246
League: ETH
Rank: 27/50
Findings: 1
Award: $54.53
🌟 Selected for report: 0
🚀 Solo Findings: 0
🌟 Selected for report: libratus
Also found by: 0xcm, BRONZEDISC, Co0nan, Go-Langer, Madalad, MiniGlome, QiuhaoLi, T1MOH, Toshii, Udsen, ernestognw, flacko, joestakey, minhquanym, n1punp, rvierdiiev, sces60107
54.5276 USDC - $54.53
Missing Ether Transfer to LlamaExecutor Contract in ExecuteAction Function
The executeAction
function in the Llama contract fails to transfer Ether to the LlamaExecutor
contract when calling the execute
function. This is a critical oversight, as it means that the LlamaExecutor
contract does not receive the intended Ether amount during the function execution, even though the value
parameter suggests otherwise.
The missing Ether transfer may cause LlamaExecutor
's execute
function to fail, particularly in cases where a call
operation is performed and the LlamaExecutor
contract does not have sufficient Ether balance. This could lead to transaction failures and disrupt the correct execution of the contracts, potentially impacting users' funds or operations.
The code can be found in the executeAction
function of the Llama contract:
// Execute action. (bool success, bytes memory result) = executor.execute(actionInfo.target, actionInfo.value, action.isScript, actionInfo.data);
In this function, executor.execute
is being called with actionInfo.value
, but no Ether is actually sent to the LlamaExecutor
contract.
executeAction
function to send Ether to the LlamaExecutor
contract during the execute
function call. This could be done by using the {value: actionInfo.value}
syntax during the function call.execute
function in the LlamaExecutor
contract is marked as payable
, enabling it to accept the transferred Ether.execute
function to verify that the correct amount of Ether has been received.ETH-Transfer
#0 - c4-pre-sort
2023-06-19T11:11:30Z
0xSorryNotSorry marked the issue as duplicate of #255
#1 - c4-pre-sort
2023-06-19T11:13:22Z
0xSorryNotSorry marked the issue as not a duplicate
#2 - c4-pre-sort
2023-06-19T11:15:59Z
0xSorryNotSorry marked the issue as duplicate of #247
#3 - c4-judge
2023-07-02T10:20:26Z
gzeon-c4 changed the severity to 2 (Med Risk)
#4 - c4-judge
2023-07-02T10:27:29Z
gzeon-c4 marked the issue as satisfactory