×
Grow Open Source Bounties Hackathons Grants Quests Kudos

Gitcoin is a community of 39,102 amazing open source developers working remotely to build in Web3.

• Justin@gititgoroFor Ethereum programmers, dealing with fractional units can be quite tricky since the EVM doesn't have floating point representation. It requires knowledge of a subset of computation called fixed point arithmetic. If you don't keep it in mind, your orders of magnitude will be thrown out dramatically.Fortunately, some people have done the hard work so you don't have to. In particular see MakerDAO's Pot.sol contract. This is the contract responsible for running the Dai Savings Rate. In it, are some helper functions that you can both borrow and learn from. There's also a simple, low gas way to calculate compound interest on deposits. If you're getting into coding for DeFi, I'd strongly recommend this contract as your first stop:https://github.com/makerdao/dss/blob/master/src/pot.sol #mentormakerdao/dssDai Stablecoin System. Contribute to makerdao/dss development by creating an account on GitHub. https://github.com/makerdao/dss