跨链桥是如何工作的?
大多数跨链桥使用锁定和铸币模型在链之间移动价值。这是它在实践中的工作原理:
1. Alice 将令牌 A 单元发送到源链(例如以太坊)上的特定地址并支付交易费用。
2. Alice 的代币 A 由可信验证者锁定在智能合约中或由可信保管人持有。
3. 在目标区块链(例如 Polygon)上铸造相同单位的代币 B。
4. Alice 在她的钱包地址中收到代币 B,可以自由使用它在新区块链上执行交易。
但是,如果 Alice 在第二条链上完成了她的业务并需要令牌 A 怎么办?这就是刻录机制发挥作用的地方:
1. Alice 将剩余的令牌 B 单元发送到第二条链上的特定地址。这些令牌在不可恢复的意义上被“销毁”。
2. 验证人或托管人触发源链上 Alice 的 Token A 的释放。然后爱丽丝在她的原始钱包中收到释放的资金。
了解跨链桥的真正工作原理至关重要。您实际上无法将 BTC 发送到以太坊网络上的地址。要么您的交易失败,要么您将损失资金。
跨链桥的工作原理是将代币“包装”在智能合约中,并发行可在另一条链上使用的原生资产。例如,wrapped BTC (wBTC) 是一种使用 BTC 作为抵押品的 ERC-20 代币。用户必须先将 BTC 存入比特币区块链,然后才能在以太坊网络上接收 wBTC 代币。
另一种流行的盘点资产是盘点 ETH (wETH)。这是 ETH 的代币化版本,用于支持 ERC-20 代币的其他平台,例如 Avalanche 或 Arbitrum。
从上面的解释中可以看出,跨链桥接涉及相当大的复杂性。尽管如此,桥梁每天都在流行——所以它们一定有一些好处。
使用跨链桥有哪些潜在风险?
跨链桥无疑有很多好处,但它也有缺点,包括盗窃、无法正常工作和黑客攻击。 让我们进一步分解跨链桥中固有的一些漏洞并举一些例子:
窃取用户资金
在可信网桥的情况下,保管人可以流氓并窃取用户资金。一些桥梁通过强制保管人提供“保证金”来预防这个问题,如果发生恶意行为,该保证金可以被削减。
活性问题
如果验证者或保管者玩忽职守,那么跨链桥可能会停止工作并影响用户。这也带来了审查的风险,尤其是在受信任方拒绝释放资金的情况下。
恶意利用
分散式桥梁旨在减少信任假设并确保用户更好的安全性。在大多数情况下,无需信任的区块链桥接器使用预言机和智能合约来管理资产桥接。
问题很明显:智能合约总是可以被利用。一些最大的桥接黑客攻击,包括价值 6 亿美元的 Poly Network 漏洞利用和价值 3.5 亿美元的虫洞攻击,都是使用易受攻击的智能合约造成的。
What are some of the best cross-chain bridges?
Some of the best cross-chain bridges are:
Connext
Synapse
Wormhole
Ren Bridge
Polygon PoS Bridge
cBridge
Binance Bridge
Connext
The most secure cross-chain protocol (as secure as the blockchains it connects)
Low fees
Allows developers to build cross-chain applications on top of it
Synapse
Trustless cross-chain bridge for moving assets and swapping tokens
Users can earn passive income by staking and providing liquidity
Earn profits through by leveraging Synapse Network’s cross-chain automated market maker (AMM)
Wormhole
Decentralized bridge for moving assets between Solana and Ethereum, but also supports other chains (Terra, Avalanche, Oasis, BSC, Polygon)
Provides seamless access to Solana’s low-fee and high-throughput blockchain
Uses smart contracts to manage lock-and-mint process, increasing safety of token
Support both token and NFT transfers
Ren Bridge
Ren Bridge connects multiple blockchains (Bitcoin, Ethereum, BSC, Luna, etc.) and increases interoperability
One of the best bridges for bridging BTC to Ethereum network
Users enjoy full privacy on transactions (no KYC/AML)
Polygon PoS Bridge
Trustless bridge for transferring assets between Polygon sidechain and Ethereum Mainnet
Supports more than just tokens–users can also bridge NFTs from Polygon to Ethereum and vice-versa
Low gas fees
Decentralized bridging mechanism increases security of user assets
cBridge
Allows for quick and seamless cross-chain transfer of liquidity
Users don’t have to pay high fees for bridging tokens
Supports multiple chains including Ethereum, EVM-compatible chains (Avalanche, Fantom), and Layer 2 protocols (Optimism, Polygon, etc.)
Binance Bridge
Trusted bridge for transferring assets between Binance Smart Chain and Ethereum
Fast processing times and cheap transaction fees
Users can redeem wrapped tokens for original assets anytime
Best way to access popular BSC DeFi dApps (PancakeSwap, Venus, BeefyFinance)
Conclusion
Cross-chain bridges are critical to a multichain future and can unlock massive value for the blockchain ecosystem. By promoting seamless interoperability between previously-siloed blockchain networks, bridges enable users to access greater liquidity and better UI while extracting more value from owned assets.
And although cross-chain bridges are useful, they pose several risks if improperly designed. Both users and developers must evaluate the security guarantees of any bridge before using it.
Are you a budding blockchain developer or crypto-curious individual? Create a free Alchemy account to start developing on leading blockchains and layer 2 networks.
https://www.alchemy.com/overviews/cross-chain-bridges