This repository was archived by the owner on May 26, 2026. It is now read-only.
Add contract reference docs for Teller, BoringQueue, BoringVault, and Accountant#1
Open
gitshreevatsa wants to merge 2 commits into
Open
Conversation
Author
|
Also opened a PR on the boring-vault repo with a TypeScript SDK if that's useful context — same exploration, different output. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds four contract reference documents under
public-docs/integrations/contracts/. These cover the four core contracts an integrator touches when building on top of the BoringVault system.What's included
Each doc is structured in three layers: a quick overview for orientation, a working integration guide with step-by-step flows and a runnable viem example, and a full function reference with parameters, return values, events, revert conditions, and internal behavior notes.
Teller.md- deposit and withdrawal entry point; covers ERC20 and native ETH flows, share lock mechanics, the deposit cap, deny lists, andrefundDepositBoringQueue.md- async withdrawal queue; covers the request lifecycle, discount model, solver callback flow, andwithdrawCapacitymanagementBoringVault.md- custody contract and share token; coversenter/exit,manage, and thebeforeTransferhookAccountant.md- exchange rate oracle and fee ledger; covers rate reading, multi-asset pricing via rate providers, fee mechanics, and auto-pause behaviorNon-obvious behavior documented
A few things in the contracts will cause integration failures without prior warning, so these are called out explicitly:
depositandwithdrawcarryrequiresAuth- the deployed Authority must be configured to allow public access, or all user calls silently revertisPausedblocks both deposits and withdrawals, not just deposits as the source comments suggestbulkDepositskips the share lock and writes no refund history - shares are immediately transferable and non-refundablewithdrawCapacityis not restored when a solver fills requests - only cancellations restore it, so admins need to replenish it manually after each solve batchamountOfAssetson a queue request is fixed at submission time - exchange rate increases after submission do not benefit the userclaimFeescan only be called by the vault itself, not by an admin EOA directly; the path isvault.manage(accountant, abi.encodeWithSelector(claimFees.selector, asset), 0)updateExchangeRatedoes not validatenewExchangeRate > 0; keepers need to guard this off-chainsetRateProviderDatadoes not validate the provider returns a nonzero rate; a broken provider causes all deposits and withdrawals for that asset to revertHow the docs were generated
All docs were written from the actual Solidity source (
TellerWithMultiAssetSupport.sol,BoringOnChainQueue.sol,BoringVault.sol,AccountantWithRateProviders.sol). No functions, parameters, or behaviors were invented.