-
-
Notifications
You must be signed in to change notification settings - Fork 2
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
How to make an automatic exchange? #6
Comments
Issue Status: 1. Open 2. Started 3. Submitted 4. Done This issue now has a funding of 0.03 ETH (5.08 USD @ $169.26/ETH) attached to it as part of the vporton fund.
|
The exchange needs to work through an API (not just in a browser). |
Issue Status: 1. Open 2. Started 3. Submitted 4. Done Work has been started. These users each claimed they can complete the work by 4 weeks, 1 day from now. 1) dawidzioor has started work. Djdnrnrkyorntn4kotnfemekjrnrkdndenirn Learn more on the Gitcoin Issue Details page. |
Issue Status: 1. Open 2. Cancelled The funding of 0.03 ETH (5.8 USD @ $193.21/ETH) attached to this issue has been cancelled by the bounty submitter
|
I remind that I have a Ethereum ERC-1155 contract with minting facility. Further you can assume full control over a currency in this contract (ability to mint and transfer it).
Need to build an automatic exchange that exchanges some other tokens (including ETH) to our tokens (that could be for example minted as needed). You can assume that the exchange rate is a fixed floating point number.
This bounty requires you to describe (without actually implementing) how the exchange would work.
I see two problems:
We cannot watch EVM events from a smart contract. So we probably need to create our own wallet under our control to which the money is transferred before we direct it to start the exchange operation. But EVM cannot create random numbers. So how to create the wallet securely?
How we give ourselves full control over that temporary wallet to be able to command it to send money? (E.g. if it is ERC-20, then the exchange could not control the token contract and so could not cause it to send the token for the exchange operation. If it is say an ERC-721 or ERC-1155, then the exchange also can't control the contract and the same trouble arises.)
Those problems are somehow solved in decentralized exchanges. Please explain how DEXes work around these and probably other problems.
Related question.
The exchange needs to work through an API (not just in a browser).
The text was updated successfully, but these errors were encountered: