L1BridgeZap
Last updated
Last updated
L1BridgeZap
This contract is responsible for handling user Zaps into the SynapseBridge contract, through the Synapse Swap contracts. It does so It does so by combining the action of addLiquidity() to the base swap pool, and then calling either deposit() or depositAndSwap() on the bridge. This is done in hopes of automating portions of the bridge user experience to users, while keeping the SynapseBridge contract logic small.
This contract should be deployed with a base Swap.sol address and a SynapseBridge.sol address, otherwise, it will not function.
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Calculate the amount of underlying token available to withdraw when withdrawing via only single token
A simple method to calculate prices from deposits or withdrawals, excluding fees but including slippage. This is helpful as an input into the various "min" parameters on calls to fight front-running
This shouldn't be used outside frontends for user estimates.
Wraps SynapseBridge deposit() function
Wraps SynapseBridge depositAndSwap() function
Wraps SynapseBridge deposit() function to make it compatible w/ ETH -> WETH conversions
Wraps SynapseBridge depositAndSwap() function to make it compatible w/ ETH -> WETH conversions
Wraps SynapseBridge redeem() function
Wraps redeemAndRemove on SynapseBridge Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain. This function indicates to the nodes that they should attempt to redeem the LP token for the underlying assets (E.g "swap" out of the LP token)
Wraps redeemAndSwap on SynapseBridge.sol Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain. This function indicates to the nodes that they should attempt to redeem the LP token for the underlying assets (E.g "swap" out of the LP token)
Wraps SynapseBridge redeemv2() function
Combines adding liquidity to the given Swap, and calls deposit() on the bridge using that LP token
Combines adding liquidity to the given Swap, and calls depositAndSwap() on the bridge using that LP token
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|