Building On Magma
Advanced
Tectonix

Tectonix

Trustless Serverless Functions

⚠️

Public preview: This document is currently in preview mode and may change significantly as we capture and apply feedback. This is advanced concept.

Create and execute immutable cross network serverless functions for encrypted event based signing without the need of scaling your own key infrastructure.

image Magma Tectonix - Trustless Serverless Functions

Use Cases

Multi Sigs & Trustless Execution

Trusted Execution Environments (TEE): Uses Key Shares to trustlessly sign transactions without ever revealing private keys to any party.

Use trusted execution environments (TEE) to seamlessly transfer tokens, messages, coins and other assets across chains, without relying on a centralized bridge or intermediary.

image DistributedKeyGen Distributed Key Shares

Distributed Key Shares are a form of account abstraction (EIP-4337 for EVM) and can be used for Multi Party Computation as well. In this model the private key is distributed by multiple parties – each holding private data. With each transaction request, this data is evaluated without ever revealing any of the private data held by each party. The escrow-like vault's private key is divided, encrypted, and stored across nodes in the network where only an authorized party can decrypt, recombine the key shares and generate a signing key to complete the transaction.

  • Cross chain bridges
  • Oracles (off chain data)
  • Multi Sigs

DeFi Automation

Automate DeFi (same chain or cross chain) to execute limit orders, LP rebalancing, cross network liquid staking, conditional transaction execution, off-chain triggers and more.

  • Generate transaction data for cross DEX arb
  • Acquire transaction signatures
  • Sign arbitrary messages
const sdk = new SDK(TECTONIX_OWNER_PRIVATE_KEY, TECTONIX_PUBLIC_KEY, MAGMA_TESTNET_PROVIDER);

const approveTx = await sdk.executeApprove(
   TOKEN_ADDRESS,
   SwapRouter02_ADDRESS,
   MaxUint256
);
await approveTx.wait();

const swapTx = await sdk.executeUniswapV3SwapExactInputSingle(SwapRouter02_ADDRESS, { /* Swap Attributes */ });
await swapTx.wait();

Fetch off-chain data

Get off chain data from remote APIs and use data fully on chain.

Verified Credentials

Issue immutable verifiable credentials programmatically at scale, based on on-chain or off-chain conditions.

  • Account abstraction with support for web2 (i.e. Twitter Auth, Apple Passkey)
  • Privacy preserving login
  • Sybil protection