Vault
Check out Vault!
Inspiration
There's a lot of apps that encourage saving, investing, and trading, but all of them require using a centralized service. I wanted to build something where users could trade, see their holdings, win prizes, and more while still having full custody of their assets.
What it does
Vault is a DeFi trading competition. Users can sign up each week for a free tournament in which they can win prizes. In addition Vault NFTs can be minted which let you earn each week and act as your pass to the Vault ecosystem.
How we built it
With code?
Crypto Assets: We fetch your token balances & past trades from Eth Mainnet & Polygon to see which assets you are holding and their change over time. All this data is stored & connected to your wallet address.
Trading Competition: We allow users to enter the weekly competition with an activation code at which point we store the eth & polygon blocks at the point where you entered, the assets you hold, and the current market price of these assets. We then track trades & price changes to determine where you rank within the weekly competition and then are awarded prizes. There's also a bit of magic to maintain accurate calculations even as people add & withdraw crypto from their wallets to keep things fair.
Vault NFTs _ (on polygon) _: Winners of the trading competition can win the ability to mint Vault NFTs on polygon. Vault NFTs can be minted with MATIC or with our new ERC-20 token called Emerald (ELD). There's a job at the end of each week to determine the final placements of each participant, and then a script which automatically whitelists winners & allows them to mint Vault NFTs of various sizes.
VLT / ELD _ (ERC-20 tokens on polygon) _: VLT is the governance token for the Vault ecosystem. It gives control over the Vault DAO treasury & parameters in which prizes are awarded to Vault NFT holders as well as future developments. ELD is the currency within the Vault ecosystem which can be used to mint Vault NFTs, upgrade Vault NFTs, with more planned uses in the future.
Tech Stack
Backend: Rails Frontend: React Backend Processes: Ruby / Node Databases: Postgres / Redis Hosting: Heroku / AWS S3 APIs used: Alchemy, Covalent, Polygonscan, Coingecko, Quickswap
Challenges we ran into
All the APIs are extremely limiting in what they provide. Only covalent provides a good API to fetch all ERC-20 tokens easily on polygon. Only Alchemy had a good API that tracked ERC-20 token transfers. Only polygonscan tracked internal transactions on Polygon, and only coingecko provided good pricing information. At several points I thought I might have to just index Eth & Polygon in the entirety myself to get the information needed to make everything work. At current rate limits the project can only scale to ~10k users before we're going to have to build a custom indexing solution.
Accurately determining gain %'s of users was by far the most challenging aspect of the project partially due to the calculations required as users trade assets during the week, but more so due to the fact currently available APIs are extremely limiting.
Accomplishments that we're proud of
I like the design & feel of the app. It took several iterations to get something which feels nice where you could see your assets, rank, etc... all in a clean way that makes you want to constantly keep checking.
What we learned
Probably best to just index all the chains from the start so you don't have to deal with expensive & limited APIs. Would be far more upfront work, but it's likely going to be needed eventually anyway and is a constant pain when building out dApps that rely on on-chain information.
What's next for Vault
Marketing & Growth, we just launched the beta version where users can win tokens, Vault NFTs, and whitelist spots. The intention is to spend the next month or so collaborating with other projects to grow our reach at which point we will conclude the beta period and officially launch the real versions of Vault NFTs, VLT (governance token), ELD (currency token)
Check out for the docs for full information for the planned future of Vault!
Built With
- alchemyapi
- amazon-web-services
- coingecko
- covalent
- heroku
- node.js
- polygonscan
- postgresql
- quickswap
- react
- redis
- ruby
- ruby-on-rails
Log in or sign up for Devpost to join the conversation.