Closed aleph-v closed 1 year ago
The Manual Sweeper shouldn't receive ETH as part of the process as it should just allow a tx code to be passed in. This sweeper would assume that the sweeping would be done externally and this would just provide reference to the external sweep. For example, if we were to sweep OTC, then we may just link to the tx.
My understanding was that by excluding the receive
function from the contract, it would revert if ETH was attempted to be sent. I will create a test suite to check this and will also make this more explicitly clear in the description of the contract.
My understanding was incorrect and confirmed through test suite, as you'd said, that ETH could be sent. I've added this check to prevent it and written tests around the logic.
A PR for this issue has been added here: https://github.com/FloorDAO/floor-v2/pull/37
The manual sweeper is called by the treasury contract with an amount of eth which is set by the sweep execution trigger. The manual sweeper function contains no way to retrieve this eth and so if it is called the ETH is burned.