Skip to content

Solidity implementation of ACTUS Contract Types

License

Notifications You must be signed in to change notification settings

hanmichael/actus-solidity

 
 

Repository files navigation

ACTUS Solidity

Build Status License

Solidity implementation of ACTUS Contract Types (https://www.actusfrf.org/algorithmic-standard)

Demo: ACTUS Solidity Calculator running on Görli Testnet.

Smart Contracts

Core

Contains banking-grade financial logic such as ACTUS day-count & end-of-month conventions, ACTUS datatypes and floating point arithmetic used throughout all ACTUS engines.

Engines

Contains ACTUS state machine engines for each ACTUS Contract Type. An Engine implements the state transition & payoff functions and the schedule generation logic for an ACTUS Contract Type. Engines are stateless smart contracts, thus can be used on-chain as well as off-chain (e.g. by using the EVM as a TEE).

Development

Requirements

  • NPM (>=6.8.0)
  • truffle and ganache-cli
  • jq (only for generating artifacts)
npm install -g truffle
npm install -g ganache-cli

Run

  1. install dependencies
# contracts/
yarn install
  1. deploy contracts and run tests
# contracts/
yarn test

Deployments

Network FloatMath PAMEngine
Görli 0x9240caa74A84C9b0648A1FB1fa5a7F4d9250C313 0x598e2Ea93b68F8a0B5fDb259E81ee59f10f7ac4A
Kovan 0xd48E171D4869271e0ED90C7B0F131a01988ab50e 0xF3cff5a88aFf021976bb1Fa421Ed2f5d4C299E32
Rinkeby 0xd48E171D4869271e0ED90C7B0F131a01988ab50e 0xF3cff5a88aFf021976bb1Fa421Ed2f5d4C299E32
Ropsten 0xd48E171D4869271e0ED90C7B0F131a01988ab50e 0xF3cff5a88aFf021976bb1Fa421Ed2f5d4C299E32

Implemented Conventions

  • Contract-Role-Sign-Convention (for PAM)
  • Contract-Default-Convention

Business-Day-Count-Conventions

  • SCF (Shift/Calculate following)
  • SCMF (Shift/Calculate modified following)
  • CSF (Calculate/Shift following)
  • CSMF (Calculate/Shift modified following)
  • SCP (Shift/Calculate preceding)
  • SCMP (Shift/Calculate modified preceding)
  • CSP (Calculate/Shift preceding)
  • CSMP (Calculate/Shift modified preceding)

Year-Fraction-Conventions (Day-Count-Methods)

  • A/AISDA (Actual Actual ISDA)
  • A/360 (Actual Three Sixty)
  • A/365 (Actual Three Sixty Five)
  • 30E/360ISDA (Thirty E Three Sixty ISDA)
  • 30E/360 (Thirty E Three Sixty)
  • 30/360 (Thirty Three Sixty)
  • 1/1

End-Of-Month-Conventions

  • Same Day Shift
  • End-Of-Month Shift

About

Solidity implementation of ACTUS Contract Types

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Solidity 71.8%
  • JavaScript 26.5%
  • Shell 1.7%