Pyth EntropySecure On-Chain Randomness

Build secure smart contracts with provably random numbers from Pyth Entropy. Launch NFTs, games, and other unique experiences that your users trust with seamless UX.

Entropy
954314998
0

FAST & RELIABLEUncompromisingUser Experience

Entropy delivers randomly generated outcomes at lightning-fast speeds. With Entropy, your app can serve unpredictable experiences quickly and smoothly. Entropy also guarantees reliable, responsive callbacks to keep your app running.

Secure & TransparentBuild Trust withVerifiably Random Outcomes

Strong security guarantees with minimal trust assumptions ensure that outcomes are tamper-proof. Generated outcomes by Entropy can be verified on the blockchain at any time.

Developer FriendlyIntegrate Quickly and Seamlessly

Integrating with Entropy takes just a few lines of code between your smart contract and frontend. Launch your app in 5 minutes — no funding or complicated configuration required.

contract Foo is IEntropyConsumer {
  // Entropy Address on Optimism
  IEntropy private entropy = IEntropy(0xdF21D137Aadc95588205586636710ca2890538d5);
  address private entropyProvider = 0x52DeaA1c84233F7bb8C8A45baeDE41091c616506;

  function requestRandomNumber(bytes32 userRandomNumber) external payable {
      uint256 fee = entropy.getFee(entropyProvider);

      uint64 sequenceNumber = entropy.requestWithCallback{value: fee}(
          entropyProvider,
          userRandomNumber
      );
  }

  function entropyCallback(
      uint64 sequenceNumber,
      address,
      bytes32 entropyRandomNumber
  ) internal override {
      emit RandomNumber(entropyRandomNumber);
  }
}

Get Started withPyth Data

Unlock the full potential of your DeFi app with Pyth data. Gain the edge you deserve.