GitHub Open vault
Docs

Using YEkos

Everything you can do in the web app, how the key file works, the command-line tool and the contract reference.

Quick startSend fundsRotate keysRecoveryHistoryWatchtowerKey fileCLIContractFAQ

Quick start

  1. Open the Vault page and connect a browser wallet (MetaMask, Rabby…). The app adds the Elysium network if your wallet doesn't have it. You need a little HYPE for gas.
  2. Click Generate new key set and choose a password (12+ characters). It takes a few seconds. Download the key file and store it offline. The password is never stored: if you forget it, the file can't be opened.
  3. Click New vault…, optionally enter a guardian address, choose a time-lock and click Deploy vault.
  4. Deposit HYPE on the Deposit tab, or send any ERC-20 token to the vault address.

Next time, open the Vault page, load your key file, enter its password and the app opens your vault automatically. All vaults you opened are listed under Your vaults. To only watch a vault, paste its address: no key file is needed.

Send funds

  1. Load your key file and open your vault. The tag Your keys control this vault must be shown.
  2. On the Send tab choose HYPE or an ERC-20 token, enter the recipient and the amount, and click Sign & queue transfer.
  3. The app picks an unused one-time key, signs and sends the request. Your wallet asks you to confirm the gas.
  4. The action appears in Actions as Locked with a countdown. When it shows Ready, click Execute.
  5. Download the key file again so it records the key you used.

To stop a pending action, click Cancel (uses one key) or, from the guardian wallet, Veto. The time-lock and guardian tabs work the same way.

Rotate keys

Rotate when fewer than about 20 keys remain, or right away if you think your key file was exposed.

  1. Open the Rotate keys tab and click the button. A new key set is generated.
  2. Download the new key file (its name ends in -NEW.json) and confirm it's saved. The rotation is signed only after that.
  3. After the time-lock, execute the rotation. The vault switches to the new root, and the app switches to the new keys. Your old key file stops working for this vault.

Recovery

If your key file or password is lost, the guardian can move the vault to a new key set. Prepare this before you need it:

  1. Click Lost your key file? → generate a recovery key set with its own password and download it (…-RECOVERY.json). Store it apart from your main key file.
  2. Give the recovery code (yekos-recover:<root>:<seed>) to your guardian. It contains only public values.
  3. If the main file is lost, the guardian opens the vault's Recovery tab, pastes the code and starts recovery. It waits 30 days.
  4. During those 30 days the owner sees a warning and can cancel with the old keys. The guardian can't cancel its own replacement, so a hostile guardian can't freeze the vault either.
  5. After 30 days anyone executes it, and the recovery key file controls the vault.

History and assets

The vault page shows every event (queued, executed, cancelled, recovery) with links to the Elyscan explorer, the tokens the vault received with their balances, and the HYPE balance in USD (price from CoinGecko, refreshed every minute).

Watchtower

A small bot that holds only the guardian key and cancels pending actions that break your rules: recipients or tokens not on an allow-list, amounts above a limit, a shorter time-lock or key rotation. Because a guardian can only cancel, the worst a compromised watchtower can do is cancel your actions. Setup: watchtower/README.md in the repository.

cd watchtower && npm install
GUARDIAN_KEY=… VAULTS=0xVAULT ALLOWED_RECIPIENTS=0xA,0xB MAX_NATIVE=5 DRY_RUN=1 npm start

Key file format

{
  "format": "yekos-keys", "version": 2,
  "seed":   "0x…32 bytes…",   // public, stored in the vault
  "root":   "0x…32 bytes…",   // public, stored in the vault
  "spent":  { "<root>": [0, 1, 2] },  // one-time keys already used
  "vaults": ["0x…"],          // vaults created with this key set
  "levels": [[…], …],         // public Merkle tree, speeds up loading
  "crypto": {                 // the secret, encrypted with your password
    "kdf": "scrypt", "n": 131072, "r": 8, "p": 1, "salt": "0x…",
    "cipher": "aes-256-gcm", "iv": "0x…", "ciphertext": "0x…"
  }
}

The public fields stay readable so the app can show your vaults before you unlock. Version-1 files (secret in clear) still open; the app asks for a password and saves them encrypted.

The web app and the CLI read the same file. Files made by the CLI have no levels; the app rebuilds them on load.

Command-line tool

For advanced users and automation. It needs Node.js and the repository.

npm install
npx hardhat compile
export DEPLOYER_KEY=…        # a wallet that pays gas only

node scripts/cli.js keygen alice
node scripts/cli.js deploy-factory
node scripts/cli.js create-vault alice --factory 0x… --guardian 0x… --delay-hours 24
node scripts/cli.js status 0xVAULT
node scripts/cli.js transfer alice 0xVAULT native 0xTO 1000000000000000000
node scripts/cli.js execute 0xVAULT 0
node scripts/cli.js cancel alice 0xVAULT 0
node scripts/cli.js start-recovery 0xVAULT 0xNEWROOT 0xNEWSEED   # guardian only
node scripts/preflight.js                    # read-only simulation on Elysium

Key files are written to keys/<name>.secret.json (password-encrypted), which is ignored by git. Set YEKOS_PASSWORD to skip the prompt in scripts.

Contract reference

YEkosVault

FunctionWhoWhat it does
queue(kind, data, leaf, sig, path)anyone with a valid signatureChecks the one-time signature and queues the action behind the time-lock.
execute(id)anyoneRuns a queued action after its time-lock.
cancelSigned(id, leaf, sig, path)owner (signature)Cancels a pending action immediately.
cancel(id)guardianCancels a pending action, except a guardian change.
startRecovery(newRoot, newSeed)guardianQueues a switch to a new key set behind a fixed 30-day lock. The owner can cancel it.
messageHash(kind, data, id)viewThe digest that must be signed.
pending(id), isLeafUsed(leaf)viewState of an action and of a key.

Action kinds

KindData
1 Transferabi.encode(address token, address to, uint256 amount); token 0x0 = HYPE
2 Rotateabi.encode(bytes32 newRoot, bytes32 newSeed); only with key #255
3 Guardianabi.encode(address guardian); 0x0 removes it
4 Time-lockabi.encode(uint64 seconds); 3600 – 2592000
5 Cancelabi.encode(uint256 id); used by cancelSigned
6 Recoveryabi.encode(bytes32 newRoot, bytes32 newSeed); created by startRecovery, not signed

Signed message

keccak256(abi.encode(
  keccak256("YEKOS_VAULT_V1"), chainId, vault, epoch, id, kind, keccak256(data)
))

Errors

ErrorMeaning
BadSignatureWrong key file, or another action was queued first (the action id changed).
LeafUsedThat one-time key was already used.
BadLeafKey #255 used for something other than rotation, or an index out of range.
TooEarlyThe time-lock hasn't ended.
AlreadyDone / NotFoundThe action was already executed or cancelled, or doesn't exist.
NotGuardianOnly the guardian can call cancel or startRecovery.
GuardianCannotVetoThe guardian tried to cancel its own replacement.
BadDataInvalid parameters.
TransferFailedNot enough balance, or the token refused the transfer.

FAQ

Why do I need a normal wallet at all?

Elysium transactions are paid in HYPE from an ordinary account. That account only pays gas. It can't move vault funds.

What if I reject the transaction in my wallet?

The one-time key is still marked as used, for safety. Nothing else happens. You have 255 keys.

Can I use my vault from another computer?

Yes. Load the latest copy of your key file there. Download it again after signing, and carry that copy back.

Can I withdraw immediately in an emergency?

No. Every withdrawal waits for the time-lock. That is what protects you if your key file is stolen. Choose the time-lock with that in mind.

I forgot my password. What now?

The password can't be reset. If you prepared a recovery kit, ask your guardian to start recovery. Otherwise the funds stay locked.

Can the YEkos team access my funds?

No. There is no admin key and no upgrade mechanism. Only your key file controls your vault.