{"id":34,"date":"2022-03-04T07:59:29","date_gmt":"2022-03-04T07:59:29","guid":{"rendered":"https:\/\/blogs.oregonstate.edu\/nikilnair\/?p=34"},"modified":"2022-03-04T07:59:29","modified_gmt":"2022-03-04T07:59:29","slug":"blog-post-8-2","status":"publish","type":"post","link":"https:\/\/blogs.oregonstate.edu\/nikilnair\/2022\/03\/04\/blog-post-8-2\/","title":{"rendered":"Blog Post #8"},"content":{"rendered":"\n<p>With regards to the progress of the exchange I have been working on the development of a liquidity pool contract to emulate and abstract the decentralized complexities of this application. So far I have been able to put together a simplified contract that can exchange token pairs in Wei which is a very small fraction of an ETH &#8211; Ethereum. The token pairs as of now interact with predefined sets of values and some of the advantages and disadvantages of this, is that because the values are preset I do not have to deal with floating point errors &#8211; since there are no floats in solidity &#8211; however, as one might guess the cons of this is that the user doesn&#8217;t have much freedom when it comes to choosing the quantity of the tokens the user would like to exchange. This makes it quite difficult since I have to manage not only a field of user input but accommodate the contract to not error when processing the latter. I am hoping that when larger Wei settings are added the probability of hitting a floating point number reduces significantly, however, this is something that has yet to be tested. Additionally sometimes token pairs yield floats on conversion for example 1 USDC isn&#8217;t quite 1$ but like 1.0000001 and because of this modifications must be made. I am hoping I can incorporate the latter changes to further better the user experience in the coming days. <\/p>\n","protected":false},"excerpt":{"rendered":"<p>With regards to the progress of the exchange I have been working on the development of a liquidity pool contract to emulate and abstract the decentralized complexities of this application. So far I have been able to put together a simplified contract that can exchange token pairs in Wei which is a very small fraction&hellip; <a class=\"more-link\" href=\"https:\/\/blogs.oregonstate.edu\/nikilnair\/2022\/03\/04\/blog-post-8-2\/\">Continue reading <span class=\"screen-reader-text\">Blog Post #8<\/span><\/a><\/p>\n","protected":false},"author":11756,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-34","post","type-post","status-publish","format-standard","hentry","category-uncategorized","entry"],"_links":{"self":[{"href":"https:\/\/blogs.oregonstate.edu\/nikilnair\/wp-json\/wp\/v2\/posts\/34","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blogs.oregonstate.edu\/nikilnair\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.oregonstate.edu\/nikilnair\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.oregonstate.edu\/nikilnair\/wp-json\/wp\/v2\/users\/11756"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.oregonstate.edu\/nikilnair\/wp-json\/wp\/v2\/comments?post=34"}],"version-history":[{"count":1,"href":"https:\/\/blogs.oregonstate.edu\/nikilnair\/wp-json\/wp\/v2\/posts\/34\/revisions"}],"predecessor-version":[{"id":35,"href":"https:\/\/blogs.oregonstate.edu\/nikilnair\/wp-json\/wp\/v2\/posts\/34\/revisions\/35"}],"wp:attachment":[{"href":"https:\/\/blogs.oregonstate.edu\/nikilnair\/wp-json\/wp\/v2\/media?parent=34"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.oregonstate.edu\/nikilnair\/wp-json\/wp\/v2\/categories?post=34"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.oregonstate.edu\/nikilnair\/wp-json\/wp\/v2\/tags?post=34"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}