1. Providing a Price
Interaction with the USDN Protocol
Last updated
Interaction with the USDN Protocol
Last updated
When a user interacts with the USDN protocol (by minting/redeeming the USDN token, opening/closing a long position, or liquidating positions), providing a price is mandatory. The protocol, operating on the blockchain, does not have direct access to external prices and therefore relies on the information provided by the user. To minimize the risk of fraud, only prices from trusted oracles such as Pyth and Chainlink are accepted. A redundancy mechanism is in place between these two oracles to ensure continuity of operations if one becomes unavailable.
To protect the protocol against attacks or price manipulation, a two-step system has been implemented:
Initiate: The user begins by initiating the action (minting/redeeming the USDN token or opening/closing a long position) and provides a security deposit of 0.15 ETH. This deposit serves as a guarantee for the subsequent validation of the action.
Validate: After a minimum of 24 seconds, the user must validate their action. The price used for validation is the one from Pyth, recorded at T+24 seconds. If Pyth is unavailable, the protocol then falls back to Chainlink. This redundancy mechanism ensures that validation is always conducted with reliable data.
Although the initiator of the operation is typically responsible for validation, any other user can also perform this action. However, specific time intervals determine whether the security deposit is given to the designated validator or claimed by the actual validator.
Here’s a summary of the validation time intervals and who can claim the security deposit at each stage:
From T to T+23s: No validation possible.
From T+24s to T+15m: The designated validator will receive the security deposit on validation (using Pyth).
From T+15m to T+20m: Any validator will receive the security deposit on validation (using Pyth).
From T+20m to T+85m: The designated validator will receive the security deposit (using Chainlink). However, validation must be done using a new Chainlink price available at T+20m. This rule ensures no user can exploit the protocol financially. Note that Chainlink updates its prices at a maximum interval of 60 minutes, potentially creating a "dead zone" between T+20m and T+80m if no new price is published. However, there is a guaranteed window between T+80m and T+85m where the initiator can validate under any circumstances.
After T+85m: Any validator will receive the security deposit on validation (using Chainlink).
The 0.15 ETH deposit ensures that the user completes their operation, preventing actions from remaining indefinitely pending, which could hinder the functionality of the protocol. Validation delays are designed to encourage timely transaction finalization. By limiting the time available to validate an action, the protocol ensures that operations are executed efficiently and within timelines that preserve the system’s responsiveness and security. This time structure also helps minimize the risks of manipulation or external interference, thus supporting the overall integrity of transactions on the platform.