Skip to content
Augur
DocsReference / Contracts

Contracts

The functions and events of AugurAnchor and AugurRouter, plus the Robinhood Chain addresses Augur trades against and reads prices from.

Augur runs two small contracts on Robinhood Chain. AugurAnchor stores Merkle roots of sealed records, and AugurRouter executes swaps for custodial wallets against Uniswap v3 pools. This page lists their functions and events, then the external contracts Augur trades against and reads.

Addresses

Robinhood Chain mainnet, chain id 4663, produces a block about every 0.1 s. Its explorer runs at https://robinhoodchain.blockscout.com.

Contract Address
AugurAnchor not deployed yet
AugurRouter not deployed yet
USDG, 6 decimals 0x5fc5360d0400a0fd4f2af552add042d716f1d168
Uniswap v3 factory 0x1f7d7550b1b028f7571e69a784071f0205fd2efa

AugurAnchor

An append-only registry of Merkle roots over Augur's seals. Anchoring covers the tree and the verification steps.

Function Caller Effect
anchor(bytes32 root, uint32 leafCount) returns (uint256 seq) anchorer Stores the root with its sequence number, leaf count and block timestamp. Reverts on an empty root, zero leaves or a root it already holds.
info(bytes32 root) returns (bool isAnchored, uint256 seq, uint32 leafCount, uint64 timestamp) anyone Returns whether and when the root landed, with its sequence and leaf count.
verify(bytes32 seal, bytes32[] proof, uint256 leftMask, bytes32 root) returns (bool) anyone True when the seal is a leaf of an anchored root. Bit i of leftMask marks proof[i] as a left sibling.
anchored(bytes32 root) returns (uint256) anyone The packed record behind info.
count(), owner(), anchorer() anyone Roots so far, the owner, the anchor wallet.
setAnchorer(address), transferOwnership(address) owner Replace the anchor wallet or the owner.

Events:

Anchored(uint256 indexed seq, bytes32 indexed root, uint32 leafCount, uint64 timestamp)
AnchorerChanged(address indexed previousAnchorer, address indexed newAnchorer)
OwnershipTransferred(address indexed previousOwner, address indexed newOwner)

Errors: NotOwner, NotAnchorer, EmptyRoot, DuplicateRoot, ZeroAddress.

No function edits or deletes a root. The owner can replace the anchor wallet, and each replacement emits AnchorerChanged, so a change of hands shows on chain. Each anchor costs about 52,000 gas, and Augur pays it.

AugurRouter

The router makes exact-input swaps against pools that the Uniswap v3 factory vouches for. It holds no funds and keeps nothing between calls.

Function Effect
swapExactIn(address pool, bool zeroForOne, uint256 amountIn, uint256 minOut, address recipient) returns (uint256 amountOut) Checks that the factory returns this pool for its two tokens and fee, swaps amountIn, sends the output to recipient, and reverts with Slippage below minOut.
uniswapV3SwapCallback(int256 amount0Delta, int256 amount1Delta, bytes data) Accepts a call only from the pool of the swap in progress, then pulls the owed amount from the wallet that started that swap.
factory() The factory the router trusts.

Event:

Swapped(address indexed payer, address indexed pool, bool zeroForOne, uint256 amountIn, uint256 amountOut, address recipient)

Errors: ZeroAmount, UnknownPool, Slippage(amountOut, minOut), UnexpectedCallback, Reentrancy, TransferFromFailed.

An approval to the router moves tokens only inside the callback of a swap that the approving wallet started, on a factory pool, for the amount that pool asks for. A second swap started inside the first reverts. The router leaves recipient open to the caller; Augur's custodial signer closes that gap by signing a swap only when the output returns to the same wallet, and the engine sets minOut 1% under the expected output. See wallets and custody.

Pools

Symbol Fee Pool
AAPL 5 bp 0xaae0d815ee56e4092a5e5c2911e676fea50b2d6d
NVDA 5 bp 0xd4eb21209c4d6093f80b5b84f5c45cc093ea14a3
GOOGL 5 bp 0x34d0dc122cf9a8eb296fc5e0d3a233625d7d19b7
SPY 5 bp 0xa7bb1ac63bbab0c44316e6c8c455213441689167
QQQ 5 bp 0xd60a5d14db690b7afad71f76b108071d7175597d
TSLA 30 bp 0xf4acdaeeb7022862a763c9b1b885e11191c889e3
AMZN 30 bp 0x8ac92da74ab5f3b1d024dc1943ad7e15dc4179ef
MSFT 30 bp 0xeb60bcd1d920ad6e102690ccfc6fb488899e1510
META 30 bp 0x107a7cb40d8665360ba10e59471af06150a50922

Tokens and price feeds

Symbol Stock token Chainlink feed
AAPL 0xaf3d76f1834a1d425780943c99ea8a608f8a93f9 0x6b22a786baa607d76728168703a39ea9c99f2cd0
NVDA 0xd0601ce157db5bdc3162bbac2a2c8af5320d9eec 0x379ec4f7c378f34a1b47e4f3cbebcbac3e8e9f15
GOOGL 0x2e0847e8910a9732eb3fb1bb4b70a580adad4fe3 0xf6f373a037c30f0e5010d854385ca89185ae638b
SPY 0x117cc2133c37b721f49de2a7a74833232b3b4c0c 0x319724394d3a0e3669269846abe664cd621f9f6a
QQQ 0xd5f3879160bc7c32ebb4dc785f8a4f505888de68 0x80901d846d5d7b030f26b480776ee3b29374c2ae
TSLA 0x322f0929c4625ed5bad873c95208d54e1c003b2d 0x4a1166a659a55625345e9515b32adecea5547c38
AMZN 0x12f190a9f9d7d37a250758b26824b97ce941bf54 0xd5a1508ced74c084ebf3cbe853e2c968fb2a651c
MSFT 0xe93237c50d904957cf27e7b1133b510c669c2e74 0x45c3c877c15e6ba2ebb19ea114ea508d14c1af2e
META 0xc0d6457c16cc70d6790dd43521c899c87ce02f35 0x7c38c00c30bee9378381e7b6135d7283356d71b1

Each feed referees its pool. A gap above 2% marks the price disputed, a feed older than 24 hours leaves it unrefereed, and nothing trades in either state.