Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[VEN-2940]: Add simulations for LBTC support #434

Merged
merged 5 commits into from
Dec 5, 2024
Merged

[VEN-2940]: Add simulations for LBTC support #434

merged 5 commits into from
Dec 5, 2024

Conversation

kkirka
Copy link
Contributor

@kkirka kkirka commented Nov 28, 2024

This PR adds simulations for enabling LBTC market on Ethereum Core pool

Problem: Sometimes markets don't have huge amounts of cash available,
e.g. on sepolia there's a shortage of WETH. This makes generic checks
fail. However, it's a normal situation, especially on testnets –
WETH wraps Sepolia ETH, so people supply free faucet tokens and borrow
a token that has a higher demand.

Solution: Ensure that the borrowed amount is less than available cash
vips/vip-401/bsctestnet.ts Outdated Show resolved Hide resolved
vips/vip-401/bscmainnet.ts Outdated Show resolved Hide resolved
@chechu
Copy link
Member

chechu commented Dec 4, 2024

Problem: setDirectPrice does not directly set the returned value
of the getPrice function. Rather, it is implied that the price is
scaled by 1e18. Thus, when we call getPrice, extra zeros get
appended to the price for tokens with < 18 decimals.

Solution: Do a reverse scaling, i.e. divide by 10**(18 - decimals)
@kkirka kkirka merged commit 12b3ddc into main Dec 5, 2024
2 checks passed
@kkirka kkirka deleted the feat/lbtc branch December 5, 2024 08:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants