anza-xyz / octane

Octane is a gasless transaction relayer for Solana.
Apache License 2.0
228 stars 141 forks source link

Endpoints/actions for gasless swap to SOL using Whirlpools #19

Closed sevazhidkov closed 2 years ago

sevazhidkov commented 2 years ago

This PR introduces gasless swaps to SOL from selected tokens using Whirlpools!

It works through two actions/endpoints:

The first endpoint builds a transaction for user to sign with pre-filled Whirlpools instructions. The second endpoint signs it from fee payer's side and submits the transaction to network.

The implementation leverages MessageTokens that provide anti-tampering capabilities, while keeping Octane stateless. More context is available here: packages/core/src/actions/signGeneratedTransaction.ts