Skip to content

Latest commit

 

History

History

uniswap

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Uniswap V2 - Core (Dumb) Contracts (Rubidity Edition)

uniswap - core uniswap v2 (dumb) contracts for ruby (rubidity) for layer 1 (l1) with "off-chain" indexer

What's Solidity?! What's Rubidity?!

See Solidity - Contract Application Binary Interface (ABI) Specification »

See Rubidity - Ruby for Layer 1 (L1) Contracts / Protocols with "Off-Chain" Indexer »

What's Uniswap?! What's Facetswap?!

See the Uniswap V2 White Paper (PDF), March 2020 or the Uniswap V2 Core Contracts (in Solidity).

See the Facetswap App / Service (running Uniswap V2 contracts in Rubidity).

Usage

Available contracts include:

And so on. To be continued ...

Aside - What is the binary fixed point UQ112.112 format (used for price calculations)?

UQ112. 112 is basically an (unsigend) number that uses 112 bits for the fractional part and 112 for the integer part.

From the Uniswap V2 White Paper (on Precision):

Because Solidity does not have first-class support for non-integer numeric data types, the Uniswap v2 uses a simple binary fixed point format to encode and manipulate prices.

Specifically, prices at a given moment are stored as UQ112.112 numbers, meaning that 112 fractional bits of precision are specified on either side of the decimal point, with no sign. These numbers have a range of [0, 2^112 − 1 = 5192296858534827628530496329220096] and a precision of 1 / 2^112 = 1 / 5192296858534827628530496329220096.

Bonus - More Blockchain (Crypto) Tools, Libraries & Scripts In Ruby

See /blockchain at the ruby code commons (rubycocos) org.

Questions? Comments?

Join us in the Rubidity (community) discord (chat server). Yes you can. Your questions and commentary welcome.

Or post them over at the Help & Support page. Thanks.