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

UI: When converting, ignore small ratio diffs and prioritize Season #533

Merged
merged 1 commit into from
Jul 3, 2023

Conversation

silochad
Copy link
Contributor

@silochad silochad commented Jul 3, 2023

Since LP deposits can have varying BDV, the best option for the Farmer during a convert is to increase the BDV of their existing lowest-BDV crates.

The UI currently selects crates to convert purely on the basis of this ratio. However, if the bdv/amount ratio is similar for two crates, it is optimal for the farmer to select the crate with the higher season pre-Silo V3 to minimize potential stalk loss, since older crates can't be converted into seasons less than 1.

This PR upgrades the selection function to prioritize amount/bdv ratio up to 4 decimal places. If two crates have the same ratio to 4 decimal places, the selection process sorts more recent deposits first.

@netlify
Copy link

netlify bot commented Jul 3, 2023

Deploy Preview for basin ready!

Name Link
🔨 Latest commit 9966238
🔍 Latest deploy log https://app.netlify.com/sites/basin/deploys/64a2f1f788696000082c52dd
😎 Deploy Preview https://deploy-preview-533--basin.netlify.app/
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@netlify
Copy link

netlify bot commented Jul 3, 2023

Deploy Preview for beanstalk-ui ready!

Name Link
🔨 Latest commit 9966238
🔍 Latest deploy log https://app.netlify.com/sites/beanstalk-ui/deploys/64a2f1f7dfc4e100084fc325
😎 Deploy Preview https://deploy-preview-533--beanstalk-ui.netlify.app/
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@silochad silochad merged commit bd54acc into master Jul 3, 2023
9 checks passed
@silochad silochad deleted the convert-logic-optimization branch July 3, 2023 16:46
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