A small web application for estimating Yieldly rewards. Includes estimating for the No Loss Lottery (NLL) and YLDY Staking pages.
The app shows your share of the current rewards pool. The rewards pool increases every 30 minutes (as per Yieldly's 1st July change) and can go down when someone else claims from that pool.
Any ALGO Donations are appreciated 😊 IM6CZ4KUPWT23PKA23MW5S4ZQVF4376GWELLAL5QA5NCMB635JTRUGIDPY
Big thank you to @Tommaso on Telegram for discovering the formula for determining a user's portion of the rewards pool, which is implemented in the app and can be seen below with the related variables required.
Any global are stored in the application (contract) while any user ones are stored alongside the Algorand wallet (algoexplorer.io/addresses/{your_algo_address} -> Apps -> Connected -> Hover over 'Eye' icon)
GT: Global Time
GSS: Global Staking Shares
USS: User Staking Shares
UA: User Amount
UT: User Time
Claimable YLDY Rewards = ((USS + ((GT - UT) / 86400) * UA) / GSS) * TYUL / 1000000
The js code can also be found in the YLDYCalculations.js
file in the calculateYLDYRewardsFromDayPeriod()
method
Created using React and Vercel for hosting. Two environment variables (.env) are required, as well adjusting the config.json
file.
The repository is setup to be hosted using Vercel, used to hosted using github-pages. The develop
and main
branch are used as deployments. The develop
branch test site can be found at yldy-calc-develop.vercel.app/
The site has a small backend database that contains the global state of the Yieldly contracts, NLL (233725844) and YLDY Staking (233725850). The script runs to gather the values using the AlgoExplorer.io API and sleeps for X
amount of hours to repeat. The script can be found in ./utils/yldy-state-fetcher
The backend database is hosted using Firebase and also utilizes their API's to store and fetch the data from it.