Scroll Coin Flip
Coin-Flip game deployed to Scoll zk-EVM
Created on 10th June 2023
•
Scroll Coin Flip
Coin-Flip game deployed to Scoll zk-EVM
The problem Scroll Coin Flip solves
I wanted to to deploy fully usable dApp (smart contract + UI + MetaMask) to Scroll and test what are the limitations compares to standard EVM.
Challenges I ran into
The biggest challenge appeared to be the secure source of randomness.
First, I wanted to try PREVRANDAO opcode but then I found out it doesn't work in Scroll.
Then, I wanted to implement Redstone FInance's randomness Oracle which didn't work either. I was getting "ECDSA: invalid signature" error. This error doesn't seem to be related to Scroll however. Was getting it also on Goerli testnet with RedStone example contract with no custom chages.
Another way around this issue could be using Chainlink VRF V2, but that's not supported on Scroll (according to docs) and I didn't have time tro try.
So right now I am generating rundom number simply as a Keccak has of block timestamp, which is not secure because validators can cheat.
Tracks Applied (1)
Community, Activism & Accessibility
Technologies used
Cheer Project
Cheering for a project means supporting a project you like with as little as 0.0025 ETH. Right now, you can Cheer using ETH on Arbitrum, Optimism and Base.
