Skip to content

EulerSwap solvency check - #372

Merged
duncancmt merged 25 commits into
dcmt/eulerswapfrom
e1Ru1o/eulerswap-insolvency-check
Jul 28, 2025
Merged

EulerSwap solvency check#372
duncancmt merged 25 commits into
dcmt/eulerswapfrom
e1Ru1o/eulerswap-insolvency-check

Conversation

@e1Ru1o

@e1Ru1o e1Ru1o commented Jul 21, 2025

Copy link
Copy Markdown
Member

No description provided.

@e1Ru1o
e1Ru1o requested a review from duncancmt July 21, 2025 10:13
@e1Ru1o e1Ru1o self-assigned this Jul 21, 2025
@e1Ru1o
e1Ru1o changed the base branch from master to dcmt/eulerswap July 21, 2025 10:13
@e1Ru1o
e1Ru1o force-pushed the e1Ru1o/eulerswap-insolvency-check branch from a8eece9 to 22e3117 Compare July 21, 2025 11:13

@duncancmt duncancmt left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tests look good, but I am concerned that they still passed given the confusion between units of underlying and of vault shares. Before fixing that, please add a unit test that fails due to this confusion and then demonstrate that the new test passes after the bug is fixed

Comment thread src/core/EulerSwap.sol Outdated
Comment thread src/core/EulerSwap.sol Outdated
Comment thread src/core/EulerSwap.sol Outdated
Comment thread src/core/EulerSwap.sol Outdated
Comment thread src/core/EulerSwap.sol
Comment thread src/core/EulerSwap.sol Outdated
Comment thread src/core/EulerSwap.sol Outdated
Comment thread src/core/EulerSwap.sol Outdated
Comment thread src/core/EulerSwap.sol Outdated
Comment thread src/core/EulerSwap.sol Outdated
@e1Ru1o
e1Ru1o requested a review from duncancmt July 22, 2025 21:53
Comment thread src/core/EulerSwap.sol Outdated
(, debt) = oracle.fastGetQuotes(debt, debtVault.fastAsset(), unitOfAccount);
// multiply by 1e4 to avoid divisions when adjusting LTVBorrow bps of collaterals.
// All amounts in EulerSwap are lower than uint112 so there should not be overflow errors.
// Debt is not LTV adjusted. LTV is in basis points. By multiplying the debt bt 10_000,

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo, bt 10_000

@duncancmt
duncancmt merged commit 0321999 into dcmt/eulerswap Jul 28, 2025
2 checks passed
@duncancmt
duncancmt deleted the e1Ru1o/eulerswap-insolvency-check branch July 28, 2025 16:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants