Skip to content

Instantly share code, notes, and snippets.

@0xAnon101
Last active September 1, 2022 03:30
Show Gist options
  • Save 0xAnon101/279522ea5586c6cd87d5dbe368156733 to your computer and use it in GitHub Desktop.
Save 0xAnon101/279522ea5586c6cd87d5dbe368156733 to your computer and use it in GitHub Desktop.
pragma solidity ^0.8.0;
interface IFlashLoanEtherReceiver {
function execute() external payable;
}
contract SideEntranceLenderPool {
// ...
function deposit() external payable {
balances[msg.sender] += msg.value;
}
function withdraw() external {
uint256 amountToWithdraw = balances[msg.sender]; // withdraw to sender
balances[msg.sender] = 0; // make sender balance 0
payable(msg.sender).sendValue(amountToWithdraw);
}
// ...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment