Flash loans violate two common intuitive assumptions.
1. "Nobody has that much ETH"
Problems can arise when for example:
Your contract uses a non-linear formula with an ETH amount as parameter
Your contract relies on nobody having more than a certain amount of ETH to prevent integer overflow
2. The balance of an address (and ETH received from an ...
Generally speaking, if your system gives the users different terms under different scenarios, then you need to remember that a user can issue a flash-load attack on it.
For example, if your pool gives the users a better conversion-rate when the pool is deeper (higher reserve balances), then a user can attack it by executing atomically:
Add liquidity and ...
There is nothing secret in Ethereum blockchain. So, yes, it would be an extremely bad idea to store password there.
Even if a variable is private it only means it can't be read directly by other smart contract. But everyone outside the blockchain can get the data if they want to. There are two approaches:
See what transactions the contract has received and ...
Security researchers are coming up with new and better tools all the time, so your best bet is to check the tools mentioned by ConsenSys in their Smart Contract Best Practices:
There are answers in this thread that mention tools that are no longer relevant (i.e. not supporting the ...
In each one of these functions, you can add the preliminary requirement:
require(_remainingSwapCredit == 0 || _flow.remainingSwapCredit == 0, "RSC must be reset");
Then post publicly, that whenever users "approve", they must ensure that their RSC is reset.
This will require them to execute two transactions whenever their RSC is not reset....
Your concept of "speed" is a bit wrong. Transactions which utilize less gas are not faster.
Assuming that your transaction fits inside a block the only thing which affects the transaction speed is the gas price. The size of the transaction mostly does not affect the speed. Miners mostly order the transactions they take in their blocks by their gas ...