Hi all, tl;dr I’d like to ask a couple of questions related to 256 unit in the context of DeFi and blockchain analytics.
I learned some basics of solidity before outside of my current job on my own interest but I’m not working in the blockchain space so don’t understand the full picture of how solidity, EVM all works together. Recently for my work (an open source database project) we received a feature request on GitHub from someone who works on a DeFi project, and the person asked for full arithmetic support of 256-bit integer data type, since he’s working on some analytics (price simulation, etc.) and want to visualize 256-bit integer (from EVM) without losing precision. According to that specific user, it’s quite a common problem in DeFi projects but since I don’t know too many who works on projects like this, I come here to get some extra opinions / help. Based on my current research, it seems like it’s because EVM only returns 256-bit uint by default and same for integer in smart contract storage, do I understand it right? And, is it very important for DeFi developers to be able to do arithmetic operations and visualization of 256-bit integers? Or do you have other approaches to tackle the problem when building a DeFi project? I’m also interested in learning, what other occassions (outside of DeFi use case) you would need this kind of ability, and how wide spread this problem is.
Sorry for the long text. Appreciate any help / thoughts. Thanks! 🙏
Oct 27, 2022, 11:22 AM