project screenshot 1
project screenshot 2
project screenshot 3
project screenshot 4
project screenshot 5
project screenshot 6

C.D. Roulette

A modern variation of credit card roulette using smart contracts, the AAVE protocol, and Chainlink oracles to generate provably fair results.

C.D. Roulette

Created At

LFGHO

Project Description

Players who share an expense may choose to place a wager on a single player covering the entire bill. To initiate this, one player begins the game by specifying the number of players, the wager amount, and the recipient address for the payment.

Then players delegate credit to the game contract, and a Chainlink request is initiated. The outcome of this request determines which player will be responsible for sending the full payment amount to the designated address.

The game contract then borrows GHO against the responsible party's AAVE collateral on the Ethereum Sepolia testnet and transfers the funds. Players also have the option to use CCIP for transferring the settlement to Arbitrum Sepolia.

How it's Made

I created this game using vanilla web technologies: HTML, CSS, PHP, and JavaScript, in addition to the Web3JS plugin. For the backend development of the game, I utilized the Ethereum Sepolia Testnet.

I also integrated with the AAVE protocol using the depositETH() function from the wETH gateway contract to add collateral for a player when necessary. Additionally, the game requires players to delegate credit to the game contract so that they can mint GHO tokens against a the losing player's collateral.

Lastly, I used Chainlink VRF to ensure provably fair outcomes for each game. And I integrated CCIP to transfer GHO from Ethereum Sepolia to Arbitrum Sepolia when a player chooses to do so.

background image mobile

Join the mailing list

Get the latest news and updates