Acta Finance


Acta Swap works with an Automatic Market Maker (AMM). An AMM is a smart contract that regulates trading. Since smartcontracts are decentralized, users effectively trade with other users’ provided liquidity. ActaFi Swap users can also trade with a margin provided by funding contracts that are provided with a varied maturity term and funding cost. Margin takers initiate the swap with margin following several steps:
  1. 1.
    Reserving a funding contract from the funding pool covering the required position
  2. 2.
    Providing the required collateral to the settlment pool to cover the interest and immediate changes to the value of the position taken
  3. 3.
    Creating a position by executing the swap in the platform
The lender receives interest from the borrower in exchange for the margin loaned, while borrowers’ crypto assets are counted as collateral to secure investors’ investment. This serves as a guarantee for the lender; if anything goes wrong, the collateral is used as a form of compensation.
Once the position is closed by executing a swap, the lender is returned his funding from the funding pool as well as the interest accrued from the setllement pool while the margin taker gets back his collateral and takes the profit from the position after settling the costs for the funding. ActaFi Oracle closely follows the price feeds from multiple sources and monitors all the active positions. In case the price changes hitting the margin price, it will trigger the margin call. The funding contract will be closed early and after paying the accrued interest the remaining collateral will be paid to the margin taker.
Operations are fully decentralised with the funds and positions held securely in the smart contracts. The funds are backed by the users provided funds via funding pools and liquidity pools giving new opportunities for swap users to earn income with a multiplier.


The main factory contract takes care of initialising the Pools setting the global settings for the Swap.


Initiating the liquidity pool allows the possibility to create various pools that operate under different fee settings and token combinations.


The settlments pool stores the collateral, accrued interest and insurance funds settling the claims after the margin positions are closed.


The structure for the funding pools enable the users to create flexible maturity and terms to fund the margin positions for the swap.


Set the owner for the Factory contract, allowing to change the setup of the pools.


Enable new fee structures for the new initiated pools. enableMarginMultiplier() Enable different multiplers for margin swap.


An array of possible collateral selections for the initiated liquidity pools.


Set the possible funding terms for funding contracts.


The general standard ERC–20 protocol is followed enabling the token trasnfers and balance lookups


The total supply of the token can be retrieved.


The balance of the token can be retrieved.


Initiates the transfer of the tokens that the user or smart contract holds.


The amount allowed to spend by an approved counterparty or smart contract.


Approve the allowance for a counterparty or smart contract.


Increase the supply of the tokens.


Decrease the supply of the token.


Initiating the liquidity pool allows the possibility to create various pools that operate under different fee settings and token combinations


Initializing the liquidity pool provides the users with an option to provide their assets as liquidity for the swap. collect() Collect the accrued fees for active positions for the swap.
The swap executes the swap between token0 and token1 either directly or indirectly.


Get information about the token0 for the pool.


Get information about the token1 for the pool.


The total amount of fees gathered


The liquidity positions’ information in the liquidity pool.


A parameter that defines the spacing of liquidity according to the price points defined for the pool.


Update the spacing of the liquidity price points.


Get information about the fee for swaps


Set the swap fee from availbale options as defined by the swap factory contract


Enable margin with possible margin multiplers as defined by the swap factory contract


Set the percentage of funds that have to be provided to open a margin position


Distribute the fees paid by the users, when executing swaps to support the development and other programs.


A liquidity position holds information about the specific liquidity amounts and fees when the user provides it to be used for the protocol users.


Create a position by providing the liquidity for the two token pairs. The liquidity position can be added with upper and lower ticks concentrating the liquidity to a specific price range in the liquidity pool.


Returns an array of positions that where created for a specific liquidity pool. mint() Mint liquidity provider tokens for liquidity position created. burn() Burn liquidity prodiver tokens when liquidity position is closed.


Increase the value of an existing position adding the value of the new position.


Decrease the value of an existing by removing the value of the new position.


claim fees accrued for the liquidity position


A margin pasition holds information about the reserved funding amount, collateral, interest accrued and margin price


A margin position is initiated after the funding amount is reserved in the funding pool, collateral transferred to settlements pools and a swap is executed for the token amount with margin.


Returns an array of positions that where created for a specific liquidity pool. close() Initiates a reverse transaction on the open token amount with margin, refunds the remaining collateral atfer all interest payments and fees are deducted, releases the locked funding position in the funding pool.


Add additional token amount to the collateral of open position derisking the position.


Execute a forceful close on the margin position by the owner if the margin price is reached.


Provides an output for estimation and displaying it to the Swap user. The quote can be estimated by providing token0 or token1 as an input also specifying the type if the swap has to executed with a margin. Quote also provides a split output by estimating the partial transactions within internal and extenral pools


Provides an estimation of fees for executing the swap with margin input as token0, receiving token1


Provides an estimation of fees for executing the swap with margin input as token1, receiving token0


Provides an estimation of fees for funding the margin and executing the swap with margin input as token0, receiving token1.


Provides an estimation of fees for funding the margin and executing the swap with margin input as token1, receiving token0.


Execute direct or indirect swap between the two tokens token0 and token1. The swap is routed to the most efficient liquidity pools, provided the cost the change in liquidity and available margin in the funding pool.


Executes the swap with margin input as token0, receiving token1


Executes the swap with margin input as token1, receiving token0


Executes the swap with margin input as token1, receiving token0


Executes the swap with margin input as token0, receiving token1


The settlements pool acts as an escrow account for open margin positions before they are settled. Each pool holds the amount of tokens as collateral for the open margin position, any unclaimed interest by the funding position provider and an insurance fund that receives a percentage of all the realized lending profits.


The settlements pool is initialised when at least one margin multiplier is configured for the liquidity pool.


Get information about the token in the settlements pool.


Transfer settlement: accrued interest, refund funding position to the owner. claimInterest() Transfer the accrued interest to the owner of the funding position. collaterals() View information about the current collaterals stored in the contract. payCollateral() Transfer the collateral for a margin position. refundCollateral() Invoked by the closed margin position or liquidation event after the settlment to the funding position. liquidate() Liquidate position, invoked only by the Oracle. Invokes the settlement for the funding position. setInsurance() Set the fee percentage that is reserved as insurance for the position when accrued interest is claimed. distributeProtocolFees() Invoked by the owner of the settlements pool distributing the fees from the realised margin swap profits and accrued interest.


A funding pool is initiated for the funding / lending providers with a possibility to provide their liquidity as a source of funds for margin swap. Each position in the funding pool can have a pre-defined maturity term and a user defined interest percentage that is calculated and accrued daily. Funding pools are initiated only for the most actively used swap pairs with the lowest margin multiplier, increasing the possible multiplier corresponding to the total value of positions in the funding pool.


Initialised the funding pool for a specific token.


Returns information about the token for the funding pool.


Returns an information of all currently active / locked funding positions


A funding position is created after the user transfers his liquidity to the funding position contract indicating the daily interest and maturity term requirement which is started to be estimated only when the position is taken by the margin taker. The position cannot be cancelled if it is taken by the margin taker and can only be closed at the maturity date of the contract, unless the position is closed early with a margin call by the Oracle.


Create the funding position indicating the daily interest and maturity term requirement


Indicate an open margin position requirement and lock the funding position.


Unlock the funding position once the margin position is closed.


Close the funding position removing it from the Funding pool.


User can call the auto fund option for his open position to indicate that it should remain in the funding pool as a new position with the best possible interest rate and lending duration as a new position once the existing position reaches maturity or is closed.


Provides an estimated returns calculation to the user according to the selected funding amount, interest and maturity term.