EtherMium is an advanced decentralized exchange that offers the security of a decentralized exchange combined with the performance of a centralized exchange.
When depositing funds, you are sending your money to a smart contract. The smart contract securely stores your funds. No one can access your funds except you. Storing your funds on the smart contract is as safe as storing them in your wallet.
When you place an order on the exchange, you are signing a message that is then verified by the smart contract to make sure that you have initiated the operation. The same thing happens for withdrawals. To withdraw funds from the exchange, you must sign a message confirming the token and the amount you wish to withdraw. The contract will verify your signature and throw an error if it is not correct.
The contract uses the trade() function to perform trades between two users. The function receives two orders (a buy and a sell order), checks the signatures of both orders as well as the prices and performs the transfer of balances from one user account to the other if everything checks out.
How is communication with the contract performed?
Trades and withdrawals are sent to the contract by our server. Once you trade an existing order, a trade is recorded on our servers and forwarded to the blockchain. No one else can trade the order unless it still not filled. This way all trades are instantly known, allowing for a "centralized"-like experience when using the exchange without compromising the security.
What happens if our servers go offline?
We have provided an escape hatch in case our servers go down for any reason. You can manually withdraw your funds from the smart contract after a certain number of inactivity blocks have passed. At this point, the inactivity period is set to 10 000 blocks which are roughly two days. You will be able to withdraw all your funds manually by interacting directly with the contract (no website required) after this period passes from your last operation. Detailed instructions on this procedure can be found here.