Skip to content

fix: exclude configured mints from liquidation & repair WSOL rebalancing#97

Open
k0beLeenders wants to merge 2 commits into
mainfrom
fix/rebalancer-mint-exclusion
Open

fix: exclude configured mints from liquidation & repair WSOL rebalancing#97
k0beLeenders wants to merge 2 commits into
mainfrom
fix/rebalancer-mint-exclusion

Conversation

@k0beLeenders

Copy link
Copy Markdown
Contributor

No description provided.

@k0beLeenders k0beLeenders requested a review from IliaZyrin as a code owner June 4, 2026 07:27
@railway-app railway-app Bot temporarily deployed to eva / production June 4, 2026 18:01 Inactive

@IliaZyrin IliaZyrin left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Love the simplification of only relying on the wallet and not needing a MarginFi account.

Just one small comment to discuss.

Comment thread src/rebalancer.rs
} else if value < min_value {
info!("The value of {} tokens is lower than set threshold: {} < {}. Will buy ${} worth of tokens.", mint, value.to_num::<f64>(), min_value.to_num::<f64>(), min_value.to_num::<f64>());
mint_to_value.insert(mint, min_value);
// Buy only the shortfall to reach min, not the full min_value.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

It was intentionally buying the whole min_value to have some buffer on top of it, to not immediately having to buy it again if any liquidation spends it.

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