-
Notifications
You must be signed in to change notification settings - Fork 43
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
Dynamic Rates #497
Comments
It is a tricky problem to know exactly what the end user might want. I'd come up with a full proposal on the desired behavior before implementing it. The offerID will change when you change the exchange rate, so what you really will be doing is removing the existing offer and adding a new one with the new rate. Would there need to be a barrier to prevent the maker's floating rate from dropping below some minimum value? We also might want to better understand how Chainlink is computing the price and if it is at all open to short term manipulation. We don't have an oracle for ERC20 token values, so this would have to only be for XMR/ETH swaps. |
That's true, at the same time this one seems kind of obvious;
If this could really be an issue I'm not sure about what would be the best way to go about it, maybe a minimum exchange rate parameter.
Maybe it would make sense to check uniswap's contracts to get the exchange rate between an ERC20 token and ETH (and then inferring the token/XMR with the ETH/XMR exchange rate). I think it's possible for both uniswap V2 and V3 to query a pool's exchange rate from the contracts. |
It would probably be beneficial for both makers and takers to be able to define dynamic rates, or more specifically a fee variable (a percentage, like 1.025), that would be multiplied with the last fetched price of the concerned token.
A maker ideally doesn't want to recreate an offer each time the price fluctuates a few percents up or down.
A taker looking at an offer is probably not so much interested in the exchange rate itself, but how much he is paying over current market prices.
The text was updated successfully, but these errors were encountered: