Delegate Management

Overview of Delegation Mechanism

In the earlier Smart Margin (SM) versions (v1/v2), delegation was controlled at the SM account level. However, in SMv3, delegation is streamlined through Synthetix account permissions. Users can delegate control to another address by granting it the "commit async order" permission, which is executed directly through the Synthetix proxy. A programmatic example of this process can be found here.

Permissions in SMv3

The core functionality of SMv3 hinges on account permissions. Granting Kwenta's Engine administrative authority over a user's Synthetix v3 account enables the Engine to carry out trades on the user’s behalf. This arrangement also empowers the Engine to offer specialized trading features, such as conditional orders, which are currently not available in the Synthetix protocol itself.

Management of Delegates

Delegates are defined as addresses granted the "commit async order" permission for a specific account. Users can add or revoke these permissions through the Synthetix v3 Perps market proxy. The referenced example illustrates how to apply the grantPermission function to assign permissions, while the revokePermission function is used for their removal.

It’s important to note that as accounts are NFTs, their ownership can be transferred. In such instances, all pre-existing permissions are automatically revoked.

Decentralization Considerations

The Engine checks the permission status of each incoming call with Synthetix v3 before proceeding. This means that assigning admin or "commit async order" permissions to the Engine is a secure process. However, it's crucial to remember that the strength of decentralization depends on its most vulnerable point. For instance, the Synthetix protocol is upgradeable, and therefore, there's a reliance on the trustworthiness of the Synthetix-owned multisig to avoid malicious actions.

Last updated