GithubHelp home page GithubHelp logo

pickle-finance / pickle-ui Goto Github PK

View Code? Open in Web Editor NEW
50.0 6.0 51.0 83.46 MB

UI to interact with the PICKLE protocol

Home Page: https://app.pickle.finance

JavaScript 1.23% TypeScript 98.47% SCSS 0.19% CSS 0.11%
nextjs typescript web3

pickle-ui's Introduction

Pickle App Frontend

Written from scratch, this will allow people to interact with the Pickle Protocol.

https://app.pickle.finance

Development

This project uses next-js behind the scenes.

yarn
yarn dev

Images

Images must be square, in PNG format. Ideally, 350x350px. Rendered images are resized as necessary and returned in optimal format (typically webp) by Next.js.

Tokens

  1. Place the image under /public/tokens folder.
  2. Name it so that it matches farm component returned from pf-core. E.g., if the farm component is named usdc, the filename will be usdc.png.
  3. Add the dominant color of the image to colors.ts. E.g. usdc: "#2775ca".

Protocols

  1. Place the image under /public/protocols folder.
  2. Name it so that it matches protocol returned from pf-core, with spaces removed and lower-cased. E.g., if the protocol is named Uniswap v2, the filename will be uniswapv2.png.
  3. Add the dominant color of the image to colors.ts. E.g. uniswapv2: "#ff007a".

Localization

The only rule to keep in mind when translating locale files is not to change the content inside <> and {} signs. Parentheses () have no special meaning and their content is meant to be translated.

For example:

// English
"yearly": "{{ percent }}% (yearly) <br /> <2>more info</2>",
// Slovak
"yearly": "{{ percent }}% (ročne) <br /> <2>viac informácií</2>",

Sometimes the order of words changes in the target language. If you need to reorder a string, make sure you also move the wrapping tags:

// English
"apy": "<strong>{{ percent }}%</strong> <1>APY/1>",
// Slovak
"apy": "<1>Ročný výnos</1> <strong>{{ percent }}%</strong>",

pickle-ui's People

Contributors

0xpenguin avatar 0xyyy avatar amatureape avatar ameliabradley avatar bcstryker avatar bigbrainbriner avatar cipioo avatar cryptokage1996 avatar eip1599 avatar janklimo avatar jdraths avatar kernelwhisperer avatar larrythecucumber321 avatar manymoneymanny avatar midaseth avatar mistermard avatar okjintao avatar psq avatar rawbdor avatar robstryker avatar sasicodes avatar theryanmiller avatar uravgdeveloper avatar yabirgb avatar zayuschka avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

pickle-ui's Issues

voting for boosts is very gas inefficient

Bayes — Yesterday at 8:22 PM

Voting is pretty wasteful - it sends every pair in the array - probably to make sure previous votes get zeroed. I was able to clear out all the other pairs and vote with way less gas
It could fetch the existing votes for the wallet addr and only set changed pairs
not a huge deal though
If gas get super expensive again, it'd be worth it

pjar 0b not able to be displayed in UI

Issue is likely caused because JAR_renCRV does not have a farm, and farms.tsx logic presents by gauge.

pjar 0c and pjar 0d are both visible but they have farms. pjar 0a is not visible but it is disabled so is not a valid data point.

Binary rounding issues on Info tab Farms table

Some of the values in the day, week and month APY columns have way too many decimal places making the table too wide to fit nicely on the screen and forcing me to scroll horizontally.

Issue is coming from pages/Info.tsx lines 211, 234 and 258 toFixed(2) method. going to look into Math.round() and other alternatives.

Column headers in the tables on the Info tab of the website could be more descriptive

Currently there are the columns Day, Week, and Month. This does not clearly equate to "APY based on performance over the past day, week, month." I think it would make sense to at least add APY to the column headers. It might also be a good idea to include a footnote on the charts to give a full description of the data in those columns.

sushi jars do not show LP fees

Sushi jars and Uniswap jars are not showing LP fees in the apy breakdown. In some cases, this can be very substantial.

Sushi's page on what these fees are does not exactly seem accurate. The fees themselves seem accurate but the percentage they have next to them seem a bit off. But even still, our UI is not showing ANY lp fees in the APR for sushi / uniswap. It's only sushi reward tokens.

Even tracing into the function that's supposed to add the daily LP fees (I think?) getSushiPairDayAPY, it doesn't seem to work the way it was expected to? After it queries the graph for the data, this is an excerpt of the result:

{"data":{"pairDayDatas":[{"pair":{"id":"0x269db91fc3c7fcc275c2e6f22e5552504512811c"},"reserveUSD":"2393641.952145832492224018925613596","volumeUSD":"106928.0678502322846893665467183976"},{"pair":{"id":"0x269db91fc3c7fcc275c2e6f22e5552504512811c"},"reserveUSD":"2504036.531082513023962311454570537","volumeUSD":"236824.672974688769003646485812937"},{"pair":{"id":"0x269db91fc3c7fcc275c2e6f22e5552504512811c"},"reserveUSD":"2347583.483670300446900031753870915","volumeUSD":"88952.49869973355941798436233027874"},{"pair":{"id":"0x269db91fc3c7fcc275c2e6f22e5552504512811c"},"reserveUSD":"2233423.003315021578083511648384892","volumeUSD":"665719.8234879982689881028503417846"},{"pair":{"id":"0x269db91fc3c7fcc275c2e6f22e5552504512811c"},"reserveUSD":"2318836.680087592009286081814761041","volumeUSD":"128671.0392579104317158532860705157"},{"pair":{"id":"0x269db91fc3c7fcc275c2e6f22e5552504512811c"},"reserveUSD":"2317505.675252081955351996230651443","volumeUSD":"95357.94792795641670875181095144785"},{"pair":

As you can see, the graph is returning different values with the same key. So the graph query must be very very wrong. But even if the query was fixed, I'm not convinced useJarsWithApyEth would be set up to handle it properly?

Anyway, this is a pretty big issue. In some cases, huge portions of the APY users can expect to earn just aren't showing at all.

User previously approved deposit to jar, now makes bigger deposit, deposit fails, no fix offered

cstampar

Today at 2:22 PM
so i went to deposit some USDC into the pYUSDC jar....a few months ago i set an approval limit when i first deposited, which i forgot about, and i was trying to deposit more than what i had approved. the pJar catches this error, but the "deposit" button just flashes to "depositing" quickly and then nothing happens. i had to figure out what the error was, with some help from you all, but the UI doesn't inform you, or give you a way to increase your approval limit, so without direct contract interaction, there is no way on Pickle to increase your spending limit so you can deposit more into a jar. I first tried calling approve() and increaseAllowance() on the pJar contract, but that was only increasing the spend limit for pUSDC, not USDC itself, so i was still limited and not allowed to deposit anymore to the jar. the solution was to go on etherscan to the USDC contract and "write as proxy" and call approve() with my eth address as owner and the pJar contract as spender, which effectively increased my USDC spend limit and i was able to deposit all that i wanted to the pJar and farm :Thumb:

my suggestion is (1) when a user tries to deposit more than they have previously approved, a message should pop up informing that the user is exceeding their approval limit (2) it should provide a button which calls the approve() function on each jars underlying token so the user can increase their limit and deposit as they please to pickle :PepePray: @Bwar @sevenz @larry the Cucumber @cipio

Support new enablement flag closing-only

pfcore added an enablement flag for closing-only (as opposed to fully disabled) so that when a jar gets disabled, it doesn't suddenly disappear and go to the inactive jar section.

renbtc not showing crv rewards (similar to steth pre strategy migration)

renbtc is showing 0% on crv rewards. A clone of the logic indicates it should be about 1.86...% This appears to be a race condition where not all resources are loaded, and by the time the crv rewards do load, the UI never gets updated. This enhances my belief that the model should be generated all at once in the background or fetched via pickle-api.

Also, the UI appears to be reloading jars and farms almost every 3 seconds, according to existing console logs.

Important excerpt here:

Debugging renCRV useJarsWithAPYEth.ts:1064:18
[{"lp":3.556766713074011},{"crv":0,"apr":0}] useJarsWithAPYEth.ts:1065:18
Post Map useJarsWithAPYEth.ts:1075:18
apr is 0 useJarsWithAPYEth.ts:1076:18
[{"lp":3.556766713074011},{"crv":0,"apr":0}] useJarsWithAPYEth.ts:1077:18
Post Map2 useJarsWithAPYEth.ts:1087:18
apr is 0 useJarsWithAPYEth.ts:1088:18
lp is 3.556766713074011 useJarsWithAPYEth.ts:1089:18
[{"lp":3.556766713074011},{"crv":0,"apr":0}] useJarsWithAPYEth.ts:1090:18
Post Compound useJarsWithAPYEth.ts:1098:18
apr is 0 useJarsWithAPYEth.ts:1099:18
lp is 3.556766713074011 useJarsWithAPYEth.ts:1100:18
total is 3.556766713074011 useJarsWithAPYEth.ts:1101:18
[{"lp":3.556766713074011},{"crv":0,"apr":0}] useJarsWithAPYEth.ts:1102:18

---------------- some time later

Debugging renCRV useJarsWithAPYEth.ts:1064:18
[{"lp":3.556766713074011},{"crv":1.8695090402250703,"apr":1.8522955112553108}] useJarsWithAPYEth.ts:1065:18
Post Map useJarsWithAPYEth.ts:1075:18
apr is 1.8522955112553108 useJarsWithAPYEth.ts:1076:18
[{"lp":3.556766713074011},{"crv":1.8695090402250703}] useJarsWithAPYEth.ts:1077:18
Post Map2 useJarsWithAPYEth.ts:1087:18
apr is 1.8522955112553108 useJarsWithAPYEth.ts:1088:18
lp is 3.556766713074011 useJarsWithAPYEth.ts:1089:18
[{"lp":3.556766713074011},{"crv":1.8695090402250703}] useJarsWithAPYEth.ts:1090:18
Post Compound useJarsWithAPYEth.ts:1098:18
apr is 1.8522955112553108 useJarsWithAPYEth.ts:1099:18
lp is 3.556766713074011 useJarsWithAPYEth.ts:1100:18
total is 5.426275753299081 useJarsWithAPYEth.ts:1101:18
[{"lp":3.556766713074011},{"crv":1.8695090402250703}] useJarsWithAPYEth.ts:1102:18

Full log below.

Debugging renCRV useJarsWithAPYEth.ts:1064:18
[{"lp":3.556766713074011},{"crv":0,"apr":0}] useJarsWithAPYEth.ts:1065:18
Post Map useJarsWithAPYEth.ts:1075:18
apr is 0 useJarsWithAPYEth.ts:1076:18
[{"lp":3.556766713074011},{"crv":0,"apr":0}] useJarsWithAPYEth.ts:1077:18
Post Map2 useJarsWithAPYEth.ts:1087:18
apr is 0 useJarsWithAPYEth.ts:1088:18
lp is 3.556766713074011 useJarsWithAPYEth.ts:1089:18
[{"lp":3.556766713074011},{"crv":0,"apr":0}] useJarsWithAPYEth.ts:1090:18
Post Compound useJarsWithAPYEth.ts:1098:18
apr is 0 useJarsWithAPYEth.ts:1099:18
lp is 3.556766713074011 useJarsWithAPYEth.ts:1100:18
total is 3.556766713074011 useJarsWithAPYEth.ts:1101:18
[{"lp":3.556766713074011},{"crv":0,"apr":0}] useJarsWithAPYEth.ts:1102:18
Jars successfully (re)loaded, Jar count: 36 2 Jars.ts:24:12
Farms successfully (re)loaded, Farm count: 31 Gauges.ts:26:12
Farms successfully (re)loaded, Farm count: 31 4 Gauges.ts:26:12
Farms successfully (re)loaded, Farm count: 38 UserFarms.ts:72:12
Farms successfully (re)loaded, Farm count: 31 Gauges.ts:26:12
Jars successfully (re)loaded, Jar count: 36 Jars.ts:24:12
Farms successfully (re)loaded, Farm count: 31 Gauges.ts:26:12
Farms successfully (re)loaded, Farm count: 38 UserFarms.ts:72:12
Jars successfully (re)loaded, Jar count: 36 Jars.ts:24:12
Farms successfully (re)loaded, Farm count: 31 Gauges.ts:26:12
Jars successfully (re)loaded, Jar count: 36 Jars.ts:24:12
Farms successfully (re)loaded, Farm count: 31 Gauges.ts:26:12
Farms successfully (re)loaded, Farm count: 38 UserFarms.ts:72:12
Jars successfully (re)loaded, Jar count: 36 Jars.ts:24:12
Farms successfully (re)loaded, Farm count: 31 Gauges.ts:26:12
Jars successfully (re)loaded, Jar count: 36 Jars.ts:24:12
Farms successfully (re)loaded, Farm count: 31 Gauges.ts:26:12
Jars successfully (re)loaded, Jar count: 36 Jars.ts:24:12
Farms successfully (re)loaded, Farm count: 31 Gauges.ts:26:12
Farms successfully (re)loaded, Farm count: 38 UserFarms.ts:72:12
Farms successfully (re)loaded, Farm count: 31 6 Gauges.ts:26:12
Jars successfully (re)loaded, Jar count: 36 Jars.ts:24:12
Farms successfully (re)loaded, Farm count: 31 Gauges.ts:26:12
Jars successfully (re)loaded, Jar count: 36 Jars.ts:24:12
Farms successfully (re)loaded, Farm count: 31 Gauges.ts:26:12
Jars successfully (re)loaded, Jar count: 36 Jars.ts:24:12
Farms successfully (re)loaded, Farm count: 31 Gauges.ts:26:12
Jars successfully (re)loaded, Jar count: 36 Jars.ts:24:12
Farms successfully (re)loaded, Farm count: 31 Gauges.ts:26:12
Jars successfully (re)loaded, Jar count: 36 Jars.ts:24:12
Farms successfully (re)loaded, Farm count: 31 Gauges.ts:26:12
Farms successfully (re)loaded, Farm count: 38 UserFarms.ts:72:12
[Fast Refresh] rebuilding hot-dev-client.js:158:24
Farms successfully (re)loaded, Farm count: 38 UserFarms.ts:72:12
[Fast Refresh] done in 1232ms hot-dev-client.js:140:16
Farms successfully (re)loaded, Farm count: 31 6 Gauges.ts:26:12
Jars successfully (re)loaded, Jar count: 36 Jars.ts:24:12
Farms successfully (re)loaded, Farm count: 31 Gauges.ts:26:12
Jars successfully (re)loaded, Jar count: 36 Jars.ts:24:12
Farms successfully (re)loaded, Farm count: 31 Gauges.ts:26:12
Jars successfully (re)loaded, Jar count: 36 Jars.ts:24:12
Farms successfully (re)loaded, Farm count: 31 Gauges.ts:26:12
Jars successfully (re)loaded, Jar count: 36 Jars.ts:24:12
Farms successfully (re)loaded, Farm count: 31 Gauges.ts:26:12
Farms successfully (re)loaded, Farm count: 38 UserFarms.ts:72:12
Jars successfully (re)loaded, Jar count: 36 Jars.ts:24:12
Farms successfully (re)loaded, Farm count: 31 Gauges.ts:26:12
Jars successfully (re)loaded, Jar count: 36 Jars.ts:24:12
Farms successfully (re)loaded, Farm count: 31 Gauges.ts:26:12
Jars successfully (re)loaded, Jar count: 36 Jars.ts:24:12
Farms successfully (re)loaded, Farm count: 38 UserFarms.ts:72:12
Jars successfully (re)loaded, Jar count: 36 Jars.ts:24:12
Farms successfully (re)loaded, Farm count: 31 Gauges.ts:26:12
Jars successfully (re)loaded, Jar count: 36 Jars.ts:24:12
Farms successfully (re)loaded, Farm count: 31 6 Gauges.ts:26:12
Jars successfully (re)loaded, Jar count: 36 Jars.ts:24:12
Farms successfully (re)loaded, Farm count: 31 Gauges.ts:26:12
Jars successfully (re)loaded, Jar count: 36 Jars.ts:24:12
Farms successfully (re)loaded, Farm count: 31 Gauges.ts:26:12
Jars successfully (re)loaded, Jar count: 36 Jars.ts:24:12
Farms successfully (re)loaded, Farm count: 31 Gauges.ts:26:12
Farms successfully (re)loaded, Farm count: 38 UserFarms.ts:72:12
Jars successfully (re)loaded, Jar count: 36 Jars.ts:24:12
Farms successfully (re)loaded, Farm count: 31 Gauges.ts:26:12
Jars successfully (re)loaded, Jar count: 36 Jars.ts:24:12
Farms successfully (re)loaded, Farm count: 31 Gauges.ts:26:12
Jars successfully (re)loaded, Jar count: 36 Jars.ts:24:12
Farms successfully (re)loaded, Farm count: 31 Gauges.ts:26:12
Jars successfully (re)loaded, Jar count: 36 Jars.ts:24:12
Farms successfully (re)loaded, Farm count: 38 UserFarms.ts:72:12
Jars successfully (re)loaded, Jar count: 36 Jars.ts:24:12
Farms successfully (re)loaded, Farm count: 31 Gauges.ts:26:12
Jars successfully (re)loaded, Jar count: 36 Jars.ts:24:12
Farms successfully (re)loaded, Farm count: 31 6 Gauges.ts:26:12
Jars successfully (re)loaded, Jar count: 36 Jars.ts:24:12
Farms successfully (re)loaded, Farm count: 31 Gauges.ts:26:12
Jars successfully (re)loaded, Jar count: 36 Jars.ts:24:12
Farms successfully (re)loaded, Farm count: 31 Gauges.ts:26:12
Jars successfully (re)loaded, Jar count: 36 Jars.ts:24:12
Farms successfully (re)loaded, Farm count: 31 Gauges.ts:26:12
Jars successfully (re)loaded, Jar count: 36 Jars.ts:24:12
Farms successfully (re)loaded, Farm count: 31 Gauges.ts:26:12
Jars successfully (re)loaded, Jar count: 36 Jars.ts:24:12
Farms successfully (re)loaded, Farm count: 31 Gauges.ts:26:12
Farms successfully (re)loaded, Farm count: 38 2 UserFarms.ts:72:12
Farms successfully (re)loaded, Farm count: 31 6 Gauges.ts:26:12
Jars successfully (re)loaded, Jar count: 36 Jars.ts:24:12
Farms successfully (re)loaded, Farm count: 31 Gauges.ts:26:12
Farms successfully (re)loaded, Farm count: 31 Gauges.ts:26:12
Farms successfully (re)loaded, Farm count: 31 Gauges.ts:26:12
Jars successfully (re)loaded, Jar count: 36 Jars.ts:24:12
Farms successfully (re)loaded, Farm count: 31 Gauges.ts:26:12
Jars successfully (re)loaded, Jar count: 36 Jars.ts:24:12
Farms successfully (re)loaded, Farm count: 31 Gauges.ts:26:12
Jars successfully (re)loaded, Jar count: 36 Jars.ts:24:12
Farms successfully (re)loaded, Farm count: 31 Gauges.ts:26:12
Jars successfully (re)loaded, Jar count: 36 Jars.ts:24:12
Farms successfully (re)loaded, Farm count: 31 2 Gauges.ts:26:12
Jars successfully (re)loaded, Jar count: 36 Jars.ts:24:12
Farms successfully (re)loaded, Farm count: 31 Gauges.ts:26:12
Jars successfully (re)loaded, Jar count: 36 Jars.ts:24:12
Farms successfully (re)loaded, Farm count: 31 Gauges.ts:26:12
Jars successfully (re)loaded, Jar count: 36 Jars.ts:24:12
Farms successfully (re)loaded, Farm count: 31 Gauges.ts:26:12
Jars successfully (re)loaded, Jar count: 36 Jars.ts:24:12
Farms successfully (re)loaded, Farm count: 31 Gauges.ts:26:12
Jars successfully (re)loaded, Jar count: 36 Jars.ts:24:12
Farms successfully (re)loaded, Farm count: 31 Gauges.ts:26:12
Jars successfully (re)loaded, Jar count: 36 Jars.ts:24:12
Farms successfully (re)loaded, Farm count: 31 Gauges.ts:26:12
Farms successfully (re)loaded, Farm count: 38 UserFarms.ts:72:12
Jars successfully (re)loaded, Jar count: 36 Jars.ts:24:12
Farms successfully (re)loaded, Farm count: 31 Gauges.ts:26:12
Jars successfully (re)loaded, Jar count: 36 Jars.ts:24:12
Farms successfully (re)loaded, Farm count: 31 Gauges.ts:26:12
Jars successfully (re)loaded, Jar count: 36 Jars.ts:24:12
Farms successfully (re)loaded, Farm count: 31 Gauges.ts:26:12
Farms successfully (re)loaded, Farm count: 38 UserFarms.ts:72:12
Farms successfully (re)loaded, Farm count: 31 4 Gauges.ts:26:12
Debugging renCRV useJarsWithAPYEth.ts:1064:18
[{"lp":3.556766713074011},{"crv":1.8695090402250703,"apr":1.8522955112553108}] useJarsWithAPYEth.ts:1065:18
Post Map useJarsWithAPYEth.ts:1075:18
apr is 1.8522955112553108 useJarsWithAPYEth.ts:1076:18
[{"lp":3.556766713074011},{"crv":1.8695090402250703}] useJarsWithAPYEth.ts:1077:18
Post Map2 useJarsWithAPYEth.ts:1087:18
apr is 1.8522955112553108 useJarsWithAPYEth.ts:1088:18
lp is 3.556766713074011 useJarsWithAPYEth.ts:1089:18
[{"lp":3.556766713074011},{"crv":1.8695090402250703}] useJarsWithAPYEth.ts:1090:18
Post Compound useJarsWithAPYEth.ts:1098:18
apr is 1.8522955112553108 useJarsWithAPYEth.ts:1099:18
lp is 3.556766713074011 useJarsWithAPYEth.ts:1100:18
total is 5.426275753299081 useJarsWithAPYEth.ts:1101:18
[{"lp":3.556766713074011},{"crv":1.8695090402250703}] useJarsWithAPYEth.ts:1102:18
Jars successfully (re)loaded, Jar count: 36 Jars.ts:24:12
Farms successfully (re)loaded, Farm count: 31 3 Gauges.ts:26:12
Jars successfully (re)loaded, Jar count: 36 Jars.ts:24:12
Farms successfully (re)loaded, Farm count: 31 Gauges.ts:26:12
Jars successfully (re)loaded, Jar count: 36 Jars.ts:24:12
Farms successfully (re)loaded, Farm count: 31 Gauges.ts:26:12
Jars successfully (re)loaded, Jar count: 36 Jars.ts:24:12
Farms successfully (re)loaded, Farm count: 31 Gauges.ts:26:12
Jars successfully (re)loaded, Jar count: 36 Jars.ts:24:12
Farms successfully (re)loaded, Farm count: 31 Gauges.ts:26:12
Farms successfully (re)loaded, Farm count: 38 UserFarms.ts:72:12
Jars successfully (re)loaded, Jar count: 36 Jars.ts:24:12
Farms successfully (re)loaded, Farm count: 31 Gauges.ts:26:12
Farms successfully (re)loaded, Farm count: 38 UserFarms.ts:72:12
Farms successfully (re)loaded, Farm count: 31 6 Gauges.ts:26:12
Jars successfully (re)loaded, Jar count: 36 Jars.ts:24:12
Farms successfully (re)loaded, Farm count: 31 Gauges.ts:26:12

Polygon farms are displaying very low pickle rewards, not accurate

Polygon farms are displaying very incorrect values for pickle rewards on the merged jar/farm page.

Take jar as an example, polyjar 7a:

minichef is 0x20B2a3fc7B13cA0cCf7AF81A68a14CB3116E8749
polyjar 7a is 0xC8450922d18793AD97C401D65BaE8A83aE5353a8
lp token is 0x3324af8417844e70b81555A6D1568d78f4D4Bf1f
https://polygonscan.com/address/0x20B2a3fc7B13cA0cCf7AF81A68a14CB3116E8749#readContract

picklesPerSecond is 7692307690000000 which is really .007692307690000000
pool 12 has lp token equal to polyjar 7a's jar address
pool 12 has allocPoint allocPoint uint64 : 10
total alloc points are 130. 10/130 = .0769
poolPicklesPerYear = poolShareOfPickles * ONE_YEAR_IN_SECONDS * picklePerSecond
= 0.07692307692307693 x 60 x 60 x 24 x 365 x 0.00769230769 = 18660
So this pool gets 18,660 pickles per year
pickles per year times pickle-price divided by farm size
18660 x 10.37 / 40277.80753853763 = 4.8 which is 480%

The accurate farm rewards for this jar are 480% based on current deposits.

The UI displays 178%.

image

The offending code is below. It tries to "uncompound" the various APRs. This is wrong on a bunch of levels. First, LP fees should not be uncompounded because they were never compounded. Second, farm rewards should not be uncompounded because they were never compounded.

    const tooltipText = [
      `Base APRs:`,
      ...APYs.map((x) => {
        const k = Object.keys(x)[0];
        const v = uncompoundAPY(Object.values(x)[0]);
        return `${k}: ${v.toFixed(2)}%`;
      }),

Fixed code would be:

    const tooltipText = [
      `Base APRs:`,
      ...APYs.map((x) => {
        const k = Object.keys(x)[0];
        const v = (k === 'pickle' ? Object.values(x)[0] : uncompoundAPY(Object.values(x)[0]));
        return `${k}: ${v.toFixed(2)}%`;
      }),

This is a pretty significant issue.

Possible to tickle the graph on harvest events?

Is it possible to have thegraph tickled on tsuke harvests instead of being required to wait for deposits / withdraws? If it's technically possible at all, it might definitely be worth the effort.

User tracking not implemented correctly

In this snippet

pickle-ui/pages/_app.tsx

Lines 103 to 115 in 4f9397a

Canny('identify', {
appID: '603cf06a10aac45a5b355b04',
user: {
// Replace these values with the current user's data
email: user.email,
name: user.name,
id: user.id,
// These fields are optional, but recommended:
avatarURL: user.avatarURL,
created: new Date(user.created).toISOString(),
},
});

user is undefined so it always throws an error, sometimes causing issues.

DILL (vePICKLE) dashboard for governance participants

DILL: the Tangiest Governance Dashboard

Prize Bounty

6,050 DAI

Challenge Description

This challenge is about creating an informative, dynamic, and intuitive dashboard for the users of DILL, the vote-locking mechanism by which $PICKLE token holders can participate in our DAO governance.

DILL (also known as vePICKLE) is a non-tradeable token that decays linearly. If you're familiar with Curve's CRV DAO token and it's veCRV vote-locked counterpart, the governance mechanism will be very familiar. In short, DILL gives 3 benefits to Pickle holders:

  • voting rights in the Pickle DAO, including the all-important Farm weights that allocate which of our jar products get $PICKLE emissions and how much.
  • a boost for the locking wallet, in how much $PICKLE they earn when using a Farm themselves.
  • a percentage of the revenue generated by the Pickle protocol (currently 45%), distributed weekly.

Our DILL participants lock in order to get these benefits (particularly the revenue-sharing) and so they share similar questions: "What will the revenue sharing be next week?", "How many DILL existed at the beginning of this week?", "What was the revenue x weeks ago? What's the trend?". We want these and other DILL questions to be answered for them in a single place within our app.

Submission Requirements

A valid submission consists of a dashboard that integrates seamlessly into our app's current design, UI, and UX. Once you push your code, our CI/CD (Vercel) will take care of the build. Please include a demo with your PR/submission.

Feel free to include any and all information you would feel to be relevant if you were a DILL vote-locker, a PICKLE holder potentially thinking of locking for DILL, or just a noob to Pickle trying to understand the utility of the governance token. Some suggestions (in no particular order):

  • DILL locked now
  • DILL eligible for rewards next distribution
  • historic distributions of PICKLE
  • PICKLE per DILL on last distribution
  • dollar per DILL on last distribution
  • implied APR (non-compounding)
  • daily protocol earnings
  • daily protocol earnings rolling average for the week
  • predicted PICKLE per DILL next distribution
  • predicted dollar per DILL next distribution
  • predicted APR (non-compounding) next distribution
  • APY (self-compounding, weekly, net of assumed gas cost)

The following resources should help with the challenge:

Judging Criteria

The deadline for submissions will be Tuesday, 11 May, 2021 at 1AM GMT.

Our whole team will judge each submission and choose the best one as the winner, which we will merge into our application. We will judge the submission based on:

  • the relevance of the information included in the dashboard, from the point of view of the user segments described in the requirements.
  • the visual appeal and intuitiveness of the dashboard, its ease of use.
  • how the dashboard fits into the overall app as it relates to harmonious UI/UX.

The winner will receive the full Prize Bounty. We reserve the right to provide honourable mentions in case there other worthy submissions that miss out on winning narrowly.

Winner Announcement Date

We will announce the winner at the latest 24 hours after the submission deadline, i.e. Wednesday, 12 May, 2021 at 1AM GMT or before.

For more info, please:

Jar and Farm Voting percent doesn't clear when jar/farm is unselected

Currently, when voting on which jars and farms should get a certain percentage of the total boost vote available (100%) if you select a jar/farm and give it 5% of the vote, then unselect that jar, the 5% is still attributed to that jar/farm and you must locate it, change the percent to 0 and then go about your business.

It would be best if the percent you typed cleared when a jar/farm is unselected from the dropdown select element to increase ease of use for voters.

View Contract functionality from the farms

Would you be open to a small pull request to add a link to the contract from the farms?
Something like the below. It's not critical & I'm not offended if you don't want it. Just thought it was nice to have. In the below screenshot you'll see the "View Contract" link I added, which links to the Etherscan representation of each contract:
image

pickle-eth farm provides no link / guidance for finding the right LP

silencio: On the farm page, for UNI PICKLE/ETH there isn't a link, but I've seen people get tripped up trying to create an LP themselves. A couple of have come into support asking why they can't deposit
bwar — the issue as i see it is that the farms assume the jar was the pre-step. pickle-eth is unique and so might need a ui override where it looks more like a jar or links to the underlying LP.

Dill page innefficient, could avoid 20+ http requests?

const getWeeklyIncome = async () => {

In an attempt to get the weekly revenue projections, the dill page first accesses https://stkpowy01i.execute-api.us-west-1.amazonaws.com/prod/protocol/pools to get a list of jars + farms and their apy.

This response includes the following:

identifier    "alcx-eth"
liquidity_locked    26180312.73
apy    175.25

The apy listed here matches the 3-day-farm apy from https://stkpowy01i.execute-api.us-west-1.amazonaws.com/prod/protocol/jar/alcx-eth/performance

The dill page then iterates through these assets and runs a separate request to the above performance url in order to fetch the 3-day JAR apy (which is NOT included in the original request). The number of requests done here is equal to the number of jar assets that were returned in the first request. The dill page then does math on this to get the revenues.

These 20+ requests could be completely avoided if prod/protocol/pools returned both the 3-day farm apy AND the 3-day jar apy.

DILL feedback on commit 5e6f6a8

List of items to work on per feedback from @mannyreimi88 in https://hackmd.io/XByWjrBhTCeXUa2zvJmxbw for PR #6.

Group 1 - assigned to @0xkoffee

  • on /dill, the actual DILL received upon locking does not reflect the estimates on the UI. The calculation should be fixed.
  • on /dill, radio button option should be given for extending lock time
  • on /dill, ensure that locking period on UI cannot exceed max imposed by contract (4 years)

Group 2 - assigned to @larrythecucumber321

  • on '/gauge, consider/apply the UI changes suggested by @mannyreimi88

Smart network switching

Switching from main net to polygon correctly tells metamask to switch networks. When switching back, it just tells us to do it ourselves.

image

Bad. Need Fixie.

Uniswap links default to v3

Several sushi deposit links don't work

Several sushiswap jars have deposit links that no longer work. They all start with https://exchange.sushiswapclassic.org/#/add

The redirects that occur link to a generic swap interface (not add) with only eth pre-loaded in the dropdown.

Farms are stuck in loading state indefinitely

image

Checking the console logs,

[Error] Fetch API cannot load https://cloudflare-eth.com/ due to access control checks.
[Error] Failed to load resource: Origin https://app.pickle.finance is not allowed by Access-Control-Allow-Origin. (cloudflare-eth.com, line 0)

This is on Safari

Pickle Pulse chart on Info/Stats page is basically useless

As the chart currently exists, it is useless. Many lines have the same color, making them indistinguishable from each other. In addition there are far too many lines to easily see what is going on and lastly there are some data anomalies showing what appear to be negative values or something like that.

Localization checklist

Here's a list of files we're working with. I'll use it to track progress of which ones are i18n-ready (all strings fetched from locale files).

For future reference, output of:

find ./components ./features ./pages -type f -exec stat -f "- [ ] \`%N\`" {} \;
  • ./components/TokenIcon.tsx
  • ./components/Brining.jsremoved
  • ./components/JarValueChart.js
  • ./components/EarnRow.js
  • ./components/ThemedTable.js
  • ./components/DayPicker.tsx
  • ./components/JarPerformanceChart.js
  • ./components/Support.jsremoved
  • ./components/SelectPeriod.tsxremoved
  • ./components/PercentageInput.tsx
  • ./components/Dashboard.jsremoved
  • ./components/InfoCardContent.js
  • ./components/PickleIcon.tsx
  • ./features/Footer/Footer.tsx
  • ./features/Prices/Prices.tsx
  • ./features/Connection/types.d.ts
  • ./features/Connection/MobileNetworkIndicator.tsx
  • ./features/Connection/Web3Modal/index.js
  • ./features/Connection/Web3Modal/useEagerConnect.js
  • ./features/Connection/Web3Modal/ConnectorItem.tsx
  • ./features/Connection/Web3Modal/Web3Modal.tsx
  • ./features/Connection/Web3Modal/Connectors.ts
  • ./features/Connection/DesktopNetworkIndicator.tsx
  • ./features/Connection/MobileConnect.tsx
  • ./features/Connection/DesktopConnect.tsx
  • ./features/Zap/DepositZap.tsx
  • ./features/Zap/tokens.tsx
  • ./features/Zap/useBalance.ts
  • ./features/Zap/useInfoAPYs.tsremoved
  • ./features/Zap/useExitToToken.tsremoved
  • ./features/Zap/Info.tsxremoved
  • ./features/Zap/Deposit.tsxremoved
  • ./features/Zap/ExitToToken.tsxremoved
  • ./features/Zap/Withdraw.tsxremoved
  • ./features/Zap/useZapper.tsx
  • ./features/Zap/ExitToJar.tsxremoved
  • ./features/Zap/useFarmBalances.tsremoved
  • ./features/Zap/getAPYTooltip.tsxremoved
  • ./features/Zap/farms.tsremoved
  • ./features/Zap/useExitToJar.tsremoved
  • ./features/Zap/constants.ts
  • ./features/Zap/useDeposit.tsremoved
  • ./features/InfoBar/InfoBar.tsx
  • ./features/MasterchefV2/MC2Farm.tsx
  • ./features/Farms/UseMigrate.ts
  • ./features/Farms/SummaryCard.tsxremoved
  • ./features/Farms/FarmList.tsx
  • ./features/Farms/FarmCollapsible.tsx only used on old-farms page
  • ./features/Collapsible/Expand.tsx
  • ./features/Collapsible/useRealShape.ts
  • ./features/Collapsible/Collapse.tsx
  • ./features/Collapsible/withDefaults.ts
  • ./features/Collapsible/CollapseIcon.tsx
  • ./features/Collapsible/CollapseContext.ts
  • ./features/MiniFarms/MiniFarmList.tsx
  • ./features/MiniFarms/MiniFarmCollapsible.tsx
  • ./features/MiniFarms/JarMiniFarmCollapsible.tsx
  • ./features/Balances/Balances.tsx
  • ./features/Balances/usePendingPickles.ts
  • ./features/Balances/useBalances.ts
  • ./features/TopBar/TopBar.tsx
  • ./features/TopBar/Logo.tsx
  • ./features/TopBar/NavItems.tsx
  • ./features/Gauges/VoteCollapsible.tsx
  • ./features/Gauges/BProtocol.tsx
  • ./features/Gauges/GaugeList.tsx
  • ./features/Gauges/useJarData.ts
  • ./features/Gauges/JarGaugeCollapsible.tsx
  • ./features/Gauges/SummaryCard.tsxremoved
  • ./features/Gauges/GaugeChartCollapsible.tsx
  • ./features/Gauges/GaugeInfo.js
  • ./features/Gauges/GaugeCollapsible.tsx
  • ./features/DILL/Balances.tsx
  • ./features/DILL/Claim.tsx
  • ./features/DILL/CalcCollapsible.tsx
  • ./features/DILL/FeeDistributionsChart.tsx
  • ./features/DILL/Lock/IncreaseTime.tsx
  • ./features/DILL/Lock/Withdraw.tsx
  • ./features/DILL/Lock/IncreaseAmount.tsx
  • ./features/DILL/Lock/CreateLock.tsx
  • ./features/DILL/Lock/LockDurationChart.tsx
  • ./features/DILL/DillStats.tsx
  • ./features/DILL/DILL.tsx
  • ./features/DILL/Interaction.tsx
  • ./pages/index.tsx
  • ./features/PickleFarms/BalFarm.tsx
  • ./pages/info.tsx
  • ./pages/_document.tsx
  • ./pages/info/jars.js
  • ./pages/info/earn.js
  • ./pages/info/stats.js
  • ./pages/dill.tsx
  • ./pages/_app.tsx
  • ./pages/farms.tsx
  • ./pages/old-farms.tsx

stop losing users bc number not go up

Users don't see a ratio or a pending-harvest number go up at all. IF market is crab market, user is confused, pull all money, scared.

Now, solution:
image

Add pending harvest indicator for connected wallet

When I connect my wallet to the pickle site
I want to see my share of pending harvests that involve jars and farms I have deposited or staked money in
So that I can determine how much money is coming my way from that harvest.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.