-
Notifications
You must be signed in to change notification settings - Fork 1
Feedback [210408] Victor 1
For example, we have 4 tokens in the portfolio of our smart contract, say the top ones from here https://etherscan.io/tokens based on their market caps: BNB, Tether USD, Uniswap and Chainlink. Does this means that the value of one index token is the average value (for the sake of simplicity) of those 4 portfolio tokens? In other words, If an user buys 1 index token, the contract is supposed to get the current price of all porfolio tokens and then charge the user at the average of those prices, isn't it?
Yes, assuming the distribution of the investments are equal (25% each), then the value of the index token would be 25% * each of the 4 components. The current price could be queried via Uniswap oracle.
Can users sell back their index tokens to our smart contracts? The selling price would be the average price of all porfolio tokens at that current point in time, is this correct? If yes, what if the contract does not have enough Ethers to pay the users?
Imo this is an optional feature, depending on if you want to implement it. One-way (buying) would be enough for a proof of concept. But the Selling price would indeed be the average. The edge case, that is that the contract does not have enough Ether, should not happen. Index Token Sell -> Smart Contract Sell underlying token for ETH -> ETH payout. It could be good to draw a sequence diagram for these processes, then we can discuss them in a call, and you could add it to the master thesis? Example:

In the last 2 days, I have also done some research on oracles, especially on ChainLink and Oraclize (now Provable). From there, I see that there are 2 types of oracles: centralized and decentralized. From what we discussed earlier that we want to build our own oracle contract and oracle node, meaning we tend towards the centralized option with a dedicated server acting as oracle node running on some cloud provider. Is this still what we are planning to do? I'm asking because I find that using Provable to call the API of ITSA might be a better solution since the fees are pretty low according to what I read compared to the costs we have to bare if we would run and manage one or many oracle nodes ourselves or through cloud provider, not to mention the data integrity and authenticity that those oracle services have to provide. But I think this is a subject for further discussions in future meetings, and surely I will need to do a case study to compare the possible options for the oracle part. For now, I will try to use Provable to be able to get API data into our index token smart contract first, then we will integrate our self-made oracle component into the big picture later on after the index token part has been sorted out.
Generally, leveraging Provable is a very good idea and can save time. Can you elaborate a bit (1-2 slides) how the architecture with Provable could look like? Regarding oracle centralization vs. decentralization, for the sake of simplicity in this PoC a centralized oracles is fine. Furthermore: Also the source of data (ITSA) is centralized, i.e. a decentralized oracle does not add value if the original source of data is centralized. This is one of the key challenges: Blockchain technology adds value, but then the whole stack has to be decentralized. This is a very(!) valuable point for your discussion section in the master thesis: When does decentralization add value, and what if one part of the stack is centralized? In which scenarios is this still fine (i.e. trusted or audited data provider)?
Regarding the API from itsa.global, I'm having a difficult time to explore it since it does not provide any documentation (as far as I have searched for). So far, I've been able to retrieve token info from the API for single tokens, like this one https://itin.itsa.global/v1/QVYPTT104, but I still don't have any idea how to retrieve the list of tokens for the selection of portfolio tokens for the smart contract. It would be a great help if you could link me to the API documentation of ITSA. Thank you in advance.
Did you already receive a documentation?