Proxy apps can be both auto-generated (using TAC’s SDK) or manually deployed. This page covers the auto-generated proxy apps.

Proxy Apps are auto-generated smart contracts that enable direct communication between TON users and EVM applications. They exist on both TON and EVM chains, handling all cross-chain complexities while providing a native experience for users.

Understanding Proxy Apps

A proxy app is a lightweight smart contract that processes calls between different parts of the TAC system. On TON, it handles communication between your wallet and the execution layer. On EVM, it manages interactions between the execution layer and the target application.

When you want to interact with an EVM application through TAC, you don’t need to understand the underlying cross-chain mechanics. The proxy apps handle all the necessary translations and communications automatically.

How Proxy Apps Work

The proxy system operates on both chains:

TON Side Proxy

On the TON chain, the proxy app receives your transaction and prepares it for cross-chain transfer. When you interact with an EVM application, the TON proxy:

  1. Accepts your transaction from your TON wallet
  2. Formats the call data appropriately
  3. Locks any required assets in the bridge wallet
  4. Sends the formatted message to the cross-chain messaging layer
  5. Monitors transaction status and handles confirmations

EVM Side Proxy

The EVM proxy bridges the gap between TAC and the target application:

  1. Receives verified messages from the sequencer network
  2. Handles asset unlocking or minting
  3. Interacts with the target EVM application
  4. Processes return data
  5. Sends results back through the cross-chain layer

Cross-Chain Communication Flow

When you interact with an EVM application through TAC, here’s what happens:

1

Transaction Initiation

You send a transaction using your TON wallet to the TON proxy contract. The proxy formats your request and prepares any assets for cross-chain transfer.

2

Cross-Chain Transfer

The TON proxy creates a cross-chain message containing your transaction details and sends it through TAC’s messaging layer, where sequencers validate and process it.

3

EVM Execution

The EVM proxy receives the validated message, processes any required asset operations, and calls the target application with your requested action.

4

Return Trip

Results from the EVM application flow back through the same path in reverse, eventually reaching your TON wallet.

Integration Example

When integrating with TAC, you’ll work with proxy apps through our SDK. Here’s a simple example:

const tacSdk = new TacSdk({
   network: CHAIN.TESTNET
});

// Interact with EVM app through proxy
await tacSdk.sendJettonWithProxyMsg({
   fromAddress: userAddress,
   jettonAmount: amount,
   proxyMsg: {
       evmTargetAddress: targetAddress,  // Target EVM application
       methodName: 'swap',               // Method to call
       encodedParameters: params         // Method parameters
   }
});

Asset Handling

Proxy apps manage asset transfers securely between chains:

Asset Locking

When sending assets from TON to EVM, the TON proxy locks them in a bridge wallet. This ensures assets can’t be double-spent and maintains the correct token supply across chains.

Asset Minting and Unlocking

The EVM proxy handles asset representation on the EVM side. It can mint new tokens representing locked TON assets or unlock previously bridged tokens, depending on the direction of transfer.

Security Considerations

Proxy apps incorporate several security measures:

Asset Validation

The TON proxy verifies that the actual assets transferred match the transaction parameters. This prevents potential exploits where someone might try to claim they’ve transferred more assets than they actually have.

Transaction Verification

Before executing any operations, the EVM proxy validates that the transaction has been properly approved by the sequencer network through TAC’s consensus mechanism.

Failure Handling

If a transaction fails at any point, proxy apps ensure assets are returned to their owners. The rollback process is automatic and secure, protecting users from losing funds due to failed transactions.

For Developers

Auto-Generation Process

Proxy apps are automatically generated when you integrate your EVM application with TAC. You don’t need to write proxy contract code yourself - TAC handles this automatically.

Testing

Before deploying to mainnet, test your integration using our testnet:

  1. Deploy your application to an EVM testnet
  2. Use the TAC testnet proxy generation
  3. Test cross-chain interactions using test tokens
  4. Verify both TON and EVM side behavior

Common Use Cases

Token Swaps

Users can swap tokens on EVM DEXes directly from their TON wallet. The proxy apps handle all the necessary asset locking, unlocking, and cross-chain messaging automatically.

NFT Markets

Browse and purchase NFTs on EVM marketplaces using TON currency. Proxy apps manage the currency conversion and NFT transfer process seamlessly.

DeFi Integration

Access EVM DeFi protocols through your TON wallet. Proxy apps translate your actions into the appropriate protocol interactions on the EVM side.