Technical References
Technical details on Standard Exchange components
This is not written for Regular users. Only auditors and developers are recommended to read.
Standard Exchange Smart Contracts
Welcome to Standard Exchange Smart Contracts Docs.
The pages here contain conceptual and technical documentation of Standard Exchange.
If you are new to Standard Exchange, you might want to check out the Protocol Concepts first.
You can also take a look at the Standard Protocol Whitepaper.
Developer links
The Standard Exchange contract codes are separated in one monorepo for Standard 2.0 contracts.
Admin key contracts
MatchingEngine
, OrderbookFactory
, SABT
, Treasury
, Membership
, BlockAccountant
are the contracts which has privileged role for maintaining and updating Standard Exchange features.
Upgradeable smart contracts
Some smart contracts are upgradeable for following purposes:
Treasury
: Funds in Treasury contract are basically protocol fees owned by Standard Labs. The admin manages revenue share model to be utilized based on the protocol's situation. Users' fund and protocol fees are segregated from the beginning with MatchingEngine
contract, and there is no user funds involved.
SABT
: SABT is a part of revenue share business model of Standard Exchange, and Standard Labs has to manage it. Users' fund and protocol fees are segregated from the beginning with MatchingEngine
contract, and there is no user funds involved.
Membership
: Membership is a part of revenue share business model of Standard Exchange, and Standard Labs has to manage it for maintaining Standard Protocol. Users' fund and protocol fees are segregated from the beginning with MatchingEngine
contract, and there is no user funds involved.
BlockAccountant
: BlockAccountant contract is a part of revenue share business model of Standard Exchange, and Standard Labs has to manage it for maintaining Standard Protocol. Users' fund and protocol fees are segregated from the beginning with MatchingEngine
contract, and there is no user funds involved.
Orderbook
: Orderbook can be upgraded by optimizing its core logics on order storage and price navigation.
OrderbookFactory
: OrderbookFactory needs to be connected to new updated MatchingEngine
contract, and it cannot be updated by a random person. Hence, it has privileged role by the dev.
MatchingEngine
: Matching Engine can be upgraded to add support for future market and stablecoin liquidiation integrations. This can change the variables and data so proxy is avoided.
Proxy smart contracts
Orderbook
: Orderbook contracts are used with proxy pattern to save gas cost of adding a pair by end users. It also is used to update the code all at once for optimizing its core logic.
Last updated