Open gipsh opened 1 year ago
Magpie sent me some data:
first 42 bytes are part of TransferKey:
2 bytes: networkId
32 bytes: senderAddress
8 bytes: our swapSequence
remaining bytes are part of Transaction data:
1 byte: dataTransferType
1 byte: bridgeType
2 bytes: recipientNetworkId (its our networkId not blockchain Id)
32 bytes: fromAssetAddress
32 bytes: toAssetAddress
32 bytes: to (recipient user)
32 bytes: recipientAggregatorAddress
32 bytes: amountOutMin
32 bytes: swapOutGasFee
Network ids of magpie: ethereum: 1 polygon: 2 bsc: 3 avalanche: 4 arbitrum: 5 optimism: 6
There are vaa emitted by this contract
000000000000000000000000ba7bac71a8ee550d89b827fe6d67bc3dca07b104
in some evm chains like bsc, optimism, eth, and others.They seem to be transfers but we dont know how to decode it.
This story is for the research on how to decode this vaas and to implement it on the payload parser.
Look here for more info: https://docs.magpiefi.xyz/magpie-protocol/
some examples here:
4/000000000000000000000000ba7bac71a8ee550d89b827fe6d67bc3dca07b104/1612
23/000000000000000000000000ba7bac71a8ee550d89b827fe6d67bc3dca07b104/3207
The payload always look like this:
The first 4 bytes look like a destionation or origin chain id.