Verified contractPartialMIT
Born
Address0xd0ca38daf6bfc2d09a87fa748aa4e1ecbef00174
- Balance
0 ETH
- Transactions
17
- Compiler
solc 0.8.28
- Same code
Only this contract
Details
- Compiler
- solc 0.8.28+commit.7893614a
- Language
- solidity
- Optimization
- Yes, 2,000 runs
- EVM version
- prague
- Via IR
- yes
- License
- MIT
- Match
- Partialcreation code: yes, runtime code: yes
- Verified on Sourcify
- Created in block
- 26,171,954
- Creation transaction
- 0x58597f5399…48b0f7d295
src/Born.sol
// bornv4.xyz . x.com/born_v4
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.28;
interface IBornHook {
function onJoin(address who, uint8 house, uint256 amount) external;
}
/*
B O R N
A quantum computer in a Uniswap pool.
bornv4.xyz . x.com/born_v4
───────────────────────────────────────────────────────────────────────────── the rule
In 1926 Max Born read the wave function as a probability: a quantum system is a list of complex
amplitudes, one for every outcome it could show you, and when you look, you see outcome k with
probability |α_k|², the amplitude's squared length. The amplitudes are not probabilities. They
have phases, they add and cancel like waves, and that is the whole difference between a quantum
computer and a coin: probability can be steered by interference before anyone looks.
It is also the reason Ethereum is changing its cryptography. A large enough machine running
Shor's algorithm interferes its way to the private key behind any ECDSA signature, and to the
secrets behind BLS and KZG; so Ethereum's roadmap moves to hash-based signatures and STARKs before
such a machine exists. No such machine exists yet. This one has five qubits.
───────────────────────────────────────────────────────────────────────────── the machine
BORN's pool hook holds a five-qubit register: 32 complex amplitudes, simulated bit for bit in
30-bit fixed point, born in perfect superposition. Every trade in the pool is a gate on it, written by the number the trader
types. Every hour, on the hour, one shot is taken: the register is read once by the Born rule,
at a random moment of the hour, with randomness from drand verified on chain. The state it lands
on is a house, and the house's stakers take the pot.
───────────────────────────────────────────────────────────────────────────── manifesto
I. THE NUMBER IS THE PROGRAM
No contract to call, no data to attach. You type an amount on BORN's machine page and its
last three digits are a gate, a qubit and a second qubit or an angle. The pool reads them, by
whatever router carries the trade, as long as it passes the amount through unchanged.
II. EVERY TRADE IS A GATE
Hadamard, Pauli, phase, T, rotation, CNOT, CZ: a universal set. With them the market can
prepare any state of five qubits, entangle them, and make probabilities interfere.
III. TO SELL IS TO UNDO
A buy applies its gate; a sell with the same digits applies the inverse. A round trip
with nothing in between leaves the register where it found it, to one part in a
billion where a gate rounds. To move the machine you have to mean it.
IV. THE MARKET IS THE ENVIRONMENT
A number off the grid is not ignored: it is noise, a small rotation of one qubit, the way a
real machine decoheres. It is drawn from the amount, the sender, the block and the gate
count, so a careful sender can aim it: the environment, written by the market.
V. THE BORN RULE DECIDES
On the hour, one measurement: state k with probability |α_k|². Its moment and its result
come from the drand beacon, a threshold signature nobody can know early and nobody can
choose, checked on chain. The last trade before the hour has no more power than any other
minute of it.
VI. NOBODY PRINTS ODDS
Unitarity conserves probability. Gates only move it. Every move is a trade in the open,
and every trade pays the same fee.
VII. THIRTY-TWO HOUSES
Stake BORN in a basis state. When a shot lands on your house, your house takes the pot,
shared by stake: the whole prize if it holds a thirty-second of the stake that counts, that
fraction of it if less. A stake counts from the next hour, so nobody joins the winner late.
VIII. WRITTEN ONCE
No setter, no pause, no upgrade, no key that changes a gate, a fee or a rule.
───────────────────────────────────────────────────────────────────────────── the token
1,000,000,000 BORN, minted once, to the wallet that deploys it. That wallet opens the pool with
all of it, one side, below the opening price, so no ETH goes in: one position, whose NFT the
owner keeps: the hook accepts no other liquidity add, ever. No owner of the token, no mint, no pause, no tax in the token: the fee
and the machine live in the pool's hook. `join` stakes BORN into a house in one call; the hook
holds staked BORN and gives it back on `leave`.
Five qubits are easy to simulate on any computer; this is a simulation, run by the EVM, of what an
ideal five-qubit machine would do, to the rounding of fixed point. Experimental software. Not audited. Every rule is final.
*/
contract Born {
string public constant name = "Born";
string public constant symbol = "BORN";
uint8 public constant decimals = 18;
uint256 public constant SUPPLY = 1_000_000_000 ether;
/// @notice A code-level marker: this contract's source is BORN's own.
string public constant PROJECT = "BORN: a quantum computer in a Uniswap pool";
/// @notice The hook: the machine, the fee, the shots and the houses.
address public immutable HOOK;
uint256 public totalSupply;
mapping(address => uint256) public balanceOf;
mapping(address => mapping(address => uint256)) public allowance;
event Transfer(address indexed from, address indexed to, uint256 amount);
event Approval(address indexed owner, address indexed spender, uint256 amount);
error ZeroAmount();
/// @dev The whole supply to the deployer, who opens the pool with it in the Uniswap app.
constructor(address hook) {
HOOK = hook;
totalSupply = SUPPLY;
balanceOf[msg.sender] = SUPPLY;
emit Transfer(address(0), msg.sender, SUPPLY);
}
function approve(address spender, uint256 amount) external returns (bool) {
allowance[msg.sender][spender] = amount;
emit Approval(msg.sender, spender, amount);
return true;
}
function transfer(address to, uint256 amount) external returns (bool) {
_move(msg.sender, to, amount);
return true;
}
function transferFrom(address from, address to, uint256 amount) external returns (bool) {
uint256 a = allowance[from][msg.sender];
if (a != type(uint256).max) allowance[from][msg.sender] = a - amount;
_move(from, to, amount);
return true;
}
/// @notice Stake `amount` BORN in house `house` (0 to 31, the basis state |house⟩). It counts from the next shot.
function join(uint8 house, uint256 amount) external {
if (amount == 0) revert ZeroAmount();
_move(msg.sender, HOOK, amount);
IBornHook(HOOK).onJoin(msg.sender, house, amount);
}
function _move(address from, address to, uint256 amount) internal {
balanceOf[from] -= amount;
unchecked {
balanceOf[to] += amount;
}
emit Transfer(from, to, amount);
}
}
Compiler settingsShow
{
"viaIR": true,
"metadata": {
"appendCBOR": true,
"bytecodeHash": "none",
"useLiteralContent": false
},
"libraries": {},
"optimizer": {
"runs": 2000,
"enabled": true
},
"evmVersion": "prague",
"remappings": [
"forge-std/=lib/forge-std/src/",
"@uniswap/v4-core/=lib/v4-core/",
"v4-core/=lib/v4-core/",
"@uniswap/v4-periphery/=lib/v4-periphery/",
"v4-periphery/=lib/v4-periphery/",
"solmate/=lib/solmate/",
"@openzeppelin/=lib/openzeppelin-contracts/",
"openzeppelin-contracts/=lib/openzeppelin-contracts/",
"permit2/=lib/permit2/"
]
}Source code and metadata: Sourcify.
The source code belongs to the authors of the contract.