Skip to content

Purpose of deadline in 5-t-swap-audit #249

Answered by EngrPips
trashpirate asked this question in Q&A
Discussion options

You must be logged in to vote

Hello, in a Decentralized exchange, price is controlled by demand and supply, and as time goes on, the demand and supply drive the price of the tokens in the pool. So if you wanted to swap 1 token A and based on the current price of the pool, you are supposed to get 5 token B. If you don't have the deadline parameter and for on reason or the other your trade got delayed till some later time in the future you might end up getting 2 token B for your 1 token A or even less. The same is the situation for deposit too but your shares of the pool LP is affected in that scenario. Please ask question if anything is confusing

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@trashpirate
Comment options

@EngrPips
Comment options

@trashpirate
Comment options

@EngrPips
Comment options

Answer selected by trashpirate
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants