Try solaVip at link
Inspiration
I have been an active member on Tron Network for a long time and really like the Dice game on Wink.org link platform. It is the largest and most active gaming app on Tron Blockchain. I have an idea of making similar game on different blockchain and Solana is a perfect fit because of the fast TPS and strong community.
What it does
We currently have only 1 game, basically, you select a number from 0 to 99 and make a prediction bet if the random number generated by the platform is OVER or UNDER your selected number. If you are right, you win. The payout depends on the multiplier factor of each number and bet option you selected. For example, if you bet 1 Sol on OVER 4, and you win, you will get 1.0368 Sol. But if you bet 1 Sol on OVER 98, and you win, you will get 98.5 Sol.
VIP Token is standard fungible token can be gained just by playing on the SolaVIP platform. By using SOL to play games on the SolaVIP platform, players will be able to gain VIP no matter if they win or lose. By freezing VIP users will be able to receive VIPdrops (SOL). 30% of platform profit are for VIPdrops pool. (this work is in progress and will be available in Mainnet)
SolaVIP LP Token is a standard fungible token on the SOLANA blockchain. When someone adds liquidity in SOL into our game pool, they will get SolaVIP LP Token in return. LP Token Owners can lock SolaVIP LP Token to earn more VIP token in our staking program. (this work is in progress and will be available in Mainnet)
SolaVIP LP Token price = Total Game Pool Balance / SolaVIP LP Token Total supply
When the platform is making profit, SolaVIP LP Token price will be greater than 1. When the platform is in loss, SolaVIP LP Token price will be less than 1
How we built it
We built the contract program from scratch using Rust and for the front-end we use dapp-scaffold as template to boost the speed.
Challenges we ran into
There are several challenges we run into, the first one must be How to create a provably fair randomness while ChainLink VRF is not available? Its a big challenge and we came up with an idea using future BlockHash technique: Each slot on Solana blockchain contains a unique BlockHash and it is near impossible to know what the BlockHash of a future slot is. When a player places a bet at current slot, we wait for at least 5 future slots to 'finalized' and use the slot's unique BlockHashes with user account as seed to generate a random number. Anyone can enter Solana Account and slot number to check the Random Number generated by our platform. In this Devnet version, the public can trigger the settle contract call for a bet. In Mainnet, it will be called by our operator account only. We will continue to improve and harden our method before mainnet.
Secondly, programming on Rust and Solana Smart Contract (Program) is really harder than I used to do on Solidity and EVM-based blockchain. I think the reason might be Rust is a new language and not very popular like Javascript-based language. Also, working with Solana Program means working at low level programming where you have to count every byte and bits to optimize the program.
Accomplishments that we're proud of
I managed to learn Solana and master it in very short time to deliver the game just less than a month working part-time at spare night time.
What we learned
Technically a lot of experience learn on Solana Blockchain tech and Rust through out the build of the platform. The front end and back end need to optimize for better user experience. Also the contract program needs Audit to secure user liquidity.
What's next for SolaVIP
We are looking to raise capital ($500K from private sale at $0.001 each VIP token and $1M from public sale at $0.002 each VIP token) to bring the platform to Mainnet and be one of the most popular gaming platform on Solana. We will build up the team, get the code audited and release the platform with a growing ecosystem in Solana network.
Log in or sign up for Devpost to join the conversation.