Purpose of deadline
in 5-t-swap-audit
#249
-
Could someone explain more in detail what the reasoning is behind having a |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
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 |
Beta Was this translation helpful? Give feedback.
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 fordeposit
too but your shares of the pool LP is affected in that scenario. Please ask question if anything is confusing