Veleno
Docs

How Veleno works.

What Veleno is

Veleno is an LLM gateway billed in DOSE. One DOSE is one dollar of model usage. Stakers of $VELENO earn DOSE every hour and sell what they do not use on an order book, where buyers take it below face value.

  • Buyers buy DOSE in USDG, activate it into an API balance and call any model with one key.
  • Stakers stake $VELENO, earn DOSE, use it themselves or list it for USDG.

Where things stand. The contracts are written and pass their tests; they are not deployed yet. Until they are, the market and staking pages run the same contracts on a chain inside your browser, with play money.

Quickstart

  • Buy DOSE. Pick an amount on the market and pay in USDG. Choose “To my API balance” and the DOSE is burned straight into your account.
  • Create a key. Sign in with your wallet on the account page and create a key. It starts with sk-veleno- and is shown once.
  • Send a request. Point any OpenAI-compatible client at the base URL below.
curl https://www.veleno.sbs/api/v1/chat/completions \
  -H "Authorization: Bearer $VELENO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "<an id from GET /models>",
    "messages": [{ "role": "user", "content": "Hello" }],
    "max_tokens": 256
  }'
# any client that reads the OpenAI variables
OPENAI_BASE_URL=https://www.veleno.sbs/api/v1
OPENAI_API_KEY=sk-veleno-…

Authentication

Base URL https://www.veleno.sbs/api/v1. Send your key as Authorization: Bearer sk-veleno-…. A key is shown once; only its hash is stored. All keys on an account share one balance. The API allows any browser origin, but a key in client-side code is visible to everyone: call it from a server.

Endpoints

GET /modelsThe catalogue in OpenAI list shape, with per-token prices and context length. No key needed.
POST /chat/completionsOpenAI Chat Completions, streaming or not. Responses carry x-veleno-request-id, and x-veleno-cost-usd when not streaming.
GET /balanceYour account id and API balance in dollars.
GET /usage?limit=20Your most recent requests: model, tokens, cost, streaming or not.

Only the Chat Completions format is served. There is no Anthropic-format endpoint, so the Anthropic SDK cannot be pointed at Veleno.

How billing works

  • Fund. Activating DOSE burns it on Robinhood Chain and emits an Activated event. The gateway credits your balance from that event, once per transaction log.
  • Hold. Before forwarding a request the gateway holds its worst case: the prompt estimated from its length, plus max_tokens at the completion price. Without max_tokens, the answer is capped to what your balance can pay for. Parallel requests cannot overdraw a balance.
  • Settle. When the response finishes, the real cost is charged at the model's list price (what its paid hosts charge per token) and the rest of the hold returns. If the provider errors, the whole hold is released.

The gateway stores billing metadata (model, token counts, cost, timing). It does not store prompts or responses. A stream that is cut before its token count arrives is charged for the bytes that were sent.

Errors and limits

Errors use the OpenAI shape, so existing error handling keeps working.

400 invalid_request_errorThe body is not valid JSON, or a field such as max_tokens is out of range.
401 invalid_api_keyThe Authorization header is missing, malformed or the key was revoked.
402 insufficient_balanceYour balance cannot cover the request's hold.
404 model_not_foundThe model id is not in GET /models.
413 request_too_largeThe body is larger than 4 MB.
429 rate_limit_exceededMore than 120 requests a minute on one key.
502 upstream_errorThe provider is unreachable. You are not charged.
503 gateway_unavailableThe gateway is not serving yet. You are not charged.

DOSE and the order book

Sellers list DOSE at a discount off face value; buyers pay USDG and take the deepest discount first.

Face value1 DOSE = $1 of model usage
Decimals6, like USDG
Discount levelsEvery 2.5% from 0% to 30%, deepest filled first, first in first out inside a level
Smallest order1 DOSE
GasETH on Robinhood Chain

Staking and selling

  • Stake. Stake $VELENO in the staking contract. A fixed amount of DOSE per hour is split across stakers by stake and time. Claim it any time; unstake any time, with no lock.
  • List. sell(amount, discountBps) escrows your DOSE at one level.
  • Get paid. Fills credit you in USDG. claim() sends it to your wallet; cancel(id) refunds whatever has not sold.

The emission is fixed per hour, so more stake means a smaller share each. A staker's dollar return comes from buyers, not from the contract. Hours in which nobody is staked mint nothing.

Fees

Platform fee5% of the credit price, paid by the buyer on top. It can be lowered by the owner and never raised past 5%.
Where it goesTo the protocol's fee recipient, in USDG, claimable from the book at any time.
ReferralThe contract can pay a referrer 1.5% of the credit price out of that fee. The site does not pass a referrer yet.
SellersPay no fee. A seller receives the full discounted price.
StakingNo fee to stake, claim or unstake.

Contracts

Robinhood Chain · chain 4663. Addresses appear here once each contract is deployed.

$VELENONot deployed yet
DOSE (Dose)Not deployed yet
Staking (Alambicco)Not deployed yet
Order book (Banco)Not deployed yet

Three contracts in one file, contracts/Veleno.sol. None of them is upgradeable. They pass 60 checks on an in-process EVM and have not been audited.

Buying from a contract or an agent

// USDG and DOSE use 6 decimals. 20e6 = $20 of inference.
(, , uint256 total, uint256 filled) = banco.quote(20e6);
require(filled == 20e6, "not enough DOSE in the book");
uint256 maxTotal = total * 10_050 / 10_000; // 0.5% of room
usdg.approve(address(banco), maxTotal);
bytes32 account = bytes32(uint256(uint160(wallet)));
banco.buyAndActivate(20e6, maxTotal, account, address(0));

buy fills exactly the amount asked or reverts. buyAndActivate does the same, then burns the DOSE into an API account in the same transaction. A wallet's account id is its address left-padded to 32 bytes.

Who can change what

EmissionThe staking contract's owner can set DOSE per hour, between 0 and 1,000. A change applies from the moment it is made, never backwards.
Platform feeThe book's owner can set the fee between 1.5% and 5%, and name its recipient.
MintingOnly the staking contract mints DOSE. The minter is written once and has no setter.
Nobody canMove a staker's stake, a seller's escrowed DOSE or a seller's unclaimed USDG, change an order's price, or pause withdrawals. There is no pause and no upgrade.

Risks

  • Not audited. The contracts pass their own tests. Nobody outside has reviewed them. A bug could lose funds.
  • The gateway is a service. DOSE is redeemed by a gateway that Veleno runs. If the gateway stops, DOSE and activated balances cannot be spent. An activated balance lives in the gateway's records, not on chain, and cannot be turned back into DOSE.
  • No refunds. A purchase on the book is final once the transaction lands.
  • Discounts are not promised. They exist only while stakers list DOSE below face value. A thin book means a small discount, or none.
  • Staking yield is not promised. A staker earns DOSE; what that is worth depends on buyers. More stakers means less DOSE each.
  • $VELENO can fall. Staked tokens keep their market risk.
  • Free upstream capacity. Veleno serves open models through the free capacity its upstream router offers for them. That capacity is rate-limited and can be withdrawn by the upstream at any time; when it refuses a request you are not charged, but you are not served either. The same models can be reached elsewhere with your own accounts: what a DOSE buys is one key, one balance and metered access.
  • The chain. Robinhood runs the sequencer that orders transactions on Robinhood Chain. It could delay or refuse them.