Shielded Types (stypes)
The core concept that makes Seismic special — hide any data just by adding an 's'.
What Are stypes?
This is the magic trick of Seismic. To make any piece of data invisible to the outside world, you just add an s in front of its type:
uint256 publicBalance; // Everyone can see this
suint256 secretBalance; // Nobody can see this
That's it. The s stands for "shielded".
There are shielded versions of all common types:
suint/sint— Hidden numberssbool— Hidden true/falsesaddress— Hidden wallet addresses
To anyone looking at the blockchain, shielded values just show as 0x000. The real value is only visible inside the secure TEE chip.
A Simple Example
Here's what a private token balance looks like on Seismic:
// Private token balances — nobody can see who has what
mapping(saddress => suint256) balanceOf;
function transfer(saddress to, suint256 amount) external {
balanceOf[saddress(msg.sender)] -= amount;
balanceOf[to] += amount;
}
This works just like a normal Ethereum token, but nobody can see the balances or the amounts being transferred. Not even which addresses are involved.
3 Rules to Remember
- You can't return shielded data from public functions — that would expose it!
- Converting stype to normal type reveals the value — be careful with that.
- All normal operations work —
+,-,*,==, etc.
Think of it like sunglasses: once data is shielded, you have to deliberately take the sunglasses off to see it.
Quiz — Test Your Knowledge
4 questions — 25 points each — 100 points max