Skip to content

Commit cde6b0d

Browse files
author
Edward (mikemaccana-edwardbot)
committed
docs: "on-chain" → "onchain" throughout
One word, like "online". Per Solana Foundation and US government style.
1 parent 28eea9a commit cde6b0d

8 files changed

Lines changed: 14 additions & 14 deletions

File tree

defi/asset-leasing/anchor/README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Asset Leasing
22

3-
**On-chain securities lending.** Long holders rent out fungible token
3+
**Onchain securities lending.** Long holders rent out fungible token
44
inventory to short sellers. Borrowers post collateral, pay a
55
second-by-second lending fee, and return equivalent tokens before
66
expiry. If the borrowed asset rallies past the maintenance margin,
@@ -9,15 +9,15 @@ returns equivalent tokens cheaply.
99

1010
This is the same primitive that underpins traditional securities
1111
lending: long inventory holders (exchange-traded funds and pension
12-
funds in traditional finance; passive holders on-chain) earn yield on
12+
funds in traditional finance; passive holders onchain) earn yield on
1313
assets they would hold anyway, and short sellers and arbitrageurs get
1414
the borrow they need. The program is written in Anchor; a parallel
15-
[Quasar port](#7-quasar-port) implements the same on-chain behaviour.
15+
[Quasar port](#7-quasar-port) implements the same onchain behaviour.
1616

1717
The code uses `lessor` / `lessee` identifiers throughout — those names
1818
predate the framing change and stay as-is so the source is grep-able.
1919
The README freely uses **lender** for the lessor and **borrower** (or
20-
**short seller**) for the lessee; they refer to the same on-chain
20+
**short seller**) for the lessee; they refer to the same onchain
2121
roles.
2222

2323
Every instruction handler is walked through with the exact token
@@ -155,14 +155,14 @@ sells them on Jupiter for ~18 000 USDC at the spot price.
155155
accrued lease fee. The remaining ~22 000 USDC (minus fees paid)
156156
refunds to Bob.
157157
- Bob's profit ≈ `$18 000 − $16 000 − fees − trading costs ≈ $2 000`
158-
minus carry. This is a 30-day short on NVIDIA, expressed on-chain.
158+
minus carry. This is a 30-day short on NVIDIA, expressed onchain.
159159

160160
The asymmetry: liquidation only ever fires when the *borrowed* asset
161161
rallies against the collateral. A drop in the borrowed asset price is
162162
purely beneficial to the borrower. The streaming lending fee is the
163163
position's only ongoing cost in either direction.
164164

165-
§4 walks the on-chain token flows for each path with abstract numbers
165+
§4 walks the onchain token flows for each path with abstract numbers
166166
that match the LiteSVM tests; the example above is the same machinery
167167
applied to a real asset pair.
168168

@@ -1100,7 +1100,7 @@ size, or simply want fewer layers between your code and the runtime.
11001100

11011101
The port implements the same seven instruction handlers, the same
11021102
`Lease` state account, the same program-derived address seed conventions, and produces the
1103-
same on-chain behaviour for every happy-path and adversarial test in
1103+
same onchain behaviour for every happy-path and adversarial test in
11041104
this README.
11051105

11061106
### Building and testing

defi/asset-leasing/anchor/programs/asset-leasing/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ anchor-spl = "1.0.0"
3333
# oracles/pyth/anchor example is flagged "not building" for the same reason).
3434
# Instead we parse the fixed layout of the Pyth Receiver `PriceUpdateV2`
3535
# account by hand in `instructions/liquidate.rs`, matching the published
36-
# on-chain schema.
36+
# onchain schema.
3737

3838
[dev-dependencies]
3939
# Match the test stack used by tokens/escrow and tokens/token-fundraiser so

defi/asset-leasing/anchor/programs/asset-leasing/src/constants.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,6 @@ pub const MAX_MAINTENANCE_MARGIN_BASIS_POINTS: u16 = 50_000;
2323
pub const MAX_LIQUIDATION_BOUNTY_BASIS_POINTS: u16 = 2_000;
2424

2525
/// A Pyth price update is considered stale if its `publish_time` is older
26-
/// than this many seconds versus the current on-chain clock. 60 s matches the
26+
/// than this many seconds versus the current onchain clock. 60 s matches the
2727
/// default staleness window used in the Pyth SDK docs.
2828
pub const PYTH_MAX_AGE_SECONDS: u64 = 60;

defi/asset-leasing/quasar/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ check-cfg = [
1515
]
1616

1717
[lib]
18-
# `cdylib` for the on-chain .so; `lib` so `cargo test` can link the Rust
18+
# `cdylib` for the onchain .so; `lib` so `cargo test` can link the Rust
1919
# code as a regular library and exercise handlers against QuasarSvm.
2020
crate-type = ["cdylib", "lib"]
2121

defi/asset-leasing/quasar/src/constants.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,6 @@ pub const MAX_MAINTENANCE_MARGIN_BASIS_POINTS: u16 = 50_000;
2323
pub const MAX_LIQUIDATION_BOUNTY_BASIS_POINTS: u16 = 2_000;
2424

2525
/// A Pyth price update is considered stale if its `publish_time` is older
26-
/// than this many seconds versus the current on-chain clock. 60 s matches
26+
/// than this many seconds versus the current onchain clock. 60 s matches
2727
/// the default staleness window used in the Pyth SDK docs.
2828
pub const PYTH_MAX_AGE_SECONDS: u64 = 60;

defi/asset-leasing/quasar/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ use instructions::*;
1212
mod tests;
1313

1414
// Same program id as the Anchor version so off-chain tooling that derives
15-
// program-derived addresses or looks up the program on-chain works against both binaries
15+
// program-derived addresses or looks up the program onchain works against both binaries
1616
// interchangeably.
1717
declare_id!("Lease11111111111111111111111111111111111111");
1818

defi/asset-leasing/quasar/src/state.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ impl LeaseStatus {
3232
///
3333
/// Field order mirrors the Anchor version; integers are promoted to their
3434
/// `PodXX` counterparts by the `#[account]` macro so the struct stays
35-
/// alignment-1 and the on-chain bytes match Anchor's little-endian layout
35+
/// alignment-1 and the onchain bytes match Anchor's little-endian layout
3636
/// (after the one-byte Quasar discriminator replaces Anchor's 8-byte
3737
/// sha256 prefix).
3838
#[account(discriminator = 1)]

defi/asset-leasing/quasar/src/tests.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -595,7 +595,7 @@ fn close_expired_call(scenario: &Scenario) -> (Instruction, Vec<Account>) {
595595

596596
/// After a successful `create_lease`, install the resulting vault + lease
597597
/// state in the SVM database so the next handler call has something to
598-
/// read from. Copies the authentic on-chain bytes (discriminator, token
598+
/// read from. Copies the authentic onchain bytes (discriminator, token
599599
/// amounts, lease fields) straight out of the previous execution result.
600600
fn commit_state<'a>(
601601
svm: &mut QuasarSvm,

0 commit comments

Comments
 (0)