Open the app

Measured figures

Compute units each instruction used, in the program's tests and on the local validator, and the size and rent of every account.

Compute per instruction

Two measurements, both compute units for the whole instruction with its CPIs, the event's self-CPI among them. LiteSVM 0.18.2 ran each instruction as the only instruction of a v0 transaction in the program's settlement tests; where a test ran it more than once, the range is its lowest and highest run, and the spread comes from PDA bump searches, accounts created on first use, and an offer closed by its last fill. The Localnet column is one landed transaction per instruction on the local validator, read from its consumed N of M log line.

InstructionLiteSVM lowestLiteSVM highestRunsLocalnet CU
initialize32,73232,732132,736
update_config11,14511,145111,145
admit16,47016,613316,535
deposit26,78229,338322,282
withdraw23,88623,886125,386
list_instrument17,31217,312118,833
issue17,55128,126319,009
post_offer28,23131,282334,223
cancel_offer18,05618,056121,056
take_offer41,55844,399254,861
post_repo_offer29,65731,157235,610
cancel_repo_offer12,82512,825112,825
take_repo_offer31,20332,872235,830
repay_repo16,85016,850116,850
settle_default14,70114,701114,657
pay_income20,16820,168315,701
claim_income19,44434,520826,992

The heaviest is take_offer, which moves seven legs and transfers the fee.

Account sizes

Sizes include Anchor's 8-byte discriminator. Rent is the cluster's rent-exempt minimum for the size, read from the Rent sysvar when the account is created; the column shows what it came to on the local validator, and another cluster's rate gives other figures. Who pays it and when it comes back is in Fees and the AGORA token.

AccountBytesRent on the local validator (lamports)Seeds
Ledger1722,088,000"ledger"
Member1571,983,600"member", wallet
Instrument2082,338,560"instrument", code
Position1201,726,080"position", owner, asset
Offer1141,684,320"offer", maker, id (u64, little-endian)
RepoOffer1101,656,480"repo_offer", lender, id (u64, little-endian)
Repo1852,178,480"repo", borrower, id (u64, little-endian)

The cash vault is a classic SPL token account:

AccountBytesRent on the local validator (lamports)
Cash vault1652,039,280