yearn / iearn-finance Goto Github PK
View Code? Open in Web Editor NEWWeb repository
Home Page: https://v1.yearn.finance
License: MIT License
Web repository
Home Page: https://v1.yearn.finance
License: MIT License
As raised in work related to CONTRIBUTING.md
. GitHub has a standard bug report template that could be a good enough start to get this quickly up and running.
Update it so it is more like metamask when adding a ledger account. Let the user choose from both ledger live and legacy derivatives along with allowing one to scroll through their address on that path.
The current layout of the yVaults appears to be in an arbitrary order based on date added. This suggested change re-orders the yVaults to be in a logical order by importance/usage by end-user, and also groups them together by type.
Please re-arrange the order of the yVaults in this manner:
WETH: Functionally the WETH and ETH vaults do the same thing. ETH is converted into WETH so that it can be used in the MakerDAO system to mint DAI. For the end-user there is no difference between these two vaults. But for less sophisticated users, it is confusing, why are there two vaults? Some people do not know the difference between WETH and ETH, but they all are aware of the "ETH yVault". Since they both do the same thing, and in an effort to reduce redundancy and clutter. Remove the WETH vault from the web repository. I believe the yETH vault (and web repository) will accept both ETH and WETH, and if a user deposits WETH it doesn't need to wrap it since it is already wrapped.
yLINK: Please remove this vault. There is no ETA on when it will be opened, and people keep asking about it. Remove the vault from the web repository so we stop getting questions. Simiarly as above aLINK and yLINK vaults are functionally the same, if someone wants to deposit LINK they can deposit aLINK into the respective vault.
Need to review changes to window.ethereum
(I think we are covered here) and networkVersion
.
We need to be careful about potential regressions with networkVersion
as a recent change caused reverse ENS resolution to fail.
When trying to withdraw wBTC from Earn, you cannot do it. I'm trying to withdraw 0.13047559 wBTC.
Steps to reproduce it:
This PR was done to fix it but it didn't: #72
The error shown in console is:
index.ts:205 Uncaught (in promise) Error: underflow (fault="underflow", operation="BigNumber.from", value=13039999.999999998, code=NUMERIC_FAULT, version=bignumber/5.0.5)
at e.value (index.ts:205)
at e.value (index.ts:217)
at d (bignumber.ts:314)
at Function.value (bignumber.ts:218)
at r.value (number.js:13)
at array.js:41
at Array.forEach (<anonymous>)
at H (array.js:27)
at r.value (tuple.js:19)
at e.value (abi-coder.js:82)
at l.encodeParameters (index.js:140)
at index.js:531
at Array.map (<anonymous>)
at Object.h._encodeMethodABI (index.js:530)
at Object.h._processExecuteArguments (index.js:858)
at Object.h._executeMethod (index.js:883)
at store.jsx:1440
at c (runtime.js:63)
at Generator._invoke (runtime.js:293)
at Generator.next (runtime.js:118)
at n (asyncToGenerator.js:3)
at s (asyncToGenerator.js:25)
Hi,
There's currently a typo in the homepage interface in yearn.finance, in the hover-over of the vault section; it currently reads as follows:
Vaults follow a unique strategy that are designed to maximize the yield of the deposited asset and minimize risk.
The "are" is misplaced as it ought to refer to strategy. It should either be:
Vaults follow a unique strategy that is designed to maximize...
Or:
Vaults follow unique strategies that are designed to maximize..
Thank you!
Bring one of the integrations:
Currently we execute a GitHub lint action when new code is pushed to prevent invalid commit messages.
We should leverage husky and enforce commit message naming linting as a git pre-commit hook.
This will make the development process easier because commits will fail immediately if the commit message is improperly named, rather than after the commit push is attempted.
Check if rebBTC branch is still relevant https://github.com/iearn-finance/iearn-finance/commits/renBTC. Cherry pick commits or remove branch.
Suggested commit message requirements:
Requirements 1 and 2 can be enforced programmatically.
3 we may not be able to enforce.
Currently, only per vault stats are displayed. The community currently doesn't have a single source of truth for useful aggregated stats like TVL. Stats on external sources (e.g. DeFi pulse) are not 100% accurate. Until the yearn API is improved to incorporate aggregated stats, some simple client-side calcs maybe the way to go:
It should have a column for contact data, like email, Twitter and whatnot. Please don't make me install npm and who knows what else. I don't want to do this. :(
I'm hoping someone will self-assign for this and implement.
Same issue as here: yearn/ygov-finance#16
Need to setup correct Portis ID => logo, name.
Argent with walletconnect not working, was working a week ago now giving the following error "index.ts:181 Uncaught (in promise) TypeError: this.send is not a function" right after connecting and not working afterwards.
If you're a user please leave you feed back of issues in the format
{wallet used}
{which connection method: (trustwallet / walletconnect ect}
{which os: android, ios, pc, mac}
{error msg, picture if you have one}
Reference this doc somewhere in footer: https://github.com/iearn-finance/yearn-protocol/blob/develop/SECURITY.md
Repro:
Issue:
Statistics load with NaN, but Strategy details, APY, and Deposit Balance show up fine.
From the console, there seems to be a TypeError in the request to api.yearn.tools.
This only repros if you click a vault and open its drop down before the Deposit Balance and APY load.
This one is merged but doesn't work right now: #86.
Painful and probably has huge side affects (closes all PRs?) but should be done at some point.
We have already translated the whole plataform and are planing to host it in our community portal TodosUnidos.com , we believe that by implementing the plataform we could contribute with the democratization of wealth in our region , we would love very much to be able to give back to in any way posible , we as a software development house will do our best towards adding additional functionalites to the plataform and hope they could also be used by the yearn.finance
Steps to reproduce
Connect using Metamask
Select "ETH" under "I have", and put in an ETH amount under "Send amount" (e.g 1 ETH).
Click "Trade"
What happens
"Trade" buttons becomes un-clickable after clicking on it (cursor:pointer
; disappears) and error appears in console:
request.js:150 GET https://api-v2.dex.ag/trade?from=eth&to=dai&fromAmount=1&dex=best 400
asyncToGenerator.js:6 Uncaught (in promise)
i {name: "StatusCodeError", statusCode: 400, message: "400 - "{\"error\":\"Error retrieving trade\"}"", error: "{"error":"Error retrieving trade"}", options: {…}, …}
name: "StatusCodeError"
statusCode: 400
message: "400 - "{\"error\":\"Error retrieving trade\"}""
error: "{"error":"Error retrieving trade"}"
options: {uri: "https://api-v2.dex.ag/trade?from=eth&to=dai&fromAmount=1&dex=best", transform: undefined, simple: true, resolveWithFullResponse: false, callback: ƒ, …}
response: t.IncomingMessage {_readableState: b, readable: false, _events: {…}, _eventsCount: 4, _maxListeners: undefined, …}
stack: "StatusCodeError: 400 - "{\"error\":\"Error retrieving trade\"}"↵ at new i (https://iearn.finance/static/js/2.d87191b1.chunk.js:2:3173480)↵ at q.callback (https://iearn.finance/static/js/2.d87191b1.chunk.js:2:3172323)↵ at q.e.callback.t.callback [as _callback] (https://iearn.finance/static/js/2.d87191b1.chunk.js:2:3171371)↵ at q.t._callback.t.callback.t.callback (https://iearn.finance/static/js/2.d87191b1.chunk.js:2:3317790)↵ at q.s.emit (https://iearn.finance/static/js/2.d87191b1.chunk.js:2:230027)↵ at q.<anonymous> (https://iearn.finance/static/js/2.d87191b1.chunk.js:2:3330707)↵ at q.s.emit (https://iearn.finance/static/js/2.d87191b1.chunk.js:2:230027)↵ at t.IncomingMessage.<anonymous> (https://iearn.finance/static/js/2.d87191b1.chunk.js:2:3329527)↵ at Object.f (https://iearn.finance/static/js/2.d87191b1.chunk.js:2:228306)↵ at t.IncomingMessage.s.emit (https://iearn.finance/static/js/2.d87191b1.chunk.js:2:230084)↵ at M (https://iearn.finance/static/js/2.d87191b1.chunk.js:2:905327)↵ at https://iearn.finance/static/js/2.d87191b1.chunk.js:2:613983↵ at p.run (https://iearn.finance/static/js/2.d87191b1.chunk.js:2:132630)↵ at h (https://iearn.finance/static/js/2.d87191b1.chunk.js:2:132124)↵From previous event:↵ at P.L [as _captureStackTrace] (https://iearn.finance/static/js/2.d87191b1.chunk.js:2:3108307)↵ at P._resolveFromExecutor (https://iearn.finance/static/js/2.d87191b1.chunk.js:2:3138103)↵ at new P (https://iearn.finance/static/js/2.d87191b1.chunk.js:2:3131321)↵ at q.init (https://iearn.finance/static/js/2.d87191b1.chunk.js:2:3171213)↵ at q.e.request.Request.init (https://iearn.finance/static/js/2.d87191b1.chunk.js:2:3170546)↵ at new q (https://iearn.finance/static/js/2.d87191b1.chunk.js:2:3316759)↵ at s (https://iearn.finance/static/js/2.d87191b1.chunk.js:2:3175853)↵ at https://iearn.finance/static/js/main.a963f63c.chunk.js:1:275501↵ at u (https://iearn.finance/static/js/2.d87191b1.chunk.js:2:1491434)↵ at Generator._invoke (https://iearn.finance/static/js/2.d87191b1.chunk.js:2:1491187)↵ at Generator.forEach.e.<computed> [as next] (https://iearn.finance/static/js/2.d87191b1.chunk.js:2:1491791)↵ at n (https://iearn.finance/static/js/2.d87191b1.chunk.js:2:115834)↵ at s (https://iearn.finance/static/js/2.d87191b1.chunk.js:2:116037)↵ at https://iearn.finance/static/js/2.d87191b1.chunk.js:2:116096↵ at new Promise (<anonymous>)↵ at e.<anonymous> (https://iearn.finance/static/js/2.d87191b1.chunk.js:2:115977)↵ at e._getDexAgTrade (https://iearn.finance/static/js/main.a963f63c.chunk.js:1:275640)↵ at https://iearn.finance/static/js/main.a963f63c.chunk.js:1:274864↵ at u (https://iearn.finance/static/js/2.d87191b1.chunk.js:2:1491434)↵ at Generator._invoke (https://iearn.finance/static/js/2.d87191b1.chunk.js:2:1491187)↵ at Generator.forEach.e.<computed> [as next] (https://iearn.finance/static/js/2.d87191b1.chunk.js:2:1491791)↵ at n (https://iearn.finance/static/js/2.d87191b1.chunk.js:2:115834)↵ at s (https://iearn.finance/static/js/2.d87191b1.chunk.js:2:116037)↵ at https://iearn.finance/static/js/2.d87191b1.chunk.js:2:116096↵ at new Promise (<anonymous>)↵ at e.<anonymous> (https://iearn.finance/static/js/2.d87191b1.chunk.js:2:115977)↵ at e._callTrade (https://iearn.finance/static/js/main.a963f63c.chunk.js:1:275187)↵ at e.trade (https://iearn.finance/static/js/main.a963f63c.chunk.js:1:274551)"
__stackCleaned__: true
__proto__: Error
constructor: ƒ i(e,t,r,n)
__proto__: Object
Hello,
Using Android Enjin or MetaMask wallet's browser while trying to connect to a Ledger Nano for earning it throw an error message because it seem only expecting users of iearn.finance use Chrome based browser (with U2F).
So for now it seem that any use from an App browser should fail and users have to use Chrome, Firefox or any other browsers having U2F capability to be able to use your services.
Improvement suggestion:
Include a "Strategy rewards" disclaimer at the bottom of the vaults page that explain how we reward strategists. A call to action for people to write strategies for Yearn per se.
Need to update the web3-react
packages to the latest version for WalletConnect to work properly.
The Chainlink Vault is not scheduled to be re-opened any time soon, if at all. Since it will not be operational it should be removed, as it is causing confusion among end-users. Instead, they can use the aLINK vault.
Action: Remove Chainlink vault from the web repository (yVaults) page.
Notice how Total Earnings is equal to Deposits, which is around 983.36
Here is the result from using yearn.tools on this account:
{ "vaultAddress": "0x5dbcf33d8c2e976c6b560249878e6f1491bca25c", "totalDeposits": "983363199999999999999", "totalWithdrawals": "0", "totalTransferredIn": "0", "totalTransferredOut": "0", "depositedShares": "914167889107499533658", "depositedAmount": "1006254407763697324422", "earnings": "22.89120776369732442298" },
Earnings here is ~22.89120776, not the 983.36 which is shown in the UI.
@antonnell, this line of code seems like it would use the earnings. This change seems like it is deployed, do you know any reason why my earnings on the website would show up differently on the yearn UI vs the yearn.tools API?
yCrvBUSD seems to use some yVaultCheck contract at https://etherscan.io/address/0xE309978497DfC15bb4F04755005F6410CAdB4103, for withdrawals.
Here is the relevant snippet from store.jsx
{
id: 'crvBUSD',
name: 'curve.fi/busd LP',
symbol: 'crvBUSD',
description: 'yDAI/yUSDC/yUSDT/yBUSD',
vaultSymbol: 'ycrvBUSD',
erc20address: '0x3B3Ac5386837Dc563660FB6a0937DFAa5924333B',
vaultContractAddress: '0x2994529c0652d127b7842094103715ec5299bbed',
vaultContractABI: config.vaultContractV3ABI,
balance: 0,
vaultBalance: 0,
decimals: 18,
deposit: true,
depositAll: true,
withdraw: true,
withdrawAll: true,
depositDisabled: false,
lastMeasurement: 10709740,
measurement: 1e18,
price_id: 'lp-bcurve',
yVaultCheckAddress: '0xe309978497dfc15bb4f04755005f6410cadb4103'
},
If you check the tx history on this yVaultCheck contract, you can see that many withdrawAll calls fail due to slippage errors:
Here is one for example:
https://etherscan.io/tx/0x0b50ec3208f9223414ca1c7193ff8afff49ef6b5ed1b0e0ca8742f5867f51518
One user came to Discord unable to withdraw:
Eventually we figured out that the TX was going to a contract other than the yCrvBUSD vault:
Eventually the user was able to withdraw using Etherscan and the yCrvBusd contract directly:
Here is their TX on the yCrvBUSD contract that ended up succeeding: https://etherscan.io/tx/0x92997f68db47d4bb8e38d97b3b59c5430e7af7c794e5aaeb557777876c2d4354
It seems like the yVaultCheck contract is faulty at the moment and users who use the yearn.finance to withdraw may not be able to withdraw right now.
What is the purpose of this contract? Why don't we just hook the UI into calling withdraw on the yCrvBUSD contract directly?
I suspect we are seeing this error due to the way we initialize web3.
Currently we dispatch a CONNECTION_CONNECTED event in src/App.js
if window.ethereum
is available.
if(window.ethereum) {
window.ethereum.on('accountsChanged', function (accounts) {
store.setStore({ account: { address: accounts[0] } })
const web3context = store.getStore('web3context')
if(web3context) {
emitter.emit(CONNECTION_CONNECTED)
}
})
}
We cannot rely on window.ethereum
being available upon app initialization. window.ethereum
is not immediately available for mobile devices.
We need to follow Metamask's "best practices" guide and add an event listener to listen for ethereum initialization.
If we do this this may resolve some of our mobile issues.
https://docs.metamask.io/guide/mobile-best-practices.html#the-provider-window-ethereum
a link to learnyearn.finance/ currently appears in the "community" section of the yearn.finance footer. this site suffers from several issues, and thus should be considered to be removed from the set of links:
the information is stale and there is no way for the community to keep it up to date;
it was created by "bluekirby" and prominently features his branding, but he is currently in high disrepute among DeFi participants from a cross-section of communities, including an alleged 'exit scam' involving the sale of potential unregistered securities.
it includes inappropriate promotion of YFI's price and investment potential that runs directly counter to Andre Cronje's prior messaging and general community sentiment regarding how YFI should be thought about
Now that Authereum is released, the wallet integration should be updated to use the mainnet url. Currently, the url used for auth is kovan.authereum.com. It looks like this should be possible by updating the @web3-react/authereum-connector
package to 6.0.8
and configuring it to use mainnet.
Both trezor wallet models allow for an optional passphrase. The model T has the advantage that it allows entering the passphrase via the touch screen on the device itself instead of inside the browser.
It seems like we are using trezor connect version 7.0.5 in this repo which does not support typing passphrases on the device but just the browser which is not ideal from a security perspective. It has another disadvantage, which is that the passphrase also needs to be typed in for making a transaction.
I propose updating trezor connect to the latest stable version (https://www.npmjs.com/package/trezor-connect/v/8.1.14) which should resolve both mentioned issues.
Here a comparison of what can be seen in the browser when connecting with a trezor model t and passphrase enabled on yearn.finance (which uses version 7 of trezor connect):
Now that we can update yearn.finance again we should change the default branch from "y" to "develop."
y.finance should be an exact mirror of yearn.finance.
In order to accomplish this:
Logo is ready, blocked by #108.
In the accordion header it shows the vaultSymbol (also know as the yToken) but it should show the token symbol. I've uploaded a PR to fix it: #82
Some users are experiencing a high amount of slippage when utilizing DAI vault.
Previously we utilized a slippage contract to prevent excessive slippage.
We should calculate slippage on the front-end and display to the user.
We should warn the user if slippage is unreasonably high.
Hey guys, not really a bug but the current strategy column overlaps with the total value holdings column on a 13inch laptop:
Its not an issue on larger screens, but was wondering if we could fix this somehow? Maybe by just stripping away the ‘Strategy’ Prefix from each strategy? (guess that would give enough space even for 13inch screens)
ref: https://gov.yearn.finance/t/yearn-interaction-feedback-bugs/1321/6
UX Ideas, UX 2 is in continuation to UX 1 flow.
UX 1: https://docs.google.com/drawings/d/1Cybpu-k6HPwBAQxouIcv5UNjVqturl5gWj8KEccR7QI/edit?usp=drivesdk
UX 2: https://docs.google.com/drawings/d/19aBVSx-72jbzjJsLcsoD28nIvLS_O-LABJRit1pGCPo/edit?usp=drivesdk
hey @andrecronje
this.onInvest()
doesn't exist.
This is why we use typescript. Compile time errors are better than runtime errors.
Creating an optimized production build...
Treating warnings as errors because process.env.CI = true.
Most CI servers set it automatically.
Failed to compile.
./src/stores/store.jsx
Line 1328:26: Expected '!==' and instead saw '!=' eqeqeq
Line 1333:26: Expected '!==' and instead saw '!=' eqeqeq
./src/components/home/home.jsx
Line 212:25: 'location' is assigned a value but never used no-unused-vars
./src/components/apr/apr.jsx
Line 296:20: Expected to return a value in arrow function array-callback-return
Line 316:22: Expected to return a value in arrow function array-callback-return
Line 335:20: Expected to return a value in arrow function array-callback-return
Line 357:20: Expected to return a value in arrow function array-callback-return
./src/components/vault/vault.jsx
Line 727:254: Using target="_blank" without rel="noopener noreferrer" is a security risk: see https://mathiasbynens.github.io/rel-noopener react/jsx-no-target-blank
When attempting to deposit 100% of my DAI balance that has a large float value, the balance is rounded up to the nearest 8th decimal. In my case, I have a balance of 2.438169309543077043 DAI (as taken from Etherscan). When clicking my "balance" or "100%", a value of 2.43816931 (rounded up) is inserted into the earn box. When clicking "Earn", the value box is outlined in red indicating that it is more than my balance.
One potential fix would be to display the rounded value, but store the full balance in a hidden input and used it for the transaction. Right now, the only workaround seems to be to manually round down and deposit less (albeit very slightly less) than 100% of the balance.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.