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.
| Instruction | LiteSVM lowest | LiteSVM highest | Runs | Localnet CU |
|---|---|---|---|---|
initialize | 32,732 | 32,732 | 1 | 32,736 |
update_config | 11,145 | 11,145 | 1 | 11,145 |
admit | 16,470 | 16,613 | 3 | 16,535 |
deposit | 26,782 | 29,338 | 3 | 22,282 |
withdraw | 23,886 | 23,886 | 1 | 25,386 |
list_instrument | 17,312 | 17,312 | 1 | 18,833 |
issue | 17,551 | 28,126 | 3 | 19,009 |
post_offer | 28,231 | 31,282 | 3 | 34,223 |
cancel_offer | 18,056 | 18,056 | 1 | 21,056 |
take_offer | 41,558 | 44,399 | 2 | 54,861 |
post_repo_offer | 29,657 | 31,157 | 2 | 35,610 |
cancel_repo_offer | 12,825 | 12,825 | 1 | 12,825 |
take_repo_offer | 31,203 | 32,872 | 2 | 35,830 |
repay_repo | 16,850 | 16,850 | 1 | 16,850 |
settle_default | 14,701 | 14,701 | 1 | 14,657 |
pay_income | 20,168 | 20,168 | 3 | 15,701 |
claim_income | 19,444 | 34,520 | 8 | 26,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.
| Account | Bytes | Rent on the local validator (lamports) | Seeds |
|---|---|---|---|
Ledger | 172 | 2,088,000 | "ledger" |
Member | 157 | 1,983,600 | "member", wallet |
Instrument | 208 | 2,338,560 | "instrument", code |
Position | 120 | 1,726,080 | "position", owner, asset |
Offer | 114 | 1,684,320 | "offer", maker, id (u64, little-endian) |
RepoOffer | 110 | 1,656,480 | "repo_offer", lender, id (u64, little-endian) |
Repo | 185 | 2,178,480 | "repo", borrower, id (u64, little-endian) |
The cash vault is a classic SPL token account:
| Account | Bytes | Rent on the local validator (lamports) |
|---|---|---|
| Cash vault | 165 | 2,039,280 |