You probably know by now that I like making lists
This one is about keeping track of Solidity libraries that are used by projects out there in the wild.
This is not an endorsement of any kind.
Unless it is mentioned specifically, OpenZeppelin haven't audited any of these libraries and you should assess their quality and extensively test your integrations with them before using them in production.
A side effect of the list is that we can discuss about including the strongest and more popular building blocks into OpenZeppelin Contracts, so they are reviewed and maintained by our community.
This is a wiki, and comments are open. Please add the libraries you have used, and let us know about your experience using them.
OpenZeppelin Contracts is a library for secure smart contract development. Build on a solid foundation of community-vetted code.
- Implementations of standards like ERC20 and ERC721.
- Flexible role-based permissioning scheme.
- Reusable Solidity components to build custom contracts and complex decentralized systems.
- First-class integration with the Gas Station Network for systems with no gas fees!
- Audited by leading security firms.
When you are looking for a library, we always recommend to search for it first in OpenZeppelin Contracts. The list below is for contracts that are not part of the OpenZeppelin library.
Math
Integer Arithmetic
math.sol
, by DappHub. Mixin for inline numerical wizardry.CarefulMath.sol
, by Compound.Math.sol
, by alianse777.SafeMathInt256
, by Augur. Int256 math operations with safety checks that throw on error.SafeMathUint256.sol
, by Augur. Uint256 math operations with safety checks that throw on error.
Floating Point Arithmetic
Multiprecision.sol
, by alianse777.ABDKMathQuad.sol
, by ABDK. Smart contract library of mathematical functions operating with IEEE 754 quadruple-precision binary floating-point numbers (quadruple precision numbers).Weird license.
Fixed Point Arithmetic
FixidityLib.sol
, by CementDAO. This library provides fixed point arithmetic with protection against overflow.
Users:- DeltaCamp's fork used by PoolTogether.
- Fork used by Celo.
SafeDecimalMath.sol
, by Synthetix. Safely manipulate unsigned fixed-point decimals at a given precision level.Exponential.sol
, by Compound. Exponential module for storing fixed-precision decimals.ABDKMath64x64
, by ABDK. Smart contract library of mathematical functions operating with signed 64.64-bit fixed point numbers.Weird license.
FixedPoint.sol
by UMA. Library for fixed point arithmetic on uints with 18 digit precision.RealMath.sol
by Macroverse.BNum.sol
by Balancer. Library for fixed point arithmetic with 18 digit precision.PRBMathSD59x18.sol
andPRBMathUD60x18.sol
by @PaulRBerg. Smart contract library for advanced fixed-point math operating with signed 59.18-decimal and 60.18-decimal fixed-point numbers.
Fractions
FractionUtil.sol
, by Celo.
Other
Trigonometry.sol
, by Matt Solomon. Solidity library with basic trigonometry functions.
Random
UniformRandomNumber.sol
, by PoolTogether. A library that eliminates modulo bias when bounding random numbers to a smaller range.Random.sol
, by alianse777. "random" numbers generator (not cryptographicaly secure).VRF.sol
, by Witnet. Verifiable Random Functions.
Bytes
BytesLib.sol
, by Gonçalo Sá. Bytes tightly packed arrays utility library for ethereum contracts written in Solidity.LibBytes.sol
, by Augur.
Arrays
Array.sol
, by alianse777.
Type conversion
UintToString.sol
, by Augur. Uint operations to convert to string.BytesToString.sol
, by Augur. Bytes operations to convert to string and remove null characters.Convert.sol
, by alianse777.
Memory
Memory.sol
, by alianse777.
Proxy
MinimalProxy.sol
by Ripio.ProxyFactory.sol
by GNOSIS.
Wallet
Multisig
MultiSigWallet.sol
, by GNOSIS. Allows multiple parties to agree on transactions before execution.
Users:GnosisSafe.sol
, by GNOSIS. A multisignature wallet with support for confirmations using signed messages based on ERC191.MultiSigWalletWithTimeLock.sol
, by 0x. Multisignature wallet with time lock- Allows multiple parties to execute a transaction after a time lock has passed.
Users:Wallet.sol
, by meteor-wallet-dapp. Multi-sig, daily-limited account proxy/wallet.MultiSigWalletWithDailyLimit.sol
, by Consensys Mesh. Allows multiple parties to agree on transactions before execution.WalletSimple.sol
, by BitGo. Basic multi-signer wallet designed for use in a co-signing environment where 2 signatures are required to move funds.WalletMultisigV2
, by Hadrien Croubois.MultiSigAdmin.sol
, by Coinbase Stablecoin. Used to add configurable multi-sig approval process to existing smart contracts.
Data Structures
LibCLL.sol
, by o0ragman0o. A Solidity library for implementing a data indexing regime using
a circular linked list.StructuredLinkedList.sol
by Vittorio Minacori.LinkedList.sol
by TechHQ.DoubleLinkedList.sol
by TechHQ.StateMachine.sol
by TechHQ.- SortitionSumTreeFactory by Kleros. Allows values to be proportionally weighted with O(log(n)) efficiency. The linked package is actually the Kleros codebase; ideally it should be extracted into its own library.
Heap.sol
by Celo. Simple heap implementation.LinkedHashMap.sol
, by AKA protocol.HitchensOrderStatisticsTree.sol
, by Rob Hitchens. A Solidity Red-Black Tree library to store and maintain a sorted data structure in a Red-Black binary search tree, with O(log 2n) insert, remove and search time (and gas, approximately).
Strings
strings.sol
by Arachnid. String & slice utility library for Solidity contracts.
Dates
BokkyPooBahsDateTimeLibrary.sol
, by bokkypoobah. A gas-efficient Solidity date and time library.
Serialization
Base64.sol
, by OpenZeppelin.JsmnSolLib.sol
, by chrisdotn.
Encoding
RLPEncode.sol
, by OMG Network.
Cryptography
TypedSignature.sol
, by dYdX. Library to unparse typed signatures.SolRsaVerify.sol
, by adria0. Verification of RSA Sha256 Pkcs1.5 Signatures.
Tokens
Voting
Voting.sol
by TechHQ.
Timelock
Timelock.sol
, by Compound.