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

sweeps #3165

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

ingawei
Copy link
Collaborator

@ingawei ingawei commented Nov 27, 2024

Sweepifying market wasn't updating tier. Added it in, but probably a more permanent fix is to add the tier update to the runTxn logic

Copy link

linear bot commented Nov 27, 2024

Copy link

vercel bot commented Nov 27, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

3 Skipped Deployments
Name Status Preview Comments Updated (UTC)
dev ⬜️ Ignored (Inspect) Nov 27, 2024 1:37am
docs ⬜️ Ignored (Inspect) Nov 27, 2024 1:37am
prod ⬜️ Ignored (Inspect) Nov 27, 2024 1:37am

Copy link
Collaborator

@IanPhilips IanPhilips left a comment

Choose a reason for hiding this comment

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

LGTM. Altho the real fix is making the tier a computed property based on the liquidity column like we talked about when you downgraded the tiers:

I will say I have reservations about jumping to this cached tier approach before we've tried splitting out the totalLiquidity into its own column (which is as easy as adding another line to the contract_populate_cols function) and computing the tiers on the fly (this could be a line in the contracts table, like how description_fts is calculated). If we computed the tiers on the fly, this PR would be a lot simpler SQL-wise and avoid code duplication between typescript and sql. It'd also let us experiment with different liquidity requirements by changing a few numbers in typescript rather than having to edit typescript, the sql function, and our 150k contracts every time we changed something.

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