Skip to content

Refuse LiFi quotes below the deposit minimum - #235

Closed
ahmedhamedaly wants to merge 1 commit into
masterfrom
fix/quote-below-deposit-min
Closed

ahmedhamedaly wants to merge 1 commit into
masterfrom
fix/quote-below-deposit-min

Conversation

@ahmedhamedaly

Copy link
Copy Markdown
Contributor

a lifi swap deposits its output, or its input on refund, into accounting. if either is below accounting's min deposit it can never be credited, so refuse the quote

Closes #177

raise ValueError("Swap size exceeds LiFi routing limit")
# The LP deposits the output into Accounting, or the input when the swap
# refunds, and Accounting never credits a deposit below its minimum.
minimums = (await (await get_swap_lp_privana_client()).get_deposit_address(

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I don't see why this check is needed. Min swap amount for LiFi was already set in #232. And on Privana side, minimum deposit check should be disabled for the swap service anyway.

@ahmedhamedaly

Copy link
Copy Markdown
Contributor Author

closing, covered by the lp whitelist in oasisprotocol/privana#359

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Swap: Sequence 3: amounts below the deposit minimum are never credited

2 participants