A trustless cross-chain ferry for Monero. wsXMR is live on Gnosis Chain, backed by overcollateralized LP vaults and Ed25519 atomic swap commitments.
🌐 wrapsynth.com · 📊 wsXMR/sDAI Pool on Gnosis
WrapSynth brings Monero's anonymity set to DeFi and DeFi liquidity to Monero. Users swap XMR for wsXMR through atomic-swap mechanics enforced on-chain: LPs post sDAI collateral, mint/burn settlement is gated by Ed25519 secret reveals verified on-chain, and timeout-based slashing protects both sides. No custodian, no federation, no trusted intermediary — every swap settles peer-to-peer between a user and an LP vault.
- ✅ Full hub + facet system deployed and verified on Gnosisscan
- ✅ wsXMR/sDAI Uniswap V3 pool live (0.3% fee tier)
- ✅ Complete mint → trade → burn cycle executed end-to-end on mainnet
- ✅ Two rounds of security review completed; all critical findings resolved (see Security)
- ✅ 633-line solvency invariant test suite + audit regression suite
- 🔄 Solana port in development (
solana/)
| Contract | Address |
|---|---|
| wsXMR Token | 0x7a7cFca18Bf01B3c3D5A21E82318879454446D2c |
| wsXmrHub | 0x26dA95a7712B7663f4A159f92bf1e229D8e24E7b |
| Liquidity Router | 0x0708955Ac8fAC40b7A3e770bC52678433D547bb0 |
| wsXMR/sDAI UniV3 Pool | 0xCe099C9C5b6dc6Ca0D7c1E22Fbb49E7Bfd6829c2 |
Facet addresses
| Facet | Address |
|---|---|
| RedStoneOracleFacet | 0x225B5DAfe2fa9c7b44C72c9Eb4fe29decD57a770 |
| VaultFacet | 0x98FdaB5F5E9a4c0B09e4Ed4cD0BAb4064A7014F6 |
| MintFacet | 0xF755Ce61e09653759F077cAd94d860cE2541d4ae |
| BurnFacet | 0x69D82216Ef1bf4c932846701D157ffF5886922e7 |
| LiquidationFacet | 0x80c5d4c7154134bA1f1FAfee49eE1d059222664e |
| YieldFacet | 0xab0Fc63FdB6AAfdC461A369a8B185A0253613aBf |
Full deployment manifest (external contracts, pool config, LP defaults): deployment.json
All protocol state and collateral live in a single contract, wsXmrHub, which dispatches calls to stateless logic facets via a selector → facet table:
- The Hub owns all state (
wsXmrStorage), holds all collateral, and is the only address authorized to mint/burn wsXMR - Facets contain logic only and access state through the Hub; only registered facets can mutate state
- Delegate-context is tracked with EIP-1153 transient storage, preventing facet logic from being invoked outside the hub's dispatch path
┌────────────────────────────┐
│ wsXmrHub │
│ state · collateral · token │
│ selector → facet dispatch │
└──────────┬─────────────────┘
┌──────────┬─────────┬──┴──────┬───────────┬──────────┐
VaultFacet MintFacet BurnFacet Liquidation YieldFacet OracleFacet
(LP vaults) (XMR→wsXMR)(wsXMR→XMR) Facet (sDAI yield) (RedStone)
- Ed25519 on-chain verification — atomic swap secrets are Ed25519 scalars; the contract computes
scalarMultBase(secret)and checks it against the user's commitment, binding settlement to the same key material used on the Monero side - sDAI collateral — LP vaults are denominated in Savings DAI, so idle collateral earns the DSR; YieldFacet harvests and accounts for vault yield
- Co-LP liquidity router —
wsXMRLiquidityRouterdeploys vault collateral as Uniswap V3 concentrated liquidity paired against user-supplied wsXMR, putting backing capital to work instead of letting it sit idle - Oracle facet — RedStone-style oracle with an off-chain price pusher keeping XMR/USD fresh on-chain
- LP node (
ethereum/lp-node/, Rust) — monitors events, manages Monero RPC, prices quotes, runs arbitrage, and exposes a REST API for the frontend
initiateMint— user posts a claim commitment (Ed25519 point) and griefing deposit; the LP vault's capacity is reserved- User sends XMR to the LP's Monero address
setMintReady— LP confirms XMR receipt on-chainfinalizeMint— user reveals the secret scalar; the contract verifiesscalarMultBase(secret)matches the commitment, mints wsXMR, and refunds the deposit
requestBurn— user locks wsXMR and posts a hash commitment with their Monero destination; LP collateral is reserved against the burn and a deadline startsconfirmMoneroLock— LP signals the XMR payment is underway- LP sends XMR;
finalizeBurnsettles with the secret reveal, burning the wsXMR and releasing the LP's collateral - Escape hatches:
abortBurn— clean unwind before settlement, returning wsXMR to the userforceSettleBurn/claimSlashedCollateral— if the LP misses the deadline, the user seizes collateral at oracle price; bad outcomes hit the responsible vault, not the system
- Create a vault and deposit sDAI via VaultFacet (minimum 150% collateral ratio; 180% target)
- Optionally deploy collateral into the co-LP Uniswap V3 position via the router
- Run the LP node to serve mint/burn flow automatically
- Earn mint/burn fees + sDAI yield + LP fees; keep ratio above the 120% liquidation threshold
The protocol has been through two rounds of security review, with all critical and high-severity findings resolved and locked in by regression tests (AuditRegressionTest.t.sol). Notable findings fixed:
- Delegate-context reentrancy in the hub dispatch path — closed using EIP-1153 transient-storage context flags
- Yield harvesting unit mismatch between sDAI shares and DAI amounts in vault accounting
- Inverted bad-debt socialization logic in liquidation flow
- Burn flow redesign — the original single-path burn was replaced with the
requestBurn/abortBurn/forceSettleBurnstate machine to remove griefing and stuck-funds paths
BurnSolvencyInvariantTest.t.sol— 633-line Foundry invariant suite asserting system solvency across randomized mint/burn/liquidation sequences- Full lifecycle E2E suites (
E2EFullCycle,E2EComprehensive,E2EAdvancedScenarios) plus Hardhat unit suites per facet - Co-LP fork tests against Gnosis mainnet state (
test/coLP/) - Ed25519 compatibility tests against reference vectors
- No formal verification yet
- Oracle liveness depends on the off-chain price pusher
- LP-side Monero payment confirmation is an off-chain step; the protocol's protection is economic (collateral slashing), not cryptographic proof of XMR transfer
- Use amounts you can afford to lose
Node.js v18+, Foundry, Rust (for the LP node), Hardhat (via npm).
git clone https://github.com/madschristensen99/wrapsynth.git
cd wrapsynth/ethereum
npm install
cp .env.example .env # add PRIVATE_KEY and GNOSIS_RPC_URL
# Compile + test
npx hardhat compile
npm test # Hardhat suites
forge test # Foundry invariant + E2E suitescd ethereum/lp-node
cargo build --release
cargo run --release -- --config config.tomlcd solana/anchor-program
anchor build && anchor testwrapsynth/
├── deployment.json # Live Gnosis mainnet deployment manifest
├── ethereum/
│ ├── contracts/
│ │ ├── core/ # wsXmrHub, wsXmrStorage
│ │ ├── facets/ # Vault, Mint, Burn, Liquidation, Yield, Oracle
│ │ ├── router/ # wsXMRLiquidityRouter (co-LP UniV3)
│ │ ├── Ed25519.sol # On-chain Ed25519 scalar mult
│ │ └── wsXMR.sol # ERC-20 (8 decimals, matching XMR)
│ ├── test/ # Foundry invariant/E2E + Hardhat suites
│ └── lp-node/ # Rust LP node (events, Monero RPC, quotes, API)
├── solana/anchor-program/ # Solana port (Anchor)
├── frontend/ # Web app
└── docs/ # Sequence diagrams, seed storage design
- ✅ Gnosis mainnet deployment + verified contracts
- ✅ Live wsXMR/sDAI Uniswap V3 pool
- ✅ Co-LP concentrated liquidity router
- 🔄 Solana port (Meteora DLMM liquidity, JitoSOL collateral, Pyth oracle)
- 🔄 Additional LP onboarding + deeper liquidity
- ⏳ Hyperliquid wsXMR/USD market (HIP-3 proposal drafted)
- ⏳ Third-party audit + bug bounty ahead of broader scaling
- ⏳ Multi-chain expansion
- Sequence diagrams — mint/burn/liquidation flows
- Seed storage design
- LP node README
- Solana program
Experimental protocol software provided "as is." It has undergone security review but not formal third-party audit certification or formal verification. The developers assume no liability for losses. Interact at your own risk.
MIT
Built with ❤️ for privacy and decentralization