Ether Drain
Make sure that ether is not drained from a contract
Use Case
Many protocols use ether as a collateral asset. If the protocol is exploited, the attacker can drain all the ether from the protocol. Having assertions in place that prevent draining can be helpful to prevent or at the very least slow down the rate at which a protocol is drained.
Explanation
Check that the ether balance of a contract does not decrease by more than X% in a single transaction. Each individual protocol should define their own percentage based on user patterns and expected behavior.
Note: This does not prevent draining from happening, as a somewhat capable attacker would just drain X-1% of the ether in a single transaction. It’s better than nothing and if mitigation is in place it could pause the protocol on a draining attempt.