Repository navigation
Releases
v0.8.0
What's New (summary)
- Confidential Token (new crate
stellar-confidential): SEP-41 tokens with private balances and transfers. Balances are Pedersen commitments on the Grumpkin curve, every operation that consumes private state carries an UltraHonk proof verified cross-contract, and auditors recover amounts through per-transfer ECDH. The crate ships the token, an auditor key registry, a verification key registry, and a compliance extension (freezing, SACauthorized()passthrough, external authorization policy, clawback). Noir circuits with pinned verification keys live inpackages/confidential/circuits, andexamples/confidentialhas a compliant token, an allowlist policy, and a factory. - Fungible and non-fungible contract types:
Compose<(...)>selects the contract type by listing the extensions a token is made of; invalid combinations fail to compile with a diagnostic naming the offending pair- total supply tracking is an opt-in
TotalSupplyextension Cappedis a contract type that enforces the cap on every mint path- Allowlist and Blocklist can be combined
- non-fungible Votes works with Enumerable and Consecutive, and Consecutive works with Royalties
- RWA:
- seven compliance modules ported from T-REX: country allow, country restrict, initial lockup period, max balance, supply limit, time-windowed transfer limits, and transfer allow, each with an example under
examples/rwa/ - batch operations, muxed address support, and mint pause
- recovery and identity registry fixes
- seven compliance modules ported from T-REX: country allow, country restrict, initial lockup period, max balance, supply limit, time-windowed transfer limits, and transfer allow, each with an example under
- Vault: deposits that mint zero shares and redemptions that return zero assets are rejected; the virtual supply is bounded and reported in
max_depositandmax_mint. - Smart Accounts: the signed digest binds the smart account address; spending-limit history is capped at the reachable ledger entry limit; new smart account factory example.
- Contract Utils: Grumpkin curve arithmetic;
Wadgainsln,exp,powiandpowf;I256mul_divrecovers from phantom overflow. - Fee Abstraction:
Eagerconsumes the whole approval and requires a balance-conserving fee token. - Error codes are unique across all packages, and each package owns a disjoint range (see
Architecture.md).
Breaking Changes
- Smart Accounts: signers commit to
sha256(AuthDigestPreimage { account, signature_payload, context_rule_ids }.to_xdr()), andDelegatedsigners authorize__check_authwith the preimage struct. Off-chain signing flows must be updated; see the migration guide inpackages/accounts/README.md. - Total supply: fungible tokens track the total supply only with the
TotalSupplyextension (RWA,VaultandCappedrequire it), and the counter moved out of instance storage. Tokens upgraded from v0.7.x must migrate it withmigrate_total_supply(seeexamples/upgradeable/v2). - Minting: mint through the selected contract type,
<Self as FungibleToken>::ContractType::mint(...). Calling a primitive such asBase::mintdirectly still compiles but skips the contract type's bookkeeping (supply counter, cap, voting units, enumeration). - RWA compliance: the
CanTransferandCanCreatehooks are removed.Transferred,CreatedandDestroyedboth enforce the rule (by panicking) and update module state, and module hooks receiveAccountSnapshots. - Error codes: most
#[contracterror]codes changed. Clients and tests that match on numeric codes must be updated. - Non-fungible:
get_approvedpanics withNonExistentTokenfor a nonexistent token instead of returningNone.
Security
- Smart Accounts: a
Delegatedsigner that is the contract of a context being authorized is rejected withDelegatedSignerIsContextContract, and a smart account can no longer be its ownDelegatedsigner (SelfDelegatedSigner).
What's Changed (detailed)
- Library conventions by @ozgunozerk in #689
- improve skill by @ozgunozerk in #691
- Power function for float raised by float by @ozgunozerk in #693
- apply fix for approve_for_all by @ozgunozerk in #695
- RWA: fix IRS event and max registries limit by @brozorec in #696
- rwa forced transfer fix by @ozgunozerk in #714
- mint pause mechanisms for rwa storage by @ozgunozerk in #717
- feat(confidential): noir primitives library for confidential token circuits by @brozorec in #712
- feat(confidential): register circuit by @brozorec in #715
- remove operator from freeze event by @ozgunozerk in #719
- compliance module restructure by @ozgunozerk in #723
- feat(crypto): Grumpkin affine point arithmetic by @brozorec in #729
- feat(confidential): Noir withdraw circuit by @brozorec in #727
- Country Compliance Module by @ozgunozerk in #724
- supply and balance compliance modules by @ozgunozerk in #726
- feat(confidential): verifier registry trait by @brozorec in #734
- feat(confidential): auditor key registry by @brozorec in #733
- feat(confidential): Noir transfer circuit by @brozorec in #728
- feat(confidential): Noir set_operator circuit by @brozorec in #730
- feat(confidential): Noir operator_transfer circuit by @brozorec in #731
- feat(confidential): Noir revoke_operator circuit by @brozorec in #732
- rwa compliance small fixes by @ozgunozerk in #737
- feat(confidential): wrapper contract + compliance extension by @brozorec in #735
- doc improvement by @ozgunozerk in #739
- fix(accounts): rm event fields from docstrings by @brozorec in #741
- fixed point todo items by @ozgunozerk in #740
- fix(confidential): event emission and non-canonical encodings by @brozorec in #746
- time limit transfer compliance module by @ozgunozerk in #745
- transfer restrict by @ozgunozerk in #747
- Bump
soroban_sdkand docs fixes by @brozorec in #749 - Rwa initial lockup by @ozgunozerk in #748
- doc fix for onchain id event by @ozgunozerk in #751
- improve checked consistency by @ozgunozerk in #754
- Fix events docstrings by @brozorec in #755
- zero transfer fix by @ozgunozerk in #759
- max balance fail on recovery fix by @ozgunozerk in #760
- remove event assertion crate by @ozgunozerk in #763
- Confidential Token Docs by @brozorec in #756
- Bind register proof to the registering account (audit L-06) by @brozorec in #775
- Gate the spender through the compliance policy (audit L-01) by @brozorec in #776
- Validate Grumpkin point inputs at the public API (audit L-05) by @brozorec in #777
- Match the on-chain Poseidon2 sponge on empty input (audit L-04) by @brozorec in #779
- Clarify registration-time auditor selection (audit L-02) by @brozorec in #780
- Pin the circuit toolchain and document proving flags (audit N-01, N-05) by @brozorec in #788
- Confidential token documentation accuracy fixes (audit N-06, N-09, N-10, N-11) by @brozorec in #789
- Rename verifier
vkidentifiers toverification_key(audit N-02) by @brozorec in #791 - Pass typed payload structs to confidential token hooks (audit N-04) by @brozorec in #790
- Derive the withdraw auditor checkpoint pad from the second sponge squeeze (audit N-07) by @brozorec in #792
- ci: make required check report on docs-only PRs by @brozorec in #797
- Add INDEXER.md indexing/recovery specification (audit N-08) by @brozorec in https://github.com/OpenZeppelin/stellar-contracts/pull/...
v0.7.3
Security release for stellar-accounts. It fixes GHSA-jpg9-m7w4-c7wc: a Signer::Delegated signer could authorize a smart account without any signature. This happened when the delegated address was the contract requesting the account's authorization, or when delegation looped back to the account (self, mutual, or a chain into a mutual pair). All users of stellar-accounts < 0.7.3 should upgrade and redeploy or upgrade their smart account contracts.
Changes
do_check_authrejects aDelegated(addr)signer whenaddris the contract of any context being authorized, via the new publicvalidate_no_delegated_context_contract(SmartAccountError::DelegatedSignerIsContextContract, error #3017).add_context_rule,add_signerandbatch_add_signerreject aDelegatedsigner pointing to the smart account itself, via the new publicvalidate_no_self_delegation(SmartAccountError::SelfDelegatedSigner, error #3018).
Behavior changes
- A contract listed as a
Delegatedsigner can no longer authorize the account just by callingrequire_auth()on it. It now fails with #3017. The delegate must authenticate against the operation digest through its own__check_auth. - A custom
__check_auththat callsauthenticatedirectly, instead ofdo_check_auth, must callvalidate_no_delegated_context_contractfirst.
Notes
- The check runs in the account that authorizes back, so an account is protected only when the accounts it delegates to are also upgraded.
- A
Delegatedsigner must not be an account that delegates its authentication back to the smart account (for example through CAP-71delegate_auth), unless that account authenticates throughdo_check_auth. See the Security Warning onvalidate_no_delegated_context_contract.
Full Changelog: v0.7.2...v0.7.3
v0.8.0-rc.3
This is a release candidate for the audit purposes.
Warning
This release has not yet been audited, and not ready for use in production.
v0.7.2
Bumped soroban_sdk to v26.1.0 that fixed stellar/rs-soroban-sdk#1875 affecting the usage of soroban_sdk::Context in "packages/accounts".
Full Changelog: v0.7.1...v0.7.2
v0.8.0-rc.2
This is a release candidate for the audit purposes.
Warning
This release has not yet been audited, and not ready for use in production.
v0.8.0-rc.1
This is a release candidate for the audit purposes.
Warning
This release has not yet been audited, and not ready for use in production.
v0.7.1
What's Changed
- update publish workflow with stellar cli by @ozgunozerk in #678
- workflow update by @ozgunozerk in #679
- Readme and workflow update by @ozgunozerk in #682
- Readme and contribution by @ozgunozerk in #685
- Governance: timelock trait by @brozorec in #683
- add stellar metadata section to contract cargo.toml files by @knQzx in #680
- prepare release by @brozorec in #687
New Contributors
Full Changelog: v0.7.0...v0.7.1
v0.7.0
What's New (summary)
- Governance + Votes (along with Fungible and NonFungible extension support)
- ZkEmail: DKIM registry
- Smart Accounts rework
- RWA related changes:
- reorganization
- better interface and separation and guidelines for creating a compliance module
- rwa examples in
examplesfolder
What's Changed (detailed)
- Rwa fixes by @ozgunozerk in #550
- use only enums for storage keys by @brozorec in #553
- publish GH workflow by @brozorec in #554
- Update to soroban-sdk v25 by @Oghma in #559
- Governance: Votes by @brozorec in #552
- governance: use ledgers instead of timestamps by @brozorec in #569
- ttl fix for rwa read by @ozgunozerk in #577
- rwa fix by @ozgunozerk in #575
- nft live until ledger upper bound by @ozgunozerk in #584
- Governance base contract by @ozgunozerk in #563
- consistent macro errors by @ozgunozerk in #587
- add warning for add-to-owner by @ozgunozerk in #589
- transfer role live until ledger fix by @ozgunozerk in #591
- Fixed point error handling by @ozgunozerk in #580
- Remove Upgradeable derive macros by @brozorec in #585
- RWA: domain separators in claim issuer and metadata tests by @brozorec in #597
- ZkEmail: DKIM registry by @brozorec in #592
- use storage function names in traits by @ozgunozerk in #594
- Smart accounts: key canonicalization, size limits and direct rule hints by @brozorec in #581
- fix governor compilation by @ozgunozerk in #603
- dont trigger on release candidates by @ozgunozerk in #600
- Merkle distributor: event with u32 index and document reset root behavior by @brozorec in #601
- Governor: fix re-exports by @brozorec in #605
- Default implementations by @ozgunozerk in #604
- update soroban sdk by @ozgunozerk in #615
- Rwa reorg by @ozgunozerk in #620
- RWA:
Valfor country data instead assoc type by @brozorec in #623 - RWA: examples by @brozorec in #614
- fix fungible burnable overrides by @ozgunozerk in #622
- Smart account: policy events by @brozorec in #616
- feat(rwa): add compliance module base architecture by @pasevin in #607
- Fungible: explicit total_supply in capped by @brozorec in #662
- strip xdr from proposal hash by @ozgunozerk in #661
- fix point panic fix by @ozgunozerk in #645
- renounce guards to inspect live until ledger by @ozgunozerk in #648
- Smart account: spending limit policy by @brozorec in #649
- governor quorum dynamic by @ozgunozerk in #647
- muxed address event fix by @ozgunozerk in #646
- name change by @ozgunozerk in #660
- Smart account: remove fingerprints by @brozorec in #663
- Smart account: canonical signers by @brozorec in #657
- queue for governance by @ozgunozerk in #659
- Smart account: new sign digest by @brozorec in #655
- Docs fixes by @brozorec in #658
- Smart account: add get_signer_id and get_policy_id by @brozorec in #664
- governor timelock example by @ozgunozerk in #665
- Smart account: example weighted threshold policy by @brozorec in #666
- Smart account: authenticate after matching signers by @brozorec in #667
- comment fix by @ozgunozerk in #671
- quorum fixes by @ozgunozerk in #670
- Fix timelock example by @brozorec in #672
- remove outdated comments by @ozgunozerk in #673
- release prep by @ozgunozerk in #675
New Contributors
Full Changelog: v0.6.0...v0.7.0
v0.7.0-rc.2
This is a release candidate for the audit purposes.
Warning
This release has not yet been audited, and not ready for use in production.
v0.7.0-rc.1
This is a release candidate for the audit purposes.
Warning
This release has not yet been audited, and not ready for use in production.