Skip to content

Conversation

youssefea
Copy link
Contributor

What changed? Why?

Adding a guide for developers using the new Base <> Solana bridge

@cb-heimdall
Copy link
Collaborator

cb-heimdall commented Oct 2, 2025

🟡 Heimdall Review Status

Requirement Status More Info
Reviews 🟡 0/1
Denominator calculation
Show calculation
1 if user is bot 0
1 if user is external 0
2 if repo is sensitive 0
From .codeflow.yml 1
Additional review requirements
Show calculation
Max 0
0
From CODEOWNERS 0
Global minimum 0
Max 1
1
1 if commit is unverified 0
Sum 1

@cb-heimdall
Copy link
Collaborator

Review Error for kmk142789 @ 2025-10-06 14:32:37 UTC
User must have write permissions to review

The Base-Solana bridge enables bidirectional token transfers and message passing between Base and Solana networks. This bridge allows you to:

* **Transfer tokens** between Base and Solana
* **Send arbitrary cross-chain messages**

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe also mention the ability to combine transfer + calls

## How it works

### On Base
The Base bridge contract locks or burns your tokens and emits a message. Validators collect these messages into Merkle trees and post roots to Solana every ~15 minutes. You then prove your message exists in the tree to complete the transfer on Solana.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The bridge contract locks or burns when sending messages from Base -> Solana. It also mints / unlocks tokens when receiving messages from Solana. Also, validators do not build merkle trees, this is done directly in the Bridge contract itself, and validators verify the merkle root every 300 finalized blocks to be relayed to Solana

</Tip>

### On Solana
The Solana bridge program locks or burns your tokens and emits events. Validators relay these messages to Base where they're executed through your personal Twin contract - a smart contract that acts as your execution context on Base.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a smart contract that acts as your execution context on Base.

Is this redundant after the Tip right before it?

</Tip>

### On Solana
The Solana bridge program locks or burns your tokens and emits events. Validators relay these messages to Base where they're executed through your personal Twin contract - a smart contract that acts as your execution context on Base.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

where they're executed through your personal Twin

This is only for messaging, but not for token transfers


## Solana to Base

**Flow:** Lock SOL → Auto-Relay → Mint wSOL on Base

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
**Flow:** Lock SOL → Auto-Relay → Mint wSOL on Base
**Flow:** Lock SOL → Auto-Relay → Mint SOL on Base

</Card>
</CardGroup>

## Solana to Base

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this section should probably make it clear that the bridge is a pull-based model in the Solana -> Base direction as well. Meaning a bridge flow requires 3 steps:

  1. Initiate the bridge on Solana
  2. Wait for validators to pre-approve the message
  3. Execute the message on Base

We will be operating a relayer service that will handle step 3 for users that only want to worry about the init tx on Solana


The Solana to Base flow in this example uses automatic relay for seamless transfers. Your SOL is locked in a Solana vault, and the relayer automatically executes the message on Base to mint wrapped SOL.

<GithubRepoCard title="Solana to Base Example" githubUrl="https://github.com/basebase-bridge-examples/tree/main/solToBaseWithAutoRelay" />

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought more about this and you can probably just link to https://github.com/base/bridge/blob/main/scripts/src/commands/sol/onchain/bridge/solana-to-base/bridge-sol.handler.ts which is what I based my example off of

To bridge custom SPL tokens,
you need to create wrapped ERC20 representations on Base using the CrossChainERC20Factory.

<GithubRepoCard title="Token Wrapping Example" githubUrl="https://github.com/basebase-bridge-examples/tree/main/wrapSolTokenOnBase" />

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


**Key Programs:**
- [**Bridge Program**](https://github.com/base/bridge/blob/main/solana/programs/bridge): Handles outgoing transfers
- [**Base Relayer Program**](https://github.com/base/bridge/blob/main/solana/programs/base_relayer): Coordinates message relay

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The relayer program is not part of the core bridge - this is a convenience feature we are operating on top of the bridge to reduce friction in the Solana -> Base direction

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants