Skip to content
@chainlink-team

PowerPlay

Where Gaming, AI, and DeFi Converge.

PowerPlay

PowerPlay is a decentralized gaming and financial services platform that combines the power of DeFi, AI, and GameFi. Our goal is to provide a safe, secure, and transparent platform for users to play games, engage in gambling, and access financial services without the risk of fraud or exploitative practices.

Key Features

Social Aspect (SocialFi)

  • AI-Generated NFT Profiles: Users can create unique NFT profile pictures generated by AI based on keywords.
  • Community Leaderboard: Compete on the community leaderboard to see top players and their achievements.
  • Profile Exploration: Explore other players' profiles, recent activities, and ENS integrations.

Gaming Aspect (GameFi)

  • European Roulette: A fully functional European roulette game with various betting options.
  • Chainlink-Powered Fairness: Chainlink VRF ensures random number generation, guaranteeing fair and transparent gameplay.
  • Automated Winnings: Chainlink Automation calculates and transfers winnings to users' wallets automatically after each game.

Lending Aspect (DeFi)

  • Cross-Chain Lending: Users can deposit tokens on any supported chain as collateral to borrow LINK, facilitating seamless gameplay without selling existing holdings.
  • Real-Time Asset Prices: Chainlink Data Feeds fetch the latest asset prices for accurate collateral valuation.

How We Built It

PowerPlay was developed using a combination of Chainlink services and blockchain technologies:

  • Chainlink Functions: Used to mint NFTs on Avalanche Fuji C-Chain with DALL-E3 (Open AI).
  • IPFS Server: We built our own server to save costs and ensure smooth integration with our internal API, which stores NFTs and metadata.
  • Polygon Network: Deployed the roulette game logic for fast transaction speeds.
  • Chainlink VRF: Implemented to randomly generate winning values in the roulette game.
  • Chainlink Automation: Used to automate the roulette wheel spin, calculate winnings, and withdraw winnings to users' wallets.
  • Chainlink CCIP: Implemented Chainlink CCIP for cross-chain transfers and communication across chains to make it convenient for users and ease their struggle of jumping between chains.
  • Chainlink Data Feeds: Employed to fetch the latest asset prices for calculating the maximum borrowable amounts in the lending contract and displaying up-to-date prices on the UI.
  • Scroll: Deployed the DeFi aspect of PowerPlay on Scroll's Sepolia Testnet, leveraging its EVM compatibility to ensure seamless interaction with our smart contracts.
  • Metis: Drew inspiration from existing GameFi applications on Metis and implemented features to merge gaming with financial blockchain mechanics.
  • Polygon Cardano: Our MVP is deployed on the Polygon Cardano Testnet, featuring a functional frontend for seamless interaction with our smart contracts. This deployment leverages the scalability and compatibility of the Cardano zkEVM Testnet.
  • Polygon Amoy: The lending feature of PowerPlay is deployed on the Polygon PoS network, utilizing its high throughput and low transaction fees to revolutionize financial services within our platform.
  • Avalanche Fuji C-Chain: Deployed various aspects of PowerPlay on Avalanche Fuji C-Chain for its efficiency and robust infrastructure.

Roulette Contract

Uses Chainlink VRF and Chainlink Automation

The Roulette contract provides functionality for players to place bets, initiate the roulette spin, and receive payouts. The contract maintains a mapping of rollers, tracking who triggered each Chainlink VRF request. Chainlink VRF is integrated into the rollDice function, which requests a random number. The fulfillRandomness function is called automatically with the random result once it's ready. The payout logic is handled in fulfillRandomness. This European Roulette game covers all possible bet types (straight, split, street, corner, six line, column, dozen, red, black, high, low, even, odd), and the payout is calculated based on the respective odds of each win. Chainlink Automation is implemented when a user places a bet. The upKeep is triggered after the bet is placed to automatically roll the dice (spin the roulette wheel), calculate winnings, and withdraw them to the player's wallet.

Slot Machine Contract

Uses Chainlink VRF and Chainlink Automation

The Slot Machine contract is a simple slot game where a user bets a certain amount of ether, and if they hit the jackpot (represented by a specific random number), they win a multiplier of their bet. Future improvements will include different winning combinations, varying rewards, and a house edge.

DeFi Cross-Chain Lending

Uses Chainlink Data Feeds

The DeFi Cross-Chain Lending contract allows players to deposit MATIC as collateral on the Mumbai network or AVAX as collateral on the Fuji network to borrow LINK tokens. These lending contracts use Chainlink Data Feeds to fetch the latest price for each asset and calculate the maximum Loan-to-Value (LTV). The long-term vision for PowerPlay is to enable cross-chain gaming, allowing players to access any necessary assets for their chosen games. Future improvements will leverage Chainlink's CCIP for secure asset transfers, creating a robust lending protocol that allows gamers on both Polygon and Avalanche to seamlessly borrow assets cross-chain. This enhancement will enable players to access the resources they need without selling their assets.

NFT Minting Contract

Uses Chainlink Functions and Data Feeds

The NFT Minting contract is central to the community/social aspect of PowerPlay, allowing each player to mint their own NFT using DALL-E3 (Open AI). The mint logic incorporates Chainlink Functions, where the smart contract calls our custom API and self-hosted IPFS server to generate AI-created images based on user-provided keywords for player NFT profile pictures.

Challenges We Ran Into

  • Integration of Multiple Chainlink Services: Ensuring seamless integration of Chainlink Functions, VRF, Automation, and Data Feeds required careful planning and testing.
  • Cost Management: Developing and maintaining our own IPFS server was cost-effective but required significant initial setup and ongoing maintenance.
  • Cross-Chain Compatibility: Deploying smart contracts across multiple chains and ensuring smooth interoperability was complex and demanded thorough testing and troubleshooting.
  • DeFi Implementation: Setting up the DeFi part posed challenges, especially regarding the choice of tokens for the lending protocol.
  • Time Constraints: Limited time prevented the implementation of gasless transactions and Lens protocol integration.

Accomplishments That We're Proud Of

  • Tested, Deployed, and Verified Contracts:
  • Fair and Transparent Platform: Developed a platform that counters the exploitative practices of existing platforms.
  • Chainlink Integration: Successfully integrated multiple Chainlink services to create a robust and trustworthy system.
  • User-Friendly Interface: Created a visually appealing and user-friendly interface, making the platform accessible and engaging.

What We Learned

  • Gained extensive knowledge of Chainlink's VRF, Automation, Functions, Data Feeds, CCIP, Polygon, Avalanche, Metis, and Scroll.
  • Learned the complexities of cross-chain lending and developing a seamless user experience.
  • Emphasized the importance of clear and fair terms for user engagement.

What's Next for PowerPlay

  • Apply for Grants: Secure funding to continue development.
  • Mainnet Launch: Deploy on mainnet for broader user access.
  • User Testing: Conduct extensive user testing to gather feedback and improve the platform.
  • Promotion: Promote the product through various channels to attract users.
  • Mobile Apps: Launch Android and iOS applications for PowerPlay.
  • Unreal Engine Game: Develop advanced graphics and games using Unreal Engine.
  • New Games: Introduce new games to the platform.
  • Enhanced AI Capabilities: Improve AI for generating personalized NFT profiles.
  • Additional DeFi Features: Explore staking, farming, and yield strategies.
  • Gasless Transactions: Implement gasless transactions for enhanced user convenience.
  • Developer Support: Enable developers to build mini-games and host them on the platform.
  • Inbuilt Live Streaming: Allow players to stream gameplay within the application.
  • Token and Chain Support: Expand support to 50+ new tokens and 20+ new chains.

PowerPlay - Combining DeFi, AI, and GameFi for a Transparent and Engaging Experience

Visit

For Smart Contracts Code Visit: https://github.com/chainlink-team/smart-contracts

For Frontend Code Visit: https://github.com/chainlink-team/legendary-invention

Popular repositories Loading

  1. legendary-invention legendary-invention Public

    PowerPlay is a decentralized platform that combines DeFi, AI, and GameFi, offering secure, transparent, and fair gaming and financial services with features like AI-generated NFTs, European roulett…

    JavaScript 1

  2. smart-contracts smart-contracts Public

    This repository contains the smart contracts of PowerPlay.

    Solidity

  3. api api Public

    PowerPlay API that integrates DALL-E3 generative AI

    JavaScript

  4. .github .github Public

Repositories

Showing 4 of 4 repositories

People

This organization has no public members. You must be a member to see who’s a part of this organization.

Top languages

Loading…

Most used topics

Loading…