Σv0.1.0 — Phase 2 Complete

Smart contracts, safe by default.

Symvasi is a contract language for SUM-Chain. It compiles to WASM, enforces safety at the compiler level, and reads like pseudocode. No lifetimes. No footguns. Just contracts.

$cargo install --path crates/symvasi-cli
counter.sym
1contract Counter {
2 pub storage count: u64
3 storage owner: Address
4
5 event Incremented { by: Address, new_value: u64 }
6
7 @init
8 fn deploy() {
9 self.owner = caller()
10 self.count = 0
11 }
12
13 @call
14 pub fn increment() {
15 self.count += 1
16 emit Incremented { by: caller(), new_value: self.count }
17 }
18
19 @view
20 pub fn get() -> u64 { self.count }
21}

Why Symvasi?

Every design decision serves one goal: contracts that are correct, readable, and auditable.

🛡️

Safety First

Checked arithmetic, no overflow surprises. Every footgun from other contract languages is a compiler error in Symvasi.

📖

Explicit Over Implicit

Visibility, mutability, and error handling are always stated, never assumed. No hidden defaults or gotchas.

Compiles to WASM

Targets SUM-Chain via WebAssembly. Fast execution, small binary sizes, and deterministic behavior.

🧰

Built-in Toolchain

One tool does it all: sym build, sym check, sym fmt, sym test. No ecosystem fragmentation.

🔍

Static Analysis

The compiler catches reentrancy risks, storage mutation in views, missing visibility, and more — before deployment.

🎯

Accessible Design

No lifetimes, no raw pointers, no manual memory management. If you can read pseudocode, you can write Symvasi.

What the compiler catches for you

These are real bugs that have cost millions in other smart contract languages. In Symvasi, they are compile-time errors.

COMPILE ERROR
view_mutation.sym
@view
pub fn get() -> u64 {
self.count = 5 // error: cannot mutate
self.count // storage inside @view
}

Storage mutation in read-only functions is impossible.

COMPILE WARNING
reentrancy.sym
@call
pub fn withdraw(amount: Balance) {
send(caller(), amount)?
self.balance -= amount // warn: CEI
} // storage write after send()

Reentrancy vulnerabilities are flagged automatically.

COMPILE ERROR
visibility.sym
pub fn _helper() -> bool {
// error: pub on _-prefixed
// function is not allowed
true
}

Visibility rules are enforced — no accidental exposure.

RUNTIME REVERT
overflow.sym
let x: u8 = 255
x + 1 // revert: ArithmeticOverflow
let y = 10 / 0 // revert: DivisionByZero

All arithmetic is checked. No silent overflow, ever.

Ready to write contracts?

Follow the step-by-step tutorial to write and compile your first Symvasi contract in minutes.

Start Learning →