OmniTrust
OmniTrust allows users to deposit any ERC20 or native asset of their choosing into Omnify. Upon creation of the deposit the creator can specify other owners who can modify any of the deposit's properties. Additionally, beneficiaries can be declared with or without daily allownces. More details are described below. Accessible from trust.omnify.finance and app.omnify.finance/trust

Interactions
OmniTrust contracts are very versatile and support many interactions. In this page we will cover creating deposits and their properties, activating and de-activating deposits, withdrawing from a deposit, retracting a deposit, and depositing funds into an existing deposit. You can find a list of all Omnify services' tiers and fees at omnify.finance/fees.
Start by downloading the OmniTrust interface from our Github repo.
Deposits and their properties
Before we dive in let's take a look at the createDeposit function, the Owner struct, and the Beneficiary struct.
Owner Struct
Beneficiary Struct
Create a Deposit
Get Omnify's deposit & beneficiary fee and define msgVal variable
Omnify's deposit fee is charged when creating a deposit, or when depositing into an existing deposit. The beneficiary fee is charge per beneficiary when creating the deposit and when adding new beneficiaries while modifying the deposit.
WARNING: CREATING A NON-RETRACTABLE & NON-MODIFIABLE DEPOSIT WITHOUT ANY BENEFICIARIES WILL RESULT IN THE LOSS OF THE DEPOSITED ASSETS FOREVER REGARDLESS WHETHER YOUR ADDRESS IS ON THE LIST OF OWNERS OR NOT. OWNERS CANNOT WITHDRAW THE WHOLE DEPOSIT UNLESS ITS RETRACTABLE.
Activating and De-activating a deposit
To activate or de-activate a deposit any of the owners can simply call setDepositActiveVal with the parameters of deposit id, and active status as a boolean.
Activate
De-Activate
Withdraw from a deposit
An address has to be a beneficiary of a deposit to be able to withdraw from it. Additionally, if that beneficiary is limited by a daily allowance they can only withdraw their specified allowance once every 24 hours. To withdraw from a deposit a beneficiary should call withdrawFromDeposit and pass the deposit ID, and amount.
Retracting all the deposit's funds
When any of the owners retract a deposit, all the funds contained within are transferred to their balance, and the deposit is de-activated until re-activated again. To Retract a deposit any of the owners should call retractDeposit and pass the id of the deposit.
Deposit into existing deposit
Any modifiable deposit can accept deposits by anyone who has the id. The assets deposited should match the initial asset the deposit was created for. Just call depositIntoExistingDeposit and pass the id, asset address, and the amount in Wei.
We are now able to utilize OmniTrust's versatility. 🏦
Last updated