wormhole-foundation / example-liquidity-layer

Apache License 2.0
13 stars 12 forks source link

add lightweight message to replace `Deposit` #50

Open a5-pickle opened 7 months ago

a5-pickle commented 7 months ago

The Deposit message comes from the [Wormhole Circle Integration], but it has more fields than we need.

Introduce a lightweight message (maybe called CctpMessage?) that only has the following fields:

Source CCTP domain may not be needed because the emitter chain in the VAA should determine the source network.

This will save 128 bytes, which results in 6960 * 128 = 890880 lamports for the posted VAA account per order settlement.

Notes

We may want to introduce this change to the Wormhole CCTP Library introduced in this PR and a corresponding change to the WIP Solana lib.

a5-pickle commented 7 months ago

Also consider increasing the payload length from u16 to u32, which would reduce the cost savings to 126 bytes.