Smart Contract Security
On Elysia Perps, your collateral is held by an on-chain smart contract, not in a private wallet. Trading (order matching, margin, PnL) happens on a fast off-chain engine, but the money itself sits in an auditable contract you can verify. This page explains how that contract is protected and, just as important, what trust assumptions you are still taking on today, and where the protocol is headed.
On-chain custody
- You deposit by sending ERC-20 tokens to the contract; your Elysia Perps balance appears once the deposit is confirmed on-chain.
- Your funds remain in the contract, governed by public code, for as long as you trade.
- You can request a withdrawal back to your own wallet at any time. Each request is reviewed within 48 hours.
Your tokens are never taken into a private wallet. They can only move through the contract's rules, which anyone can read.
The contract's protections
The custody contract is built on widely used, battle-tested contract standards, each guarding a specific risk:
| Control | What it does | What it protects against |
|---|---|---|
| Supported-token whitelist | Only tokens explicitly whitelisted can be deposited as collateral | Junk or malicious tokens being credited as collateral |
| Constrained withdraw | Only the authorized multisig can trigger a withdrawal transaction, and it can only send funds to the account that owns them | Arbitrary transfers; funds being sent anywhere but back to you |
| Emergency pause | Deposits and withdrawals can be paused in an emergency | Continued fund movement during an active incident |
| Reentrancy guard | Blocks reentrancy attacks on the withdrawal path | A classic drain exploit |
| Two-step ownership transfer | Control can only be handed over in a deliberate, two-step process | A single fat-fingered or hijacked transfer of control |
| Upgradeable proxy (UUPS) | The contract address stays fixed; only the implementation behind it can be replaced | Having to migrate funds to a new address to ship a fix |
| Multisig control | Privileged contract actions, including upgrades, withdrawals and the pause, require multiple signers | A single lost or compromised key |
Why withdrawals are contract-triggered
You do not call withdraw yourself. You submit a withdrawal request, and the authorized multisig executes the on-chain transaction. This lets the protocol settle your off-chain positions and balance before releasing funds. The key protection is that the withdraw function can only return a user's own funds to that user. The multisig cannot redirect them elsewhere. Each withdrawal request is reviewed before it is executed, within 48 hours.
Reorg protection
Deposits are only credited after a set number of block confirmations, so a short-lived chain reorganization cannot create a phantom balance.
The trust assumptions, stated plainly
Custody here is on-chain. Here is exactly what that covers today:
- Multisig signers are a trust point. The contract is upgradeable and withdrawals are contract-triggered, so these actions run through multisig wallets and no single key can execute them alone. The withdraw function also restricts the destination: funds go back to their owner. The security of the signers' keys still matters.
- Matching is off-chain, and currently centralized. Order matching and margin are computed by an off-chain engine (today a single service) and are not proven on-chain. Custody is on-chain; execution integrity is operational.
None of this is unusual for a hybrid DEX: it is the standard trade-off of "custody of a DEX, speed of a CEX." The point is that you should know where the on-chain guarantees end and the operational ones begin.
Where this is headed
Elysia Perps is built as a perpetuals module, and its direction is to move the parts that are centralized today toward a decentralized model:
- A separate, decentralized matching layer. The off-chain engine is intended to be decomposed into its own layer rather than run as a single service, reducing the reliance on one operator. A zero-knowledge proof layer is planned to bring matching and settlement integrity further on-chain over time.
- Broader governance of privileged actions. Privileged contract actions already run through multisig wallets. The intended direction is a broader multi-party governance model.
These are the roadmap, not the current state. This page describes what is true today so you can judge the trust assumptions as they are now.
What you can do
- Verify the contract. The custody contract is deployed and verifiable on-chain at
0x3C8643508c5568621CB6d21119e4076551522c84. You can inspect its code and its holdings directly on a block explorer. - Withdraw what you are not actively trading. On-chain custody is strongest for funds sitting in the contract under your account, but the simplest risk reduction is not to keep more in Elysia Perps than you need.
- Watch for pause or upgrade announcements during incidents.
Where to go next
- The risk of the collateral token you deposit: Collateral Risk.
- How deposits and withdrawals work step by step: Getting Started → Deposit and Withdraw.
Last updated