Aspect | Traditional | ZKP |
---|---|---|
Credential Exposure | Password sent over wire (HTTPS mitigates). | Secret never leaves client—proofs only. |
Server Breach | Hashed passwords stolen → Offline cracking (bcrypt slows this). | Stored hash stolen → Useless without secret (preimage resistance). |
Replay Attacks | Mitigated by tokens expiring or nonces in OAuth. | Nonce per proof—replay blocked. |
MITM | HTTPS protects; plaintext password risk if TLS fails. | HTTPS still needed; proofs leak less info. |
Trusted Setup | None—simple crypto (SHA, bcrypt). | ZK-SNARKs need trusted setup—leak risks forgery. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ChainLink Upkeeper Before call the drawRandomNumbers() in performUpkeep: https://automation.chain.link/sepolia/115547471504265190820073408386005706024884462340762188193737203657165225971911 | |
// the VRF subscription that only can call drawRandomNumbers() get response when its call from this contract, Not from the diamond : https://vrf.chain.link/sepolia/8857 | |
// Full Code Of the contract : 0x44d2bec3a28fa0524a8e65cfe739f7f25dc0a8ea | |
// SPDX-License-Identifier: MIT | |
pragma solidity 0.8.17; | |
import {CalculateWinners} from "./libraries/CalculateWinners.sol"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// SPDX-License-Identifier: MIT | |
pragma solidity 0.8.17; | |
import "@chainlink/contracts/src/v0.8/interfaces/VRFCoordinatorV2Interface.sol"; | |
contract VRF2 { | |
event VrfRandomNumber(uint256 randomNumber, uint256 _vrfTimeSet); | |
uint256 public lastRN; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// SPDX-License-Identifier: MIT | |
pragma solidity 0.8.17; | |
interface ILink { | |
function allowance(address owner, address spender) | |
external | |
view | |
returns (uint256 remaining); | |
function approve(address spender, uint256 value) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pragma solidity ^0.8.4; | |
| |
import "@openzeppelin/contracts/access/Ownable.sol"; | |
import "https://github.com/immutable/imx-contracts/blob/main/contracts/IMintable.sol"; | |
import "https://github.com/immutable/imx-contracts/blob/main/contracts/utils/Minting.sol"; | |
| |
abstract contract Mintable is Ownable, IMintable { | |
address public imx; | |
mapping(uint256 => bytes) public blueprints; | |
|