Skip to content

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
@chechu
Copy link
Contributor

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.

4 participants