4 ms·
I'm not an Ethereum expert by any stretch of the imagination, but I do know a bit about funds. This fund appears to suffer from an exploitable race condition.
by amluto 9y ago
I'm not an Ethereum expert by any stretch of the imagination, but I do know a bit about funds. This fund appears to suffer from an exploitable race condition. Suppose the owner of the fund changes the price by more than ~6% in a single transaction. Then anyone who has the power to race with the owner can buy at hte old price and sell at the new price or vice versa. Instant arbitrage!
This looks like it can probably by mitigated by changing the price in tiny steps and waiting for confirmations (slow and expensive) or by withdrawing the entire Ether balance of the fund, waiting for confirmation, changing the price, waiting for confirmation, and re-adding the balance (slow, expensive, and very very annoying).
Also, I would be amazed if this fund were not deemed a regulated security, in which case, if the operator is going to comply with securities laws, I see no benefit to using a smart contract at all.
Also, 3% fees for each transaction? Yikes!
- ScJa 9y agoHey, thanks for the feedback. Your points are definitely valid and are something that I have given some thought in the past. It seems really difficult to prevent arbitrage while still keeping the gas cost for price update low. This is one of the reasons why I defaulted at a 3% fee (which is ofc changeable as preferred), this could encourage share-holders to trade their tokens with potential buyers instead of minting/burning them. Another option could be to split the price into a "purchase-price" and a "withdraw-price" which are apart from each other to some degree. The idea by dynamically minting tokens for me was mainly to reduce the chance for a premium. Many funds in the past, like the TaaS.fund and ICONOMI have had huge premiums of 30%+, which is not ideal for either party. It will would defnitely be considered a security in the US I believe, but it was not my goal to setup a fund structure to avoid taxation. By being on the blockchain it is potentially possible to use it cross-borders.
- snissn 9y agoWhy not have a fixed fee price per transaction? Also sorry if I'm not fully understanding things
- ScJa 9y agoNo worries, we are all still new in this field. It is another approach but I think it would hurt smaller investors and still enable people will large sums to do arbitrage. Let's say the fee is 10$, if someone wanted to invest only 100$ they might think twice about it. While if the price of the fund is 1% too cheap, a big fish could simply buy shares for 100.000$ and make 990$ profit by just buying them.
- thisisit 9y agoThere is an inherent issue with market making on a blockchain. Here's my understanding of it, maybe amluto and ScJa can correct me if I am wrong. Let's say X coin is worth 1 ETH now. As we are using a decenteralized market this price is stored in the blockchain. Now, an hour later someone wants to buy X coin at 1.2 ETH. This information needs to be updated in the blockchain. But then the update has to go through confirmation etc. So till the time price is fixed, this intent is stored in the blockchain mempool. There are two issues here. The price intent is public now. And a miner can selectively delay including this price change in a block. So, if someone is able to read the intent he/she can race with the fund owner and buy the coin at 1 ETH. Once the price change happens they can now sell the coins back to the contract at 1.2 ETH.