New answers tagged

0

Is this going to increase the price of BTC for a short time (a few seconds)? No. Flash loans are opened and terminated within the same transaction. The "time" per see is infinitely small. This guarantees the borrower does not run away with the loan. The transaction fails unless the loaned money is returned by the end of the transaction. If a user ...


1

I also propose a solution based on the block.number, which is safer than using block.timestamp, but with a different approach. Rather than using it to secure a reservation after several blocks, I would use it as an ordering criterion in case that multiple users go for the same number. When a user commits a hash, the current block number is captured in the ...


0

This should solve your issue. I added comments on the lines that I changed so you can spot them easily. Let me know if it works for your use case! contract Raffle { mapping(address => bytes32) commitments; mapping(uint256 => address) reserved; mapping(bytes32 => address) commitOwners; // ADD THIS event Reserved(uint256 value, ...


1

Depending on the oracle implementation, they may have various levels of protection, https being the topmost. But in the end, it's typically not really their job to be 100% certain of the data authenticity, since they also have no idea what the real data should be if you just give them an arbitrary URL to get data from. So an oracle just gets the data from ...


Top 50 recent answers are included