Docs

Contracts

One contract, Yoke, and one token template, YokeToken. Solidity 0.8.26, OpenZeppelin 5.1 for the ERC-20 and math.

Addresses

NameAddress
YokeNot published yet
Uniswap V3 factory (Robinhood Chain)0x1f7d7550B1b028f7571E69A784071F0205FD2EfA
WETH (Robinhood Chain)0x0Bd7D308f8E1639FAb988df18A8011f41EAcAD73

Chain id 4663. RPC https://rpc.mainnet.chain.robinhood.com. Explorer robinhoodchain.blockscout.com.

Functions

FunctionWhat it does
create(name, symbol, pair, startCap, firstBuy, minOut)Deploys the token and the curve. Optional first buy by the creator.
buy(token, pairIn, minOut, to)Buys with the pair token. Needs an approval.
buyETH(token, minOut, to) payableBuys with ETH when the pair is WETH.
sell(token, tokensIn, minOut, to)Sells coins for the pair token. Needs an approval of the coin.
sellETH(token, tokensIn, minOut, to)Sells coins for ETH when the pair is WETH.
graduate(token, poolFee)Opens the pool and locks the liquidity of a full curve. Permissionless.
collectFees(token)Collects the locked position's fees. Permissionless.
claim(pair, to)Pays out your accrued fees in that pair token.
claimProtocol(pair)Pays the protocol's accrued fees to feeTo.
setCreator(token, newCreator)Creator hands over the fee seat.
setFeeTo(addr), transferOwnership(addr)Owner only. These are the only owner powers.

Views

curves(token)pair, creator, full, graduated, poolFee, tickLower, tickUpper, pool, vPair, raised, sold
quoteBuy(token, gross)coins out and amount spent (after the cap on the last buy)
quoteSell(token, tokensIn)pair out after the fee
spotPrice(token)raw pair per whole coin
pending(account, pair)accrued fees; account 0x0 is the protocol's share
allTokens(i), allTokensLength()every coin ever created

Events

Created(token indexed, creator indexed, pair indexed, vPair, name, symbol)
Trade(token indexed, trader indexed, isBuy, pairAmount, tokenAmount, fee, raised, sold)
CurveFull(token indexed)
Graduated(token indexed, pool indexed, poolFee, pairIn, tokenIn)
FeesCollected(token indexed, pairAmount, tokensBurned)
Claimed(account indexed, pair indexed, amount)
CreatorChanged(token indexed, creator indexed)

Errors

ErrorWhen
BadPairZero address, no code, or decimals() fails or is above 36
BadStartCapVirtual reserve outside 1e6 to 2^100
NoSuchCoinUnknown token
CurveClosedTrading a full or graduated curve on the curve
SlippageOutput below minOut
ZeroAmountZero in, or zero out after rounding
PairTransferMismatchThe pair moved less or more than asked
NotWethETH function on a coin whose pair is not WETH
NotFull, NotGraduated, AlreadyGraduatedWrong state for graduate or collectFees
NotEnoughGasA buy that fills the curve was sent with less gas than graduation needs (about 5.6M); the wallet's estimate normally covers it
BadTierFee tier unknown to the Uniswap factory
PoolPriceMismatchPre-existing pool at a bad price that cannot be moved
NotCreator, NotOwner, Unauthorized, Reentrancy, TransferFailedAs named