feat(escrow): enforce max USD escrow value via oracle price feed - #359
Open
mysterio123865 wants to merge 2 commits into
Open
feat(escrow): enforce max USD escrow value via oracle price feed#359mysterio123865 wants to merge 2 commits into
mysterio123865 wants to merge 2 commits into
Conversation
Add SEP-40-shaped oracle integration and admin-configurable USD limits so lock/commit reject oversized trades with ExceedsMaxUsdLimit (Closes Nullifier-Systems#334). Co-authored-by: Cursor <cursoragent@cursor.com>
|
@mysterio123865 is attempting to deploy a commit to the jotelfootball-tech's projects Team on Vercel. A member of the Team first needs to authorize it. |
Resolve conflict in escrow Error enum and test modules by keeping oracle USD limit variants and appending tranche-release errors. Co-authored-by: Cursor <cursoragent@cursor.com>
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Implements oracle-based USD value enforcement for escrow creation, preventing transactions from exceeding the configured maximum USD limit regardless of the asset being used.
What was implemented
Integrated an oracle price feed into the escrow contract to retrieve trusted asset-to-USD exchange rates.
Added USD-equivalent validation during escrow creation by converting the deposited asset amount using the oracle price.
Enforced the configured maximum USD transaction limit, rejecting escrow requests that exceed the allowed value.
Added support for multiple supported assets through the oracle conversion interface.
Ensured validation occurs before escrow creation to prevent oversized transactions from being locked on-chain.
Preserved existing escrow behavior for valid transactions while introducing the new value-limit enforcement.
Testing
Verified oracle-based USD conversion and maximum value enforcement.
Confirmed transactions within the configured limit succeed while transactions exceeding the limit are rejected.
Validated error handling for invalid or unavailable oracle pricing.
Ensured existing escrow functionality remains unaffected for compliant transactions.
Commit
Commit: b74435c
Message: feat(escrow): enforce max USD escrow value via oracle price feed
Closes #334