v2-core
big.js
Our great sponsors
v2-core | big.js | |
---|---|---|
16 | 9 | |
2,808 | 4,679 | |
2.7% | - | |
0.0 | 0.0 | |
29 days ago | about 1 year ago | |
TypeScript | JavaScript | |
GNU General Public License v3.0 only | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
v2-core
-
Uniswap Deep Dive 1:
For source code, Uniswap V2 Core and Uniswap V2 Peripheral
- List of smart contracts to strengthen your Auditing skills
-
Forking Uniswap: how to edit LP fees??
Here is the Uniswap V2 on github: https://github.com/Uniswap/v2-core
-
The Depegging of UST
Eh, Curve pools and other invariant-based AMMs have some interesting properties outside traditional finance, bank runs, etc.
I'd read up on the Uniswap constant product invariant (xy=k) and consider reading the Uniswap v2 code (it's a pleasure to read) [0].
Then check out the StableSwap paper by Curve founder Michael Egorov [1]
Finally if you want a well-documented implementation to read in Solidity, check out Saddle [2]. Disclaimer, I helped write the first iteration.
[0] https://github.com/Uniswap/v2-core
-
Contract development and security for ERC20 related business
UniswapV2Pair.sol:https://github.com/Uniswap/v2-core/blob/master/contracts/UniswapV2Pair.sol
- Uniswap V2 Liquidity Pool ERC20 question
-
Error When Deploying Token Contract to TestNet?
Any of those above functions that have require statements could have triggered it. I guess that is why you suggested the "hardhats console log". I am not familiar with that and will get right on trying to get that to work. Sorry for slow response, it seems since your message I have went all up and down the entire uniswap code database that includes the router, pair, libraries, transferhelper, WETH, etc.... So I just had the most extensive crash course I have ever had. hahahaha... Thanks for pointing me in that direction. I have learned A LOT. Though I still haven't figured out why the error is happening so I will now try using the hardhats console log to debug it.
-
[ethers.js] UniswapV2Pair getReserves() function failing to resolve promise but can console log the return value?
The function comes from UniswapV2Pair.sol, shown here:
- [Uniswapv2] Overview
-
[Brownie] How can I import from config if a github repo has no releases?
For example Uniswap has 0 releases
big.js
-
Decoding Why 0.6 + 0.3 = 0.8999999999999999 in JS and How to Solve?
ii) Third-Party Libraries There are various libraries like math.js, decimal.js, big.js that solve the problem. Each library functions according to its documentation. This approach is comparatively better.
-
Working with Currency Values in TypeScript
For financial applications, APIs commonly return currency values, balances, stock/currency positions, and other amounts as strings. The best way I've found to deal with this is to use a library like big.js.
-
Working with extremely large numbers?
Just for fun, using javascript library:
-
How are you handling your money?
Another different approach maybe to have the money represented in the decimal in your database at the decimal places of the currency with the highest decimal point you are going to be dealing with for example using Decimal(n, 2) in case of fiat, and perform your calculations in arbitrary-precision Decimal type. In javascript, using libraries like Big.js , Decimal.js will be of help.
-
Made my first JavaScript project, the calculator!
With that said, using a library like big.js will solve both this and the potentially unsafe eval use:
- Ask HN: Open-source projects that handle monetary values properly
- Is there a way to monitor the price on pancake swap through an API?
-
Why is 7.9 - 5 = 2.90000004?
It will explain this weird behavior. You have to use a special lib for precise floating point math. Here is one: big.js.
What are some alternatives?
uniswap-v2-periphery - 🎚 Peripheral smart contracts for interacting with Uniswap V2 [Moved to: https://github.com/Uniswap/v2-periphery]
human-standard-token-abi - A JSON ABI for the Ethereum ERC 20 Token Standard
erc-1155 - Ethereum Semi Fungible Standard (ERC-1155)
pancake-swap-core - Core smart contracts
v2-periphery - 🎚 Peripheral smart contracts for interacting with Uniswap V2
erc20-balance - 💎 Get 2000+ ERC-20 token balances with JavaScript. Supports Node.js and Deno
revoke.cash - ❌ Revoke or update your token approvals
solidity-lib - 📖 Solidity libraries that are shared across Uniswap contracts
erc-1155 - ERC-1155: Smart Contract Sample Implementation
bsc-ecosystem - A guide to available tools, components, and platforms for developing applications on BSC.
art-gobblers - An experimental decentralized art factory by Justin Roiland and Paradigm.