Skip to content

Instantly share code, notes, and snippets.

@mgild
Created May 6, 2025 03:11
Show Gist options
  • Save mgild/f6d1a8e54a9da454f82f023e5fdb41ef to your computer and use it in GitHub Desktop.
Save mgild/f6d1a8e54a9da454f82f023e5fdb41ef to your computer and use it in GitHub Desktop.
running 1 test
Initializing state
Connecting to RPC: https://switchboard.rpcpool.com/5f7ec120-9628-40c4-997f-0cdb4135e059
Connected to RPC
Loaded payer
Markets: 19
====== Market Details ======
Lifinity market ID: W5s3YFGHyMnWqYxkdfimB6AgMPiofDm5S5ndjqdvPuy
Swap: SOL -> USDSwr9ApdHk5bvJKMjzff41FfuX8bSxdKcR81vTwcA
Amount in: 5 SOL
Market curve type: 0
Fee structure: trade_fee=0/1000000, owner_fee=100/1000000
Local price: 721.121921 (6 decimals)
Simulation price: 721.121726
Difference: 0.0000%
Error in bips: 0.00 bp
✅ Error is within 1% - GOOD!
====== Market Details ======
Lifinity market ID: FuTkxuFrEkjj61FPpW3KGBX8287bb2Bhj4ZnLVsYRgJ4
Swap: SOL -> Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB
Amount in: 5 SOL
Market curve type: 0
Fee structure: trade_fee=0/1000000, owner_fee=0/1000000
Local price: 719.268008 (6 decimals)
Simulation price: 718.492335
Difference: 0.1078%
Error in bips: 10.78 bp
✅ Error is within 1% - GOOD!
====== Market Details ======
Lifinity market ID: DrRd8gYMJu9XGxLhwTCPdHNLXCKHsxJtMpbn62YqmwQe
Swap: SOL -> EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v
Amount in: 5 SOL
Market curve type: 0
Fee structure: trade_fee=0/1000000, owner_fee=0/1000000
Local price: 718.426721 (6 decimals)
Simulation price: 718.426721
Difference: 0.0000%
Error in bips: 0.00 bp
✅ Error is within 1% - GOOD!
====== Market Details ======
Lifinity market ID: HyGVf4UhoQ4ux9ueZgTCf6aJwCcvWqeWf258ZtbeRteV
Swap: SOL -> Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB
Amount in: 5 SOL
Market curve type: 0
Fee structure: trade_fee=0/1000000, owner_fee=100/1000000
Local price: 720.222946 (6 decimals)
Simulation price: 720.222946
Difference: 0.0000%
Error in bips: 0.00 bp
✅ Error is within 1% - GOOD!
====== Market Details ======
Lifinity market ID: AA3dbng9wdvLxwktdsfk5SsNE6SdJk1wNBEYho6xS1Cy
Swap: SOL -> hntyVP6YFm1Hg25TN9WGLqM12b8TQmcknKrdu1oxWux
Amount in: 5 SOL
Market curve type: 0
Fee structure: trade_fee=0/1000000, owner_fee=200/1000000
Local price: 192.31398075 (8 decimals)
Simulation price: 192.31398075
Difference: 0.0000%
Error in bips: 0.00 bp
✅ Error is within 1% - GOOD!
====== Market Details ======
Lifinity market ID: 5zvhFRN45j9oePohUQ739Z4UaSrgPoJ8NLaS2izFuX1j
Swap: SOL -> Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB
Amount in: 5 SOL
Market curve type: 0
Fee structure: trade_fee=0/1000000, owner_fee=50/1000000
Local price: 720.112704 (6 decimals)
Simulation price: 719.962954
Difference: 0.0207%
Error in bips: 2.07 bp
✅ Error is within 1% - GOOD!
====== Market Details ======
Lifinity market ID: 71GHcjkwmtM7HSWBuqzjEp96prcNNwu1wpUywXiytREU
Swap: SOL -> EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v
Amount in: 5 SOL
Market curve type: 0
Fee structure: trade_fee=0/1000000, owner_fee=0/1000000
Local price: 719.264163 (6 decimals)
Simulation price: 719.064693
Difference: 0.0277%
Error in bips: 2.77 bp
✅ Error is within 1% - GOOD!
====== Market Details ======
Lifinity market ID: Gkt4BpMRFxhhrrVMQsewM74ggriAbxyN2yUYDD9qt1NV
Swap: SOL -> EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v
Amount in: 5 SOL
Market curve type: 0
Fee structure: trade_fee=0/1000000, owner_fee=50/1000000
Local price: 719.677749 (6 decimals)
Simulation price: 719.677749
Difference: 0.0000%
Error in bips: 0.00 bp
✅ Error is within 1% - GOOD!
====== Market Details ======
Lifinity market ID: Cx8eWxJAaCQAFVmv1mP7B2cVie2BnkR7opP8vUh23Wcr
Swap: SOL -> EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v
Amount in: 5 SOL
Market curve type: 0
Fee structure: trade_fee=0/1000000, owner_fee=40/1000000
Local price: 719.836243 (6 decimals)
Simulation price: 719.836243
Difference: 0.0000%
Error in bips: 0.00 bp
✅ Error is within 1% - GOOD!
====== Market Details ======
Lifinity market ID: 86eq4kdBkUCHGdCC2SfcqGHRCBGhp2M89aCmuvvxaXsm
Swap: SOL -> EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v
Amount in: 5 SOL
Market curve type: 0
Fee structure: trade_fee=0/1000000, owner_fee=50/1000000
Local price: 720.014077 (6 decimals)
Simulation price: 720.786597
Difference: 0.1072%
Error in bips: 10.72 bp
✅ Error is within 1% - GOOD!
====== Market Details ======
Lifinity market ID: EiEAydLqSKFqRPpuwYoVxEJ6h9UZh9tsTaHgs4f8b8Z5
Swap: SOL -> Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB
Amount in: 5 SOL
Market curve type: 0
Fee structure: trade_fee=0/1000000, owner_fee=0/1000000
Local price: 719.331277 (6 decimals)
Simulation price: 719.431021
Difference: 0.0138%
Error in bips: 1.38 bp
✅ Error is within 1% - GOOD!
====== Market Details ======
Lifinity market ID: EoPqvR5ZcjiSeJWBfgo4cCwVxnv1gbqSwsXVKnxJVhix
Swap: SOL -> EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v
Amount in: 5 SOL
Market curve type: 0
Fee structure: trade_fee=0/1000000, owner_fee=400/1000000
Error: Transaction result unexpected value: BundleResultData {
context: Context {
apiVersion: "2.1.21",
slot: 338126669,
},
value: ParsedValue {
summary: Failed {
failed: Failed {
error: FailedError {
transaction_failure: [
"Error processing Instruction 6: custom program error: 0x1784",
],
},
tx_signature: "4EWFqCpFoTShawKQRQgjaJDXzGEc3BVW5oPvqxPUi69cbNPhs2UkzbRVB3LcxQCwFqKSPfwbKMWNpLmWkHvwGeVg",
},
},
transactionResults: [],
},
}
🎉 All markets have simulation error < 1%
test exchanges::lifinity_v2::lifinity_v2::tests::test_swap_lifinity_full ... ok
test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 12 filtered out; finished in 48.28s
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment