Closed brozorec closed 9 months ago
The latest updates on your projects. Learn more about Vercel for Git ↗︎
lending.store
but not logic. Tried to improve this but a higher-function that returns SharedAction
type just like we pass the initial state is by far worst: types are a nightmare and we end up using any
, loosing clarity. changeChain
style functions in order to streamline the lend.store
interface, but it would end up adding complexity to our components, since they mostly expect a general interface with an AssetType
param and it would end up creating more trouble. In consequence, I added safety checks to make sure nothing bad happens. Feel free to suggest improvements.TODO
messages to remember key code that needs to be updated, going to go back to the Sdk
tomorrow and will go back once we're doneI added a checklist item to the PR, focusing on what remains to be done. I’m sure some of the items marked as done might need some work and/or tweaks.
@NikolaiYurchenko , please start working on them top to bottom -and please let me know if you spot any issues or missing code in any of the check list items.
Want to leave the description for the main issues, so I'm adding a new list with issues @NikolaiYurchenko
Just removed an item from the checklist. While in order to fully develop both positions and managing position screens we do need to be able to make at least a deposit, a lot of work can be done before then having the borrowing counterpart as example.
Added a couple of issues to the list @NikolaiYurchenko !
@brozorec we're having a problem in which...
1 - We get lending markets with sdk.getAllLendingVaults()
.
2 - User taps one. Tiggers changeAll
, which calls await sdk.getLendingVaultsFor(collateral, account)
.
Vault returned in point 1 is not found on point 2.
Is this caused by not having the right vaults deployed or is there a problem with some of the functions? I haven't found a bug so far, but 2) uses batchLoad. We should deploy vaults as soon as possible.
@brozorec had to update the batchLoad
function since it expected a chain
argument, meaning we were only able to get availableVaults
for a single chain, please have a look at the new multiBatchLoad
function.
Also, the reason we're not showing a provider icon for Optimism's lending vault is becaue we just don't have the data, this is what we have the sdk
in the allProviders
property, in batchLoad
. No name
and no llamaKey
, just depositAprBase
for one of the elements.
[
{
"depositAprBase": 0.5913637758368
},
{
"name": "Aave V3",
"llamaKey": "aave-v3",
"depositAprBase": 1.1658847850287968
}
]
@NikolaiYurchenko please have a look!
Not adding issues to the main list anymore since it was getting out of control.
https://github.com/Fujicracy/fuji-v2/assets/501915/37f954ac-8f4c-40f0-9cd8-5f1a01669414
[x] When loading /lend
directly: vaults component don't show loading state, so it seems like there's an issue
[x] When loading /lend
directly: until loading we just My deposits
, no Total supplied
[x] When loading /lend
directly: we also have Total supplied (undefined)
. Don't pay attention since I'm updating it to be consistent with borrow. More on that on a following comment.
[x] In /my-positions
, when going from borrow to lending positions, we show the loading skeletons and take a while to show the list. We actually fetch both borrowing and lending positions at the same time, so we should be able to show lending positions instantly
[x] Implement in Lending Wrapper same loading mechanism as in Borrowing Wrapper
[x] Make (!) a bit smaller when there's no total supplied amount
[x] Mix InfoBlock with the component we use in Borrowing that allows to see the edited amount ("after..."). Add the component if you want, I'll make sure to show the proper data (Federico)
[x] Update lending screen to match borrowing in that it shows title, slippage and chain the position is living in (this last one when managing) (FEDERICO)
[ ] reverted transaction error while fetching Error: missing revert data in call exception; Transaction reverted without a reason string... error={"reason":"processing response error","code":"SERVER_ERROR","body":"{\"jsonrpc\":\"2.0\",\"error\":{\"code\":-32017,\"message\":\"Timeout\",\"data\":\"Nethermind.JsonRpc.Modules.ModuleRentalTimeoutException: Unable to rent an instance of IEthRpcModule. Too many concurrent requests.
We have no way of knowing the current vault's chain when managing a lending position. We're not showing the icon as we do when borrowing. In this screenshot I'm attaching, I want to deposit from Optimism to a Polygon position. When creating the position we have the vault selection component at the top left, but now we don't (when managing a borrowing position, we show the icon above the input fields).
What should we do @Markoyw ?
Hey @ferostabio
Good point, I didn't take that into account.
At the moment, I can't think of anything better than to keep it consistent with how we are displaying on the borrowing panel.
Hey @ferostabio
Good point, I didn't take that into account.
At the moment, I can't think of anything better than to keep it consistent with how we are displaying on the borrowing panel.
I agree!
@brozorec about the
reverted transaction error while fetching `Error: missing revert data in call exception; Transaction reverted without a reason string... error={"reason":"processing response error","code":"SERVER_ERROR","body":"{\"jsonrpc\":\"2.0\",\"error\":{\"code\":-32017,\"message\":\"Timeout\",\"data\":\"Nethermind.JsonRpc.Modules.ModuleRentalTimeoutException: Unable to rent an instance of IEthRpcModule. Too many concurrent requests.
error we're getting a lot, no idea why we're getting it so many times, but it seems to be a known issue
Here are some issues:
trailing 0 when there is no position yet
double display when managing
change wording to "..., please select a different vault."
@brozorec about the
reverted transaction error while fetching `Error: missing revert data in call exception; Transaction reverted without a reason string... error={"reason":"processing response error","code":"SERVER_ERROR","body":"{\"jsonrpc\":\"2.0\",\"error\":{\"code\":-32017,\"message\":\"Timeout\",\"data\":\"Nethermind.JsonRpc.Modules.ModuleRentalTimeoutException: Unable to rent an instance of IEthRpcModule. Too many concurrent requests.
error we're getting a lot, no idea why we're getting it so many times, but it seems to be a known issue
I switched from using infura to pokt and stopped getting this error. However, I occasionally get the multicall error. I'm digging into it to try to find out its source.
Here are some issues:
On it!
Good job in pimping the UI according to the proposed design system. Here are several more issues/points:
[x] On manage position, in withdraw mode, the "Switch to CHAIN" doesn't correspond to the selected chain in "Withdraw to" dropdown
[x] On manage position, 1) the "after" label is with a neg sign when withdrawing max; 2) I suggest we remove the tooltip from "My deposits", having only the title is explicit enough
[x] When I do a x-chain deposit, 1) the "Est. cost" doesn't get populated; 2) nothing happens when clicking the deposit btn
[x] Displaying issue in the modal for lending
[x] Comment out the "Risk" section, we are not ready with the risk framework yet
[x] Replace "Current Active Provider:" by "Underlying money markets" (without the colon ":" )
[x] Fix the fonts in the "Vault Strategy" section and replace the text with the following: "Automatic interest rates optimization The vault aims to maximize the returns on its assets by seeking the highest yields available from the list of aggregated lending protocols. This strategy is best for users who are "Lenders-only". Whenever they need to borrow against their provided assets, they can switch from a lending to a borrowing vault (the migration tool will be available soon). 💡️ It's important to note that each vault aggregates its own set of lending/borrowing protocols. The protocols illustrated above may vary from one vault to another."
[x] Missing header in manage position
[x] Change column titles in "My positions" to: "Supplied Amount" and "Supply APY"
[x] add a placeholder for icons
@ferostabio @NikolaiYurchenko I fixed the fetching issues for gnosis (was a dumb typo)
@ansteadm discovered a bug: we are only showing the right supply apy
in the markets section. We're showing wrong values both in "All vaults" (inside the lending screen) and my positions list.
I already fixed a couple of issues on the positions screen and now it shows the right data, but we still have a couple of issues here on the lending screen
First, @NikolaiYurchenko , we're simply showing a string value, we need to use the same APRValue
component we use in the markets tableview row.
Second, and more important @brozorec , we don't have the data.
In the lending screen we use availableVaults to show data and here console.log(availableVaults.map((v) => v.activeProvider?.depositAprReward));
returns [0,0, undefined, null]
-when two values do have rewards.
Main tasks
Issues
Image with src "/assets/images/protocol-icons/networks/Optimism.svg" has legacy prop "objectFit". Did you forget to run the codemod? Read more: https://nextjs.org/docs/messages/next-image-upgrade-to-13
Unsupported pair
text.Known issues
https://github.com/Fujicracy/fuji-v2/assets/501915/99815b4c-7cd0-4c97-8875-b36b8054a6d4